忽略选项 -Xprof; 10.0 中移除了支持

Ignoring option -Xprof; support was removed in 10.0

-Xprof 标志的正确替代品是什么?

运行 带有 JDK 11 和 -Xprof 标志的 java 程序产生以下输出:

Ignoring option -Xprof; support was removed in 10.0

list of deprecated features as of Java 9 Take a look at the description of JDK-8176098

This technology is no longer relevant and is a source of root scanning for the GC and contains bugs. We want to remove flatprofiler in JDK 10 and therefore deprecated it in JDK 9.

单击链接的相关报告 JDK-8173715 显示:

We assume that this technology is no longer in use and is a source of root scanning for the GC.

不幸的是,对于删除有缺陷的 -Xprof 功能达成了一致意见,并假设删除该功能对某人的影响风险最小。

VisualVM 仍然有效。它不再与 JDK 9 或更高版本捆绑在一起,但可以单独下载,并且它有一个很好的 CPU 分析器和采样器。

不是官方(上游)替代品,但仍然非常好:

https://github.com/jvm-profiling-tools/async-profiler

我发现这是最简单、最全面的替代品。