[Lldb-commits] [lldb] Define Telemetry plugin for LLDB. (PR #126588)

Vy Nguyen via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 13 12:12:17 PST 2025


oontvoo wrote:

> Based on the title of this PR I was expecting something slightly different, so maybe I'm missing something. But if we want to make this an LLDB plugin (which I agree we should ), I would expect the `PluginManager` to manage the instance rather than the plugin doing itself. With the current patch, I don't see how you're taking advantage of it being a plugin.
> 
> In the `PluginInterface`, I would expect a `Create` instance, something like this:
.... 
> ```

This was what we were doing in the [initial PR](https://github.com/llvm/llvm-project/pull/98528/files#diff-20a2060f8e87c6742d6f2c7ae97e919f8485995d7808bd9fccbfbede697a9ec7)  but Pavel had correctly pointed out that the architecture was unnecessarily "baroque". GIven there will be only one instance of the TelemetrManager at a time and that we will not be creating a new manager on the fly, none of those complex hooks are necessary.

Instead, we just need the downstream implemntation to register its instance (via the setInstance()).
Then the rest of (upstream) LLDB code, which uses the Telemetry, would just do `TelemetryManager::getInstance()`.



https://github.com/llvm/llvm-project/pull/126588


More information about the lldb-commits mailing list