mirror of
https://review.haiku-os.org/haiku
synced 2025-02-01 03:06:08 +01:00
kernel: Update SchedulerTracing::EnqueueThread
This commit is contained in:
parent
72f844835e
commit
565e7a977d
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user