src/hotspot/share/runtime/interfaceSupport.cpp
changeset 49449 ef5d5d343e2a
parent 47765 b7c7428eaab9
child 49480 d7df2dd501ce
--- a/src/hotspot/share/runtime/interfaceSupport.cpp	Fri Mar 16 08:26:53 2018 -0400
+++ b/src/hotspot/share/runtime/interfaceSupport.cpp	Fri Mar 16 09:12:13 2018 -0400
@@ -28,16 +28,49 @@
 #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;