On 03/26/11 06:31, zhao bao wrote:
>> It's used to trace kernel space page faults, not for userspace code.
>>
>> Lin Ming
>>
> 
> From the ouput of "perf report" command, I think  perf can record the
> page faults from userspace code.
> 
> [root@localhost lab]# perf record -R -c 1  -d  -e  faults ./hello
> hello,world

'-e faults' is a software event. perf-trace does not handle S/W events.
perf-trace has been renamed to perf-script, and perf-script recently
gained the ability to dump S/W events:

https://lkml.org/lkml/2011/3/10/3

David

> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.010 MB perf.data (~420 samples) ]
> [root@localhost lab]# perf report
> # Events: 92  cycles
> #
> # Overhead  Command      Shared Object  Symbol
> # ........  .......  .................  ......
> #
>    10.87%    hello  ld-2.12.90.so      [.] .L198
>     6.52%    hello  ld-2.12.90.so      [.] _dl_load_cache_lookup
>     6.52%    hello  ld-2.12.90.so      [.] _dl_lookup_symbol_x
>     4.35%    hello  ld-2.12.90.so      [.] dl_main
>     3.26%    hello  ld-2.12.90.so      [.] _dl_start
>     3.26%    hello  ld-2.12.90.so      [.] _dl_cache_libcmp
>     3.26%    hello  ld-2.12.90.so      [.] do_lookup_x
>     2.17%    hello  libc-2.12.90.so    [.] _init
>     2.17%    hello  libc-2.12.90.so    [.] _IO_file_overflow_internal
> --
> 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
--
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

Reply via email to