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]
Message-ID: <959b3b52-269c-8f23-9ac7-a881334ca904@linux.intel.com>
Date:   Tue, 13 Aug 2019 08:40:47 +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 v3] perf diff: Report noisy for cycles diff



On 8/12/2019 4:35 PM, Jiri Olsa wrote:
> On Sat, Aug 10, 2019 at 07:30:29AM +0800, Jin Yao wrote:
> 
> SNIP
> 
>>   static int process_block_per_sym(struct hist_entry *he)
>> @@ -684,6 +694,21 @@ static struct hist_entry *get_block_pair(struct hist_entry *he,
>>   	return NULL;
>>   }
>>   
>> +static void init_spark_values(unsigned long *svals, int num)
>> +{
>> +	for (int i = 0; i < num; i++)
>> +		svals[i] = 0;
>> +}
>> +
>> +static void update_spark_value(unsigned long *svals, int num,
>> +			       struct stats *stats, u64 val)
>> +{
>> +	int n = stats->n;
>> +
>> +	if (n < num)
>> +		svals[n] = val;
>> +}
>> +
>>   static void compute_cycles_diff(struct hist_entry *he,
>>   				struct hist_entry *pair)
>>   {
>> @@ -692,6 +717,23 @@ static void compute_cycles_diff(struct hist_entry *he,
>>   		pair->diff.cycles =
>>   			pair->block_info->cycles_aggr / pair->block_info->num_aggr -
>>   			he->block_info->cycles_aggr / he->block_info->num_aggr;
>> +
> 
> should below code be executed only for show_noisy?
> 
> jirka
> 

Oh, yes, following code should be executed only when show_noisy is 
enabled. Thanks for pointing out this issue. I will refine the code.

Thanks
Jin Yao

>> +		init_stats(&pair->diff.stats);
>> +		init_spark_values(pair->diff.svals, NUM_SPARKS);
>> +
>> +		for (int i = 0; i < pair->block_info->num; i++) {
>> +			u64 val;
>> +
>> +			if (i >= he->block_info->num || i >= NUM_SPARKS)
>> +				break;
>> +
>> +			val = labs(pair->block_info->cycles_spark[i] -
>> +				     he->block_info->cycles_spark[i]);
>> +
>> +			update_spark_value(pair->diff.svals, NUM_SPARKS,
>> +					   &pair->diff.stats, val);
>> +			update_stats(&pair->diff.stats, val);
>> +		}
>>   	}
>>   }
> 
> SNIP
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