mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	pp-manager@sdl.hitachi.co.jp,
	Akihiro Nagai <akihiro.nagai.hw@hitachi.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@infradead.org>
Subject: [PATCH -tip v4 6/7] perf branch trace: add print all option
Date: Thu, 26 May 2011 14:03:34 +0900	[thread overview]
Message-ID: <20110526050333.30011.47781.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110526050246.30011.86048.stgit@localhost6.localdomain6>

For ease of use, add option printing all information '-A' or '--all'.
This option can print following information.
  - pid
  - command name
  - address
  - function+offset
  - elf file path

Signed-off-by: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
---

 tools/perf/Documentation/perf-branch.txt |    3 +++
 tools/perf/builtin-branch.c              |    6 ++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tools/perf/Documentation/perf-branch.txt b/tools/perf/Documentation/perf-branch.txt
index 9b7b1e1..a034f12 100644
--- a/tools/perf/Documentation/perf-branch.txt
+++ b/tools/perf/Documentation/perf-branch.txt
@@ -48,6 +48,9 @@ OPTIONS
 -s::
 --symbol::
 	Print function name and offset. (default)
+-A::
+--all::
+	Print all information.
 
 SEE ALSO
 --------
diff --git a/tools/perf/builtin-branch.c b/tools/perf/builtin-branch.c
index 708b056..51cdcd4 100644
--- a/tools/perf/builtin-branch.c
+++ b/tools/perf/builtin-branch.c
@@ -36,6 +36,9 @@ struct exec_info {
 #define EI_FLAG_PRINT_ELFPATH		(1 << 3)
 #define EI_FLAG_PRINT_SYMBOL		(1 << 4)
 
+/* all print flags are enabled */
+#define	 EI_FLAG_PRINT_ALL		-1UL
+
 /*
  * It's used when no print item specified.
  * It must be selected from EI_FLAG_REQUIRED.
@@ -114,6 +117,9 @@ static const struct option branch_options[] = {
 				   "print function+offset (default)",
 				   set_print_flags,
 				   (void *)EI_FLAG_PRINT_SYMBOL),
+	OPT_CALLBACK_DEFAULT_NOOPT('A', "all", NULL, NULL,
+				   "print all items", set_print_flags,
+				   (void *)EI_FLAG_PRINT_ALL),
 	OPT_END()
 };
 


  parent reply	other threads:[~2011-05-26  5:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  5:02 [PATCH -tip v4 0/7] perf: Introduce branch sub commands Akihiro Nagai
2011-05-26  5:03 ` [PATCH -tip v4 1/7] perf: new subcommand perf branch record Akihiro Nagai
2011-05-26  5:03 ` [PATCH -tip v4 2/7] perf branch: Introduce new sub command 'perf branch trace' Akihiro Nagai
2011-05-26  5:03 ` [PATCH -tip v4 3/7] perf branch trace: print pid and command Akihiro Nagai
2011-05-26  5:03 ` [PATCH -tip v4 4/7] perf branch trace: print file path of the executed elf Akihiro Nagai
2011-05-26  5:03 ` [PATCH -tip v4 5/7] perf branch trace: print function+offset Akihiro Nagai
2011-05-26  5:03 ` Akihiro Nagai [this message]
2011-05-26  5:03 ` [PATCH -tip v4 7/7] perf branch trace: add kernel filter Akihiro Nagai
2011-05-26 13:28 ` [PATCH -tip v4 0/7] perf: Introduce branch sub commands Frederic Weisbecker
2011-05-26 16:24   ` David Ahern
2011-05-30 13:31     ` Akihiro Nagai
2011-05-30 15:26       ` David Ahern
2011-05-30 16:11         ` Frederic Weisbecker
2011-05-30 19:00           ` Arnaldo Carvalho de Melo
2011-06-10  4:24         ` Akihiro Nagai
2011-06-10  7:17   ` Akihiro Nagai

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=20110526050333.30011.47781.stgit@localhost6.localdomain6 \
    --to=akihiro.nagai.hw@hitachi.com \
    --cc=acme@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=pp-manager@sdl.hitachi.co.jp \
    /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

Powered by JetHome