From 60042d194416311c85f9bd876d3674ebfad0bea4 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 6 Aug 2024 20:37:51 +0200 Subject: [PATCH] Print context switch event data. --- profiler/src/profiler/TracyEventDebug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiler/src/profiler/TracyEventDebug.cpp b/profiler/src/profiler/TracyEventDebug.cpp index df750a94..15037267 100644 --- a/profiler/src/profiler/TracyEventDebug.cpp +++ b/profiler/src/profiler/TracyEventDebug.cpp @@ -155,6 +155,9 @@ void EventDebug( const QueueItem& ev ) break; case QueueType::ContextSwitch: fprintf( f, "ev %i (ContextSwitch)\n", ev.hdr.idx ); + fprintf( f, "\ttime = %" PRIi64 "\n", ev.contextSwitch.time ); + fprintf( f, "\tthread = %" PRIu32 " -> %" PRIu32 "\n", ev.contextSwitch.oldThread, ev.contextSwitch.newThread ); + fprintf( f, "\tcpu = %" PRIu8 ", reason = %" PRIu8 ", state = %" PRIu8 "\n", ev.contextSwitch.cpu, ev.contextSwitch.reason, ev.contextSwitch.state ); break; case QueueType::ThreadWakeup: fprintf( f, "ev %i (ThreadWakeup)\n", ev.hdr.idx );