summaryrefslogtreecommitdiff
path: root/tools/perf/util/config.c
diff options
context:
space:
mode:
authorMark Drayton <mbd@fb.com>2018-12-04 12:34:20 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-12-17 14:56:57 -0300
commit3fcb10e496505e5573a7fc386cd1152781d37fe6 (patch)
tree994a39190bd39437969c9254db964c2cc4e2a285 /tools/perf/util/config.c
parent65c9fee2da2fbbedbba402996ddb412072e762fc (diff)
perf tools: Allow specifying proc-map-timeout in config file
The default timeout of 500ms for parsing /proc/<pid>/maps files is too short for profiling many of our services. This can be overridden by passing --proc-map-timeout to the relevant command but it'd be nice to globally increase our default value. This patch permits setting a different default with the core.proc-map-timeout config file parameter. Signed-off-by: Mark Drayton <mbd@fb.com> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20181204203420.1683114-1-mbd@fb.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/config.c')
-rw-r--r--tools/perf/util/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 5ac157056cdf..3beb4cf44c31 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -14,6 +14,7 @@
#include "util.h"
#include "cache.h"
#include <subcmd/exec-cmd.h>
+#include "util/event.h" /* proc_map_timeout */
#include "util/hist.h" /* perf_hist_config */
#include "util/llvm-utils.h" /* perf_llvm_config */
#include "config.h"
@@ -419,6 +420,9 @@ static int perf_buildid_config(const char *var, const char *value)
static int perf_default_core_config(const char *var __maybe_unused,
const char *value __maybe_unused)
{
+ if (!strcmp(var, "core.proc-map-timeout"))
+ proc_map_timeout = strtoul(value, NULL, 10);
+
/* Add other config variables here. */
return 0;
}