From: Chris Ferron <chris.e.ferron at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 1/2] perf: Pass 0 as a third argument to ioctl on perf_fd
Date: Mon, 17 Sep 2012 08:21:02 -0700 [thread overview]
Message-ID: <50573FDE.5090503@linux.intel.com> (raw)
In-Reply-To: 1347805051-2889-1-git-send-email-namhyung@gmail.com
[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]
On 09/16/2012 07:17 AM, Namhyung Kim wrote:
> The third argument of PERF_EVENT_IOC_{ENABLE,DISABLE} ioctl is a flag
> to determine whether the command should be applied to group members.
> Since the powertop doesn't use the event grouping feature, it'd better
> passing 0 as a third argument explicitly.
>
> Signed-off-by: Namhyung Kim <namhyung(a)gmail.com>
> ---
> src/perf/perf.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/perf/perf.cpp b/src/perf/perf.cpp
> index 69f1da3..c8ba7a8 100644
> --- a/src/perf/perf.cpp
> +++ b/src/perf/perf.cpp
> @@ -128,7 +128,7 @@ void perf_event::create_perf_event(char *eventname, int _cpu)
> return;
> }
>
> - ret = ioctl(perf_fd, PERF_EVENT_IOC_ENABLE);
> + ret = ioctl(perf_fd, PERF_EVENT_IOC_ENABLE, 0);
>
> if (ret < 0) {
> fprintf(stderr, "failed to enable perf \n");
> @@ -210,7 +210,7 @@ void perf_event::start(void)
> void perf_event::stop(void)
> {
> int ret;
> - ret = ioctl(perf_fd, PERF_EVENT_IOC_DISABLE);
> + ret = ioctl(perf_fd, PERF_EVENT_IOC_DISABLE, 0);
> if (ret)
> cout << "stop failing\n";
> }
Your patch as been merged.
Thank You
-C
next reply other threads:[~2012-09-17 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 15:21 Chris Ferron [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-16 23:17 [Powertop] [PATCH 1/2] perf: Pass 0 as a third argument to ioctl on perf_fd Sergey Senozhatsky
2012-09-16 14:17 Namhyung Kim
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=50573FDE.5090503@linux.intel.com \
--to=powertop@lists.01.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 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.