Skip to content

Add trace sinks into debug topology - #2577

Open
brondani wants to merge 2 commits into
mainfrom
add-trace-sinks-debug
Open

Add trace sinks into debug topology#2577
brondani wants to merge 2 commits into
mainfrom
add-trace-sinks-debug

Conversation

@brondani

@brondani brondani commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Fixes

Changes

  • Add trace-sinks serialwire and named/unnamed tracebuffer to generated cbuild-run.yml debug topology.
  • Preserve distinct named trace buffers and warn about duplicate generic sink declarations.
  • Update unit tests, pack fixtures, and generated YAML references.

These changes expose device trace capabilities to debug tools.

Limitations

  • Processor-specific trace declarations and traceport remain unsupported and are ignored.
  • When no supported trace sink is collected, serial wire and an unnamed trace buffer are emitted as compatibility defaults.

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

Emit serial wire and named trace buffers in generated debug topologies, with default sinks when device data is absent.
@brondani
brondani force-pushed the add-trace-sinks-debug branch from 53af2a4 to 6755a3f Compare August 26, 2026 14:19
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

Test Results

  2 files   -    41   14 suites   - 113   14m 58s ⏱️ - 1m 46s
481 tests  -   634  481 ✅  -   617  0 💤  - 17  0 ❌ ±0 
962 runs   - 1 407  962 ✅  - 1 349  0 💤  - 58  0 ❌ ±0 

Results for commit 6755a3f. ± Comparison against base commit 91180e9.

This pull request removes 634 tests.
AuxCmdTests ‑ MkdirCmdTest
AuxCmdTests ‑ RmdirCmdTest
AuxCmdTests ‑ TouchCmdTest
BuildSystemGeneratorTests ‑ GenAuditFile
BuildSystemGeneratorTests ‑ GenAuditFile_WithOut_Existing_Audit_File
BuildSystemGeneratorTests ‑ GenAuditFile_With_Existing_Audit_File
BuildSystemGeneratorTests ‑ GetString
BuildSystemGeneratorTests ‑ StrConv
BuildSystemGeneratorTests ‑ StrNorm
CBuildGCCTests ‑ Asm
…

♻️ This comment has been updated with latest results.

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.

Pull request overview

This PR extends the generated cbuild-run.yml debug topology to expose device trace sink capabilities (serial wire output and on-device trace buffers) derived from PDSC trace declarations, improving downstream debug tool integration.

Changes:

  • Collect serialwire and tracebuffer sinks from device trace properties (ignoring processor-specific Pname traces and unsupported traceport), and emit compatibility defaults when none are collected.
  • Emit trace-sinks into generated cbuild-run.yml, update the JSON schema accordingly, and adjust tracebuffer identity handling to preserve distinct named buffers.
  • Update unit tests and reference/fixture data to validate warnings and new YAML output.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/projmgr/src/ProjMgrRunDebug.cpp Collects trace sinks from PDSC and records warnings/defaults for debug topology generation.
tools/projmgr/src/ProjMgrCbuildRun.cpp Emits trace-sinks into generated cbuild-run.yml YAML.
tools/projmgr/schemas/common.schema.json Extends schema to validate the new trace-sinks structure in debug topology.
tools/projmgr/include/ProjMgrRunDebug.h Adds TraceSinkType and stores collected trace sinks in DebugTopologyType.
tools/projmgr/include/ProjMgrYamlParser.h Adds YAML key constants for trace-sinks and sink types.
libs/rtemodel/src/RteDevice.cpp Incorporates tracebuffer name into constructed IDs to distinguish named buffers.
tools/projmgr/test/src/ProjMgrUnitTests.cpp Captures and asserts expected warnings produced by duplicate/unnamed trace sink declarations.
test/packs/ARM/RteTest_DFP/0.2.0/ARM.RteTest_DFP.pdsc Updates test pack PDSC to include trace sink declarations (including ignored processor-specific ones).
tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW.cbuild-run.yml Updates expected generated YAML to include trace-sinks with named/unnamed buffers.
tools/projmgr/test/data/TestRunDebug/ref/custom+TestHW.cbuild-run.yml Updates expected generated YAML to include trace-sinks with named/unnamed buffers.
tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW2.cbuild-run.yml Updates expected generated YAML to include default trace-sinks.
tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml Updates expected generated YAML to include default trace-sinks.
tools/projmgr/test/data/ImageOnly/ref/image-only+CM0.cbuild-run.yml Updates expected generated YAML to include default trace-sinks.
tools/projmgr/test/data/ImageOnly/ref/image-only-multicore+CM0.cbuild-run.yml Updates expected generated YAML to include default trace-sinks.
tools/projmgr/test/data/WestSupport/ref/solution+CM0.cbuild-run.yml Updates expected generated YAML to include default trace-sinks.

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

Comment thread tools/projmgr/src/ProjMgrRunDebug.cpp Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@brondani
brondani marked this pull request as ready for review August 26, 2026 15:18
@brondani
brondani requested a review from edriouk August 26, 2026 15:19
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.16%. Comparing base (91180e9) to head (c480231).

Files with missing lines Patch % Lines
tools/projmgr/src/ProjMgrRunDebug.cpp 96.15% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2577      +/-   ##
==========================================
+ Coverage   72.13%   72.16%   +0.02%     
==========================================
  Files         185      185              
  Lines       30221    30253      +32     
  Branches    17824    17844      +20     
==========================================
+ Hits        21800    21831      +31     
  Misses       6110     6110              
- Partials     2311     2312       +1     
Flag Coverage Δ
buildmgr-cov 79.71% <ø> (ø)
packchk-cov 69.85% <ø> (ø)
projmgr-cov 88.04% <96.87%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/projmgr/include/ProjMgrRunDebug.h 100.00% <ø> (ø)
tools/projmgr/src/ProjMgrCbuildRun.cpp 95.86% <100.00%> (+0.09%) ⬆️
tools/projmgr/src/ProjMgrRunDebug.cpp 88.53% <96.15%> (+0.39%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants