Re: [PATCH] perf/core: make sure group events are for the same cpu

From: zhouchengming
Date: Wed Jun 21 2017 - 02:56:04 EST


On 2017/6/20 21:08, Alexander Shishkin wrote:
Zhou Chengming<zhouchengming1@xxxxxxxxxx> writes:

The else branch are broken for taskctx:
This is not a good way to open a commit message.

two events can on the same taskctx, but on different cpu.
How?

fd1 = perf_open_event(attr, pid, 0, -1, flags);
fd2 = perf_open_event(attr, pid, 1, fd1, flags);

fd1 will be the leader event, fd2 will be the sibling event in the group.

And they are for the same task, so they will be put on the same taskctx successfully
if !move_group.

Obviously it's wrong, we can't concurrently schedule them as a group, since they are
on different cpu.

Thanks.


Regards,
--
Alex

.