Was thinking about this, see https://issues.dlang.org/show_bug.cgi?id=21065.
One problem I noticed with the current instrumentation of allocations is
that it is extremely slow. https://github.com/dlang/dmd/pull/11381 takes
care of that trivially and quickly because it takes advantage of
defining one static variable per instantiation.