HACK: perf: Allow set-output for task contexts of different types
Set-output must be limited to events that cannot be active on different
cpus at the same time. Thus either the event cpu must be the same, or
the event task must be the same. Current logic does not check the task
directly but checks whether the perf_event_context is the same, however
there are separate contexts for hardware and software events so in that
case the perf_event_context is different even though the task is the same.
This patch changes the logic to check the task directly.
HACK WARNING: since set_output() can be called from perf_event_open() to
attach to another event's buffer, we need to take into account that the
new event doesn't have a context at that point, so hack around that. This
will need a better fix.
Signed-off-by: Adrian Hunter <email@example.com>
Signed-off-by: Alexander Shishkin <firstname.lastname@example.org>
1 file changed