< prev index next >

src/share/vm/runtime/advancedThresholdPolicy.cpp

Print this page




  30 // Print an event.
  31 void AdvancedThresholdPolicy::print_specific(EventType type, methodHandle mh, methodHandle imh,
  32                                              int bci, CompLevel level) {
  33   tty->print(" rate=");
  34   if (mh->prev_time() == 0) tty->print("n/a");
  35   else tty->print("%f", mh->rate());
  36 
  37   tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
  38                                threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
  39 
  40 }
  41 
  42 void AdvancedThresholdPolicy::initialize() {
  43   // Turn on ergonomic compiler count selection
  44   if (FLAG_IS_DEFAULT(CICompilerCountPerCPU) && FLAG_IS_DEFAULT(CICompilerCount)) {
  45     FLAG_SET_DEFAULT(CICompilerCountPerCPU, true);
  46   }
  47   int count = CICompilerCount;
  48   if (CICompilerCountPerCPU) {
  49     // Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n
  50     int log_cpu = log2_intptr(os::active_processor_count());
  51     int loglog_cpu = log2_intptr(MAX2(log_cpu, 1));
  52     count = MAX2(log_cpu * loglog_cpu, 1) * 3 / 2;
  53   }
  54 
  55   set_c1_count(MAX2(count / 3, 1));
  56   set_c2_count(MAX2(count - c1_count(), 1));
  57   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
  58 
  59   // Some inlining tuning
  60 #ifdef X86
  61   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  62     FLAG_SET_DEFAULT(InlineSmallCode, 2000);
  63   }
  64 #endif
  65 
  66 #ifdef SPARC
  67   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  68     FLAG_SET_DEFAULT(InlineSmallCode, 2500);
  69   }
  70 #endif
  71 




  30 // Print an event.
  31 void AdvancedThresholdPolicy::print_specific(EventType type, methodHandle mh, methodHandle imh,
  32                                              int bci, CompLevel level) {
  33   tty->print(" rate=");
  34   if (mh->prev_time() == 0) tty->print("n/a");
  35   else tty->print("%f", mh->rate());
  36 
  37   tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
  38                                threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
  39 
  40 }
  41 
  42 void AdvancedThresholdPolicy::initialize() {
  43   // Turn on ergonomic compiler count selection
  44   if (FLAG_IS_DEFAULT(CICompilerCountPerCPU) && FLAG_IS_DEFAULT(CICompilerCount)) {
  45     FLAG_SET_DEFAULT(CICompilerCountPerCPU, true);
  46   }
  47   int count = CICompilerCount;
  48   if (CICompilerCountPerCPU) {
  49     // Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n
  50     int log_cpu = log2_int(os::active_processor_count());
  51     int loglog_cpu = log2_int(MAX2(log_cpu, 1));
  52     count = MAX2(log_cpu * loglog_cpu, 1) * 3 / 2;
  53   }
  54 
  55   set_c1_count(MAX2(count / 3, 1));
  56   set_c2_count(MAX2(count - c1_count(), 1));
  57   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
  58 
  59   // Some inlining tuning
  60 #ifdef X86
  61   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  62     FLAG_SET_DEFAULT(InlineSmallCode, 2000);
  63   }
  64 #endif
  65 
  66 #ifdef SPARC
  67   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  68     FLAG_SET_DEFAULT(InlineSmallCode, 2500);
  69   }
  70 #endif
  71 


< prev index next >