[all-commits] [llvm/llvm-project] 202687: Add enable/disable api for SystemRuntime plugins (...
David Peixotto via All-commits
all-commits at lists.llvm.org
Wed Apr 2 13:15:53 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2026873fb8a1f654aa920cd5ea8074e55053973b
https://github.com/llvm/llvm-project/commit/2026873fb8a1f654aa920cd5ea8074e55053973b
Author: David Peixotto <peix at meta.com>
Date: 2025-04-02 (Wed, 02 Apr 2025)
Changed paths:
M lldb/include/lldb/Core/PluginManager.h
M lldb/source/Core/PluginManager.cpp
M lldb/unittests/Core/CMakeLists.txt
A lldb/unittests/Core/PluginManagerTest.cpp
Log Message:
-----------
Add enable/disable api for SystemRuntime plugins (#133794)
This commit adds support for enabling and disabling plugins by name. The
changes are made generically in the `PluginInstances` class, but
currently we only expose the ability to SystemRuntime plugins. Other
plugins types can be added easily.
We had a few design goals for how disabled plugins should work
1. Plugins that are disabled should still be visible to the system. This
allows us to dynamically enable and disable plugins and report their
state to the user.
2. Plugin order should be stable across disable and enable changes. We
want avoid changing the order of plugin lookup. When a plugin is
re-enabled it should return to its original slot in the creation order.
3. Disabled plugins should not appear in PluginManager operations.
Clients should be able to assume that only enabled plugins will be
returned from the PluginManager.
For the implementation we modify the plugin instance to maintain a bool
of its enabled state. Existing clients external to the Instances class
expect to iterate over only enabled instance so we skip over disabed
instances in the query and snapshot apis. This way the client does not
have to manually check which instances are enabled.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list