]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - tools/perf/ui/browsers/hists.c
perf browser: Don't show scripts menu for 'perf top'
[karo-tx-linux.git] / tools / perf / ui / browsers / hists.c
index fe622845872e0ddf488372a4646378e65ad2a878..082078ae9a6b493d9d8d70ba492f271b196ef604 100644 (file)
@@ -1127,6 +1127,12 @@ static inline void free_popup_options(char **options, int n)
        }
 }
 
+/* Check whether the browser is for 'top' or 'report' */
+static inline bool is_report_browser(void *timer)
+{
+       return timer == NULL;
+}
+
 static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
                                    const char *helpline, const char *ev_name,
                                    bool left_exits,
@@ -1214,7 +1220,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
                        }
                        continue;
                case 'r':
-                       goto do_scripts;
+                       if (is_report_browser(timer))
+                               goto do_scripts;
+                       continue;
                case K_F1:
                case 'h':
                case '?':
@@ -1233,7 +1241,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
                                        "E             Expand all callchains\n"
                                        "d             Zoom into current DSO\n"
                                        "t             Zoom into current Thread\n"
-                                       "r             Run available scripts\n"
+                                       "r             Run available scripts('perf report' only)\n"
                                        "P             Print histograms to perf.hist.N\n"
                                        "V             Verbose (DSO names in callchains, etc)\n"
                                        "/             Filter symbol by name");