113 Commits

Author SHA1 Message Date
Yumin Qi
f978f6fe8a 8252689: Classes are loaded from jrt:/java.base even when CDS is used
Reviewed-by: iklam, ccheung
2020-09-14 03:39:13 +00:00
Ioi Lam
c5e63b639e 8248186: Move CDS C++ vtable code to cppVtables.cpp
Reviewed-by: coleenp
2020-09-13 19:20:45 +00:00
Ioi Lam
03a4df0acd 8244778: Archive full module graph in CDS
Reviewed-by: erikj, coleenp, lfoltan, redestad, alanb, mchung
2020-09-13 14:45:12 +00:00
Calvin Cheung
0e42d5c4ae 8251860: ClassLoaderData::loaded_classes_do fails with "assert(ZAddress::is_marked(addr)) failed: Should be marked"
Call ClassLoaderDataGraph::loaded_cld_do to collect ClassLoaderData in a GrowableArray and then walk through them to link the classes in each ClassLoaderData.

Reviewed-by: coleenp, iklam
2020-09-01 15:42:30 +00:00
Ioi Lam
9523001f65 8251557: Avoid dumping unused symbols/strings into the CDS archive
Reviewed-by: minqi, ccheung
2020-08-27 22:24:28 -07:00
Ioi Lam
e4eaa2377b 8252056: Move DumpRegion/ReadClosure/WriteClosure to archiveUtils.hpp
Reviewed-by: ccheung, minqi
2020-08-22 17:09:41 -07:00
Ioi Lam
35e3226df8 8250990: Consolidate object copying code for CDS static/dynamic archive dumping
Reviewed-by: coleenp, ccheung
2020-08-13 18:40:51 -07:00
Coleen Phillimore
ac4dc0470e 8250519: [REDO] Move mirror oops from Universe into OopStorage
Redo the patch but add a null pointer check where one belongs.

Reviewed-by: dcubed, iklam, dholmes
2020-07-25 10:36:19 -04:00
Coleen Phillimore
cbf6894299 8250516: [BACKOUT] Move mirror oops from Universe into OopStorage
Reviewed-by: dholmes, tschatzl
2020-07-24 10:34:11 -04:00
Coleen Phillimore
bd12e85975 8249938: Move mirror oops from Universe into OopStorage
Save and restore mirror oops to temporary array for CDS, and move them to OopStorage once restored.

Reviewed-by: iklam, dholmes
2020-07-24 08:32:27 -04:00
Ioi Lam
d7b097f117 8244764: Improve assertion for CPP_VTABLE_PATCH_TYPES_DO
Reviewed-by: lfoltan, coleenp
2020-07-07 23:11:13 -07:00
Yumin Qi
0e60e8ad85 8246181: Avoid walking SymbolTable during -Xshare:dump
All symbols at dump are created as permanent. Store them in a global array to avoid working SymbolTable.

Reviewed-by: iklam, ccheung
2020-06-24 11:15:22 -07:00
Stefan Karlsson
ef3b0ec567 8247755: Leaner and more versatile GrowableArray classes
Reviewed-by: kbarrett, coleenp
2020-06-24 13:16:52 +02:00
Stefan Karlsson
77bdc30650 8247470: Fix CHeap GrowableArray NMT accounting
Reviewed-by: coleenp, tschatzl, kbarrett
2020-06-16 09:37:53 +02:00
Jesper Wilhelmsson
e33ebc7f0a Merge 2020-06-16 04:20:30 +02:00
Jie Fu
ca85c5ab15 8247522: assert(is_aligned(class_space_rs.base(), class_space_alignment)) failed: Sanity
Co-authored-by: Thomas Stuefe <thomas.stuefe@gmail.com>
Reviewed-by: stuefe, iklam
2020-06-13 23:10:26 +08:00
Ioi Lam
c82c50b2a2 8245925: G1 allocates EDEN region after CDS has executed GC
Reviewed-by: jiangli, minqi, tschatzl
2020-06-14 01:19:48 -07:00
Calvin Cheung
30ff2ad58c 8246382: assert in MetaspaceShared::map_archives
Perform base archive header CRC check earlier.

