lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