corda/test/Hello.java
Joel Dice 6a5116e7a7 implement primitive heap dump facility for memory profiling, accessible via Runtime.dumpHeap
The proper way to do this is to implement a subset of JVMTI, but this
will do the job for now.
2008-10-21 17:38:20 -06:00

12 lines
278 B
Java

public class Hello {
public static void main(String[] args) {
System.out.println("hello, world!");
try {
Runtime.class.getMethod("dumpHeap", String.class)
.invoke(null, "/tmp/heap.bin");
} catch (Exception e) {
e.printStackTrace();
}
}
}