08216634d2bc71f50df11d687d2b395d413b630f
[linux-2.6-microblaze.git] / tools / perf / Documentation / perf-ftrace.txt
1 perf-ftrace(1)
2 ==============
3
4 NAME
5 ----
6 perf-ftrace - simple wrapper for kernel's ftrace functionality
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'perf ftrace' <command>
13
14 DESCRIPTION
15 -----------
16 The 'perf ftrace' command is a simple wrapper of kernel's ftrace
17 functionality.  It only supports single thread tracing currently and
18 just reads trace_pipe in text and then write it to stdout.
19
20 The following options apply to perf ftrace.
21
22 OPTIONS
23 -------
24
25 -t::
26 --tracer=::
27         Tracer to use when neither -G nor -F option is not
28         specified: function_graph or function.
29
30 -v::
31 --verbose=::
32         Verbosity level.
33
34 -F::
35 --funcs::
36         List all available functions to trace.
37
38 -p::
39 --pid=::
40         Trace on existing process id (comma separated list).
41
42 -a::
43 --all-cpus::
44         Force system-wide collection.  Scripts run without a <command>
45         normally use -a by default, while scripts run with a <command>
46         normally don't - this option allows the latter to be run in
47         system-wide mode.
48
49 -C::
50 --cpu=::
51         Only trace for the list of CPUs provided.  Multiple CPUs can
52         be provided as a comma separated list with no space like: 0,1.
53         Ranges of CPUs are specified with -: 0-2.
54         Default is to trace on all online CPUs.
55
56 -m::
57 --buffer-size::
58         Set the size of per-cpu tracing buffer, <size> is expected to
59         be a number with appended unit character - B/K/M/G.
60
61 --inherit::
62         Trace children processes spawned by our target.
63
64 -T::
65 --trace-funcs=::
66         Select function tracer and set function filter on the given
67         function (or a glob pattern). Multiple functions can be given
68         by using this option more than once. The function argument also
69         can be a glob pattern. It will be passed to 'set_ftrace_filter'
70         in tracefs.
71
72 -N::
73 --notrace-funcs=::
74         Select function tracer and do not trace functions given by the
75         argument.  Like -T option, this can be used more than once to
76         specify multiple functions (or glob patterns).  It will be
77         passed to 'set_ftrace_notrace' in tracefs.
78
79 --func-opts::
80         List of options allowed to set:
81           call-graph - Display kernel stack trace for function tracer.
82           irq-info   - Display irq context info for function tracer.
83
84 -G::
85 --graph-funcs=::
86         Select function_graph tracer and set graph filter on the given
87         function (or a glob pattern). This is useful to trace for
88         functions executed from the given function. This can be used more
89         than once to specify multiple functions. It will be passed to
90         'set_graph_function' in tracefs.
91
92 -g::
93 --nograph-funcs=::
94         Select function_graph tracer and set graph notrace filter on the
95         given function (or a glob pattern). Like -G option, this is useful
96         for the function_graph tracer only and disables tracing for function
97         executed from the given function. This can be used more than once to
98         specify multiple functions. It will be passed to 'set_graph_notrace'
99         in tracefs.
100
101 --graph-opts::
102         List of options allowed to set:
103           nosleep-time - Measure on-CPU time only for function_graph tracer.
104           noirqs       - Ignore functions that happen inside interrupt.
105           verbose      - Show process names, PIDs, timestamps, etc.
106           thresh=<n>   - Setup trace duration threshold in microseconds.
107           depth=<n>    - Set max depth for function graph tracer to follow.
108
109 SEE ALSO
110 --------
111 linkperf:perf-record[1], linkperf:perf-trace[1]