Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jin, Yao
On 10/22/2019 12:08 AM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP + cycles += bi->cycles_aggr / bi->num_aggr; + + he_block = hists__add_entry_block(>block_hists, +

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jin, Yao
On 10/22/2019 12:07 AM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -51,6 +51,7 @@ #include "util/util.h" // perf_tip() #include "ui/ui.h" #include "ui/progress.h" +#include

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jiri Olsa
On Mon, Oct 21, 2019 at 04:04:39PM +0200, Jiri Olsa wrote: > On Mon, Oct 21, 2019 at 02:56:57PM +0800, Jin, Yao wrote: > > SNIP > > > > > Does it seem like what the c2c does? > > > > > > well c2c has its own data output with multiline column titles, > > > hence it has its own separate dimension

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jiri Olsa
On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP > --- a/tools/perf/builtin-report.c > +++ b/tools/perf/builtin-report.c > @@ -51,6 +51,7 @@ > #include "util/util.h" // perf_tip() > #include "ui/ui.h" > #include "ui/progress.h" > +#include "util/block.h" > > #include >

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jiri Olsa
On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP > + cycles += bi->cycles_aggr / bi->num_aggr; > + > + he_block = hists__add_entry_block(>block_hists, > + , bi); > + if

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jiri Olsa
On Mon, Oct 21, 2019 at 02:56:57PM +0800, Jin, Yao wrote: SNIP > > > Does it seem like what the c2c does? > > > > well c2c has its own data output with multiline column titles, > > hence it has its own separate dimension stuff, but your code > > output is within the standard perf report right?

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-21 Thread Jin, Yao
On 10/16/2019 8:53 PM, Jiri Olsa wrote: On Wed, Oct 16, 2019 at 06:51:07PM +0800, Jin, Yao wrote: On 10/16/2019 6:15 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP +static struct block_header_column{ + const char *name; + int width; +}

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-16 Thread Jin, Yao
On 10/16/2019 8:53 PM, Jiri Olsa wrote: On Wed, Oct 16, 2019 at 06:51:07PM +0800, Jin, Yao wrote: On 10/16/2019 6:15 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP +static struct block_header_column{ + const char *name; + int width; +}

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-16 Thread Jiri Olsa
On Wed, Oct 16, 2019 at 06:51:07PM +0800, Jin, Yao wrote: > > > On 10/16/2019 6:15 PM, Jiri Olsa wrote: > > On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: > > > > SNIP > > > > > > > +static struct block_header_column{ > > > > > + const char *name; > > > > > + int width; > >

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-16 Thread Jin, Yao
On 10/16/2019 6:15 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP +static struct block_header_column{ + const char *name; + int width; +} block_columns[PERF_HPP_REPORT__BLOCK_MAX_INDEX] = { + [PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_COV] =

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-16 Thread Jiri Olsa
On Tue, Oct 15, 2019 at 10:53:18PM +0800, Jin, Yao wrote: SNIP > > > +static struct block_header_column{ > > > + const char *name; > > > + int width; > > > +} block_columns[PERF_HPP_REPORT__BLOCK_MAX_INDEX] = { > > > + [PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_COV] = { > > > + .name =

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-15 Thread Jin, Yao
On 10/15/2019 4:41 PM, Jiri Olsa wrote: On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP +enum { + PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_COV, + PERF_HPP_REPORT__BLOCK_LBR_CYCLES, + PERF_HPP_REPORT__BLOCK_CYCLES_PCT, + PERF_HPP_REPORT__BLOCK_AVG_CYCLES, +

Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio

2019-10-15 Thread Jiri Olsa
On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote: SNIP > +enum { > + PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_COV, > + PERF_HPP_REPORT__BLOCK_LBR_CYCLES, > + PERF_HPP_REPORT__BLOCK_CYCLES_PCT, > + PERF_HPP_REPORT__BLOCK_AVG_CYCLES, > + PERF_HPP_REPORT__BLOCK_RANGE, > +