Reviewed-by: iklam, coleenp
2020-06-11 15:47:36 +00:00
Thomas Stuefe
2085fd32ff 8247252: TestCombinedCompressedFlags.java failed src/hotspot/share/services/virtualMemoryTracker.cpp:388 Error: ShouldNotReachHere()
Reviewed-by: minqi, dholmes
2020-06-11 12:51:09 +02:00
Yumin Qi
96fadefaa3 8240245: Avoid calling is_shared_class_visible() in SystemDictionary::load_shared_class()
SystemDitionary::load_shared_class can avoid calling is_shared_class_visible if dumptime and runtime do not use modulepath and boot classpath appending.

Reviewed-by: iklam, ccheung
2020-06-10 23:16:27 -07:00
Thomas Stuefe
8dc66431d4 8243535: NMT may show wrong numbers for CDS and CCS
Reviewed-by: zgu, iklam
2020-06-09 08:41:33 +02:00
Ioi Lam
f39a71cafe 8243506: SharedBaseAddress is ignored by -Xshare:dump
Reviewed-by: stuefe, ccheung
2020-06-02 01:08:44 -07:00
Yumin Qi
e6855f20b0 8245264: Test runtime/cds/appcds/SignedJar.java fails
Concurrent work of symbol table caused _shared_table not walkable in dumping archive which led symbols not sorted in shared archive. Change to use do_safepoint_scan of _local_table to collect symbols.

Reviewed-by: iklam, ccheung
2020-05-27 16:04:28 -07:00
Aleksey Shipilev
008d69e5e2 8245703: 32-bit build failures after JDK-8243392
Reviewed-by: dholmes, stuefe
2020-05-25 11:04:08 +02:00
Thomas Stuefe
04e6b743db 8243392: Remodel CDS/Metaspace storage reservation
Reviewed-by: iklam, coleenp, ngasson, aph
2020-05-24 19:25:29 +02:00
Ioi Lam
eadcb08c3c 8241071: Generation of classes.jsa with -Xshare:dump is not deterministic
Reviewed-by: dholmes, stuefe
2020-05-05 11:10:02 -07:00
Calvin Cheung
e509368fa1 8233093: Move CDS heap oopmaps into new MetaspaceShared::bm region
Moved the _closed_archive_heap_oopmaps and _open_archive_heap_oopmaps from the ro to the bm region.

Reviewed-by: iklam, minqi
2020-03-26 10:14:52 -07:00
Calvin Cheung
38940d166a 8238000: Crash in ClassLoader::record_result while dynamic dumping netty
Make a copy of the _shared_path_table for use during dynamic CDS dump.

Reviewed-by: iklam, minqi
2020-03-12 16:05:07 -07:00
Calvin Cheung
9e2ab1e363 8232081: Try to link all classes during dynamic CDS dump
During CDS dynamic dump, link all classes loaded by the builtin class loaders in JVM_BeforeHalt() and JavaThread::invoke_shutdown_hooks().

Reviewed-by: iklam, dholmes
2020-03-06 15:33:13 -08:00
Ioi Lam
7ba18fc015 8240244: Avoid calling resolve_super_or_fail in SystemDictionary::load_shared_class
Reviewed-by: redestad, lfoltan, minqi
2020-03-04 22:26:48 -08:00
Calvin Cheung
5229896f4f 8240481: Remove CDS usage of InstanceKlass::is_in_error_state
Track the classes which fail verification during CDS dumping in DumpTimeSharedClassInfo.

Reviewed-by: iklam, minqi
2020-03-04 15:34:53 -08:00
Yumin Qi
add146cc8b 8236604: Optimize SystemDictionary::resolve_well_known_classes for CDS
Serialize SystemDictionary::_well_known_classes into CDS and quickly resolve them at runtime in vm startup stage.

Reviewed-by: iklam, coleenp
2020-02-28 15:30:29 -08:00
Yumin Qi
c37ebcd730 8232069: Enable CDS even when UseCompressedClassPointers and/or UseCompressedOops are false
Fix to save UseCompressedOops and UseCompressedClassPointers in shared archive and at runtime run with CDS only if they are matched the stored versions.

