[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170623054827.3828-8-namhyung@kernel.org>
Date: Fri, 23 Jun 2017 14:48:25 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Jiri Olsa <jolsa@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, kernel-team@....com,
Masami Hiramatsu <mhiramat@...nel.org>,
Andi Kleen <andi@...stfloor.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Wang Nan <wangnan0@...wei.com>
Subject: [PATCH/RFC 7/9] perf tools: Add symbol_conf.use_kcore
The use_kcore field is to control usage of /proc/kcore when loading
symbols. This patch only introduces the new field and don't change any
behavior by itself.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Wang Nan <wangnan0@...wei.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/util/symbol.c | 3 ++-
tools/perf/util/symbol.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index fe46eb782297..3f789f33c2ef 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -36,6 +36,7 @@ char **vmlinux_path;
struct symbol_conf symbol_conf = {
.use_modules = true,
+ .use_kcore = true,
.try_vmlinux_path = true,
.annotate_src = true,
.demangle = true,
@@ -1324,7 +1325,7 @@ int __dso__load_kallsyms(struct dso *dso, const char *filename,
int dso__load_kallsyms(struct dso *dso, const char *filename,
struct map *map)
{
- return __dso__load_kallsyms(dso, filename, map, false);
+ return __dso__load_kallsyms(dso, filename, map, !symbol_conf.use_kcore);
}
static int dso__load_perf_map(struct dso *dso, struct map *map)
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 41ebba9a2eb2..88361eeae813 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -119,7 +119,8 @@ struct symbol_conf {
hide_unresolved,
raw_trace,
report_hierarchy,
- inline_name;
+ inline_name,
+ use_kcore;
const char *vmlinux_name,
*kallsyms_name,
*source_prefix,
--
2.13.1
Powered by blists - more mailing lists