60 Commits

Author SHA1 Message Date
Calvin Cheung
ea27a54bf0 8224509: Incorrect alignment in CDS related allocation code on 32-bit platforms
Reviewed-by: iklam, stuefe
2020-10-05 16:52:00 +00:00
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
David Holmes
976acddeb5 8252406: Introduce Thread::as_Java_thread() convenience function
Reviewed-by: shade, coleenp, kbarrett, dcubed
2020-09-11 01:31:32 +00:00
Calvin Cheung
31d108c1af 8251918: [Graal] Crash in DumpTimeSharedClassInfo::add_verification_constraint
Add NULL check on the return value of SystemDictionaryShared::find_or_allocate_info_for().

Reviewed-by: iklam, minqi
2020-08-22 00:09:23 +00:00
Calvin Cheung
57d2c86985 8247529: Crash in runtime/cds/appcds/dynamicArchive/LambdaProxyCallerIsHidden.java with Graal
Avoid inserting InstanceKlass into the DumpTimeSharedClassTable after dynamic CDS dumping has started. Acquire the DumpTimeTable_lock before iterations on _dumptime_table to ensure memory order correctness.

Reviewed-by: iklam, minqi
2020-08-17 18:46:38 +00: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
9798a0846b 8249837: Avoid direct or implicit Thread::current() calls when we already have a current thread variable
Add current thread OR remove unneeded HandleMark

Reviewed-by: kvn, dholmes
2020-07-30 10:41:31 -04:00
Calvin Cheung
5088193336 8249630: unused is_static_archive parameter in SystemDictionaryShared::write_dictionary
Reviewed-by: minqi, dholmes
2020-07-23 16:52:08 +00:00
Coleen Phillimore
6ee76b6b05 8249760: Unnecessary #include oopStorageSet
Reviewed-by: hseigel
2020-07-20 10:53:29 -04:00
Kim Barrett
a8d6a05ce8 8248391: Unify handling of all OopStorage instances in weak root processing
OopStorage instance now owned by subsystems, and generalize dead entry notification

Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com>
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Reviewed-by: coleenp, tschatzl
2020-07-16 17:41:14 -04:00
Calvin Cheung
5146474954 8246308: Reference count for PackageEntry::name may be incorrectly decremented
Corrected the usage of TempNewSymbol.

Reviewed-by: minqi, iklam
2020-07-13 16:05:25 +00:00
Calvin Cheung
dc74336a65 8243586: Optimize calls to SystemDictionaryShared::define_shared_package for classpath
Define_shared_package only needs to be called once for each package in a jar specified in the shared class path.

Reviewed-by: iklam, dholmes, minqi
2020-07-01 21:05:14 +00:00
Ioi Lam
27fc8b6787 8246546: Simplify SystemDictionary::is_shared_class_visible
Reviewed-by: minqi, ccheung
2020-06-23 21:23:00 -07:00
Stefan Karlsson
17f2250c5a 8247879: Rework WeakHandle and OopHandle to dynamically support different OopStorages
Reviewed-by: coleenp, eosterlund
2020-06-23 09:38:21 +02:00
Stefan Karlsson
77bdc30650 8247470: Fix CHeap GrowableArray NMT accounting
Reviewed-by: coleenp, tschatzl, kbarrett
2020-06-16 09:37:53 +02:00
Calvin Cheung
847a3baca8 8198698: Support Lambda proxy classes in dynamic CDS archive
Added archving of hidden classes of type lambda proxy classes.

Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Reviewed-by: mchung, iklam, dholmes
2020-06-10 15:50:26 +00:00
Coleen Phillimore
f3c2a17a30 8247220: Make OopHandle constructor explicit
Fix null initializations to explicitly call the OopHandle constructor

Reviewed-by: lfoltan, kbarrett
2020-06-10 08:29:39 -04:00
Coleen Phillimore
498b0e61ed 8246340: Move SystemDictionary GC roots into OopStorage
Use vm_global() OopStorage for system dictionary roots

Reviewed-by: eosterlund, lfoltan
2020-06-05 09:55:31 -04:00
Thomas Stuefe
66514251c1 8244733: Add ResourceHashtable::xxx_if_absent
Reviewed-by: coleenp, iklam, rehn, dholmes
2020-05-20 15:56:39 +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
Yumin Qi
832272da71 8178349: Cache builtin class loader constraints to avoid re-initializing itable/vtable for shared classes
Record loader constraints for built-in class which is loaded by app loader or platform loader in shared archive in dump time.  When the class loaded from shared archive at runtime, directly check loader constraints using the saved info so avoid lengthy relayout i/v-table at class link stage.

Reviewed-by: iklam, ccheung
2020-05-01 10:58:45 -07:00
Calvin Cheung
18c43241fb 8241815: Unnecessary calls to SystemDictionaryShared::define_shared_package
Avoid calling ClassLoaders.definePackage during loading of shared classes originated from the module image since java.lang.Package for named modules are automatically defined.

