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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1296193033.10144.98.camel@gandalf.stny.rr.com>
Date:	Fri, 28 Jan 2011 00:37:13 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	linux-kernel@...r.kernel.org
Cc:	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Tom Zanussi <tzanussi@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [RFC][PATCH 08/12] tracing/filter: Optimize short ciruit check

On Thu, 2011-01-27 at 23:21 -0500, Steven Rostedt wrote:

> diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
> index 2677924..afe59ab 100644
> --- a/kernel/trace/trace_events_filter.c
> +++ b/kernel/trace/trace_events_filter.c
> @@ -426,9 +426,15 @@ int filter_match_preds(struct event_filter *filter, void *rec)
>  					       pred->parent, &move);
>  			continue;
>  		case MOVE_UP_FROM_LEFT:
> -			/* Check for short circuits */
> -			if ((match && pred->op == OP_OR) ||
> -			    (!match && pred->op == OP_AND)) {
> +			/*
> +			 * Check for short circuits.
> +			 *
> +			 * Optimization: !!match == (pred->op == OP_OR)
> +			 *   is the same as:
> +			 * if ((match && pred->op == OP_OR) ||
> +			 *     (!match && pred->op == OP_AND))
> +			 */
> +			if (!!match == (pred->op == OP_OR))

+                                                             {

Bah! I tested these in quilt and when I pulled them into git, I must
have accidentally deleted the '{' in the patch :-p

Thanks goodness this was only a RFC ;)

/me goes to rebase

-- Steve

>  				if (pred == root)
>  					break;
>  				pred = get_pred_parent(pred, preds,


--
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