A Java agent that instruments every allocation site in your program, invoking custom callbacks for detailed memory tracking.
Allocation Instrumenter is a Java agent that instruments bytecode to track every object allocation in a Java program. It allows developers to attach custom callbacks to allocation events, providing detailed insights into memory usage and enabling advanced profiling and monitoring. The tool operates at the bytecode level using ASM and the java.lang.instrument API, requiring no modifications to the source code.
Java developers and performance engineers who need to analyze memory allocation patterns, debug memory issues, or build custom profiling tools for JVM-based applications.
It offers a flexible, low-overhead solution for fine-grained allocation tracking without altering source code, distinguishing itself from heavier profiling tools by enabling custom, programmatic control over allocation monitoring.
A Java agent that rewrites bytecode to instrument allocation sites
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Instruments every object allocation, including arrays and individual objects, as highlighted in the Key Features, enabling detailed memory usage analysis without source code changes.
Allows user-defined Sampler implementations to capture allocation details like type, size, and count, providing programmatic control for tailored monitoring, as shown in the Basic usage example.
Built on ASM and the java.lang.instrument API, it rewrites bytecode at runtime, avoiding alterations to original source code, which aligns with the project's philosophy of minimal intrusion.
Offers ConstructorInstrumenter to specifically monitor instantiations of particular classes, useful for focused debugging, as demonstrated in the README with Thread.class.
Instrumenting every allocation adds computational cost, which can impact application performance, especially in production environments, despite the project's claim of minimal overhead.
Requires knowledge of Java bytecode manipulation, ASM library, and the instrumentation API, making it less accessible for developers unfamiliar with low-level JVM internals.
Only tracks object allocations and does not provide insights into garbage collection, memory leaks, or other heap-related issues, which might necessitate additional profiling tools.