Reviewed-by: mchung, lfoltan
2020-04-28 00:09:53 +00:00
Mandy Chung
7cc1371059 8238358: Implementation of JEP 371: Hidden Classes
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: David Holmes <david.holmes@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jamsheed Mohammed C M <jamsheed.c.m@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Reviewed-by: alanb, cjplummer, coleenp, dholmes, dlong, forax, jlahoda, psandoz, plevart, sspitsyn, vromero
2020-04-21 06:55:38 -07:00
Ioi Lam
0bc7cc4d28 8241158: SA TestHeapDumpForInvokeDynamic.java fails when CDS archive is relocated
Reviewed-by: ccheung
2020-04-20 17:33:52 -07:00
Calvin Cheung
dd4e04d6f5 8242134: Consolidate the get_package_entry() in SystemDictionaryShared and ClassLoader
Keep the version in ClassLoader.

Reviewed-by: hseigel, redestad, lfoltan
2020-04-08 08:56:05 -07:00
Calvin Cheung
512644de06 8240205: Avoid PackageEntry lookup when loading shared classes
Do the PackageEntry lookup at one place and then pass it along to the subsequently called functions which need it.

Reviewed-by: redestad, lfoltan
2020-04-03 14:26:42 -07:00
Claes Redestad
23d6a788b4 8241371: Refactor and consolidate package_from_name
Reviewed-by: iklam, lfoltan
2020-03-23 23:18:42 +01:00
Ioi Lam
81353a56f9 8241244: CDS dynamic dump asserts in ArchivePtrBitmapCleaner::do_bit
Reviewed-by: minqi, coleenp
2020-03-23 13:27:22 -07: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
Harold Seigel
a1e9328367 8235225: Replace CHECK_0 with CHECK_NULL for non-integer returning methods
Change CHECK_0 to CHECK_NULL and CHECK_false where appropriate

Reviewed-by: mikael, dholmes, coleenp
2020-02-27 13:00:05 +00:00
Harold Seigel
7fc58a1020 8235678: Remove unnecessary calls to Thread::current() in MutexLocker calls
Add THREAD argument when available and make Thread* the first argument to relevant MutexLocker and MonitorLocker constructors

Reviewed-by: lfoltan, coleenp, dholmes
2020-01-16 13:48:23 +00: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
Ioi Lam
5a120f0967 8232071: Avoid shared dictionary lookup when the class name is not shared
Reviewed-by: jiangli, ccheung
2019-10-10 10:48:31 -07:00
Claes Redestad
fe8c0edee0 8231993: Remove redundant pkg_str param from is_shared_class_visible_for_classloader
Reviewed-by: hseigel, coleenp
2019-10-08 15:48:36 +02: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
988ac4fec0 8230586: Encapsulate fields in filemap.hpp
Reviewed-by: ccheung
2019-09-11 18:31:25 -07:00
Leo Korinth
4b6f9ed07f 8230398: Remove NULL checks before FREE_C_HEAP_ARRAY
Reviewed-by: dholmes, kbarrett, tschatzl
2019-09-11 14:16:30 +02: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
Coleen Phillimore
77d60eff6a 8223626: move print() functions to cpp files
Improve debugging experience

Reviewed-by: dholmes, dlong
2019-05-10 09:05:29 -04:00
Stefan Karlsson
c90f3ee68b 8223624: Cleanup includes of universe.hpp
Reviewed-by: coleenp, lkorinth
2019-05-09 14:28:30 +02:00
Ioi Lam
d06f3e7e28 8218751: Do not store original classfiles inside the CDS archive
Remove the OD shared region and decode classfiles on the fly

Reviewed-by: jiangli, ccheung, sspitsyn, redestad
2019-02-21 17:07:35 -08:00
Jiangli Zhou
e0aa3e0609 8214827: Incorrect call ClassLoaders.toFileURL("jrt:/java.compiler")
Use URL constructor for jrt URL in SystemDictionaryShared::get_shared_protection_domain().

Reviewed-by: ccheung, iklam, dholmes, coleenp
2019-01-10 13:03:34 -05:00
Ioi Lam
147fc3ed13 8213346: Re-implement shared dictionary using CompactHashtable
Reviewed-by: jiangli
2018-11-07 19:40:27 -08:00
Ioi Lam
b84cf61b08 8213250: CDS archive creation aborts due to metaspace object allocation failure
Reviewed-by: jiangli, ccheung
2018-11-01 10:59:05 -07:00
Ioi Lam
6c59cb232f 8210875: Refactor CompactHashtable
Reviewed-by: ccheung, jiangli
2018-09-18 21:47:14 -07:00
Lois Foltan
75ed173e15 8209301: JVM rename is_anonymous, host_klass to unsafe specific terminology ahead of Unsafe.defineAnonymousClass deprecation
Clean up VM anonymous class terminology.

Reviewed-by: coleenp, dholmes, mchung
2018-08-20 08:25:57 -04:00
Ioi Lam
1b2e7cbaef 8208999: Some use of Klass* should be replaced by InstanceKlass*
Klass::java_super() => InstanceKlass*; InstanceKlass::{local,transitive}_interfaces() => Array<InstanceKlass*>*

Reviewed-by: coleenp, hseigel
2018-08-07 15:45:07 -07:00
Goetz Lindenmaier
8a9b0134a8 8206977: Minor improvements of runtime code
Reviewed-by: coleenp, lfoltan
2018-07-11 16:11:10 +02:00