简体   繁体   English

如何从堆转储中了解Java对象是否处于tenure或eden空间中

[英]How can I know whether a Java object is in tenure or eden space from heap dump

I have a Hotspot JVM heap dump and I tried to find out whether an object is live in tenure space, eden space, or survivor space, but I could not. 我有一个Hotspot JVM堆转储,我试图找出一个对象是否在权属空间,伊甸园空间或幸存者空间中存在,但我不能。

Appreciate if someone can help me. 感谢有人可以帮助我。

I don't think you can. 我认为你不能。 From this forum post, 这个论坛帖子,

sorry, bad news, the heap dump neither contains the info about the space the object is in 抱歉,坏消息,堆转储既不包含有关该对象所在空间的信息

Looking at the contents of the java heap dumps from this page seems to confirm that the heap dump does not contain generation info, 从这个页面查看 java堆转储的内容似乎确认堆转储不包含生成信息,

HEAP DUMP BEGIN (39793 objects, 2628264 bytes) Wed Oct 4 13:54:03 2006
ROOT 50000114 (kind=<thread>, id=200002, trace=300000)
ROOT 50000006 (kind=<JNI global ref>, id=8, trace=300000)
ROOT 50008c6f (kind=<Java stack>, thread=200000, frame=5)
:
CLS 50000006 (name=java.lang.annotation.Annotation, trace=300000)
    loader        90000001
OBJ 50000114 (sz=96, trace=300001, class=java.lang.Thread@50000106)
    name        50000116
    group        50008c6c
    contextClassLoader    50008c53
    inheritedAccessControlContext    50008c79
    blockerLock    50000115
OBJ 50008c6c (sz=48, trace=300000, class=java.lang.ThreadGroup@50000068)
    name        50008c7d
    threads    50008c7c
    groups        50008c7b
ARR 50008c6f (sz=16, trace=300000, nelems=1, 
     elem type=java.lang.String[]@5000008e)
    [0]        500007a5
CLS 5000008e (name=java.lang.String[], trace=300000)
    super        50000012
    loader        90000001

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过内存堆中的java对象获取占用的空间? - How can I get the occupied space by a java object in the memory heap? 较小的伊甸园空间会导致土地使用空间不断增加吗? - Is smaller eden space causing tenure space to increase constantly? 我可以使用如此大的Eden空间启动JVM,它可以在没有任何GC的情况下运行完成。假设我有一堆免费的mem - Can I start a JVM with Eden space so big, it runs to completion without any GC. Assuming I have heap of free mem 如何从 Java 堆转储中提取 HashMap - How to extract a HashMap from a Java heap dump 如何为Cygnus增加Java堆空间? - How I can increase Java Heap Space for Cygnus? 如何更正“Java 堆空间 - 内存不足”错误 - How can I correct a “Java heap space - Out of Memory” error Java VisualVM 堆空间转储到输出路径 - Java VisualVM heap space dump into output path 当我在jvisualvm中转储堆时,如何删除对Runnable的“Java Frame”GC根引用? - How can I remove a “Java Frame” GC Root reference to a Runnable when I dump a heap in jvisualvm? 我可以在没有安装 jdk 的情况下从远程服务器获取 java 进程的堆转储吗? - Can I get heap dump of a java process from a remote server without jdk installed? 我可以对堆转储文件运行Java垃圾回收吗? - Can I run Java garbage collection against a heap dump file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM