--- a/hotspot/src/share/vm/ci/ciCallProfile.hpp Fri Sep 02 04:28:59 2011 -0700
+++ b/hotspot/src/share/vm/ci/ciCallProfile.hpp Fri Sep 02 20:58:21 2011 -0700
@@ -79,6 +79,17 @@
assert(i < _limit, "out of Call Profile MorphismLimit");
return _receiver[i];
}
+
+ // Rescale the current profile based on the incoming scale
+ ciCallProfile rescale(double scale) {
+ assert(scale >= 0 && scale <= 1.0, "out of range");
+ ciCallProfile call = *this;
+ call._count = (int)(call._count * scale);
+ for (int i = 0; i < _morphism; i++) {
+ call._receiver_count[i] = (int)(call._receiver_count[i] * scale);
+ }
+ return call;
+ }
};
#endif // SHARE_VM_CI_CICALLPROFILE_HPP