src/share/vm/prims/whitebox.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8032970 Cdiff src/share/vm/prims/whitebox.cpp

src/share/vm/prims/whitebox.cpp

Print this page
rev 6447 : imported patch hsx-whitebox-stack-v4.3.diff

*** 31,43 **** --- 31,45 ---- #include "classfile/classLoaderData.hpp" #include "prims/whitebox.hpp" #include "prims/wbtestmethods/parserTests.hpp" + #include "runtime/thread.hpp" #include "runtime/arguments.hpp" #include "runtime/interfaceSupport.hpp" #include "runtime/os.hpp" + #include "utilities/debug.hpp" #include "utilities/macros.hpp" #include "utilities/exceptions.hpp" #if INCLUDE_ALL_GCS
*** 574,583 **** --- 576,594 ---- return result; WB_END + WB_ENTRY(jlong, WB_GetThreadFullStackSize(JNIEnv* env, jobject o)) + return (jlong) Thread::current()->stack_size(); + WB_END + + WB_ENTRY(jlong, WB_GetThreadRemainingStackSize(JNIEnv* env, jobject o)) + JavaThread* t = JavaThread::current(); + return (jlong) t->stack_available(os::current_stack_pointer()) - (jlong) StackShadowPages * os::vm_page_size(); + WB_END + //Some convenience methods to deal with objects from java int WhiteBox::offset_for_field(const char* field_name, oop object, Symbol* signature_symbol) { assert(field_name != NULL && strlen(field_name) > 0, "Field name not valid"); Thread* THREAD = Thread::current();
*** 688,697 **** --- 699,710 ---- {CC"fullGC", CC"()V", (void*)&WB_FullGC }, {CC"readReservedMemory", CC"()V", (void*)&WB_ReadReservedMemory }, {CC"getCPUFeatures", CC"()Ljava/lang/String;", (void*)&WB_GetCPUFeatures }, {CC"getNMethod", CC"(Ljava/lang/reflect/Executable;Z)[Ljava/lang/Object;", (void*)&WB_GetNMethod }, + {CC"getThreadFullStackSize", CC"()J", (void*)&WB_GetThreadFullStackSize }, + {CC"getThreadRemainingStackSize", CC"()J", (void*)&WB_GetThreadRemainingStackSize }, }; #undef CC JVM_ENTRY(void, JVM_RegisterWhiteBoxMethods(JNIEnv* env, jclass wbclass))
src/share/vm/prims/whitebox.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File