RFR (L) 8171392 Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
Ioi Lam
ioi.lam at oracle.com
Tue Apr 11 06:26:35 UTC 2017
Hi,please review the following change
https://bugs.openjdk.java.net/browse/JDK-8171392
http://cr.openjdk.java.net/~iklam/jdk10/8171392_make_constantpool_read_only.v01/
*Summary:**
*
Before:
+ ConstantPool::klass_at(i) finds the Klass from the i-th slot of
ConstantPool.
+ When a klass is resolved, the ConstantPool is modified to store the
Klass pointer.
After:
+ ConstantPool::klass_at(i) finds the at this->_resolved_klasses->at(i)
+ When a klass is resolved, _resolved_klasses->at(i) is modified.
In addition:
+ I moved _resolved_references and _reference_map from ConstantPool
to ConstantPoolCache.
+ Now _flags is no longer modified for shared ConstantPools.
As a result, none of the fields in shared ConstantPools are modified
at run time,
so we can move them into the RO region in the CDS archive.
*Testing:**
*
- Benchmark results show no performance regression, despite the extra
level of
indirection, which has a negligible overhead for the interpreter.
- RBT testing for tier2 and tier3.
*Ports:**
*
- I have tested only the Oracle-support ports. For the aarch64, ppc
and s390 ports,
I have added some code without testing (it's probably incomplete)
- Port owners, please check if my patch work for you, and I can
incorporate your
changes in my push. Alternatively, you can wait for my push and
provide fixes
(if necessary) in a new changeset, and I will be happy to sponsor it.
Thanks
- Ioi
More information about the hotspot-dev
mailing list