comparison src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents bca17e38de00
children d8ce2825b193
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
72 NOT_PRODUCT(TraceTime tm("MarkFromRootsTask", 72 NOT_PRODUCT(TraceTime tm("MarkFromRootsTask",
73 PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty)); 73 PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty));
74 ParCompactionManager* cm = 74 ParCompactionManager* cm =
75 ParCompactionManager::gc_thread_compaction_manager(which); 75 ParCompactionManager::gc_thread_compaction_manager(which);
76 PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm); 76 PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
77 PSParallelCompact::FollowKlassClosure follow_klass_closure(&mark_and_push_closure);
77 78
78 switch (_root_type) { 79 switch (_root_type) {
79 case universe: 80 case universe:
80 Universe::oops_do(&mark_and_push_closure); 81 Universe::oops_do(&mark_and_push_closure);
81 break; 82 break;
108 JvmtiExport::oops_do(&mark_and_push_closure); 109 JvmtiExport::oops_do(&mark_and_push_closure);
109 break; 110 break;
110 111
111 case system_dictionary: 112 case system_dictionary:
112 SystemDictionary::always_strong_oops_do(&mark_and_push_closure); 113 SystemDictionary::always_strong_oops_do(&mark_and_push_closure);
114 ClassLoaderDataGraph::always_strong_oops_do(&mark_and_push_closure, &follow_klass_closure, true);
113 break; 115 break;
114 116
115 case code_cache: 117 case code_cache:
116 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. 118 // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
117 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure)); 119 //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));
200 oop obj = NULL; 202 oop obj = NULL;
201 ObjArrayTask task; 203 ObjArrayTask task;
202 int random_seed = 17; 204 int random_seed = 17;
203 do { 205 do {
204 while (ParCompactionManager::steal_objarray(which, &random_seed, task)) { 206 while (ParCompactionManager::steal_objarray(which, &random_seed, task)) {
205 objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); 207 objArrayKlass* const k = (objArrayKlass*)task.obj()->klass();
206 k->oop_follow_contents(cm, task.obj(), task.index()); 208 k->oop_follow_contents(cm, task.obj(), task.index());
207 cm->follow_marking_stacks(); 209 cm->follow_marking_stacks();
208 } 210 }
209 while (ParCompactionManager::steal(which, &random_seed, obj)) { 211 while (ParCompactionManager::steal(which, &random_seed, obj)) {
210 obj->follow_contents(cm); 212 obj->follow_contents(cm);