Reviewed-by: iklam, ccheung
2020-02-11 12:16:23 -08:00
Ioi Lam
d5bdb76e84 8236236: Eliminate CDS md region and consolidate c++ vtable patching code
Reviewed-by: ccheung
2020-01-22 11:52:27 -08:00
Ioi Lam
d1ad0eaf8f 8233826: Change CDS dumping tty->print_cr() to unified logging
Reviewed-by: coleenp, dholmes, jiangli
2019-12-19 23:04:49 -08:00
Nick Gasson
aea0a57512 8234794: AArch64: runtime/memory/ReadFromNoaccessArea.java crashes
Try to map CDS shared space at 4G aligned address on AArch64

Reviewed-by: adinn, aph, jiangli, iklam
2019-12-19 09:47:33 +08:00
Ioi Lam
cb75b6ee22 8235629: Remove unnecessary calls to Thread::current
Reviewed-by: coleenp, ccheung, hseigel
2019-12-11 15:25:38 -08:00
Ioi Lam
749bda0e2d 8235490: AppCDS DynamicArchiveRelocationTest.java failed: 'always map archive(s) at an alternative address' missing
Reviewed-by: coleenp, ccheung
2019-12-09 09:59:03 -08:00
Vicente Romero
827e5e3226 8225054: Compiler implementation for records
8225052: javax.lang.model support for records
8225053: Preview APIs support for records
8225055: Javadoc for records
8226314: com.sun.source support for records
8227113: Specification for java.lang.Record
8233526: JVM support for records

Implement records in the compiler and the JVM, including serialization, reflection and APIs support

Co-authored-by: Brian Goetz <brian.goetz@oracle.com>
Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Joe Darcy <joe.darcy@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Reviewed-by: mcimadamore, briangoetz, alanb, darcy, chegar, jrose, jlahoda, coleenp, dholmes, lfoltan, mchung, sadayapalam, hannesw, sspitsyn
2019-12-04 15:57:39 -05:00
Ioi Lam
2a36577e68 8234539: ArchiveRelocationTest.java failed: Archive mapping should always succeed
Reviewed-by: ccheung
2019-11-22 17:45:48 -08:00
Ioi Lam
5678f98a9e 8231610: Relocate the CDS archive if it cannot be mapped to the requested address
Reviewed-by: jiangli, coleenp, ccheung
2019-11-13 16:36:54 -08:00
Coleen Phillimore
ed21b56269 8233913: Remove implicit conversion from Method* to methodHandle
Fix call sites to use existing THREAD local or pass down THREAD local for shallower callsites. Make linkResolver methods return Method* for caller to handleize if needed.

Reviewed-by: iklam, thartmann, hseigel
2019-11-13 08:23:23 -05:00
Calvin Cheung
b08a8c5cc3 8231606: _method_ordering is not set during CDS dynamic dump time
Add the missing DynamicDumpSharedSpaces check in sort_methods(); replace the (DumpSharedSpaces || DynamicDumpSharedSpaces) with the Arguments::is_dumping_archive() function call.

Reviewed-by: iklam, coleenp, jiangli
2019-10-02 16:55:08 -07:00
Ioi Lam
35bfbfd600 8231278: Rename FileMapHeader::_read_only_tables_start to _serialized_data_start
Reviewed-by: ccheung
2019-09-23 19:55:26 -07:00
Ioi Lam
7c2de83027 8231257: Avoid calling FileMapInfo::write_region twice
Reviewed-by: ccheung
2019-09-23 19:54:37 -07:00
Calvin Cheung
e8ee2800f5 8186988: use log_warning() and log_error() instead of tty->print_cr for CDS warning and error messages
Reviewed-by: stuefe, iklam, dholmes
2019-09-12 09:59:19 -07:00
Ioi Lam
988ac4fec0 8230586: Encapsulate fields in filemap.hpp
Reviewed-by: ccheung
2019-09-11 18:31:25 -07:00
Calvin Cheung
d0725682a8 8224497: Remove FIXME in metaspaceClosure.cpp
Also cleaned up some comment and code related to the od (optional data) region.

Reviewed-by: iklam, jiangli
2019-06-07 14:03:17 -07:00
Nick Gasson
72daa46d46 8224853: CDS address sanitizer errors
Reviewed-by: iklam, dholmes
2019-06-04 17:56:16 +08:00
Calvin Cheung
72dc5721e0 8207812: Implement Dynamic CDS Archive
Improve the usability of AppCDS

Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Co-authored-by: Jiangli Zhou <jianglizhou@google.com>
Reviewed-by: acorn, jiangli, mseledtsov
2019-05-17 08:29:55 -07:00