-
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
Add Trace Hook Macros to all API calls #786
Conversation
Thank you for your contribution. I have informed team about your PR and the subject matter expert will be reviewing it soon. Thank you for your patience. |
Is this intended just for user code to kernel code transitions? In that case it could also potentially be implemented by wrapping FreeRTOS API functions with a macro that adds tracing code; this would also catch code in return statements. For example: #include "FreeRTOS.h"
#include "task.h"
BaseType_t trace_xTaskDelayUntil( TickType_t *pxPreviousWakeTime,
const TickType_t xTimeIncrement )
{
BaseType_t returnVal;
// entry trace code
returnVal = xTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement );
// exit trace code
return returnVal;
}
#define xTaskDelayUntil trace_xTaskDelayUntil That could potentially be put in a wrapper header or something similar. Not advocating for any particular solution, but would like to understand the options that are on the table, and what factors we need to consider. |
Hello @Techcore123, |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #786 +/- ##
==========================================
- Coverage 94.35% 93.62% -0.74%
==========================================
Files 6 6
Lines 2443 2508 +65
Branches 598 598
==========================================
+ Hits 2305 2348 +43
- Misses 85 107 +22
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Hi @rawalexe, |
Hello @Techcore123 , Best Regards, |
Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
I did the following changes:
Here are the scripts that I wrote - Scripts.zip |
Signed-off-by: Gaurav Aggarwal <[email protected]>
Add Trace Hook Macros to all API calls
Description
This pull-request adds out-of-the-box support for different tracing tools.
For more information see following forum post: https://forums.freertos.org/t/add-tracing-functionality-for-all-api-calls/18007.
New trace hook macros have been added for all public API functions, one for each function entry and one for each exit.
There are no functional changes, as the macros are by default empty.
Test Steps
N/A
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.