diff src/share/vm/graal/graalCompilerToVM.cpp @ 9108:b78686983a75

GRAAL-218: add CompileTheWorld functionality Reviewed-by:
author twisti
date Sat, 13 Apr 2013 22:59:27 -0700
parents e0e85d78843b
children bc26f978b0ce
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp	Sat Apr 13 22:16:04 2013 +0200
+++ b/src/share/vm/graal/graalCompilerToVM.cpp	Sat Apr 13 22:59:27 2013 -0700
@@ -320,6 +320,11 @@
   return code == NULL ? 0 : code->insts_size();
 C2V_END
 
+C2V_VMENTRY(jint, constantPoolLength, (JNIEnv *env, jobject, jobject type))
+  ConstantPool* cp = InstanceKlass::cast(java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaMirror(type)))->constants();
+  return cp->length();
+C2V_END
+
 C2V_VMENTRY(jobject, lookupType, (JNIEnv *env, jobject, jstring jname, jobject accessingClass, jboolean eagerResolve))
   ResourceMark rm;
 
@@ -621,6 +626,9 @@
 #endif
   set_boolean("verifyOops", VerifyOops);
   set_boolean("ciTime", CITime);
+  set_boolean("compileTheWorld", CompileTheWorld);
+  set_int("compileTheWorldStartAt", CompileTheWorldStartAt);
+  set_int("compileTheWorldStopAt", CompileTheWorldStopAt);
   set_boolean("printCompilation", PrintCompilation);
   set_boolean("printInlining", PrintInlining);
   set_boolean("useFastLocking", GraalUseFastLocking);
@@ -1112,6 +1120,7 @@
   {CC"getInvocationCount",            CC"("METASPACE_METHOD")I",                                        FN_PTR(getInvocationCount)},
   {CC"getCompiledCodeSize",           CC"("METASPACE_METHOD")I",                                        FN_PTR(getCompiledCodeSize)},
   {CC"getVtableEntryOffset",          CC"("METASPACE_METHOD")I",                                        FN_PTR(getVtableEntryOffset)},
+  {CC"constantPoolLength",            CC"("HS_RESOLVED_TYPE")I",                                        FN_PTR(constantPoolLength)},
   {CC"lookupType",                    CC"("STRING HS_RESOLVED_TYPE"Z)"TYPE,                             FN_PTR(lookupType)},
   {CC"lookupConstantInPool",          CC"("HS_RESOLVED_TYPE"I)"OBJECT,                                  FN_PTR(lookupConstantInPool)},
   {CC"lookupAppendixInPool",          CC"("HS_RESOLVED_TYPE"IB)"OBJECT,                                 FN_PTR(lookupAppendixInPool)},