comparison src/share/vm/ci/ciMethod.cpp @ 780:c96bf21b756f

6788527: Server vm intermittently fails with assertion "live value must not be garbage" with fastdebug bits Summary: Cache Jvmti and DTrace flags used by Compiler. Reviewed-by: never
author kvn
date Fri, 08 May 2009 10:44:20 -0700
parents e5b0439ef4ae
children 3a2aa26bdc58
comparison
equal deleted inserted replaced
779:d0e0d6d824d8 780:c96bf21b756f
58 _method_blocks = NULL; 58 _method_blocks = NULL;
59 #ifdef COMPILER2 59 #ifdef COMPILER2
60 _flow = NULL; 60 _flow = NULL;
61 #endif // COMPILER2 61 #endif // COMPILER2
62 62
63 if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) { 63 ciEnv *env = CURRENT_ENV;
64 if (env->jvmti_can_hotswap_or_post_breakpoint() && _is_compilable) {
64 // 6328518 check hotswap conditions under the right lock. 65 // 6328518 check hotswap conditions under the right lock.
65 MutexLocker locker(Compile_lock); 66 MutexLocker locker(Compile_lock);
66 if (Dependencies::check_evol_method(h_m()) != NULL) { 67 if (Dependencies::check_evol_method(h_m()) != NULL) {
67 _is_compilable = false; 68 _is_compilable = false;
68 } 69 }
82 if (!_can_be_statically_bound && h_m()->is_private()) 83 if (!_can_be_statically_bound && h_m()->is_private())
83 _can_be_statically_bound = true; 84 _can_be_statically_bound = true;
84 if (_can_be_statically_bound && h_m()->is_abstract()) 85 if (_can_be_statically_bound && h_m()->is_abstract())
85 _can_be_statically_bound = false; 86 _can_be_statically_bound = false;
86 87
87 ciEnv *env = CURRENT_ENV;
88 // generating _signature may allow GC and therefore move m. 88 // generating _signature may allow GC and therefore move m.
89 // These fields are always filled in. 89 // These fields are always filled in.
90 _name = env->get_object(h_m()->name())->as_symbol(); 90 _name = env->get_object(h_m()->name())->as_symbol();
91 _holder = env->get_object(h_m()->method_holder())->as_instance_klass(); 91 _holder = env->get_object(h_m()->method_holder())->as_instance_klass();
92 ciSymbol* sig_symbol = env->get_object(h_m()->signature())->as_symbol(); 92 ciSymbol* sig_symbol = env->get_object(h_m()->signature())->as_symbol();
335 Arena* arena = CURRENT_ENV->arena(); 335 Arena* arena = CURRENT_ENV->arena();
336 _liveness = new (arena) MethodLiveness(arena, this); 336 _liveness = new (arena) MethodLiveness(arena, this);
337 _liveness->compute_liveness(); 337 _liveness->compute_liveness();
338 } 338 }
339 MethodLivenessResult result = _liveness->get_liveness_at(bci); 339 MethodLivenessResult result = _liveness->get_liveness_at(bci);
340 if (JvmtiExport::can_access_local_variables() || DeoptimizeALot || CompileTheWorld) { 340 if (CURRENT_ENV->jvmti_can_access_local_variables() || DeoptimizeALot || CompileTheWorld) {
341 // Keep all locals live for the user's edification and amusement. 341 // Keep all locals live for the user's edification and amusement.
342 result.at_put_range(0, result.size(), true); 342 result.at_put_range(0, result.size(), true);
343 } 343 }
344 return result; 344 return result;
345 } 345 }