Skip to content

doc: telemetry: comprehensive Doxygen documentation for telemetry, logging, probes, and debug streams - #11311

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
lgirdwood:topic/doxygen-telemetry-probes
Oct 15, 2026
Merged

lgirdwood merged 1 commit into
thesofproject:mainfrom
lgirdwood:topic/doxygen-telemetry-probes

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Summary

This PR provides comprehensive Doxygen documentation across all SOF telemetry, logging, audio probe, and debug stream subsystems. It organizes the diagnostic infrastructure into four dedicated subgroups under probe_api, bringing the Doxygen documentation coverage from 0% to 100% across these headers:

Subgroups & Architecture

  1. trace_logging_api (Trace DMA & Dictionary Logging):

    • DMA trace circular buffer management (dma_trace_buf, dma_trace_data).
    • Host DMA streaming APIs (dma_trace_init_early(), dma_trace_enable(), dma_trace_flush(), dtrace_event(), dtrace_event_atomic()).
    • Dictionary-based logger (_log_sofdict(), trace_log_filtered(), trace_log_unfiltered(), trace_filter_update(), trace_flush_dma_to_mbox()).
    • Early bootloader checkpoint codes (TRACE_BOOT_*).
    • Host IPC trace packets (sof_ipc_dma_trace_params, sof_ipc_dma_trace_posn, panic crash codes SOF_IPC_PANIC_*).
    • Binary log entry headers (struct log_entry_header, LOG_LEVEL_*).
  2. audio_probe_api (Audio Probes & Stream Tap Points):

    • Core audio probe framework (probe_init(), probe_dma_add(), probe_point_add(), probe_get()).
    • Host probe DMA extraction packet framing (struct probe_data_packet, sync word 0xBABEBEBA, format shift/mask bitfields).
    • Dynamic extraction and injection tap points attached to pipeline interconnect buffers (PROBE_PURPOSE_*, probe_point_id_t).
  3. telemetry_perf_api (Hardware Telemetry & Performance Monitoring):

    • Hardware telemetry and cycle accounting (struct system_tick_info, struct telemetry_wnd_data, struct telemetry_perf_queue).
    • Memory Window 3 Performance Measurement Window (WIN3_MBASE, ADSP_PMW) and performance measurement APIs (get_performance_data(), etc.).
    • Shared SRAM Window 0 firmware status registers and offsets (SRAM_REG_FW_STATUS, SRAM_REG_FW_TRACEP, SRAM_REG_PEAK_VOL, etc.).
  4. debug_stream_api (Abstract Debug Streams & Low-Level Debugging):

    • Debug stream packet protocol (DEBUG_STREAM_IDENTIFIER 0x1ED15EED, struct debug_stream_hdr, struct debug_stream_record).
    • Memory Window 2 debug slots (debug_stream_section_descriptor, debug_stream_slot_hdr, debug_stream_circular_buf).
    • Formatted debug text messages (ds_msg(), ds_vamsg()).
    • Firmware ready debug flags (DEBUG_SET_FW_READY_FLAGS, dbg(), dbg_at(), dump()) and GDB target debug stubs.

Verification

  • Zero C code logic alterations: Strictly Doxygen comments (/** ... */, /**< ... */) and configuration directives.
  • Warning-free Doxygen build: ninja -C build_doxygen doc completes with 0 errors and 0 warnings.
  • Doxygen XML extraction: Verified 100% documented members across all 4 subgroups (0 undocumented items).
  • checkpatch.pl: 0 errors.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open findings
What changed in this PR

Adds comprehensive Doxygen documentation across SOF telemetry, trace/logging, audio probe, and debug stream subsystems by introducing dedicated API subgroups and annotating public structs/macros/functions for full documentation coverage.

Changes:

  • Adds file-level and symbol-level Doxygen comments across trace/logging, probes, telemetry/perf monitoring, and debug stream headers.
  • Introduces four new Doxygen subgroups under probe_api and assigns relevant headers to them via \ingroup.
  • Updates Doxygen configuration (PREDEFINED) to document config-gated APIs.
