Skip to content

[lldb][debugger][NFC] Add broadcast bit for category-based progress events. #81169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

chelcassanova
Copy link
Contributor

This commit adds a new broadcast bit to the debugger. When in use, it will be listened to for progress events that will be delivered and kept track of by category as opposed to the current behaviour of coming in one by one.

events.

This commit adds a new broadcast bit to the debugger. When in use, it
will be listened to for progress events that will be delivered and kept
track of by category as opposed to the current behaviour of coming in
one by one.
@llvmbot
Copy link
Member

llvmbot commented Feb 8, 2024

@llvm/pr-subscribers-lldb

Author: Chelsea Cassanova (chelcassanova)

Changes

This commit adds a new broadcast bit to the debugger. When in use, it will be listened to for progress events that will be delivered and kept track of by category as opposed to the current behaviour of coming in one by one.


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

2 Files Affected:

  • (modified) lldb/include/lldb/API/SBDebugger.h (+1)
  • (modified) lldb/include/lldb/Core/Debugger.h (+1)
diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h
index 218113a7a391f3..62b2f91f5076d5 100644
--- a/lldb/include/lldb/API/SBDebugger.h
+++ b/lldb/include/lldb/API/SBDebugger.h
@@ -46,6 +46,7 @@ class LLDB_API SBDebugger {
       eBroadcastBitProgress = (1 << 0),
       eBroadcastBitWarning = (1 << 1),
       eBroadcastBitError = (1 << 2),
+      eBroadcastBitProgressCategory = (1 << 3),
   };
 
   SBDebugger();
diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h
index c6d603ca5dcde0..6ba90eb6ed8fdf 100644
--- a/lldb/include/lldb/Core/Debugger.h
+++ b/lldb/include/lldb/Core/Debugger.h
@@ -84,6 +84,7 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
     eBroadcastBitWarning = (1 << 1),
     eBroadcastBitError = (1 << 2),
     eBroadcastSymbolChange = (1 << 3),
+    eBroadcastBitProgressCategory = (1 << 4),
   };
 
   using DebuggerList = std::vector<lldb::DebuggerSP>;

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't do much by itself but based on the discussion in #81026 we have consensus on this part. LGTM.

@chelcassanova chelcassanova merged commit ab4a793 into llvm:main Feb 8, 2024
@chelcassanova chelcassanova deleted the progress-category-bit branch February 8, 2024 18:33
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 9, 2024
Per discussions from llvm#81026,
it was decided that having a class that manages a map of progress
reports would be beneficial in order to categorize them. This class is a
part of the overall `Progress` class and utilizes a map that keeps a
count of how many times a progress report category has been sent. This
would be used with the new debugger broadcast bit added in
llvm#81169 so that a user listening
with that bit will receive grouped progress reports.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 10, 2024
Per discussions from llvm#81026,
it was decided that having a class that manages a map of progress
reports would be beneficial in order to categorize them. This class is a
part of the overall `Progress` class and utilizes a map that keeps a
count of how many times a progress report category has been sent. This
would be used with the new debugger broadcast bit added in
llvm#81169 so that a user listening
with that bit will receive grouped progress reports.
chelcassanova added a commit that referenced this pull request Feb 15, 2024
Per discussions from #81026, it
was decided that having a class that manages a map of progress reports
would be beneficial in order to categorize them. This class is a part of
the overall `Progress` class and utilizes a map that keeps a count of
how many times a progress report category has been sent. This would be
used with the new debugger broadcast bit added in
#81169 so that a user listening
with that bit will receive grouped progress reports.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 15, 2024
…vents. (llvm#81169)

This commit adds a new broadcast bit to the debugger. When in use, it
will be listened to for progress events that will be delivered and kept
track of by category as opposed to the current behaviour of coming in
one by one.

(cherry picked from commit ab4a793)
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 16, 2024
Per discussions from llvm#81026, it
was decided that having a class that manages a map of progress reports
would be beneficial in order to categorize them. This class is a part of
the overall `Progress` class and utilizes a map that keeps a count of
how many times a progress report category has been sent. This would be
used with the new debugger broadcast bit added in
llvm#81169 so that a user listening
with that bit will receive grouped progress reports.

(cherry picked from commit 327d2f8)
chelcassanova added a commit to swiftlang/llvm-project that referenced this pull request Feb 16, 2024
…vents. (llvm#81169) (#8206)

This commit adds a new broadcast bit to the debugger. When in use, it
will be listened to for progress events that will be delivered and kept
track of by category as opposed to the current behaviour of coming in
one by one.

(cherry picked from commit ab4a793)
chelcassanova added a commit to swiftlang/llvm-project that referenced this pull request Feb 16, 2024
Per discussions from llvm#81026, it
was decided that having a class that manages a map of progress reports
would be beneficial in order to categorize them. This class is a part of
the overall `Progress` class and utilizes a map that keeps a count of
how many times a progress report category has been sent. This would be
used with the new debugger broadcast bit added in
llvm#81169 so that a user listening
with that bit will receive grouped progress reports.

(cherry picked from commit 327d2f8)
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 26, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 27, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 27, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 28, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 28, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 29, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Feb 29, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track of these
reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit that referenced this pull request Mar 1, 2024
This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (#81169) by keeping track
of these reports with the `ProgressManager`
class (#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.
chelcassanova added a commit to chelcassanova/llvm-project that referenced this pull request Mar 1, 2024
…#83069)

This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track
of these reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.

rdar://120788399

(cherry picked from commit 137ed17)
chelcassanova added a commit to swiftlang/llvm-project that referenced this pull request Mar 2, 2024
…#83069) (#8317)

This commit adds the functionality to broadcast events using the
`Debugger::eBroadcastProgressCategory`
bit (llvm#81169) by keeping track
of these reports with the `ProgressManager`
class (llvm#81319). The new bit is
used in such a way that it will only broadcast the initial and final
progress reports for specific progress categories that are managed by
the progress manager.

This commit also adds a new test to the progress report unit test that
checks that only the initial/final reports are broadcasted when using
the new bit.

rdar://120788399

(cherry picked from commit 137ed17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants