Mercurial > hg > truffle
diff src/share/vm/runtime/thread.hpp @ 7179:d0aa87f04bd5
8003720: NPG: Method in interpreter stack frame can be deallocated
Summary: Pass down a closure during root scanning to keep the class of the method alive.
Reviewed-by: coleenp, jcoomes
author | stefank |
---|---|
date | Tue, 27 Nov 2012 10:13:20 +0100 |
parents | c284cf4781f0 |
children | 291ffc492eb6 db9981fd3124 |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.hpp Mon Nov 26 12:31:03 2012 -0500 +++ b/src/share/vm/runtime/thread.hpp Tue Nov 27 10:13:20 2012 +0100 @@ -480,8 +480,10 @@ // GC support // Apply "f->do_oop" to all root oops in "this". + // Apply "cld_f->do_cld" to CLDs that are otherwise not kept alive. + // Used by JavaThread::oops_do. // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames - virtual void oops_do(OopClosure* f, CodeBlobClosure* cf); + virtual void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf); // Handles the parallel case for the method below. private: @@ -1405,7 +1407,7 @@ void frames_do(void f(frame*, const RegisterMap*)); // Memory operations - void oops_do(OopClosure* f, CodeBlobClosure* cf); + void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf); // Sweeper operations void nmethods_do(CodeBlobClosure* cf); @@ -1825,7 +1827,7 @@ // GC support // Apply "f->do_oop" to all root oops in "this". // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames - void oops_do(OopClosure* f, CodeBlobClosure* cf); + void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf); #ifndef PRODUCT private: @@ -1892,9 +1894,9 @@ // Apply "f->do_oop" to all root oops in all threads. // This version may only be called by sequential code. - static void oops_do(OopClosure* f, CodeBlobClosure* cf); + static void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf); // This version may be called by sequential or parallel code. - static void possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf); + static void possibly_parallel_oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf); // This creates a list of GCTasks, one per thread. static void create_thread_roots_tasks(GCTaskQueue* q); // This creates a list of GCTasks, one per thread, for marking objects.