Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/referenceProcessor.cpp @ 10031:ebb32c4589f3
Force GC to process graal_installed_code references during marking (GRAAL-257)
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Tue, 11 Jun 2013 19:59:52 +0200 |
parents | aed758eda82a |
children | 4a7dc38ae96b |
line wrap: on
line diff
--- a/src/share/vm/memory/referenceProcessor.cpp Tue Jun 11 18:13:55 2013 +0200 +++ b/src/share/vm/memory/referenceProcessor.cpp Tue Jun 11 19:59:52 2013 +0200 @@ -32,6 +32,10 @@ #include "oops/oop.inline.hpp" #include "runtime/java.hpp" #include "runtime/jniHandles.hpp" +#ifdef GRAAL +#include "code/codeCache.hpp" +#include "code/nmethod.hpp" +#endif ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL; ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL; @@ -243,6 +247,9 @@ task_executor->set_single_threaded_mode(); } process_phaseJNI(is_alive, keep_alive, complete_gc); +#ifdef GRAAL + process_phaseGraalNMethods(keep_alive, complete_gc); +#endif } } @@ -284,6 +291,14 @@ complete_gc->do_void(); } +#ifdef GRAAL +void ReferenceProcessor::process_phaseGraalNMethods(OopClosure* keep_alive, + VoidClosure* complete_gc) { + CodeCache::alive_nmethods_do_graal_methods(keep_alive); + complete_gc->do_void(); +} + +#endif template <class T> bool enqueue_discovered_ref_helper(ReferenceProcessor* ref,