All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf_event: initialize data.period in perf_swevent_hrtimer()
Date: Tue, 01 Dec 2009 10:37:05 +0100	[thread overview]
Message-ID: <1259660225.26472.594.camel@laptop> (raw)
In-Reply-To: <4B14E220.2050107@cn.fujitsu.com>

On Tue, 2009-12-01 at 17:30 +0800, Xiao Guangrong wrote:
> In current code in perf_swevent_hrtimer(), data.period is not initialized,

Ah, very nice catch.

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> ---
>  kernel/perf_event.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index 0b9ca2d..040ee51 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -4010,6 +4010,7 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer)
>  	event->pmu->read(event);
>  
>  	data.addr = 0;
> +	data.period = event->hw.last_period;
>  	regs = get_irq_regs();
>  	/*
>  	 * In case we exclude kernel IPs or are somehow not in interrupt



  reply	other threads:[~2009-12-01  9:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01  9:30 [PATCH] perf_event: initialize data.period in perf_swevent_hrtimer() Xiao Guangrong
2009-12-01  9:37 ` Peter Zijlstra [this message]
2009-12-01 10:21 ` [tip:perf/core] perf_event: Initialize " tip-bot for Xiao Guangrong

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=1259660225.26472.594.camel@laptop \
    --to=peterz@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=xiaoguangrong@cn.fujitsu.com \
    /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 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.