This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] GC: external thread suspension


Keith Seitz wrote:
So now there are two routes. One (complex) patch which allows garbage collection to run on suspended threads (or at least I think it does!) and one (simple) patch which suspends garbage collection while the thread is externally suspended.

If the JDWP back-end is partially written in Java, then it is important that GC can run when threads are suspended. If not, the back-end will be prone to deadlock during memory allocation. Eventually, I think JDWP implementation will need to be free of any Java code/locks in order to be 100% robust in the face of thread suspension, but currently that's not the case. Also, even for a JDWP implementation in pure C/C++ it may be desirable to make use of the GC.


I like how GC_suspend_self and GC_suspend_thread are handled in the same way in this patch, however. Perhaps the two approaches can be combined?

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]