How to get the family tree of all the threads?

Alan Bateman Alan.Bateman at Sun.COM
Thu Oct 29 03:49:25 PDT 2009


Christian Thalinger wrote:
> :
> I think the easiest solution would be to use JVMTI, but it seems you
> really want to do this in the VM.  The method you are searching for is
> JVM_StartThread, this is where all Java threads are created.
>
> -- Christian
>
>   
I agree that an agent based solution is probably the easiest. The Thread 
constructors or start method could be instrumented (depending on if the 
parent is considered to be the thread that creates the Thread or the 
thread that invokes start). Should be doable with with a JVM TI or 
j.l.instrument agent.

-Alan.



More information about the hotspot-dev mailing list