On Mon, Sep 8, 2008 at 11:43 PM, Andrej van der Zee
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>> You certainly don't need to modify the code of the child processes.
>> In the handler you can read the counter of the child processes. But
>> for the read to succeed, you need to stop the child. This can currently
>> be accomplished using ptrace and in particular PTRACE_ATTACH.
>> So you issue this call, wait (WUNTRACED) until this is effective, then you
>> call pfm_read_pmds(). When you are done, simply PTRACE_DETACH
>> the child.
>>
>
> Thanks.
>
> I guess the pfmon source code for the --follow-all option is a good
> example. The problem is that in my case I cannot stop the child with
> ptrace() because the handler-thread forks in a hook-method that is not
> implemented by me. So I have no access to the child.

I don't understand your problem here.  If you're ptrace'ing a process,
and that process
spawns a new process/thread, you can get this event notification
through ptrace() and
attach to the newly cloned task.  Why do you think you need to alter
the place where
the thread is spawned?

Curt

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to