Messages in this thread | | | Date | Mon, 8 Nov 2010 15:57:54 +0100 | From | Oleg Nesterov <> | Subject | Q: 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.
| |