Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-12 Thread Jin, Yao
On 6/12/2019 3:44 PM, Jiri Olsa wrote: On Wed, Jun 12, 2019 at 02:11:44PM +0800, Jin, Yao wrote: On 6/11/2019 4:56 PM, Jiri Olsa wrote: On Sat, Jun 08, 2019 at 07:41:47PM +0800, Jin, Yao wrote: On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-12 Thread Jiri Olsa
On Wed, Jun 12, 2019 at 02:11:44PM +0800, Jin, Yao wrote: > > > On 6/11/2019 4:56 PM, Jiri Olsa wrote: > > On Sat, Jun 08, 2019 at 07:41:47PM +0800, Jin, Yao wrote: > > > > > > > > > On 6/5/2019 7:44 PM, Jiri Olsa wrote: > > > > On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: > > > >

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-12 Thread Jin, Yao
On 6/11/2019 4:56 PM, Jiri Olsa wrote: On Sat, Jun 08, 2019 at 07:41:47PM +0800, Jin, Yao wrote: On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 43623fa..d1641da

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-11 Thread Jiri Olsa
On Sat, Jun 08, 2019 at 07:41:47PM +0800, Jin, Yao wrote: > > > On 6/5/2019 7:44 PM, Jiri Olsa wrote: > > On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: > > > > SNIP > > > > > diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h > > > index 43623fa..d1641da 100644 > > > ---

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-10 Thread Jin, Yao
On 6/8/2019 7:41 PM, Jin, Yao wrote: On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 43623fa..d1641da 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-08 Thread Jin, Yao
On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 43623fa..d1641da 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -79,6 +79,9 @@ struct hist_entry_diff

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-05 Thread Jin, Yao
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

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-05 Thread Jin, Yao
On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP sort_compute); } +static int64_t +hist_entry__cmp_cycles_idx(struct perf_hpp_fmt *fmt __maybe_unused, + struct

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-05 Thread Jin, Yao
On 6/5/2019 7:44 PM, Jiri Olsa wrote: On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 43623fa..d1641da 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -79,6 +79,9 @@ struct hist_entry_diff

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-05 Thread Jiri Olsa
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) >

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-05 Thread Jiri Olsa
On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP > sort_compute); > } > > +static int64_t > +hist_entry__cmp_cycles_idx(struct perf_hpp_fmt *fmt __maybe_unused, > +struct hist_entry *left __maybe_unused, > +

Re: [PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-05 Thread Jiri Olsa
On Mon, Jun 03, 2019 at 10:36:14PM +0800, Jin Yao wrote: SNIP > diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h > index 43623fa..d1641da 100644 > --- a/tools/perf/util/sort.h > +++ b/tools/perf/util/sort.h > @@ -79,6 +79,9 @@ struct hist_entry_diff { > > /*

[PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-03 Thread Jin Yao
The hist__account_cycles() can account cycles per basic block. The basic block information is saved in cycles_hist structure. This patch processes each symbol, get basic blocks from cycles_hist and add the basic block entries to a new hists (block_hists in hist_entry). Using a hists is because we