[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130523091740.GA3064@ghostprotocols.net>
Date: Thu, 23 May 2013 11:17:40 +0200
From: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 01/14] perf diff: Use internal rb tree for
hists__precompute
Em Thu, Dec 13, 2012 at 02:08:59PM +0100, Jiri Olsa escreveu:
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> while (next != NULL) {
> - struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node);
> - struct hist_entry *pair = hist_entry__next_pair(he);
> + struct hist_entry *he, *pair;
>
> - next = rb_next(&he->rb_node);
> + he = rb_entry(next, struct hist_entry, rb_node_in);
> + pair = hist_entry__next_pair(he);
> +
> + next = rb_next(&he->rb_node_in);
To ease review please try to make the patch as minimal as possible, i.e.
the above could be done as:
- struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node);
+ struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in);
struct hist_entry *pair = hist_entry__next_pair(he);
- next = rb_next(&he->rb_node);
+ next = rb_next(&he->rb_node_in);
See how we can more quickly see what happened? I.e. just replacing
'rb_node' with 'rb_node_in' :-)
- Arnaldo
--
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