src/hotspot/share/oops/methodCounters.hpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Cdiff src/hotspot/share/oops/methodCounters.hpp

src/hotspot/share/oops/methodCounters.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 24,33 **** --- 24,34 ---- #ifndef SHARE_VM_OOPS_METHODCOUNTERS_HPP #define SHARE_VM_OOPS_METHODCOUNTERS_HPP #include "oops/metadata.hpp" + #include "compiler/compilerConfig.hpp" #include "compiler/compilerOracle.hpp" #include "interpreter/invocationCounter.hpp" #include "runtime/arguments.hpp" #include "utilities/align.hpp"
*** 94,116 **** // Set per-method thresholds. double scale = 1.0; CompilerOracle::has_option_value(mh, "CompileThresholdScaling", scale); ! int compile_threshold = Arguments::scaled_compile_threshold(CompileThreshold, scale); _interpreter_invocation_limit = compile_threshold << InvocationCounter::count_shift; if (ProfileInterpreter) { // If interpreter profiling is enabled, the backward branch limit // is compared against the method data counter rather than an invocation // counter, therefore no shifting of bits is required. _interpreter_backward_branch_limit = (compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100; } else { _interpreter_backward_branch_limit = ((compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift; } _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift; ! _invoke_mask = right_n_bits(Arguments::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift; ! _backedge_mask = right_n_bits(Arguments::scaled_freq_log(Tier0BackedgeNotifyFreqLog, scale)) << InvocationCounter::count_shift; } public: virtual bool is_methodCounters() const volatile { return true; } --- 95,117 ---- // Set per-method thresholds. double scale = 1.0; CompilerOracle::has_option_value(mh, "CompileThresholdScaling", scale); ! int compile_threshold = CompilerConfig::scaled_compile_threshold(CompileThreshold, scale); _interpreter_invocation_limit = compile_threshold << InvocationCounter::count_shift; if (ProfileInterpreter) { // If interpreter profiling is enabled, the backward branch limit // is compared against the method data counter rather than an invocation // counter, therefore no shifting of bits is required. _interpreter_backward_branch_limit = (compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100; } else { _interpreter_backward_branch_limit = ((compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift; } _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift; ! _invoke_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift; ! _backedge_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0BackedgeNotifyFreqLog, scale)) << InvocationCounter::count_shift; } public: virtual bool is_methodCounters() const volatile { return true; }
src/hotspot/share/oops/methodCounters.hpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File