RTEMS | CPU Usage api (!864)
Joel Sherrill (@joel)
gitlab at rtems.org
Fri Feb 13 00:41:19 UTC 2026
Joel Sherrill started a new discussion on testsuites/validation/tc-cpuuse.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/864#note_142682
> + T_true(
> + _Timestamp_Get_seconds( &info_self.task_total ) > 0 ||
> + _Timestamp_Get_nanoseconds( &info_self.task_total ) > 0
> + );
> /*
> - * Our CPU usage after the last reset is now exactly one tick of the
> - * software timecounter.
> + * CPU usage of the executing thread may advance between calls, but should
> + * stay within a couple of soft ticks.
> */
> - T_eq_i64( _Thread_Get_CPU_time_used_after_last_reset( self ), 4295 );
> - T_eq_i64(
> - _Thread_Get_CPU_time_used( self ),
> - cpu_usage_self + 12885 + 4295 * idle_tasks
> + T_ge_i64( info_self.task_total, used_self );
> + T_le_i64( info_self.task_total, used_self + 2 * CPUUSE_SOFT_TICKS );
Running on the SPARC Instruction Simulator (SIS) will be helpful. It is built as part of the rtems-sparc toolchain. The command for sparc/leon3 executables will be something like:
`sparc-rtems7-sis -leon3 -m 4 -r EXE`
sis has a _-gdb_ argument to use its built-in gdbserver.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/864#note_142682
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/20260213/1be4018e/attachment-0001.htm>
More information about the bugs
mailing list