fix(ctrace): support PC sampling status markers - #2629
Conversation
Recognize the Armv8-M trace-prohibited marker and preserve the distinct PC, sleep, and prohibited states through CSV and CTF output. Add PC_SAMPLE_PROHIBITED without changing the existing PC_SAMPLE wire layout. Close sleep state at the marker and omit empty Trace Compass XML analyses. Cover SWO and formatted TB decoding, output filters, negative payload cases, consumer compatibility, and source-line coverage. Document the event schema and Trace Compass acceptance.
Test Results 6 files + 1 6 suites - 33 6s ⏱️ - 3m 40s Results for commit 749de96. ± Comparison against base commit 16b8fe1. This pull request removes 185 and adds 392 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
@JonatanAntoni , could you please run a copilot review? |
jreineckearm
left a comment
There was a problem hiding this comment.
LGTM, cannot manually test though as I don't have reproducers for the special PC sample packets.
Please see some comments, can be addressed in following PRs if deemed worthy.
Distinguish four-byte PC zero from the one-byte sleep marker in decoder, CSV and pipeline tests. Remove duplicate marker documentation and exclude Markdown from fixture checksums while retaining full test-data inventory validation. Correct the outdated CSV address-column specification note.
jreineckearm
left a comment
There was a problem hiding this comment.
Thanks for the updates, good to merge.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2629 +/- ##
==========================================
+ Coverage 74.48% 74.51% +0.02%
==========================================
Files 197 197
Lines 32524 32562 +38
Branches 19018 19034 +16
==========================================
+ Hits 24224 24262 +38
+ Misses 6000 5997 -3
- Partials 2300 2303 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Preserve TB byte-skip diagnostics while incorporating PC-sampling markers from #2629. Resolve fixture inventory, route-selection test and documentation conflicts. Verify the marker-only CSV output including NULL-source padding annotations and remove obsolete marker limitations.
Fixes
0xFFasTrace prohibited, not a decoder error.CPU SleepingCSV note for the one-byte0x00marker, following thePC-sampling marker specification.
stateProviderwithout graphical content.Changes
PC addresses, including
0x000000FF; unsupported payloads remain errors. Arbitrary raw0xFFbytes are not markers.pcsampleselection. CSV leaves the PC column empty for markersand writes the specified note.
PC_SAMPLE_PROHIBITED(ID 10) with the common sample-quality fields. The existingPC_SAMPLEbinarylayout, event IDs, and profile version remain unchanged; its state field still determines a zero-or-one PC array.
duration. Omit companion XML when no graphical topics remain, remove stale XML, and retain the CTF event table.
Babeltrace consumer check, and documentation of the schema and Trace Compass acceptance.
Scope is limited to ctrace. No OpenCSD dependency or shared workflow changes.
Validation
exactly
[3, 6)microseconds. Marker-only input retains its table event, emits no empty XML or graphical view, andremoves stale XML. Testing used an isolated server instance.
git diff --checkpassed.Checklist