问题
将JMC升级到最新的版本,但是发现无法正常启动,启动后直接闪退,查看JDK Mission Control\configuration的log文件会有如下报错:
php
!SESSION 2023-11-29 20:04:56.075 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_302
java.vendor=Temurin
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Command-line arguments: -os win32 -ws win32 -arch x86_64
!ENTRY org.apache.felix.scr 4 0 2023-11-29 20:04:56.801
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.apache.felix.scr [5]
Unresolved requirement: Import-Package: org.apache.felix.service.command; version="[1.0.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.osgi.service.cm; version="[1.6.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.osgi.service.component; version="[1.4.0,1.5.0)"
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745)
at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:269)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:193)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:464)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:338)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2023-11-29 20:04:56.802
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.simpleconfigurator [6]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745)
at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:269)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:193)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:464)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:338)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
!ENTRY org.eclipse.osgi 4 0 2023-11-29 20:04:56.803
!MESSAGE 未解析 bundle initial@reference:file:plugins/org.apache.felix.scr_2.1.24.v20200924-1939.jar。
!ENTRY org.eclipse.osgi 4 0 2023-11-29 20:04:56.804
!MESSAGE 未解析 bundle initial@reference:file:plugins/org.eclipse.equinox.simpleconfigurator_1.4.0.v20210315-2228.jar。
!ENTRY org.eclipse.equinox.simpleconfigurator 2 0 2023-11-29 20:04:56.807
!MESSAGE Could not resolve module: org.eclipse.equinox.simpleconfigurator [6]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
!ENTRY org.apache.felix.scr 2 0 2023-11-29 20:04:56.808
!MESSAGE Could not resolve module: org.apache.felix.scr [5]
Unresolved requirement: Import-Package: org.apache.felix.service.command; version="[1.0.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.osgi.service.cm; version="[1.6.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.osgi.service.component; version="[1.4.0,1.5.0)"
!ENTRY org.eclipse.osgi 4 0 2023-11-29 20:04:56.822
!MESSAGE 应用程序错误
!STACK 1
java.lang.IllegalStateException: 无法获取应用程序服务。请确保解析并启动了 org.eclipse.core.runtime 束(请参阅 config.ini)。
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:81)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
分析
Java Mission Control (JMC)是一个 Java 应用程序分析工具,从 2018 年开始,JMC 被 Oracle 开源作为独立工具发布。比如 JMC 可以展示详细的 JFR 记录数据,从而它可以对代码性能,内存分配 ,CPU 使用等情况进行分析。
JDK版本问题
看了下jmc的官方文档:www.oracle.com/java/techno...
java
JDK Mission Control (JMC) 8.0 and 8.0.1 starts with Oracle JDK 8 (64-bit), and from JMC 8.1.0 onwards it requires Oracle JDK 11 and later. However, JMC 8 supports Java Management Console (JMX) monitoring and Java Flight Recorder (JFR) profiling of JVMs (JDK 7u40 and later) on any supported platform.
本地目前使用的jdk8,可以看出来jmc8.0以后需要jdk11才可以。
多JDK环境选择
本地目前有jdk8、jdk11、jdk19三个版本的jdk,默认使用的jdk8。如果为了使用jmc将本地环境的jdk升级到11影响比较大。因此,考虑是否可以不修改JAVA_HOME的情况下使用最新的jmc?
继续看文档,有如下说明:
vbnet
Specify the JDK Version to be Used by JMC
If there are multiple JDK versions installed, it is recommended to use the latest version of JDK to run JMC.
Edit the JMC launch configuration (jmc.ini) file and add the location of the JDK version to use (JDK 8 (64-bit) or later required). In Windows and Linux, the jmc.ini file is found under the JDK Mission Control directory; and in macOS, under JDK\ Mission\ Control.app/Contents/Eclipse directory.
Add the -vm flag and <JDK installation path>/bin (<JDK installation path>\bin for windows) as shown in the following example. Ensure it is added just before the -vmargs flag.
大体意思是可以在 jmc.ini
中增加配置,但是需要注意一定要添加在原有文件的-vmargs
行之前(一开始默认添加到文件的默认了,踩了个坑),否则仍然是无法启动的。
启动
修改后配置如下图。
至此可以正常启动了。
打开jfr文件
准备打开一个jfr文件,加载过程中jmc直接闪退了。查看报错日志hs_err_pid40556.log
和hs_err_pid40556.jfr
文件.
python
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1828716544 bytes for Failed to commit area from 0x00000006efa00000 to 0x000000075ca00000 of length 1828716544.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Zero Based Compressed Oops mode in which the Java heap is
# placed in the first 32GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 32GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (t:/workspace/open/src/hotspot/os/windows/os_windows.cpp:3269), pid=40556, tid=35456
#
# JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
# Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -XX:FlightRecorderOptions=stackdepth=128 -XX:+FlightRecorder -XX:StartFlightRecording=name=JMC_Default,maxsize=100m -Djava.net.preferIPv4Stack=true -Djdk.attach.allowAttachSelf=true --add-exports=java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports=java.management/sun.management=ALL-UNNAMED --add-exports=java.management/sun.management.counter.perf=ALL-UNNAMED --add-exports=jdk.management.agent/jdk.internal.agent=ALL-UNNAMED --add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-exports=java.desktop/sun.awt.windows=ALL-UNNAMED JMC
Host: AMD Ryzen 7 5825U with Radeon Graphics , 16 cores, 31G, Windows 10 , 64 bit Build 19041 (10.0.19041.3031)
Time: Thu Nov 30 17:06:11 2023 中国标准时间 elapsed time: 237 seconds (0d 0h 3m 57s)
--------------- T H R E A D ---------------
Current thread (0x0000028500d50000): VMThread "VM Thread" [stack: 0x000000b6efe00000,0x000000b6eff00000] [id=35456]
Stack: [0x000000b6efe00000,0x000000b6eff00000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000002855aff0bad]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x63489a]
V [jvm.dll+0x771f9f]
V [jvm.dll+0x773648]
V [jvm.dll+0x773c65]
V [jvm.dll+0x773c1b]
V [jvm.dll+0x633fa6]
V [jvm.dll+0x634368]
C [ntdll.dll+0xa247f]
C [ntdll.dll+0x514f4]
C [ntdll.dll+0xa0f8e]
C 0x000002855aff0bad
VM_Operation (0x000000b6f06fefa0): G1CollectForAllocation, mode: safepoint, requested by thread 0x0000028500e02000
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x00000285506165c0, length=32, elements={
0x0000028552ce7000, 0x0000028500d86000, 0x0000028500d7d800, 0x0000028500deb000,
0x0000028500dec000, 0x0000028500df5000, 0x0000028500e01000, 0x0000028500e54000,
0x0000028500f6d000, 0x00000285020d7800, 0x0000028503247800, 0x0000028502685000,
0x00000285032c6000, 0x0000028503c3a800, 0x000002850413e800, 0x0000028504023000,
0x0000028503ab8800, 0x0000028503f26000, 0x000002850dc43800, 0x0000028503ad5000,
0x0000028503ad6800, 0x0000028503ad2800, 0x0000028503ad6000, 0x0000028503ad7800,
0x0000028503adf000, 0x0000028503adb800, 0x0000028503ad8800, 0x0000028503ad2000,
0x0000028500e02000, 0x0000028503ad9000, 0x0000028503ad3800, 0x0000028503ad4000
}
Java Threads: ( => current thread )
0x0000028552ce7000 JavaThread "main" [_thread_in_Java, id=7376, stack(0x000000b6ef250000,0x000000b6ef350000)]
0x0000028500d86000 JavaThread "Reference Handler" daemon [_thread_blocked, id=24900, stack(0x000000b6eff00000,0x000000b6f0000000)]
0x0000028500d7d800 JavaThread "Finalizer" daemon [_thread_blocked, id=32764, stack(0x000000b6f0000000,0x000000b6f0100000)]
0x0000028500deb000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=25752, stack(0x000000b6f0100000,0x000000b6f0200000)]
0x0000028500dec000 JavaThread "Attach Listener" daemon [_thread_blocked, id=22476, stack(0x000000b6f0200000,0x000000b6f0300000)]
0x0000028500df5000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=17184, stack(0x000000b6f0300000,0x000000b6f0400000)]
0x0000028500e01000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=24952, stack(0x000000b6f0400000,0x000000b6f0500000)]
0x0000028500e54000 JavaThread "Sweeper thread" daemon [_thread_blocked, id=17452, stack(0x000000b6f0500000,0x000000b6f0600000)]
0x0000028500f6d000 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=42572, stack(0x000000b6f0700000,0x000000b6f0800000)]
0x00000285020d7800 JavaThread "JFR Recorder Thread" daemon [_thread_blocked, id=18404, stack(0x000000b6f0900000,0x000000b6f0a00000)]
0x0000028503247800 JavaThread "JFR Periodic Tasks" daemon [_thread_blocked, id=3588, stack(0x000000b6f1000000,0x000000b6f1100000)]
0x0000028502685000 JavaThread "JFR Recording Scheduler" daemon [_thread_blocked, id=32988, stack(0x000000b6f1300000,0x000000b6f1400000)]
0x00000285032c6000 JavaThread "Service Thread" daemon [_thread_blocked, id=37356, stack(0x000000b6f1400000,0x000000b6f1500000)]
0x0000028503c3a800 JavaThread "Active Thread: Equinox Container: 6daf03af-e390-42e4-a9cc-e483a7f2dfd7" [_thread_blocked, id=21608, stack(0x000000b6f2600000,0x000000b6f2700000)]
0x000002850413e800 JavaThread "SCR Component Actor" daemon [_thread_blocked, id=16700, stack(0x000000b6f2700000,0x000000b6f2800000)]
0x0000028504023000 JavaThread "Framework Event Dispatcher: Equinox Container: 6daf03af-e390-42e4-a9cc-e483a7f2dfd7" daemon [_thread_blocked, id=41588, stack(0x000000b6f2800000,0x000000b6f2900000)]
0x0000028503ab8800 JavaThread "Start Level: Equinox Container: 6daf03af-e390-42e4-a9cc-e483a7f2dfd7" daemon [_thread_blocked, id=17284, stack(0x000000b6f2900000,0x000000b6f2a00000)]
0x0000028503f26000 JavaThread "EMF Reference Cleaner" daemon [_thread_blocked, id=31256, stack(0x000000b6f2d00000,0x000000b6f2e00000)]
0x000002850dc43800 JavaThread "Bundle File Closer" daemon [_thread_blocked, id=28728, stack(0x000000b6f2e00000,0x000000b6f2f00000)]
0x0000028503ad5000 JavaThread "Gogo shell" [_thread_blocked, id=8148, stack(0x000000b6f1e00000,0x000000b6f1f00000)]
0x0000028503ad6800 JavaThread "Worker-JM" [_thread_blocked, id=11936, stack(0x000000b6f2000000,0x000000b6f2100000)]
0x0000028503ad2800 JavaThread "Worker-0" [_thread_blocked, id=40364, stack(0x000000b6f2100000,0x000000b6f2200000)]
0x0000028503ad6000 JavaThread "Worker-1: 姝e湪浠?00015306_jfr_2308071532.jfr涓姞杞戒簨浠? [_thread_blocked, id=32684, stack(0x000000b6f2f00000,0x000000b6f3000000)]
0x0000028503ad7800 JavaThread "Provisioning Event Dispatcher" daemon [_thread_blocked, id=15128, stack(0x000000b6f3000000,0x000000b6f3100000)]
0x0000028503adf000 JavaThread "Local Descriptor Scanner" [_thread_blocked, id=38184, stack(0x000000b6f3600000,0x000000b6f3700000)]
0x0000028503adb800 JavaThread "pool-3-thread-1" [_thread_blocked, id=26240, stack(0x000000b6f3900000,0x000000b6f3a00000)]
0x0000028503ad8800 JavaThread "ForkJoinPool.commonPool-worker-19" daemon [_thread_blocked, id=33464, stack(0x000000b6f3100000,0x000000b6f3200000)]
0x0000028503ad2000 JavaThread "寮傛浜嬩欢濮旀淳" daemon [_thread_blocked, id=31216, stack(0x000000b6f1d00000,0x000000b6f1e00000)]
0x0000028500e02000 JavaThread "pool-4-thread-1" [_thread_blocked, id=26544, stack(0x000000b6f0600000,0x000000b6f0700000)]
0x0000028503ad9000 JavaThread "Worker-2" [_thread_blocked, id=18616, stack(0x000000b6f4900000,0x000000b6f4a00000)]
0x0000028503ad3800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=12224, stack(0x000000b6ef700000,0x000000b6ef800000)]
0x0000028503ad4000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=41920, stack(0x000000b6f0800000,0x000000b6f0900000)]
Other Threads:
=>0x0000028500d50000 VMThread "VM Thread" [stack: 0x000000b6efe00000,0x000000b6eff00000] [id=35456]
0x00000285039ee000 WatcherThread [stack: 0x000000b6f1500000,0x000000b6f1600000] [id=41424]
0x0000028552cfe000 GCTaskThread "GC Thread#0" [stack: 0x000000b6ef900000,0x000000b6efa00000] [id=12904]
0x0000028503115800 GCTaskThread "GC Thread#1" [stack: 0x000000b6f0a00000,0x000000b6f0b00000] [id=36376]
0x0000028503117000 GCTaskThread "GC Thread#2" [stack: 0x000000b6f0b00000,0x000000b6f0c00000] [id=41192]
0x0000028503117800 GCTaskThread "GC Thread#3" [stack: 0x000000b6f0c00000,0x000000b6f0d00000] [id=31684]
0x0000028503116800 GCTaskThread "GC Thread#4" [stack: 0x000000b6f0d00000,0x000000b6f0e00000] [id=40172]
0x0000028503118800 GCTaskThread "GC Thread#5" [stack: 0x000000b6f0e00000,0x000000b6f0f00000] [id=29368]
0x0000028502dff000 GCTaskThread "GC Thread#6" [stack: 0x000000b6f1100000,0x000000b6f1200000] [id=10852]
0x0000028502dfb800 GCTaskThread "GC Thread#7" [stack: 0x000000b6f1600000,0x000000b6f1700000] [id=40848]
0x0000028502dfa800 GCTaskThread "GC Thread#8" [stack: 0x000000b6f1700000,0x000000b6f1800000] [id=26024]
0x0000028502df9000 GCTaskThread "GC Thread#9" [stack: 0x000000b6f1800000,0x000000b6f1900000] [id=4892]
0x0000028502dfd800 GCTaskThread "GC Thread#10" [stack: 0x000000b6f1900000,0x000000b6f1a00000] [id=6992]
0x0000028502dff800 GCTaskThread "GC Thread#11" [stack: 0x000000b6f1a00000,0x000000b6f1b00000] [id=25260]
0x0000028502e02000 GCTaskThread "GC Thread#12" [stack: 0x000000b6ef600000,0x000000b6ef700000] [id=10716]
0x0000028552d79800 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000b6efa00000,0x000000b6efb00000] [id=40824]
0x0000028552d7a800 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000b6efb00000,0x000000b6efc00000] [id=3404]
0x0000028502dfa000 ConcurrentGCThread "G1 Conc#1" [stack: 0x000000b6f2a00000,0x000000b6f2b00000] [id=2372]
0x0000028502e00800 ConcurrentGCThread "G1 Conc#2" [stack: 0x000000b6f2b00000,0x000000b6f2c00000] [id=5812]
0x00000285003b3000 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000b6efc00000,0x000000b6efd00000] [id=26456]
0x000002850e560000 ConcurrentGCThread "G1 Refine#1" [stack: 0x000000b6f3f00000,0x000000b6f4000000] [id=21396]
0x000002850e0c0000 ConcurrentGCThread "G1 Refine#2" [stack: 0x000000b6f4000000,0x000000b6f4100000] [id=42644]
0x0000028504d12800 ConcurrentGCThread "G1 Refine#3" [stack: 0x000000b6f4100000,0x000000b6f4200000] [id=39748]
因为需要打开的jfr文件有136MB,可以在log文件中看到Out of Memory Error
,猜测可能是因为jmc的最大堆内存分配的太小,导致无法正常分析和加载jfr文件。
但是翻阅了很多资料包括官方文档,都没有找到可以直接修改jmc的-Xmx/-Xms的地方。
因此考虑是否是本机的内存不足引起的。于是关闭了IDEA(我的IDEA默认分配了15G的堆内存 )
关闭IDEA后,果然可以启动了,可以看出来JMC解析136MB的jfr使用了5.5G+的内存。
至此,升级jmc的工作完成了。