< prev index next >
src/hotspot/share/prims/whitebox.cpp
Print this page
rev 56101 : 8227745: Enable Escape Analysis for better performance when debugging
Reviewed-by: ???
@@ -70,10 +70,11 @@
#include "runtime/jniHandles.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/sweeper.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadSMR.hpp"
+#include "runtime/vframe.hpp"
#include "runtime/vm_version.hpp"
#include "services/memoryService.hpp"
#include "utilities/align.hpp"
#include "utilities/debug.hpp"
#include "utilities/elfFile.hpp"
@@ -817,10 +818,24 @@
VM_WhiteBoxDeoptimizeFrames op(make_not_entrant == JNI_TRUE);
VMThread::execute(&op);
return op.result();
WB_END
+WB_ENTRY(jboolean, WB_IsFrameDeoptimized(JNIEnv* env, jobject o, jint depth))
+ JavaThread* t = JavaThread::current();
+ bool result = false;
+ if (t->has_last_Java_frame()) {
+ RegisterMap reg_map(t);
+ javaVFrame *jvf = t->last_java_vframe(®_map);
+ for (jint d = 0; d < depth && jvf != NULL; d++ ) {
+ jvf = jvf->java_sender();
+ }
+ result = jvf != NULL && jvf->fr().is_deoptimized_frame();
+ }
+ return result;
+WB_END
+
WB_ENTRY(void, WB_DeoptimizeAll(JNIEnv* env, jobject o))
MutexLocker mu(Compile_lock);
CodeCache::mark_all_nmethods_for_deoptimization();
VM_Deoptimize op;
VMThread::execute(&op);
@@ -2212,10 +2227,11 @@
{CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory },
{CC"NMTChangeTrackingLevel", CC"()Z", (void*)&WB_NMTChangeTrackingLevel},
{CC"NMTGetHashSize", CC"()I", (void*)&WB_NMTGetHashSize },
#endif // INCLUDE_NMT
{CC"deoptimizeFrames", CC"(Z)I", (void*)&WB_DeoptimizeFrames },
+ {CC"isFrameDeoptimized", CC"(I)Z", (void*)&WB_IsFrameDeoptimized},
{CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll },
{CC"deoptimizeMethod0", CC"(Ljava/lang/reflect/Executable;Z)I",
(void*)&WB_DeoptimizeMethod },
{CC"isMethodCompiled0", CC"(Ljava/lang/reflect/Executable;Z)Z",
(void*)&WB_IsMethodCompiled },
< prev index next >