[LITMUS^RT] Question about the overhead measurement in LITMUS and potential memory leak?

Meng Xu xumengpanda at gmail.com
Fri Oct 2 20:13:55 CEST 2015


Hi Namhoon,

Thank you so much for your help and quick reply! It solves the problem!

The .config I used to compile the kernel has CONFIG_HW_PERF_EVENTS set. So
the function you said is never executed.  When I unset the
CONFIG_HW_PERF_EVENTS in .config, I can see some complete events now!

#if defined(CONFIG_CPU_V7) && !defined(CONFIG_HW_PERF_EVENTS)
​Thank you again for your help and time for this!
I really appreciate it!

Best regards,

Meng​

2015-10-02 13:40 GMT-04:00 Namhoon Kim <namhoonk at cs.unc.edu>:

> Hi Meng,
>
> On the IMX6 platform, we use a performance counter to measure cpu cycles.
> In litmus/litmus.c from source code, you can find
> litmus_enable_perfcounters_v7(). This function resets the performance
> counter and starts to count cpu cycles. Can you check if this function is
> executed during the boot process?
>
> -Namhoon
>
> On Fri, Oct 2, 2015 at 1:22 PM, Meng Xu <xumengpanda at gmail.com> wrote:
>
>> Hi Bjorn,
>>
>> Thank you so much for your quick and helpful reply!
>>
>> Hi Namhoon,
>> Since you are also using the same ARM board and didn't have any problem
>> in tracing the scheduling overhead, such as SCHED and CXS, could you help
>> me have a look if I configured anything incorrectly? I really appreciate
>> it!
>>
>>
>>>
>>> Do you have any suggestion/advice on how I can get the complete events?
>>>
>>> I have tried to set the ftcat to highest priority under FIFO scheduler,
>>> it didn't solve the problem.
>>> I was suspecting it is because the buffer is not consumed by ftcat fast
>>> enough so that the old events are overwritten by new events. However, I
>>> only run on rtspin task which leave at least 3 full cores idle to consume
>>> the buffer.
>>>
>>>
>>> If ftcat is starved, then you get some incomplete records, but typically
>>> not 100% incomplete records. This must be something else.
>>>
>>> Have you looked at the trace with ftdump? What does it look like?
>>>
>>>
>> ​I checked the ftdump and it shows that the events are actually recorded
>> but the timestamp of each event is always 0.
>>
>> (Below is the result that I filter out the ftdump for RT tasks
>> ​ and I only show some of them since the rest of them are similar​
>> .)
>>
>> CXS_START            seq:634  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:635  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:644  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:645  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:650  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:651  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:658  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:659  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:666  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:667  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:676  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:02
>>
>> CXS_END              seq:677  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:684  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:685  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:694  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:02
>>
>> CXS_END              seq:695  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>> CXS_START            seq:702  pid:964  timestamp:0  cpu:3  type:RT
>> irq:1 irqc:01
>>
>> CXS_END              seq:703  pid:964  timestamp:0  cpu:3  type:RT
>> irq:0 irqc:00
>>
>>
>>
>> Is there anything else I need to configure to make it work? It seems that
>>  in
>> litmus/trace.c
>> ​, the ft_timestamp() always return 0?​
>>
>>  if (record_timestamp)
>>
>>             timestamp = ft_timestamp();
>>
>>  if (record_timestamp == RECORD_OFFSET_TIMESTAMP)
>>
>>             timestamp += cycle_offset[smp_processor_id()][cpu];
>>
>> Thanks,
>>
>> Meng
>>
>> --
>>
>> -----------
>> Meng Xu
>> PhD Student in Computer and Information Science
>> University of Pennsylvania
>> http://www.cis.upenn.edu/~mengxu/
>>
>
>


-- 


-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20151002/afe31567/attachment.html>


More information about the litmus-dev mailing list