Skip to content

Update to the latest internal version - #201

Merged
gmarin13 merged 4 commits into
masterfrom
copybara_staging
Aug 11, 2026
Merged

Update to the latest internal version#201
gmarin13 merged 4 commits into
masterfrom
copybara_staging

Conversation

@s-kanev

@s-kanev s-kanev commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Quincunx271 and others added 4 commits August 10, 2026 16:02
…w buffers.

ARM SPE traces are parsed using `ArmSpeDecoder`. Currently, it takes a single contiguous `std::string_view` as input, which assumes the entire trace buffer is contiguous in memory.

This change modifies `ArmSpeDecoder` to take a non-contiguous buffer (pointer to multiple `std::string_view` segments and size) as input by using C++17 array-reference template deduction constructors. A helper class `SegmentedBuffer` is implemented to abstract multiple non-contiguous `string_view` buffers as a single contiguous stream. It provides indexing (`operator[]`), safe multicycle chunk copies (`ReadBytes`), and pointer resolution (`GetPointer`) for alignment calculation.

With these changes, `ArmSpeDecoder` handles non-contiguous inputs seamlessly across boundary limits of individual segments. This is backwards compatible with single `string_view` traces, which are implicitly wrapped.

The decoder uses view-type containers that don't own the input memory and the
decoder doesn't make a copy of the data to avoid heap allocations and make it
compatible with interrupt handlers.

PiperOrigin-RevId: 956124896
@s-kanev
s-kanev requested a review from gmarin13 August 10, 2026 23:20
@gmarin13
gmarin13 merged commit 80c1433 into master Aug 11, 2026
9 checks passed
@gmarin13
gmarin13 deleted the copybara_staging branch August 11, 2026 04:32
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.

3 participants