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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 17 Oct 2010 11:52:39 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Jason Baron <jbaron@...hat.com>, linux-kernel@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	Mike Galbraith <efault@....de>
Subject: Re: [RFC][PATCH 6/7] perf: use jump_label to optimize the
 scheduler hooks

On Thu, 2010-10-14 at 22:34 +0200, Peter Zijlstra wrote:
> +static inline void perf_event_task_sched_in(struct task_struct *task)
> +{
> +       JUMP_LABEL(&perf_task_events, have_events);
> +       return;
> +
> +have_events:
> +       __perf_event_task_sched_in(task);
> +} 

OK, so I hate the JUMP_LABEL() interface for it means we have to keep
writing these silly stubs.

How about something like:

#define COND_STMT(key, stmt)					\
do {								\
	__label__ jl_enabled;					\
	JUMP_LABEL(key, jl_enabled);				\
	if (0) {						\
jl_enabled:							\
		stmt;						\
	}							\
} while (0)


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