1 perf-ftrace(1) 1 perf-ftrace(1) 2 ============== 2 ============== 3 3 4 NAME 4 NAME 5 ---- 5 ---- 6 perf-ftrace - simple wrapper for kernel's ftra 6 perf-ftrace - simple wrapper for kernel's ftrace functionality 7 7 8 8 9 SYNOPSIS 9 SYNOPSIS 10 -------- 10 -------- 11 [verse] 11 [verse] 12 'perf ftrace' {trace|latency|profile} <command !! 12 'perf ftrace' <command> 13 13 14 DESCRIPTION 14 DESCRIPTION 15 ----------- 15 ----------- 16 The 'perf ftrace' command provides a collectio !! 16 The 'perf ftrace' command is a simple wrapper of kernel's ftrace 17 kernel's ftrace infrastructure. !! 17 functionality. It only supports single thread tracing currently and >> 18 just reads trace_pipe in text and then write it to stdout. 18 19 19 'perf ftrace trace' is a simple wrapper of t !! 20 The following options apply to perf ftrace. 20 single thread tracing currently and just rea << 21 write it to stdout. << 22 << 23 'perf ftrace latency' calculates execution l << 24 (optionally with BPF) and display it as a hi << 25 21 26 'perf ftrace profile' show a execution profi !! 22 OPTIONS 27 total, average, max time and the number of c !! 23 ------- 28 24 29 The following options apply to perf ftrace. !! 25 -t:: >> 26 --tracer=:: >> 27 Tracer to use: function_graph or function. 30 28 31 COMMON OPTIONS !! 29 -v:: 32 -------------- !! 30 --verbose=:: >> 31 Verbosity level. 33 32 34 -p:: 33 -p:: 35 --pid=:: 34 --pid=:: 36 Trace on existing process id (comma se 35 Trace on existing process id (comma separated list). 37 36 38 --tid=:: << 39 Trace on existing thread id (comma sep << 40 << 41 -a:: 37 -a:: 42 --all-cpus:: 38 --all-cpus:: 43 Force system-wide collection. Scripts 39 Force system-wide collection. Scripts run without a <command> 44 normally use -a by default, while scri 40 normally use -a by default, while scripts run with a <command> 45 normally don't - this option allows th 41 normally don't - this option allows the latter to be run in 46 system-wide mode. 42 system-wide mode. 47 43 48 -C:: 44 -C:: 49 --cpu=:: 45 --cpu=:: 50 Only trace for the list of CPUs provid 46 Only trace for the list of CPUs provided. Multiple CPUs can 51 be provided as a comma separated list 47 be provided as a comma separated list with no space like: 0,1. 52 Ranges of CPUs are specified with -: 0 48 Ranges of CPUs are specified with -: 0-2. 53 Default is to trace on all online CPUs 49 Default is to trace on all online CPUs. 54 50 55 -v:: << 56 --verbose:: << 57 Increase the verbosity level. << 58 << 59 << 60 OPTIONS for 'perf ftrace trace' << 61 ------------------------------- << 62 << 63 -t:: << 64 --tracer=:: << 65 Tracer to use when neither -G nor -F o << 66 specified: function_graph or function. << 67 << 68 -F:: << 69 --funcs:: << 70 List available functions to trace. It << 71 only list interested functions. << 72 << 73 -D:: << 74 --delay:: << 75 Time (ms) to wait before starting trac << 76 << 77 -m:: << 78 --buffer-size:: << 79 Set the size of per-cpu tracing buffer << 80 be a number with appended unit charact << 81 << 82 --inherit:: << 83 Trace children processes spawned by ou << 84 << 85 -T:: 51 -T:: 86 --trace-funcs=:: 52 --trace-funcs=:: 87 Select function tracer and set functio !! 53 Only trace functions given by the argument. Multiple functions 88 function (or a glob pattern). Multiple !! 54 can be given by using this option more than once. The function 89 by using this option more than once. T !! 55 argument also can be a glob pattern. It will be passed to 90 can be a glob pattern. It will be pass !! 56 'set_ftrace_filter' in tracefs. 91 in tracefs. << 92 57 93 -N:: 58 -N:: 94 --notrace-funcs=:: 59 --notrace-funcs=:: 95 Select function tracer and do not trac !! 60 Do not trace functions given by the argument. Like -T option, 96 argument. Like -T option, this can be !! 61 this can be used more than once to specify multiple functions 97 specify multiple functions (or glob pa !! 62 (or glob patterns). It will be passed to 'set_ftrace_notrace' 98 passed to 'set_ftrace_notrace' in trac << 99 << 100 --func-opts:: << 101 List of options allowed to set: << 102 << 103 - call-graph - Display kernel stack << 104 - irq-info - Display irq context i << 105 << 106 -G:: << 107 --graph-funcs=:: << 108 Select function_graph tracer and set g << 109 function (or a glob pattern). This is << 110 functions executed from the given func << 111 than once to specify multiple function << 112 'set_graph_function' in tracefs. << 113 << 114 -g:: << 115 --nograph-funcs=:: << 116 Select function_graph tracer and set g << 117 given function (or a glob pattern). Li << 118 for the function_graph tracer only and << 119 executed from the given function. This << 120 specify multiple functions. It will be << 121 in tracefs. 63 in tracefs. 122 64 123 --graph-opts:: << 124 List of options allowed to set: << 125 << 126 - nosleep-time - Measure on-CPU time << 127 - noirqs - Ignore functions th << 128 - verbose - Show process names, << 129 - thresh=<n> - Setup trace duratio << 130 - depth=<n> - Set max depth for f << 131 - tail - Print function name << 132 << 133 << 134 OPTIONS for 'perf ftrace latency' << 135 --------------------------------- << 136 << 137 -T:: << 138 --trace-funcs=:: << 139 Set the function name to get the histo << 140 it only allows single function to calc << 141 << 142 -b:: << 143 --use-bpf:: << 144 Use BPF to measure function latency in << 145 uses function_graph tracer internally) << 146 << 147 -n:: << 148 --use-nsec:: << 149 Use nano-second instead of micro-secon << 150 << 151 << 152 OPTIONS for 'perf ftrace profile' << 153 --------------------------------- << 154 << 155 -T:: << 156 --trace-funcs=:: << 157 Set function filter on the given funct << 158 Multiple functions can be given by usi << 159 The function argument also can be a gl << 160 to 'set_ftrace_filter' in tracefs. << 161 << 162 -N:: << 163 --notrace-funcs=:: << 164 Do not trace functions given by the ar << 165 can be used more than once to specify << 166 patterns). It will be passed to 'set_ << 167 << 168 -G:: 65 -G:: 169 --graph-funcs=:: 66 --graph-funcs=:: 170 Set graph filter on the given function !! 67 Set graph filter on the given function (or a glob pattern). 171 useful to trace for functions executed !! 68 This is useful for the function_graph tracer only and enables 172 can be used more than once to specify !! 69 tracing for functions executed from the given function. 173 passed to 'set_graph_function' in trac !! 70 This can be used more than once to specify multiple functions. >> 71 It will be passed to 'set_graph_function' in tracefs. 174 72 175 -g:: 73 -g:: 176 --nograph-funcs=:: 74 --nograph-funcs=:: 177 Set graph notrace filter on the given 75 Set graph notrace filter on the given function (or a glob pattern). 178 Like -G option, this is useful for the !! 76 Like -G option, this is useful for the function_graph tracer only 179 disables tracing for function executed !! 77 and disables tracing for function executed from the given function. 180 can be used more than once to specify !! 78 This can be used more than once to specify multiple functions. 181 passed to 'set_graph_notrace' in trace !! 79 It will be passed to 'set_graph_notrace' in tracefs. 182 << 183 -m:: << 184 --buffer-size:: << 185 Set the size of per-cpu tracing buffer << 186 be a number with appended unit charact << 187 << 188 -s:: << 189 --sort=:: << 190 Sort the result by the given field. A << 191 total, avg, max, count, name. Default << 192 80 >> 81 -D:: >> 82 --graph-depth=:: >> 83 Set max depth for function graph tracer to follow 193 84 194 SEE ALSO 85 SEE ALSO 195 -------- 86 -------- 196 linkperf:perf-record[1], linkperf:perf-trace[1 87 linkperf:perf-record[1], linkperf:perf-trace[1]
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.