Print context switch event data.

This commit is contained in:
Bartosz Taudul 2024-08-06 20:37:51 +02:00
parent f7730659f8
commit 60042d1944
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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 );