Support function tracing (-finstrument-functions)#764
Open
erhankur wants to merge 1 commit into
Open
Conversation
8b255f7 to
5427464
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SystemView support for ESP-IDF’s compiler-instrumented function tracing (-finstrument-functions) by implementing esp_trace encoder callbacks and ensuring SystemView host-driven start/stop propagates to the trace runtime.
Changes:
- Implemented SystemView encoder callbacks for function enter/exit and registered a dedicated SystemView module (
ESP_FunctionTrace). - Propagated SystemView Start/Stop state to
esp_traceviaesp_trace_notify_recording_state(). - Wired the new source into the build (conditional on
CONFIG_ESP_TRACE_FUNCTION_TRACE) and documented the feature; bumped component version to 1.1.0.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| esp_sysview/src/SEGGER/SEGGER_SYSVIEW.c | Calls into esp_trace on SystemView Start/Stop to propagate recording state. |
| esp_sysview/src/esp/function_trace_sysview.c | New SystemView backend emitting function enter/exit events via a dedicated module. |
| esp_sysview/src/esp/adapter_encoder_sysview.h | Exposes function-trace callback prototypes (and encoder fwd-decl). |
| esp_sysview/src/esp/adapter_encoder_sysview.c | Registers function-trace module and wires callbacks into encoder vtable. |
| esp_sysview/CMakeLists.txt | Conditionally builds the new function trace backend. |
| esp_sysview/README.md | Documents function tracing behavior and symbol mapping workflow. |
| esp_sysview/idf_component.yml | Version bump to 1.1.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5427464 to
7e252d6
Compare
7e252d6 to
a9d9406
Compare
5892a12 to
5c3e8f2
Compare
5c3e8f2 to
35139f1
Compare
This file contains hidden or 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
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.
Implement the esp_trace function trace encoder callbacks so compiler-instrumented function entry/exit is recorded through SystemView.