lkml.org 
[lkml]   [2013]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 17/24] tools list traceevent: Update kvm plugin with is_writable_pte helper
Date
Adding is_writable_pte print helper function,
so the kvmmmu:fast_page_fault print format
gets resolved properly.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: David Ahern <dsahern@gmail.com>
---
tools/lib/traceevent/plugin_kvm.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index a776cd6..ce805c5 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -427,6 +427,16 @@ static int kvm_mmu_get_page_handler(struct trace_seq *s,
return kvm_mmu_print_role(s, record, event, context);
}

+#define PT_WRITABLE_SHIFT 1
+#define PT_WRITABLE_MASK (1ULL << PT_WRITABLE_SHIFT)
+
+unsigned long long process_is_writable_pte(struct trace_seq *s,
+ unsigned long long *args)
+{
+ unsigned long pte = args[0];
+ return pte & PT_WRITABLE_MASK;
+}
+
int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
{
init_disassembler();
@@ -460,5 +470,11 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
"kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
NULL);

+ pevent_register_print_function(pevent,
+ process_is_writable_pte,
+ PEVENT_FUNC_ARG_INT,
+ "is_writable_pte",
+ PEVENT_FUNC_ARG_LONG,
+ PEVENT_FUNC_ARG_VOID);
return 0;
}
--
1.7.11.7


\
 
 \ /
  Last update: 2013-09-01 13:21    [W:0.109 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site