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  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:   Thu, 6 Jun 2019 10:02: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 v2 6/7] perf diff: Print the basic block cycles diff



On 6/5/2019 7:44 PM, Jiri Olsa wrote:
> On Mon, Jun 03, 2019 at 10:36:16PM +0800, Jin Yao wrote:
> 
> SNIP
> 
>> -				break;
>>   			return setup_compute_opt(option);
>>   		}
>>   
>> @@ -949,6 +953,14 @@ hist_entry__cmp_wdiff(struct perf_hpp_fmt *fmt,
>>   }
>>   
>>   static int64_t
>> +hist_entry__cmp_cycles(struct perf_hpp_fmt *fmt __maybe_unused,
>> +		       struct hist_entry *left __maybe_unused,
>> +		       struct hist_entry *right __maybe_unused)
>> +{
>> +	return 0;
>> +}
> 
> we have hist_entry__cmp_nop for that
> 
> SNIP
> 
>>   	default:
>>   		BUG_ON(1);
>>   	}
>> @@ -1407,6 +1452,12 @@ static int hpp__color_wdiff(struct perf_hpp_fmt *fmt,
>>   	return __hpp__color_compare(fmt, hpp, he, COMPUTE_WEIGHTED_DIFF);
>>   }
>>   
>> +static int hpp__color_cycles(struct perf_hpp_fmt *fmt,
>> +			     struct perf_hpp *hpp, struct hist_entry *he)
>> +{
>> +	return __hpp__color_compare(fmt, hpp, he, COMPUTE_CYCLES);
>> +}
>> +
>>   static void
>>   hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size)
>>   {
>> @@ -1608,6 +1659,10 @@ static void data__hpp_register(struct data__file *d, int idx)
>>   		fmt->color = hpp__color_delta;
>>   		fmt->sort  = hist_entry__cmp_delta_abs;
>>   		break;
>> +	case PERF_HPP_DIFF__CYCLES:
>> +		fmt->color = hpp__color_cycles;
>> +		fmt->sort  = hist_entry__cmp_cycles;
> 
> also please explain in comment why it's nop
> 
> jirka
> 

Got it, I will update the patch.

Thanks
Jin Yao

Powered by blists - more mailing lists