RFR: 8271420: Extend CDS custom loader support to Windows platform

Ioi Lam iklam at openjdk.java.net
Tue Nov 2 16:03:14 UTC 2021


On Tue, 2 Nov 2021 00:41:13 GMT, Yumin Qi <minqi at openjdk.org> wrote:

> Currently CDS does not support custom loaders on Windows, this patch extends  the support to Windows 64 bit platform.
> 
> Tests: mach5 tier1-4
> 
> Thanks
> Yumin

Hi Yumin, the changes for custom class loaders look good. However, I think you should revert the INCLUDE_CDS_JAVA_HEAP changes since that's unrelated to custom class loaders.

src/hotspot/share/cds/classListParser.cpp line 449:

> 447: // during archive dumping.
> 448: InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) {
> 449: #if !(defined(_LP64) && (defined(LINUX) || defined(__APPLE__) || defined(_WINDOWS)))

The comments in the two lines below need to be updated.

src/hotspot/share/cds/heapShared.cpp line 283:

> 281:   }
> 282: 
> 283:   int len = (int)obj->size();

This code is used by `INCLUDE_CDS_JAVA_HEAP` and is unrelated to custom class loaders.

src/hotspot/share/classfile/stringTable.cpp line 769:

> 767: 
> 768:   _shared_table.reset();
> 769:   CompactHashtableWriter writer((int)_items_count, ArchiveBuilder::string_stats());

This code is used by `INCLUDE_CDS_JAVA_HEAP` and is unrelated to custom class loaders.

src/hotspot/share/utilities/macros.hpp line 598:

> 596: #define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp)
> 597: 
> 598: #if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64)

This change is unrelated to custom class loaders.

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

Changes requested by iklam (Reviewer).

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


More information about the hotspot-runtime-dev mailing list