diff --git a/src/share/vm/c1/c1_LIRGenerator.cpp b/src/share/vm/c1/c1_LIRGenerator.cpp index 676efe3f7bb2e4fe7593d1fad33fd060e9625249..c2c2f7c7fa81593971249fea99e168c6970dd40a 100644 --- a/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/src/share/vm/c1/c1_LIRGenerator.cpp @@ -2970,8 +2970,8 @@ void LIRGenerator::do_ProfileInvoke(ProfileInvoke* x) { // accessors are also always mature. if (!x->inlinee()->is_accessor()) { CodeEmitInfo* info = state_for(x, x->state(), true); - // Increment invocation counter, don't notify the runtime, because we don't inline loops, - increment_event_counter_impl(info, x->inlinee(), 0, InvocationEntryBci, false, false); + // Notify the runtime very infrequently only to take care of counter overflows + increment_event_counter_impl(info, x->inlinee(), (1 << Tier23InlineeNotifyFreqLog) - 1, InvocationEntryBci, false, true); } } diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp index 94d8100b7523dc0f473158e1371a8a64b54b4c32..e4ba36a5633445f567c7a65452406ee96bdf783e 100644 --- a/src/share/vm/runtime/globals.hpp +++ b/src/share/vm/runtime/globals.hpp @@ -3521,6 +3521,9 @@ class CommandLineFlags { "C1 with MDO profiling (tier 3) invocation notification " \ "frequency.") \ \ + product(intx, Tier23InlineeNotifyFreqLog, 20, \ + "Inlinee invocation (tiers 2 and 3) notification frequency") \ + \ product(intx, Tier0BackedgeNotifyFreqLog, 10, \ "Interpreter (tier 0) invocation notification frequency.") \ \