Jann Horn 3f0c180ca0
[DebugInfo][DWARF] Add heapallocsite information (#132073)
LLVM currently stores heapallocsite information in CodeView debuginfo,
but not in DWARF debuginfo. Plumb it into DWARF as an LLVM-specific
extension.

heapallocsite debug information is useful when it is combined with
allocator instrumentation that stores caller addresses; I've used a
previous version of this patch for:

 - analyzing memory usage by object type
 - analyzing the distributions of values of class members

Other possible uses might be:

- attributing memory access profiles (for example, on Intel CPUs, from
PEBS records with Linear Data Address) to object types or specific
object members
 - adding type information to crash/ASAN reports
2025-08-06 10:34:58 -07:00
..