kernel: Update SchedulerTracing::EnqueueThread
This commit is contained in:
@@ -162,7 +162,7 @@ affine_enqueue_in_run_queue(Thread *thread)
|
|||||||
prev = sRunQueue[targetCPU];
|
prev = sRunQueue[targetCPU];
|
||||||
}
|
}
|
||||||
|
|
||||||
T(EnqueueThread(thread, prev, curr));
|
T(EnqueueThread(thread, thread->priority));
|
||||||
sRunQueueSize[targetCPU]++;
|
sRunQueueSize[targetCPU]++;
|
||||||
thread->queue_next = curr;
|
thread->queue_next = curr;
|
||||||
if (prev)
|
if (prev)
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ simple_enqueue_in_run_queue(Thread *thread)
|
|||||||
{
|
{
|
||||||
thread->state = thread->next_state = B_THREAD_READY;
|
thread->state = thread->next_state = B_THREAD_READY;
|
||||||
|
|
||||||
//T(EnqueueThread(thread, prev, curr));
|
|
||||||
|
|
||||||
int32 threadPriority = simple_get_effective_priority(thread);
|
int32 threadPriority = simple_get_effective_priority(thread);
|
||||||
|
T(EnqueueThread(thread, threadPriority));
|
||||||
|
|
||||||
sRunQueue->PushBack(thread, threadPriority);
|
sRunQueue->PushBack(thread, threadPriority);
|
||||||
thread->next_priority = thread->priority;
|
thread->next_priority = thread->priority;
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ enqueue_in_run_queue(Thread *thread)
|
|||||||
prev = sRunQueue;
|
prev = sRunQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
T(EnqueueThread(thread, prev, curr));
|
T(EnqueueThread(thread, thread->priority));
|
||||||
|
|
||||||
thread->queue_next = curr;
|
thread->queue_next = curr;
|
||||||
if (prev)
|
if (prev)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ namespace SchedulerTracing {
|
|||||||
void
|
void
|
||||||
EnqueueThread::AddDump(TraceOutput& out)
|
EnqueueThread::AddDump(TraceOutput& out)
|
||||||
{
|
{
|
||||||
out.Print("scheduler enqueue %ld \"%s\", priority %d (previous %ld, "
|
out.Print("scheduler enqueue %ld \"%s\", effective priority %d, "
|
||||||
"next %ld)", fID, fName, fPriority, fPreviousID, fNextID);
|
"real priority %d", fID, fName, fEffectivePriority, fPriority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,17 +36,12 @@ protected:
|
|||||||
|
|
||||||
class EnqueueThread : public SchedulerTraceEntry {
|
class EnqueueThread : public SchedulerTraceEntry {
|
||||||
public:
|
public:
|
||||||
EnqueueThread(Thread* thread, Thread* previous, Thread* next)
|
EnqueueThread(Thread* thread, int32 effectivePriority)
|
||||||
:
|
:
|
||||||
SchedulerTraceEntry(thread),
|
SchedulerTraceEntry(thread),
|
||||||
fPreviousID(-1),
|
fPriority(thread->priority),
|
||||||
fNextID(-1),
|
fEffectivePriority(effectivePriority)
|
||||||
fPriority(thread->priority)
|
|
||||||
{
|
{
|
||||||
if (previous != NULL)
|
|
||||||
fPreviousID = previous->id;
|
|
||||||
if (next != NULL)
|
|
||||||
fNextID = next->id;
|
|
||||||
fName = alloc_tracing_buffer_strcpy(thread->name, B_OS_NAME_LENGTH,
|
fName = alloc_tracing_buffer_strcpy(thread->name, B_OS_NAME_LENGTH,
|
||||||
false);
|
false);
|
||||||
Initialized();
|
Initialized();
|
||||||
@@ -57,10 +52,9 @@ public:
|
|||||||
virtual const char* Name() const;
|
virtual const char* Name() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
thread_id fPreviousID;
|
|
||||||
thread_id fNextID;
|
|
||||||
char* fName;
|
char* fName;
|
||||||
uint8 fPriority;
|
int32 fPriority;
|
||||||
|
int32 fEffectivePriority;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user