* [PATCH 2/5] tools lib traceevent: update KVM plugin
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-10-21 21:31 ` Arnaldo Carvalho de Melo
2015-10-22 7:34 ` [GIT PULL 0/5] perf/core improvements and fixes Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 21:31 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Paolo Bonzini, David Ahern, Namhyung Kim, kvm,
Arnaldo Carvalho de Melo
From: Paolo Bonzini <pbonzini@redhat.com>
The format of the role word has changed through the years and the plugin
was never updated; some VMX exit reasons were missing too.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: http://lkml.kernel.org/r/1443695293-31127-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/traceevent/plugin_kvm.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index 88fe83dff7cd..18536f756577 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -124,7 +124,10 @@ static const char *disassemble(unsigned char *insn, int len, uint64_t rip,
_ER(WBINVD, 54) \
_ER(XSETBV, 55) \
_ER(APIC_WRITE, 56) \
- _ER(INVPCID, 58)
+ _ER(INVPCID, 58) \
+ _ER(PML_FULL, 62) \
+ _ER(XSAVES, 63) \
+ _ER(XRSTORS, 64)
#define SVM_EXIT_REASONS \
_ER(EXIT_READ_CR0, 0x000) \
@@ -352,15 +355,18 @@ static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record *
union kvm_mmu_page_role {
unsigned word;
struct {
- unsigned glevels:4;
unsigned level:4;
+ unsigned cr4_pae:1;
unsigned quadrant:2;
- unsigned pad_for_nice_hex_output:6;
unsigned direct:1;
unsigned access:3;
unsigned invalid:1;
- unsigned cr4_pge:1;
unsigned nxe:1;
+ unsigned cr0_wp:1;
+ unsigned smep_and_not_wp:1;
+ unsigned smap_and_not_wp:1;
+ unsigned pad_for_nice_hex_output:8;
+ unsigned smm:8;
};
};
@@ -385,15 +391,18 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct pevent_record *record,
if (pevent_is_file_bigendian(event->pevent) ==
pevent_is_host_bigendian(event->pevent)) {
- trace_seq_printf(s, "%u/%u q%u%s %s%s %spge %snxe",
+ trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s",
role.level,
- role.glevels,
role.quadrant,
role.direct ? " direct" : "",
access_str[role.access],
role.invalid ? " invalid" : "",
- role.cr4_pge ? "" : "!",
- role.nxe ? "" : "!");
+ role.cr4_pae ? "" : "!",
+ role.nxe ? "" : "!",
+ role.cr0_wp ? "" : "!",
+ role.smep_and_not_wp ? " smep" : "",
+ role.smap_and_not_wp ? " smap" : "",
+ role.smm ? " smm" : "");
} else
trace_seq_printf(s, "WORD: %08x", role.word);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [GIT PULL 0/5] perf/core improvements and fixes
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 2/5] tools lib traceevent: update KVM plugin Arnaldo Carvalho de Melo
@ 2015-10-22 7:34 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2015-10-22 7:34 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
Borislav Petkov, David Ahern, Frederic Weisbecker, Jiri Olsa,
Kan Liang, kvm, Masami Hiramatsu, Namhyung Kim, Paolo Bonzini,
Paul Mackerras, Peter Zijlstra, Stephane Eranian, Steven Rostedt,
Wang Nan, Yunlong Song, Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 43e41adc9e8c36545888d78fed2ef8d102a938dc:
>
> perf record: Add ability to sample call branches (2015-10-20 10:30:55 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to e3d006ce8180a0c025ce66bdc89bbc125f85be57:
>
> perf annotate: Add debug message for out of bounds sample (2015-10-21 18:12:37 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> User visible:
>
> - Print branch filter state with verbose mode (Andi Kleen)
>
> - Fix core dump caused by per-socket/core system-wide stat (Kan Liang)
>
> - Update libtraceevent KVM plugin (Paolo Bonzini)
>
> Developer stuff:
>
> - Add fixdep to 'tools/build' .gitignore (Yunlong Song)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Andi Kleen (1):
> perf evsel: Print branch filter state with -vv
>
> Arnaldo Carvalho de Melo (1):
> perf annotate: Add debug message for out of bounds sample
>
> Kan Liang (1):
> perf cpu_map: Fix core dump caused by per-socket/core system-wide stat
>
> Paolo Bonzini (1):
> tools lib traceevent: update KVM plugin
>
> Yunlong Song (1):
> perf build: Add fixdep to .gitignore
>
> tools/build/.gitignore | 1 +
> tools/lib/traceevent/plugin_kvm.c | 25 +++++++++++++++++--------
> tools/perf/util/annotate.c | 5 ++++-
> tools/perf/util/cpumap.c | 2 +-
> tools/perf/util/evsel.c | 1 +
> 5 files changed, 24 insertions(+), 10 deletions(-)
> create mode 100644 tools/build/.gitignore
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread