aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2014-06-12 22:10:06 -0400
committerJiri Olsa <jolsa@kernel.org>2014-06-19 12:18:30 -0400
commit7f6e3635db39fb2400dc515192125e7b73258000 (patch)
tree876319970b9eabde8c2e4e61a042832930996331 /tools/lib/traceevent
parentea092aeb6d4725048c5a46d1c9cbb4fea49b80b0 (diff)
tools lib traceevent: Fix and cleanup kvm_nested_vmexit tracepoints
Fix several issues of kvm_nested_vmexit[_inject]: field width aren't supported with pevent_print, rip was printed twice/incorrectly, SVM ISA was hard-coded, we don't use ':' to separate field names. Link: http://lkml.kernel.org/r/8e6c02b22ea8136c139a91c69d6cc73b8c5c184b.1388855989.git.jan.kiszka@web.de Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/lib/traceevent')
-rw-r--r--tools/lib/traceevent/plugin_kvm.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index 0d437837569f..0575e59c65f0 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -330,19 +330,13 @@ static int kvm_emulate_insn_handler(struct trace_seq *s,
330static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_record *record, 330static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_record *record,
331 struct event_format *event, void *context) 331 struct event_format *event, void *context)
332{ 332{
333 unsigned long long val; 333 if (print_exit_reason(s, record, event, "exit_code") < 0)
334
335 pevent_print_num_field(s, " rip %0x016llx", event, "rip", record, 1);
336
337 if (pevent_get_field_val(s, event, "exit_code", record, &val, 1) < 0)
338 return -1; 334 return -1;
339 335
340 trace_seq_printf(s, "reason %s", find_exit_reason(2, val)); 336 pevent_print_num_field(s, " info1 %llx", event, "exit_info1", record, 1);
341 337 pevent_print_num_field(s, " info2 %llx", event, "exit_info2", record, 1);
342 pevent_print_num_field(s, " ext_inf1: %0x016llx", event, "exit_info1", record, 1); 338 pevent_print_num_field(s, " int_info %llx", event, "exit_int_info", record, 1);
343 pevent_print_num_field(s, " ext_inf2: %0x016llx", event, "exit_info2", record, 1); 339 pevent_print_num_field(s, " int_info_err %llx", event, "exit_int_info_err", record, 1);
344 pevent_print_num_field(s, " ext_int: %0x016llx", event, "exit_int_info", record, 1);
345 pevent_print_num_field(s, " ext_int_err: %0x016llx", event, "exit_int_info_err", record, 1);
346 340
347 return 0; 341 return 0;
348} 342}
@@ -350,7 +344,7 @@ static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_r
350static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record *record, 344static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record *record,
351 struct event_format *event, void *context) 345 struct event_format *event, void *context)
352{ 346{
353 pevent_print_num_field(s, " rip %0x016llx", event, "rip", record, 1); 347 pevent_print_num_field(s, "rip %lx ", event, "rip", record, 1);
354 348
355 return kvm_nested_vmexit_inject_handler(s, record, event, context); 349 return kvm_nested_vmexit_inject_handler(s, record, event, context);
356} 350}