• Home
  • /
  • Talk

Efficiently Tracking Object Allocations in Production Environments

(talk)

Efficiently tracking an application’s object allocations is of interest for memory leak detection or memory usage optimization. One common approach is to sample the heap by taking snapshots of the entire heap. This usually introduces large pauses while taking the snapshot. Also, we do not know where an object has been allocated in the code. Another approach is to instrument all allocation sites and to record every single allocation by incrementing a counter. However, as today's JVMs allocate objects very quickly, incrementing a counter for every allocation adds a lot of overhead, making this approach unattractive in a production environment. Our approach reduces the amount of increments by instrumenting control flow paths instead of allocation sites and dynamically determining the hot path through a method. We continuously reevaluate and reinstrument depending on changes in execution behavior in order to reduce the overhead as much as possible. Our ultimate goal is to reduce the amount of required counter increments to such a degree that using this approach becomes feasible in production environments. Evaluation of our implementation shows a reduction of required increments of up to nearly 30% compared to the state of the art.

Dr. Philipp Lengauer

Software Engineer at Dynatrace

Philipp Lengauer has obtained his PhD in Engineering Sciences from the Johannes Kepler University in Linz, Austria. He has several years of experience in teaching programming in Java, compiler construction, and performance evaluation.