[concurrency-interest] Stopping all the threads and getting thestack frames

David Holmes dcholmes at optusnet.com.au
Thu Oct 26 10:41:53 EDT 2006

Are you talking about from within Java, or how the virtual machine does it?
The VM triggers a global safepoint at which time all the threads have
walkable stacks, and the GC thread can then walk those stacks. The VM itself
maintains the logical Java stack of each native thread as an explicit data

There are JVMTI API's for an "external agent" to interact with the threads
in a target VM - including, if I recall correctly, a way to get a stack
trace for each thread.

David Holmes

> -----Original Message-----
> From: concurrency-interest-bounces at cs.oswego.edu
> [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Unmesh
> joshi
> Sent: Thursday, 26 October 2006 8:40 PM
> To: concurrency-interest at cs.oswego.edu
> Subject: [concurrency-interest] Stopping all the threads and getting
> thestack frames
> Hi,
> I was trying to study garbage collector algorithms for java. I am
> curious to
> know how can we stop all the threads and get the stack frames in
> each thread
> to search for live object references. Is there any OS level API for doing
> that? How is it done when we implement garbage collector? Are there any
> detailed references for the impementation?
> Thanks,
> Unmesh
> _________________________________________________________________
> NRIs: Send Money FREE! Go ahead and register now!
> http://ads.mediaturf.net/event.ng/Type=click&FlightID=20273&AdID=6

Concurrency-interest mailing list
Concurrency-interest at altair.cs.oswego.edu

More information about the Concurrency-interest mailing list