RFR: 8263131: reduce unnecessary downwards search when using linear search to find method
Lehua Ding
github.com+13173904+lhtin at openjdk.java.net
Sat Mar 6 14:47:12 UTC 2021
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
-------------
Commit messages:
- reduce unnecessary downwards search when using linear search to find method
Changes: https://git.openjdk.java.net/jdk/pull/2857/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2857&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8263131
Stats: 8 lines in 1 file changed: 5 ins; 1 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/2857.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2857/head:pull/2857
PR: https://git.openjdk.java.net/jdk/pull/2857
More information about the hotspot-runtime-dev
mailing list