--- old/src/hotspot/share/runtime/interfaceSupport.cpp 2018-03-12 22:05:28.494282048 -0400 +++ new/src/hotspot/share/runtime/interfaceSupport.cpp 2018-03-12 22:05:27.898227101 -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;