8067012: Don't create MDO for constant getters
Summary: Add check if the method is constant getter
Reviewed-by: kvn, iveresov
--- 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);
}