]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
perf tools: add --sym-lookup arg to enable symbol lookup in hugepage shm segment
authorashok.vairavan <avairava@ca-server1.us.oracle.com>
Wed, 6 Jul 2016 15:13:41 +0000 (08:13 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 8 Jul 2016 20:52:11 +0000 (13:52 -0700)
Orabug: 23278057

A command line flag -l, --sym-lookup is added to Perf tool to enable symbol
lookup in hugepage shm segment. Perf tool without -l option exhibits the
default behavior of upstream.

Signed-off-by: avairava@ca-server1.us.oracle.com
tools/perf/builtin-record.c
tools/perf/builtin-report.c
tools/perf/util/map.c
tools/perf/util/map.h

index 520c7c1518c85ac4f5afa7c62f0a9124cf33de38..5b09e04592a4b46cf1f37b8be2d5a6b5456bcf46 100644 (file)
@@ -888,6 +888,8 @@ struct option __record_options[] = {
                     &record_parse_callchain_opt),
        OPT_INCR('v', "verbose", &verbose,
                    "be more verbose (show counter open errors, etc)"),
+        OPT_BOOLEAN('l', "sysv-lookup", &include_sysv_lookup,
+                    "do symbol lookup in SYSV memory"),
        OPT_BOOLEAN('q', "quiet", &quiet, "don't print any message"),
        OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat,
                    "per thread counts"),
index b63aeda719be0c7604da5229e1a3a0ec33253400..f81fc89007ae582ff0ae09251e2cd1d7bb2df6c1 100644 (file)
@@ -618,6 +618,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
                    "input file name"),
        OPT_INCR('v', "verbose", &verbose,
                    "be more verbose (show symbol address, etc)"),
+        OPT_BOOLEAN('l', "sysv-lookup", &include_sysv_lookup,
+                    "do symbol lookup in SYSV memory"),
        OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
                    "dump raw trace in ASCII"),
        OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
index a14f08f416863944527412b82a6b3cfaeda3c603..5fb2c426be65bc232e30f818e34bc37a17c54e2b 100644 (file)
@@ -16,6 +16,7 @@
 #include "machine.h"
 #include <linux/string.h>
 
+bool include_sysv_lookup = false;
 const char *map_type__name[MAP__NR_TYPES] = {
        [MAP__FUNCTION] = "Functions",
        [MAP__VARIABLE] = "Variables",
@@ -31,7 +32,7 @@ static inline int is_anon_memory(const char *filename)
 static inline int is_no_dso_memory(const char *filename)
 {
        return !strncmp(filename, "[stack", 6) ||
-              !strncmp(filename, "/SYSV",5)   ||
+              (!include_sysv_lookup && !strncmp(filename, "/SYSV", 5)) ||
               !strcmp(filename, "[heap]");
 }
 
index ec19c59ca38e07deba4a8c2c254ec3a4c71c6c91..e2ba05a1d99dd29a792dcdcfa7fdf0407b69f74d 100644 (file)
@@ -16,6 +16,7 @@ enum map_type {
 #define MAP__NR_TYPES (MAP__VARIABLE + 1)
 
 extern const char *map_type__name[MAP__NR_TYPES];
+extern bool include_sysv_lookup;
 
 struct dso;
 struct ip_callchain;