perf-trace.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. perf-trace(1)
  2. =============
  3. NAME
  4. ----
  5. perf-trace - strace inspired tool
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf trace'
  10. 'perf trace record'
  11. DESCRIPTION
  12. -----------
  13. This command will show the events associated with the target, initially
  14. syscalls, but other system events like pagefaults, task lifetime events,
  15. scheduling events, etc.
  16. This is a live mode tool in addition to working with perf.data files like
  17. the other perf tools. Files can be generated using the 'perf record' command
  18. but the session needs to include the raw_syscalls events (-e 'raw_syscalls:*').
  19. Alernatively, the 'perf trace record' can be used as a shortcut to
  20. automatically include the raw_syscalls events when writing events to a file.
  21. The following options apply to perf trace; options to perf trace record are
  22. found in the perf record man page.
  23. OPTIONS
  24. -------
  25. -a::
  26. --all-cpus::
  27. System-wide collection from all CPUs.
  28. -e::
  29. --expr::
  30. List of events to show, currently only syscall names.
  31. Prefixing with ! shows all syscalls but the ones specified. You may
  32. need to escape it.
  33. -o::
  34. --output=::
  35. Output file name.
  36. -p::
  37. --pid=::
  38. Record events on existing process ID (comma separated list).
  39. -t::
  40. --tid=::
  41. Record events on existing thread ID (comma separated list).
  42. -u::
  43. --uid=::
  44. Record events in threads owned by uid. Name or number.
  45. -v::
  46. --verbose=::
  47. Verbosity level.
  48. -i::
  49. --no-inherit::
  50. Child tasks do not inherit counters.
  51. -m::
  52. --mmap-pages=::
  53. Number of mmap data pages (must be a power of two) or size
  54. specification with appended unit character - B/K/M/G. The
  55. size is rounded up to have nearest pages power of two value.
  56. -C::
  57. --cpu::
  58. Collect samples only on the list of CPUs provided. Multiple CPUs can be provided as a
  59. comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
  60. In per-thread mode with inheritance mode on (default), Events are captured only when
  61. the thread executes on the designated CPUs. Default is to monitor all CPUs.
  62. --duration:
  63. Show only events that had a duration greater than N.M ms.
  64. --sched:
  65. Accrue thread runtime and provide a summary at the end of the session.
  66. -i
  67. --input
  68. Process events from a given perf data file.
  69. -T
  70. --time
  71. Print full timestamp rather time relative to first sample.
  72. --comm::
  73. Show process COMM right beside its ID, on by default, disable with --no-comm.
  74. --summary::
  75. Show a summary of syscalls by thread with min, max, and average times (in
  76. msec) and relative stddev.
  77. --tool_stats::
  78. Show tool stats such as number of times fd->pathname was discovered thru
  79. hooking the open syscall return + vfs_getname or via reading /proc/pid/fd, etc.
  80. SEE ALSO
  81. --------
  82. linkperf:perf-record[1], linkperf:perf-script[1]