英文:
Java Flight Recorder - Logging parameters on JDK17
问题
我的 jfr 日志中没有关于内存/TLAB分配部分的任何信息,如果使用 MissionControl 进行分析。
JVM 参数(JDK17):
-XX:+UnlockDiagnosticVMOptions -X::+DebugNonSafepoints -XX:UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=delay....filename=... loglevel=info
附注:FlightRecorderOptions 已解除并且不可在 LTS JDK17 中使用
JVM 参数(JDK8):
-XX:+UnlockDiagnosticVMOptions -X::+DebugNonSafepoints -XX:UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=delay....filename=... -XX:FlightRecorderOptions=loglevel=info
在 JDK8 中,我拥有所有的数据,我有点困惑,如果我缺少 'Memory/TLAB Allocation' 的问题是由于 JFR 的 JVM 参数不正确引起的?
--更新--
https://bugs.openjdk.org/browse/JDK-8225312 废弃 -XX:FlightRecorder
英文:
My jfr log does not contain any information about Memory / TLAB Allocation section , if analyze it by MissionControl
JVM parameters (JDK17):
-XX:+UnlockDiagnosticVMOptions -X::+DebugNonSafepoints -XX:UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=delay....filename=... loglevel=info
P.S. FlightRecorderOptions decom'ed and not available in LTS JDK17
JVM parameters (JDK8):
-XX:+UnlockDiagnosticVMOptions -X::+DebugNonSafepoints -XX:UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=delay....filename=... -XX:FlightRecorderOptions=loglevel=info
On JDK8 I have all data in place, I'm a bit puzzled what if my issue about missing 'Memory/TLAB Allocation' is caused by incorrect JVM parameters for JFR ?
--Update--
https://bugs.openjdk.org/browse/JDK-8225312 Deprecate -XX:FlightRecorder
答案1
得分: 1
The TLAB events were disabled in settings=profile when the Object Allocation Sample event was introduced in JDK 16 (as it has less overhead and is enabled by default)
You can enable TLAB events manually:
java -XX:StartFlightRecording:
jdk.ObjectAllocationInNewTLAB#enabled=true,
jdk.ObjectAllocationOutsideTLAB#enabled=true,filename=...
英文:
The TLAB events were disabled in settings=profile when the Object Allocation Sample event was introduced in JDK 16 (as it has less overhead and is enabled by default)
You can enable TLAB events manually:
java -XX:StartFlightRecording:
jdk.ObjectAllocationInNewTLAB#enabled=true,
jdk.ObjectAllocationOutsideTLAB#enabled=true,filename=...
答案2
得分: 0
"-XX:+UseTLAB"作为参数添加应该可以解决问题。
希望这有所帮助。
祝好。
英文:
Adding -XX:+UseTLAB
as a parameter should do the trick.
Hope that works/helps.
Cheers
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论