Re: [PATCH 05/21] perf hists: Accumulate hist entry stat based on the callchain

From: Namhyung Kim
Date: Mon Jan 06 2014 - 03:18:42 EST


On Sun, 5 Jan 2014 18:15:28 +0100, Jiri Olsa wrote:
> On Sun, Jan 05, 2014 at 05:58:31PM +0100, Jiri Olsa wrote:
>> On Tue, Dec 24, 2013 at 05:22:11PM +0900, Namhyung Kim wrote:
>> > + /*
>> > + * This is for putting parents upward during output resort iff
>> > + * only a child gets sampled. See hist_entry__sort_on_period().
>> > + */
>> > + he->callchain->max_depth = PERF_MAX_STACK_DEPTH + 1;
>>
>> so you're using callchain struct to hold the entry's stack
>> position for sorting.. I think we could store this info
>> inside hist_entry itself, and omit 'struct callchain_root'
>> size being allocated for hist_entry

I know it's hacky - it's to keep the sorting properly orderes entries
without callchain support Arun requested. And I think I can add the
callchain support in the next version so it should be cleaned up too.

>>
>> I checked 'struct hist_entry' and the 'position' entry seems to
>> be abandonned ;-)) or we could use some unused entry (mem_info?)
>> and create some union.

Yes, I also have a plan to cleanup/diet the struct hist_entry. :)

>
> also perhaps above 5 lines should be part of the later commit:
> perf hists: Sort hist entries by accumulated period

As I said it'll be changed in the next version.

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