From 3c7858c285433449630acfbd1648ab974b5c07e3 Mon Sep 17 00:00:00 2001 From: Jie Fu Date: Sat, 15 Feb 2020 17:35:57 +0800 Subject: [PATCH] 8239110: Zero VM build fails after JDK-8203883 Reviewed-by: aph --- .../share/interpreter/invocationCounter.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/interpreter/invocationCounter.cpp b/src/hotspot/share/interpreter/invocationCounter.cpp index fb9fb34220d..e5a5fd2c2d9 100644 --- a/src/hotspot/share/interpreter/invocationCounter.cpp +++ b/src/hotspot/share/interpreter/invocationCounter.cpp @@ -88,18 +88,24 @@ int InvocationCounter::InterpreterBackwardBranchLimit; void invocationCounter_init() { #ifdef CC_INTERP - InterpreterInvocationLimit = CompileThreshold << number_of_noncount_bits; + InvocationCounter::InterpreterInvocationLimit = + CompileThreshold << InvocationCounter::count_shift; // When methodData is collected, the backward branch limit is compared against a // methodData counter, rather than an InvocationCounter. In the former case, we // don't need the shift by number_of_noncount_bits, but we do need to adjust // the factor by which we scale the threshold. if (ProfileInterpreter) { - InterpreterBackwardBranchLimit = (int)((int64_t)CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100); + InvocationCounter::InterpreterBackwardBranchLimit = + (int)((int64_t)CompileThreshold + * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100); } else { - InterpreterBackwardBranchLimit = (int)(((int64_t)CompileThreshold * OnStackReplacePercentage / 100) << number_of_noncount_bits); + InvocationCounter::InterpreterBackwardBranchLimit = + (int)(((int64_t)CompileThreshold * OnStackReplacePercentage / 100) + << InvocationCounter::count_shift); } - assert(0 <= InterpreterBackwardBranchLimit, "OSR threshold should be non-negative"); + assert(0 <= InvocationCounter::InterpreterBackwardBranchLimit, + "OSR threshold should be non-negative"); #endif }