lkml.org 
[lkml]   [2010]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectQ: perf_event && event->owner
    Another thing I can't understand, event->owner/owner_entry.

    Say, some thread calls sys_perf_event_open() and creates the event.
    It becomes its owner. Now this thread exits, but fd/event are still
    here, and event->owner refers to the dead task_struct.

    ptrace looks even more strange. Debugger can attach the breakpoint
    to the tracee and then exit/detach. ->ptrace_bps events still point
    to the same (may be dead) task. Even if another debugger attaches
    and reuses these events.

    And for what? Afaics, this is only used by PR_TASK_PERF_EVENTS_xxABLE.
    Looks like, tools/perf/ used prctl() in the past. Perhaps this API
    can die now and we can kill ->owner/owner_entry?

    Oleg.



    \
     
     \ /
      Last update: 2010-11-08 16:07    [W:4.713 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site