summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-11-22 11:51:03 -0600
committerRunitai Linden <davep@lindenlab.com>2021-11-22 11:51:03 -0600
commitcc34e26ef7e74845e4af9e5c5d450c0b12a268e0 (patch)
treee448a5437de5b0884a4e3ece097005e0b755fa61 /indra/llcommon
parent53cf740d874f376f212a5d706ca70cbf35fee259 (diff)
SL-16094 Add WorkQueue profile hooks
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/workqueue.cpp2
-rw-r--r--indra/llcommon/workqueue.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp
index 633594ceea..fbdbea2051 100644
--- a/indra/llcommon/workqueue.cpp
+++ b/indra/llcommon/workqueue.cpp
@@ -60,6 +60,7 @@ void LL::WorkQueue::runUntilClose()
{
for (;;)
{
+ LL_PROFILE_ZONE_SCOPED;
callWork(mQueue.pop());
}
}
@@ -90,6 +91,7 @@ bool LL::WorkQueue::runOne()
bool LL::WorkQueue::runUntil(const TimePoint& until)
{
+ LL_PROFILE_ZONE_SCOPED;
// Should we subtract some slop to allow for typical Work execution time?
// How much slop?
Work work;
diff --git a/indra/llcommon/workqueue.h b/indra/llcommon/workqueue.h
index c25d787425..96574a18b9 100644
--- a/indra/llcommon/workqueue.h
+++ b/indra/llcommon/workqueue.h
@@ -260,6 +260,7 @@ namespace LL
template <typename Rep, typename Period>
bool runFor(const std::chrono::duration<Rep, Period>& timeslice)
{
+ LL_PROFILE_ZONE_SCOPED;
return runUntil(TimePoint::clock::now() + timeslice);
}
@@ -431,6 +432,7 @@ namespace LL
bool WorkQueue::postTo(weak_t target,
const TimePoint& time, CALLABLE&& callable, FOLLOWUP&& callback)
{
+ LL_PROFILE_ZONE_SCOPED;
// We're being asked to post to the WorkQueue at target.
// target is a weak_ptr: have to lock it to check it.
auto tptr = target.lock();
@@ -479,6 +481,7 @@ namespace LL
template <typename CALLABLE>
bool WorkQueue::postMaybe(weak_t target, const TimePoint& time, CALLABLE&& callable)
{
+ LL_PROFILE_ZONE_SCOPED;
// target is a weak_ptr: have to lock it to check it
auto tptr = target.lock();
if (tptr)