8139170: JVMCI refresh

Reviewed-by: kvn
This commit is contained in:
Christian Thalinger 2015-11-04 07:23:23 -10:00
parent a4e16dd190
commit a38ea495d6
246 changed files with 4445 additions and 2901 deletions

View file

@ -1028,17 +1028,19 @@ struct CodeBlobStub {
CodeBlobStub(const CodeBlob* blob) :
name(os::strdup(blob->name())),
size(blob->size()),
blob_type(WhiteBox::get_blob_type(blob)) { }
blob_type(WhiteBox::get_blob_type(blob)),
address((jlong) blob) { }
~CodeBlobStub() { os::free((void*) name); }
const char* const name;
const int size;
const int blob_type;
const jint size;
const jint blob_type;
const jlong address;
};
static jobjectArray codeBlob2objectArray(JavaThread* thread, JNIEnv* env, CodeBlobStub* cb) {
jclass clazz = env->FindClass(vmSymbols::java_lang_Object()->as_C_string());
CHECK_JNI_EXCEPTION_(env, NULL);
jobjectArray result = env->NewObjectArray(3, clazz, NULL);
jobjectArray result = env->NewObjectArray(4, clazz, NULL);
jstring name = env->NewStringUTF(cb->name);
CHECK_JNI_EXCEPTION_(env, NULL);
@ -1052,6 +1054,10 @@ static jobjectArray codeBlob2objectArray(JavaThread* thread, JNIEnv* env, CodeBl
CHECK_JNI_EXCEPTION_(env, NULL);
env->SetObjectArrayElement(result, 2, obj);
obj = longBox(thread, env, cb->address);
CHECK_JNI_EXCEPTION_(env, NULL);
env->SetObjectArrayElement(result, 3, obj);
return result;
}
@ -1092,9 +1098,9 @@ WB_ENTRY(jobjectArray, WB_GetNMethod(JNIEnv* env, jobject o, jobject method, jbo
CHECK_JNI_EXCEPTION_(env, NULL);
env->SetObjectArrayElement(result, 3, id);
jobject address = longBox(thread, env, (jlong) code);
jobject entry_point = longBox(thread, env, (jlong) code->entry_point());
CHECK_JNI_EXCEPTION_(env, NULL);
env->SetObjectArrayElement(result, 4, address);
env->SetObjectArrayElement(result, 4, entry_point);
return result;
WB_END