[llvm-debuginfo-analyzer] (08a/09) - Memory Management
authorCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Thu, 16 Feb 2023 09:52:50 +0000 (09:52 +0000)
committerCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Thu, 16 Feb 2023 10:15:19 +0000 (10:15 +0000)
commit7fbcc24409efdb37cec79ad461ef383f6ffc5ef2
tree8d7624782c9cecbe87421682a5e9326cb1f12b1e
parent2002c82278f6fad4374045b849e414327788139f
[llvm-debuginfo-analyzer] (08a/09) - Memory Management

llvm-debuginfo-analyzer is a command line tool that processes debug
info contained in a binary file and produces a debug information
format agnostic “Logical View”, which is a high-level semantic
representation of the debug info, independent of the low-level
format.

The code has been divided into the following patches:

1) Interval tree
2) Driver and documentation
3) Logical elements
4) Locations and ranges
5) Select elements
6) Warning and internal options
7) Compare elements
8) ELF Reader
8a) Memory Management
9) CodeView Reader

Full details:

https://discourse.llvm.org/t/llvm-dev-rfc-llvm-dva-debug-information-visual-analyzer/62570

This patch:

This is a high level summary of the changes in this patch.

Memory Management
- Use Bump allocators for memory management.

As the logical elements are only allocated in one pass (debuginfo
parsing) and they are never manipulated/created/destroyed later,
use the SpecificBumpPtrAllocator for the memory management.

Reviewed By: dblaikie, Orlando

Differential Revision: https://reviews.llvm.org/D137933
21 files changed:
llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVReader.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVSupport.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h
llvm/include/llvm/DebugInfo/LogicalView/LVReaderHandler.h
llvm/include/llvm/DebugInfo/LogicalView/Readers/LVBinaryReader.h
llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp
llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
llvm/lib/DebugInfo/LogicalView/Core/LVSymbol.cpp
llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp
llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
llvm/unittests/DebugInfo/LogicalView/CompareElementsTest.cpp
llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp
llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp
llvm/unittests/DebugInfo/LogicalView/LogicalElementsTest.cpp
llvm/unittests/DebugInfo/LogicalView/SelectElementsTest.cpp
llvm/unittests/DebugInfo/LogicalView/WarningInternalTest.cpp