Re: perf script and raw events?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Wed, Mar 23, 2011 at 7:17 AM, David Ahern <daahern@xxxxxxxxx> wrote:
>
>
> On 03/22/11 16:41, Arun Sharma wrote:
>> David,
>>
>> # perf record -agR -e cycles -- sleep 1
>> # perf script
>>
>> gives 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?

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

>
> David
>
>>
>> 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 majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux