How to identify individual object's location in JVM heap space

Lijie Xu csxulijie at gmail.com
Thu Aug 22 18:46:28 PDT 2013


Hi, all. With the help of jmap or other tools, we can dump heap objects at
a specific time. Then we can find out both the number and size of the
individual object.

At this point, I would like to know the heap location (Eden, S0/S1, or Old)
of each object. But I cannot find any related information in the heap dump.
How to identify? I really need this information in my project.

I think there is a way to know the address of each object and address
boundary of each space, since GC algorithms have methods to scan objects in
a specific space.

I also noticed that there are some address information generated by
+PrintGCDetails about each space. For example,

Heap
 def new generation   total 153600K, used 152935K [0x14710000, 0x1edb0000,
0x1edb0000)
  eden space 136576K, 100% used [0x14710000, 0x1cc70000, 0x1cc70000)
  from space 17024K,  96% used [0x1dd10000, 0x1ed09f60, 0x1edb0000)
  to   space 17024K,   0% used [0x1cc70000, 0x1cc70000, 0x1dd10000)
 tenured generation   total 341376K, used 341220K [0x1edb0000, 0x33b10000,
0x33b10000)
   the space 341376K,  99% used [0x1edb0000, 0x33ae9160, 0x33ae9200,
0x33b10000)
 compacting perm gen  total 12288K, used 188K [0x33b10000, 0x34710000,
0x37b10000)
   the space 12288K,   1% used [0x33b10000, 0x33b3f2c0, 0x33b3f400,
0x34710000)
    ro space 10240K,  42% used [0x37b10000, 0x37f50348, 0x37f50400,
0x38510000)
    rw space 12288K,  54% used [0x38510000, 0x38b906f0, 0x38b90800,
0x39110000)

What's the exact meaning of these multiple address?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20130823/8ce9bf49/attachment.html 


More information about the hotspot-gc-dev mailing list