8067012: Don't create MDO for constant getters
authorppunegov
Wed, 18 Feb 2015 16:59:56 +0300
changeset 29335 6af23ac5a762
parent 29334 e9f65377a695
child 29336 b287769dcff1
8067012: Don't create MDO for constant getters Summary: Add check if the method is constant getter Reviewed-by: kvn, iveresov
hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp
--- a/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Feb 18 16:19:48 2015 +0300
+++ b/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Feb 18 16:59:56 2015 +0300
@@ -289,7 +289,12 @@
 
 // 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);
   }