On Wed, 24 Feb 2021 22:28:15 GMT, Martin Doerr <mdo...@openjdk.org> wrote:

>> Lutz Schmidt has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   update copyright year
>
> src/hotspot/share/runtime/java.cpp line 100:
> 
>> 98: int compare_methods(Method** a, Method** b) {
>> 99:   // invocation_count() may have overflowed already. Interpret it's 
>> result as
>> 100:   // unsigned int to shift the limit of meaningless results by a factor 
>> of 2.
> 
> Code is fine, but this comment doesn't make sense to me. The result is the 
> same with your version. But it has the advantage that it avoids signed 
> integer overflow (undefined behavior).

I agree. The comments could be misleading. They are gone.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2511

Reply via email to