From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org,
Anton Blanchard <anton@au1.ibm.com>,
Maynard Johnson <mpjohn@us.ibm.com>
Subject: Re: [PATCH] perf/Power: PERF_EVENT_IOC_ENABLE does not reenable event
Date: Thu, 24 Jan 2013 15:29:07 -0800 [thread overview]
Message-ID: <20130124232907.GA12233@us.ibm.com> (raw)
In-Reply-To: <20130124050505.GA14070@drongo>
Paul Mackerras [paulus@samba.org] wrote:
| > + /*
| > + * If this event was disabled in record_and_restart() because we
| > + * exceeded the ->event_limit, this is probably a good time to
| > + * re-enable the event ? If we don't reenable the event, we will
| > + * never notify the user again about this event.
| > + */
|
| The comment seems a bit tentative. :) If the PERF_EF_START bit is set
| then we are being told to restart the event.
|
| > if (!(ef_flags & PERF_EF_START))
| > event->hw.state = PERF_HES_STOPPED | PERF_HES_UPTODATE;
| > + else
| > + event->hw.state &= ~PERF_HES_STOPPED;
|
| This looks fine, though I think you could equally well just set
| event->hw.state to 0 in the else clause. That would clear the
| UPTODATE flag too, which is appropriate since we are about to put the
| event on a hardware counter.
Agree. I submitted a new patch with better comments and patch description
and cleared the state to 0.
Thanks for the review.
Sukadev
prev parent reply other threads:[~2013-01-24 23:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 19:11 [PATCH] perf/Power: PERF_EVENT_IOC_ENABLE does not reenable event Sukadev Bhattiprolu
2013-01-24 5:05 ` Paul Mackerras
2013-01-24 23:29 ` Sukadev Bhattiprolu [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=20130124232907.GA12233@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=anton@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpjohn@us.ibm.com \
--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;
as well as URLs for NNTP newsgroup(s).