Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | Re: [PATCH 1/2] perf: Reset detached siblings' group_flags | Date | Mon, 11 Mar 2013 20:51:31 +0900 |
| |
While looking at the code again, I found that the detached siblings should call perf_event__header_size() for themselves in the loop since after moving them to the list the previous leader will have empty sibling_list. Something like below is needed IMHO:
diff --git a/kernel/events/core.c b/kernel/events/core.c index dc96fee942a6..53ac21cc4012 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1100,6 +1100,13 @@ static void perf_group_detach(struct perf_event *event) /* Inherit group flags from the previous leader */ sibling->group_flags = event->group_flags; + + /* + * The leader will forget about siblings from now on. + * So below loop to update header size of each sibling won't + * work for this case. Do it directly. + */ + perf_event__header_size(sibling); } out:
| |