[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits

bulbazord wrote:

Fix: https://github.com/llvm/llvm-project/pull/94683

https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits

bulbazord wrote:

Ah, I see there was a test for this that I missed. I've gotten an email about 
it, taking a look now.

```
Failed Tests (1):
  lldb-api :: functionalities/stats_api/TestStatisticsAPI.py
```

https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits

https://github.com/bulbazord closed 
https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Greg Clayton via lldb-commits

https://github.com/clayborg approved this pull request.


https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Jonas Devlieghere via lldb-commits

https://github.com/JDevlieghere approved this pull request.


https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread via lldb-commits

https://github.com/kusmour edited 
https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread via lldb-commits

https://github.com/kusmour approved this pull request.

LGTM!

https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Alex Langford (bulbazord)


Changes

The summary already includes other size information, e.g. total debug info size 
in bytes. The only other way I can get this information is by dumping all 
statistics which can be quite large. Adding it to the summary seems fair.

---
Full diff: https://github.com/llvm/llvm-project/pull/94671.diff


1 Files Affected:

- (modified) lldb/source/Target/Statistics.cpp (+5-5) 


``diff
diff --git a/lldb/source/Target/Statistics.cpp 
b/lldb/source/Target/Statistics.cpp
index be0848573f812..2a5300012511a 100644
--- a/lldb/source/Target/Statistics.cpp
+++ b/lldb/source/Target/Statistics.cpp
@@ -355,14 +355,14 @@ llvm::json::Value DebuggerStats::ReportStatistics(
   }
   global_stats.try_emplace("targets", std::move(json_targets));
 
+  ConstStringStats const_string_stats;
+  json::Object json_memory{
+  {"strings", const_string_stats.ToJSON()},
+  };
+  global_stats.try_emplace("memory", std::move(json_memory));
   if (!summary_only) {
-ConstStringStats const_string_stats;
-json::Object json_memory{
-{"strings", const_string_stats.ToJSON()},
-};
 json::Value cmd_stats = debugger.GetCommandInterpreter().GetStatistics();
 global_stats.try_emplace("modules", std::move(json_modules));
-global_stats.try_emplace("memory", std::move(json_memory));
 global_stats.try_emplace("commands", std::move(cmd_stats));
   }
 

``




https://github.com/llvm/llvm-project/pull/94671
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Include memory stats in statistics summary (PR #94671)

2024-06-06 Thread Alex Langford via lldb-commits

https://github.com/bulbazord created 
https://github.com/llvm/llvm-project/pull/94671

The summary already includes other size information, e.g. total debug info size 
in bytes. The only other way I can get this information is by dumping all 
statistics which can be quite large. Adding it to the summary seems fair.

>From 13df49b8bfedd470138c95d99f4db61b7dac83a2 Mon Sep 17 00:00:00 2001
From: Alex Langford 
Date: Thu, 6 Jun 2024 12:36:35 -0700
Subject: [PATCH] [lldb] Include memory stats in statistics summary

The summary already includes other size information, e.g. total debug
info size in bytes. The only other way I can get this information is by
dumping all statistics which can be quite large. Adding it to the
summary seems fair.
---
 lldb/source/Target/Statistics.cpp | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lldb/source/Target/Statistics.cpp 
b/lldb/source/Target/Statistics.cpp
index be0848573f812..2a5300012511a 100644
--- a/lldb/source/Target/Statistics.cpp
+++ b/lldb/source/Target/Statistics.cpp
@@ -355,14 +355,14 @@ llvm::json::Value DebuggerStats::ReportStatistics(
   }
   global_stats.try_emplace("targets", std::move(json_targets));
 
+  ConstStringStats const_string_stats;
+  json::Object json_memory{
+  {"strings", const_string_stats.ToJSON()},
+  };
+  global_stats.try_emplace("memory", std::move(json_memory));
   if (!summary_only) {
-ConstStringStats const_string_stats;
-json::Object json_memory{
-{"strings", const_string_stats.ToJSON()},
-};
 json::Value cmd_stats = debugger.GetCommandInterpreter().GetStatistics();
 global_stats.try_emplace("modules", std::move(json_modules));
-global_stats.try_emplace("memory", std::move(json_memory));
 global_stats.try_emplace("commands", std::move(cmd_stats));
   }
 

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits