You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.
.
.
272tm_preemptive_thread_4_counter);
273 }
thread_analyzer_print(true);
intcpu_load=cpu_load_get(true); // true = reset after reading275/* Show the time period total. */276printf("Time Period Total: %lu\n\n", total-last_total);
.
.
.
to print the cpu_load_get total values i am changing the cpu_load_get.c like below
thread_1*** Booting Zephyr OS build v4.2.0-rc3 ***
**** Thread-Metric Preemptive Scheduling Test **** Relative Time: 30
Thread analyze:
TM_PreEmp_Schedul_4 : STACK: unused 952 usage 72 / 1024 (7 %); CPU: 10 %
: Total CPU cycles used: 131348255
TM_PreEmp_Schedul_3 : STACK: unused 880 usage 144 / 1024 (14 %); CPU: 24 %
: Total CPU cycles used: 302652845
TM_PreEmp_Schedul_2 : STACK: unused 880 usage 144 / 1024 (14 %); CPU: 26 %
: Total CPU cycles used: 323239611
TM_PreEmp_Schedul_1 : STACK: unused 880 usage 144 / 1024 (14 %); CPU: 24 %
: Total CPU cycles used: 302903497
TM_PreEmp_Schedul_0 : STACK: unused 888 usage 136 / 1024 (13 %); CPU: 13 %
: Total CPU cycles used: 166560415
idle : STACK: unused 288 usage 32 / 320 (10 %); CPU: 0 %
: Total CPU cycles used: 0
main : STACK: unused 368 usage 656 / 1024 (64 %); CPU: 0 %
: Total CPU cycles used: 3835885
ISR0 : STACK: unused 1872 usage 176 / 2048 (8 %)
ticks_idle: 0, total_cycles: 2404707942 CPU Load: 1000‰
**** Thread-Metric Preemptive Scheduling Test **** Relative Time: 60
Thread analyze:
TM_PreEmp_Schedul_4 : STACK: unused 952 usage 72 / 1024 (7 %); CPU: 10 %
: Total CPU cycles used: 268604211
TM_PreEmp_Schedul_3 : STACK: unused 880 usage 144 / 1024 (14 %); CPU: 24 %
: Total CPU cycles used: 611737041
TM_PreEmp_Schedul_2 : STACK: unused 880 usage 144 / 1024 (14 %); CPU: 25 %
: Total CPU cycles used: 632283998
TM_PreEmp_Schedul_1 : STACK: unused 880 usage 144 / 1024 (14 %); CPU: 24 %
: Total CPU cycles used: 611768326
TM_PreEmp_Schedul_0 : STACK: unused 888 usage 136 / 1024 (13 %); CPU: 13 %
: Total CPU cycles used: 332466878
idle : STACK: unused 288 usage 32 / 320 (10 %); CPU: 0 %
: Total CPU cycles used: 0
main : STACK: unused 368 usage 656 / 1024 (64 %); CPU: 0 %
: Total CPU cycles used: 8809921
ISR0 : STACK: unused 1872 usage 176 / 2048 (8 %)
ticks_idle: 0, total_cycles: 2405039433 CPU Load: 1000‰
<style>
</style>
Iteration 1
Iteration 2 (thread_analyze without reset)
TM_PreEmp_Schedul_4
131348255
268604211
TM_PreEmp_Schedul_3
302652845
611737041
TM_PreEmp_Schedul_2
323239611
632283998
TM_PreEmp_Schedul_1
302903497
611768326
TM_PreEmp_Schedul_0
166560415
332466878
main
3835885
8809921
Total
1230540508
2465670375
previous total
0
1230540508
Iteration total
1230540508
1235129867
2404707942
2405039433
Difference
1174167434
1169909566
This shows the difference of almost double.
Note: while doing with 1 task alone the difference is very less. I would like to know where the cycles are getting increased.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
while running tm_preemptive_scheduling_test.c i am testing
to print the cpu_load_get total values i am changing the cpu_load_get.c like below
output:
This shows the difference of almost double.
Note: while doing with 1 task alone the difference is very less.
I would like to know where the cycles are getting increased.
setup environment details:
Beta Was this translation helpful? Give feedback.
All reactions