问题

将JMC升级到最新的版别,可是发现无法正常发动,发动后直接闪退,检查JDK Mission Controlconfiguration的log文件会有如下报错:

!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…

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?

持续看文档,有如下说明:

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行之前(一开端默许添加到文件的默许了,踩了个坑),否则仍然是无法发动的。

发动

修改后装备如下图。

JMC(JDK Mission Control)无法发动问题解决

至此能够正常发动了。

JMC(JDK Mission Control)无法发动问题解决

打开jfr文件

准备打开一个jfr文件,加载过程中jmc直接闪退了。检查报错日志hs_err_pid40556.loghs_err_pid40556.jfr文件.

JMC(JDK Mission Control)无法发动问题解决

JMC(JDK Mission Control)无法发动问题解决

#
# 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的堆内存 )

JMC(JDK Mission Control)无法发动问题解决

封闭IDEA后,公然能够发动了,能够看出来JMC解析136MB的jfr运用了5.5G 的内存。

JMC(JDK Mission Control)无法发动问题解决

至此,升级jmc的工作完成了。