perf-ftrace.txt 3.4 KB

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