perf-record.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. perf-record(1)
  2. ==============
  3. NAME
  4. ----
  5. perf-record - Run a command and record its profile into perf.data
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command>
  10. 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>]
  11. DESCRIPTION
  12. -----------
  13. This command runs a command and gathers a performance counter profile
  14. from it, into perf.data - without displaying anything.
  15. This file can then be inspected later on, using 'perf report'.
  16. OPTIONS
  17. -------
  18. <command>...::
  19. Any command you can specify in a shell.
  20. -e::
  21. --event=::
  22. Select the PMU event. Selection can be:
  23. - a symbolic event name (use 'perf list' to list all events)
  24. - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a
  25. hexadecimal event descriptor.
  26. - a hardware breakpoint event in the form of '\mem:addr[:access]'
  27. where addr is the address in memory you want to break in.
  28. Access is the memory access type (read, write, execute) it can
  29. be passed as follows: '\mem:addr[:[r][w][x]]'.
  30. If you want to profile read-write accesses in 0x1000, just set
  31. 'mem:0x1000:rw'.
  32. -a::
  33. System-wide collection.
  34. -l::
  35. Scale counter values.
  36. -p::
  37. --pid=::
  38. Record events on existing pid.
  39. -r::
  40. --realtime=::
  41. Collect data with this RT SCHED_FIFO priority.
  42. -A::
  43. --append::
  44. Append to the output file to do incremental profiling.
  45. -f::
  46. --force::
  47. Overwrite existing data file.
  48. -c::
  49. --count=::
  50. Event period to sample.
  51. -o::
  52. --output=::
  53. Output file name.
  54. -i::
  55. --inherit::
  56. Child tasks inherit counters.
  57. -F::
  58. --freq=::
  59. Profile at this frequency.
  60. -m::
  61. --mmap-pages=::
  62. Number of mmap data pages.
  63. -g::
  64. --call-graph::
  65. Do call-graph (stack chain/backtrace) recording.
  66. -v::
  67. --verbose::
  68. Be more verbose (show counter open errors, etc).
  69. -s::
  70. --stat::
  71. Per thread counts.
  72. -d::
  73. --data::
  74. Sample addresses.
  75. -n::
  76. --no-samples::
  77. Don't sample.
  78. -R::
  79. --raw-samples::
  80. Collect raw sample records from all opened counters (typically for tracepoint counters).
  81. SEE ALSO
  82. --------
  83. linkperf:perf-stat[1], linkperf:perf-list[1]