Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_LIRGenerator.cpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | be4ca325525a 973293defacd |
children | 33df1aeaebbf |
comparison
equal
deleted
inserted
replaced
3737:9dc19b7d89a3 | 4137:04b9a2566eec |
---|---|
427 if (bci == SynchronizationEntryBCI) { | 427 if (bci == SynchronizationEntryBCI) { |
428 if (x->as_ExceptionObject() || x->as_Throw()) { | 428 if (x->as_ExceptionObject() || x->as_Throw()) { |
429 // all locals are dead on exit from the synthetic unlocker | 429 // all locals are dead on exit from the synthetic unlocker |
430 liveness.clear(); | 430 liveness.clear(); |
431 } else { | 431 } else { |
432 assert(x->as_MonitorEnter(), "only other case is MonitorEnter"); | 432 assert(x->as_MonitorEnter() || x->as_ProfileInvoke(), "only other cases are MonitorEnter and ProfileInvoke"); |
433 } | 433 } |
434 } | 434 } |
435 if (!liveness.is_valid()) { | 435 if (!liveness.is_valid()) { |
436 // Degenerate or breakpointed method. | 436 // Degenerate or breakpointed method. |
437 bailout("Degenerate or breakpointed method"); | 437 bailout("Degenerate or breakpointed method"); |
2491 if (x->is_safepoint()) { | 2491 if (x->is_safepoint()) { |
2492 ValueStack* state = x->state_before() ? x->state_before() : x->state(); | 2492 ValueStack* state = x->state_before() ? x->state_before() : x->state(); |
2493 | 2493 |
2494 // increment backedge counter if needed | 2494 // increment backedge counter if needed |
2495 CodeEmitInfo* info = state_for(x, state); | 2495 CodeEmitInfo* info = state_for(x, state); |
2496 increment_backedge_counter(info, info->stack()->bci()); | 2496 increment_backedge_counter(info, x->profiled_bci()); |
2497 CodeEmitInfo* safepoint_info = state_for(x, state); | 2497 CodeEmitInfo* safepoint_info = state_for(x, state); |
2498 __ safepoint(safepoint_poll_register(), safepoint_info); | 2498 __ safepoint(safepoint_poll_register(), safepoint_info); |
2499 } | 2499 } |
2500 | 2500 |
2501 // Gotos can be folded Ifs, handle this case. | 2501 // Gotos can be folded Ifs, handle this case. |
2968 void LIRGenerator::do_ProfileInvoke(ProfileInvoke* x) { | 2968 void LIRGenerator::do_ProfileInvoke(ProfileInvoke* x) { |
2969 // We can safely ignore accessors here, since c2 will inline them anyway, | 2969 // We can safely ignore accessors here, since c2 will inline them anyway, |
2970 // accessors are also always mature. | 2970 // accessors are also always mature. |
2971 if (!x->inlinee()->is_accessor()) { | 2971 if (!x->inlinee()->is_accessor()) { |
2972 CodeEmitInfo* info = state_for(x, x->state(), true); | 2972 CodeEmitInfo* info = state_for(x, x->state(), true); |
2973 // Increment invocation counter, don't notify the runtime, because we don't inline loops, | 2973 // Notify the runtime very infrequently only to take care of counter overflows |
2974 increment_event_counter_impl(info, x->inlinee(), 0, InvocationEntryBci, false, false); | 2974 increment_event_counter_impl(info, x->inlinee(), (1 << Tier23InlineeNotifyFreqLog) - 1, InvocationEntryBci, false, true); |
2975 } | 2975 } |
2976 } | 2976 } |
2977 | 2977 |
2978 void LIRGenerator::increment_event_counter(CodeEmitInfo* info, int bci, bool backedge) { | 2978 void LIRGenerator::increment_event_counter(CodeEmitInfo* info, int bci, bool backedge) { |
2979 int freq_log; | 2979 int freq_log; |