Path: blob/master/tools/perf/Documentation/perf-inject.txt
26282 views
perf-inject(1)1==============23NAME4----5perf-inject - Filter to augment the events stream with additional information67SYNOPSIS8--------9[verse]10'perf inject <options>'1112DESCRIPTION13-----------14perf-inject reads a perf-record event stream and repipes it to stdout. At any15point the processing code can inject other events into the event stream - in16this case build-ids (-b option) are read and injected as needed into the event17stream.1819Build-ids are just the first user of perf-inject - potentially anything that20needs userspace processing to augment the events stream with additional21information could make use of this facility.2223OPTIONS24-------25-b::26--build-ids::27Inject build-ids of DSOs hit by samples into the output stream.28This means it needs to process all SAMPLE records to find the DSOs.2930--buildid-all::31Inject build-ids of all DSOs into the output stream regardless of hits32and skip SAMPLE processing.3334--known-build-ids=::35Override build-ids to inject using these comma-separated pairs of36build-id and path. Understands file://filename to read these pairs37from a file, which can be generated with perf buildid-list.3839-v::40--verbose::41Be more verbose.42-i::43--input=::44Input file name. (default: stdin)45-o::46--output=::47Output file name. (default: stdout)48-s::49--sched-stat::50Merge sched_stat and sched_switch for getting events where and how long51tasks slept. sched_switch contains a callchain where a task slept and52sched_stat contains a timeslice how long a task slept.5354-k::55--vmlinux=<file>::56vmlinux pathname5758--ignore-vmlinux::59Ignore vmlinux files.6061--kallsyms=<file>::62kallsyms pathname6364--itrace::65Decode Instruction Tracing data, replacing it with synthesized events.66Options are:6768include::itrace.txt[]6970--strip::71Use with --itrace to strip out non-synthesized events.7273-j::74--jit::75Process jitdump files by injecting the mmap records corresponding to jitted76functions. This option also generates the ELF images for each jitted function77found in the jitdumps files captured in the input perf.data file. Use this option78if you are monitoring environment using JIT runtimes, such as Java, DART or V8.7980-f::81--force::82Don't complain, do it.8384--vm-time-correlation[=OPTIONS]::85Some architectures may capture AUX area data which contains timestamps86affected by virtualization. This option will update those timestamps87in place, to correlate with host timestamps. The in-place update means88that an output file is not specified, and instead the input file is89modified. The options are architecture specific, except that they may90start with "dry-run" which will cause the file to be processed but91without updating it. Currently this option is supported only by92Intel PT, refer linkperf:perf-intel-pt[1]9394--guest-data=<path>,<pid>[,<time offset>[,<time scale>]]::95Insert events from a perf.data file recorded in a virtual machine at96the same time as the input perf.data file was recorded on the host.97The Process ID (PID) of the QEMU hypervisor process must be provided,98and the time offset and time scale (multiplier) will likely be needed99to convert guest time stamps into host time stamps. For example, for100x86 the TSC Offset and Multiplier could be provided for a virtual machine101using Linux command line option no-kvmclock.102Currently only mmap, mmap2, comm, task, context_switch, ksymbol,103and text_poke events are inserted, as well as build ID information.104The QEMU option -name debug-threads=on is needed so that thread names105can be used to determine which thread is running which VCPU. Note106libvirt seems to use this by default.107When using perf record in the guest, option --sample-identifier108should be used, and also --buildid-all and --switch-events may be109useful.110111:GMEXAMPLECMD: inject112:GMEXAMPLESUBCMD:113include::guestmount.txt[]114115SEE ALSO116--------117linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1],118linkperf:perf-intel-pt[1]119120121