< prev index next >

src/hotspot/share/runtime/interfaceSupport.cpp

Print this page

        

@@ -26,20 +26,53 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "gc/shared/collectedHeap.inline.hpp"
 #include "gc/shared/genCollectedHeap.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
-#include "runtime/interfaceSupport.hpp"
+#include "runtime/interfaceSupport.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.inline.hpp"
+#include "runtime/thread.inline.hpp"
 #include "runtime/vframe.hpp"
 #include "utilities/preserveException.hpp"
 
 // Implementation of InterfaceSupport
 
 #ifdef ASSERT
+VMEntryWrapper::VMEntryWrapper() {
+  if (VerifyLastFrame) {
+    InterfaceSupport::verify_last_frame();
+  }
+}
+
+VMEntryWrapper::~VMEntryWrapper() {
+  InterfaceSupport::check_gc_alot();
+  if (WalkStackALot) {
+    InterfaceSupport::walk_stack();
+  }
+#ifdef COMPILER2
+  // This option is not used by Compiler 1
+  if (StressDerivedPointers) {
+    InterfaceSupport::stress_derived_pointers();
+  }
+#endif
+  if (DeoptimizeALot || DeoptimizeRandom) {
+    InterfaceSupport::deoptimizeAll();
+  }
+  if (ZombieALot) {
+    InterfaceSupport::zombieAll();
+  }
+  if (UnlinkSymbolsALot) {
+    InterfaceSupport::unlinkSymbols();
+  }
+  // do verification AFTER potential deoptimization
+  if (VerifyStack) {
+    InterfaceSupport::verify_stack();
+  }
+}
 
 long InterfaceSupport::_number_of_calls       = 0;
 long InterfaceSupport::_scavenge_alot_counter = 1;
 long InterfaceSupport::_fullgc_alot_counter   = 1;
 long InterfaceSupport::_fullgc_alot_invocation = 0;
< prev index next >