@@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize() {
if (cu == nullptr)
continue;
-SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
+SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(false);
kusmour wrote:
Will put a new PR to
https://github.com/kusmour closed
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From e5902abd4cd401f5e6a132d1fa5d0b2197512494 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/5] Support statistics dump summary only mode
Summary:
Added a new --s
@@ -184,8 +219,12 @@ void TargetStats::IncreaseSourceMapDeduceCount() {
bool DebuggerStats::g_collecting_stats = false;
-llvm::json::Value DebuggerStats::ReportStatistics(Debugger &debugger,
- Target *target) {
+llvm::json::Val
@@ -100,60 +101,94 @@ llvm::json::Value ConstStringStats::ToJSON() const {
return obj;
}
-json::Value TargetStats::ToJSON(Target &target) {
- CollectStats(target);
+json::Value
+TargetStats::ToJSON(Target &target,
+const lldb_private::StatisticsOptions &
@@ -83,13 +86,17 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_stats_options = StatisticsOptions();
}
llvm::ArrayRef GetDefinitions
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg approved this pull request.
A few nits you can fix if you want to.
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lld
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From e5902abd4cd401f5e6a132d1fa5d0b2197512494 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/4] Support statistics dump summary only mode
Summary:
Added a new --s
@@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize() {
if (cu == nullptr)
continue;
-SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
+SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(false);
kusmour wrote:
In that case I will l
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From e5902abd4cd401f5e6a132d1fa5d0b2197512494 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/5] Support statistics dump summary only mode
Summary:
Added a new --s
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From e5902abd4cd401f5e6a132d1fa5d0b2197512494 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/5] Support statistics dump summary only mode
Summary:
Added a new --s
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From c79b3daa3e2a5ed2a571d93871bc527b651c0403 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/4] Support statistics dump summary only mode
Summary:
Added a new --s
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From be36537cfc647735a823b685ab89ca68d1ae9803 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/4] Support statistics dump summary only mode
Summary:
Added a new --s
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From 4e06a3ebcf12de413f0906b1f4f6aaca40bedcff Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/4] Support statistics dump summary only mode
Summary:
Added a new --s
@@ -0,0 +1,31 @@
+//===-- SBStatisticsOptions.h ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -75,6 +75,9 @@ class CommandObjectStatsDump : public CommandObjectParsed {
case 'a':
m_all_targets = true;
break;
+ case 's':
+m_summary_only = true;
clayborg wrote:
See comment about storing a different ivar below, then t
@@ -198,16 +198,24 @@ SBDebugger SBTarget::GetDebugger() const {
}
SBStructuredData SBTarget::GetStatistics() {
+ LLDB_INSTRUMENT_VA(this);
+ SBStatisticsOptions options;
+ options.SetSummaryOnly(false);
+ return GetStatistics(options);
+}
+
+SBStructuredData SBTarget::Ge
@@ -83,13 +86,21 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -0,0 +1,31 @@
+//===-- SBStatisticsOptions.h ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,46 @@
+//===-- SBStatisticsOptions.cpp
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -83,13 +86,21 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -100,60 +101,91 @@ llvm::json::Value ConstStringStats::ToJSON() const {
return obj;
}
-json::Value TargetStats::ToJSON(Target &target) {
- CollectStats(target);
+json::Value TargetStats::ToJSON(Target &target, bool summary_only) {
clayborg wrote:
This f
@@ -198,16 +198,24 @@ SBDebugger SBTarget::GetDebugger() const {
}
SBStructuredData SBTarget::GetStatistics() {
+ LLDB_INSTRUMENT_VA(this);
+ SBStatisticsOptions options;
+ options.SetSummaryOnly(false);
clayborg wrote:
This defaults to false right? I wou
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -130,10 +130,14 @@ struct ConstStringStats {
ConstString::MemoryStats stats = ConstString::GetMemoryStats();
};
+struct StatisticsOptions {
+ bool summary_only = false;
+};
+
/// A class that represents statistics for a since lldb_private::Target.
class TargetStats {
@@ -83,13 +86,15 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -241,7 +241,7 @@ class DWARFUnit : public UserID {
FileSpec GetFile(size_t file_idx);
FileSpec::Style GetPathStyle();
- SymbolFileDWARFDwo *GetDwoSymbolFile();
+ SymbolFileDWARFDwo *GetDwoSymbolFile(bool load_if_needed = true);
bulbazord wrote:
Inste
@@ -86,9 +86,13 @@ class LLDB_API SBTarget {
/// Returns a dump of the collected statistics.
///
+ /// \param[in] summary_only
+ /// If true, only report high level summary statistics without
+ /// targets/modules/breakpoints etc.. details.
+ ///
/// \return
@@ -186,6 +186,10 @@ class SymbolFileDWARF : public SymbolFileCommon {
GetMangledNamesForFunction(const std::string &scope_qualified_name,
std::vector &mangled_names) override;
+ // Return total currently loaded debug info.
+ // For cases like
https://github.com/bulbazord edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/bulbazord requested changes to this pull request.
Haven't looked over everything yet but this has an ABI-breaking change. Please
revert the existing changes to SBTarget.
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commi
@@ -83,13 +86,15 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize() {
if (cu == nullptr)
continue;
-SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
+SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(false);
clayborg wrote:
This bool might need
@@ -326,7 +330,7 @@ class LLDB_API SBTarget {
uint32_t GetAddressByteSize();
const char *GetTriple();
-
+
clayborg wrote:
revert whitespace only changes
https://github.com/llvm/llvm-project/pull/80745
___
lld
@@ -100,60 +101,91 @@ llvm::json::Value ConstStringStats::ToJSON() const {
return obj;
}
-json::Value TargetStats::ToJSON(Target &target) {
- CollectStats(target);
+json::Value TargetStats::ToJSON(Target &target, bool summary_only) {
clayborg wrote:
Pass i
@@ -197,17 +197,18 @@ SBDebugger SBTarget::GetDebugger() const {
return debugger;
}
-SBStructuredData SBTarget::GetStatistics() {
+SBStructuredData SBTarget::GetStatistics(bool summary_only) {
clayborg wrote:
pass in const `SBStatisticsOptions options` inst
@@ -4962,4 +4962,6 @@ std::recursive_mutex &Target::GetAPIMutex() {
}
/// Get metrics associated with this target in JSON format.
-llvm::json::Value Target::ReportStatistics() { return m_stats.ToJSON(*this); }
+llvm::json::Value Target::ReportStatistics(bool summary_only) {
--
@@ -83,13 +86,15 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -86,9 +86,13 @@ class LLDB_API SBTarget {
/// Returns a dump of the collected statistics.
///
+ /// \param[in] summary_only
+ /// If true, only report high level summary statistics without
+ /// targets/modules/breakpoints etc.. details.
+ ///
/// \return
@@ -1599,7 +1599,7 @@ class Target : public
std::enable_shared_from_this,
///
/// \return
/// Returns a JSON value that contains all target metrics.
- llvm::json::Value ReportStatistics();
+ llvm::json::Value ReportStatistics(bool summary_only = false);
---
@@ -133,7 +133,7 @@ struct ConstStringStats {
/// A class that represents statistics for a since lldb_private::Target.
class TargetStats {
public:
- llvm::json::Value ToJSON(Target &target);
+ llvm::json::Value ToJSON(Target &target, bool summary_only = false);
--
@@ -171,9 +171,14 @@ class DebuggerStats {
/// The single target to emit statistics for if non NULL, otherwise dump
/// statistics only for the specified target.
///
+ /// \param summary_only
+ /// If true, only report high level summary statistics without
+ ///
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize() {
if (cu == nullptr)
continue;
-SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
+SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(false);
jeffreytan81 wrote:
Instead of hard-
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From 36c84ce56e9ea288d64833aa1f927a7f97fd904c Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/3] Support statistics dump summary only mode
Summary:
Added a new --s
@@ -74,7 +75,7 @@ json::Value ModuleStats::ToJSON() const {
if (!symfile_modules.empty()) {
json::Array symfile_ids;
-for (const auto symfile_id: symfile_modules)
+for (const auto symfile_id : symfile_modules)
kusmour wrote:
Yes I can revert tha
@@ -74,7 +75,7 @@ json::Value ModuleStats::ToJSON() const {
if (!symfile_modules.empty()) {
json::Array symfile_ids;
-for (const auto symfile_id: symfile_modules)
+for (const auto symfile_id : symfile_modules)
hawkinsw wrote:
Is this just a whit
@@ -100,60 +101,91 @@ llvm::json::Value ConstStringStats::ToJSON() const {
return obj;
}
-json::Value TargetStats::ToJSON(Target &target) {
- CollectStats(target);
+json::Value TargetStats::ToJSON(Target &target, bool summary_only) {
+ json::Object target_metrics_json;
+
@@ -186,6 +186,10 @@ class SymbolFileDWARF : public SymbolFileCommon {
GetMangledNamesForFunction(const std::string &scope_qualified_name,
std::vector &mangled_names) override;
+ // Return total currently loaded debug info
hawki
@@ -1412,4 +1412,7 @@ let Command = "trace schema" in {
let Command = "statistics dump" in {
def statistics_dump_all: Option<"all-targets", "a">, Group<1>,
Desc<"Include statistics for all targets.">;
+ def statistics_dump_summary: Option<"summary", "s">, Group<1>,
+
@@ -1412,4 +1412,7 @@ let Command = "trace schema" in {
let Command = "statistics dump" in {
def statistics_dump_all: Option<"all-targets", "a">, Group<1>,
Desc<"Include statistics for all targets.">;
+ def statistics_dump_summary: Option<"summary", "s">, Group<1>,
+
https://github.com/hawkinsw commented:
Thank you for doing this! I hope that these little nits are helpful!
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/hawkinsw edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From 36c84ce56e9ea288d64833aa1f927a7f97fd904c Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/2] Support statistics dump summary only mode
Summary:
Added a new --s
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From 30d723ba9808c7a8109b11dd0f20b4d8808e9ad5 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/2] Support statistics dump summary only mode
Summary:
Added a new --s
https://github.com/kusmour updated
https://github.com/llvm/llvm-project/pull/80745
>From 429a44aa6332440e879f7c5f91037741814d1a17 Mon Sep 17 00:00:00 2001
From: Wanyi Ye
Date: Fri, 2 Feb 2024 15:42:01 -0800
Subject: [PATCH 1/2] Support statistics dump summary only mode
Summary:
Added a new --s
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 76706090c2f672ae933798292bfa889f9e3dac3d
ebf4db52352c39f33e483affa2bcee88298b353a --
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
76706090c2f672ae933798292bfa889f9e3dac3d...ebf4db52352c39f33e483affa2bcee88298b353a
lldb/
https://github.com/kusmour edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kusmour edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Wanyi (kusmour)
Changes
Added a new --summary option to statistics dump command so that it is much
light weight than the full version.
Per my benchmark against AdFinder, full statistics dump takes 20 ~ 30
seconds to complete while stat
https://github.com/kusmour created
https://github.com/llvm/llvm-project/pull/80745
Added a new --summary option to statistics dump command so that it is much
light weight than the full version.
Per my benchmark against AdFinder, full statistics dump takes 20 ~ 30
seconds to complete while
65 matches
Mail list logo