RFR: 8202750: Reduce the use of get_canonical_path() in CDS [v2]
Ioi Lam
iklam at openjdk.java.net
Wed Feb 17 22:24:40 UTC 2021
On Wed, 17 Feb 2021 16:45:54 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> Please review this proposed change which includes:
>>
>> - replace calls to `get_canonical_path()` with `ClassLoader::get_native_path()` which calls `os::native_path()`;
>> - factor out some code for opening a zip file into `ClassLoader::open_zip_file()`;
>> - modify `ClassLoader::get_canonical_path()` so that all buffer allocations are within the function.
>>
>> Testing: Tiers 1 - 4.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>
> per review comments from @iklam
Marked as reviewed by iklam (Reviewer).
src/hotspot/os/windows/os_windows.cpp line 4488:
> 4486: native_file1 = os::native_path(native_file1);
> 4487: char* native_file2 = os::strdup(file2);
> 4488: native_file2 = os::native_path(native_file2);
`os::strdup` should `be os::strdup_check_oom`
Other than that, this PR looks good.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2581
More information about the hotspot-runtime-dev
mailing list