mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 13:43:52 +00:00
Crash reports may be serialized.
This commit is contained in:
parent
9d89b84efd
commit
a421083e58
@ -611,10 +611,10 @@ LONG WINAPI CrashFilter( PEXCEPTION_POINTERS pExp )
|
|||||||
{
|
{
|
||||||
GetProfiler().SendCallstack( 60, "KiUserExceptionDispatcher" );
|
GetProfiler().SendCallstack( 60, "KiUserExceptionDispatcher" );
|
||||||
|
|
||||||
TracyLfqPrepare( QueueType::CrashReport );
|
TracyQueuePrepare( QueueType::CrashReport );
|
||||||
item->crashReport.time = Profiler::GetTime();
|
item->crashReport.time = Profiler::GetTime();
|
||||||
item->crashReport.text = (uint64_t)s_crashText;
|
item->crashReport.text = (uint64_t)s_crashText;
|
||||||
TracyLfqCommit;
|
TracyQueueCommit( crashReportThread );
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLE h = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
HANDLE h = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
||||||
@ -850,10 +850,10 @@ static void CrashHandler( int signal, siginfo_t* info, void* /*ucontext*/ )
|
|||||||
{
|
{
|
||||||
GetProfiler().SendCallstack( 60, "__kernel_rt_sigreturn" );
|
GetProfiler().SendCallstack( 60, "__kernel_rt_sigreturn" );
|
||||||
|
|
||||||
TracyLfqPrepare( QueueType::CrashReport );
|
TracyQueuePrepare( QueueType::CrashReport );
|
||||||
item->crashReport.time = Profiler::GetTime();
|
item->crashReport.time = Profiler::GetTime();
|
||||||
item->crashReport.text = (uint64_t)s_crashText;
|
item->crashReport.text = (uint64_t)s_crashText;
|
||||||
TracyLfqCommit;
|
TracyQueueCommit( crashReportThread );
|
||||||
}
|
}
|
||||||
|
|
||||||
DIR* dp = opendir( "/proc/self/task" );
|
DIR* dp = opendir( "/proc/self/task" );
|
||||||
@ -2486,6 +2486,11 @@ Profiler::DequeueStatus Profiler::DequeueSerial()
|
|||||||
ThreadCtxCheckSerial( messageColorLiteralThread );
|
ThreadCtxCheckSerial( messageColorLiteralThread );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case QueueType::CrashReport:
|
||||||
|
{
|
||||||
|
ThreadCtxCheckSerial( crashReportThread );
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -502,6 +502,11 @@ struct QueueCrashReport
|
|||||||
uint64_t text; // ptr
|
uint64_t text; // ptr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct QueueCrashReportThread
|
||||||
|
{
|
||||||
|
uint32_t thread;
|
||||||
|
};
|
||||||
|
|
||||||
struct QueueSysTime
|
struct QueueSysTime
|
||||||
{
|
{
|
||||||
int64_t time;
|
int64_t time;
|
||||||
@ -636,6 +641,7 @@ struct QueueItem
|
|||||||
QueueSymbolInformation symbolInformation;
|
QueueSymbolInformation symbolInformation;
|
||||||
QueueCodeInformation codeInformation;
|
QueueCodeInformation codeInformation;
|
||||||
QueueCrashReport crashReport;
|
QueueCrashReport crashReport;
|
||||||
|
QueueCrashReportThread crashReportThread;
|
||||||
QueueSysTime sysTime;
|
QueueSysTime sysTime;
|
||||||
QueueContextSwitch contextSwitch;
|
QueueContextSwitch contextSwitch;
|
||||||
QueueThreadWakeup threadWakeup;
|
QueueThreadWakeup threadWakeup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user