lkml.org 
[lkml]   [2020]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 3/4] perf util: Flexible to set block info output formats
From
Date


On 1/20/2020 5:47 PM, Jiri Olsa wrote:
> On Thu, Jan 16, 2020 at 03:29:03AM +0800, Jin Yao wrote:
>
> SNIP
>
>> }
>>
>> +void block_info__free_report(struct block_report *reps, int nr_reps)
>> +{
>> + for (int i = 0; i < nr_reps; i++)
>> + hists__delete_entries(&reps[i].hist.block_hists);
>> +
>> + free(reps);
>> +}
>> +
>> int report__browse_block_hists(struct block_hist *bh, float min_percent,
>> struct evsel *evsel, struct perf_env *env,
>> - struct annotation_options *annotation_opts)
>> + struct annotation_options *annotation_opts,
>> + bool release)
>> {
>> int ret;
>>
>> @@ -451,13 +473,17 @@ int report__browse_block_hists(struct block_hist *bh, float min_percent,
>> symbol_conf.report_individual_block = true;
>> hists__fprintf(&bh->block_hists, true, 0, 0, min_percent,
>> stdout, true);
>> - hists__delete_entries(&bh->block_hists);
>> + if (release)
>> + hists__delete_entries(&bh->block_hists);
>> +
>> return 0;
>> case 1:
>> symbol_conf.report_individual_block = true;
>> ret = block_hists_tui_browse(bh, evsel, min_percent,
>> env, annotation_opts);
>> - hists__delete_entries(&bh->block_hists);
>> + if (release)
>> + hists__delete_entries(&bh->block_hists);
>> +
>> return ret;
>
> I don't understand this change.. why do you relase it in here?
> there's release call in block_info__free_report you just added...
>
> jirka
>

Yes, I have released the hists entries in block_info__free_report(). I
don't need to keep the release code here. Thanks so much for pointing
this out.

Thanks
Jin Yao

\
 
 \ /
  Last update: 2020-01-20 15:51    [W:0.067 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site