perf-inject.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. perf-inject(1)
  2. ==============
  3. NAME
  4. ----
  5. perf-inject - Filter to augment the events stream with additional information
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf inject <options>'
  10. DESCRIPTION
  11. -----------
  12. perf-inject reads a perf-record event stream and repipes it to stdout. At any
  13. point the processing code can inject other events into the event stream - in
  14. this case build-ids (-b option) are read and injected as needed into the event
  15. stream.
  16. Build-ids are just the first user of perf-inject - potentially anything that
  17. needs userspace processing to augment the events stream with additional
  18. information could make use of this facility.
  19. OPTIONS
  20. -------
  21. -b::
  22. --build-ids::
  23. Inject build-ids of DSOs hit by samples into the output stream.
  24. This means it needs to process all SAMPLE records to find the DSOs.
  25. --buildid-all::
  26. Inject build-ids of all DSOs into the output stream regardless of hits
  27. and skip SAMPLE processing.
  28. --known-build-ids=::
  29. Override build-ids to inject using these comma-separated pairs of
  30. build-id and path. Understands file://filename to read these pairs
  31. from a file, which can be generated with perf buildid-list.
  32. -v::
  33. --verbose::
  34. Be more verbose.
  35. -i::
  36. --input=::
  37. Input file name. (default: stdin)
  38. -o::
  39. --output=::
  40. Output file name. (default: stdout)
  41. -s::
  42. --sched-stat::
  43. Merge sched_stat and sched_switch for getting events where and how long
  44. tasks slept. sched_switch contains a callchain where a task slept and
  45. sched_stat contains a timeslice how long a task slept.
  46. -k::
  47. --vmlinux=<file>::
  48. vmlinux pathname
  49. --ignore-vmlinux::
  50. Ignore vmlinux files.
  51. --kallsyms=<file>::
  52. kallsyms pathname
  53. --itrace::
  54. Decode Instruction Tracing data, replacing it with synthesized events.
  55. Options are:
  56. include::itrace.txt[]
  57. --strip::
  58. Use with --itrace to strip out non-synthesized events.
  59. -j::
  60. --jit::
  61. Process jitdump files by injecting the mmap records corresponding to jitted
  62. functions. This option also generates the ELF images for each jitted function
  63. found in the jitdumps files captured in the input perf.data file. Use this option
  64. if you are monitoring environment using JIT runtimes, such as Java, DART or V8.
  65. -f::
  66. --force::
  67. Don't complain, do it.
  68. --vm-time-correlation[=OPTIONS]::
  69. Some architectures may capture AUX area data which contains timestamps
  70. affected by virtualization. This option will update those timestamps
  71. in place, to correlate with host timestamps. The in-place update means
  72. that an output file is not specified, and instead the input file is
  73. modified. The options are architecture specific, except that they may
  74. start with "dry-run" which will cause the file to be processed but
  75. without updating it. Currently this option is supported only by
  76. Intel PT, refer linkperf:perf-intel-pt[1]
  77. --guest-data=<path>,<pid>[,<time offset>[,<time scale>]]::
  78. Insert events from a perf.data file recorded in a virtual machine at
  79. the same time as the input perf.data file was recorded on the host.
  80. The Process ID (PID) of the QEMU hypervisor process must be provided,
  81. and the time offset and time scale (multiplier) will likely be needed
  82. to convert guest time stamps into host time stamps. For example, for
  83. x86 the TSC Offset and Multiplier could be provided for a virtual machine
  84. using Linux command line option no-kvmclock.
  85. Currently only mmap, mmap2, comm, task, context_switch, ksymbol,
  86. and text_poke events are inserted, as well as build ID information.
  87. The QEMU option -name debug-threads=on is needed so that thread names
  88. can be used to determine which thread is running which VCPU. Note
  89. libvirt seems to use this by default.
  90. When using perf record in the guest, option --sample-identifier
  91. should be used, and also --buildid-all and --switch-events may be
  92. useful.
  93. :GMEXAMPLECMD: inject
  94. :GMEXAMPLESUBCMD:
  95. include::guestmount.txt[]
  96. SEE ALSO
  97. --------
  98. linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1],
  99. linkperf:perf-intel-pt[1]