src/share/vm/runtime/advancedThresholdPolicy.cpp

changeset 9637
eef07cd490d4
parent 7535
7ae4e26cb1e0
parent 9614
bb44c0e88235
child 9703
2fdf635bcf28
     1.1 --- a/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Jul 03 20:04:13 2019 +0800
     1.2 +++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Jul 03 20:42:37 2019 +0800
     1.3 @@ -47,8 +47,8 @@
     1.4    int count = CICompilerCount;
     1.5    if (CICompilerCountPerCPU) {
     1.6      // Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n
     1.7 -    int log_cpu = log2_intptr(os::active_processor_count());
     1.8 -    int loglog_cpu = log2_intptr(MAX2(log_cpu, 1));
     1.9 +    int log_cpu = log2_int(os::active_processor_count());
    1.10 +    int loglog_cpu = log2_int(MAX2(log_cpu, 1));
    1.11      count = MAX2(log_cpu * loglog_cpu, 1) * 3 / 2;
    1.12    }
    1.13  
    1.14 @@ -131,7 +131,8 @@
    1.15  }
    1.16  
    1.17  double AdvancedThresholdPolicy::weight(Method* method) {
    1.18 -  return (method->rate() + 1) * ((method->invocation_count() + 1) *  (method->backedge_count() + 1));
    1.19 +  return (double)(method->rate() + 1) *
    1.20 +    (method->invocation_count() + 1) * (method->backedge_count() + 1);
    1.21  }
    1.22  
    1.23  // Apply heuristics and return true if x should be compiled before y

mercurial