public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Francis Moreau <francis.moro@gmail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Franck Bui-Huu <vagabon.xyz@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: How about limiting refresh ioctl to sampling events ?
Date: Wed, 24 Nov 2010 11:19:08 +0100	[thread overview]
Message-ID: <m21v6bdnxf.fsf@gmail.com> (raw)
In-Reply-To: <1290519980.2072.404.camel@laptop> (Peter Zijlstra's message of "Tue, 23 Nov 2010 14:46:20 +0100")

Peter Zijlstra <a.p.zijlstra@chello.nl> writes:

[...]

>> I'm also wondering if you would accept a second patch which will
>> introduce:
>> 
>> static inline bool is_sampling_event(struct perf_event *event)
>> {
>>         return event->attr.sample_period != 0;
>> }
>> 
>> That would make the code slighlty easier to read IMHO.
>> 
>
> Sure, Francis might want that too, he found another something like this.

Yes there's another issue when counting events are used: they call
perf_event_output() when 'period_left' gets 0 where as they should not.

-- 
Francis

      reply	other threads:[~2010-11-24 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 13:01 How about limiting refresh ioctl to sampling events ? Franck Bui-Huu
2010-11-23 13:07 ` Peter Zijlstra
2010-11-23 13:19   ` Franck Bui-Huu
2010-11-23 13:46     ` Peter Zijlstra
2010-11-24 10:19       ` Francis Moreau [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=m21v6bdnxf.fsf@gmail.com \
    --to=francis.moro@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vagabon.xyz@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox