1.1 --- a/src/share/vm/prims/whitebox.cpp Thu Mar 28 15:39:52 2013 +0100 1.2 +++ b/src/share/vm/prims/whitebox.cpp Tue Apr 02 11:28:33 2013 +0200 1.3 @@ -254,6 +254,24 @@ 1.4 CompileBroker::queue_size(CompLevel_full_profile) /* C1 */; 1.5 WB_END 1.6 1.7 +WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString)) 1.8 + ResourceMark rm(THREAD); 1.9 + int len; 1.10 + jchar* name = java_lang_String::as_unicode_string(JNIHandles::resolve(javaString), len); 1.11 + oop found_string = StringTable::the_table()->lookup(name, len); 1.12 + if (found_string == NULL) { 1.13 + return false; 1.14 + } 1.15 + return true; 1.16 +WB_END 1.17 + 1.18 + 1.19 +WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o)) 1.20 + Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(true); 1.21 + Universe::heap()->collect(GCCause::_last_ditch_collection); 1.22 +WB_END 1.23 + 1.24 + 1.25 //Some convenience methods to deal with objects from java 1.26 int WhiteBox::offset_for_field(const char* field_name, oop object, 1.27 Symbol* signature_symbol) { 1.28 @@ -343,6 +361,8 @@ 1.29 CC"(Ljava/lang/reflect/Method;)I", (void*)&WB_GetMethodCompilationLevel}, 1.30 {CC"getCompileQueuesSize", 1.31 CC"()I", (void*)&WB_GetCompileQueuesSize}, 1.32 + {CC"isInStringTable", CC"(Ljava/lang/String;)Z", (void*)&WB_IsInStringTable }, 1.33 + {CC"fullGC", CC"()V", (void*)&WB_FullGC }, 1.34 }; 1.35 1.36 #undef CC