mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: acme@ghostprotocols.net, jolsa@redhat.com, eranian@google.com,
	Don Zickus <dzickus@redhat.com>
Subject: [PATCH 2/3] perf, session: Change header.misc dump from decimal to hex
Date: Tue, 25 Feb 2014 22:43:46 -0500	[thread overview]
Message-ID: <1393386227-149412-3-git-send-email-dzickus@redhat.com> (raw)
In-Reply-To: <1393386227-149412-1-git-send-email-dzickus@redhat.com>

When printing the raw dump of a data file, the header.misc is
printed as a decimal.  Unfortunately, that field is a bit mask, so
it is hard to interpret as a decimal.

Print in hex, so the user can easily see what bits are set and more
importantly what type of info it is conveying.

V2: add 0x in front per Jiri Olsa

Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 tools/perf/util/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 1d555d6..55960f2 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -794,7 +794,7 @@ static void dump_sample(struct perf_evsel *evsel, union perf_event *event,
 	if (!dump_trace)
 		return;
 
-	printf("(IP, %d): %d/%d: %#" PRIx64 " period: %" PRIu64 " addr: %#" PRIx64 "\n",
+	printf("(IP, 0x%x): %d/%d: %#" PRIx64 " period: %" PRIu64 " addr: %#" PRIx64 "\n",
 	       event->header.misc, sample->pid, sample->tid, sample->ip,
 	       sample->period, sample->addr);
 
-- 
1.7.11.7


  parent reply	other threads:[~2014-02-26  3:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  3:43 [PATCH 0/3] perf: misc fixes Don Zickus
2014-02-26  3:43 ` [PATCH 1/3] perf, machine: Use map as success in ip__resolve_ams Don Zickus
2014-03-11 10:16   ` [tip:perf/urgent] perf " tip-bot for Don Zickus
2014-02-26  3:43 ` Don Zickus [this message]
2014-03-18  8:30   ` [tip:perf/core] perf session: Change header.misc dump from decimal to hex tip-bot for Don Zickus
2014-02-26  3:43 ` [PATCH 3/3] perf: fix synthesizing mmaps for threads Don Zickus
2014-02-26 14:17   ` Arnaldo Carvalho de Melo
2014-02-26 14:32     ` Arnaldo Carvalho de Melo
2014-02-26 14:44     ` Don Zickus

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=1393386227-149412-3-git-send-email-dzickus@redhat.com \
    --to=dzickus@redhat.com \
    --cc=acme@ghostprotocols.net \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®