LLDB mainline
|
#include <Queue.h>
Public Member Functions | |
Queue (lldb::ProcessSP process_sp, lldb::queue_id_t queue_id, const char *queue_name) | |
~Queue () | |
lldb::queue_id_t | GetID () |
Get the QueueID for this Queue. | |
const char * | GetName () |
Get the name of this Queue. | |
uint32_t | GetIndexID () |
Get the IndexID for this Queue. | |
std::vector< lldb::ThreadSP > | GetThreads () |
Return the threads currently associated with this queue. | |
const std::vector< lldb::QueueItemSP > & | GetPendingItems () |
Return the items that are currently enqueued. | |
lldb::ProcessSP | GetProcess () const |
uint32_t | GetNumRunningWorkItems () const |
Get the number of work items that this queue is currently running. | |
uint32_t | GetNumPendingWorkItems () const |
Get the number of work items enqueued on this queue. | |
lldb::addr_t | GetLibdispatchQueueAddress () const |
Get the dispatch_queue_t structure address for this Queue. | |
void | SetNumRunningWorkItems (uint32_t count) |
void | SetNumPendingWorkItems (uint32_t count) |
void | SetLibdispatchQueueAddress (lldb::addr_t dispatch_queue_t_addr) |
void | PushPendingQueueItem (lldb::QueueItemSP item) |
lldb::QueueKind | GetKind () |
Return the kind (serial, concurrent) of this queue. | |
void | SetKind (lldb::QueueKind kind) |
Private Member Functions | |
Queue (const Queue &)=delete | |
const Queue & | operator= (const Queue &)=delete |
Private Attributes | |
lldb::ProcessWP | m_process_wp |
lldb::queue_id_t | m_queue_id |
std::string | m_queue_name |
uint32_t | m_running_work_items_count |
uint32_t | m_pending_work_items_count |
std::vector< lldb::QueueItemSP > | m_pending_items |
lldb::addr_t | m_dispatch_queue_t_addr |
lldb::QueueKind | m_kind |
Queue::Queue | ( | lldb::ProcessSP | process_sp, |
lldb::queue_id_t | queue_id, | ||
const char * | queue_name | ||
) |
Definition at line 18 of file Queue.cpp.
References m_process_wp, and m_queue_name.
|
default |
|
privatedelete |
queue_id_t Queue::GetID | ( | ) |
Get the QueueID for this Queue.
A 64-bit ID number that uniquely identifies a queue at this particular stop_id. Currently the libdispatch serialnum is used for the QueueID; it is a number that starts at 1 for each process and increments with each queue. A serialnum is not reused for a different queue in the lifetime of that process execution.
Definition at line 32 of file Queue.cpp.
References m_queue_id.
uint32_t Queue::GetIndexID | ( | ) |
Get the IndexID for this Queue.
This is currently the same as GetID(). If it changes in the future, it will be a small integer value (starting with 1) assigned to each queue that is seen during a Process lifetime.
Both the GetID and GetIndexID are being retained for Queues to maintain similar API to the Thread class, and allow for the possibility of GetID changing to a different source in the future.
Definition at line 38 of file Queue.cpp.
References m_queue_id.
lldb::QueueKind Queue::GetKind | ( | ) |
addr_t Queue::GetLibdispatchQueueAddress | ( | ) | const |
Get the dispatch_queue_t structure address for this Queue.
Get the address in the inferior process' memory of this Queue's dispatch_queue_t structure.
Definition at line 73 of file Queue.cpp.
References m_dispatch_queue_t_addr.
Referenced by SystemRuntimeMacOSX::PopulatePendingItemsForQueue().
const char * Queue::GetName | ( | ) |
Get the name of this Queue.
Definition at line 34 of file Queue.cpp.
References m_queue_name.
uint32_t Queue::GetNumPendingWorkItems | ( | ) | const |
Get the number of work items enqueued on this queue.
Definition at line 65 of file Queue.cpp.
References m_pending_work_items_count.
uint32_t Queue::GetNumRunningWorkItems | ( | ) | const |
Get the number of work items that this queue is currently running.
Definition at line 57 of file Queue.cpp.
References m_running_work_items_count.
const std::vector< lldb::QueueItemSP > & Queue::GetPendingItems | ( | ) |
Return the items that are currently enqueued.
"Enqueued" means that the item has been added to the queue to be done, but has not yet been done. When the item is going to be processed it is "dequeued".
Definition at line 77 of file Queue.cpp.
References m_pending_items, and m_process_wp.
|
inline |
Definition at line 92 of file Queue.h.
References m_process_wp.
std::vector< lldb::ThreadSP > Queue::GetThreads | ( | ) |
Return the threads currently associated with this queue.
Zero, one, or many threads may be executing code for a queue at a given point in time. This call returns the list of threads that are currently executing work for this queue.
Definition at line 40 of file Queue.cpp.
References m_process_wp, and m_queue_id.
|
inline |
Definition at line 125 of file Queue.h.
References m_pending_items.
Referenced by SystemRuntimeMacOSX::PopulatePendingItemsForQueue().
void Queue::SetKind | ( | lldb::QueueKind | kind | ) |
void Queue::SetLibdispatchQueueAddress | ( | lldb::addr_t | dispatch_queue_t_addr | ) |
Definition at line 69 of file Queue.cpp.
References m_dispatch_queue_t_addr.
void Queue::SetNumPendingWorkItems | ( | uint32_t | count | ) |
Definition at line 61 of file Queue.cpp.
References m_pending_work_items_count.
void Queue::SetNumRunningWorkItems | ( | uint32_t | count | ) |
Definition at line 53 of file Queue.cpp.
References m_running_work_items_count.
|
private |
Definition at line 143 of file Queue.h.
Referenced by GetLibdispatchQueueAddress(), and SetLibdispatchQueueAddress().
|
private |
|
private |
Definition at line 142 of file Queue.h.
Referenced by GetPendingItems(), and PushPendingQueueItem().
|
private |
Definition at line 141 of file Queue.h.
Referenced by GetNumPendingWorkItems(), and SetNumPendingWorkItems().
|
private |
Definition at line 137 of file Queue.h.
Referenced by GetPendingItems(), GetProcess(), GetThreads(), and Queue().
|
private |
Definition at line 138 of file Queue.h.
Referenced by GetID(), GetIndexID(), and GetThreads().
|
private |
|
private |
Definition at line 140 of file Queue.h.
Referenced by GetNumRunningWorkItems(), and SetNumRunningWorkItems().