Re: [PATCH v2] perf util: Use target->per_thread and target->system_wide flags

From: Jiri Olsa
Date: Wed Jan 24 2018 - 02:28:51 EST


On Wed, Jan 24, 2018 at 05:19:36PM +0800, Jin Yao wrote:
> Mathieu Poirier reports issue in commit ("73c0ca1eee3d perf thread_map:
> Enumerate all threads from /proc") that it has negative impact on
> 'perf record --per-thread'. It has the effect of creating a kernel event
> for each thread in the system for 'perf record --per-thread'.
>
> Mathieu Poirier's patch ("perf util: Do not reuse target->per_thread flag")
> can fix this issue by creating a new target->all_threads flag.
>
> This patch is based on Mathieu Poirier's patch but it doesn't use a new
> target->all_threads flag. This patch just uses 'target->per_thread &&
> target->system_wide' as a condition to check for all threads case.
>
> v2:
> ---
> According to Jiri's comment, add description to explain why the patch
> uses 'target->per_thread && target->system_wide'.
>
> v2 doesn't have functional change.

Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

thanks,
jirka