comparison src/share/vm/ci/ciCallProfile.hpp @ 3905:c26de9aef2ed

7071307: MethodHandle bimorphic inlining should consider the frequency Reviewed-by: twisti, roland, kvn, iveresov
author never
date Fri, 02 Sep 2011 20:58:21 -0700
parents f918d6096e23
children 04b9a2566eec
comparison
equal deleted inserted replaced
3902:11a4af030e4b 3905:c26de9aef2ed
77 } 77 }
78 ciKlass* receiver(int i) { 78 ciKlass* receiver(int i) {
79 assert(i < _limit, "out of Call Profile MorphismLimit"); 79 assert(i < _limit, "out of Call Profile MorphismLimit");
80 return _receiver[i]; 80 return _receiver[i];
81 } 81 }
82
83 // Rescale the current profile based on the incoming scale
84 ciCallProfile rescale(double scale) {
85 assert(scale >= 0 && scale <= 1.0, "out of range");
86 ciCallProfile call = *this;
87 call._count = (int)(call._count * scale);
88 for (int i = 0; i < _morphism; i++) {
89 call._receiver_count[i] = (int)(call._receiver_count[i] * scale);
90 }
91 return call;
92 }
82 }; 93 };
83 94
84 #endif // SHARE_VM_CI_CICALLPROFILE_HPP 95 #endif // SHARE_VM_CI_CICALLPROFILE_HPP