RTEMS | Draft: add programmatic interface for data produced by cpuuse (!232)

Kinsey Moore (@opticron) gitlab at rtems.org
Sat Sep 28 21:02:24 UTC 2024




Kinsey Moore started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/232#note_112680

 > +  _Thread_Get_name( the_thread, cpuuse_data.name, sizeof( cpuuse_data.name ) );
 > +
 > +  cpuuse_data.time_used_after_last_reset = _Thread_Get_CPU_time_used_after_last_reset(the_thread );
 > +  _TOD_Get_uptime( &cpuuse_data.uptime );
 > +  _Timestamp_Subtract( &ctx->uptime_at_last_reset, &cpuuse_data.uptime, &ctx->total );
 > +  _Timestamp_Divide( &cpuuse_data.time_used_after_last_reset, &ctx->total, &cpuuse_data.ival, &cpuuse_data.fval );
 > +  cpuuse_data.seconds = _Timestamp_Get_seconds( &cpuuse_data.time_used_after_last_reset );
 > +  cpuuse_data.nanoseconds = _Timestamp_Get_nanoseconds( &cpuuse_data.time_used_after_last_reset ) /
 > +  TOD_NANOSECONDS_PER_MICROSECOND;
 > +     
 > +
 > +   ctx->usage_function_pointer(the_thread, arg ,cpuuse_data) ;
 > +   return false;
 > +
 > +
 > +

Remove extra newlines.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/232#note_112680
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240928/adf5bd7c/attachment-0001.htm>


More information about the bugs mailing list