1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Simplify context switch precalculation.

This commit is contained in:
Bartosz Taudul
2023-03-25 00:18:53 +01:00
parent 734753a941
commit efa095e25f
5 changed files with 68 additions and 98 deletions
+5 -20
View File
@@ -30,40 +30,25 @@ struct TimelineDraw
enum class ContextSwitchDrawType : uint8_t
{
Waiting,
FoldedOne,
FoldedMulti,
Folded,
Running
};
struct ContextSwitchDrawFolded
{
Int48 rend;
int num;
};
struct ContextSwitchDrawWaiting
{
short_ptr<ContextSwitchData> prev;
uint32_t waitStack;
};
struct ContextSwitchDraw
{
ContextSwitchDrawType type;
short_ptr<ContextSwitchData> ev;
union
{
ContextSwitchDrawFolded folded;
ContextSwitchDrawWaiting waiting;
};
uint32_t idx;
uint32_t data; // Folded: number of items -OR- Waiting: wait stack
};
struct SamplesDraw
{
uint32_t num;
uint32_t idx;
};
struct MessagesDraw
{
short_ptr<MessageData> msg;