[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

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

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80375 >From 59e1499ec0afebb533c4952f079278341b957241 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 1 Feb 2024 18:07:51 -0800 Subject: [PATCH 1/6] Add commands frequency to statistics dump --- lldb/inclu

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80375 >From 59e1499ec0afebb533c4952f079278341b957241 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 1 Feb 2024 18:07:51 -0800 Subject: [PATCH 1/5] Add commands frequency to statistics dump --- lldb/inclu

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

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

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
@@ -355,6 +360,25 @@ def test_modules(self): self.assertNotEqual(exe_module, None) self.verify_keys(exe_module, 'module dict for "%s"' % (exe), module_keys) +def test_commands(self): +""" +Test "statistics dump" and the command information.

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
@@ -1644,8 +1647,9 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed, llvm::Error llvm_error = m_container->LoadUserSubcommand(m_cmd_name, new_cmd_sp, m_overwrite); if (llvm_error) -result.AppendErrorWithFormat("cannot add comma

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
@@ -1788,12 +1792,13 @@ class CommandObjectCommandsScriptDelete : public CommandObjectParsed { return; } const char *leaf_cmd = command[num_args - 1].c_str(); -llvm::Error llvm_error = container->RemoveUserSubcommand(leaf_cmd, -

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
@@ -307,7 +311,8 @@ llvm::json::Value DebuggerStats::ReportStatistics(Debugger &debugger, {"totalModuleCount", num_modules}, {"totalModuleCountHasDebugInfo", num_modules_has_debug_info}, {"totalModuleCountWithVariableErrors", num_modules_with_variable_errors}

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
@@ -3055,8 +3055,8 @@ void CommandInterpreter::PrintCommandOutput(IOHandler &io_handler, } std::lock_guard guard(io_handler.GetOutputMutex()); - if (had_output && INTERRUPT_REQUESTED(GetDebugger(), -"Interrupted dumping command ou

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-05 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80375 >From 59e1499ec0afebb533c4952f079278341b957241 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 1 Feb 2024 18:07:51 -0800 Subject: [PATCH 1/4] Add commands frequency to statistics dump --- lldb/inclu

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1644,8 +1647,9 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed, llvm::Error llvm_error = m_container->LoadUserSubcommand(m_cmd_name, new_cmd_sp, m_overwrite); if (llvm_error) -result.AppendErrorWithFormat("cannot add comma

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -3055,8 +3055,8 @@ void CommandInterpreter::PrintCommandOutput(IOHandler &io_handler, } std::lock_guard guard(io_handler.GetOutputMutex()); - if (had_output && INTERRUPT_REQUESTED(GetDebugger(), -"Interrupted dumping command ou

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1623,15 +1625,16 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed, m_options.m_class_name.c_str()); if (!cmd_obj_sp) { result.AppendErrorWithFormatv("cannot create helper object for: " - "'{0}

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1577,7 +1579,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed, case eLazyBoolNo: m_overwrite = false; } - + clayborg wrote: revert non related whitespace change https://github.com/llvm/llvm-project/pull/80375 _

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1623,15 +1625,16 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed, m_options.m_class_name.c_str()); if (!cmd_obj_sp) { result.AppendErrorWithFormatv("cannot create helper object for: " - "'{0}

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1788,12 +1792,13 @@ class CommandObjectCommandsScriptDelete : public CommandObjectParsed { return; } const char *leaf_cmd = command[num_args - 1].c_str(); -llvm::Error llvm_error = container->RemoveUserSubcommand(leaf_cmd, -

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -70,3 +73,26 @@ def test_stats_api(self): True, 'Make sure the "failures" key in in "frameVariable" dictionary"', ) + +def test_command_stats_api(self): +""" +Test GetCommandInterpreter::GetStatistics() API. +""" +

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -575,7 +576,7 @@ class CommandInterpreter : public Broadcaster, void SetEchoCommentCommands(bool enable); bool GetRepeatPreviousCommand() const; - + clayborg wrote: revert non related whitespace change https://github.com/llvm/llvm-project/pull/80375

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -246,13 +247,13 @@ class SBCommandInterpreter { lldb::SBStringList &matches, lldb::SBStringList &descriptions); - /// Returns whether an interrupt flag was raised either by the SBDebugger - + /

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -307,7 +311,8 @@ llvm::json::Value DebuggerStats::ReportStatistics(Debugger &debugger, {"totalModuleCount", num_modules}, {"totalModuleCountHasDebugInfo", num_modules_has_debug_info}, {"totalModuleCountWithVariableErrors", num_modules_with_variable_errors}

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -1788,12 +1792,13 @@ class CommandObjectCommandsScriptDelete : public CommandObjectParsed { return; } const char *leaf_cmd = command[num_args - 1].c_str(); -llvm::Error llvm_error = container->RemoveUserSubcommand(leaf_cmd, -

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -240,7 +241,7 @@ class CommandInterpreter : public Broadcaster, eCommandTypesAllThem = 0x //< all commands }; - // The CommandAlias and CommandInterpreter both have a hand in + // The CommandAlias and CommandInterpreter both have a hand in cla

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -246,13 +247,13 @@ class SBCommandInterpreter { lldb::SBStringList &matches, lldb::SBStringList &descriptions); - /// Returns whether an interrupt flag was raised either by the SBDebugger - + /

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread Greg Clayton via lldb-commits
@@ -150,7 +150,7 @@ bool SBCommandInterpreter::WasInterrupted() const { bool SBCommandInterpreter::InterruptCommand() { LLDB_INSTRUMENT_VA(this); - + clayborg wrote: revert non related whitespace change https://github.com/llvm/llvm-project/pull/80375 ___

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

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

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jeffreytan81) Changes Adding command interpreter statistics into "statistics dump" command so that we can track the command usage frequency for telemetry purpose. This is useful to answer questions like what is the most frequently us

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

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

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

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

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80375 >From 59e1499ec0afebb533c4952f079278341b957241 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 1 Feb 2024 18:07:51 -0800 Subject: [PATCH 1/3] Add commands frequency to statistics dump --- lldb/inclu

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread via lldb-commits
https://github.com/jeffreytan81 updated https://github.com/llvm/llvm-project/pull/80375 >From 59e1499ec0afebb533c4952f079278341b957241 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 1 Feb 2024 18:07:51 -0800 Subject: [PATCH 1/2] Add commands frequency to statistics dump --- lldb/inclu

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 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 1f3c30911cc5eee4b42bdc9c6358c689b2f2f223 59e1499ec0afebb533c4952f079278341b957241 --

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread via lldb-commits
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 1f3c30911cc5eee4b42bdc9c6358c689b2f2f223...59e1499ec0afebb533c4952f079278341b957241 lldb/

[Lldb-commits] [lldb] Add commands frequency to statistics dump (PR #80375)

2024-02-01 Thread via lldb-commits
https://github.com/jeffreytan81 created https://github.com/llvm/llvm-project/pull/80375 None >From 59e1499ec0afebb533c4952f079278341b957241 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Thu, 1 Feb 2024 18:07:51 -0800 Subject: [PATCH] Add commands frequency to statistics dump --- lldb/inc