Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sampling counter time scales #33

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

jrmadsen
Copy link
Collaborator

This PR fixes some issues with the timestamps of samples being before started before and after the "main" in perfetto. This pseudo-bug was introduced in PR #30

  • All perfetto trace events have "begin_ns" and "end_ns" debug fields
  • data for thread start and end timestamp in pthread_create_gotcha
  • discard samples outside of thread start and end timestamps
  • rename "CPU User CPU Time" perfetto counter to "CPU User Time"
  • rename "CPU Kernel CPU Time" perfetto counter to "CPU Kernel Time"
  • ensure CPU system samples in perfetto are set to zero at end
  • backtrace uses comp::wall_clock record() for timestamps (consistency)
  • "Peak Memory Usage [Thread X] (S)" renamed to "Thread Peak Memory Usage [X] (S)"
  • "Context Switches [Thread X] (S)" renamed to "Thread Context Switches Usage [X] (S)"
  • "Page Faults [Thread X] (S)" renamed to "Thread Page Faults Usage [X] (S)"
  • "<PAPI_DESC> [Thread X] (S)" renamed to "Thread <PAPI_DESC> [X] (S)"

@jrmadsen jrmadsen added bug fix Fixes a bug perfetto Issue affects/involves perfetto features/capabilities sampling Statistical sampling via interrupts process sampling Background system-level sampling performed in background thread labels Jun 10, 2022
@jrmadsen jrmadsen force-pushed the fix-sampling-counter-time-scales branch from a3a90e8 to e5d5c12 Compare June 10, 2022 11:59
- All perfetto trace events have "begin_ns" and "end_ns" debug fields
- data for thread start and end timestamp in pthread_create_gotcha
- discard samples outside of thread start and end timestamps
- rename "CPU User CPU Time" perfetto counter to "CPU User Time"
- rename "CPU Kernel CPU Time" perfetto counter to "CPU Kernel Time"
- ensure CPU system samples in perfetto are set to zero at end
- backtrace uses comp::wall_clock record() for timestamps (consistency)
- "Peak Memory Usage [Thread X] (S)" renamed to "Thread Peak Memory Usage [X] (S)"
- "Context Switches [Thread X] (S)" renamed to "Thread Context Switches Usage [X] (S)"
- "Page Faults [Thread X] (S)" renamed to "Thread Page Faults Usage [X] (S)"
- "<PAPI_DESC> [Thread X] (S)" renamed to "Thread <PAPI_DESC> [X] (S)"
- samples
@jrmadsen jrmadsen force-pushed the fix-sampling-counter-time-scales branch from e5d5c12 to b7443a3 Compare June 10, 2022 12:00
@jrmadsen jrmadsen merged commit 90ab7a8 into ROCm:main Jun 10, 2022
@jrmadsen jrmadsen deleted the fix-sampling-counter-time-scales branch June 10, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fixes a bug perfetto Issue affects/involves perfetto features/capabilities process sampling Background system-level sampling performed in background thread sampling Statistical sampling via interrupts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant