kernel: Dump scheduler specific thread data

This commit is contained in:
Pawel Dziepak 2013-10-09 01:37:00 +02:00
parent f256b4aca7
commit 130000e068
4 changed files with 22 additions and 3 deletions

View File

@ -547,7 +547,8 @@ static scheduler_ops kAffineOps = {
affine_on_thread_create,
affine_on_thread_init,
affine_on_thread_destroy,
affine_start
affine_start,
NULL
};

View File

@ -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
simple_get_effective_priority(Thread* thread)
{
@ -563,7 +575,8 @@ static scheduler_ops kSimpleOps = {
simple_on_thread_create,
simple_on_thread_init,
simple_on_thread_destroy,
simple_start
simple_start,
simple_dump_thread_data
};

View File

@ -462,7 +462,8 @@ static scheduler_ops kSimpleSMPOps = {
on_thread_create,
on_thread_init,
on_thread_destroy,
start
start,
NULL
};

View File

@ -1786,6 +1786,10 @@ _dump_thread_info(Thread *thread, bool shortInfo)
kprintf("flags: 0x%" B_PRIx32 "\n", thread->flags);
kprintf("architecture dependant section:\n");
arch_thread_dump_info(&thread->arch_info);
if (gScheduler->dump_thread_data != NULL) {
kprintf("scheduler data:\n");
gScheduler->dump_thread_data(thread->scheduler_data);
}
}