Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1351601

Re: [PATCH v2 2/8] perf tools: Introduce perf_hpp__setup_hists_formats()

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/8] perf tools: Introduce perf_hpp__setup_hists_formats()
Date 2016-03-07 14:20 +0100
Message-ID <ra3eP-3jo-11@gated-at.bofh.it> (permalink)
References <r8ZwB-8vJ-11@gated-at.bofh.it> <r8ZwD-8vJ-51@gated-at.bofh.it> <r9LUC-oi-11@gated-at.bofh.it> <ra358-3fU-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Mar 07, 2016 at 09:59:34PM +0900, Namhyung Kim wrote:
> On Sun, Mar 06, 2016 at 07:43:25PM +0100, Jiri Olsa wrote:
> > On Fri, Mar 04, 2016 at 11:59:36PM +0900, Namhyung Kim wrote:
> > 
> > SNIP
> > 
> > >  
> > > @@ -2133,8 +2134,19 @@ static void hists__delete_all_entries(struct hists *hists)
> > >  static void hists_evsel__exit(struct perf_evsel *evsel)
> > >  {
> > >  	struct hists *hists = evsel__hists(evsel);
> > > +	struct perf_hpp_fmt *fmt, *pos;
> > > +	struct perf_hpp_list_node *node;
> > >  
> > >  	hists__delete_all_entries(hists);
> > > +
> > > +	list_for_each_entry(node, &hists->hpp_formats, list) {
> > > +		perf_hpp_list__for_each_format_safe(&node->hpp, fmt, pos) {
> > > +			list_del(&fmt->list);
> > > +			free(fmt);
> > > +		}
> > > +		list_del(&node->list);
> > > +		free(node);
> > > +	}
> > >  }
> > >  
> > >  static int hists_evsel__init(struct perf_evsel *evsel)
> > > diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
> > > index f4ef513527ba..3cab9dc20822 100644
> > > --- a/tools/perf/util/hist.h
> > > +++ b/tools/perf/util/hist.h
> > > @@ -78,6 +78,7 @@ struct hists {
> > >  	u16			col_len[HISTC_NR_COLS];
> > >  	int			socket_filter;
> > >  	struct perf_hpp_list	*hpp_list;
> > > +	struct list_head	hpp_formats;
> > 
> > I've been thinking.. should hpp_formats and hpp_list be merged? something like:
> > 
> > struct perf_hpp_list {
> > 	struct list_head nodes;
> > 	int levels;
> > }
> > 
> > sturct perf_hpp_list_node {
> > 	int level;
> > 	struct list_head fields;
> > 	struct list_head sorts;
> > 	int nr_sort_keys;
> > };
> > 
> > it seems wrong to me that your hierarchy code and current one
> > got in separate paths.. we could have the new hierarchy support
> > struct above being used in current non-hierarchy code just
> > by using single level
> > 
> > I haven't thought all this through.. just an idea ;-)
> 
> Yes, I also think that we need to converge on the same data structure
> eventually.  But I think it's too intrusive to be merged at once.
> Also keeping up with the latest perf changes is a PITA.  ;-)

heh, amen ;-)

> 
> So I decided to use it on the hierarchy first, and get tested in the
> wild for some time.  After that we can convert the non-hierarchy code
> to use same path and data structure gradually IMHO.

ok, let's keep it in mind at least..

thanks.
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHSET 0/8] perf tools: Support multiple keys in a single hierarchy level (v2) Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
  [PATCH v2 1/8] perf tools: Add level field to struct perf_hpp_fmt Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
    [tip:perf/core] perf hists: Add level field to struct perf_hpp_fmt tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-03-08 11:40 +0100
  [PATCH v2 7/8] perf hists browser: Use hierarchy hpp list Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
  [PATCH v2 5/8] perf tools: Fix indent for multiple hierarchy sort key Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
  [PATCH v2 2/8] perf tools: Introduce perf_hpp__setup_hists_formats() Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
    Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-04 23:00 +0100
      Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-04 23:00 +0100
        Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Namhyung Kim <namhyung@kernel.org> - 2016-03-07 13:50 +0100
      Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Namhyung Kim <namhyung@kernel.org> - 2016-03-07 15:00 +0100
    Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Jiri Olsa <jolsa@redhat.com> - 2016-03-06 19:50 +0100
      Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Namhyung Kim <namhyung@kernel.org> - 2016-03-07 14:10 +0100
        Re: [PATCH v2 2/8] perf tools: Introduce  perf_hpp__setup_hists_formats() Jiri Olsa <jolsa@redhat.com> - 2016-03-07 14:20 +0100
  [PATCH v2 8/8] perf report: Use hierarchy hpp list on gtk Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
  [PATCH v2 4/8] perf tools: Support multiple sort keys in a hierarchy level Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
    Re: [PATCH v2 4/8] perf tools: Support multiple sort keys in a  hierarchy level Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-04 22:50 +0100
      Re: [PATCH v2 4/8] perf tools: Support multiple sort keys in a  hierarchy level Namhyung Kim <namhyung@kernel.org> - 2016-03-07 13:50 +0100

csiph-web