Added tracing of ticket draws
authorJohn Hodge <[email protected]>
Sun, 27 Sep 2009 05:46:51 +0000 (13:46 +0800)
committerJohn Hodge <[email protected]>
Sun, 27 Sep 2009 05:46:51 +0000 (13:46 +0800)
Kernel/threads.c

index 774507f..708c2ba 100644 (file)
@@ -438,8 +438,8 @@ void Threads_AddActive(tThread *Thread)
        gActiveThreads = Thread;
        giNumActiveThreads ++;
        giTotalTickets += Thread->NumTickets;
-       Log("Threads_AddActive: giNumActiveThreads = %i, giTotalTickets = %i",
-               giNumActiveThreads, giTotalTickets);
+       //Log("Threads_AddActive: giNumActiveThreads = %i, giTotalTickets = %i",
+       //      giNumActiveThreads, giTotalTickets);
        RELEASE( &giThreadListLock );
 }
 
@@ -552,11 +552,13 @@ tThread *Threads_GetNextToRun(int CPU)
                return gActiveThreads;
        }
        
-       Log("giNumActiveThreads=%i,giTotalTickets=%i",
+       Log(" Threads_GetNextToRun: giNumActiveThreads=%i,giTotalTickets=%i",
                giNumActiveThreads, giTotalTickets);
        // Get the ticket number
        ticket = number = rand() % giTotalTickets;
        
+       Log(" Threads_GetNextToRun: ticket = %i", ticket);
+       
        // Find the next thread
        for(thread=gActiveThreads;thread;thread=thread->Next)
        {

UCC git Repository :: git.ucc.asn.au