src/share/vm/prims/whitebox.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/prims/whitebox.cpp	Thu Nov  3 14:16:48 2016
--- new/src/share/vm/prims/whitebox.cpp	Thu Nov  3 14:16:48 2016

*** 1170,1179 **** --- 1170,1182 ---- return features_string; WB_END int WhiteBox::get_blob_type(const CodeBlob* code) { guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to be enabled"); + if (code->is_aot()) { + return -1; + } return CodeCache::get_code_heap(code)->code_blob_type(); } CodeHeap* WhiteBox::get_code_heap(int blob_type) { guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to be enabled");
*** 1225,1235 **** --- 1228,1239 ---- CompiledMethod* code = is_osr ? mh->lookup_osr_nmethod_for(InvocationEntryBci, CompLevel_none, false) : mh->code(); jobjectArray result = NULL; if (code == NULL) { return result; } ! int insts_size = code->insts_size(); ! int comp_level = code->comp_level(); + int insts_size = comp_level == CompLevel_aot ? code->code_end() - code->code_begin() : code->insts_size(); ThreadToNativeFromVM ttn(thread); jclass clazz = env->FindClass(vmSymbols::java_lang_Object()->as_C_string()); CHECK_JNI_EXCEPTION_(env, NULL); result = env->NewObjectArray(5, clazz, NULL);
*** 1240,1250 **** --- 1244,1254 ---- CodeBlobStub stub(code); jobjectArray codeBlob = codeBlob2objectArray(thread, env, &stub); CHECK_JNI_EXCEPTION_(env, NULL); env->SetObjectArrayElement(result, 0, codeBlob); ! jobject level = integerBox(thread, env, code->comp_level()); CHECK_JNI_EXCEPTION_(env, NULL); env->SetObjectArrayElement(result, 1, level); jbyteArray insts = env->NewByteArray(insts_size); CHECK_JNI_EXCEPTION_(env, NULL);

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