Aprof
by Devexperts
Aprof is a Java memory allocation profiler with very low performance impact on the profiled application that can be used (and is used) on highly-loaded server-side applications in production environment. It acts as an agent which transforms class bytecode by inserting counter increments wherever memory allocation is done and tracks a precise size of allocated objects in bytes. It also keeps limited information about allocation context to aid in finding the memory allocation bottlenecks.
Download binaries of the latest release here:
https://bintray.com/devexperts/Maven/aprof/_latestVersion
Using aprof
Download the latest version of aprof distribution, unzip, copy "aprof.jar" to your application's directory and run application with an additional JVM argument:
...
In current version (build 2829):
...