RFR: 8085805: aarch64: AdvancedThresholdPolicy lacks tuning of InlineSmallCode size

Edward Nevill edward.nevill at linaro.org
Wed Jun 10 12:58:51 UTC 2015


Hi,

http://cr.openjdk.java.net/~enevill/8085805/webrev/

adds tuning of InlineSmallCode for aarch64.

src/share/vm/runtime/advancedThresholdPolicy.cpp contains the following code which tunes the value of InlineSmallCode for X86 and SPARC.

  // Some inlining tuning
#ifdef X86
  if (FLAG_IS_DEFAULT(InlineSmallCode)) {
    FLAG_SET_DEFAULT(InlineSmallCode, 2000);
  }
#endif

#ifdef SPARC
  if (FLAG_IS_DEFAULT(InlineSmallCode)) {
    FLAG_SET_DEFAULT(InlineSmallCode, 2500);
  }
#endif

  set_increase_threshold_at_ratio();
  set_start_time(os::javaTimeMillis());
}

This webrev proposes changing this so that InlineSmallCode is increased to 2500 on aarch64 rather than the default of 1000. The change is simply to add AARCH64 to the conditional. IE.

#if defined SPARC || defined AARCH64
  if (FLAG_IS_DEFAULT(InlineSmallCode)) {
    FLAG_SET_DEFAULT(InlineSmallCode, 2500);
  }
#endif

This change request was triggered by one of our partners reporting a 6x improvement in one benchmark when the size of InlineSmallCode is increased.

I have done some testing to find the optimal size of InlineCodeSize for aarch64. The following shows the performance of various benchmarks against different sizes of InlineSmallCode.

InlineSmallCode    100   1000   1500   2000   2500   3000   5000

Grinderbench    440543 589792 595603 659213 665973 664663 667865
Stringtest       65182  65304  65211 339946 329314 326831 296886
SpecJVM2008       76.4   90.8   90.9   91.9   89.6   89.2   88.3

The optimal value seems to be about 2000/2500. I have elected for the slightly higher value.

Tested with JTreg/hotspot. In both cases, before and after the patch

Test results: passed: 845; failed: 12; error: 6

Please review,
Thanks,
Ed.





More information about the hotspot-dev mailing list