Evaluating Finalization-Based Object Lifetime Profiling
Abstract
Using object lifetime information enables performance im-
provement through memory optimizations such as pretenur-
ing and tuning garbage collector parameters. However, pro-
filing object lifetimes is nontrivial and often requires a spe-
cialized virtual machine to instrument object allocations and
dereferences. Alternative lifetime profiling could be done
with less implementation effort using available finalization
mechanisms such as weak references.
In this paper, we study the impact of finalization on object
lifetime profiling. We built an actionable lifetime profiler
using the ephemeron finalization mechanism named FiLiP.
FiLiP instruments object allocations to exactly record an object’s allocation time and it attaches an ephemeron to each
allocated object to capture its finalization time. We show
that FiLiP can be used in practice and achieves a significant
overhead reduction by pretenuring the ephemeron objects.
We further experiment with the impact of sampling allocations, showing that sampling reduces profiling overhead
while maintaining actionable lifetime measurements.
Origin | Publisher files allowed on an open archive |
---|