]> Git Repo - linux.git/commitdiff
perf script: Add branch types for VM-Entry and VM-Exit
authorAdrian Hunter <[email protected]>
Thu, 18 Feb 2021 09:57:51 +0000 (11:57 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 18 Feb 2021 19:12:51 +0000 (16:12 -0300)
In preparation to support Intel PT decoding of virtual machine traces, add
branch types for VM-Entry and VM-Exit.

Note they are both treated as "calls" because the VM-Exit transfers control
to a different address.

Signed-off-by: Adrian Hunter <[email protected]>
Acked-by: Andi Kleen <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-script.c
tools/perf/util/db-export.c
tools/perf/util/event.h

index 46bb963c78e5c622816f4d46657733324c387533..5915f19cee55009a858e668eb53e5401360e85ff 100644 (file)
@@ -1537,6 +1537,8 @@ static struct {
        {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TX_ABORT, "tx abrt"},
        {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TRACE_BEGIN, "tr strt"},
        {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TRACE_END, "tr end"},
+       {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | PERF_IP_FLAG_VMENTRY, "vmentry"},
+       {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | PERF_IP_FLAG_VMEXIT, "vmexit"},
        {0, NULL}
 };
 
index db7447154622820eee0dbfd6accb84d2592f0659..5cd1891725251908d3e79e75695a4473a77a8511 100644 (file)
@@ -438,6 +438,8 @@ static struct {
        {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TX_ABORT, "transaction abort"},
        {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TRACE_BEGIN, "trace begin"},
        {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TRACE_END, "trace end"},
+       {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | PERF_IP_FLAG_VMENTRY, "vm entry"},
+       {PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | PERF_IP_FLAG_VMEXIT, "vm exit"},
        {0, NULL}
 };
 
index e3150a6287824f60bed11cd97c3f713c7a3aa696..f603edbbbc6f56e8943ffe43c08febb4b2f501f4 100644 (file)
@@ -96,6 +96,8 @@ enum {
        PERF_IP_FLAG_TRACE_BEGIN        = 1ULL << 8,
        PERF_IP_FLAG_TRACE_END          = 1ULL << 9,
        PERF_IP_FLAG_IN_TX              = 1ULL << 10,
+       PERF_IP_FLAG_VMENTRY            = 1ULL << 11,
+       PERF_IP_FLAG_VMEXIT             = 1ULL << 12,
 };
 
 #define PERF_IP_FLAG_CHARS "bcrosyiABEx"
@@ -110,7 +112,9 @@ enum {
        PERF_IP_FLAG_INTERRUPT          |\
        PERF_IP_FLAG_TX_ABORT           |\
        PERF_IP_FLAG_TRACE_BEGIN        |\
-       PERF_IP_FLAG_TRACE_END)
+       PERF_IP_FLAG_TRACE_END          |\
+       PERF_IP_FLAG_VMENTRY            |\
+       PERF_IP_FLAG_VMEXIT)
 
 #define MAX_INSN 16
 
This page took 0.058483 seconds and 4 git commands to generate.