aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Documentation/perf-report.txt4
-rw-r--r--tools/perf/builtin-report.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 4c44ef1747b9..8aa3f8c88707 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -28,6 +28,10 @@ OPTIONS
28--comms=:: 28--comms=::
29 Only consider symbols in these comms. CSV that understands 29 Only consider symbols in these comms. CSV that understands
30 file://filename entries. 30 file://filename entries.
31-S::
32--symbols=::
33 Only consider these symbols. CSV that understands
34 file://filename entries.
31 35
32SEE ALSO 36SEE ALSO
33-------- 37--------
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 8143477b7ef7..135b7837e6bf 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -33,8 +33,8 @@ static char *vmlinux = NULL;
33 33
34static char default_sort_order[] = "comm,dso"; 34static char default_sort_order[] = "comm,dso";
35static char *sort_order = default_sort_order; 35static char *sort_order = default_sort_order;
36static char *dso_list_str, *comm_list_str; 36static char *dso_list_str, *comm_list_str, *sym_list_str;
37static struct strlist *dso_list, *comm_list; 37static struct strlist *dso_list, *comm_list, *sym_list;
38 38
39static int input; 39static int input;
40static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; 40static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
@@ -1281,6 +1281,9 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
1281 if (dso_list && dso && dso->name && !strlist__has_entry(dso_list, dso->name)) 1281 if (dso_list && dso && dso->name && !strlist__has_entry(dso_list, dso->name))
1282 return 0; 1282 return 0;
1283 1283
1284 if (sym_list && sym && !strlist__has_entry(sym_list, sym->name))
1285 return 0;
1286
1284 if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) { 1287 if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) {
1285 eprintf("problem incrementing symbol count, skipping event\n"); 1288 eprintf("problem incrementing symbol count, skipping event\n");
1286 return -1; 1289 return -1;
@@ -1672,6 +1675,8 @@ static const struct option options[] = {
1672 "only consider symbols in these dsos"), 1675 "only consider symbols in these dsos"),
1673 OPT_STRING('C', "comms", &comm_list_str, "comm[,comm...]", 1676 OPT_STRING('C', "comms", &comm_list_str, "comm[,comm...]",
1674 "only consider symbols in these comms"), 1677 "only consider symbols in these comms"),
1678 OPT_STRING('S', "symbols", &sym_list_str, "symbol[,symbol...]",
1679 "only consider these symbols"),
1675 OPT_END() 1680 OPT_END()
1676}; 1681};
1677 1682
@@ -1726,6 +1731,7 @@ int cmd_report(int argc, const char **argv, const char *prefix)
1726 1731
1727 setup_list(&dso_list, dso_list_str, "dso"); 1732 setup_list(&dso_list, dso_list_str, "dso");
1728 setup_list(&comm_list, comm_list_str, "comm"); 1733 setup_list(&comm_list, comm_list_str, "comm");
1734 setup_list(&sym_list, sym_list_str, "symbol");
1729 1735
1730 setup_pager(); 1736 setup_pager();
1731 1737