[PATCH] Adding CPU usage statistics for usage in user code

Олег Мороз oleg.moroz at mcc.vniiem.ru
Thu Dec 18 07:41:29 UTC 2014


Thanks for you answer. I will try to implement this. 
On Thursday 18 of December 2014 08:20:44 Sebastian Huber wrote:
> Hello Олег Мороз,
> 
> this duplicates code of the standard report function.  I would instead
> do the following:
> 
> 1. Add an argument to the visitor function in
> rtems_iterate_over_all_threads() and rename this function to
> rtems_task_iterate().
> 
> 2. Use rtems_task_iterate() to implement the previous
> rtems_iterate_over_all_threads().
> 
> 3. Implement a rtems_cpu_usage_report() based on
> rtems_cpu_usage_report_with_plugin() and rtems_task_iterate() that uses
> a visitor function with the following prototype void (*visitor)(XXX
> total, rtems_cpu_usage *cpu_usage, void *arg).  The rtems_cpu_usage is
> the CPU usage of one thread.
> 
> 4. Implement rtems_cpu_usage_report_with_plugin() via
> rtems_cpu_usage_report().
> 
> 5. Implement your new function via rtems_cpu_usage_report().
> 
> For everything we need new test cases in the testsuite.

-- 
С уважением,
Олег Мороз
Заместитель начальника отдела разработки ПО БВС КА



More information about the devel mailing list