From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP
Date: Thu, 31 May 2012 11:35:54 -0300 [thread overview]
Message-ID: <20120531143554.GD13591@infradead.org> (raw)
In-Reply-To: <1338443506-25009-2-git-send-email-namhyung.kim@lge.com>
Em Thu, May 31, 2012 at 02:51:45PM +0900, Namhyung Kim escreveu:
> The ioctl interface of perf event fd receives 3 arguments
> to control event group behavior but it lacked documentation.
But the argument is not used for ENABLE or DISABLE, so why require it?
- Arnaldo
> Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
> ---
> tools/perf/design.txt | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/design.txt b/tools/perf/design.txt
> index bd0bb1b1279b..67e5d0cace85 100644
> --- a/tools/perf/design.txt
> +++ b/tools/perf/design.txt
> @@ -409,14 +409,15 @@ Counters can be enabled and disabled in two ways: via ioctl and via
> prctl. When a counter is disabled, it doesn't count or generate
> events but does continue to exist and maintain its count value.
>
> -An individual counter or counter group can be enabled with
> +An individual counter can be enabled with
>
> - ioctl(fd, PERF_EVENT_IOC_ENABLE);
> + ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);
>
> or disabled with
>
> - ioctl(fd, PERF_EVENT_IOC_DISABLE);
> + ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
>
> +For a counter group, pass PERF_IOC_FLAG_GROUP as the third argument.
> Enabling or disabling the leader of a group enables or disables the
> whole group; that is, while the group leader is disabled, none of the
> counters in the group will count. Enabling or disabling a member of a
> --
> 1.7.10.2
next prev parent reply other threads:[~2012-05-31 14:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 5:51 [PATCH 1/3] perf: Remove duplicate invocation on perf_event_for_each Namhyung Kim
2012-05-31 5:51 ` [PATCH 2/3] perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP Namhyung Kim
2012-05-31 14:35 ` Arnaldo Carvalho de Melo [this message]
2012-05-31 14:37 ` Arnaldo Carvalho de Melo
2012-06-06 7:03 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2012-05-31 5:51 ` [PATCH 3/3] perf evlist: Pass third argument to ioctl explicitly Namhyung Kim
2012-06-06 7:04 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2012-05-31 17:00 ` [PATCH 1/3] perf: Remove duplicate invocation on perf_event_for_each Peter Zijlstra
2012-06-06 7:09 ` [tip:perf/urgent] " tip-bot for 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=20120531143554.GD13591@infradead.org \
--to=acme@ghostprotocols.net \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung.kim@lge.com \
--cc=namhyung@gmail.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 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.