Pregunta

i want to obtain info about tasks like the total execution time for the task (with task_exec_time(task)), time spent not running (task->sched_info.run_delay), and the number of times the scheduler invoked the task (task->sched_info.pcount). For this i want to use struct task_struct *linsched_get_task( int task_id ); which is desribed in article http://www.ibm.com/developerworks/library/l-linux-scheduler-simulator/. Then when i compile program it says that this struct doesnt have these members.

Also, void linsched_print_task_stats( void ); doesnt work either.

Has anyone tried it? Why they put something in documentation when it doesnt work...

¿Fue útil?

Solución

All the required information (task_exec_time, run_delay, pcount) are printed by the "linsched_print_stats" function. This function is called after the simulation if you set the "print_tasks" field to one in your test application:

linsched_global_options.print_tasks = 1; linsched_run_sim(ticks);

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top