All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf_counter: Fix throttle/unthrottle event logging
@ 2009-07-22 13:05 Anton Blanchard
  2009-07-22 13:15 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2009-07-22 13:05 UTC (permalink / raw)
  To: a.p.zijlstra, mingo, paulus, fweisbec; +Cc: linux-kernel


Right now we only print PERF_EVENT_THROTTLE + 1 (ie PERF_EVENT_UNTHROTTLE).
Fix this to print both a throttle and unthrottle event.

Signed-off-by: Anton Blanchard <anton@samba.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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-22 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-22 13:05 [PATCH] perf_counter: Fix throttle/unthrottle event logging Anton Blanchard
2009-07-22 13:15 ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.