[lworld] RFR: 8274800: [lworld] Primitive classes can't be retransformed
Serguei Spitsyn
sspitsyn at openjdk.java.net
Wed Dec 8 00:56:44 UTC 2021
On Sat, 4 Dec 2021 00:30:11 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> Fix for java.lang.instrument.Instrumentation.retransformClasses()
>
> Cases for retransformation primitive to identity (and identity to primitive) classes and changing primitive class fields (so default_value becomes invalid) are handled by existing code and spec changes are not required.
>
> Also added serviceability test to hotspot_valhalla group
Marked as reviewed by sspitsyn (no project role).
src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp line 886:
> 884:
> 885: // JVMSpec| u2 access_flags;
> 886: write_u2(ik()->access_flags().get_flags() & (JVM_RECOGNIZED_CLASS_MODIFIERS | JVM_ACC_INLINE));
Would it better to consider adding JVM_ACC_INLINE to JVM_RECOGNIZED_CLASS_MODIFIERS?
Also, I see other definitions of the JVM_RECOGNIZED_CLASS_MODIFIERS in files:
src/hotspot/share/include/jvm_constants.h
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java
Do we want this modifier added there as well?
test/hotspot/jtreg/TEST.groups line 58:
> 56: runtime/valhalla \
> 57: compiler/valhalla \
> 58: serviceability/jvmti/Valhalla
For consistency, should the we rename the test sub-folder from `Valhalla` to `valhalla` ?
This comment is not about this current fix though.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/588
More information about the valhalla-dev
mailing list