mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Move zone info UI out of View.
This commit is contained in:
parent
b602d61944
commit
c9f77ee5fa
@ -136,10 +136,12 @@
|
||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyUserData.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView_ContextSwitch.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView_FindZone.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView_Navigation.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView_Options.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView_Utility.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyView_ZoneInfo.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyWeb.cpp" />
|
||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp" />
|
||||
<ClCompile Include="..\..\..\zstd\common\debug.c" />
|
||||
|
@ -255,6 +255,12 @@
|
||||
<ClCompile Include="..\..\..\server\TracyView_Options.cpp">
|
||||
<Filter>server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\server\TracyView_ZoneInfo.cpp">
|
||||
<Filter>server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\server\TracyView_ContextSwitch.cpp">
|
||||
<Filter>server</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\common\tracy_lz4.hpp">
|
||||
|
1923
server/TracyView.cpp
1923
server/TracyView.cpp
File diff suppressed because it is too large
Load Diff
@ -391,6 +391,11 @@ private:
|
||||
void DrawHistogramMinMaxLabel( ImDrawList* draw, int64_t tmin, int64_t tmax, ImVec2 wpos, float w, float ty );
|
||||
static int64_t AdjustGpuTime( int64_t time, int64_t begin, int drift );
|
||||
|
||||
static const char* DecodeContextSwitchState( uint8_t state );
|
||||
static const char* DecodeContextSwitchStateCode( uint8_t state );
|
||||
static const char* DecodeContextSwitchReason( uint8_t reason );
|
||||
static const char* DecodeContextSwitchReasonCode( uint8_t reason );
|
||||
|
||||
Worker m_worker;
|
||||
std::string m_filename, m_filenameStaging;
|
||||
bool m_staticView;
|
||||
|
130
server/TracyView_ContextSwitch.cpp
Normal file
130
server/TracyView_ContextSwitch.cpp
Normal file
@ -0,0 +1,130 @@
|
||||
#include "TracyView.hpp"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
const char* View::DecodeContextSwitchReasonCode( uint8_t reason )
|
||||
{
|
||||
switch( reason )
|
||||
{
|
||||
case 0: return "Executive";
|
||||
case 1: return "FreePage";
|
||||
case 2: return "PageIn";
|
||||
case 3: return "PoolAllocation";
|
||||
case 4: return "DelayExecution";
|
||||
case 5: return "Suspended";
|
||||
case 6: return "UserRequest";
|
||||
case 7: return "WrExecutive";
|
||||
case 8: return "WrFreePage";
|
||||
case 9: return "WrPageIn";
|
||||
case 10: return "WrPoolAllocation";
|
||||
case 11: return "WrDelayExecution";
|
||||
case 12: return "WrSuspended";
|
||||
case 13: return "WrUserRequest";
|
||||
case 14: return "WrEventPair";
|
||||
case 15: return "WrQueue";
|
||||
case 16: return "WrLpcReceive";
|
||||
case 17: return "WrLpcReply";
|
||||
case 18: return "WrVirtualMemory";
|
||||
case 19: return "WrPageOut";
|
||||
case 20: return "WrRendezvous";
|
||||
case 21: return "WrKeyedEvent";
|
||||
case 22: return "WrTerminated";
|
||||
case 23: return "WrProcessInSwap";
|
||||
case 24: return "WrCpuRateControl";
|
||||
case 25: return "WrCalloutStack";
|
||||
case 26: return "WrKernel";
|
||||
case 27: return "WrResource";
|
||||
case 28: return "WrPushLock";
|
||||
case 29: return "WrMutex";
|
||||
case 30: return "WrQuantumEnd";
|
||||
case 31: return "WrDispatchInt";
|
||||
case 32: return "WrPreempted";
|
||||
case 33: return "WrYieldExecution";
|
||||
case 34: return "WrFastMutex";
|
||||
case 35: return "WrGuardedMutex";
|
||||
case 36: return "WrRundown";
|
||||
case 37: return "WrAlertByThreadId";
|
||||
case 38: return "WrDeferredPreempt";
|
||||
case 39: return "WrPhysicalFault";
|
||||
case 40: return "MaximumWaitReason";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::DecodeContextSwitchReason( uint8_t reason )
|
||||
{
|
||||
switch( reason )
|
||||
{
|
||||
case 0: return "(Thread is waiting for the scheduler)";
|
||||
case 1: return "(Thread is waiting for a free virtual memory page)";
|
||||
case 2: return "(Thread is waiting for a virtual memory page to arrive in memory)";
|
||||
case 4: return "(Thread execution is delayed)";
|
||||
case 5: return "(Thread execution is suspended)";
|
||||
case 6: return "(Thread is waiting on object - WaitForSingleObject, etc.)";
|
||||
case 7: return "(Thread is waiting for the scheduler)";
|
||||
case 8: return "(Thread is waiting for a free virtual memory page)";
|
||||
case 9: return "(Thread is waiting for a virtual memory page to arrive in memory)";
|
||||
case 11: return "(Thread execution is delayed)";
|
||||
case 12: return "(Thread execution is suspended)";
|
||||
case 13: return "(Thread is waiting for window messages)";
|
||||
case 15: return "(Thread is waiting on KQUEUE)";
|
||||
case 24: return "(CPU rate limiting)";
|
||||
case 34: return "(Waiting for a Fast Mutex)";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::DecodeContextSwitchStateCode( uint8_t state )
|
||||
{
|
||||
switch( state )
|
||||
{
|
||||
case 0: return "Initialized";
|
||||
case 1: return "Ready";
|
||||
case 2: return "Running";
|
||||
case 3: return "Standby";
|
||||
case 4: return "Terminated";
|
||||
case 5: return "Waiting";
|
||||
case 6: return "Transition";
|
||||
case 7: return "DeferredReady";
|
||||
case 101: return "D (disk sleep)";
|
||||
case 102: return "I (idle)";
|
||||
case 103: return "R (running)";
|
||||
case 104: return "S (sleeping)";
|
||||
case 105: return "T (stopped)";
|
||||
case 106: return "t (tracing stop)";
|
||||
case 107: return "W";
|
||||
case 108: return "X (dead)";
|
||||
case 109: return "Z (zombie)";
|
||||
case 110: return "P (parked)";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::DecodeContextSwitchState( uint8_t state )
|
||||
{
|
||||
switch( state )
|
||||
{
|
||||
case 0: return "(Thread has been initialized, but has not yet started)";
|
||||
case 1: return "(Thread is waiting to use a processor because no processor is free. The thread is prepared to run on the next available processor)";
|
||||
case 2: return "(Thread is currently using a processor)";
|
||||
case 3: return "(Thread is about to use a processor)";
|
||||
case 4: return "(Thread has finished executing and has exited)";
|
||||
case 5: return "(Thread is not ready to use the processor because it is waiting for a peripheral operation to complete or a resource to become free)";
|
||||
case 6: return "(Thread is waiting for a resource, other than the processor, before it can execute)";
|
||||
case 7: return "(Thread has been selected to run on a specific processor but have not yet beed scheduled)";
|
||||
case 101: return "(Uninterruptible sleep, usually IO)";
|
||||
case 102: return "(Idle kernel thread)";
|
||||
case 103: return "(Running or on run queue)";
|
||||
case 104: return "(Interruptible sleep, waiting for an event to complete)";
|
||||
case 105: return "(Stopped by job control signal)";
|
||||
case 106: return "(Stopped by debugger during the tracing)";
|
||||
case 107: return "(Paging)";
|
||||
case 108: return "(Dead task is scheduling one last time)";
|
||||
case 109: return "(Zombie process)";
|
||||
case 110: return "(Parked)";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
1812
server/TracyView_ZoneInfo.cpp
Normal file
1812
server/TracyView_ZoneInfo.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user