penberg/hornet

Memory profiling

Opened this issue · 0 comments

Eliminating fastpath memory allocations is important for predicable execution. VisualVM, for example, does support memory profiling but it's very cumbersome to use.

We need low-overhead, always-on support for something like aprof. It is implemented as a JVM agent and it produces reports like this:

TOTAL allocation dump for 29,423 ms (0h00m29s)
Allocated 66,155,144 bytes in 2,870,108 objects in 1,108 locations of 230 classes
-------------------------------------------------------------------------------
java.lang.Integer: 34,953,568 (52%) bytes in 2,184,598 (76%) objects (avg size 16 bytes)
    java.lang.Integer.valueOf: 34,931,824 (99%) bytes in 2,183,239 (99%) objects
        FibonacciNumbers.fib: 34,852,928 (99%) bytes in 2,178,308 (99%) objects
...