mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
65c9fee2da
commit
3fcb10e496
14 changed files with 39 additions and 50 deletions
|
@ -867,8 +867,7 @@ static int record__synthesize_workload(struct record *rec, bool tail)
|
|||
err = perf_event__synthesize_thread_map(&rec->tool, thread_map,
|
||||
process_synthesized_event,
|
||||
&rec->session->machines.host,
|
||||
rec->opts.sample_address,
|
||||
rec->opts.proc_map_timeout);
|
||||
rec->opts.sample_address);
|
||||
thread_map__put(thread_map);
|
||||
return err;
|
||||
}
|
||||
|
@ -1085,7 +1084,7 @@ static int record__synthesize(struct record *rec, bool tail)
|
|||
|
||||
err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->threads,
|
||||
process_synthesized_event, opts->sample_address,
|
||||
opts->proc_map_timeout, 1);
|
||||
1);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
@ -1783,7 +1782,6 @@ static struct record record = {
|
|||
.uses_mmap = true,
|
||||
.default_per_cpu = true,
|
||||
},
|
||||
.proc_map_timeout = 500,
|
||||
},
|
||||
.tool = {
|
||||
.sample = process_sample_event,
|
||||
|
@ -1913,7 +1911,7 @@ static struct option __record_options[] = {
|
|||
parse_clockid),
|
||||
OPT_STRING_OPTARG('S', "snapshot", &record.opts.auxtrace_snapshot_opts,
|
||||
"opts", "AUX area tracing Snapshot Mode", ""),
|
||||
OPT_UINTEGER(0, "proc-map-timeout", &record.opts.proc_map_timeout,
|
||||
OPT_UINTEGER(0, "proc-map-timeout", &proc_map_timeout,
|
||||
"per thread proc mmap processing timeout in ms"),
|
||||
OPT_BOOLEAN(0, "namespaces", &record.opts.record_namespaces,
|
||||
"Record namespaces events"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue