commit | 2684281d208612a746b05c891f346bd7b95318d5 | [log] [tgz] |
---|---|---|
author | jimingham <jingham@apple.com> | Tue Dec 12 11:28:06 2023 -0800 |
committer | GitHub <noreply@github.com> | Tue Dec 12 11:28:06 2023 -0800 |
tree | e70cadd8bb8a6c0f80c0a69d74260e0483f940c4 | |
parent | a06c7d9e5f3e2051c169b56f7a07cffa3be99b51 [diff] |
Add a test for evicting unreachable modules from the global module cache (#74894) When you debug a binary and the change & rebuild and then rerun in lldb w/o quitting lldb, the Modules in the Global Module Cache for the old binary & .o files if used are now "unreachable". Nothing in lldb is holding them alive, and they've already been unlinked. lldb will properly discard them if there's not another Target referencing them. However, this only works in simple cases at present. If you have several Targets that reference the same modules, it's pretty easy to end up stranding Modules that are no longer reachable, and if you use a sequence of SBDebuggers unreachable modules can also get stranded. If you run a long-lived lldb process and are iteratively developing on a large code base, lldb's memory gets filled with useless Modules. This patch adds a test for the mode that currently works: (lldb) target create foo (lldb) run <rebuild foo outside lldb> (lldb) run In that case, we do delete the unreachable Modules. The next step will be to add tests for the cases where we fail to do this, then see how to safely/efficiently evict unreachable modules in those cases as well.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.