All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip: perf/core] perf report/top: Make 'e' visible in the help and make it toggle showing callchains
       [not found] <tip-pmyi5x34stlqmyu81rci94x9@git.kernel.org>
@ 2020-01-10 17:53 ` tip-bot2 for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2020-01-10 17:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Jiri Olsa, Adrian Hunter, Andi Kleen, Jin Yao, Kan Liang,
	Linus Torvalds, Namhyung Kim, Arnaldo Carvalho de Melo, x86,
	LKML

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     e6d6abfc447a65e949c1e883e66e1450903d2fbd
Gitweb:        https://git.kernel.org/tip/e6d6abfc447a65e949c1e883e66e1450903d2fbd
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Tue, 17 Dec 2019 10:39:04 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Mon, 06 Jan 2020 11:46:10 -03:00

perf report/top: Make 'e' visible in the help and make it toggle showing callchains

The 'e' and 'c' hotkeys were present for a long time, but not documented
in the help window, change 'e' to be a toggle so that it gets consistent
with other toggles like '+' and document it in the help window.

Keep 'c' as is for people used to it but don't document, as it is easier
to just use 'e' to show/hide all the callchains for a top level
histogram entry.

Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-pmyi5x34stlqmyu81rci94x9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/hists.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 3bec8de..f36dee4 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -407,6 +407,11 @@ static bool hist_browser__selection_has_children(struct hist_browser *browser)
 	return container_of(ms, struct callchain_list, ms)->has_children;
 }
 
+static bool hist_browser__he_selection_unfolded(struct hist_browser *browser)
+{
+	return browser->he_selection ? browser->he_selection->unfolded : false;
+}
+
 static bool hist_browser__selection_unfolded(struct hist_browser *browser)
 {
 	struct hist_entry *he = browser->he_selection;
@@ -727,7 +732,7 @@ static int hist_browser__handle_hotkey(struct hist_browser *browser, bool warn_l
 		break;
 	case 'e':
 		/* Expand the selected entry. */
-		hist_browser__set_folding_selected(browser, true);
+		hist_browser__set_folding_selected(browser, !hist_browser__he_selection_unfolded(browser));
 		break;
 	case 'H':
 		browser->show_headers = !browser->show_headers;
@@ -2942,6 +2947,7 @@ static int perf_evsel__hists_browse(struct evsel *evsel, int nr_events,
 	"a             Annotate current symbol\n"			\
 	"C             Collapse all callchains\n"			\
 	"d             Zoom into current DSO\n"				\
+	"e             Expand/Collapse main entry callchains\n"	\
 	"E             Expand all callchains\n"				\
 	"F             Toggle percentage of filtered entries\n"		\
 	"H             Display column headers\n"			\

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-10 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tip-pmyi5x34stlqmyu81rci94x9@git.kernel.org>
2020-01-10 17:53 ` [tip: perf/core] perf report/top: Make 'e' visible in the help and make it toggle showing callchains tip-bot2 for Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.