lkml.org 
[lkml]   [2014]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/21] perf, c2c: Add rbtree sorted on mmap2 data
On Fri, Feb 21, 2014 at 05:59:28PM +0100, Jiri Olsa wrote:
> On Thu, Feb 20, 2014 at 09:45:53PM -0500, Don Zickus wrote:
> > On Tue, Feb 18, 2014 at 02:04:05PM +0100, Jiri Olsa wrote:
> > > On Mon, Feb 10, 2014 at 12:29:04PM -0500, Don Zickus wrote:
>
> SNIP
>
> > > > +
> > > > + if (l > r) return 1;
> > > > + if (l < r) return -1;
> > > > +
> > > > + /* sorting by iaddr makes calculations easier later */
> > > > + if (left->mi->iaddr.al_addr > right->mi->iaddr.al_addr) return 1;
> > > > + if (left->mi->iaddr.al_addr < right->mi->iaddr.al_addr) return -1;
> > > > + }
> > > > +
> > > > + return 0;
> > > > +}
> > >
> > > there's sort object doing exatly this over hist_entry's
> > >
> > > Is there any reason not to use hist_entries?
> >
> > So looking over hist_entry, I realize, what do I gain? I implemented it
> > and realized I had to add, 'cpumode', 'tid' and a 'private' field to
> > struct hist_entry. Then because I have my own report implementation, I
> > still have to copy and paste a ton of stuff from builtin-report over to
> > here (including callchain support).
>
> you mean new sort_entry objects?
>
> >
> > Not unless you are expecting me to add giant chunks of code to
> > builtin-report.c?
>
> it can be separated object, implementing new report iterator
>
> I think that we should go on with existing sort code we have..
> but I understand you might need some special usage.. i'll dive
> in and try to find some answer ;-)

Do things fall apart if I do not use evsel->hists to store the hist_entry
tree? I need to combine two events (store and load) on to the same tree.

Cheers,
Don


\
 
 \ /
  Last update: 2014-02-26 05:01    [W:0.068 / U:3.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site