RTEMS | Add programmatic interface for data produced by cpuuse (!200)

Gedare Bloom (@gedare) gitlab at rtems.org
Sat Sep 14 21:54:43 UTC 2024



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200 was reviewed by Gedare Bloom

--
  
Gedare Bloom started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200#note_112091

 >  
 > -static bool cpu_usage_visitor( Thread_Control *the_thread, void *arg )
 > +bool  print_usage_stats( Thread_Control *the_thread, void * arg, char *  name ,  uint32_t   ival, uint32_t  fval , uint32_t  seconds ,uint32_t  nanoseconds

Line lengths and white space usage are not consistent, and deviate from our style. Please see https://docs.rtems.org/branches/master/eng/coding-formatting.html

--
  
Gedare Bloom started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200#note_112092

 > +  ctx = arg;
 > +
 > +

Avoid having multiple blank lines in a row.

--
  
Gedare Bloom started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200#note_112093

 > +{
 > +  cpu_usage_context *ctx;
 > +  ctx = arg;

you can merge these two lines.

--
  
Gedare Bloom started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200#note_112094

 > +    the_thread->Object.id,
 > +    name,
 > +    seconds, nanoseconds, 

each argument should be on its own line.

--
  
Gedare Bloom started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200#note_112095

 > +    ival, fval
 > +  );
 > +return false;

indent

--
  
Gedare Bloom started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200#note_112096

 >    ctx = arg;
 > +
 > +

avoid making whitespace/formatting changes to parts of the code you aren't modifying functionally


-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/200
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/20240914/3d72e88d/attachment-0001.htm>


More information about the bugs mailing list