]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf report/top: Make ENTER consistently bring up menu
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 12 Dec 2019 13:02:33 +0000 (10:02 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Jan 2020 14:46:10 +0000 (11:46 -0300)
When callchains are present the ENTER key switches from bringing up the
menu that offers Annotation, Zoom by DSO, etc to expanding/collapsing
one callchain level, causing confusion, fix it by making it consistently
bring up the menu and use '+' to expand/collapse one callchain level.

Next patch will also add an entry to the menu to allow
expanding/collapsing, so that people used to ENTER expanding one
callchain level can quickly find it and use it instead.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
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: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-bjz35omktig8cwn6lbj1ifns@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c

index cfc6172ecab7615a67108125cf040a8195d2f653..fefa505d4fa8e854fcf944e5aafc0fce1f53b092 100644 (file)
@@ -706,7 +706,7 @@ int hist_browser__run(struct hist_browser *browser, const char *help,
                        browser->show_headers = !browser->show_headers;
                        hist_browser__update_rows(browser);
                        break;
-               case K_ENTER:
+               case '+':
                        if (hist_browser__toggle_fold(browser))
                                break;
                        /* fall thru */
@@ -2858,6 +2858,7 @@ static int perf_evsel__hists_browse(struct evsel *evsel, int nr_events,
        "For symbolic views (--sort has sym):\n\n"                      \
        "ENTER         Zoom into DSO/Threads & Annotate current symbol\n" \
        "ESC           Zoom out\n"                                      \
+       "+             Expand/Collapse one callchain level\n"           \
        "a             Annotate current symbol\n"                       \
        "C             Collapse all callchains\n"                       \
        "d             Zoom into current DSO\n"                         \