Command VM.native_memory not recognized for java process started with -XX:NativeMemoryTracking=summary

huangapple go评论79阅读模式
英文:

Command VM.native_memory not recognized for java process started with -XX:NativeMemoryTracking=summary

问题

我的环境是 MacOs + Java 11:

java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK(构建 11.0.8+10)
Eclipse OpenJ9 VM AdoptOpenJDK(构建 openj9-0.21.0,JRE 11 Mac OS X amd64-64 位压缩引用 20200715_677(启用 JIT,启用 AOT)
OpenJ9 - 34cf4c075
OMR - 113e54219
JCL - 95bb504fbb 基于 jdk-11.0.8+10)


我正在使用 `-XX:NativeMemoryTracking=summary` 标志启动一个 Java 程序。

当我尝试访问本机内存摘要时,我会收到错误:

jcmd 31395 VM.native_memory summary
Error: Error in command
Command VM.native_memory,summary not recognized


如果我列出进程的所有可用命令,我会得到:

jcmd 31395 help
Dump.heap
Dump.java
Dump.snap
Dump.system
GC.class_histogram
GC.heap_dump
GC.run
Thread.print
help
jstat.class


我需要的命令不可用。为什么没有出现?我如何启用它?
英文:

My environment is MacOs + Java 11:

java -version 
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20200715_677 (JIT enabled, AOT enabled)
OpenJ9   - 34cf4c075
OMR      - 113e54219
JCL      - 95bb504fbb based on jdk-11.0.8+10)

I'm starting a Java program with the -XX:NativeMemoryTracking=summary flag.

When I try to access native memory summary I get an error:

jcmd 31395 VM.native_memory summary
Error: Error in command
Command VM.native_memory,summary not recognized

If I list all the available commands for the process I get:

jcmd 31395 help
Dump.heap
Dump.java
Dump.snap
Dump.system
GC.class_histogram
GC.heap_dump
GC.run
Thread.print
help
jstat.class

The command I need is not available. Why isn't it there? How can I enable it?

答案1

得分: 1

Native Memory Tracking 是 Oracle HotSpot JVM 的一个功能。您正在使用 IBM J9 JVM(更准确地说,是基于 Eclipse OMR 构建的开源变体 Eclipse OpenJ9)。

英文:

Native Memory Tracking is a feature of the Oracle HotSpot JVM. You are using the IBM J9 JVM (or more precisely, the open source variant Eclipse OpenJ9 built on Eclipse OMR).

huangapple
  • 本文由 发表于 2020年8月16日 20:18:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/63436812.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定