All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: [PATCH 4/4] tools lib traceevent: Fix and cleanup kvm_nested_vmexit tracepoints
Date: Thu, 12 Jun 2014 22:10:06 -0400	[thread overview]
Message-ID: <20140613021157.484318137@goodmis.org> (raw)
In-Reply-To: 20140613021002.444608350@goodmis.org

[-- Attachment #1: 0004-tools-lib-traceevent-Fix-and-cleanup-kvm_nested_vmex.patch --]
[-- Type: text/plain, Size: 2482 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

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

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 tools/lib/traceevent/plugin_kvm.c | 18 ++++++------------
 1 file 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,
 static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_record *record,
 					    struct event_format *event, void *context)
 {
-	unsigned long long val;
-
-	pevent_print_num_field(s, " rip %0x016llx", event, "rip", record, 1);
-
-	if (pevent_get_field_val(s, event, "exit_code", record, &val, 1) < 0)
+	if (print_exit_reason(s, record, event, "exit_code") < 0)
 		return -1;
 
-	trace_seq_printf(s, "reason %s", find_exit_reason(2, val));
-
-	pevent_print_num_field(s, " ext_inf1: %0x016llx", event, "exit_info1", record, 1);
-	pevent_print_num_field(s, " ext_inf2: %0x016llx", event, "exit_info2", record, 1);
-	pevent_print_num_field(s, " ext_int: %0x016llx", event, "exit_int_info", record, 1);
-	pevent_print_num_field(s, " ext_int_err: %0x016llx", event, "exit_int_info_err", record, 1);
+	pevent_print_num_field(s, " info1 %llx", event, "exit_info1", record, 1);
+	pevent_print_num_field(s, " info2 %llx", event, "exit_info2", record, 1);
+	pevent_print_num_field(s, " int_info %llx", event, "exit_int_info", record, 1);
+	pevent_print_num_field(s, " int_info_err %llx", event, "exit_int_info_err", record, 1);
 
 	return 0;
 }
@@ -350,7 +344,7 @@ static int kvm_nested_vmexit_inject_handler(struct trace_seq *s, struct pevent_r
 static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record *record,
 				     struct event_format *event, void *context)
 {
-	pevent_print_num_field(s, " rip %0x016llx", event, "rip", record, 1);
+	pevent_print_num_field(s, "rip %lx ", event, "rip", record, 1);
 
 	return kvm_nested_vmexit_inject_handler(s, record, event, context);
 }
-- 
2.0.0.rc2



  parent reply	other threads:[~2014-06-13  2:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13  2:10 [PATCH 0/4] tools lib tracing: Updates from trace-cmd for plugin_kvm Steven Rostedt
2014-06-13  2:10 ` [PATCH 1/4] tools lib traceevent: Report unknown VMX exit reasons with code Steven Rostedt
2014-06-13  2:10 ` [PATCH 2/4] tools lib traceevent: Factor out print_exit_reason in kvm plugin Steven Rostedt
2014-06-13  2:10 ` [PATCH 3/4] tools lib traceevent: Add back in kvm plugins nested_vmexit events Steven Rostedt
2014-06-25  5:49   ` [tip:perf/core] " tip-bot for Steven Rostedt (Red Hat)
2014-06-13  2:10 ` Steven Rostedt [this message]
2014-06-13  9:55   ` [PATCH 4/4] tools lib traceevent: Fix and cleanup kvm_nested_vmexit tracepoints Namhyung Kim
2014-06-13 13:59     ` Steven Rostedt
2014-06-13 14:31 ` [PATCH 5/4] tools lib traceevent: Fix format in plugin_kvm Steven Rostedt
2014-06-25  5:49   ` [tip:perf/core] " tip-bot for Steven Rostedt
2014-06-16  8:02 ` [PATCH 0/4] tools lib tracing: Updates from trace-cmd for plugin_kvm Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140613021157.484318137@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=jan.kiszka@siemens.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.