File Description
src/​include/​user/​trace.h Documents user-space ABI log levels and binary log packet header.
src/​include/​user/​debug_stream_text_msg.h Documents debug stream text message record and send helpers.
src/​include/​user/​debug_stream_slot.h Documents debug slot layout structures and record send syscall.
src/​include/​user/​debug_stream.h Documents debug stream protocol header/record envelope and record IDs.
src/​include/​sof/​trace/​trace-soflogger.h Adds Doxygen docs for dictionary logger, filtering, and helper APIs.
src/​include/​sof/​trace/​trace-boot.h Documents bootloader/boot checkpoint trace codes.
src/​include/​sof/​trace/​dma-trace.h Documents DMA trace buffer structures and host streaming APIs.
src/​include/​sof/​probe/​probe.h Documents probe subsystem APIs and callback semantics.
src/​include/​sof/​debug/​telemetry/​telemetry.h Documents telemetry window layout and tick/perf queue structures.
src/​include/​sof/​debug/​telemetry/​performance_monitor.h Documents perf monitor APIs and exposes them to Doxygen when config-gated.
src/​include/​sof/​debug/​gdb/​gdb.h Documents GDB stub APIs and exception hook.
src/​include/​sof/​debug/​debug.h Documents debug mailbox dump macros and firmware-ready flags.
src/​include/​kernel/​mailbox.h Re-groups and documents SRAM Window 0 FW register offsets for telemetry/perf.
src/​include/​ipc3/​probe.h Documents IPC3 probe structures, purposes, and IPC payloads.
src/​include/​ipc/​trace.h Documents IPC trace DMA params/position and panic codes/descriptor.
src/​include/​ipc/​probe_dma_frame.h Documents probe extraction packet header and format bitfields.
doc/​sof.doxygen.in Adds PREDEFINED config symbols so Doxygen includes gated APIs.
doc/​groups.dox Adds the four new Doxygen subgroups under probe_api.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/groups.dox Outdated
Comment thread src/include/sof/debug/telemetry/telemetry.h
Comment thread src/include/ipc/trace.h Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open findings

🧠 Review effort: Lite

Comment thread src/include/user/debug_stream_slot.h Outdated
Comment thread src/include/user/debug_stream_text_msg.h Outdated
Add comprehensive Doxygen documentation across all SOF telemetry,
logging, probe, and debug stream subsystems, organizing them into
four dedicated subgroups under probe_api:

1. trace_logging_api: DMA trace buffer management, circular host
   streaming, dictionary-based logger (.ldc), runtime log level
   filtering, and panic crash dumps.
2. audio_probe_api: Audio probe injection and extraction tap points,
   probe DMA frame format encoding (0xBABEBEBA), and IPC commands.
3. telemetry_perf_api: Hardware telemetry metrics, CPU cycle accounting,
   Memory Window 3 component performance tracking, and SRAM Window 0
   firmware status registers.
4. debug_stream_api: Abstract debug stream packet protocol (0x1ED15EED),
   Memory Window 2 debug slots, early mailbox debug dumping macros,
   and GDB target debug stub.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@lgirdwood
lgirdwood force-pushed the topic/doxygen-telemetry-probes branch from 5d58a6e to 111b07e Compare October 14, 2026 20:00
@intel-sofci

intel-sofci commented Oct 14, 2026 •

Copy link
Copy Markdown

PR 11311: test results

Run date: 2026-10-15 10:03 UTC

Tested commit: 111b07e774fa0b0cf21f180e6e1e326c8d220593

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@lgirdwood
lgirdwood merged commit 2bc73a7 into thesofproject:main Oct 15, 2026
46 checks passed
@lgirdwood
lgirdwood deleted the topic/doxygen-telemetry-probes branch October 15, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants