AntTracks – Accurate and Efficient Object Tracing for Java Applications
Object allocations and garbage collection can have a considerable impact on the performance of Java applications.
Without monitoring tools, such performance problems are hard to track down, and if such tools are applied, they often cause a significant overhead and tend to distort the behavior of the monitored application.
In the paper Accurate and Efficient Object Tracing for Java Applications we proposed a novel light-weight memory monitoring approach in which we trace allocations, deallocations and movements of objects using VM-specific knowledge.
Our approach allows us to reconstruct the heap for any point in time and to do offine analyses on both the heap and on the trace. The average run-time overhead is 4.68%, which seems to be fast enough for keeping tracing switched on even in production mode.
This site provides downloads of our virtual machine and the analysis tool as well as tutorials on how to use both of them.
Using the AntTracks VM, you can execute and trace any Java application.
The VM will track every allocation, i.e., the allocation site (including the calling frames for frequent allocations), the allocated type, the allocating thread, the object size, as well as a number of other properties as well as object movements throughout the heap, and object deaths, i.e., when they are reclaimed by the garbage collector.
The analysis tool can then process the trace offline and visualize the change of specific metrics throughout the progress of the application (e.g., memory usage per space over time, GC pauses over time) as well as the heap at a specific point in time. Heap inspection enables users to select multiple classifiers, i,e., grouping criteria, based on which the heap’s objects get grouped by. Further, users can write new classifiers for detailed analysis based on their needs.
This project is a cooperation of the Institute for System Software, the Christian Doppler Laboratory for Monitoring and Evolution of Very-large-scale Software Systems and Dynatrace Austria.
Former Team Members
- Philipp Lengauer – Researcher
- Verena Bitto – Researcher
- Stefan Fitzek – Student Researcher
- Ongoing student contributions
Please cite as: Accurate and Efficient Object Tracing for Java Applications, in Proceedings of the 6th ACM/SPEC International Conference on Performance Engineering (ICPE’15), Austin, TX, USA, 2015
Download both the virtual machine (under the GPL Licence, Copyright dynatrace 2014, 2015) and the analysis tool here:
|Operating System||Virtual Machine||Analysis Tool|
|Linux 64-bit||Download (as .deb, as .rpm) (src)||Download (as .deb, as .rpm) (src)|
|Mac OS 64-bit||Download (src) (deprecated)||Download (src)|
|Windows 64-bit||Download (as .msi) (src)||Download (as .msi) (src)|
Please note that the analysis tool is a prototype and under development. For questions, bug reports, feature requests, contributions, and/or collaborations, please contact Philipp Lengauer or Verena Bitto.
The virtual machine can be installed and used just as any other Java virtual machine. Without any additional parameters, it also behaves exactly like the Oracle Hotspot VM. To enable object tracing, set the VM flag “TraceObjects” by adding “-XX:+TraceObjects” right after the java command. If you run an arbitrary Java application with this flag, two files, named “symbols” and “trace”, will be written containing the object trace.
The following table contains some flags that might of interest:
|TraceObjects||Enable tracing alltogether. The default is “-” (off).||-XX:+TraceObjects|
|TraceObjectsMaxTraceSize||Specify a maximum size (in bytes) the trace file is allowed to grow. If the trace file gets too big, the start will be overwritten. Thus, always the last time frame will be available. The default is “0”, meaning that the trace file may grow indefinitely. If this flag is set to some value other than zero, more than one trace file will be written, all of which will be necessary for offline analysis.||-XX:TraceObjectsMaxTraceSize=32G|
|TraceObjectsTraceSizeMaxDeviation||Specify a maximum deviation (in percent) the trace file may grow above the max trace size. The default is “0.1” (10%).||-XX:TraceObjectsTraceSizeMaxDeviation=0.05|
|TraceObjectsSymbolsFile||Specify a location and name for the symbols file. The default is “./symbols”.||-XX:TraceObjectsSymbolsFile=”./tracing/my_symbols”|
|TraceObjectsTraceFile||Specify a location and name for the trace file(s). The default is “./trace”.||-XX:TraceObjectsTraceFile=”./tracing/my_trace”|
under construction …
- Post-Mortem Memory Profiling for Java Applications, Master’s Thesis, Johannes Kepler University, Linz, Austria, 2015
- Accurate and Efficient Object Tracing for Java Applications, in Proceedings of the 6th ACM/SPEC International Conference on Performance Engineering (ICPE’15), Austin, TX, USA, 2015
- Efficient Rebuilding of Large Java Heaps from Event Traces, in Proceedings of the 12th ACM International Conference on Principles and Practice of Programming on the Java Platform: virtual machines, languages, and tools (PPPJ’15), Melbourne, FL, USA, 2015
- Efficient and Viable Handling of Large Object Traces, in Proceedings of the 7th ACM/SPEC International Conference on Performance Engineering (ICPE’16), Delft, Netherlands, 2016
- Building Custom, Efficient and Accurate Memory Monitoring Tools for Java Application in the Proceedings of the 7th ACM/SPEC International Conference on Performance Engineering (ICPE’16), Delft, Netherlands, 2016
- Building Custom, Efficient and Accurate Memory Monitoring Tools for Java Application Tutorial at the 7th ACM/SPEC International Conference on Performance Engineering (ICPE’16), Delft, Netherlands, 2016
- Efficient Memory Traces with Full Pointer Information, in Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools (PPPJ’16), Lugano, Switzerland, 2016
- User-centered Offline Analysis of Memory Monitoring Data, in the Proceedings of the 8th ACM/SPEC International Conference on Performance Engineering (ICPE’17), L’Aquila, Italy, 2017