summaryrefslogtreecommitdiff
path: root/tools/perf/ui/browsers/scripts.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2019-03-11 17:44:58 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-03-11 22:33:19 +0300
commit4968ac8fb7c378e2bc40b7e9bd97768fa8c7aa32 (patch)
tree24c72d13c3dbba441c0cefae5a1c076c9c2d62e8 /tools/perf/ui/browsers/scripts.c
parent6f3da20e151f4121548cf598730ae0f9559ae45d (diff)
downloadlinux-4968ac8fb7c378e2bc40b7e9bd97768fa8c7aa32.tar.xz
perf report: Implement browsing of individual samples
Now 'perf report' can show whole time periods with 'perf script', but the user still has to find individual samples of interest manually. It would be expensive and complicated to search for the right samples in the whole perf file. Typically users only need to look at a small number of samples for useful analysis. Also the full scripts tend to show samples of all CPUs and all threads mixed up, which can be very confusing on larger systems. Add a new --samples option to save a small random number of samples per hist entry. Use a reservoir sample technique to select a representatve number of samples. Then allow browsing the samples using 'perf script' as part of the hist entry context menu. This automatically adds the right filters, so only the thread or cpu of the sample is displayed. Then we use less' search functionality to directly jump the to the time stamp of the selected sample. It uses different menus for assembler and source display. Assembler needs xed installed and source needs debuginfo. Currently it only supports as many samples as fit on the screen due to some limitations in the slang ui code. Signed-off-by: Andi Kleen <ak@linux.intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/20190311174605.GA29294@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/scripts.c')
-rw-r--r--tools/perf/ui/browsers/scripts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index 9e5f87558af6..cdba58447b85 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -125,7 +125,7 @@ out:
return ret;
}
-static void run_script(char *cmd)
+void run_script(char *cmd)
{
pr_debug("Running %s\n", cmd);
SLang_reset_tty();