aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2016-09-23 10:38:39 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-09-29 10:17:02 -0400
commit1b36c03e356936d62abbe2accaae1573d3b66f14 (patch)
tree6eb7cc8ca62751aba4661d07823a6cea3cb912e7 /tools/perf/builtin-record.c
parentcd67f99fe90dcf515f1c70c474b84d56b6236cbb (diff)
perf record: Add support for using symbols in address filters
Symbols come from either the DSO or /proc/kallsyms for the kernel. Details of the functionality can be found in Documentation/perf-record.txt. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Link: http://lkml.kernel.org/r/1474641528-18776-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 962adcfc43a5..67d2a9003294 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1581,6 +1581,18 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
1581 if (err) 1581 if (err)
1582 goto out; 1582 goto out;
1583 1583
1584 /*
1585 * Allow aliases to facilitate the lookup of symbols for address
1586 * filters. Refer to auxtrace_parse_filters().
1587 */
1588 symbol_conf.allow_aliases = true;
1589
1590 symbol__init(NULL);
1591
1592 err = auxtrace_parse_filters(rec->evlist);
1593 if (err)
1594 goto out;
1595
1584 if (dry_run) 1596 if (dry_run)
1585 goto out; 1597 goto out;
1586 1598
@@ -1594,8 +1606,6 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
1594 1606
1595 err = -ENOMEM; 1607 err = -ENOMEM;
1596 1608
1597 symbol__init(NULL);
1598
1599 if (symbol_conf.kptr_restrict) 1609 if (symbol_conf.kptr_restrict)
1600 pr_warning( 1610 pr_warning(
1601"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n" 1611"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n"