From 638e2b9984ee1b8d485366f74d579467880283b4 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Sun, 27 Jun 2021 16:18:11 +0300 Subject: perf script: Add option to list dlfilters Add option --list-dlfilters to list dlfilters in the current directory or the exec-path e.g. ~/libexec/perf-core/dlfilters. Use with option -v (must come before option --list-dlfilters) to show long descriptions. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210627131818.810-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-dlfilter.txt | 4 ++++ tools/perf/Documentation/perf-script.txt | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'tools/perf/Documentation') diff --git a/tools/perf/Documentation/perf-dlfilter.txt b/tools/perf/Documentation/perf-dlfilter.txt index aef1c32babd1..8bc219f3eb83 100644 --- a/tools/perf/Documentation/perf-dlfilter.txt +++ b/tools/perf/Documentation/perf-dlfilter.txt @@ -37,6 +37,7 @@ int start(void **data, void *ctx); int stop(void *data, void *ctx); int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx); int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx); +const char *filter_description(const char **long_description); ---- If implemented, 'start' will be called at the beginning, before any @@ -59,6 +60,9 @@ error code. 'data' is set by 'start'. 'ctx' is needed for calls to 'filter_event_early' is the same as 'filter_event' except it is called before internal filtering. +If implemented, 'filter_description' should return a one-line description +of the filter, and optionally a longer description. + The perf_dlfilter_sample structure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt index 2306c81b606b..d2705d6b9874 100644 --- a/tools/perf/Documentation/perf-script.txt +++ b/tools/perf/Documentation/perf-script.txt @@ -102,6 +102,10 @@ OPTIONS Filter sample events using the given shared object file. Refer linkperf:perf-dlfilter[1] +--list-dlfilters=:: + Display a list of available dlfilters. Use with option -v (must come + before option --list-dlfilters) to show long descriptions. + -a:: Force system-wide collection. Scripts run without a normally use -a by default, while scripts run with a -- cgit v1.2.3