From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Anton Blanchard <anton@samba.org>
Cc: mingo@elte.hu, paulus@samba.org, fweisbec@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf_counter: Fix throttle/unthrottle event logging
Date: Wed, 22 Jul 2009 15:15:33 +0200 [thread overview]
Message-ID: <1248268533.27058.1421.camel@twins> (raw)
In-Reply-To: <20090722130546.GE9029@kryten>
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@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;
prev parent reply other threads:[~2009-07-22 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 13:05 Anton Blanchard
2009-07-22 13:15 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248268533.27058.1421.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=anton@samba.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®