24.1.26 发布
龙芯正式发布基于 OpenJDK 24 的龙芯平台 Java 环境。
Java 24 包含 24 个新的 JEP(JDK Enhancement Proposal,即JDK增强建议):
- 404: Generational Shenandoah (Experimental)
- 450: Compact Object Headers (Experimental)
- 472: Prepare to Restrict the Use of JNI
- 475: Late Barrier Expansion for G1
- 478: Key Derivation Function API (Preview)
- 479: Remove the Windows 32-bit x86 Port
- 483: Ahead-of-Time Class Loading & Linking
- 484: Class-File API
- 485: Stream Gatherers
- 486: Permanently Disable the Security Manager
- 487: Scoped Values (Fourth Preview)
- 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)
- 489: Vector API (Ninth Incubator)
- 490: ZGC: Remove the Non-Generational Mode
- 491: Synchronize Virtual Threads without Pinning
- 492: Flexible Constructor Bodies (Third Preview)
- 493: Linking Run-Time Images without JMODs
- 494: Module Import Declarations (Second Preview)
- 495: Simple Source Files and Instance Main Methods (Fourth Preview)
- 496: Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism
- 497: Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm
- 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe
- 499: Structured Concurrency (Fourth Preview)
- 501: Deprecate the 32-bit x86 Port for Removal
此次龙芯发布的 24.1.26 对应上游 GA (General-Availability) 版本 24+36。关于 Java 24 更详细的内容请见https://www.oracle.com/java/technologies/javase/24-relnote-issues.html。
在 24.1.26 中,针对 LoongArch 平台进行了新功能开发和优化,一些主要内容如下。
通过 TCK,符合 Java SE 24
龙芯是具有 TCK 权限的少数几家公司之一[1]。此次发布的龙芯平台 Java 24 环境经过 TCK 验证符合 Java SE 24,新应用程序和现有应用程序无需修改即可运行。
JEP 404: 分代 Shenandoah 垃圾回收器(实验性)支持
为 Shenandoah 垃圾回收器新增实验性分代回收机制,通过分代管理提升可持续吞吐量、负载峰值抵抗力和内存利用率。在此次发布的版本中,实现了 LoongArch 平台上的分代 Shenandoah(实验性)支持。
JEP 450: 紧凑对象头(实验性)支持
在 64 位架构的 HotSpot JVM 中,将对象头大小从 96 位和 128 位缩减至 64 位,从而降低堆内存占用、提升部署密度并增强数据局部性。在此次发布的版本中,实现了 LoongArch 平台上的紧凑对象头(实验性)支持,经实测,在龙芯平台开启该功能后,SPECjbb2015 的得分提升 10% 左右。
JEP 475: G1 的延迟屏障扩展支持
通过将 G1 垃圾回收器屏障的扩展时机从 C2 JIT 编译流水线的早期阶段后移,简化其内存访问记录机制的实现。在此次发布的版本中,实现了 LoongArch 平台上的G1的延迟屏障扩展支持。
JEP 490: 移除 ZGC 非分代模式
移除 Z 垃圾回收器(ZGC)的非分代模式,保留分代模式作为 ZGC 的默认配置。在此次发布的版本中,移除了 LoongArch 平台上 ZGC 的非分代模式。
JEP 491: 无锁定的虚拟线程同步
通过改进虚拟线程在同步方法和语句阻塞时释放底层平台线程的机制,消除虚拟线程被固定(pinning)到平台线程的场景,从而显著提升高并发场景下的可扩展性。在此次发布的版本中,实现了 LoongArch 平台上的无锁定的虚拟线程同步。
[1] https://openjdk.org/groups/conformance/JckAccess/jck-access.html