RFR: 8349007: The jtreg test ResolvedMethodTableHash takes excessive time

Coleen Phillimore coleenp at openjdk.org
Thu Apr 3 20:38:56 UTC 2025


On Thu, 3 Apr 2025 19:44:46 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> This is mostly test change.  ResolvedMethodTableHash.java is run /manual but still takes a long time and doesn't really verify that the hash code is any good.  This add logging, triggers concurrent work like other ConcurrentHashtables, and checks that a small table is not rehashed.
>> Tested with tier1 (including test).
>
> test/hotspot/jtreg/runtime/MemberName/ResolvedMethodTableHash.java line 52:
> 
>> 50:     public static class ResolvedMethodTableHashTest extends ClassLoader {
>> 51:         // Generate a MethodHandle for ClassName.m()
>> 52:         private MethodHandle generate(String className) throws ReflectiveOperationException {
> 
> The indentation is wrong in line 53, 60, 70, 71, 96, 102, might be other places also.

My indent script was a bit too agressive.

> test/hotspot/jtreg/runtime/MemberName/ResolvedMethodTableHash.java line 99:
> 
>> 97:                 List<MethodHandle> handles = new ArrayList<>();
>> 98: 
>> 99:                 int count = args.length > 0 ? Integer.parseInt(args[0]) : 200000;
> 
> no need to check args and have default 20000, it is not executed, actually.
> might be just hardcode 1000 here?

I fixed this to hardcode 1001 (want 1001 iterations to print the message).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24383#discussion_r2027705925
PR Review Comment: https://git.openjdk.org/jdk/pull/24383#discussion_r2027705447


More information about the hotspot-dev mailing list