Sam Price commented: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5720#note_157751


@vijay Did you say you wanted to work this?

I would compare cpuuse vs perioduse on how they print names.
Also i am not sure where 38 came from for the string length.  I feel like that 
should be a #define 

I ran into this when trying to use the rate monotonic commands, but all of the 
CFS threads use the posix set name rather than the legacy name.

Briefly looking there is a dynamic printf * that I have never gotten to use.
```c
#define THREAD_NAME_SIZE 38 <- Not sure if this name exists or is named 
something else.

rtems_printf(
  printer,
  "  ID   %*s COUNT MISSED      CPU TIME         WALL TIME\n"
  "       %*s              MIN/MAX/AVG        MIN/MAX/AVG\n",
  THREAD_NAME_SIZE,
  "OWNER",
  THREAD_NAME_SIZE,
  ""
);

Or macro tricks

#define STRINGIFY_(x) #x
#define STRINGIFY(x) STRINGIFY_(x)

rtems_printf(
  printer,
  "  ID   %" STRINGIFY(THREAD_NAME_SIZE) "s COUNT MISSED   "
  "   CPU TIME         WALL TIME\n"
  "       %" STRINGIFY(THREAD_NAME_SIZE) "s              "
  "   MIN/MAX/AVG        MIN/MAX/AVG\n",
  "OWNER",
  ""
);
```

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5720#note_157751
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/sent_notifications/5-59ydwxqzynjvfrcfvmunc14ns-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to