Skip to content

feat(ctrace): preserve DWT address offset widths - #2594

Open
thorstendb-ARM wants to merge 1 commit into
mainfrom
dev-ctrace-dwt-address
Open

feat(ctrace): preserve DWT address offset widths#2594
thorstendb-ARM wants to merge 1 commit into
mainfrom
dev-ctrace-dwt-address

Conversation

@thorstendb-ARM

Copy link
Copy Markdown
Contributor

Summary

Preserve the original 1-, 2-, or 4-byte width of DWT Data Trace Address packets.

Changes

  • accept 1-, 2-, and 4-byte DWT address-offset payloads
  • retain the raw value together with its encoded width
  • keep the CSV column name offset and format values using their original width
  • encode CTF offsets as compact none/u8/u16/u32 variants
  • keep offset values available as numeric scalars in Trace Compass
  • encode optional PCs without reserving four bytes when absent
  • add decoder, CSV, CTF metadata, encoder, and Trace Compass XML tests

Examples:

  • 1 byte: 0x58
  • 2 bytes: 0x7858
  • 4 bytes: 0x20007858

This intentionally preserves the address fragment received from the trace stream. It does not reconstruct an address using DWT_COMP.

Validation

  • Release unit tests passed
  • Release integration tests passed
  • Debug/coverage unit and integration tests passed
  • Generated CTF metadata and streams were successfully read with Babeltrace

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

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.76543% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.63%. Comparing base (66cb607) to head (d206246).

Files with missing lines Patch % Lines
...ls/ctrace/src/output/ctf/TraceCompassXmlWriter.cpp 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2594      +/-   ##
==========================================
+ Coverage   72.58%   72.63%   +0.04%     
==========================================
  Files         185      185              
  Lines       30602    30652      +50     
  Branches    18009    18036      +27     
==========================================
+ Hits        22213    22263      +50     
  Misses       6080     6080              
  Partials     2309     2309              
Flag Coverage Δ
ctrace-cov 99.79% <98.76%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
tools/ctrace/src/decode/DwtPacketDecoder.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/model/TraceEvent.h 100.00% <100.00%> (ø)
tools/ctrace/src/output/csv/CsvRowMapper.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/output/ctf/CtfEncoder.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/output/ctf/CtfMetadataWriter.cpp 100.00% <100.00%> (ø)
tools/ctrace/src/output/ctf/CtfSchema.h 100.00% <100.00%> (ø)
...ls/ctrace/src/output/ctf/TraceCompassXmlWriter.cpp 98.88% <87.50%> (+0.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Test Results

  4 files    4 suites   2s ⏱️
207 tests 207 ✅ 0 💤 0 ❌
414 runs  407 ✅ 7 💤 0 ❌

Results for commit d206246.

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.

1 participant