| commit | f01a32f5c58b199edf7cd1492a20578453852f0e | [log] [tgz] |
|---|---|---|
| author | Jonas Devlieghere <jonas@devlieghere.com> | Fri Mar 15 09:35:38 2024 -0700 |
| committer | GitHub <noreply@github.com> | Fri Mar 15 09:35:38 2024 -0700 |
| tree | 3f9f2fb19e1b8259818591ec93f28abed34d60d1 | |
| parent | 186565513c57cd625ea7afd7b33897adfed7e9f8 [diff] |
[lldb] Add an Alarm class for coalescing progress reports (#85329) The commit introduces a new, generic, Alarm class. The class lets you to schedule functions (callbacks) that will execute after a predefined timeout. Once scheduled, you can cancel and reset a callback, given the timeout hasn't expired yet. The alarm class worker thread that sleeps until the next timeout expires. When the thread wakes up, it checks for all the callbacks that have expired and calls them in order. Because the callback is called from the worker thread, the only guarantee is that a callback is called no sooner than the timeout. A long running callback could potentially block the worker threads and delay other callbacks from getting called. I intentionally kept the implementation as simple as possible while addressing the needs for the use case of coalescing progress events as discussed in [1]. If we want to rely on this somewhere else, we can reassess whether we need to address this class' limitations. [1] https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717/
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.