diff options
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 0e678dd6bdbe..47eff4767edb 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -790,7 +790,10 @@ int perf_event__synthesize_threads(struct perf_tool *tool, if (n < 0) return err; - thread_nr = nr_threads_synthesize; + if (nr_threads_synthesize == UINT_MAX) + thread_nr = sysconf(_SC_NPROCESSORS_ONLN); + else + thread_nr = nr_threads_synthesize; if (thread_nr <= 1) { err = __perf_event__synthesize_threads(tool, process, |