Skip to content

ctrace initial development - #2548

Merged
thorstendb-ARM merged 38 commits into
mainfrom
ctrace-dev1
Aug 7, 2026
Merged

ctrace initial development#2548
thorstendb-ARM merged 38 commits into
mainfrom
ctrace-dev1

Conversation

@thorstendb-ARM

Copy link
Copy Markdown
Contributor

Implements

  • Adds the initial ctrace implementation for decoding SWO streams containing ITM and DWT data.
  • Provides CSV and CTF/Trace Compass output.
  • Includes unit and integration tests, documentation, and cross-platform build and release support.

Limitations

  • Trace Bus input, PMU events, event counters, and PC sampling are not supported in the initial release.

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).

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Test Results

 4 files   -    37   8 suites   - 117   8s ⏱️ - 18m 23s
49 tests  -   882  49 ✅  -   865  0 💤  - 17  0 ❌ ±0 
98 runs   - 1 903  98 ✅  - 1 852  0 💤  - 51  0 ❌ ±0 

Results for commit af656ec. ± Comparison against base commit fba299a.

This pull request removes 882 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.

Comment thread tools/ctrace/src/decode/OpenCsdErrorController.cpp Fixed
Comment thread tools/ctrace/src/output/OutputRequirements.cpp Fixed
Comment thread tools/ctrace/src/output/ctf/CtfMetadataWriter.cpp Fixed
Comment thread tools/ctrace/src/output/ctf/TraceCompassXmlWriter.cpp Fixed
Comment thread tools/ctrace/src/tracerun/YmlTraceRunConfigReader.cpp Fixed
Comment thread tools/ctrace/test/unit/src/cli/CliParserTests.cpp Fixed
Comment thread tools/ctrace/test/unit/src/output/OutputRequirementsTests.cpp Fixed
Comment thread tools/ctrace/test/unit/src/decode/OpenCsdPacketCollectorTests.cpp Fixed

@thorstendb-ARM thorstendb-ARM left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added unit tests

@jreineckearm jreineckearm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just had a look at the first few files in this PR (the GH workflows). You may want to review those first. I think some of them will impact more than ctrace.
Also, why do you make workflows sensitive to changes in subfolders of external? I don't think GitHub actions are clever enough to detect changes in git submodules. But I might be wrong.

Comment thread .github/workflows/ctrace.yml Outdated
Comment thread .github/workflows/ctrace.yml Outdated
Comment thread .github/workflows/ctrace.yml Outdated
Comment thread .github/workflows/ctrace.yml Outdated
Comment thread .github/workflows/ctrace.yml Outdated
Comment thread tools/ctrace/src/control/DecodeConsumers.cpp Outdated
Comment thread tools/ctrace/src/control/FileDecodeJob.cpp
Comment thread tools/ctrace/src/decode/CortexMStreamDecoder.cpp Outdated
Comment thread tools/ctrace/src/decode/DwtPacketDecoder.cpp Outdated
Comment thread tools/ctrace/src/decode/OpenCsdErrorController.cpp Outdated
@thorstendb-ARM thorstendb-ARM changed the title Ctrace dev1 Ctrace initial development Aug 3, 2026
@thorstendb-ARM thorstendb-ARM changed the title Ctrace initial development ctrace initial development Aug 3, 2026

@edriouk edriouk 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.

all ctrace* project files must have Header File directory => changes in CMakeLists.txt files are required:

SET(PROJMGR_HEADER_FILES ...

@edriouk edriouk 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.

All classes and their public methods must have DOXYGEN-style comments

@edriouk

edriouk commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

test/data folders contain *.license files. They probably should be removed.

Comment thread tools/ctrace/src/cli/CliParser.cpp Fixed
edriouk
edriouk previously approved these changes Aug 4, 2026

@edriouk edriouk 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.

LGTM

Simplify diagnostics and trace metadata handling, remove stale APIs and schema entries, and align output selection behavior.

Refresh platform test support, documentation, and release-facing validation.
Comment thread tools/ctrace/src/tracerun/CtraceRunMeta.cpp Fixed

@jreineckearm jreineckearm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Light-weight review of all but the ctrace test subfolder. See comments.
Overall massive improvement since initial push. No more systematic flaws like the LCOV excludes or use of #pragma once.

Comment thread .github/workflows/ctrace.yml Outdated
Comment thread tools/ctrace/cmake/dependencies/ConfigureOpenCSD.cmake Outdated
Comment thread tools/ctrace/docs/architecture.md
Comment thread tools/ctrace/src/decode/SaturatingArithmetic.h
Comment thread tools/ctrace/src/tracerun/TraceRunDiscovery.cpp
Comment thread tools/ctrace/src/tracerun/YmlTraceRunConfigReader.cpp
Comment thread tools/ctrace/README.md
Comment thread CMakeLists.txt Outdated
Comment thread LICENSE.md Outdated
Comment thread LICENSE.md Outdated
Comment thread tools/ctrace/test/integration/src/CtraceTestCommand.cmake Outdated
Comment thread tools/ctrace/test/unit/src/control/DecodeConsumersTests.cpp Outdated
Comment thread AGENTS.md Outdated
Comment thread LICENSE.md Outdated
@thorstendb-ARM
thorstendb-ARM requested a review from edriouk August 7, 2026 13:18

@jreineckearm jreineckearm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks, LGTM.
Feedback has been incorporated as requested.
More fixes and enhancements in smaller increments from here on.

@edriouk edriouk 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.

LGTM
I have pulled all recent changes, build and run unit tests on Windows locally.
All succeeded

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.13%. Comparing base (fba299a) to head (af656ec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2548      +/-   ##
==========================================
+ Coverage   68.34%   72.13%   +3.79%     
==========================================
  Files         141      185      +44     
  Lines       26511    30117    +3606     
  Branches    16022    17769    +1747     
==========================================
+ Hits        18119    21725    +3606     
+ Misses       6090     6087       -3     
- Partials     2302     2305       +3     
Flag Coverage Δ
buildmgr-cov 79.87% <ø> (ø)
ctrace-cov 100.00% <100.00%> (ø)
packchk-cov 69.81% <ø> (ø)
packgen-cov 82.02% <ø> (ø)
projmgr-cov 88.06% <ø> (ø)
svdconv-cov 46.82% <ø> (ø)

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

Files with missing lines Coverage Δ
tools/ctrace/src/CtraceMain.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/cli/CliParser.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/control/DecodeConsumers.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/control/FileDecodeJob.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/control/TraceDirectoryJob.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/decode/CortexMPostDecoder.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/decode/CortexMStreamDecoder.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/decode/DecodePipeline.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/decode/DecodePipeline.h 100.00% <100.00%> (ø)
tools/ctrace/src/decode/DwtPacketDecoder.cpp 100.00% <100.00%> (ø)
... and 35 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thorstendb-ARM
thorstendb-ARM merged commit 2593701 into main Aug 7, 2026
129 of 130 checks passed
@thorstendb-ARM
thorstendb-ARM deleted the ctrace-dev1 branch August 7, 2026 14:13
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