Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/thread.cpp @ 18:c7d713375c94
6621621: HashMap front cache should be enabled only with AggressiveOpts
Reviewed-by: sbohne, xlu
author | phh |
---|---|
date | Wed, 05 Dec 2007 09:02:00 -0800 |
parents | a61af66fc99e |
children | 75b0f3cb1943 |
comparison
equal
deleted
inserted
replaced
17:ff5961f4c095 | 18:c7d713375c94 |
---|---|
2923 initialize_class(vmSymbolHandles::java_lang_String(), CHECK_0); | 2923 initialize_class(vmSymbolHandles::java_lang_String(), CHECK_0); |
2924 } else { | 2924 } else { |
2925 warning("java.lang.String not initialized"); | 2925 warning("java.lang.String not initialized"); |
2926 } | 2926 } |
2927 | 2927 |
2928 if (AggressiveOpts) { | |
2929 // Forcibly initialize java/util/HashMap and mutate the private | |
2930 // static final "frontCacheEnabled" field before we start creating instances | |
2931 #ifdef ASSERT | |
2932 klassOop tmp_k = SystemDictionary::find(vmSymbolHandles::java_util_HashMap(), Handle(), Handle(), CHECK_0); | |
2933 assert(tmp_k == NULL, "java/util/HashMap should not be loaded yet"); | |
2934 #endif | |
2935 klassOop k_o = SystemDictionary::resolve_or_null(vmSymbolHandles::java_util_HashMap(), Handle(), Handle(), CHECK_0); | |
2936 KlassHandle k = KlassHandle(THREAD, k_o); | |
2937 guarantee(k.not_null(), "Must find java/util/HashMap"); | |
2938 instanceKlassHandle ik = instanceKlassHandle(THREAD, k()); | |
2939 ik->initialize(CHECK_0); | |
2940 fieldDescriptor fd; | |
2941 // Possible we might not find this field; if so, don't break | |
2942 if (ik->find_local_field(vmSymbols::frontCacheEnabled_name(), vmSymbols::bool_signature(), &fd)) { | |
2943 k()->bool_field_put(fd.offset(), true); | |
2944 } | |
2945 } | |
2946 | |
2928 // Initialize java_lang.System (needed before creating the thread) | 2947 // Initialize java_lang.System (needed before creating the thread) |
2929 if (InitializeJavaLangSystem) { | 2948 if (InitializeJavaLangSystem) { |
2930 initialize_class(vmSymbolHandles::java_lang_System(), CHECK_0); | 2949 initialize_class(vmSymbolHandles::java_lang_System(), CHECK_0); |
2931 initialize_class(vmSymbolHandles::java_lang_ThreadGroup(), CHECK_0); | 2950 initialize_class(vmSymbolHandles::java_lang_ThreadGroup(), CHECK_0); |
2932 Handle thread_group = create_initial_thread_group(CHECK_0); | 2951 Handle thread_group = create_initial_thread_group(CHECK_0); |