-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU Statistics #6857
CPU Statistics #6857
Conversation
ba13bcb
to
18c5d81
Compare
Rebased - No PR dependency now |
18c5d81
to
57d1f35
Compare
CC @flit |
Suggestion from @c1728p9 was to have single low power ticker and idle time can be calculated as sum of sleep and deep sleep timings. Will be compatible even with system having single thread. |
57d1f35
to
43f9112
Compare
43f9112
to
908cfd3
Compare
rtos/rtos_idle.h
Outdated
@@ -26,6 +26,7 @@ | |||
#define RTOS_IDLE_H | |||
|
|||
#include <stddef.h> | |||
#include <stdint.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this header still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 👍 Will remove it
908cfd3
to
25c50d4
Compare
Can you review astyle travis check - few style changes requested there. We'll have a look why it is not reported here (as +ZZ warnings) |
hal/mbed_sleep_manager.c
Outdated
return (sleep_time+deep_sleep_time); | ||
} | ||
|
||
uint64_t mbed_uptime(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mbed_uptime
is the same as read_us
can we remove one? or at least make one simply call the other?
platform/mbed_power_mgmt.h
Outdated
@@ -205,6 +205,32 @@ static inline void system_reset(void) | |||
{ | |||
NVIC_SystemReset(); | |||
} | |||
|
|||
/** Provides the time spent in sleep mode, since system is up and running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since system is up and running
that's a bit confusing, can just say from boot? Also we should call out in each of the functions (@note
) it only works if platform supports LP ticker.
/morph build |
Build : FAILUREBuild number : 2038 |
Test was failing on limited RAM devices, because of shared event queue size. Updated test to use thread instead of event queue.
8c9e036
to
7900863
Compare
/morph build |
Build : SUCCESSBuild number : 2047 Triggering tests/morph test |
Test : FAILUREBuild number : 1858 |
Exporter Build : SUCCESSBuild number : 1691 |
Test failed on NUCLEO_F746ZG, adding additional read to take care of lazy initialization of lp ticker. |
@deepikabhavnani Will restart in a bit. Giving PRs targeted for 5.8.5 a chance to complete. |
/morph build |
Build : SUCCESSBuild number : 2070 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1717 |
Test : SUCCESSBuild number : 1881 |
FYI, somehow this test build was magic because two other PRs have failed with this update (#6910 (comment)) (#6847 (comment)). @deepikabhavnani has a fix ready here (#6993), and it's been locally tested multiple times without failure. Conversely, if master is used, it tends to fail quite often. The issue is possibly due to CI load. In the future, we should probably consider seriously running multiple test builds back to back when new or updated tests are involved to make sure they get heavy testing on them. |
Description
API to get CPU stats like sleep/deepsleep time, uptime and idle time. These can be used by application to know the CPU Usage runtime.
Preceding PR dependency: ##6821
Status: In progress
Pull request type
CC @SenRamakri