(*methodType)(void*);
static methodType ThreadProcp = 0;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = false;
void *tmpPtr;
if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "_ThreadImpl::ThreadProc", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
_ThreadImpl* pSelf =(_ThreadImpl*)params;
const Thread* pThread = NULL;
if(pSelf != null){
pThread = pSelf->GetThread();
}
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,0x%x`,",(unsigned int)pSelf);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,0`,%d`,%u`,`,0x%x`,%d`,%d", blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)pThread, THREAD_OSPTHREAD_WORKER, THREAD_API_INTERNAL_START);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "p", params);
//
if (postBlockBegin(blockresult)) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "_ThreadImpl::ThreadProc", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
_ThreadImpl* pSelf =(_ThreadImpl*)params;
const Thread* pThread = NULL;
if(pSelf != null){
pThread = pSelf->GetThread();
}
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,0x%x`,",(unsigned int)pSelf);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,0`,%d`,%u`,`,0x%x`,%d`,%d", blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)pThread, THREAD_OSPTHREAD_WORKER, THREAD_API_INTERNAL_STOP);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "p", params);
(*methodType)(long);
static methodType Sleepp = 0;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Sleep", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
Thread *currentThread;
currentThread = GetCurrentThread();
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,%ld`,",milliSeconds);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,0`,%d`,%u`,`,0x%x`,%d`,%d",blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_START);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
-
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "x", milliSeconds);
PACK_COMMON_END(0, 0, blockresult);
//
if (postBlockBegin(blockresult)) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Sleep", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
Thread *currentThread;
currentThread = GetCurrentThread();
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,%ld`,%ld",milliSeconds,ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret,blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_END);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
-
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "x", milliSeconds);
PACK_COMMON_END(ret, ret, blockresult);
(*methodType)(void);
static methodType GetCurrentThreadp = 0;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
result res = GetLastResult();
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::GetCurrentThread", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
-
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,0x%x",(unsigned int)currentThread);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", res,blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
(*methodType)(void);
static methodType Yieldp = 0;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
result ret = (Yieldp)();
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Yield", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
-
Thread *currentThread;
currentThread = GetCurrentThread();
-
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,%ld",ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret,blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
(*methodType)(int exitCode);
static methodType Exitp = 0;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Exit", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
Thread *currentThread;
currentThread = GetCurrentThread();
-
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,%d`,",exitCode);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,0`,%d`,%u`,`,0x%x`,%d`,%d",blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_EXIT);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "d", exitCode);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(threadType, stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,%d, %ld, %d`,%ld",
- threadType, stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "dxd", threadType, stackSize, priority);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,%ld, %d`,%ld",
- stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "xd", stackSize, priority);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(name, stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
- WcharToChar(temp, name.GetPointer());
- log.length += sprintf(log.data + log.length, "`,%s, %ld, %d`,%ld", temp,
- stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "sxd", temp, stackSize, priority);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(name, threadType, stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
+
WcharToChar(temp, name.GetPointer());
- log.length += sprintf(log.data + log.length, "`,%s, %d, %ld, %d`,%ld",
- temp, threadType, stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "sdxd", temp, threadType, stackSize, priority);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(target, stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,0x%x, %ld, %d`,%ld",
- (unsigned int) &target, stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "xxd", (unsigned int) &target, stackSize, priority);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(name, target, stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
+
WcharToChar(temp, name.GetPointer());
- log.length += sprintf(log.data + log.length, "`,%s, 0x%x, %ld, %d`,%ld",
- temp, (unsigned int) &target, stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "sxxd", temp, (unsigned int) &target, stackSize, priority);
static methodType GetExitCodep = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*GetExitCodep)(exitCode);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::GetExitCode",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
-// log.length += sprintf(log.data + log.length, "`,(%d->%d)`,%ld", exitOld,
-// exitCode, ret);
- log.length += sprintf(log.data + log.length, "`,%d`,%ld", exitCode, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "d", exitCode);
(Thread::*methodType)(void) const;
static methodType GetNamep = 0;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
result res = GetLastResult();
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::GetName", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
- //Input,ret
+
WcharToChar(temp, ret.GetPointer());
- log.length += sprintf(log.data + log.length, "`,`,%s", temp);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", res, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
static methodType Joinp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Join", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,");
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,0`,%d`,%u`,`,0x%x`,%d`,%d",blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_START);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
//
if (postBlockBegin(blockresult)) {
setProbePoint(&probeInfo);
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Join", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret,blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_END);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
static methodType Startp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Startp)();
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Start", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_START);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
static methodType Stopp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Stopp)();
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "Thread::Stop", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_STOP);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "EventDrivenThread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,%ld, %d`,%ld",
- stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_EVENTDRIVEN, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "xd", stackSize, priority);
static methodType Constructp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Constructp)(name, stackSize, priority);
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "EventDrivenThread::Construct",
- probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
- //Input,ret
+
WcharToChar(temp, name.GetPointer());
- log.length += sprintf(log.data + log.length, "`,%s, %ld, %d`,%ld", temp,
- stackSize, priority, ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_EVENTDRIVEN, THREAD_API_NEW);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "sx", temp, stackSize);
static methodType Quitp = 0;
result ret;
probeInfo_t probeInfo;
- log_t log;
int blockresult;
bool bfiltering = true;
void *tmpPtr;
ret = (this->*Quitp)();
//
if (postBlockBegin(blockresult)) {
- log.type = 0;
- log.length = 0;
- log.data[0] = '\0';
- log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
- probeInfo.eventIndex, "EventThread::Quit", probeInfo.currentTime,
- probeInfo.pID, probeInfo.tID);
- //Input,ret
- log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
- //PCAddr,errno,InternalCall,CallerPCAddr,PThreadID,OspThreadID,ThreadType,ApiType
- log.length += sprintf(log.data + log.length,
- "`,0`,%lu`,%d`,%u`,`,0x%x`,%d`,%d", ret, blockresult,
- (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_EVENTDRIVEN, THREAD_API_STOP);
- //callstack
- log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
- getBacktraceString(&log, 4096 - log.length - 17);
- log.length += sprintf(log.data + log.length, "`,callstack_end");
-
- printLog(&log, MSG_LOG);
PREPARE_LOCAL_BUF();
PACK_COMMON_BEGIN(MSG_PROBE_THREAD, LC_THREAD, "", 0);