linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] perf intel-pt: Add limited support for tracing guest kernels
@ 2021-02-18  9:57 Adrian Hunter
  2021-02-18  9:57 ` [PATCH 01/11] perf script: Add branch types for VM-Entry and VM-Exit Adrian Hunter
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Adrian Hunter @ 2021-02-18  9:57 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa, Andi Kleen
  Cc: Alexander Shishkin, linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-02-18 19:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18  9:57 [PATCH 00/11] perf intel-pt: Add limited support for tracing guest kernels Adrian Hunter
2021-02-18  9:57 ` [PATCH 01/11] perf script: Add branch types for VM-Entry and VM-Exit Adrian Hunter
2021-02-18  9:57 ` [PATCH 02/11] perf intel_pt: Add vmlaunch and vmresume as branches Adrian Hunter
2021-02-18  9:57 ` [PATCH 03/11] perf intel-pt: Retain the last PIP packet payload as is Adrian Hunter
2021-02-18  9:57 ` [PATCH 04/11] perf intel-pt: Amend decoder to track the NR flag Adrian Hunter
2021-02-18  9:57 ` [PATCH 05/11] perf machine: Factor out machines__find_guest() Adrian Hunter
2021-02-18  9:57 ` [PATCH 06/11] perf machine: Factor out machine__idle_thread() Adrian Hunter
2021-02-18  9:57 ` [PATCH 07/11] perf intel-pt: Support decoding of guest kernel Adrian Hunter
2021-02-18  9:57 ` [PATCH 08/11] perf intel-pt: Allow for a guest kernel address filter Adrian Hunter
2021-02-18  9:57 ` [PATCH 09/11] perf intel-pt: Adjust sample flags for VM-Exit Adrian Hunter
2021-02-18  9:58 ` [PATCH 10/11] perf intel-pt: Split VM-Entry and VM-Exit branches Adrian Hunter
2021-02-18  9:58 ` [PATCH 11/11] perf intel-pt: Add documentation for tracing virtual machines Adrian Hunter
2021-02-18 18:24 ` [PATCH 00/11] perf intel-pt: Add limited support for tracing guest kernels Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).