Skip to content

Decode cpu-clock samples as stacktraces#373

Open
jeet-dekivadia wants to merge 1 commit into
janestreet:masterfrom
jeet-dekivadia:codex/parse-cpu-clock-samples
Open

Decode cpu-clock samples as stacktraces#373
jeet-dekivadia wants to merge 1 commit into
janestreet:masterfrom
jeet-dekivadia:codex/parse-cpu-clock-samples

Conversation

@jeet-dekivadia

Copy link
Copy Markdown

Summary

  • route cpu-clock perf events through the existing sampled stacktrace decoder
  • add expect coverage using a reported sampling-fallback frame

Why

When Intel PT is unavailable, perf records sampling fallback events as cpu-clock. Their payload has the same callstack shape as cycles, but the event-header decoder rejected the name before stacktrace parsing could run.

Validation

  • git diff --check
  • exercised the event-header pattern against the reported cpu-clock:uH line
  • added expect coverage for the sampled callstack path

Fixes #283
Fixes #311

Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
@jeet-dekivadia

Copy link
Copy Markdown
Author

I rechecked this today while it is waiting for review. The patch routes perf sampling fallback events named cpu-clock through the same stacktrace decoding path as the normal sampled events, instead of rejecting the header because the event name is not one of the hardware counters.

The regression is intentionally tied to the reported cpu-clock:uH header shape and keeps the callstack parsing behavior shared with the existing stacktrace decoder. DCO is green, and the PR has no red checks.

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.

"Unexpected event type when parsing perf output" with sampling mode Bug "(event_name cpu-clock)"

1 participant