Dbg:Add CallableTracer for callables post()ed to boost.asio
This class and its macro allow us to trace the invocation of callbacks as they're invoked by Boost.asio.
This commit is contained in:
+18
-12
@@ -8,6 +8,7 @@
|
||||
#include <opts.h>
|
||||
#include <asynchronousContinuation.h>
|
||||
#include <callback.h>
|
||||
#include <callableTracer.h>
|
||||
#include <mind.h>
|
||||
#include <mindManager/mindManager.h>
|
||||
#include <componentThread.h>
|
||||
@@ -33,6 +34,11 @@ void MindThread::initializeTls(void)
|
||||
thisComponentThread = shared_from_this();
|
||||
}
|
||||
|
||||
bool ComponentThread::tlsInitialized(void)
|
||||
{
|
||||
return thisComponentThread != nullptr;
|
||||
}
|
||||
|
||||
const std::shared_ptr<ComponentThread> ComponentThread::getSelf(void)
|
||||
{
|
||||
if (!thisComponentThread)
|
||||
@@ -240,9 +246,9 @@ void MindThread::joltThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
mrntt, target, callback);
|
||||
|
||||
this->getIoService().post(
|
||||
std::bind(
|
||||
STC(std::bind(
|
||||
&ThreadLifetimeMgmtOp::joltThreadReq1_posted,
|
||||
request.get(), request));
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
// Thread management method implementations
|
||||
@@ -253,9 +259,9 @@ void MindThread::startThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
caller, shared_from_this(), callback);
|
||||
|
||||
this->getIoService().post(
|
||||
std::bind(
|
||||
STC(std::bind(
|
||||
&ThreadLifetimeMgmtOp::startThreadReq1_posted,
|
||||
request.get(), request));
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void MindThread::exitThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
@@ -265,14 +271,14 @@ void MindThread::exitThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
caller, shared_from_this(), callback);
|
||||
|
||||
this->getIoService().post(
|
||||
std::bind(
|
||||
STC(std::bind(
|
||||
&ThreadLifetimeMgmtOp::exitThreadReq1_mainQueue_posted,
|
||||
request.get(), request));
|
||||
request.get(), request)));
|
||||
|
||||
pause_io_service.post(
|
||||
std::bind(
|
||||
STC(std::bind(
|
||||
&ThreadLifetimeMgmtOp::exitThreadReq1_pauseQueue_posted,
|
||||
request.get(), request));
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void MindThread::pauseThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
@@ -288,9 +294,9 @@ void MindThread::pauseThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
caller, shared_from_this(), callback);
|
||||
|
||||
this->getIoService().post(
|
||||
std::bind(
|
||||
STC(std::bind(
|
||||
&ThreadLifetimeMgmtOp::pauseThreadReq1_posted,
|
||||
request.get(), request));
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void MindThread::resumeThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
@@ -307,9 +313,9 @@ void MindThread::resumeThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
caller, shared_from_this(), callback);
|
||||
|
||||
pause_io_service.post(
|
||||
std::bind(
|
||||
STC(std::bind(
|
||||
&ThreadLifetimeMgmtOp::resumeThreadReq1_posted,
|
||||
request.get(), request));
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
// CPU management method implementations
|
||||
|
||||
Reference in New Issue
Block a user