* How can I get timestamps of samples in perf
@ 2013-08-10 2:35 Peipei Wang
2013-08-10 4:43 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Peipei Wang @ 2013-08-10 2:35 UTC (permalink / raw)
To: perf group
Hi all,
I am trying to understand something about perf record. In its guide,
perf record could use option -T to generate sample timestamp, and then
use perf report -D to get them.
However, what I get from perf report -D is something as follows. Does
anyone have an idea what content of perf.data means?
# ========pei-OptiPlex-960:~$
# captured on: Fri Aug 9 15:58:02 2013
# hostname : peipei-OptiPlex-960
# os release : 3.2.0-49-generic-pae
# perf version : 3.2.46
# arch : i686
# nrcpus online : 4
# nrcpus avail : 4
# cpudesc : Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
# cpuid : GenuineIntel,6,23,10
# total memory : 8134988 kB
# cmdline : /usr/bin/perf_3.2.0-49 record -T sleep 3
# event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, e
# HEADER_CPU_TOPOLOGY info available, use -I to display
# ========
#
0x128 [0x50]: event: 1
.
. ... raw event: size 80 bytes
. 0000: 01 00 00 00 01 00 50 00 ff ff ff ff 00 00 00 00 ......P.........
. 0010: 00 00 00 c1 00 00 00 00 ff 9f 41 37 00 00 00 00 ..........A7....
. 0020: 00 00 00 c1 00 00 00 00 5b 6b 65 72 6e 65 6c 2e ........[kernel.
. 0030: 6b 61 6c 6c 73 79 6d 73 5d 5f 74 65 78 74 00 00 kallsyms]_text..
. 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
.
0 0x128 [0x50]: PERF_RECORD_MMAP -1/0: [0xc1000000(0x37419fff) @ 0xc1000000]: [k
0x178 [0x80]: event: 1
.
. ... raw event: size 128 bytes
. 0000: 01 00 00 00 01 00 80 00 ff ff ff ff 00 00 00 00 ................
. 0010: 00 a0 41 f8 00 00 00 00 ff 5f 00 00 00 00 00 00 ..A......_......
. 0020: 00 00 00 00 00 00 00 00 2f 6c 69 62 2f 6d 6f 64 ......../lib/mod
. 0030: 75 6c 65 73 2f 33 2e 32 2e 30 2d 34 39 2d 67 65 ules/3.2.0-49-ge
. 0040: 6e 65 72 69 63 2d 70 61 65 2f 6b 65 72 6e 65 6c neric-pae/kernel
. 0050: 2f 64 72 69 76 65 72 73 2f 70 6c 61 74 66 6f 72 /drivers/platfor
. 0060: 6d 2f 78 38 36 2f 77 6d 69 2e 6b 6f 00 00 00 00 m/x86/wmi.ko....
. 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
.
0 0x178 [0x80]: PERF_RECORD_MMAP -1/0: [0xf841a000(0x5fff) @ 0]: /lib/modules/3.
0x1f8 [0x88]: event: 1
.
. ... raw event: size 136 bytes
. 0000: 01 00 00 00 01 00 88 00 ff ff ff ff 00 00 00 00 ................
. 0010: 00 00 42 f8 00 00 00 00 ff 6f 00 00 00 00 00 00 ..B......o......
. 0020: 00 00 00 00 00 00 00 00 2f 6c 69 62 2f 6d 6f 64 ......../lib/mod
. 0030: 75 6c 65 73 2f 33 2e 32 2e 30 2d 34 39 2d 67 65 ules/3.2.0-49-ge
. 0040: 6e 65 72 69 63 2d 70 61 65 2f 6b 65 72 6e 65 6c neric-pae/kernel
. 0050: 2f 64 72 69 76 65 72 73 2f 69 32 63 2f 61 6c 67 /drivers/i2c/alg
. 0060: 6f 73 2f 69 32 63 2d 61 6c 67 6f 2d 62 69 74 2e os/i2c-algo-bit.
. 0070: 6b 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ko..............
. 0080: 00 00 00 00 00 00 00 00 ........
.
0 0x1f8 [0x88]: PERF_RECORD_MMAP -1/0: [0xf8420000(0x6fff) @ 0]: /lib/modules/3.
Thanks for your help.
Yours,
Wang Peipei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How can I get timestamps of samples in perf
2013-08-10 2:35 How can I get timestamps of samples in perf Peipei Wang
@ 2013-08-10 4:43 ` Andi Kleen
2013-08-10 14:34 ` Peipei Wang
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2013-08-10 4:43 UTC (permalink / raw)
To: Peipei Wang; +Cc: perf group
Peipei Wang <wangpeipei.90@gmail.com> writes:
> I am trying to understand something about perf record. In its guide,
> perf record could use option -T to generate sample timestamp, and then
> use perf report -D to get them.
>
> However, what I get from perf report -D is something as follows. Does
> anyone have an idea what content of perf.data means?
Use "perf script" to display the data instead.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How can I get timestamps of samples in perf
2013-08-10 4:43 ` Andi Kleen
@ 2013-08-10 14:34 ` Peipei Wang
2013-08-10 15:01 ` David Ahern
0 siblings, 1 reply; 4+ messages in thread
From: Peipei Wang @ 2013-08-10 14:34 UTC (permalink / raw)
To: Andi Kleen; +Cc: perf group
I get it. Is the timestamp for wall-clock or not??? What is the
counting unit of timestamp? Seconds??
swapper 0 [000] 1591103.081337: instructions: c1022ae6 int
swapper 0 [000] 1591103.081341: instructions: c1022ae6 int
swapper 0 [000] 1591103.081343: instructions: c1022ae6 int
swapper 0 [000] 1591103.081345: instructions: c1022ae6 int
swapper 0 [000] 1591103.081348: instructions: c1036a26 __t
swapper 0 [000] 1591103.081353: cycles: c1035e68 native_wr
swapper 0 [000] 1591103.081355: cycles: c1035e68 native_wr
swapper 0 [000] 1591103.081357: cycles: c1035e68 native_wr
swapper 0 [000] 1591103.081359: cycles: c1035e68 native_wr
swapper 0 [000] 1591103.081362: cycles: c101909c mwait_id
Best wishes.
Yours,
Wang Peipei
Best wishes.
Yours,
Wang Peipei
On Sat, Aug 10, 2013 at 12:43 AM, Andi Kleen <andi@firstfloor.org> wrote:
> Peipei Wang <wangpeipei.90@gmail.com> writes:
>
>> I am trying to understand something about perf record. In its guide,
>> perf record could use option -T to generate sample timestamp, and then
>> use perf report -D to get them.
>>
>> However, what I get from perf report -D is something as follows. Does
>> anyone have an idea what content of perf.data means?
>
> Use "perf script" to display the data instead.
>
> -Andi
>
> --
> ak@linux.intel.com -- Speaking for myself only
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How can I get timestamps of samples in perf
2013-08-10 14:34 ` Peipei Wang
@ 2013-08-10 15:01 ` David Ahern
0 siblings, 0 replies; 4+ messages in thread
From: David Ahern @ 2013-08-10 15:01 UTC (permalink / raw)
To: Peipei Wang; +Cc: Andi Kleen, perf group
On 8/10/13 10:34 AM, Peipei Wang wrote:
> I get it. Is the timestamp for wall-clock or not??? What is the
> counting unit of timestamp? Seconds??
It is a "perf_clock" timestamp in seconds.micro-seconds. On x86 the
timestamp is related to the TSC -- usually.
I have been on a 2-1/2 year mission and counting to get time-of-day
correlations into perf. e.g., see
https://github.com/dsahern/linux/tree/perf-time-of-day-3.8.
That branch has a kernel side change to add an ioctl to pull the
perf_clock timestamp into userspace. It does not include tracepoints to
catch ntpd updates for example.
David
>
> swapper 0 [000] 1591103.081337: instructions: c1022ae6 int
> swapper 0 [000] 1591103.081341: instructions: c1022ae6 int
> swapper 0 [000] 1591103.081343: instructions: c1022ae6 int
> swapper 0 [000] 1591103.081345: instructions: c1022ae6 int
> swapper 0 [000] 1591103.081348: instructions: c1036a26 __t
> swapper 0 [000] 1591103.081353: cycles: c1035e68 native_wr
> swapper 0 [000] 1591103.081355: cycles: c1035e68 native_wr
> swapper 0 [000] 1591103.081357: cycles: c1035e68 native_wr
> swapper 0 [000] 1591103.081359: cycles: c1035e68 native_wr
> swapper 0 [000] 1591103.081362: cycles: c101909c mwait_id
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-10 15:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-10 2:35 How can I get timestamps of samples in perf Peipei Wang
2013-08-10 4:43 ` Andi Kleen
2013-08-10 14:34 ` Peipei Wang
2013-08-10 15:01 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).