--- old/src/hotspot/share/ci/ciMethod.hpp 2019-05-31 20:41:47.935555177 +0800 +++ new/src/hotspot/share/ci/ciMethod.hpp 2019-05-31 20:41:47.699554761 +0800 @@ -126,6 +126,12 @@ void assert_virtual_call_type_ok(int bci); void assert_call_type_ok(int bci); + // Update profile counters with saturating addition + template int saturated_add(L a, R b); + + // Check and update the profile counter in case of overflow + int check_overflow(int c, int bci); + public: void check_is_loaded() const { assert(is_loaded(), "not loaded"); }