kernel: Dump scheduler specific thread data
This commit is contained in:
@@ -547,7 +547,8 @@ static scheduler_ops kAffineOps = {
|
|||||||
affine_on_thread_create,
|
affine_on_thread_create,
|
||||||
affine_on_thread_init,
|
affine_on_thread_init,
|
||||||
affine_on_thread_destroy,
|
affine_on_thread_destroy,
|
||||||
affine_start
|
affine_start,
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -120,6 +120,18 @@ dump_run_queue(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
simple_dump_thread_data(scheduler_thread_data* schedulerThreadData)
|
||||||
|
{
|
||||||
|
kprintf("\tpriority_penalty:\t%" B_PRId32 "\n",
|
||||||
|
schedulerThreadData->priority_penalty);
|
||||||
|
kprintf("\tforced_yield_count:\t%" B_PRId32 "\n",
|
||||||
|
schedulerThreadData->forced_yield_count);
|
||||||
|
kprintf("\tstolen_time:\t\t%" B_PRId64 "\n",
|
||||||
|
schedulerThreadData->stolen_time);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int32
|
static inline int32
|
||||||
simple_get_effective_priority(Thread* thread)
|
simple_get_effective_priority(Thread* thread)
|
||||||
{
|
{
|
||||||
@@ -563,7 +575,8 @@ static scheduler_ops kSimpleOps = {
|
|||||||
simple_on_thread_create,
|
simple_on_thread_create,
|
||||||
simple_on_thread_init,
|
simple_on_thread_init,
|
||||||
simple_on_thread_destroy,
|
simple_on_thread_destroy,
|
||||||
simple_start
|
simple_start,
|
||||||
|
simple_dump_thread_data
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -462,7 +462,8 @@ static scheduler_ops kSimpleSMPOps = {
|
|||||||
on_thread_create,
|
on_thread_create,
|
||||||
on_thread_init,
|
on_thread_init,
|
||||||
on_thread_destroy,
|
on_thread_destroy,
|
||||||
start
|
start,
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1786,6 +1786,10 @@ _dump_thread_info(Thread *thread, bool shortInfo)
|
|||||||
kprintf("flags: 0x%" B_PRIx32 "\n", thread->flags);
|
kprintf("flags: 0x%" B_PRIx32 "\n", thread->flags);
|
||||||
kprintf("architecture dependant section:\n");
|
kprintf("architecture dependant section:\n");
|
||||||
arch_thread_dump_info(&thread->arch_info);
|
arch_thread_dump_info(&thread->arch_info);
|
||||||
|
if (gScheduler->dump_thread_data != NULL) {
|
||||||
|
kprintf("scheduler data:\n");
|
||||||
|
gScheduler->dump_thread_data(thread->scheduler_data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user