logo       

Re: Stopping all the threads and getting thestack frames: msg#00065

java.jsr.166-concurrency

Subject: Re: Stopping all the threads and getting thestack frames

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
structure.

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.

Cheers,
David Holmes

> -----Original Message-----
> From: concurrency-interest-bounces@xxxxxxxxxxxxx
> [mailto:concurrency-interest-bounces@xxxxxxxxxxxxx]On Behalf Of Unmesh
> joshi
> Sent: Thursday, 26 October 2006 8:40 PM
> To: concurrency-interest@xxxxxxxxxxxxx
> 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
5989&TargetID=11172&Targets=11172&Values=202,414,1093,1264,3122&Redirect=htt
p:%2F%2Fwww.icicinri.net%2Fmoney2india%2F%3Fm2i%3DBAC-MSN%26att%3DMSNTLM2I18
CHAR%26rfr%3DMSNTLM2I18CHAR

_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@xxxxxxxxxxxxxxxxxxxx
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise