Skip to content

Instantly share code, notes, and snippets.

@esshka
Created July 3, 2024 00:29
Show Gist options
  • Save esshka/d378866f11e3588929b0fef8caf0bf53 to your computer and use it in GitHub Desktop.
Save esshka/d378866f11e3588929b0fef8caf0bf53 to your computer and use it in GitHub Desktop.
(import 'java.lang.management.ManagementFactory)
(import 'com.sun.management.HotSpotDiagnosticMXBean)
(let [server (ManagementFactory/getPlatformMBeanServer)
bean-name "com.sun.management:type=HotSpotDiagnostic"
bean (ManagementFactory/newPlatformMXBeanProxy server bean-name HotSpotDiagnosticMXBean)
live-objects-only? false]
(.dumpHeap bean "dump.hprof" live-objects-only?))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment