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: <1248268533.27058.1421.camel@twins>
Date:	Wed, 22 Jul 2009 15:15:33 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Anton Blanchard <anton@...ba.org>
Cc:	mingo@...e.hu, paulus@...ba.org, fweisbec@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf_counter: Fix throttle/unthrottle event logging

On Wed, 2009-07-22 at 23:05 +1000, Anton Blanchard wrote:
> Right now we only print PERF_EVENT_THROTTLE + 1 (ie PERF_EVENT_UNTHROTTLE).
> Fix this to print both a throttle and unthrottle event.

oops, that was supposed to read: PERF_EVEN_THROTTLE + enable, but yeah,
the below works too. Thanks!

> Signed-off-by: Anton Blanchard <anton@...ba.org>
> ---
> 
> Index: linux.trees.git/kernel/perf_counter.c
> ===================================================================
> --- linux.trees.git.orig/kernel/perf_counter.c	2009-07-22 22:43:36.000000000 +1000
> +++ linux.trees.git/kernel/perf_counter.c	2009-07-22 22:55:10.000000000 +1000
> @@ -3195,7 +3195,7 @@ static void perf_log_throttle(struct per
>  		u64				stream_id;
>  	} throttle_event = {
>  		.header = {
> -			.type = PERF_EVENT_THROTTLE + 1,
> +			.type = PERF_EVENT_THROTTLE,
>  			.misc = 0,
>  			.size = sizeof(throttle_event),
>  		},
> @@ -3204,6 +3204,9 @@ static void perf_log_throttle(struct per
>  		.stream_id	= counter->id,
>  	};
>  
> +	if (enable)
> +		throttle_event.header.type = PERF_EVENT_UNTHROTTLE;
> +
>  	ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0);
>  	if (ret)
>  		return;

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