The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, fweisbec@gmail.com,
	Dave Wootton <dwootton@us.ibm.com>
Subject: Why is PERF_FORMAT_GROUP incompatible with inherited events?
Date: Fri, 12 Feb 2010 14:02:05 +1100	[thread overview]
Message-ID: <20100212030205.GE13769@brick.ozlabs.ibm.com> (raw)

We currently have this code in perf_event_alloc() in kernel/perf_event.c:

	/*
	 * we currently do not support PERF_FORMAT_GROUP on inherited events
	 */
	if (attr->inherit && (attr->read_format & PERF_FORMAT_GROUP))
		goto done;

plus there is a comment "XXX PERF_FORMAT_GROUP vs inherited events
seems difficult" next to perf_output_read_group() (but there isn't a
similar comment on perf_read_hw()).

First, what is the difficulty referred to here?

Secondly, if the difficulty is just to do with the intersection of
sampling counters, inheritance, and group readout (as seems to be the
case), could we please allow group readout on ordinary counting
(non-sampling) counters?  That is, change the test above to something
like:

	if (attr->inherit && attr->sample_period &&
	    (attr->read_format & PERF_FORMAT_GROUP))
		goto done;

Any objections to that change?  If it's OK, could we get it into .33
and .32-stable?

Paul.

             reply	other threads:[~2010-02-12  3:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12  3:02 Paul Mackerras [this message]
2010-02-14 10:12 ` Why is PERF_FORMAT_GROUP incompatible with inherited events? Peter Zijlstra
2010-02-14 11:33   ` Paul Mackerras
2010-02-14 12:38     ` Peter Zijlstra
2010-02-15  4:56       ` Paul Mackerras
2010-02-15  9:29         ` 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=20100212030205.GE13769@brick.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=dwootton@us.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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