mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: eranian@gmail.com
Cc: Peter Zijlstra <peterz@infradead.org>,
	perfmon2-devel@lists.sf.net, linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>,
	paulus@samba.org, mingo@elte.hu, davem@davemloft.net
Subject: Re: [perfmon2] [PATCH] perf: fix the is_software_event() definition
Date: Mon, 18 Jan 2010 14:06:30 +0100	[thread overview]
Message-ID: <c62985531001180506g381ca34dmd5ad8cddc44f8d8@mail.gmail.com> (raw)
In-Reply-To: <7c86c4471001180457ue8738a5r25d717c939c6588c@mail.gmail.com>

2010/1/18 stephane eranian <eranian@googlemail.com>:
> On Mon, Jan 18, 2010 at 1:07 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote:
>> On Mon, Jan 18, 2010 at 12:53:36PM +0100, Peter Zijlstra wrote:
>>> On Mon, 2010-01-18 at 12:13 +0100, Peter Zijlstra wrote:
>>> > On Sun, 2010-01-17 at 15:12 +0100, Frederic Weisbecker wrote:
>>> >
>>> > > You need to also call pmu->disable() if it is a software event,
>>> > > because a breakpoint needs to be unregistered in hardware level
>>> > > too.
>>> >
>>> > breakpoint isn't a software pmu. But yeah, enable and disable need to
>>> > match.
>>>
>>> That is, it shouldn't be a software pmu, because we assume software
>>> events can always be scheduled, whereas that's definitely not so for the
>>> breakpoint one.
>>>
>>> Which seems to suggest the following
>>>
>>> ---
>>> Subject: perf: fix the is_software_event() definition
>>>
>>> When adding the breakpoint pmu Frederic forgot to exclude it from being
>>> a software event. While we're at it, make it an inclusive expression.
>>>
>>> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>>
>>
>>
>> Agreed.
>>
>> But then Stephane will need to update his patch and use
>> something else than is_software_event() to guess if an event
>> needs its pmu->enable/disable to be called.
>>
>> A kind of helper that can tell: I am not handled by
>> hw_perf_group_sched_in()
>>
> Then, we should use something that checks if the event
> is handled by the X86 PMU layer:
>
> int is_x86_hw_event(struct perf_event *event)
> {
>   return event->pmu == x86_pmu;
> }
>

Yeah. I missed this patch from Peter in its answer. Looks good.

  reply	other threads:[~2010-01-18 13:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 10:50 [PATCH] perf_events: improve x86 event scheduling Stephane Eranian
2010-01-12 16:10 ` Peter Zijlstra
2010-01-13  9:54   ` Stephane Eranian
2010-01-13 16:29     ` Peter Zijlstra
2010-01-13 16:52       ` Stephane Eranian
2010-01-13 17:22         ` Stephane Eranian
2010-01-17 14:12           ` Frederic Weisbecker
2010-01-17 14:42             ` Stephane Eranian
2010-01-17 16:19               ` Frederic Weisbecker
2010-01-17 21:53                 ` Stephane Eranian
2010-01-18 11:13             ` Peter Zijlstra
2010-01-18 11:53               ` [PATCH] perf: fix the is_software_event() definition Peter Zijlstra
2010-01-18 12:07                 ` Frederic Weisbecker
2010-01-18 12:19                   ` Peter Zijlstra
2010-01-18 13:46                     ` [perfmon2] " stephane eranian
2010-01-18 12:57                   ` stephane eranian
2010-01-18 13:06                     ` Frederic Weisbecker [this message]
2010-01-18 12:53                 ` stephane eranian
2010-01-18 13:00                   ` Peter Zijlstra

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=c62985531001180506g381ca34dmd5ad8cddc44f8d8@mail.gmail.com \
    --to=fweisbec@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sf.net \
    --cc=peterz@infradead.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®