JDK Mission Control 9.0.0发布,需要JDK 17或更高版本
在 JDK Mission Control 8 发布近三年后,Datadog 工程总监 Marcus Hirt 发布了 JDK Mission Control 9.0.0。新版本需要 JDK 17。它提供了一些 Bug 修复和新特性,比如支持 Eclipse 4.30。
Java Flight Recorder(JFR)是 JDK 内置的一个性能分析和事件收集框架。JDK Mission Control(JMC)包含一个 JMX 控制台(一个用于堆浪费分析的工具),允许对 Java 飞行记录进行可视化和自动分析。
新版本需要在 JDK 17 或更高的版本上运行。它带来了 118 项 Bug 修复和新特性,并允许解析来自 OpenJDK 8u272+ 和 Oracle JDK 7u40+ 的 JFR 记录。
JVM 刷新间隔(用于检测新 JVM)现在可以通过 Preferences | JDK Mission Control | JVM Browser | Local 进行配置。默认情况下,JMC 每 5000 毫秒检测一次新 JVM。
JFR 分析器的性能通过减少分配数量得以提升。
一些非 Eclipse 依赖类已经从其他模块移到了 org.openjdk.jmc.common包中,以便使用 jmc-core 的应用程序可以使用它们。
该版本引入了深色主题,可以通过 Preferences, General | Appearance 进行选择。Event Browser 搜索现在还支持事件类型 ID。
以前,火焰图可视化是在 Eclipse 平台提供的嵌入式浏览器组件中实现的。现在,该视图基于以 Swing 为基础的解决方案进行了实现,性能有所提升。
JMC 现在允许在 GraalVM 原生镜像上启动飞行记录,这在以前是不可能的。
JMC 可用于 Windows、macOS X 和 Linux,其中新版本现在支持 Linux on aarch64,这是部分 Raspberry Pi 使用的一个版本。
GitHub 上提供了源代码和构建说明。构建该项目需要 JDK 17。开发人员可通过配置
~/.m2/toolchains.xml
文件将 JDK 17 添加到 Maven 工具链中:
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-17</id>
<version>17</version>
<vendor>[JDK vendor]</vendor>
</provides>
<configuration>
<jdkHome>[JDK directory]</jdkHome>
</configuration>
</toolchain>
</toolchains>
build.sh 脚本可用于 Linux 或 macOS,并提供了以下选项:
usage: call ./build.sh with the following options:
--test to run the tests
--testUi to run the tests including UI tests
--installCore to install JMC core
--packageJmc to package JMC
--packageAgent to package Agent
--skipJDPMulticastTests skip multicast related tests
--clean to run maven clean
--run to run JMC, once it is packaged
--runAgentExample to run Agent 'InstrumentMe' example, once it is packaged
--runAgentConverterExample to run Agent 'InstrumentMeConverter' example, once it is packaged
--help to show this help dialog
首先,项目应该使用./build.sh --packageJmc 命令构建。构建成功后,可以使用./build.sh run 命令启动应用程序。GitHub 和 JMC FAQ 提供了更详细的使用说明。经过优化之后,JMC 可以在 Eclipse IDE 2023-12 及更高版本上运行。开发人员可以通过更新站点 Help | Install New Software 将 JMC 安装到 Eclipse 中,更新站点 URL 是特定于供应商的。
JDK Mission Control 构建由不同的供应商提供,如 Oracle 的 JDK Mission Control、Bellsoft 的 Liberica Mission Control,Adoptium 的 Eclipse Mission Control 和 Azul 的 Zulu Mission Control。在撰写本文时,这些供应商都还没有提供 JMC 9.0.0 的构建。
这篇博文提供了该版本的完整更改列表,而关于如何使用新版本的详细说明可以从 GitHub 上查看。
Hirt 还创建了 JDK Mission Control 教程和 jmc-jshell 工具。两者都不是针对这个最新版本的,但是可以简化 JFR 和 JMC 的试用过程。
原文链接:
https://www.infoq.com/news/2024/04/jdk-mission-control-9/
声明:本文为 InfoQ 翻译,未经许可禁止转载。
最新评论
推荐文章
作者最新文章
你可能感兴趣的文章
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to [email protected]. For more detail of the source, please click on the button "Read Original Post" below. For other communications, please send to [email protected].
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。