RFR: 8263131: reduce unnecessary downwards search when using linear search to find method

Ioi Lam iklam at openjdk.java.net
Mon Mar 8 19:32:05 UTC 2021


On Mon, 8 Mar 2021 19:29:01 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Hi,
>> 
>> The `InstanceKlass::find_method_by_name` and `InstanceKlass::find_method_index` use `InstanceKlass::quick_search` to find a method by name. If the method found doesn't match the expected method signature, It has to search downwards and upwards. But if `_disable_method_binary_search` was set to `true`, the `InstanceKlass::quick_search` will use linear search instead of binary search to find the method. So there no needs to search downwards because there no other method with the same name before it since the method found is the first matched method.
>> 
>> Best regards,
>> Lehua
>
> Marked as reviewed by iklam (Reviewer).

> @iklam Thank you for your review. `jtreg:hotspot_cds` tests were passed with macosx-x86_64-server-{release, fastdebug, slowdebug} on my machine. Is there other tests or platform I have to run? Or any standard test platform I can use instead of my machine?

I think this should be enough. Thanks!

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

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


More information about the hotspot-runtime-dev mailing list