[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mww9mqlt.fsf@sejong.aot.lge.com>
Date: Wed, 16 Jan 2013 18:20:14 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>,
Stephane Eranian <eranian@...gle.com>,
Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH 05/13] perf hists: Resort hist entries using group members for output
Hi Arnaldo,
On Tue, 15 Jan 2013 15:29:15 -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 15, 2013 at 04:31:49PM +0900, Namhyung Kim escreveu:
>> From: Namhyung Kim <namhyung.kim@....com>
>>
>> When event group is enabled, sorting hist entries on periods for output
>> should consider groups members' period also. To do that, build period
>> table using link/pair information and compare the table.
[snip]
>> +static int hist_entry__sort_on_period(struct hist_entry *a,
>> + struct hist_entry *b)
>> +{
>> + int ret;
>> + int i, nr_members;
>> + struct perf_evsel *evsel;
>> + struct hist_entry *pair;
>> + u64 *periods_a, *periods_b;
>> +
>> + ret = period_cmp(a->stat.period, b->stat.period);
>> + if (ret || !symbol_conf.event_group)
>
> Why do we need to call period_cmp() when symbol_conf.event_group is
> false?
>
> I see, confusing neverthless :-\
In this function @a and @b are entries of group leaders and should be
compared first - other group members are compared only if periods of
leader entries are same.
For non-group events or when event group view is disabled, this function
will be called for every events as if they're leaders.
>
>> + return ret;
>
> I would expect two functions, one for sorting on period and another for
> not sorting on period, i.e. don't call a function called
> 'sort_on_period' when _not_ sorting on period.
Sorry, I can't understand.
This 'sort_on_period' function is called during the (final) output
resorting and it's unconditional. IOW hist entries should be sorted by
their period to be shown accordingly in the output.
Am I missing something?
Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists