This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFC] GC: external thread suspension
Bryce McKinlay wrote:
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.
Is this true, though? JDWP does not suspend it own threads -- ever. All
the Classpath JDWP threads are in their own ThreadGroup, and the
debugger cannot suspend them, even if it asks to suspend everything.
The real question is, when a program thread is stopped, does it matter
that the garbage collector cannot GC *on that thread* -- it can still GC
any other active thread.
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?
I hadn't thought about this possibility. And unfortunately, I have to
run for the day. I'll brood over it tonight and see what comes of it in
the morning.
Thank you for reviewing this.
Keith