-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make the type used to hold run-time counter values configurable #350
Merged
cobusve
merged 8 commits into
FreeRTOS:main
from
RichardBarry:make-type-used-for-run-time-counter-configurable
Jun 14, 2021
Merged
Make the type used to hold run-time counter values configurable #350
cobusve
merged 8 commits into
FreeRTOS:main
from
RichardBarry:make-type-used-for-run-time-counter-configurable
Jun 14, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ine the type used to hold run time statistic counters. Defaults to uint32_t for backward compatibility. #define configRUN_TIME_COUNTER_TYPE to a type (for example, uint64_t) in FreeRTOSConfig.h to override the default. Introduce ulTaskGetIdleRunTimePercent() to complement the pre-existing ulTaskGetIdleRunTimeCounter(). Whereas the pre-existing function returns the raw run time counter value, the new function returns the percentage of the entire run time consumed by the idle task. Note the amount of idle time is only a good measure of the slack time in a system if there are no other tasks executing at the idle priority, tickless idle is not used, and configIDLE_SHOULD_YIELD is set to 0.
Codecov Report
@@ Coverage Diff @@
## main #350 +/- ##
=======================================
Coverage 92.13% 92.13%
=======================================
Files 4 4
Lines 1272 1272
Branches 342 342
=======================================
Hits 1172 1172
Misses 53 53
Partials 47 47
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Add the MPU version of ulTaskGetIdleRunTimePercent().
…tps://github.com/RichardBarry/FreeRTOS-Kernel into make-type-used-for-run-time-counter-configurable
RichardBarry
added a commit
to RichardBarry/FreeRTOS
that referenced
this pull request
Jun 10, 2021
…E and ulTaskGetIdleRunTimePercent(). This PR updates the Win32 demo to exercise both additions with configRUN_TIME_COUNTER_TYPE set to uint64_t.
aggarg
reviewed
Jun 10, 2021
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Commit changes to mpu_prototypes.h which were missed from the original commit.
aggarg
approved these changes
Jun 11, 2021
cobusve
approved these changes
Jun 14, 2021
RichardBarry
deleted the
make-type-used-for-run-time-counter-configurable
branch
June 16, 2021 01:16
n9wxu
pushed a commit
to FreeRTOS/FreeRTOS
that referenced
this pull request
Mar 18, 2022
* PR FreeRTOS/FreeRTOS-Kernel#350 introduced configRUN_TIME_COUNTER_TYPE and ulTaskGetIdleRunTimePercent(). This PR updates the Win32 demo to exercise both additions with configRUN_TIME_COUNTER_TYPE set to uint64_t. * Add ultaskgetidleruntimepercent to lexicon.txt. Co-authored-by: Cobus van Eeden <[email protected]>
laroche
pushed a commit
to laroche/FreeRTOS-Kernel
that referenced
this pull request
Apr 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Introduce configRUN_TIME_COUNTER_TYPE which enables developers to define the type used to hold run time statistic counters. Defaults to uint32_t for backward compatibility. #define configRUN_TIME_COUNTER_TYPE to a type (for example, uint64_t) in FreeRTOSConfig.h to override the default.
Introduce ulTaskGetIdleRunTimePercent() to complement the pre-existing ulTaskGetIdleRunTimeCounter(). Whereas the pre-existing function returns the raw run time counter value, the new function returns the percentage of the entire run time consumed by the idle task. Note the amount of idle time is only a good measure of the slack time in a system if there are no other tasks executing at the idle priority, tickless idle is not used, and configIDLE_SHOULD_YIELD is set to 0.
Test Steps
Somewhat tested by the Win32 demo in the FreeRTOS/FreeRTOS repo which prints the amount of time used by the idle task in both its comprehensive and blinky demos.
Related Issue
Corresponding updates to the Win32Demo in the FreeRTOS/FreeRTOS repo are in a separate PR that will be created after this one.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.