Re: perf: prctl(PR_TASK_PERF_EVENTS_DISABLE) has no effect
From: Peter Zijlstra <hidden>
Date: 2012-07-31 19:49:06
On Tue, 2012-07-31 at 09:16 +0200, Ingo Molnar wrote:
* Peter Zijlstra [off-list ref] wrote:quoted
On Fri, 2012-07-27 at 13:53 +0200, Ingo Molnar wrote:quoted
quoted
Bloating the interface for something that is already well possible is.There's no 'bloat' worth speaking off: a single bit out of an already allocated bitmap, plus a single check in an already existing loop,Uhm, no. The existing prctl() loop is over the fd's the task owns, you want a loop over the fd's that monitor you. This needs new prctl()s at the very least.We could add a new prctl if you think, but I thought to not complicate it and offer it as a simple extension of the semantics to loop over active events. No existing binary's behavior will change.
It muddles up the semantics of the existing prctl()s though. Ideally we'd simply remove the current ones though, I don't think anybody actually uses them and as an owner you actually have all the fds to call ioctl() on. This would let us get rid of the entire event->owner, event->owner_entry and task->perf_event_list mess. See perf_event_exit_task() and perf_release() for why I'd love that crap to go away.