[lworld+vector] RFR: Merge lworld
Jatin Bhateja
jbhateja at openjdk.org
Sun Jun 25 03:09:01 UTC 2023
Merge from lworld in lworld+vector, JDK-8292818 made significant modification to FieldInfo by replacing 96 bits fixed set of metadata fields with UNSIGNED5 compressed fields.
Other Fixes addressed:-
A) CDS related:
- All the _VectorPayloadMF*_ classes are part of java.base modules and thus gets archived into a classes.jsa.
- Code for bookkeeping InlineKlassFixedBlock pointer containing packing/unpacking adapters, exact bundle size etc. is removed from lworld branch, this causes problem in down stream flow accessing those fields.
- InstanceKlass::size method takes into account size of InlineKlassFixedBlock and therefore its contents are already part of shared archive, reinitialized the pointer by making an explicit call to _inlineklass_static_block()_ [1] during unshared field restoration.
- Java class structure [2] contains primaryType (pointer to primitive klass mirrors) and secondaryTypes (pointer to primitive values mirrors), these are no-longer getting restored during shared archive loading at VM startup. These pointer are used for class level equality comparison. As a workaround, using -Xshare:off flag during regression testing, this will be fixed in a follow up patch.
B) Removed redundant ResourceMarks during field parsing [3], this was resulting into crashes during re-allocations of __temp_field_info_ (a GrowableArray) due to __nesting_ level mismatch b/w actual allocation site and re-allocation sites. Re-allocations happens because upfront space reservation for growable array do not take into account multifield bundle size.
C) JDK-8292818 added a new __index_ field on top regular fields specified in JVM specification (name_index, signature_index, flags_index, access_index) into FieldInfo structure, handled its initialization while parsing multifield[4], injected[5] and user defined fields[6].
D) Small change in VectorBox creation routine for proper initialization[7] of _declared_nonstatic_fields before accessing it[8].
E) De-optimization related:-
- De-coupled[9] allocation and re-assignment during vector box re-materialization leveraging existing re-assignment framework[10]. This prevents introducing special handlings for non-vector Locations in existing routines since an InlineTypeNode may have scalar / vector / constant inputs (scalarized multifield bundle initialization during make_default [11]).
- nfield count which determines number of field level bookkeeping at SafePoint was initialized using _ciInlineKlass::nof_nonstatic_field()_ and is agnostic to scalarization, instead it should consider the actual count of inputs fields connected to InlineTypeIR node [12]
F) A minor change in scalarization logic of multi-fields [13]
With above changes in place most of the VectorAPI JTREG test points around vector/shuffle/masks are passing, we plan to fix remaining regressions with subsequent check-ins.
[1] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/oops/inlineKlass.cpp#L541
[2] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/java.base/share/classes/java/lang/Class.java#L616
[3] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/classfile/classFileParser.cpp#L1527
[4] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/classfile/classFileParser.cpp#L1644
[5] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/classfile/classFileParser.cpp#L1692
[6] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/classfile/classFileParser.cpp#L1611
[7] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/opto/vectornode.hpp#L1714
[8] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/opto/vectornode.hpp#L1716
[9] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/prims/vectorSupport.cpp#L320
[10] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/prims/vectorSupport.cpp#L323
[11] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/opto/inlinetypenode.cpp#L858
[12] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/opto/inlinetypenode.cpp#L327
[13] https://github.com/jatin-bhateja/valhalla/blob/84b3b1e11cdef2c870d1f430c7db2ae60f752d5f/src/hotspot/share/opto/inlinetypenode.cpp#L44
-------------
Commit messages:
- Cleanup payload allocation during deoptimization.
- Whitespace fix.
- Merge lworld
- 8309586: [lworld] Feature version post merge doesn't match CheckFeatureGate1.java & CheckFeatureGate2.java
- 8309466: [lworld] Problem list CDS tests until JDK-8309357 is fixed
- 8309353: [lworld] C2 compilations fails with assert(false) failed: type flow analysis failed for OSR compilation
- 8308756: [lworld] compiler/ciReplay/TestInliningProtectionDomain.java fails because CDS is disabled
- Merge jdk
- 8179502: Enhance OCSP, CRL and Certificate Fetch Timeouts
- 8306698: Add overloads to MethodTypeDesc::of
- ... and 2306 more: https://git.openjdk.org/valhalla/compare/4ce98c10...64ed7ffa
The webrevs contain the adjustments done while merging with regards to each parent branch:
- lworld+vector: https://webrevs.openjdk.org/?repo=valhalla&pr=866&range=00.0
- lworld: https://webrevs.openjdk.org/?repo=valhalla&pr=866&range=00.1
Changes: https://git.openjdk.org/valhalla/pull/866/files
Stats: 1008748 lines in 11193 files changed: 686979 ins; 214208 del; 107561 mod
Patch: https://git.openjdk.org/valhalla/pull/866.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/866/head:pull/866
PR: https://git.openjdk.org/valhalla/pull/866
More information about the valhalla-dev
mailing list