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: <0651bf65-12bb-f6df-003b-996dae2c4010@linux.intel.com>
Date:   Fri, 16 Aug 2019 09:22:15 +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 v4] perf diff: Report noisy for cycles diff



On 8/15/2019 9:22 PM, Jiri Olsa wrote:
> On Tue, Aug 13, 2019 at 03:30:37PM +0800, Jin Yao wrote:
> 
> SNIP
> 
>>   static void
>>   hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size)
>>   {
>> @@ -1662,6 +1794,10 @@ static void data__hpp_register(struct data__file *d, int idx)
>>   		fmt->color = hpp__color_cycles;
>>   		fmt->sort  = hist_entry__cmp_nop;
>>   		break;
>> +	case PERF_HPP_DIFF__CYCLES_HIST:
>> +		fmt->color = hpp__color_cycles_hist;
>> +		fmt->sort  = hist_entry__cmp_nop;
>> +		break;
>>   	default:
>>   		fmt->sort  = hist_entry__cmp_nop;
>>   		break;
>> @@ -1688,8 +1824,15 @@ static int ui_init(void)
>>   		 *   PERF_HPP_DIFF__RATIO
>>   		 *   PERF_HPP_DIFF__WEIGHTED_DIFF
>>   		 */
>> -		data__hpp_register(d, i ? compute_2_hpp[compute] :
>> -					  PERF_HPP_DIFF__BASELINE);
>> +		if (cycles_hist && (compute == COMPUTE_CYCLES)) {
>> +			data__hpp_register(d, i ? PERF_HPP_DIFF__CYCLES :
>> +						  PERF_HPP_DIFF__BASELINE);
>> +			data__hpp_register(d, i ? PERF_HPP_DIFF__CYCLES_HIST :
>> +						  PERF_HPP_DIFF__BASELINE);
>> +		} else {
>> +			data__hpp_register(d, i ? compute_2_hpp[compute] :
>> +						  PERF_HPP_DIFF__BASELINE);
>> +		}
> 
> I tink that something like this might be less confusing instead of above:
> 
>                  if (cycles_hist && i && (compute == COMPUTE_CYCLES))
>                          data__hpp_register(d, PERF_HPP_DIFF__CYCLES);
> 
> other than that the patch looks ok to me
> 
> jirka
> 

Yes, your code is more beautiful. Thanks so much! :)

Thanks
Jin Yao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