perf script and raw events?
Quoted 10 lines · Arun Sharma
David,
# perf record -agR -e cycles -- sleep 1 # perf scriptgives me nice list of stack traces. However if I use a raw event such as:
# perf record -agR -e r53003c -- sleep 1 # perf script
Works fine for me (with your raw patch for perf-script):
# /tmp/build-perf/perf record -agR -e r53003c -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.147 MB perf.data (~6438 samples) ]
# /tmp/build-perf/perf script
perf 27684 [000] 180983.511378: raw 0x53003c:
ffffffff810d696b put_mems_allowed ([kernel.kallsyms]) ffffffff810cbfa9 perf_mmap_alloc_page ([kernel.kallsyms]) ffffffff810ccd13 perf_mmap ([kernel.kallsyms]) ffffffff810f1772 mmap_region ([kernel.kallsyms]) ffffffff810f1c02 do_mmap_pgoff ([kernel.kallsyms])
...
What is that raw event? Where do you find the encodings for raw events?
David
Quoted 4 lines
I get no traces and perf script immediately exits. Do you know why?
-Arun
Quoted 29 lines · David Ahern
Quoted 10 lines · Arun Sharma
David,
# perf record -agR -e cycles -- sleep 1 # perf scriptgives me nice list of stack traces. However if I use a raw event such as:
# perf record -agR -e r53003c -- sleep 1 # perf scriptWorks fine for me (with your raw patch for perf-script):
# /tmp/build-perf/perf record -agR -e r53003c -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.147 MB perf.data (~6438 samples) ]# /tmp/build-perf/perf scriptperf 27684 [000] 180983.511378: raw
0x53003c:
ffffffff810d696bput_mems_allowed([kernel.kallsyms])ffffffff810cbfa9perf_mmap_alloc_page([kernel.kallsyms])ffffffff810ccd13perf_mmap([kernel.kallsyms])ffffffff810f1772mmap_region([kernel.kallsyms])ffffffff810f1c02do_mmap_pgoff([kernel.kallsyms])
Quoted 3 lines
...
What is that raw event? Where do you find the encodings for raw events?
raw event starts with a 'r' character and followed by the encoding of the event. You can find the encoding from cpu spec, for Intel CPU, it's Intel® 64 and IA-32 Architectures Software Developer's Manuals.
http://www.intel.com/products/processor/manuals/
For example,
perf top -e cpu-cycles
is equivalent with
perf top -e r003c
Lin Ming
Quoted 12 lines
David
Quoted 4 lines
I get no traces and perf script immediately exits. Do you know why?
-Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 1 line
What is that raw event? Where do you find the encodings for raw events?
You can try libpfm4.
$ git clone git://perfmon2.git.sourceforge.net/gitroot/perfmon2/libpfm4
showevtinfo in libpfm4/examples/ lists all events supported by the
CPU, including raw events.
evt2raw in libpfm4/perf_examples converts event names into raw event
recognized by perf.
Regards,
chenwj
Signature · 4 lines
Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667