[LITMUS^RT] Questions about the time measurement in ft_trace

Luo, Zheng luozheng at wustl.edu
Tue Jan 28 22:33:48 CET 2014


Hi everyone,


I have a question about the time measure measurement in ft_trace in Litmus.


I was wondering how does the ft_trace get the timestamp information, then I found that it used this function:


#include <asm/feather_trace.h>

#include <asm/timex.h> /* for get_cycles() */

static inline unsigned long long ft_timestamp(void)

{

    return get_cycles();

}


This function will return the cycle of the CPU, I checked all the program in the ft_tool and the sched-trace-tool-master, I thought when you get_cycles of the CPU, should not you divide the current frequency of the CPU to get the time. I did not find the division, or the current get cycle did give you the time information?


When I run a small program, I get the output here, and I also send a picture as an attachment.


luozheng at luozheng-Ubuntu:~/Documents/Litmus/sched-trace-tools-master$ ./st_show st--6.bin

[         0] NAME            4420/0     on CPU  6 base_task

[         0] PARAM           4420/0     on CPU  6 T=(cost:100.00ms, period:500.00ms, phase:  0.00ms), part=0

[   2914923] SWITCH_FROM     4420/1     on CPU  6

[   2914923] SWITCH_TO       4420/1     on CPU  6

[   2914923] SWITCH_FROM     4420/1     on CPU  6

[   2914923] COMPLETION      4420/1     on CPU  6

[   2915423] RELEASE         4420/2     on CPU  6 2915923.27ms

[   2915423] SWITCH_TO       4420/2     on CPU  6

[   2915774] SWITCH_FROM     4420/2     on CPU  6

[   2915774] COMPLETION      4420/2     on CPU  6

[   2915923] RELEASE         4420/3     on CPU  6 2916423.27ms

[   2915923] SWITCH_TO       4420/3     on CPU  6

[   2916274] SWITCH_FROM     4420/3     on CPU  6

[   2916274] COMPLETION      4420/3     on CPU  6

[   2916423] RELEASE         4420/4     on CPU  6 2916923.27ms

[   2916423] SWITCH_TO       4420/4     on CPU  6

[   2916774] COMPLETION      4420/4     on CPU  6


I get a little confused here. Is number in the [] should be the cycles of the CPU? The number like 2915923.27ms is the actual time? Or how do we interpret this? I think I need some help here. Thank you very much.



Zheng Luo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20140128/ff51e74d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2014-01-28 15:26:01.png
Type: image/png
Size: 261981 bytes
Desc: Screenshot 2014-01-28 15:26:01.png
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20140128/ff51e74d/attachment.png>


More information about the litmus-dev mailing list