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
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
@@ -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
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
@@ -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_
@@ -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
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
@@ -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
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
@@ -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::
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
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
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
@@ -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
@@ -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
+
@@ -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
@@ -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(),
+
@@ -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
@@ -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
@@ -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
+
@@ -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
@@ -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
+
@@ -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(),
+
@@ -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
---
@@ -4464,6 +4464,11 @@ StatsDuration::Duration
SymbolFileDWARF::GetDebugInfoIndexTime() {
return {};
}
+void SymbolFileDWARF::ResetDebugInfoIndexTime() {
+ if (m_index)
+return m_index->ResetIndexTime();
+}
+
clayborg wrote:
Change to `ResetStatistics
@@ -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
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
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
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
29 matches
Mail list logo