Repository navigation
Conversation
Convert internal component IDs to the IPC4 report format in both the standard and extended performance reports. Put the module ID in bits 31:16 and the instance ID in bits 15:0 so report readers decode both fields correctly. Leave core resource IDs unchanged. Signed-off-by: Grzegorz Janca <grzegorz.janca@intel.com>
Clear perf_data slots unconditionally during performance_monitor_init(), perf_data_getnext(), perf_data_free(), and perf_data_item_comp_init(). Previously, slot clearing depended on CONFIG_SOF_TELEMETRY_MODULE_RESOURCES and reserved flag bits were left untouched, allowing stale SRAM contents to leak into GLOBAL_PERF_DATA when components were created while measurements were disabled. Signed-off-by: Grzegorz Janca <grzegorz.janca@intel.com>
Use LIB_MANAGER_PACK_MODULE_ID(lib_id, mod_id) when building comp_id for ipc4_get_comp_dev() in enable_performance_counters(). Without packing lib_id, loaded-library module instances (lib_id > 0) were not found and their performance counters were not reinitialized when measurements transitioned from disabled to started. Signed-off-by: Grzegorz Janca <grzegorz.janca@intel.com>
gjanca
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
December 3, 2026 16:09
Collaborator
|
Can one of the admins verify this patch?
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the IPC4 performance-report identifier and telemetry-slot cleanup changes.
No open issues 🎉
What changed in this PR
Corrects module identifiers in IPC4 performance reports and prevents stale data in component telemetry slots.
Changes:
- Encodes report IDs as
(module_id << 16) | instance_id, leaving core-summary IDs unchanged. - Clears component performance data during initialization, allocation, and release.
- Includes library IDs when locating components to enable performance counters.
| File | Description |
|---|---|
| src/kernel/debug/telemetry/performance_monitor.c | Fixes report ID encoding, component lookup, and performance-slot clearing. |
Review effort: Balanced
Member
|
test this please |
lgirdwood
approved these changes
Dec 3, 2026
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.
Encode module resource_id as [module_id | instance_id] in IPC4 reports
Internal component IDs use IPC4_COMP_ID(module_id, instance_id) [instance_id | module_id],
whereas IPC4 GLOBAL_PERF_DATA (param 18) and EXTENDED_GLOBAL_PERF_DATA (param 30) expect (module_id << 16) | instance_id.
Convert module entries via perf_report_module_id() when serializing reports, leaving core-summary records (resource_id = core_id) unchanged.
Zero-initialize ADSP_PMW component slots
Unconditionally clear perf_data during init, slot allocation perf_data_getnext(),
slot release perf_data_free(), and perf_data_item_comp_init() so reserved
flag bits (
rsvd) and accumulators cannot retain stale SRAM values whenslots are reused or components are created while measurements are disabled.