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