This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 2/2] perf tools: Add record.use-buildid-cache config option
- From: Namhyung Kim <namhyung at kernel dot org>
- To: Peter Zijlstra <peterz at infradead dot org>
- Cc: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Hemant Kumar <hemant at linux dot vnet dot ibm dot com>, Arnaldo Carvalho de Melo <acme at kernel dot org>, LKML <linux-kernel at vger dot kernel dot org>, Ingo Molnar <mingo at kernel dot org>, srikar at linux dot vnet dot ibm dot com, oleg at redhat dot com, hegdevasant at linux dot vnet dot ibm dot com, systemtap at sourceware dot org, aravinda at linux dot vnet dot ibm dot com, penberg at iki dot fi, brendan dot d dot gregg at gmail dot com, Steven Rostedt <rostedt at goodmis dot org>
- Date: Fri, 7 Nov 2014 22:57:57 +0900
- Subject: [PATCH 2/2] perf tools: Add record.use-buildid-cache config option
- Authentication-results: sourceware.org; auth=none
- References: <20141107084211 dot GC23531 at worktop dot programming dot kicks-ass dot net> <1415368677-3794-1-git-send-email-namhyung at kernel dot org>
Add a new config option for auto-disable buildid-cache.
$ cat ~/.perfconfig
[record]
use-buildid-cache = false
$ rm -rf ~/.debug
$ perf record -av sleep 1
mmap size 528384B
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.439 MB perf.data (~19182 samples) ]
Looking at the vmlinux_path (7 entries long)
Using /proc/kallsyms for symbols
$ tree ~/.debug
/home/namhyung/.debug [error opening dir]
0 directories, 0 files
Requested-by: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-record.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 582c4da155ea..19083e715698 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -685,6 +685,12 @@ int record_callchain_opt(const struct option *opt __maybe_unused,
static int perf_record_config(const char *var, const char *value, void *cb)
{
+ struct record *rec = cb;
+
+ if (!strcmp(var, "record.use-buildid-cache")) {
+ rec->no_buildid_cache = !perf_config_bool(var, value);
+ return 0;
+ }
if (!strcmp(var, "record.call-graph"))
var = "call-graph.record-mode"; /* fall-through */
--
2.0.0