equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP |
25 #ifndef SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP |
26 #define SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP |
26 #define SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP |
27 |
27 |
|
28 #include "compiler/compilerOracle.hpp" |
|
29 |
28 template<CompLevel level> |
30 template<CompLevel level> |
29 bool SimpleThresholdPolicy::call_predicate_helper(int i, int b, double scale) { |
31 bool SimpleThresholdPolicy::call_predicate_helper(int i, int b, double scale, Method* method) { |
|
32 double threshold_scaling; |
|
33 if (CompilerOracle::has_option_value(method, "CompileThresholdScaling", threshold_scaling)) { |
|
34 scale *= threshold_scaling; |
|
35 } |
30 switch(level) { |
36 switch(level) { |
31 case CompLevel_none: |
37 case CompLevel_none: |
32 case CompLevel_limited_profile: |
38 case CompLevel_limited_profile: |
33 return (i >= Tier3InvocationThreshold * scale) || |
39 return (i >= Tier3InvocationThreshold * scale) || |
34 (i >= Tier3MinInvocationThreshold * scale && i + b >= Tier3CompileThreshold * scale); |
40 (i >= Tier3MinInvocationThreshold * scale && i + b >= Tier3CompileThreshold * scale); |
38 } |
44 } |
39 return true; |
45 return true; |
40 } |
46 } |
41 |
47 |
42 template<CompLevel level> |
48 template<CompLevel level> |
43 bool SimpleThresholdPolicy::loop_predicate_helper(int i, int b, double scale) { |
49 bool SimpleThresholdPolicy::loop_predicate_helper(int i, int b, double scale, Method* method) { |
|
50 double threshold_scaling; |
|
51 if (CompilerOracle::has_option_value(method, "CompileThresholdScaling", threshold_scaling)) { |
|
52 scale *= threshold_scaling; |
|
53 } |
44 switch(level) { |
54 switch(level) { |
45 case CompLevel_none: |
55 case CompLevel_none: |
46 case CompLevel_limited_profile: |
56 case CompLevel_limited_profile: |
47 return b >= Tier3BackEdgeThreshold * scale; |
57 return b >= Tier3BackEdgeThreshold * scale; |
48 case CompLevel_full_profile: |
58 case CompLevel_full_profile: |