[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-11-17 Thread via lldb-commits
https://github.com/jeffreytan81 closed https://github.com/llvm/llvm-project/pull/113723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-11-17 Thread via lldb-commits
https://github.com/kusmour approved this pull request. https://github.com/llvm/llvm-project/pull/113723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread via lldb-commits
@@ -426,6 +426,8 @@ class LLDB_API SBDebugger { SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier); + void ResetStatistics(); jeffreytan81 wrote: Comments added. I do not think we need to clear any breakpoint stats because they are not reused acros

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/113723 >From abf234c1009b23b000a2b39684fb888084cf5e8c Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 24 Oct 2024 17:14:55 -0700 Subject: [PATCH 1/2] Report statistics per target --- lldb/include/lldb/API

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread Greg Clayton via lldb-commits
@@ -1600,6 +1600,15 @@ bool Module::MergeArchitecture(const ArchSpec &arch_spec) { return SetArchitecture(merged_arch); } +void Module::ResetStatistics() { + m_symtab_parse_time.reset(); + m_symtab_index_time.reset(); + SymbolFile *sym_file = GetSymbolFile(); + if (sym_

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread Greg Clayton via lldb-commits
@@ -101,6 +101,9 @@ class LLDB_API SBTarget { /// A SBStructuredData with the statistics collected. lldb::SBStructuredData GetStatistics(SBStatisticsOptions options); + /// Reset the statistics collected for this target. clayborg wrote: Document this

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: So this patch seems to just clear the module + symbol file stats, not any breakpoint resolve times, etc. https://github.com/llvm/llvm-project/pull/113723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread Greg Clayton via lldb-commits
@@ -426,6 +426,8 @@ class LLDB_API SBDebugger { SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier); + void ResetStatistics(); clayborg wrote: Add a header doc comment for this to document what this will do: - clear all stats for all modules in all t

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-28 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/113723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -1667,6 +1667,12 @@ SBTypeSynthetic SBDebugger::GetSyntheticForType(SBTypeNameSpecifier type_name) { DataVisualization::GetSyntheticForType(type_name.GetSP())); } +void SBDebugger::ResetStatistics() { clayborg wrote: Should we add a `void SBTarget::

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/113723 >From abf234c1009b23b000a2b39684fb888084cf5e8c Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 24 Oct 2024 17:14:55 -0700 Subject: [PATCH] Report statistics per target --- lldb/include/lldb/API/SBD

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/113723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/113723 >From debd58ec81a8c245475531c990e969b39770bc1e Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 24 Oct 2024 17:14:55 -0700 Subject: [PATCH] Report statistics per target --- lldb/include/lldb/API/SBD

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -318,6 +318,9 @@ class SymbolFileDWARF : public SymbolFileCommon { StatsDuration &GetDebugInfoParseTimeRef() { return m_parse_time; } + void ResetDebugInfoParseTime() override { m_parse_time.reset(); } + void ResetDebugInfoIndexTime() override; + clayb

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -236,6 +236,27 @@ void TargetStats::IncreaseSourceRealpathCompatibleCount(uint32_t count) { bool DebuggerStats::g_collecting_stats = false; +void DebuggerStats::ResetStatistics(Debugger &debugger, Target *target) { + const uint64_t num_modules = target != nullptr +

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -422,6 +422,13 @@ class SymbolFile : public PluginInterface { /// hasn't been indexed yet, or a valid duration if it has. virtual StatsDuration::Duration GetDebugInfoIndexTime() { return {}; } + /// Reset the time taken to parse the debug information. + virtual void R

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread via lldb-commits
@@ -555,6 +555,18 @@ StatsDuration::Duration SymbolFileOnDemand::GetDebugInfoIndexTime() { return m_sym_file_impl->GetDebugInfoIndexTime(); } +void SymbolFileOnDemand::ResetDebugInfoParseTime() { + LLDB_LOG(GetLog(), "[{0}] {1} is not skipped", GetSymbolFileName(), +

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -422,6 +422,13 @@ class SymbolFile : public PluginInterface { /// hasn't been indexed yet, or a valid duration if it has. virtual StatsDuration::Duration GetDebugInfoIndexTime() { return {}; } + /// Reset the time taken to parse the debug information. + virtual void R

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -789,6 +789,7 @@ void Debugger::Destroy(DebuggerSP &debugger_sp) { (*debugger_sp->GetAsyncErrorStream()) << result.GetErrorData() << '\n'; } + DebuggerStats::ResetStatistics(*debugger_sp, nullptr); clayborg wrote: We probably don't need to call th

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -236,6 +236,27 @@ void TargetStats::IncreaseSourceRealpathCompatibleCount(uint32_t count) { bool DebuggerStats::g_collecting_stats = false; +void DebuggerStats::ResetStatistics(Debugger &debugger, Target *target) { + const uint64_t num_modules = target != nullptr +

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -182,6 +182,9 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile { lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override; lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override; + void ResetDebugInfoParseTime() override; + v

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -236,6 +236,27 @@ void TargetStats::IncreaseSourceRealpathCompatibleCount(uint32_t count) { bool DebuggerStats::g_collecting_stats = false; +void DebuggerStats::ResetStatistics(Debugger &debugger, Target *target) { + const uint64_t num_modules = target != nullptr +

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -555,6 +555,18 @@ StatsDuration::Duration SymbolFileOnDemand::GetDebugInfoIndexTime() { return m_sym_file_impl->GetDebugInfoIndexTime(); } +void SymbolFileOnDemand::ResetDebugInfoParseTime() { + LLDB_LOG(GetLog(), "[{0}] {1} is not skipped", GetSymbolFileName(), +

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -236,6 +236,27 @@ void TargetStats::IncreaseSourceRealpathCompatibleCount(uint32_t count) { bool DebuggerStats::g_collecting_stats = false; +void DebuggerStats::ResetStatistics(Debugger &debugger, Target *target) { + const uint64_t num_modules = target != nullptr ---

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -4464,6 +4464,11 @@ StatsDuration::Duration SymbolFileDWARF::GetDebugInfoIndexTime() { return {}; } +void SymbolFileDWARF::ResetDebugInfoIndexTime() { + if (m_index) +return m_index->ResetIndexTime(); +} + clayborg wrote: Change to `ResetStatistics

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread Greg Clayton via lldb-commits
@@ -83,6 +83,8 @@ class DWARFIndex { StatsDuration::Duration GetIndexTime() { return m_index_time; } + void ResetIndexTime() { m_index_time.reset(); } + clayborg wrote: Switch to `ResetStatistics` and use similar function in all other classes. https://gi

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jeffreytan81) Changes "statistics dump" currently report the statistics of all targets in debugger instead of current target. This is wrong because there is a "statistics dump --all-targets" option that supposed to include everything

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread via lldb-commits
https://github.com/jeffreytan81 ready_for_review https://github.com/llvm/llvm-project/pull/113723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix statistics dump to report per-target (PR #113723)

2024-10-25 Thread via lldb-commits
https://github.com/jeffreytan81 created https://github.com/llvm/llvm-project/pull/113723 "statistics dump" currently report the statistics of all targets in debugger instead of current target. This is wrong because there is a "statistics dump --all-targets" option that supposed to include ever