RFR: 8324584: Optimize Symbol and char* handling in ClassLoader [v2]

David Holmes dholmes at openjdk.org
Thu Feb 8 23:43:04 UTC 2024


On Thu, 8 Feb 2024 18:11:11 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> The call to `ClassLoader::load_class()` currently takes a Symbol* for the name and later extracts the string only to change it back into a Symbol* inside `ClassLoader::search_module_entries()` while also recalculating the package entry. This patch simply passes the string directly along with the package entry from the caller. Verified with tier1-5 tests.
>
> Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Fixed comment
>  - Merge branch 'master' into optimize_symbol_char_handling_8324584
>  - Removed unused argument
>  - Passed package entry in arguments
>  - Merge branch 'master' into optimize_symbol_char_handling_8324584
>  - 8324584: Optimize Symbol and char* handling in ClassLoader

src/hotspot/share/classfile/classLoader.cpp line 1038:

> 1036:   ClassFileStream* stream = nullptr;
> 1037: 
> 1038:   // Find the class' defining module in the boot loader's module entry table

Comment needs updating

src/hotspot/share/classfile/classLoader.hpp line 295:

> 293:   static void add_to_exploded_build_list(JavaThread* current, Symbol* module_name);
> 294: 
> 295:   // Attempt load of individual class from either the patched or exploded modules build lists

Can we document what  the pkg_entry represents please.

src/hotspot/share/classfile/classLoader.hpp line 301:

> 299:                                                 const char* const file_name);
> 300: 
> 301:   // Load individual .class file

Again document pkg_entry please.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17761#discussion_r1483705271
PR Review Comment: https://git.openjdk.org/jdk/pull/17761#discussion_r1483706812
PR Review Comment: https://git.openjdk.org/jdk/pull/17761#discussion_r1483707073


More information about the hotspot-runtime-dev mailing list