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 ;-)

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to