< prev index next >

src/hotspot/share/prims/whitebox.cpp

Print this page

*** 59,68 **** --- 59,71 ---- #include "runtime/vm_version.hpp" #include "utilities/align.hpp" #include "utilities/debug.hpp" #include "utilities/exceptions.hpp" #include "utilities/macros.hpp" + #if INCLUDE_CDS + #include "prims/cdsoffsets.hpp" + #endif // INCLUDE_CDS #if INCLUDE_ALL_GCS #include "gc/g1/concurrentMarkThread.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1ConcurrentMark.hpp" #include "gc/g1/heapRegionRemSet.hpp"
*** 1728,1737 **** --- 1731,1752 ---- #else return false; #endif WB_END + + #if INCLUDE_CDS + + WB_ENTRY(jint, WB_GetOffsetForName(JNIEnv* env, jobject o, jstring name)) + ResourceMark rm; + char* c_name = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(name)); + int result = CDSOffsets::find_offset(c_name); + return (jint)result; + WB_END + + #endif // INCLUDE_CDS + WB_ENTRY(jint, WB_HandshakeWalkStack(JNIEnv* env, jobject wb, jobject thread_handle, jboolean all_threads)) class TraceSelfClosure : public ThreadClosure { jint _num_threads_completed; void do_thread(Thread* th) {
*** 1916,1925 **** --- 1931,1943 ---- (void*)&WB_GetCompressedOopsMaxHeapSize}, {CC"printHeapSizes", CC"()V", (void*)&WB_PrintHeapSizes }, {CC"runMemoryUnitTests", CC"()V", (void*)&WB_RunMemoryUnitTests}, {CC"readFromNoaccessArea",CC"()V", (void*)&WB_ReadFromNoaccessArea}, {CC"stressVirtualSpaceResize",CC"(JJJ)I", (void*)&WB_StressVirtualSpaceResize}, + #if INCLUDE_CDS + {CC"getOffsetForName0", CC"(Ljava/lang/String;)I", (void*)&WB_GetOffsetForName}, + #endif #if INCLUDE_ALL_GCS {CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark}, {CC"g1IsHumongous0", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous }, {CC"g1BelongsToHumongousRegion0", CC"(J)Z", (void*)&WB_G1BelongsToHumongousRegion}, {CC"g1BelongsToFreeRegion0", CC"(J)Z", (void*)&WB_G1BelongsToFreeRegion},
< prev index next >