2012-09-26 23:05:56 +00:00
|
|
|
perf-trace(1)
|
|
|
|
=============
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
perf-trace - strace inspired tool
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
[verse]
|
|
|
|
'perf trace'
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
This command will show the events associated with the target, initially
|
|
|
|
syscalls, but other system events like pagefaults, task lifetime events,
|
|
|
|
scheduling events, etc.
|
|
|
|
|
|
|
|
Initially this is a live mode only tool, but eventually will work with
|
|
|
|
perf.data files like the other tools, allowing a detached 'record' from
|
|
|
|
analysis phases.
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
|
|
|
|
--all-cpus::
|
|
|
|
System-wide collection from all CPUs.
|
|
|
|
|
|
|
|
-p::
|
|
|
|
--pid=::
|
|
|
|
Record events on existing process ID (comma separated list).
|
|
|
|
|
|
|
|
--tid=::
|
|
|
|
Record events on existing thread ID (comma separated list).
|
|
|
|
|
|
|
|
--uid=::
|
|
|
|
Record events in threads owned by uid. Name or number.
|
|
|
|
|
|
|
|
--no-inherit::
|
|
|
|
Child tasks do not inherit counters.
|
|
|
|
|
|
|
|
--mmap-pages=::
|
|
|
|
Number of mmap data pages. Must be a power of two.
|
|
|
|
|
|
|
|
--cpu::
|
|
|
|
Collect samples only on the list of CPUs provided. Multiple CPUs can be provided as a
|
|
|
|
comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
|
|
|
|
In per-thread mode with inheritance mode on (default), Events are captured only when
|
|
|
|
the thread executes on the designated CPUs. Default is to monitor all CPUs.
|
|
|
|
|
perf trace: Add duration filter
Example:
[acme@sandy linux]$ perf trace --duration 0.025 usleep 1
2.221 ( 0.958 ms): 6724 execve(arg0: 140733557168278, arg1: 140733557178768, arg2: 16134304, arg3: 140733557167840, arg4: 7955998171588342573, arg5: 6723) = -2
3.690 ( 1.443 ms): 6724 execve(arg0: 140733557168295, arg1: 140733557178768, arg2: 16134304, arg3: 140733557167840, arg4: 7955998171588342573, arg5: 6723) = 0
3.979 ( 0.048 ms): 6724 open(filename: 208733843841, flags: 0, mode: 1 ) = 3
4.071 ( 0.075 ms): 6724 open(filename: 139744419925673, flags: 0, mode: 0 ) = 3
4.318 ( 0.056 ms): 6724 nanosleep(rqtp: 140734030404608, rmtp: 0 ) = 0
[acme@sandy linux]$ perf trace --duration 0.100 usleep 1
1.143 ( 1.021 ms): 6726 execve(arg0: 140736323962279, arg1: 140736323972752, arg2: 34926752, arg3: 140736323961824, arg4: 7955998171588342573, arg5: 6725) = 0
[acme@sandy linux]$
Cherry picked from tmp.perf/trace2 branch.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/n/tip-oslw2j2958we9qf0ctra4whd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-10-08 12:56:00 +00:00
|
|
|
--duration:
|
|
|
|
Show only events that had a duration greater than N.M ms.
|
|
|
|
|
2012-10-17 20:13:12 +00:00
|
|
|
--sched:
|
|
|
|
Accrue thread runtime and provide a summary at the end of the session.
|
|
|
|
|
2012-09-26 23:05:56 +00:00
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
linkperf:perf-record[1], linkperf:perf-script[1]
|