lkml.org 
[lkml]   [2013]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [PATCH 1/2] perf: Reset detached siblings' group_flags
    Date
    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:

    \
     
     \ /
      Last update: 2013-03-11 13:21    [W:4.147 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site