Child pages
  • About Aprof

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Aprof is a lightweight memory allocation profiler for Java.

GitHub Repositoryhttps://github.com/Devexperts/aprof
Public Maven repohttps://bintray.com/devexperts/Maven/aprof
LicenseGPLv3
ContactImage Added

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 bottlenecksDownload 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:

...

  • Does not work on JVM 1.8.0_20 and on JVM 1.7.0_65 (VerifyError on transformed classes) due to a bug in JVM: http://bugs.java.com/view_bug.do?bug_id=8051012 
    For Java 8, use 1.8.0_25 or later
    . For Java 1.7.0 use 1.6.0_60 or turn off verifier with "-noverify" option.
  • Does not work on some releases of 1.6 (1.6.0_21 crashes with FATAL ERROR), but otherwise works in Java 5 to Java 8.
  • Does not fully analyze inheritance hierarchy when tracking configured method invocations. It does not intercept locations of invocations of tracked methods that are performed via a sub-type that inherits the tracked method, It does misleadingly report invocation locations of a non-tracked method that happen to go via super-type that declares a tracked method for some other implementation of this type where this method is tracked. 
  • Reports memory allocations that are performed in Java 8 during lambda capture of variables from scope as belonging to location in some internal "xxx$Lambda$xxx" class, not in the actual source code method that creates this lambda.
  • Does not include Java 8 run-time library method (collections, streams, etc) in default list of tracked methods.

...

Aprof gets accurate profiling results and finds locations of object allocations at the same time being garbage-free and having very low performance impact.

Source Code

You can clone sources from github at https://github.com/Devexperts/aprof

...

.

...

How it works

See presentation on Joker Conference 2014: http://www.slideshare.net/elizarov/aprof-jocker-2014

...