Re: [Sablevm-developer] adventures in not understanding the java stack
Brought to you by:
egagnon
From: Etienne G. <gag...@uq...> - 2004-01-19 23:54:23
|
Chris Pickett wrote: > Now, summarized: > > 1a) If I mark relevant threads for GC being called at line 418 in > thread.c, will this catch them all? It does visit all "live" threads. SableVM was designed so that dead thread data structures can be recycled for new threads, lowering the pressure on the memory manager [malloc/free in this case]. > > 1b) If I put the code to abort speculative children because the > non-speculative parent threw an exception, natively or not, at line 364 > in interpreter.c, will this catch everything? Yes (I think). > 6) Can you think of anything to do with class initialization, object > finalization, or native method calls that would cause problems with what > I'm describing? As in, problems that I won't detect safely? I'm asking > about non-speculative parent threads, with or without children, > executing these sections, possibly forking children. Speculative > instructions are themselves safe with respect to global memory, > exception handling, GC, native methods, and code preparation. Let's be nasty... What if the parent thread creates a Thread instance and calls Thread.start()? I guess this implies a native call and is thus covered in your approach, right? I guess you have to worry about native methods. A native method should probably invalidate speculative children. That's all that comes to my mind. > Thank-you very very much. I apologize if any of this seems exceedingly > obvious to you, but I made some incorrect assumptions in the past and I > want to prevent that this time around (I've disabled almost everything > and am turning features on one at a time). No, it's not obvious at all, even to me. It's just that you face two competing yet important goals, when you write to me and want an answer: 1- You must explain things very clearly (and unambiguously) and provide enough information so that I can actually answer. 2- You must write a short ( < 10 lines ) message so that, if I have a 2-5 minutes hole in my schedule, I will be tempted to read it and answer. Otherwise, it ends up on the stack of hundreds of messages I hope to have time some day to answer. [You might notice that I do sometime answer such emails, but after a few months...] Unless, of course, you don't need the answer any time soon. :-) > P.S. In the future, I would like to help design and possibly implement > some kind of high-level CFG for the VM, which is (partially) built from > directives in the source. Discussions like this and the GC one make me > think about stuff like that. Let's finish the speculative stuff first! And if you have time to spare, you could help with the general infrastructure (e.g. getting Eclipse to run on SableVM, etc.) :-))) Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |