mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Why is PERF_FORMAT_GROUP incompatible with inherited events?
@ 2010-02-12  3:02 Paul Mackerras
  2010-02-14 10:12 ` Peter Zijlstra
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Mackerras @ 2010-02-12  3:02 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar; +Cc: linux-kernel, fweisbec, Dave Wootton

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-15  9:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-12  3:02 Why is PERF_FORMAT_GROUP incompatible with inherited events? Paul Mackerras
2010-02-14 10:12 ` 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

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®