path: root/tools/perf/builtin-record.c
diff options
authorNamhyung Kim <>2015-12-15 10:49:56 +0900
committerArnaldo Carvalho de Melo <>2015-12-15 11:46:16 -0300
commit7a29c087ff80f5d534bd6729c852099fc572c8d0 (patch)
treed3060f0251d8ac1e2eca9be17562f303720d36f0 /tools/perf/builtin-record.c
parent7efe0e034c713716060bc7794c7e332589980c70 (diff)
perf record: Add config option
Post processing at 'perf record' takes a long time on big machines. What it does is to find the build-id of binaries found in the event stream, so that it can make sure, at 'report' time, that the symtabs (be it ELF, kallsyms, etc) being used to resolve symbols are the ones matching the binaries found at 'record' time. Sometimes we just want to skip this processing of events at the end of the session to get quicker results, making sure the binaries haven't changed from 'record' to 'report' time. Add a new config option to control this behavior. The config variable can have one of the following values: - cache: post-process data and save/update the binaries into the build-id cache (in ~/.debug). This is the default. - no-cache: post-process the data but not update the build-id cache. Same effect as using the -N option. - skip: skip post-processing and do not update the cache. Same effect as using the -B option. Reported-and-Acked-by: Peter Zijlstra (Intel) <> Signed-off-by: Namhyung Kim <> Acked-by: Jiri Olsa <> Cc: David Ahern <> Cc: Taeung Song <> Link: [ Added some more text to the documentation ] Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-record.c')
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3ef3c79e7534..a3b4930737c6 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -837,6 +837,19 @@ int record_callchain_opt(const struct option *opt,
static int perf_record_config(const char *var, const char *value, void *cb)
+ struct record *rec = cb;
+ if (!strcmp(var, "")) {
+ if (!strcmp(value, "cache"))
+ rec->no_buildid_cache = false;
+ else if (!strcmp(value, "no-cache"))
+ rec->no_buildid_cache = true;
+ else if (!strcmp(value, "skip"))
+ rec->no_buildid = true;
+ else
+ return -1;
+ return 0;
+ }
if (!strcmp(var, ""))
var = "call-graph.record-mode"; /* fall-through */