< prev index next >

src/share/vm/memory/strongRootsScope.cpp

Print this page

        

@@ -22,17 +22,29 @@
  *
  */
 
 #include "precompiled.hpp"
 #include "classfile/stringTable.hpp"
-#include "memory/iterator.hpp"
+#include "code/nmethod.hpp"
 #include "memory/strongRootsScope.hpp"
 #include "runtime/thread.hpp"
 
+MarkScope::MarkScope(bool activate)
+  : _active(activate) {
+  if (_active) {
+    nmethod::oops_do_marking_prologue();
+  }
+}
+
+MarkScope::~MarkScope() {
+  if (_active) {
+    nmethod::oops_do_marking_epilogue();
+  }
+}
+
 StrongRootsScope::StrongRootsScope(bool activate)
-  : MarkScope(activate)
-{
+  : MarkScope(activate) {
   if (_active) {
     Threads::change_thread_claim_parity();
     // Zero the claimed high water mark in the StringTable
     StringTable::clear_parallel_claimed_index();
   }
< prev index next >