Commit e4dd45fe authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf record: Fix -C option

Currently the -C option does not work for record command, because of the
targets mismatch when synthesizing threads.

Fixing this by using proper target interface for the synthesize
Signed-off-by: Jiri Olsa's avatarJiri Olsa <>
Reported-by: default avatarOleg Nesterov <>
Cc: Corey Ashford <>
Cc: David Ahern <>
Cc: Frederic Weisbecker <>
Cc: Ingo Molnar <>
Cc: Namhyung Kim <>
Cc: Oleg Nesterov <>
Cc: Paul Mackerras <>
Cc: Peter Zijlstra <>
Link: default avatarArnaldo Carvalho de Melo <>
parent d2f32479
......@@ -573,13 +573,15 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
perf_event__synthesize_guest_os, tool);
if (!opts->target.system_wide)
if (perf_target__has_task(&opts->target))
err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
else if (perf_target__has_cpu(&opts->target))
err = perf_event__synthesize_threads(tool, process_synthesized_event,
else /* command specified */
err = 0;
if (err != 0)
goto out_delete_session;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment