lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Nov 2017 13:34:49 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v1 8/9] perf stat: Remove --per-thread pid/tid limitation



On 11/21/2017 11:18 PM, Jiri Olsa wrote:
> 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?
> 

This patch series only supports to get per-thread data for the whole system.

So I add checking of system_wide here.

>> +
>>   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
> 

We need dummy_map here. That's similar to the processing of 
'--per-thread -p -t'.

We need a dummy map to help us to aggregate counts per-thread.

Thanks
Jin Yao

> thanks,
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