lkml.org 
[lkml]   [2017]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 8/9] perf stat: Remove --per-thread pid/tid limitation
On Mon, Nov 20, 2017 at 10:43:43PM +0800, Jin Yao wrote:

SNIP

> diff --git a/tools/perf/util/target.h b/tools/perf/util/target.h
> index 446aa7a..6ef01a8 100644
> --- a/tools/perf/util/target.h
> +++ b/tools/perf/util/target.h
> @@ -64,6 +64,11 @@ static inline bool target__none(struct target *target)
> return !target__has_task(target) && !target__has_cpu(target);
> }
>
> +static inline bool target__has_per_thread(struct target *target)
> +{
> + return target->system_wide && target->per_thread;
> +}

this is confusing.. has_per_thread depends on system_wide?

> +
> static inline bool target__uses_dummy_map(struct target *target)
> {
> bool use_dummy = false;
> @@ -73,6 +78,8 @@ static inline bool target__uses_dummy_map(struct target *target)
> else if (target__has_task(target) ||
> (!target__has_cpu(target) && !target->uses_mmap))
> use_dummy = true;
> + else if (target__has_per_thread(target))
> + use_dummy = true;

why do we need dummy_map for this? please comment

thanks,
jirka

\
 
 \ /
  Last update: 2017-11-21 16:19    [W:0.224 / U:3.828 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site