lkml.org 
[lkml]   [2019]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol
From
Date


On 6/5/2019 7:44 PM, Jiri Olsa wrote:
> On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote:
>
> SNIP
>
>> data__for_each_file_new(i, d) {
>> pair = get_pair_data(he, d);
>> if (!pair)
>> @@ -510,6 +683,9 @@ static void hists__precompute(struct hists *hists)
>> case COMPUTE_WEIGHTED_DIFF:
>> compute_wdiff(he, pair);
>> break;
>> + case COMPUTE_CYCLES:
>> + process_block_per_sym(pair, d);
>> + break;
>> default:
>> BUG_ON(1);
>> }
>> @@ -713,6 +889,14 @@ hist_entry__cmp_wdiff_idx(struct perf_hpp_fmt *fmt __maybe_unused,
>> sort_compute);
>> }
>>
>> +static int64_t
>> +hist_entry__cmp_cycles_idx(struct perf_hpp_fmt *fmt __maybe_unused,
>> + struct hist_entry *left __maybe_unused,
>> + struct hist_entry *right __maybe_unused)
>> +{
>> + return 0;
>> +}
>
> this is hist_entry__cmp_nop.. please use it instead and
> explain in comment why for COMPUTE_CYCLES we need the
> default sort
>
> jirka
>

fmt->sort should be set otherwise since fmt->sort will be called without
checking valid, the crash happens. Yes, I should use hist_entry__cmp_nop
instead, and will add some comments for COMPUTE_CYCLES.

Thanks
Jin Yao


\
 
 \ /
  Last update: 2019-06-06 03:59    [W:0.128 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site