Messages in this thread | | | Date | Mon, 20 Jan 2020 10:47:37 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH v4 3/4] perf util: Flexible to set block info output formats |
| |
On Thu, Jan 16, 2020 at 03:29:03AM +0800, Jin Yao wrote:
SNIP
> + block_hpps, nr_hpps); > > - perf_hpp_list__register_sort_field(&bh->block_list, > - &block_fmts[PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_PCT].fmt); > + /* Sort by the first fmt */ > + perf_hpp_list__register_sort_field(&bh->block_list, &block_fmts[0].fmt); > } > > -static void process_block_report(struct hists *hists, > - struct block_report *block_report, > - u64 total_cycles) > +static int process_block_report(struct hists *hists, > + struct block_report *block_report, > + u64 total_cycles, int *block_hpps, > + int nr_hpps) > { > struct rb_node *next = rb_first_cached(&hists->entries); > struct block_hist *bh = &block_report->hist; > struct hist_entry *he; > > - init_block_hist(bh, block_report->fmts); > + if (nr_hpps > PERF_HPP_REPORT__BLOCK_MAX_INDEX)
hum, should be '>=' above.. ?
jirka
| |