mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6863023: need non-perm oops in code cache for JSR 292
Make a special root-list for those few nmethods which might contain non-perm oops. Reviewed-by: twisti, kvn, never, jmasa, ysr
This commit is contained in:
parent
1cf5b7ae11
commit
e261aecad8
74 changed files with 979 additions and 279 deletions
|
@ -39,12 +39,13 @@ void ThreadRootsMarkingTask::do_it(GCTaskManager* manager, uint which) {
|
|||
ParCompactionManager* cm =
|
||||
ParCompactionManager::gc_thread_compaction_manager(which);
|
||||
PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
|
||||
CodeBlobToOopClosure mark_and_push_in_blobs(&mark_and_push_closure, /*do_marking=*/ true);
|
||||
|
||||
if (_java_thread != NULL)
|
||||
_java_thread->oops_do(&mark_and_push_closure);
|
||||
_java_thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
|
||||
|
||||
if (_vm_thread != NULL)
|
||||
_vm_thread->oops_do(&mark_and_push_closure);
|
||||
_vm_thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs);
|
||||
|
||||
// Do the real work
|
||||
cm->drain_marking_stacks(&mark_and_push_closure);
|
||||
|
@ -79,7 +80,8 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
|
|||
case threads:
|
||||
{
|
||||
ResourceMark rm;
|
||||
Threads::oops_do(&mark_and_push_closure);
|
||||
CodeBlobToOopClosure each_active_code_blob(&mark_and_push_closure, /*do_marking=*/ true);
|
||||
Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -107,6 +109,11 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
|
|||
vmSymbols::oops_do(&mark_and_push_closure);
|
||||
break;
|
||||
|
||||
case code_cache:
|
||||
// Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
|
||||
//CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));
|
||||
break;
|
||||
|
||||
default:
|
||||
fatal("Unknown root type");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue