[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150104181640.GB29388@krava.brq.redhat.com>
Date: Sun, 4 Jan 2015 19:16:40 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 4/5] perf diff: Fix output ordering to honor next column
On Sat, Dec 27, 2014 at 02:06:32PM +0900, Namhyung Kim wrote:
SNIP
> if (!pairs_left || !pairs_right)
> return pairs_left ? -1 : 1;
>
> - p_left = get_pair_data(left, &data__files[sort_compute]);
> - p_right = get_pair_data(right, &data__files[sort_compute]);
> + p_left = get_pair_data(left, &data__files[sort_idx]);
> + p_right = get_pair_data(right, &data__files[sort_idx]);
>
> if (!p_left && !p_right)
> return 0;
> @@ -555,8 +560,13 @@ hist_entry__cmp_nop(struct hist_entry *left __maybe_unused,
> static int64_t
> hist_entry__cmp_baseline(struct hist_entry *left, struct hist_entry *right)
> {
> - if (sort_compute)
> - return 0;
> + /*
> + * This function will be called first for each entry to resort
> + * output. Next compare-functions use this idx to find their
> + * data and increase it for next data so we need to initialize
> + * it everytime.
> + */
> + data_idx = 0;
hum, could we omit the global 'data_idx' variable usage by passing
'struct perf_hpp_fmt' into color fmt callbacks? (like hist_entry__cmp_delta..)
we could get the data_idx from 'struct diff_hpp_fmt'::idx
jirka
--
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