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