mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	kernel-team@lge.com
Subject: [PATCH 03/23] perf buildid-list: Add -q/--quiet option
Date: Wed,  8 Mar 2017 00:08:31 +0900	[thread overview]
Message-ID: <20170307150851.22304-4-namhyung@kernel.org> (raw)
In-Reply-To: <20170307150851.22304-1-namhyung@kernel.org>

The -q/--quiet option is to suppress any message.  Sometimes users just
want to run the command and it can be used for that case.

Before:

  $ perf buildid-list -H
  No kallsyms or vmlinux with build-id 0dde46afc62ef46be224391d5c64379f984901e5 was found
  /lib/modules/4.8.3-1-ARCH/build/vmlinux with build id 0dde46afc62ef46be224391d5c64379f984901e5 not found, continuing without symbols
  Failed to open /lib/modules/4.8.3-1-ARCH/kernel/drivers/ata/libata.ko.gz, continuing without symbols
  0dde46afc62ef46be224391d5c64379f984901e5 /lib/modules/4.8.3-1-ARCH/build/vmlinux
  2524206aeba0015f174f320fad4b301a59ac311d /home/namhyung/project/linux/tools/perf/perf
  c778954ffb0e2239cd454d40c9de504e8601d990 /usr/lib/ld-2.24.so
  13d24a5495ae34f58e52403f9153263488b62cf4 /usr/lib/libpthread-2.24.so
  17ec69093fc89b16363635ea7f76f46145a08384 /usr/lib/libdl-2.24.so
  ...

After:

  $ perf buildid-list -H -q
  0dde46afc62ef46be224391d5c64379f984901e5 /lib/modules/4.8.3-1-ARCH/build/vmlinux
  2524206aeba0015f174f320fad4b301a59ac311d /home/namhyung/project/linux/tools/perf/perf
  c778954ffb0e2239cd454d40c9de504e8601d990 /usr/lib/ld-2.24.so
  13d24a5495ae34f58e52403f9153263488b62cf4 /usr/lib/libpthread-2.24.so
  17ec69093fc89b16363635ea7f76f46145a08384 /usr/lib/libdl-2.24.so
  ...

Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/Documentation/perf-buildid-list.txt | 3 +++
 tools/perf/builtin-buildid-list.c              | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/tools/perf/Documentation/perf-buildid-list.txt b/tools/perf/Documentation/perf-buildid-list.txt
index 25c52efcc7f0..a892f883d8b5 100644
--- a/tools/perf/Documentation/perf-buildid-list.txt
+++ b/tools/perf/Documentation/perf-buildid-list.txt
@@ -36,6 +36,9 @@ OPTIONS
 -v::
 --verbose::
 	Be more verbose.
+-q::
+--quiet::
+	Do not show any message.
 
 SEE ALSO
 --------
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c
index 5e914ee79eb3..6fc2a2fe6627 100644
--- a/tools/perf/builtin-buildid-list.c
+++ b/tools/perf/builtin-buildid-list.c
@@ -99,6 +99,7 @@ int cmd_buildid_list(int argc, const char **argv,
 	OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
 	OPT_BOOLEAN('k', "kernel", &show_kernel, "Show current kernel build id"),
 	OPT_INCR('v', "verbose", &verbose, "be more verbose"),
+	OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
 	OPT_END()
 	};
 	const char * const buildid_list_usage[] = {
@@ -109,6 +110,9 @@ int cmd_buildid_list(int argc, const char **argv,
 	argc = parse_options(argc, argv, options, buildid_list_usage, 0);
 	setup_pager();
 
+	if (quiet)
+		perf_quiet_option();
+
 	if (show_kernel)
 		return !(sysfs__fprintf_build_id(stdout) > 0);
 
-- 
2.11.0

  parent reply	other threads:[~2017-03-07 15:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 15:08 [PATCHSET 00/23] perf tools: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 01/23] perf report: Hide tip message when -q option is given Namhyung Kim
2017-03-07 15:24   ` Arnaldo Carvalho de Melo
2017-03-15 18:34   ` [tip:perf/core] " tip-bot for Namhyung Kim
2017-03-07 15:08 ` [PATCH 02/23] perf buildid-cache: Add -q/--quiet option Namhyung Kim
2017-03-07 15:28   ` Arnaldo Carvalho de Melo
2017-03-07 16:07     ` Namhyung Kim
2017-03-07 15:08 ` Namhyung Kim [this message]
2017-03-07 15:08 ` [PATCH 04/23] perf c2c: Fix help message of --stats option Namhyung Kim
2017-03-15 18:35   ` [tip:perf/core] perf c2c: Clarify " tip-bot for Namhyung Kim
2017-03-07 15:08 ` [PATCH 05/23] perf c2c: Fix display bug when using pipe Namhyung Kim
2017-03-15 18:35   ` [tip:perf/core] " tip-bot for Namhyung Kim
2017-03-07 15:08 ` [PATCH 06/23] perf c2c: Add -q/--quiet option Namhyung Kim
2017-03-07 15:08 ` [PATCH 07/23] perf data: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 08/23] perf evlist: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 09/23] perf ftrace: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 10/23] perf inject: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 11/23] perf kallsyms: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 12/23] perf kmem: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 13/23] perf kvm: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 14/23] perf list: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 15/23] perf lock: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 16/23] perf mem: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 17/23] perf sched: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 18/23] perf script: Use pr_err() for error messages Namhyung Kim
2017-03-07 15:08 ` [PATCH 19/23] perf script: Add -q/--quiet option Namhyung Kim
2017-03-07 15:08 ` [PATCH 20/23] perf stat: Use pr_err() for error messages Namhyung Kim
2017-03-07 15:08 ` [PATCH 21/23] perf stat: Add -q/--quiet option Namhyung Kim
2017-03-07 15:08 ` [PATCH 22/23] perf top: " Namhyung Kim
2017-03-07 15:08 ` [PATCH 23/23] perf trace: " Namhyung Kim
2017-03-07 15:20 ` [PATCHSET 00/23] perf tools: " Jiri Olsa
2017-03-07 15:35 ` Arnaldo Carvalho de Melo

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=20170307150851.22304-4-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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

Powered by JetHome