Re: [Sablevm-developer] Question about _svmf_stopping_java()
Brought to you by:
egagnon
From: Etienne G. <gag...@uq...> - 2004-01-18 22:07:08
|
Archie Cobbs wrote: > The reasoning is simple: pending_halt_thread_count only counts threads > that are running in Java mode. When it reaches zero, you consider the > world halted, yet there may very well be threads running in native mode > that had already entered native mode when stop_the_world() was called > (and so they didn't count in the pending_halt_thread_count total). This is exacly what we want. Do you have any idea when a native thread might call back into the VM (e.g. either the call ends, or some JNI function is called)? I don't. In fact, the native thread might be sleeping or into some kind of almost infinite loop. We definitely don't want GC to wait for such thread. > So if that's the case, then my idea of allowing halting threads to enter > native mode should not be adding any bugs that aren't already there. > Am I making any sense? :-) Yes and no. We would have to change the state diagram and make sure we have not introduced a bug somewhere else. In the state diagram, there is no direct transition from SVM_THREAD_STATUS_HALT_REQUESTED to SVM_THREAD_STATUS_NOT_RUNNING_JAVA_RESUMING_DISALLOWED. OK. This is all hypothetical stuff. Let stop it here. Etienne PS: Of course, it would be awesome if somebody gave his notes to Chris for transcription. :-) Thanks for the offer, Chris. -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |