[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136236 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/136236 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots commented: After your change we can expect that no symbols are loaded by your simple repro, right? Can we extend the test here (or add a new one) to show that no symbols will be loaded in that case by checking the stats? https://github.com/dmpots/llvm-project/blob/mai

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread David Peixotto via lldb-commits
@@ -761,3 +761,77 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { Symtab *cached_module_symtab = module_sp->GetSymtab(/*can_create=*/false); ASSERT_EQ(module_symtab, cached_module_symtab); } + +TEST_F(SymtabTest, TestSymbolTableCreatedOnDemand) { + const char *yamldata

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-18 Thread David Peixotto via lldb-commits
@@ -749,10 +749,20 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded()); auto module_sp = std::make_shared(ExpectedFile->moduleSpec()); - // The symbol table should not be loaded by default. + // The symbol file should

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-18 Thread David Peixotto via lldb-commits
@@ -749,10 +749,20 @@ TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded()); auto module_sp = std::make_shared(ExpectedFile->moduleSpec()); - // The symbol table should not be loaded by default. + // The symbol file should

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
@@ -168,23 +170,34 @@ def test_default_no_run(self): "totalSymbolTableIndexTime", "totalSymbolTablesLoadedFromCache", "totalSymbolTablesSavedToCache", +"totalSymbolsLoaded", "totalDebugInfoByteSize", "tot

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136226 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
@@ -318,12 +321,15 @@ llvm::json::Value DebuggerStats::ReportStatistics( module_stat.symtab_index_time = module->GetSymtabIndexTime().get().count(); Symtab *symtab = module->GetSymtab(/*can_create=*/false); if (symtab) { + module_stat.num_symbols_loaded = symta

[Lldb-commits] [lldb] [lldb] Add symbol/table count into statistics (PR #136226)

2025-04-17 Thread David Peixotto via lldb-commits
@@ -168,23 +170,34 @@ def test_default_no_run(self): "totalSymbolTableIndexTime", "totalSymbolTablesLoadedFromCache", "totalSymbolTablesSavedToCache", +"totalSymbolsLoaded", dmpots wrote: We should also check for

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
dmpots wrote: @JDevlieghere @jimingham @clayborg Thanks for the comments. I updated the PR based on the initial feedback. We still have a few open issues that could use a bit more feedback: 1. Are we ok to start with a static table of plugin namespaces or do we want dynamic registration from

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-11 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/7] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] [lldb] Fix intel trace plugin tests (PR #133826)

2025-04-05 Thread David Peixotto via lldb-commits
dmpots wrote: Here are the relevant test result changes for this change. Trace Hardware Unsupported == Before --- -- Testing: 11 tests, 11 workers -- Unresolved Tests (7): lldb-api :: commands/trace/TestTraceDumpFunctionCalls.py lldb-api :: commands/trace/

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/134173 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132884 >From 6edc108199044d30eed396145aab463db40d6351 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 13 Mar 2025 16:13:45 -0700 Subject: [PATCH 1/2] Remove raw access to PluginInstances vector This commit mod

[Lldb-commits] [lldb] [lldb] Fix intel trace plugin tests (PR #133826)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/133826 The tests for the [intel-pt](https://github.com/llvm/llvm-project/blob/348374028970c956f2e49ab7553b495d7408ccd9/lldb/docs/use/intel_pt.rst) trace plugin were failing for multiple reasons. On machines where traci

[Lldb-commits] [lldb] Add enable/disable api for SystemRuntime plugins (PR #133794)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/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 plug

[Lldb-commits] [lldb] Fix the incorrect reporting of dwarf5 .debug_names index time during partial indexing (PR #134133)

2025-04-05 Thread David Peixotto via lldb-commits
@@ -65,6 +65,10 @@ class DebugNamesDWARFIndex : public DWARFIndex { void GetFunctions(const RegularExpression ®ex, llvm::function_ref callback) override; + StatsDuration::Duration GetIndexTime() override { +return m_fallback.GetIndexTime(); -

[Lldb-commits] [lldb] [lldb] Require wide char support in unicode test (PR #131951)

2025-04-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/131951 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
dmpots wrote: > Another way to do this would be to have the list of disabled plugins show in > the result of the `version` command, since that's a commonly provided bit of > info for bug reports. Thanks for the suggestion. Let me work on this and update the PR. https://github.com/llvm/llvm-p

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-04 Thread David Peixotto via lldb-commits
dmpots wrote: > LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` > running on `linaro-lldb-aarch64-ubuntu` while building `lldb` at step 6 > "test". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/59/builds/15362 > > Here is the relevant

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/4] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
@@ -46,12 +49,344 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/3] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] [lldb] Change test paths to resolve symlinks (PR #132053)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/132053 This commit modifes the `getSourceDir()` and `getBuildDir()` functions to use os.path.realpath to resolve symlinks in the Base test class used for API tests. A few tests were failing when the build and source di

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132884 >From 6edc108199044d30eed396145aab463db40d6351 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 13 Mar 2025 16:13:45 -0700 Subject: [PATCH 1/2] Remove raw access to PluginInstances vector This commit mod

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/134418 >From e240bda8fcea9db4d9c456929ba811feb8d4152b Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 11 Mar 2025 13:02:14 -0700 Subject: [PATCH 1/2] Add commands to list/enable/disable plugins This commit add

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
@@ -46,12 +49,344 @@ class CommandObjectPluginLoad : public CommandObjectParsed { } }; +namespace { +#define LLDB_OPTIONS_plugin_list +#include "CommandOptions.inc" + +// These option definitions are shared by the plugin list/enable/disable +// commands. +class PluginListCo

[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/134418 This commit adds three new commands for managing plugins. The `list` command will show which plugins are currently registered and their enabled state. The `enable` and `disable` commands can be used to enable or

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-04-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/132884 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-02 Thread David Peixotto via lldb-commits
dmpots wrote: This is my guess on what is causing the test failures. Can revert this and the original PR if it doesn't work. https://github.com/llvm/llvm-project/pull/134173 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-02 Thread David Peixotto via lldb-commits
dmpots wrote: The windows bots are now passing on this test so I think it was ICF that was the problem: https://lab.llvm.org/buildbot/#/changes/32645 https://github.com/llvm/llvm-project/pull/134173 ___ lldb-commits mailing list lldb-commits@lists.llv

[Lldb-commits] [lldb] [lldb] Fix plugin manager test failure on windows (PR #134173)

2025-04-02 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/134173 This is an attempt to fix a test failure from #133794 when running on windows builds. I suspect we are running into a case where the [ICF](https://learn.microsoft.com/en-us/cpp/build/reference/opt-optimizations?

[Lldb-commits] [lldb] [lldb] Revert plugin manager changes to investigate failure (PR #134183)

2025-04-02 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/134183 Revert the below two commits while we investigate the test failures. Revert "[lldb] Fix plugin manager test failure on windows (#134173)" This reverts commit b55bab229228218341e2f24fc8529c7aaab51e2f. Revert "Ad

[Lldb-commits] [lldb] Add enable/disable api for SystemRuntime plugins (PR #133794)

2025-04-02 Thread David Peixotto via lldb-commits
dmpots wrote: I have an attempted fix for these failures in #134173. I suspect ICF is combining the create functions into a single address which make us unable to remove them based on a unique address (which the plugin manager assumes). https://github.com/llvm/llvm-project/pull/133794

[Lldb-commits] [lldb] Add enable/disable api for SystemRuntime plugins (PR #133794)

2025-03-31 Thread David Peixotto via lldb-commits
dmpots wrote: This PR modifies the PluginManager to support enable/disable. A following [commit](https://github.com/dmpots/llvm-project/commit/aaa3ab3d063580747bb106f39e6792232cc0af00) will expose the commands to the user. This is currently only working for the SystemRuntime plugins. Once thes

[Lldb-commits] [lldb] Plugin toggle roadmap (PR #132876)

2025-03-27 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132876 >From 21ac6ae78d53feba8322e3aca724ecb01ff7c847 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Thu, 13 Mar 2025 16:13:45 -0700 Subject: [PATCH 1/3] Remove raw access to PluginInstances vector This commit mod

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-03-27 Thread David Peixotto via lldb-commits
dmpots wrote: > Alright, let's go with the copy. Unless you think the `enabled` property > might change while we're iterating over the plugins, we should be able to > store it in the PluginInstance. AFAIK, the instance itself is never stored > away. Sounds good. That seems to be the simplest

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-03-27 Thread David Peixotto via lldb-commits
dmpots wrote: > > We did consider this approach. There are some drawbacks beyond the > > performance issue, but the tradeoff may be worth it. > > If we define the method like: `std::vector > > GetEnabledInstances()` then we are returning copies of the PluginInstance. > > Anything that modifies

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-03-26 Thread David Peixotto via lldb-commits
dmpots wrote: > Did you consider having something like `GetEnabledInstances` that returns a > vector with just the enabled instances? It seems like that would be a lot > less intrusive and I'd be surprised if this code is hot enough that the > overhead of creating a new vector instead of retur

[Lldb-commits] [lldb] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-03-24 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/132884 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix tests to resolve symlinks when checking paths (PR #132053)

2025-03-24 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/132053 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-03-24 Thread David Peixotto via lldb-commits
dmpots wrote: This PR is the first of a [series](https://github.com/llvm/llvm-project/pull/132876) of commits to implement a generic way to enable/disable plugins. The linked draft PR provides more context about how these changes work to allow plugin enable/disable. https://github.com/llvm/ll

[Lldb-commits] [lldb] Remove raw access to PluginInstances vector (PR #132884)

2025-03-24 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/132884 This commit modifies the PluginInstances class to remove direct access to the m_instances vector. Instead, we expose a new `ForEachEnabledPlugin` method that takes a callback to operate on each plugin. All exter

[Lldb-commits] [lldb] [lldb] Fix tests to resolve symlinks when checking paths (PR #132053)

2025-03-21 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/132053 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix tests to resolve symlinks when checking paths (PR #132053)

2025-03-20 Thread David Peixotto via lldb-commits
dmpots wrote: > Resolving the symlink is not the right thing to do in some cases (such as > when you symlinks define the actual/expected layout of the directory tree and > the real paths are meaningless (e.g. nodes in some CAS storage). I would very > much like to see solution that applies the

[Lldb-commits] [lldb] [lldb] Fix tests to resolve symlinks when checking paths (PR #132053)

2025-03-20 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/132053 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Change test paths to resolve symlinks (PR #132053)

2025-03-20 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/132053 >From efde68cf06da2f668f4d2ecd638b826c7f4c5b70 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Wed, 19 Mar 2025 08:44:59 -0700 Subject: [PATCH 1/3] [lldb] Change test paths to resolve symlinks This commit mo

[Lldb-commits] [lldb] [lldb] Split some lldb-server tests to avoid timeout (PR #129614)

2025-03-13 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/129614 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Split some tests to avoid timeout (PR #129614)

2025-03-12 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/129614 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Split TestGdbRemoteFork test to avoid timeout (PR #129614)

2025-03-12 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/129614 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Split TestGdbRemoteFork test to avoid timeout (PR #129614)

2025-03-10 Thread David Peixotto via lldb-commits
dmpots wrote: > The test really is big and splitting it up is a good idea, but instead of an > arbitrary 1/2/3 split, I think it be better to do it by functionality. > Looking at the part of the code you moved, I can see several "themes" that we > could use to split this up. One of them is "me

[Lldb-commits] [lldb] [lldb] Split TestGdbRemoteFork test to avoid timeout (PR #129614)

2025-03-10 Thread David Peixotto via lldb-commits
dmpots wrote: > You could make the test binary a cmake dependency, see > `lldb/test/CMakeLists.txt`. Perhaps in: > > ``` > if(TARGET lldb-server) > add_lldb_test_dependency(lldb-server) > endif() > ``` Just so it's clear, it is not lldb-server itself that is the slow dependency, but the cpp

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-07 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/129593 >From bca07d83152df179f7784d0003262fa54834 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Wed, 26 Feb 2025 13:55:35 -0800 Subject: [PATCH 1/5] Avoid force loading symbol files in statistics collection T

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-07 Thread David Peixotto via lldb-commits
@@ -718,3 +720,40 @@ TEST_F(SymtabTest, TestDecodeCStringMaps) { Symtab::eVisibilityAny); ASSERT_NE(symbol, nullptr); } + +TEST_F(SymtabTest, TestSymtabCreatedOnDemand) { + auto ExpectedFile = TestFile::fromYaml(R"( +--- !ELF

[Lldb-commits] [lldb] [lldb] Split TestGdbRemoteFork test to avoid timeout (PR #129614)

2025-03-07 Thread David Peixotto via lldb-commits
dmpots wrote: I looked into why this test (and TestGdbRemoteFork.py) is so slow. Turns out its nothing related to lldb itself, but the build step that occurs as part of the test. These tests methods pretty much all call to `build()` (directly or indirectly) https://github.com/llvm/llvm-proje

[Lldb-commits] [lldb] [lldb] Support expectedFlakey decorator in dotest (PR #129817)

2025-03-06 Thread David Peixotto via lldb-commits
https://github.com/dmpots closed https://github.com/llvm/llvm-project/pull/129817 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support expectedFlakey decorator in dotest (PR #129817)

2025-03-06 Thread David Peixotto via lldb-commits
dmpots wrote: Thanks for all the suggestions. I'll close the PR and try to make some progress internally on this. https://github.com/llvm/llvm-project/pull/129817 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-05 Thread David Peixotto via lldb-commits
@@ -0,0 +1,31 @@ +# RUN: %clang_host -g %S/Inputs/main.c -o %t-main.exe + +# When we enable symbol preload and dump stats there should be a non-zero +# time for parsing symbol tables for the main module. dmpots wrote: Added the comment, thanks! https://github.co

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/129593 >From bca07d83152df179f7784d0003262fa54834 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Wed, 26 Feb 2025 13:55:35 -0800 Subject: [PATCH 1/4] Avoid force loading symbol files in statistics collection T

[Lldb-commits] [lldb] [lldb] Support expectedFlakey decorator in dotest (PR #129817)

2025-03-05 Thread David Peixotto via lldb-commits
dmpots wrote: > That's not to say that things cannot be flakey sometimes: because of how we > test the debugger, we depend on a lot of things, many of which are out of our > control and can cause a test to fail. But that's different from a specific > test being flakey, which is what this decor

[Lldb-commits] [lldb] [lldb] Split test to avoid timeout (PR #129614)

2025-03-05 Thread David Peixotto via lldb-commits
dmpots wrote: > How many others are close to the limit that you've found, just this one? I was only seeing the one timeout in the runs so I had not thought to measure. It's a good idea though. Based on the timings it looks like maybe `TestGdbRemoteFork.py` is worth splitting as well? That one

[Lldb-commits] [lldb] [lldb] Split test to avoid timeout (PR #129614)

2025-03-05 Thread David Peixotto via lldb-commits
@@ -5,9 +5,9 @@ lldb-server tests run where the lldb-server exe is available. -This class will be broken into smaller test case classes by -gdb remote packet functional areas. For now it contains -the initial set of tests implemented. +The tests are split between the LldbGdbS

[Lldb-commits] [lldb] [lldb] Split test to avoid timeout (PR #129614)

2025-03-05 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/129614 >From bb034b3b8c43dae13d7f596c20863b47ce88e4d4 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Mon, 3 Mar 2025 15:39:20 -0800 Subject: [PATCH 1/2] Split test to avoid timeout This test is running right up to

[Lldb-commits] [lldb] [lldb] Support expectedFlakey decorator in dotest (PR #129817)

2025-03-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots created https://github.com/llvm/llvm-project/pull/129817 The dotest framework had an existing decorator to mark flakey tests. It was not implemented and would simply run the underlying test. This commit modifies the decorator to run the test multiple times in the case

[Lldb-commits] [lldb] [lldb] Support expectedFlakey decorator in dotest (PR #129817)

2025-03-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/129817 >From 1d1c3a6bf52ba47a4ff4c13e99209a6ae3d983b3 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 4 Mar 2025 11:39:03 -0800 Subject: [PATCH 1/2] [lldb] Support expectedFlakey decorator in dotest The dotest

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-04 Thread David Peixotto via lldb-commits
@@ -0,0 +1,31 @@ +# RUN: %clang_host -g %S/Inputs/main.c -o %t-main.exe + +# When we enable symbol preload and dump stats there should be a non-zero +# time for parsing symbol tables for the main module. +# RUN: %lldb %t-main.exe \ +# RUN: -O "settings set plugin.jit-loader.

[Lldb-commits] [lldb] [lldb] Avoid force loading symbol files in statistics collection (PR #129593)

2025-03-04 Thread David Peixotto via lldb-commits
https://github.com/dmpots updated https://github.com/llvm/llvm-project/pull/129593 >From bca07d83152df179f7784d0003262fa54834 Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Wed, 26 Feb 2025 13:55:35 -0800 Subject: [PATCH 1/3] Avoid force loading symbol files in statistics collection T

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional in sbprogress (PR #128971)

2025-02-26 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/128971 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional in sbprogress (PR #128971)

2025-02-26 Thread David Peixotto via lldb-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/128971 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional in sbprogress (PR #128971)

2025-02-26 Thread David Peixotto via lldb-commits
@@ -40,7 +40,10 @@ SBProgress::~SBProgress() = default; void SBProgress::Increment(uint64_t amount, const char *description) { LLDB_INSTRUMENT_VA(amount, description); - m_opaque_up->Increment(amount, description); + std::optional description_opt; + if (description && des

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional access in sbprogress (PR #128971)

2025-02-26 Thread David Peixotto via lldb-commits
@@ -33,3 +33,15 @@ def test_without_external_bit_set(self): expected_string = "Test progress first increment" progress.Increment(1, expected_string) self.assertFalse(listener.PeekAtNextEvent(event)) + +def test_with_external_bit_set(self): +"

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional access in sbprogress (PR #128971)

2025-02-26 Thread David Peixotto via lldb-commits
@@ -40,7 +40,10 @@ SBProgress::~SBProgress() = default; void SBProgress::Increment(uint64_t amount, const char *description) { LLDB_INSTRUMENT_VA(amount, description); - m_opaque_up->Increment(amount, description); + std::optional description_opt; + if (description && des