Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf scripts: Add --symbols option to handle specific symbols

Since perf script no longer only handle the trace points, we can add the
symbol filter option so that scripts can handle specified samples.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1347007349-3102-3-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Feng Tang and committed by
Arnaldo Carvalho de Melo
36385be5 1500b93b

+3
+3
tools/perf/builtin-script.c
··· 14 14 #include "util/util.h" 15 15 #include "util/evlist.h" 16 16 #include "util/evsel.h" 17 + #include "util/sort.h" 17 18 #include <linux/bitmap.h> 18 19 19 20 static char const *script_name; ··· 1144 1143 parse_output_fields), 1145 1144 OPT_BOOLEAN('a', "all-cpus", &system_wide, 1146 1145 "system-wide collection from all CPUs"), 1146 + OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]", 1147 + "only consider these symbols"), 1147 1148 OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"), 1148 1149 OPT_STRING('c', "comms", &symbol_conf.comm_list_str, "comm[,comm...]", 1149 1150 "only display events for these comms"),