tracy/server/TracyTimelineDraw.hpp

105 lines
1.4 KiB
C++
Raw Normal View History

#ifndef __TRACYTIMELINEDRAW_HPP__
#define __TRACYTIMELINEDRAW_HPP__
#include <stdint.h>
#include "TracyEvent.hpp"
#include "TracyShortPtr.hpp"
namespace tracy
{
enum class TimelineDrawType : uint8_t
{
Folded,
Zone,
GhostFolded,
Ghost
};
struct TimelineDraw
{
TimelineDrawType type;
uint16_t depth;
short_ptr<void*> ev;
Int48 rend;
2023-03-22 23:17:55 +00:00
uint32_t num;
};
2023-03-22 18:38:36 +00:00
enum class ContextSwitchDrawType : uint8_t
{
Waiting,
Folded,
2023-03-22 18:38:36 +00:00
Running
};
struct ContextSwitchDraw
{
ContextSwitchDrawType type;
uint32_t idx;
uint32_t data; // Folded: number of items -OR- Waiting: wait stack
2023-03-22 18:38:36 +00:00
};
2023-03-22 21:07:36 +00:00
struct SamplesDraw
{
uint32_t num;
2023-03-22 22:36:13 +00:00
uint32_t idx;
2023-03-22 21:07:36 +00:00
};
2023-03-23 20:47:40 +00:00
struct MessagesDraw
{
short_ptr<MessageData> msg;
bool highlight;
uint32_t num;
};
struct CpuUsageDraw
{
int own;
int other;
};
struct CpuCtxDraw
{
uint32_t idx;
uint32_t num;
};
2023-04-15 10:47:59 +00:00
2023-04-15 12:13:14 +00:00
struct LockState
2023-04-15 10:47:59 +00:00
{
2023-04-15 12:13:14 +00:00
enum Type : uint8_t
{
Nothing = 1 << 0,
HasLock = 1 << 1, // green
HasBlockingLock = 1 << 2, // yellow
WaitLock = 1 << 3 // red
};
2023-04-15 10:47:59 +00:00
};
struct LockDrawItem
{
Int48 t1;
2023-04-15 12:13:14 +00:00
LockState::Type state;
2023-04-15 10:47:59 +00:00
uint32_t condensed;
short_ptr<LockEventPtr> ptr, next;
};
struct LockDraw
{
uint32_t id;
bool forceDraw;
uint8_t thread;
std::vector<LockDrawItem> data;
};
}
#endif