JDK-8067012 : Don't create MDO for constant getters
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-12-09
  • Updated: 2015-06-03
  • Resolved: 2015-02-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b55Fixed
Related Reports
Relates :  
Description
The fix for JDK-8056071 introduced method::is_constant_getter() that used in a check that makes methods be compiled on level1 of tiered compilation. As constant getters go on to level 1, there are no need to create MDO for them:

http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/3c858304c7e1/src/share/vm/runtime/advancedThresholdPolicy.cpp#l292

Comments
The fix is simple: diff -r 87900c19db37 src/share/vm/runtime/advancedThresholdPolicy.cpp --- a/src/share/vm/runtime/advancedThresholdPolicy.cpp Fri Dec 05 18:03:15 2014 +0100 +++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp Tue Dec 09 20:03:25 2014 +0300 @@ -289,7 +289,11 @@ // Create MDO if necessary. void AdvancedThresholdPolicy::create_mdo(methodHandle mh, JavaThread* THREAD) { - if (mh->is_native() || mh->is_abstract() || mh->is_accessor()) return; + if (mh->is_native() + || mh->is_abstract() + || mh->is_accessor() + || mh->is_constant_getter()) + return; if (mh->method_data() == NULL) { Method::build_interpreter_method_data(mh, CHECK_AND_CLEAR); }
09-12-2014