-
Notifications
You must be signed in to change notification settings - Fork 350
trace: remove superfluous objects #10510
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
base: main
Are you sure you want to change the base?
Conversation
Trace context isn't used when building LLEXT, move it to monolithic build part. In many cases this eliminates the entire module's .data section. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
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.
Pull request overview
This PR optimizes memory usage in LLEXT (Loadable EXTensions) builds by moving trace context declarations from global scope to monolithic build sections. The trace contexts are only needed when building modules directly into the base firmware, not when building loadable extensions.
Changes:
- Removed global DECLARE_TR_CTX declarations from 38 audio module files
- Re-added DECLARE_TR_CTX declarations within
#elseblocks (non-LLEXT/monolithic builds) where DECLARE_MODULE_ADAPTER is used - Removed EXPORT_SYMBOL(tflm_tr) from tensorflow module as it's no longer globally accessible
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/debug/tester/tester.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/up_down_mixer/up_down_mixer.c | Moved DECLARE_TR_CTX to end of file before DECLARE_MODULE_ADAPTER |
| src/audio/tone/tone-ipc4.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/tone/tone-ipc3.c | Moved DECLARE_TR_CTX before comp_driver definition (no LLEXT support) |
| src/audio/tensorflow/tflm-classify.c | Removed DECLARE_TR_CTX and EXPORT_SYMBOL(tflm_tr), re-added in monolithic section |
| src/audio/template/template.c | Moved DECLARE_TR_CTX to monolithic build section with explanatory comment |
| src/audio/tdfb/tdfb.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/stft_process/stft_process.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/sound_dose/sound_dose.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/smart_amp/smart_amp.c | Moved DECLARE_TR_CTX to end of file before DECLARE_MODULE_ADAPTER |
| src/audio/selector/selector.c | Moved DECLARE_TR_CTX declarations for both IPC3 and IPC4 sections appropriately |
| src/audio/multiband_drc/multiband_drc.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/module_adapter/module/waves/waves.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/module_adapter/module/passthrough.c | Moved DECLARE_TR_CTX to end of file before DECLARE_MODULE_ADAPTER |
| src/audio/module_adapter/module/modules.c | Removed DECLARE_TR_CTX (not needed as no DECLARE_MODULE_ADAPTER) |
| src/audio/module_adapter/module/dolby/dax.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/module_adapter/module/cadence.c | Moved DECLARE_TR_CTX to end of file before DECLARE_MODULE_ADAPTER |
| src/audio/mixin_mixout/mixin_mixout.c | Moved both mixin_tr and mixout_tr DECLARE_TR_CTX to monolithic build section |
| src/audio/mixer/mixer.c | Moved DECLARE_TR_CTX to end of file before DECLARE_MODULE_ADAPTER |
| src/audio/mfcc/mfcc.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/level_multiplier/level_multiplier.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/kpb.c | Moved DECLARE_TR_CTX before comp_driver definition |
| src/audio/igo_nr/igo_nr.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/host-zephyr.c | Moved DECLARE_TR_CTX before comp_driver definition |
| src/audio/host-legacy.c | Moved DECLARE_TR_CTX before comp_driver definition |
| src/audio/google/google_rtc_audio_processing.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/google/google_hotword_detect.c | Moved DECLARE_TR_CTX before comp_driver definition |
| src/audio/google/google_ctc_audio_processing.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/eq_iir/eq_iir.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/eq_fir/eq_fir.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/dcblock/dcblock.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/dai-zephyr.c | Moved DECLARE_TR_CTX before comp_driver definition |
| src/audio/dai-legacy.c | Moved DECLARE_TR_CTX before comp_driver definition |
| src/audio/crossover/crossover.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/copier/copier_ipcgtw.c | Removed DECLARE_TR_CTX (not needed as no DECLARE_MODULE_ADAPTER) |
| src/audio/copier/copier.c | Moved DECLARE_TR_CTX before DECLARE_MODULE_ADAPTER |
| src/audio/codec/dts/dts.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
| src/audio/aria/aria.c | Moved DECLARE_TR_CTX to monolithic build section after SOF_LLEXT_BUILDINFO |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Trace context isn't used when building LLEXT, move it to monolithic build part. In many cases this eliminates the entire module's .data section.