comparison src/share/vm/runtime/simpleThresholdPolicy.inline.hpp @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents f2bdbfe9201b 600c44255e5f
children be896a1983c0
comparison
equal deleted inserted replaced
20184:84105dcdb05b 20804:7848fc12602b
52 } 52 }
53 53
54 // Simple methods are as good being compiled with C1 as C2. 54 // Simple methods are as good being compiled with C1 as C2.
55 // Determine if a given method is such a case. 55 // Determine if a given method is such a case.
56 bool SimpleThresholdPolicy::is_trivial(Method* method) { 56 bool SimpleThresholdPolicy::is_trivial(Method* method) {
57 if (method->is_accessor()) return true; 57 if (method->is_accessor() ||
58 method->is_constant_getter()) {
59 return true;
60 }
58 #ifdef COMPILERGRAAL 61 #ifdef COMPILERGRAAL
59 if (TieredCompilation && GraalCompileWithC1Only && 62 if (TieredCompilation && GraalCompileWithC1Only &&
60 SystemDictionary::graal_loader() != NULL && 63 SystemDictionary::graal_loader() != NULL &&
61 method->method_holder()->class_loader() == SystemDictionary::graal_loader()) { 64 method->method_holder()->class_loader() == SystemDictionary::graal_loader()) {
62 return true; 65 return true;
63 } 66 }
64 #endif 67 #endif
65 if (method->code() != NULL) { 68 if (method->has_loops() || method->code_size() >= 15) {
66 MethodData* mdo = method->method_data(); 69 return false;
67 if (mdo != NULL && mdo->num_loops() == 0 && 70 }
68 (method->code_size() < 5 || (mdo->num_blocks() < 4) && (method->code_size() < 15))) { 71 MethodData* mdo = method->method_data();
69 return !mdo->would_profile(); 72 if (mdo != NULL && !mdo->would_profile() &&
70 } 73 (method->code_size() < 5 || (mdo->num_blocks() < 4))) {
74 return true;
71 } 75 }
72 return false; 76 return false;
73 } 77 }
74 78
75 #endif // SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP 79 #endif // SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP