perf intel-pt: Add limited support for tracing guest kernels
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | perf script: Add branch types for VM-Entry and VM-Exittools/ tools/ tools/ | +9 | 0 replies | |
| 2/11 | perf intel_pt: Add vmlaunch and vmresume as branchestools/ tools/ tools/ | +17 | 0 replies | |
| 3/11 | perf intel-pt: Retain the last PIP packet payload as istools/ tools/ tools/ +2 more | +16 | 0 replies | |
| 4/11 | perf intel-pt: Amend decoder to track the NR flagtools/ tools/ | +53 | 0 replies | |
| 5/11 | perf machine: Factor out machines__find_guest()tools/ tools/ tools/ | +11 | 0 replies | |
| 6/11 | perf machine: Factor out machine__idle_thread()tools/ tools/ tools/ | +22 | 0 replies | |
| 7/11 | perf intel-pt: Support decoding of guest kerneltools/ | +69 | 0 replies | |
| 8/11 | perf intel-pt: Allow for a guest kernel address filtertools/ | +7 | 0 replies | |
| 9/11 | perf intel-pt: Adjust sample flags for VM-Exittools/ | +7 | 0 replies | |
| 10/11 | perf intel-pt: Split VM-Entry and VM-Exit branchestools/ | +21 | 0 replies | |
| 11/11 | perf intel-pt: Add documentation for tracing virtual machinestools/ | +82 | 0 replies |
Reviews trailers per patch
None of the 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Andi Kleen |
|---|---|
| Series | A-b |
| 1/11 | |
| 2/11 | |
| 3/11 | |
| 4/11 | |
| 5/11 | |
| 6/11 | |
| 7/11 | |
| 8/11 | |
| 9/11 | |
| 10/11 | |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/11] perf intel-pt: Add limited support for tracing guest kernels
Hi
Currently, only kernel tracing is supported and only with "timeless" decoding i.e. no TSC timestamps
Other limitations and caveats
VMX controls may suppress packets needed for decoding resulting in decoding errors
VMX controls may block the perf NMI to the host potentially resulting in lost trace data Guest kernel self-modifying code (e.g. jump labels or JIT-compiled eBPF) will result in decoding errors Guest thread information is unknown
Guest VCPU is unknown but may be able to be inferred from the host thread
Callchains are not supported
There is an example in the documentation of patch "perf intel-pt: Add documentation for tracing virtual machines"
The patches are on top of the "Add PSB events" series.
Adrian Hunter (11):
perf script: Add branch types for VM-Entry and VM-Exit perf intel_pt: Add vmlaunch and vmresume as branches perf intel-pt: Retain the last PIP packet payload as is perf intel-pt: Amend decoder to track the NR flag perf machine: Factor out machines__find_guest() perf machine: Factor out machine__idle_thread() perf intel-pt: Support decoding of guest kernel perf intel-pt: Allow for a guest kernel address filter perf intel-pt: Adjust sample flags for VM-Exit perf intel-pt: Split VM-Entry and VM-Exit branches perf intel-pt: Add documentation for tracing virtual machines
tools/perf/Documentation/perf-intel-pt.txt | 82 ++++++++++++++ tools/perf/arch/x86/tests/insn-x86.c | 1 + .../arch/x86/tests/intel-pt-pkt-decoder-test.c | 4 +- tools/perf/builtin-script.c | 2 + tools/perf/util/db-export.c | 2 + tools/perf/util/event.h | 6 +- .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 61 +++++++++-- .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 3 +- .../util/intel-pt-decoder/intel-pt-insn-decoder.c | 15 +++ .../util/intel-pt-decoder/intel-pt-insn-decoder.h | 1 + .../util/intel-pt-decoder/intel-pt-pkt-decoder.c | 12 +- .../util/intel-pt-decoder/intel-pt-pkt-decoder.h | 2 + tools/perf/util/intel-pt.c | 122 ++++++++++++++++++--- tools/perf/util/machine.c | 27 +++++ tools/perf/util/machine.h | 2 + tools/perf/util/session.c | 32 +----- 16 files changed, 307 insertions(+), 67 deletions(-)
Regards
Adrian