Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600820

[PATCH 01/19] perf report: Hide tip message when -q option is given

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 01/19] perf report: Hide tip message when -q option is given
Date 2017-03-14 20:00 +0100
Message-ID <tkZPQ-4ju-37@gated-at.bofh.it> (permalink)
References <tkZPP-4ju-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Namhyung Kim <namhyung@kernel.org>

The tip message at the end was printed regardless of the -q option.

Originally, the message suggested only '-s comm,dso' option for higher
level view when no sort option and parent option were given.

Now it shows random help message regardless of the options so the
condition can be simplified to honor the -q option.

Committer notes:

Before:

  $ perf report --stdio -q
    42.77%  ls       ls                [.] _init
    13.21%  ls       ld-2.24.so        [.] match_symbol
    12.55%  ls       libc-2.24.so      [.] __strcoll_l
    11.94%  ls       libc-2.24.so      [.] _init

  #
  # (Tip: Show current config key-value pairs: perf config --list)
  #
  $

After:

  $ perf report --stdio -q
    42.77%  ls       ls                [.] _init
    13.21%  ls       ld-2.24.so        [.] match_symbol
    12.55%  ls       libc-2.24.so      [.] __strcoll_l
    11.94%  ls       libc-2.24.so      [.] _init

  $

We still have those two extra lines tho (that git commit insists in
turning into one, or git commit --amend doesn't make me add), food for
another patch...

Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170307150851.22304-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0a88670e56f3..f03a5eac2a62 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -394,8 +394,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 		fprintf(stdout, "\n\n");
 	}
 
-	if (sort_order == NULL &&
-	    parent_pattern == default_parent_pattern)
+	if (!quiet)
 		fprintf(stdout, "#\n# (%s)\n#\n", help);
 
 	if (rep->show_threads) {
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 17/19] perf powerpc: Choose local entry point with kretprobes Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 12/19] perf script: Add script print support for namespace events Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 16/19] perf kretprobes: Offset from reloc_sym if kernel supports it Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 04/19] perf tools: Missing c2c command in command-list Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 07/19] perf report: Document +field style argument support for --field option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 05/19] perf tools: Ignore generated files pmu-events/{jevents,pmu-events.c} for git Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 06/19] perf sort: Fix segfault with basic block 'cycles' sort dimension Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 19/19] kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 14/19] perf sched timehist: Add --next option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 13/19] perf tools: Add 'cgroup_id' sort order keyword Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 03/19] perf c2c: Fix display bug when using pipe Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 01/19] perf report: Hide tip message when -q option is given Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 02/19] perf c2c: Clarify help message of --stats option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 18/19] doc: trace/kprobes: add information about NOKPROBE_SYMBOL Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 10/19] perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 08/19] perf hists browser: Fix typo in function switch_data_file Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  [PATCH 15/19] perf probe: Factor out the ftrace README scanning Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 20:00 +0100
  Re: [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2017-03-15 19:40 +0100

csiph-web