comparison src/share/vm/opto/doCall.cpp @ 1206:87684f1a88b5

6614597: Performance variability in jvm2008 xml.validation Summary: Fix incorrect marking of methods as not compilable. Reviewed-by: never
author kvn
date Mon, 01 Feb 2010 16:49:49 -0800
parents c3b315a0d58a
children 576e77447e3c
comparison
equal deleted inserted replaced
1205:5fcfaa1ad96f 1206:87684f1a88b5
180 next_hit_cg = NULL; 180 next_hit_cg = NULL;
181 } 181 }
182 } 182 }
183 } 183 }
184 CallGenerator* miss_cg; 184 CallGenerator* miss_cg;
185 Deoptimization::DeoptReason reason = (profile.morphism() == 2) ?
186 Deoptimization::Reason_bimorphic :
187 Deoptimization::Reason_class_check;
185 if (( profile.morphism() == 1 || 188 if (( profile.morphism() == 1 ||
186 (profile.morphism() == 2 && next_hit_cg != NULL) ) && 189 (profile.morphism() == 2 && next_hit_cg != NULL) ) &&
187 190 !too_many_traps(jvms->method(), jvms->bci(), reason)
188 !too_many_traps(Deoptimization::Reason_class_check)
189
190 // Check only total number of traps per method to allow
191 // the transition from monomorphic to bimorphic case between
192 // compilations without falling into virtual call.
193 // A monomorphic case may have the class_check trap flag is set
194 // due to the time gap between the uncommon trap processing
195 // when flags are set in MDO and the call site bytecode execution
196 // in Interpreter when MDO counters are updated.
197 // There was also class_check trap in monomorphic case due to
198 // the bug 6225440.
199
200 ) { 191 ) {
201 // Generate uncommon trap for class check failure path 192 // Generate uncommon trap for class check failure path
202 // in case of monomorphic or bimorphic virtual call site. 193 // in case of monomorphic or bimorphic virtual call site.
203 miss_cg = CallGenerator::for_uncommon_trap(call_method, 194 miss_cg = CallGenerator::for_uncommon_trap(call_method, reason,
204 Deoptimization::Reason_class_check,
205 Deoptimization::Action_maybe_recompile); 195 Deoptimization::Action_maybe_recompile);
206 } else { 196 } else {
207 // Generate virtual call for class check failure path 197 // Generate virtual call for class check failure path
208 // in case of polymorphic virtual call site. 198 // in case of polymorphic virtual call site.
209 miss_cg = CallGenerator::for_virtual_call(call_method, vtable_index); 199 miss_cg = CallGenerator::for_virtual_call(call_method, vtable_index);