diff options
author | Feng Tang <feng.tang@intel.com> | 2012-10-30 11:56:04 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-29 11:52:53 -0200 |
commit | 66517826664fa910d4bc5f32a5abff6bcd8657c5 (patch) | |
tree | 0dfb8b6b1320c26f76e97367bb471f7dd07af3e7 /tools/perf/util | |
parent | 49e639e256ea18fb92f609dd6be09883cd9d05aa (diff) |
perf scripts browser: Add a browser for perf script
Create a script browser, so that user can check all the available
scripts for current perf data file and run them inside the main perf
report or annotation browsers, for all perf samples or for samples
belong to one thread/symbol.
Please be noted: current script browser is only for report use, and
doesn't cover the record phase, IOW it must run against one existing
perf data file.
The work flow is, users can use function key to list all the available
scripts for current perf data file in system and chose one, which will
be executed with popen("perf script -s xxx.xx",) and all the output
lines are put into one ui browser, pressing 'q' or left arrow key will
make it return to previous browser.
Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1351569369-26732-4-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/hist.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index c751624d4153..b87460971736 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -165,6 +165,7 @@ int hist_entry__tui_annotate(struct hist_entry *he, int evidx, int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, void(*timer)(void *arg), void *arg, int refresh); +int script_browse(const char *script_opt); #else static inline int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __maybe_unused, @@ -186,6 +187,12 @@ static inline int hist_entry__tui_annotate(struct hist_entry *self { return 0; } + +static inline int script_browse(const char *script_opt) +{ + return 0; +} + #define K_LEFT -1 #define K_RIGHT -2 #endif |