[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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 {

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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 {

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via 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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via 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 {

[Lldb-commits] [lldb] [lldb][unittest] Add call_once flag to initialize debugger (PR #80786)

2024-02-05 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/80786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][unittest] Add call_once flag to initialize debugger (PR #80786)

2024-02-05 Thread Chelsea Cassanova via lldb-commits
chelcassanova wrote: I did, I'm adding them as separate patches. DiagnosticEventTest.cpp could probably go here since it's a simple change but ProgressEventTest doesn't exist upstream yet since I had to revert so I think that at least should be it's own PR> https://github.com/llvm/llvm-projec

[Lldb-commits] [lldb] [lldb][unittest] Use shared once_flag in DiagnosticEventTest (PR #80788)

2024-02-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Chelsea Cassanova (chelcassanova) Changes Incorporates the changes from https://github.com/llvm/llvm-project/pull/80786 to use a once_flag from `TestUtilities` instead of a local flag in order to prevent hitting an assertion that the debug

[Lldb-commits] [lldb] [lldb][unittest] Use shared once_flag in DiagnosticEventTest (PR #80788)

2024-02-05 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova created https://github.com/llvm/llvm-project/pull/80788 Incorporates the changes from https://github.com/llvm/llvm-project/pull/80786 to use a once_flag from `TestUtilities` instead of a local flag in order to prevent hitting an assertion that the debugger was

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread via lldb-commits
@@ -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 {

[Lldb-commits] [lldb] [lldb][unittest] Add call_once flag to initialize debugger (PR #80786)

2024-02-05 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: Did you mean to include changes to DiagnosticEventTest.cpp and ProgressReportTest.cpp to use this new global? https://github.com/llvm/llvm-project/pull/80786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.l

[Lldb-commits] [lldb] [lldb][unittest] Add call_once flag to initialize debugger (PR #80786)

2024-02-05 Thread via lldb-commits
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 0d091206dd656c2a9d31d6088a4aa6f9c2cc7156 2fa99391c097def91369c164195ad2a4a1cd98ed --

[Lldb-commits] [lldb] [LLDB] Add FreeBSD kernel coredump matching check. (PR #80785)

2024-02-05 Thread via lldb-commits
https://github.com/aokblast updated https://github.com/llvm/llvm-project/pull/80785 >From 5f9eac19a45cd4b71afe48643fc0cf8b4b4ab6be Mon Sep 17 00:00:00 2001 From: aokblast Date: Tue, 6 Feb 2024 10:18:34 +0800 Subject: [PATCH 1/2] [LLDB] Fetch UUID from note section in coredump --- .../Plugins/

[Lldb-commits] [lldb] [lldb][unittest] Add call_once flag to initialize debugger (PR #80786)

2024-02-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Chelsea Cassanova (chelcassanova) Changes I tried adding a new unit test to the core test suite (https://github.com/llvm/llvm-project/pull/79533) but it broke the test suite on AArch64 Linux due to hitting an assertion for calling `Debugge

[Lldb-commits] [lldb] [lldb][unittest] Add call_once flag to initialize debugger (PR #80786)

2024-02-05 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova created https://github.com/llvm/llvm-project/pull/80786 I tried adding a new unit test to the core test suite (https://github.com/llvm/llvm-project/pull/79533) but it broke the test suite on AArch64 Linux due to hitting an assertion for calling `Debugger::Initi

[Lldb-commits] [lldb] [LLDB] Add FreeBSD kernel coredump matching check. (PR #80785)

2024-02-05 Thread via lldb-commits
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 78b4e7c5e349d8c101b50affbd260eb109748f8f e506f292dd07bcdd26a668d9fcf87a258864db95 --

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80767 >From e7af15ff3c1bdd42799b25f76145b8a19739eea5 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Mon, 5 Feb 2024 15:58:23 -0800 Subject: [PATCH 1/3] Add a new SBProcess:: GetCoreFile() API --- lldb/include

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80767 >From e7af15ff3c1bdd42799b25f76145b8a19739eea5 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Mon, 5 Feb 2024 15:58:23 -0800 Subject: [PATCH 1/2] Add a new SBProcess:: GetCoreFile() API --- lldb/include

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
jeffreytan81 wrote: @bulbazord, the scenario is that user directly uses "lldb -c " to load core file, then the python script is invoked later to fetch metadata, resolve binaries/symbols etc... https://github.com/llvm/llvm-project/pull/80767 ___ lldb-

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
@@ -398,6 +398,13 @@ class LLDB_API SBProcess { /// valid. lldb::SBProcessInfo GetProcessInfo(); + /// Return target dump file during postmortem debugging. + /// An empty file will be returned for live debugging. + /// + /// \return + /// The target dump file spec

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda edited https://github.com/llvm/llvm-project/pull/80767 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Jason Molenda via lldb-commits
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() { return sb_proc_info; } +lldb::SBFileSpec SBProcess::GetCoreFile() { + LLDB_INSTRUMENT_VA(this); + + ProcessSP process_sp(GetSP()); + FileSpec core_file; + if (process_sp) { +core_file = process_

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: This seems like a useful addition to me, I've had some users of corefiles who have asked for an SBProcess::IsCore() type of method. (and others asking for ways to access metadata from the corefile itself via the Process, although I've never thought about how to do that, ma

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Jason Molenda via lldb-commits
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() { return sb_proc_info; } +lldb::SBFileSpec SBProcess::GetCoreFile() { + LLDB_INSTRUMENT_VA(this); + + ProcessSP process_sp(GetSP()); + FileSpec core_file; + if (process_sp) { +core_file = process_

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Jason Molenda via lldb-commits
@@ -398,6 +398,13 @@ class LLDB_API SBProcess { /// valid. lldb::SBProcessInfo GetProcessInfo(); + /// Return target dump file during postmortem debugging. + /// An empty file will be returned for live debugging. + /// + /// \return + /// The target dump file spec

[Lldb-commits] [lld] [clang] [compiler-rt] [libcxx] [clang-tools-extra] [mlir] [llvm] [openmp] [libc] [flang] [lldb] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread via lldb-commits
ZijunZhaoCCK wrote: > > > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, > > > which I suppose are equally broken by this change. > > > > > > Yes, I think so. I think adding these environment types in wasi-libc repo > > could help fix those errors. > > If wasm can arbi

[Lldb-commits] [lldb] [lldb][libc++] Adds system_clock data formatters. (PR #78609)

2024-02-05 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: Agreed, if I change this to ``` diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp index d0bdbe1fd4d..b37544f6dd3 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp +++ b/lldb/source/Plugins/Languag

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -404,7 +404,7 @@ bool ProcessMachCore::LoadBinariesViaMetadata() { // LoadCoreFileImges may have set the dynamic loader, e.g. in // PlatformDarwinKernel::LoadPlatformBinaryAndSetup(). - // If we now have a dynamic loader, save its name so we don't + // If we now have

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() { return sb_proc_info; } +lldb::SBFileSpec SBProcess::GetCoreFile() { + LLDB_INSTRUMENT_VA(this); + + ProcessSP process_sp(GetSP()); + FileSpec core_file; + if (process_sp) { +core_file = process_

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -261,7 +261,7 @@ Status ProcessElfCore::DoLoadCore() { exe_module_spec.GetFileSpec().SetFile(m_nt_file_entries[0].path, FileSpec::Style::native); if (exe_module_spec.GetFileSpec()) { -exe_module_sp = GetTarget()

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -398,6 +398,13 @@ class LLDB_API SBProcess { /// valid. lldb::SBProcessInfo GetProcessInfo(); + /// Return target dump file during postmortem debugging. + /// An empty file will be returned for live debugging. + /// + /// \return + /// The target dump file spec

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -398,6 +398,13 @@ class LLDB_API SBProcess { /// valid. lldb::SBProcessInfo GetProcessInfo(); + /// Return target dump file during postmortem debugging. + /// An empty file will be returned for live debugging. clayborg wrote: ``` /// Get the file spe

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -865,7 +865,7 @@ llvm::Error ProcessElfCore::parseOpenBSDNotes(llvm::ArrayRef notes) { /// - NT_SIGINFO - Information about the signal that terminated the process /// - NT_AUXV - Process auxiliary vector /// - NT_FILE - Files mapped into memory -/// +/// c

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -224,7 +224,7 @@ Status ProcessElfCore::DoLoadCore() { ArchSpec core_arch(m_core_module_sp->GetArchitecture()); target_arch.MergeFrom(core_arch); GetTarget().SetArchitecture(target_arch); - + clayborg wrote: revert whitespace only change https://git

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

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

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

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

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -398,6 +398,13 @@ class LLDB_API SBProcess { /// valid. lldb::SBProcessInfo GetProcessInfo(); + /// Return target dump file during postmortem debugging. + /// An empty file will be returned for live debugging. + /// + /// \return + /// The target dump file spec

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread Alex Langford via lldb-commits
bulbazord wrote: I'm not sure I understand. Why do you need to get the path to the core file through the SBAPI? Didn't you also load it through the SBAPI too? https://github.com/llvm/llvm-project/pull/80767 ___ lldb-commits mailing list lldb-commits@l

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
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 a7bc9cb6ffa91ff0ebabc45c0c7263c7c2c3a4de e7af15ff3c1bdd42799b25f76145b8a19739eea5 --

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jeffreytan81) Changes We have a Python script that needs to locate coredump path during debugging so that we can retrieve certain metadata files associated with it. Currently, there is no API for this. This patch adds a new `SBProce

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

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

[Lldb-commits] [lldb] Add a new SBProcess:: GetCoreFile() API (PR #80767)

2024-02-05 Thread via lldb-commits
https://github.com/jeffreytan81 created https://github.com/llvm/llvm-project/pull/80767 We have a Python script that needs to locate coredump path during debugging so that we can retrieve certain metadata files associated with it. Currently, there is no API for this. This patch adds a new `SB

[Lldb-commits] [libc] [clang-tools-extra] [openmp] [libcxx] [compiler-rt] [lldb] [mlir] [llvm] [lld] [flang] [clang] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread Fangrui Song via lldb-commits
MaskRay wrote: > > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which > > I suppose are equally broken by this change. > > Yes, I think so. I think adding these environment types in wasi-libc repo > could help fix those errors. If wasm can arbitrary environment types,

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Alex Langford via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Alex Langford via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Alex Langford via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Alex Langford via lldb-commits
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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Alex Langford via 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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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 {

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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) { --

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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 {

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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); ---

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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); --

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
@@ -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 + ///

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via lldb-commits
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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Greg Clayton via 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

[Lldb-commits] [compiler-rt] [mlir] [clang] [libc] [flang] [clang-tools-extra] [lld] [openmp] [lldb] [llvm] [libcxx] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread Mike Hommey via lldb-commits
glandium wrote: > Yes, I think so. I think adding these environment types in wasi-libc repo > could help fix those errors. WDYM? https://github.com/llvm/llvm-project/pull/78655 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.l

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread via 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-

[Lldb-commits] [lld] [flang] [llvm] [clang] [libc] [libcxx] [compiler-rt] [lldb] [clang-tools-extra] [openmp] [mlir] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread via lldb-commits
ZijunZhaoCCK wrote: > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which I > suppose are equally broken by this change. Yes, I think so. I think adding these environment types in wasi-libc repo could help fix those errors. https://github.com/llvm/llvm-project/pull/786

[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

2024-02-05 Thread via lldb-commits
jimingham wrote: At this point, I'd like to get this in so I can iterate on it in future PR's rather than churning this one. If folks have a bit to look over this, that would be great. Thanks! https://github.com/llvm/llvm-project/pull/70734 ___ lld

[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

2024-02-05 Thread via lldb-commits
jimingham wrote: Okay, I made one more trivial change, I switched the `varname` field to `dest` so it matched what argparse had, and I renamed the `usage` entry to `help` so it matches the argparse usage as well. https://github.com/llvm/llvm-project/pull/70734 _

[Lldb-commits] [lldb] [lldb] Add QSupported key to report watchpoint types supported (PR #80376)

2024-02-05 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/80376 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread via 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/3] Support statistics dump summary only mode Summary: Added a new --s

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread via lldb-commits
@@ -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

[Lldb-commits] [compiler-rt] [openmp] [clang] [lldb] [mlir] [llvm] [libcxx] [flang] [libc] [lld] [clang-tools-extra] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread Mike Hommey via lldb-commits
glandium wrote: There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which I suppose are equally broken by this change. https://github.com/llvm/llvm-project/pull/78655 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://

[Lldb-commits] [clang-tools-extra] [openmp] [compiler-rt] [llvm] [libcxx] [lldb] [lld] [clang] [flang] [libc] [mlir] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread Mike Hommey via lldb-commits
glandium wrote: We stumbled upon this downstream because we have jobs building wasi-sdk with clang-trunk, and wasi-sdk builds some things with that target. It apparently comes from https://github.com/WebAssembly/wasi-libc/pull/381 https://github.com/llvm/llvm-project/pull/78655 ___

[Lldb-commits] [mlir] [lldb] [llvm] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
@@ -220,6 +220,31 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> { /*defaultImplementation=*/[{ return ::mlir::failure(); }] +>, +InterfaceMethod<[{ +Add a zero-trip-check around the loop to check if the loop body is ever +

[Lldb-commits] [llvm] [mlir] [lldb] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
https://github.com/pzread updated https://github.com/llvm/llvm-project/pull/80331 >From 70f54b51bef87bde5e3f5ee067c0f2414d34e915 Mon Sep 17 00:00:00 2001 From: Jerry Wu Date: Thu, 1 Feb 2024 19:57:26 + Subject: [PATCH 1/7] Add replaceWithZeroTripCheck to LoopLikeOpInterface --- .../mlir/I

[Lldb-commits] [llvm] [mlir] [lldb] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
@@ -0,0 +1,101 @@ +//===- LoopLikeInterfaceTest.cpp - Unit tests for Loop Like Interfaces. ---===// +// +// 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: Ap

[Lldb-commits] [openmp] [clang] [libc] [mlir] [libcxx] [compiler-rt] [lld] [lldb] [llvm] [clang-tools-extra] [flang] [Driver] Report invalid target triple versions for all environment types. (PR #7865

2024-02-05 Thread via lldb-commits
ZijunZhaoCCK wrote: > This broke the wasi-threads target: `clang: error: version 'threads' in > target triple 'wasm32-unknown-wasi-threads' is invalid` Because `threads` is not in EnvironmentType list: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/Triple.h#L231

[Lldb-commits] [llvm] [mlir] [lldb] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
https://github.com/pzread updated https://github.com/llvm/llvm-project/pull/80331 >From 70f54b51bef87bde5e3f5ee067c0f2414d34e915 Mon Sep 17 00:00:00 2001 From: Jerry Wu Date: Thu, 1 Feb 2024 19:57:26 + Subject: [PATCH 1/6] Add replaceWithZeroTripCheck to LoopLikeOpInterface --- .../mlir/I

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
@@ -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; +

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
@@ -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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
@@ -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>, +

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
@@ -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>, +

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread Will Hawkins via lldb-commits
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

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread via 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

[Lldb-commits] [lldb] [llvm] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-05 Thread via lldb-commits
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 41ea02261224446dadb1b1561d70137699255518 c4b767909a9ffc2a3015dc9021e4c265da0d877d --

[Lldb-commits] [llvm] [lldb] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Zequan Wu (ZequanWu) Changes This adds a layer between `SounceBreakpoint`/`FunctionBreakpoint` and `BreakpointBase` to have better separation and encapsulation so we are not directly operating on `SBBreakpoint`. I basically moved the `SB

[Lldb-commits] [llvm] [lldb] [lldb-dap][NFC] Add Breakpoint struct to share common logic. (PR #80753)

2024-02-05 Thread Zequan Wu via lldb-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/80753 This adds a layer between `SounceBreakpoint`/`FunctionBreakpoint` and `BreakpointBase` to have better separation and encapsulation so we are not directly operating on `SBBreakpoint`. I basically moved the `SB

[Lldb-commits] [lldb] [lldb] Add QSupported key to report watchpoint types supported (PR #80376)

2024-02-05 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. LGTM if @DavidSpickett and @bulbazord are happy. https://github.com/llvm/llvm-project/pull/80376 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] Support statistics dump summary only mode (PR #80745)

2024-02-05 Thread via lldb-commits
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

[Lldb-commits] [lldb] [mlir] [llvm] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
@@ -220,6 +220,31 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> { /*defaultImplementation=*/[{ return ::mlir::failure(); }] +>, +InterfaceMethod<[{ +Add a zero-trip-check around the loop to check if the loop body is ever --

[Lldb-commits] [mlir] [llvm] [lldb] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
@@ -220,6 +220,31 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> { /*defaultImplementation=*/[{ return ::mlir::failure(); }] +>, +InterfaceMethod<[{ +Add a zero-trip-check around the loop to check if the loop body is ever +

[Lldb-commits] [mlir] [llvm] [lldb] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

2024-02-05 Thread Jerry Wu via lldb-commits
https://github.com/pzread updated https://github.com/llvm/llvm-project/pull/80331 >From 70f54b51bef87bde5e3f5ee067c0f2414d34e915 Mon Sep 17 00:00:00 2001 From: Jerry Wu Date: Thu, 1 Feb 2024 19:57:26 + Subject: [PATCH 1/4] Add replaceWithZeroTripCheck to LoopLikeOpInterface --- .../mlir/I

[Lldb-commits] [libcxxabi] [lldb] [clang] [flang] [compiler-rt] [lld] [libc] [clang-tools-extra] [libcxx] [llvm] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-02-05 Thread Alexey Bataev via lldb-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/77529 >From 7440ee8ba235fd871af0999f66d5d6130456400b Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 9 Jan 2024 21:43:31 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

  1   2   >