Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933471AbcJLXEL (ORCPT ); Wed, 12 Oct 2016 19:04:11 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33562 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933258AbcJLXEE (ORCPT ); Wed, 12 Oct 2016 19:04:04 -0400 From: Alexis Berlemont To: linux-kernel@vger.kernel.org Cc: Alexis Berlemont , peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com Subject: [PATCH] perf: dynamically change verbosity level in perf top Date: Wed, 12 Oct 2016 23:48:23 +0200 Message-Id: <20161012214823.14324-2-alexis.berlemont@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161012214823.14324-1-alexis.berlemont@gmail.com> References: <20161012214823.14324-1-alexis.berlemont@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2078 Lines: 66 Signed-off-by: Alexis Berlemont --- tools/perf/ui/browsers/hists.c | 5 ++++- tools/perf/util/map.c | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index fb8e42c..6016909 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -2806,7 +2806,10 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, do_zoom_dso(browser, actions); continue; case 'V': - browser->show_dso = !browser->show_dso; + verbose = (verbose + 1) % 4; + browser->show_dso = verbose > 0; + ui_helpline__fpush("Verbosity level set to %d\n", + verbose); continue; case 't': actions->thread = thread; diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index c662fef..4f9a71c 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -682,9 +682,16 @@ static int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp continue; if (verbose >= 2) { - fputs("overlapping maps:\n", fp); - map__fprintf(map, fp); - map__fprintf(pos, fp); + + if (use_browser) { + pr_warning("overlapping maps in %s " + "(disable tui for more info)\n", + map->dso->name); + } else { + fputs("overlapping maps:\n", fp); + map__fprintf(map, fp); + map__fprintf(pos, fp); + } } rb_erase_init(&pos->rb_node, root); @@ -702,7 +709,7 @@ static int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp before->end = map->start; __map_groups__insert(pos->groups, before); - if (verbose >= 2) + if (verbose >= 2 && !use_browser) map__fprintf(before, fp); map__put(before); } @@ -717,7 +724,7 @@ static int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp after->start = map->end; __map_groups__insert(pos->groups, after); - if (verbose >= 2) + if (verbose >= 2 && !use_browser) map__fprintf(after, fp); map__put(after); } -- 2.10.0