lkml.org 
[lkml]   [2012]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] perf: Add a new sort order: SORT_INCLUSIVE

* Arun Sharma <asharma@fb.com> wrote:

> @@ -71,8 +71,12 @@ static int perf_evsel__add_hist_entry(struct perf_evsel *evsel,
> }
>
> cursor = &evsel->hists.callchain_cursor;
> - he = __hists__add_entry_single(&evsel->hists, al, parent,
> - cursor, sample->period);
> + if (sort__first_dimension == SORT_INCLUSIVE)
> + he = __hists__add_entry_inclusive(&evsel->hists, al, parent,
> + cursor, sample->period);
> + else
> + he = __hists__add_entry_single(&evsel->hists, al, parent,
> + cursor, sample->period);

If sort__first_dimension is available to hist.c then I think
there should still be a simple __hists__add_entry() function in
hist.c, which perf_evsel__add_hist_entry() calls - which then
calls the static inline __hists__add_entry_inclusive() and
__hists__add_entry_single() functions within hist.c.

I.e. this refactoring and splitup of the function into two parts
is not a detail that should matter to builtin-report.c's
perf_evsel__add_hist_entry().

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-03-08 08:25    [from the cache]
©2003-2011 Jasper Spaans