Skip to content

Commit

Permalink
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/acme/linux into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

New features:

  * Add support for pagefault tracing in 'trace', please see multiple examples
    in the changeset messages (Stanislav Fomichev).

User visible changes:

  * Fallback to syscalls:* when raw_syscalls:* is not available in the perl and
    python perf scripts. (Daniel Bristot de Oliveira)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Jul 5, 2014
2 parents 2172c1f + e281a96 commit 432100b
Show file tree
Hide file tree
Showing 12 changed files with 280 additions and 43 deletions.
46 changes: 46 additions & 0 deletions tools/perf/Documentation/perf-trace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,52 @@ the thread executes on the designated CPUs. Default is to monitor all CPUs.
Show tool stats such as number of times fd->pathname was discovered thru
hooking the open syscall return + vfs_getname or via reading /proc/pid/fd, etc.

-F=[all|min|maj]::
--pf=[all|min|maj]::
Trace pagefaults. Optionally, you can specify whether you want minor,
major or all pagefaults. Default value is maj.

--syscalls::
Trace system calls. This options is enabled by default.

PAGEFAULTS
----------

When tracing pagefaults, the format of the trace is as follows:

<min|maj>fault [<ip.symbol>+<ip.offset>] => <addr.dso@addr.offset> (<map type><addr level>).

- min/maj indicates whether fault event is minor or major;
- ip.symbol shows symbol for instruction pointer (the code that generated the
fault); if no debug symbols available, perf trace will print raw IP;
- addr.dso shows DSO for the faulted address;
- map type is either 'd' for non-executable maps or 'x' for executable maps;
- addr level is either 'k' for kernel dso or '.' for user dso.

For symbols resolution you may need to install debugging symbols.

Please be aware that duration is currently always 0 and doesn't reflect actual
time it took for fault to be handled!

When --verbose specified, perf trace tries to print all available information
for both IP and fault address in the form of dso@symbol+offset.

EXAMPLES
--------

Trace only major pagefaults:

$ perf trace --no-syscalls -F

Trace syscalls, major and minor pagefaults:

$ perf trace -F all

1416.547 ( 0.000 ms): python/20235 majfault [CRYPTO_push_info_+0x0] => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0@0x61be0 (x.)

As you can see, there was major pagefault in python process, from
CRYPTO_push_info_ routine which faulted somewhere in libcrypto.so.

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-script[1]
Loading

0 comments on commit 432100b

Please sign in to comment.