kernel: Update SchedulerTracing::EnqueueThread

This commit is contained in:
Pawel Dziepak 2013-10-07 21:52:45 +02:00
parent 72f844835e
commit 565e7a977d
5 changed files with 11 additions and 17 deletions

View File

@ -162,7 +162,7 @@ affine_enqueue_in_run_queue(Thread *thread)
prev = sRunQueue[targetCPU];
}
T(EnqueueThread(thread, prev, curr));
T(EnqueueThread(thread, thread->priority));
sRunQueueSize[targetCPU]++;
thread->queue_next = curr;
if (prev)

View File

@ -147,9 +147,9 @@ simple_enqueue_in_run_queue(Thread *thread)
{
thread->state = thread->next_state = B_THREAD_READY;
//T(EnqueueThread(thread, prev, curr));
int32 threadPriority = simple_get_effective_priority(thread);
T(EnqueueThread(thread, threadPriority));
sRunQueue->PushBack(thread, threadPriority);
thread->next_priority = thread->priority;

View File

@ -126,7 +126,7 @@ enqueue_in_run_queue(Thread *thread)
prev = sRunQueue;
}
T(EnqueueThread(thread, prev, curr));
T(EnqueueThread(thread, thread->priority));
thread->queue_next = curr;
if (prev)

View File

@ -19,8 +19,8 @@ namespace SchedulerTracing {
void
EnqueueThread::AddDump(TraceOutput& out)
{
out.Print("scheduler enqueue %ld \"%s\", priority %d (previous %ld, "
"next %ld)", fID, fName, fPriority, fPreviousID, fNextID);
out.Print("scheduler enqueue %ld \"%s\", effective priority %d, "
"real priority %d", fID, fName, fEffectivePriority, fPriority);
}

View File

@ -36,17 +36,12 @@ protected:
class EnqueueThread : public SchedulerTraceEntry {
public:
EnqueueThread(Thread* thread, Thread* previous, Thread* next)
EnqueueThread(Thread* thread, int32 effectivePriority)
:
SchedulerTraceEntry(thread),
fPreviousID(-1),
fNextID(-1),
fPriority(thread->priority)
fPriority(thread->priority),
fEffectivePriority(effectivePriority)
{
if (previous != NULL)
fPreviousID = previous->id;
if (next != NULL)
fNextID = next->id;
fName = alloc_tracing_buffer_strcpy(thread->name, B_OS_NAME_LENGTH,
false);
Initialized();
@ -57,10 +52,9 @@ public:
virtual const char* Name() const;
private:
thread_id fPreviousID;
thread_id fNextID;
char* fName;
uint8 fPriority;
int32 fPriority;
int32 fEffectivePriority;
};