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

2019-10-23 Thread Jin, Yao
On 10/23/2019 10:27 PM, Jiri Olsa wrote: On Wed, Oct 23, 2019 at 09:09:34PM +0800, Jin, Yao wrote: On 10/23/2019 7:36 PM, Jiri Olsa wrote: On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index cdb436d6e

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

2019-10-23 Thread Jiri Olsa
On Wed, Oct 23, 2019 at 09:09:34PM +0800, Jin, Yao wrote: > > > On 10/23/2019 7:36 PM, Jiri Olsa wrote: > > On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: > > > > SNIP > > > > > diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c > > > index cdb436d6e11f..44aed40e90

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

2019-10-23 Thread Jin, Yao
On 10/23/2019 7:36 PM, Jiri Olsa wrote: On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index cdb436d6e11f..44aed40e9071 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -51,6 +

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

2019-10-23 Thread Jin, Yao
On 10/23/2019 7:36 PM, Jiri Olsa wrote: On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 43d1d410854a..eb286700a8a9 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -492,6 +492,10 @@ struct so

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

2019-10-23 Thread Jin, Yao
On 10/23/2019 7:36 PM, Jiri Olsa wrote: On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP +static void get_block_hists(struct hists *hists, struct block_hist *bh, + struct report *rep) +{ + struct rb_node *next = rb_first_cached(&hists->entries);

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

2019-10-23 Thread Jiri Olsa
On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c > index 43d1d410854a..eb286700a8a9 100644 > --- a/tools/perf/util/sort.c > +++ b/tools/perf/util/sort.c > @@ -492,6 +492,10 @@ struct sort_entry sort_sym_ipc_null = { >

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

2019-10-23 Thread Jiri Olsa
On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP > diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c > index cdb436d6e11f..44aed40e9071 100644 > --- a/tools/perf/builtin-report.c > +++ b/tools/perf/builtin-report.c > @@ -51,6 +51,7 @@ > #include "util/util.h" //

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

2019-10-23 Thread Jiri Olsa
On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote: SNIP > +static void get_block_hists(struct hists *hists, struct block_hist *bh, > + struct report *rep) > +{ > + struct rb_node *next = rb_first_cached(&hists->entries); > + struct hist_entry *he; > + > +

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

2019-10-22 Thread Jin Yao
It would be useful to support sorting for all blocks by the sampled cycles percent per block. This is useful to concentrate on the globally hottest blocks. This patch implements a new sort option "total_cycles" which sorts all blocks by 'Sampled Cycles%'. The 'Sampled Cycles%' is the percent: pe