[Lldb-commits] [PATCH] D156606: [lldb] Improve memory usage by freeing CTF types (NFC)

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Jul 29 22:30:15 PDT 2023


JDevlieghere created this revision.
JDevlieghere added a reviewer: Michael137.
Herald added a project: All.
JDevlieghere requested review of this revision.

Improve memory usage by reducing the lifetime of CTF types. Once a CTF type has been converted to a (complete) LLDB type, there's no need to keep it in memory anymore. For most types, we can free them right after creating the corresponding LLDB types. The only exception is record types, which are only completed lazily.

This patch also adds LLVM RTTI support to CTF type. This was suggested in D156498 <https://reviews.llvm.org/D156498> but with just one caller that didn't seem worth it yet. This patch introduced a second call site which tipped the scales.


https://reviews.llvm.org/D156606

Files:
  lldb/source/Plugins/SymbolFile/CTF/CTFTypes.h
  lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
  lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156606.545403.patch
Type: text/x-patch
Size: 7432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230730/613a0c95/attachment-0001.bin>


More information about the lldb-commits mailing list