111d232ecSArnaldo Carvalho de Meloperf-inject(1)
211d232ecSArnaldo Carvalho de Melo==============
311d232ecSArnaldo Carvalho de Melo
411d232ecSArnaldo Carvalho de MeloNAME
511d232ecSArnaldo Carvalho de Melo----
611d232ecSArnaldo Carvalho de Meloperf-inject - Filter to augment the events stream with additional information
711d232ecSArnaldo Carvalho de Melo
811d232ecSArnaldo Carvalho de MeloSYNOPSIS
911d232ecSArnaldo Carvalho de Melo--------
1011d232ecSArnaldo Carvalho de Melo[verse]
1111d232ecSArnaldo Carvalho de Melo'perf inject <options>'
1211d232ecSArnaldo Carvalho de Melo
1311d232ecSArnaldo Carvalho de MeloDESCRIPTION
1411d232ecSArnaldo Carvalho de Melo-----------
1511d232ecSArnaldo Carvalho de Meloperf-inject reads a perf-record event stream and repipes it to stdout.  At any
1611d232ecSArnaldo Carvalho de Melopoint the processing code can inject other events into the event stream - in
1711d232ecSArnaldo Carvalho de Melothis case build-ids (-b option) are read and injected as needed into the event
1811d232ecSArnaldo Carvalho de Melostream.
1911d232ecSArnaldo Carvalho de Melo
2011d232ecSArnaldo Carvalho de MeloBuild-ids are just the first user of perf-inject - potentially anything that
2111d232ecSArnaldo Carvalho de Meloneeds userspace processing to augment the events stream with additional
2211d232ecSArnaldo Carvalho de Meloinformation could make use of this facility.
2311d232ecSArnaldo Carvalho de Melo
2411d232ecSArnaldo Carvalho de MeloOPTIONS
2511d232ecSArnaldo Carvalho de Melo-------
2611d232ecSArnaldo Carvalho de Melo-b::
2727c9c342SNamhyung Kim--build-ids::
2811d232ecSArnaldo Carvalho de Melo        Inject build-ids into the output stream
2927c9c342SNamhyung Kim
3027c9c342SNamhyung Kim--buildid-all:
3127c9c342SNamhyung Kim	Inject build-ids of all DSOs into the output stream
3227c9c342SNamhyung Kim
3311d232ecSArnaldo Carvalho de Melo-v::
3411d232ecSArnaldo Carvalho de Melo--verbose::
3511d232ecSArnaldo Carvalho de Melo	Be more verbose.
36e558a5bdSAndrew Vagin-i::
37e558a5bdSAndrew Vagin--input=::
38e558a5bdSAndrew Vagin	Input file name. (default: stdin)
39e558a5bdSAndrew Vagin-o::
40e558a5bdSAndrew Vagin--output=::
41e558a5bdSAndrew Vagin	Output file name. (default: stdout)
4226a031e1SAndrew Vagin-s::
4326a031e1SAndrew Vagin--sched-stat::
4426a031e1SAndrew Vagin	Merge sched_stat and sched_switch for getting events where and how long
4526a031e1SAndrew Vagin	tasks slept. sched_switch contains a callchain where a task slept and
4626a031e1SAndrew Vagin	sched_stat contains a timeslice how long a task slept.
4711d232ecSArnaldo Carvalho de Melo
48b3a018fcSJames Clark-k::
49b3a018fcSJames Clark--vmlinux=<file>::
50b3a018fcSJames Clark        vmlinux pathname
51b3a018fcSJames Clark
52b3a018fcSJames Clark--ignore-vmlinux::
53b3a018fcSJames Clark	Ignore vmlinux files.
54b3a018fcSJames Clark
55a7a2b8b4SAdrian Hunter--kallsyms=<file>::
56a7a2b8b4SAdrian Hunter	kallsyms pathname
57a7a2b8b4SAdrian Hunter
580f0aa5e0SAdrian Hunter--itrace::
590f0aa5e0SAdrian Hunter	Decode Instruction Tracing data, replacing it with synthesized events.
600f0aa5e0SAdrian Hunter	Options are:
610f0aa5e0SAdrian Hunter
6260b88d87SAdrian Hunterinclude::itrace.txt[]
630f0aa5e0SAdrian Hunter
64f56fb986SAdrian Hunter--strip::
65f56fb986SAdrian Hunter	Use with --itrace to strip out non-synthesized events.
66f56fb986SAdrian Hunter
679b07e27fSStephane Eranian-j::
689b07e27fSStephane Eranian--jit::
699b07e27fSStephane Eranian	Process jitdump files by injecting the mmap records corresponding to jitted
709b07e27fSStephane Eranian	functions. This option also generates the ELF images for each jitted function
719b07e27fSStephane Eranian	found in the jitdumps files captured in the input perf.data file. Use this option
729b07e27fSStephane Eranian	if you are monitoring environment using JIT runtimes, such as Java, DART or V8.
739b07e27fSStephane Eranian
7452186b8aSSihyeon Jang-f::
7552186b8aSSihyeon Jang--force::
7652186b8aSSihyeon Jang	Don't complain, do it.
7752186b8aSSihyeon Jang
7883d7f5f1SAdrian Hunter--vm-time-correlation[=OPTIONS]::
7983d7f5f1SAdrian Hunter	Some architectures may capture AUX area data which contains timestamps
8083d7f5f1SAdrian Hunter	affected by virtualization. This option will update those timestamps
8183d7f5f1SAdrian Hunter	in place, to correlate with host timestamps. The in-place update means
8283d7f5f1SAdrian Hunter	that an output file is not specified, and instead the input file is
8383d7f5f1SAdrian Hunter	modified.  The options are architecture specific, except that they may
8483d7f5f1SAdrian Hunter	start with "dry-run" which will cause the file to be processed but
8583d7f5f1SAdrian Hunter	without updating it. Currently this option is supported only by
8683d7f5f1SAdrian Hunter	Intel PT, refer linkperf:perf-intel-pt[1]
8783d7f5f1SAdrian Hunter
88*97406a7eSAdrian Hunter--guest-data=<path>,<pid>[,<time offset>[,<time scale>]]::
89*97406a7eSAdrian Hunter	Insert events from a perf.data file recorded in a virtual machine at
90*97406a7eSAdrian Hunter	the same time as the input perf.data file was recorded on the host.
91*97406a7eSAdrian Hunter	The Process ID (PID) of the QEMU hypervisor process must be provided,
92*97406a7eSAdrian Hunter	and the time offset and time scale (multiplier) will likely be needed
93*97406a7eSAdrian Hunter	to convert guest time stamps into host time stamps. For example, for
94*97406a7eSAdrian Hunter	x86 the TSC Offset and Multiplier could be provided for a virtual machine
95*97406a7eSAdrian Hunter	using Linux command line option no-kvmclock.
96*97406a7eSAdrian Hunter	Currently only mmap, mmap2, comm, task, context_switch, ksymbol,
97*97406a7eSAdrian Hunter	and text_poke events are inserted, as well as build ID information.
98*97406a7eSAdrian Hunter	The QEMU option -name debug-threads=on is needed so that thread names
99*97406a7eSAdrian Hunter	can be used to determine which thread is running which VCPU. Note
100*97406a7eSAdrian Hunter	libvirt seems to use this by default.
101*97406a7eSAdrian Hunter	When using perf record in the guest, option --sample-identifier
102*97406a7eSAdrian Hunter	should be used, and also --buildid-all and --switch-events may be
103*97406a7eSAdrian Hunter	useful.
104*97406a7eSAdrian Hunter
10511d232ecSArnaldo Carvalho de MeloSEE ALSO
10611d232ecSArnaldo Carvalho de Melo--------
107870d325bSAdrian Hunterlinkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1],
108870d325bSAdrian Hunterlinkperf:perf-intel-pt[1]
109