custom/fast heap dumper

Ying Su yingsu at fb.com
Fri Aug 17 22:51:23 UTC 2018


Hi,

We want to implement a custom fast heap dumper that should work on Java 9 and 10, because we often need to dump huge heaps (~200GB), and it takes 20-30 minutes with jmap (e.g. we thought about zeroing out the large arrays and compressing the output, etc.) We’ve been looking at the following 2 options:


  1.  Modify the JVMTI demo hprof implementation in JDK8
  2.  Reuse/modify jdk9-dev<https://github.com/netroby/jdk9-dev>/hotspot<https://github.com/netroby/jdk9-dev/tree/master/hotspot>/src<https://github.com/netroby/jdk9-dev/tree/master/hotspot/src>/share<https://github.com/netroby/jdk9-dev/tree/master/hotspot/src/share>/vm<https://github.com/netroby/jdk9-dev/tree/master/hotspot/src/share/vm>/services<https://github.com/netroby/jdk9-dev/tree/master/hotspot/src/share/vm/services>/heapDumper.cpp

We’ve tried the first option but it’s very slow due to some shared hash tables causing high lock contention. And the second option is more complicated because we need to access internal JVM classes, and we don’t know how we can deploy it to production. We’d appreciate if we can get some expert opinion on how to best solve this problem.


Thank you very much,
Ying









More information about the hotspot-dev mailing list