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

Kinsey Moore (@opticron) gitlab at rtems.org
Mon Oct 14 17:41:45 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_113105

 > +static bool cpu_usage_visitor( Thread_Control *the_thread, void *arg )
 > +{
 > +  cpu_usage_context *ctx;
 > +  ctx = arg;
 > +  cpuuse_info  * cpuuse_data;
 > +  cpuuse_data =   ctx-> cpuuse_data;
 > +  _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( &cpuuse_data->time_used_after_last_reset, 
 > +              &cpuuse_data->uptime, &cpuuse_data->total );
 > +  _Timestamp_Divide( &cpuuse_data->time_used_after_last_reset, 
 > +                      &cpuuse_data->total, &cpuuse_data->ival, &cpuuse_data->fval );
 > +  cpuuse_data->seconds = _Timestamp_Get_seconds( 
 > +                    &cpuuse_data->time_used_after_last_reset );

The indentation here is inconsistent. Two spaces of indentation should be sufficient for line continuations.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/232#note_113105
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/20241014/ece9bc56/attachment-0001.htm>


More information about the bugs mailing list