src/share/vm/gc/parallel/pcTasks.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc/parallel

src/share/vm/gc/parallel/pcTasks.cpp

Print this page
rev 29186 : Review changes 2


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"

  26 #include "classfile/systemDictionary.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "gc/parallel/parallelScavengeHeap.hpp"
  29 #include "gc/parallel/pcTasks.hpp"
  30 #include "gc/parallel/psCompactionManager.inline.hpp"
  31 #include "gc/parallel/psParallelCompact.hpp"
  32 #include "gc/shared/collectedHeap.hpp"
  33 #include "gc/shared/gcTimer.hpp"
  34 #include "gc/shared/gcTraceTime.inline.hpp"
  35 #include "logging/log.hpp"
  36 #include "memory/resourceArea.hpp"
  37 #include "memory/universe.hpp"
  38 #include "oops/objArrayKlass.inline.hpp"
  39 #include "oops/oop.inline.hpp"
  40 #include "prims/jvmtiExport.hpp"
  41 #include "aot/aotLoader.hpp"
  42 #include "runtime/fprofiler.hpp"
  43 #include "runtime/jniHandles.hpp"
  44 #include "runtime/thread.hpp"
  45 #include "runtime/vmThread.hpp"
  46 #include "services/management.hpp"
  47 #include "utilities/stack.inline.hpp"
  48 
  49 //
  50 // ThreadRootsMarkingTask
  51 //
  52 
  53 void ThreadRootsMarkingTask::do_it(GCTaskManager* manager, uint which) {
  54   assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
  55 
  56   ResourceMark rm;
  57 
  58   ParCompactionManager* cm =
  59     ParCompactionManager::gc_thread_compaction_manager(which);
  60 
  61   ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm);


 111 
 112     case management:
 113       Management::oops_do(&mark_and_push_closure);
 114       break;
 115 
 116     case jvmti:
 117       JvmtiExport::oops_do(&mark_and_push_closure);
 118       break;
 119 
 120     case system_dictionary:
 121       SystemDictionary::always_strong_oops_do(&mark_and_push_closure);
 122       break;
 123 
 124     case class_loader_data:
 125       ClassLoaderDataGraph::always_strong_oops_do(&mark_and_push_closure, &follow_klass_closure, true);
 126       break;
 127 
 128     case code_cache:
 129       // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
 130       //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));
 131       if (UseAOT) {
 132         AOTLoader::oops_do(&mark_and_push_closure);
 133       }
 134       break;
 135 
 136     default:
 137       fatal("Unknown root type");
 138   }
 139 
 140   // Do the real work
 141   cm->follow_marking_stacks();
 142 }
 143 
 144 
 145 //
 146 // RefProcTaskProxy
 147 //
 148 
 149 void RefProcTaskProxy::do_it(GCTaskManager* manager, uint which)
 150 {
 151   assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
 152 
 153   ParCompactionManager* cm =




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "aot/aotLoader.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "code/codeCache.hpp"
  29 #include "gc/parallel/parallelScavengeHeap.hpp"
  30 #include "gc/parallel/pcTasks.hpp"
  31 #include "gc/parallel/psCompactionManager.inline.hpp"
  32 #include "gc/parallel/psParallelCompact.hpp"
  33 #include "gc/shared/collectedHeap.hpp"
  34 #include "gc/shared/gcTimer.hpp"
  35 #include "gc/shared/gcTraceTime.inline.hpp"
  36 #include "logging/log.hpp"
  37 #include "memory/resourceArea.hpp"
  38 #include "memory/universe.hpp"
  39 #include "oops/objArrayKlass.inline.hpp"
  40 #include "oops/oop.inline.hpp"
  41 #include "prims/jvmtiExport.hpp"

  42 #include "runtime/fprofiler.hpp"
  43 #include "runtime/jniHandles.hpp"
  44 #include "runtime/thread.hpp"
  45 #include "runtime/vmThread.hpp"
  46 #include "services/management.hpp"
  47 #include "utilities/stack.inline.hpp"
  48 
  49 //
  50 // ThreadRootsMarkingTask
  51 //
  52 
  53 void ThreadRootsMarkingTask::do_it(GCTaskManager* manager, uint which) {
  54   assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
  55 
  56   ResourceMark rm;
  57 
  58   ParCompactionManager* cm =
  59     ParCompactionManager::gc_thread_compaction_manager(which);
  60 
  61   ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm);


 111 
 112     case management:
 113       Management::oops_do(&mark_and_push_closure);
 114       break;
 115 
 116     case jvmti:
 117       JvmtiExport::oops_do(&mark_and_push_closure);
 118       break;
 119 
 120     case system_dictionary:
 121       SystemDictionary::always_strong_oops_do(&mark_and_push_closure);
 122       break;
 123 
 124     case class_loader_data:
 125       ClassLoaderDataGraph::always_strong_oops_do(&mark_and_push_closure, &follow_klass_closure, true);
 126       break;
 127 
 128     case code_cache:
 129       // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
 130       //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));

 131       AOTLoader::oops_do(&mark_and_push_closure);

 132       break;
 133 
 134     default:
 135       fatal("Unknown root type");
 136   }
 137 
 138   // Do the real work
 139   cm->follow_marking_stacks();
 140 }
 141 
 142 
 143 //
 144 // RefProcTaskProxy
 145 //
 146 
 147 void RefProcTaskProxy::do_it(GCTaskManager* manager, uint which)
 148 {
 149   assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
 150 
 151   ParCompactionManager* cm =


src/share/vm/gc/parallel/pcTasks.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File