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

Add perf event support #315

Merged
merged 32 commits into from
Jun 26, 2021
Merged

Add perf event support #315

merged 32 commits into from
Jun 26, 2021

Conversation

caizixian
Copy link
Member

@caizixian caizixian commented May 14, 2021

This PR supports measuring perf event for work packets.

The added code is guarded behind a feature perf due to an upstream bug in bindgen.
rust-lang/rust-bindgen#1538
rust-lang/rust#59154

@caizixian caizixian reopened this May 18, 2021
@caizixian caizixian closed this May 18, 2021
@caizixian caizixian deleted the perf-event branch May 18, 2021 08:59
@caizixian caizixian restored the perf-event branch May 18, 2021 09:02
@caizixian caizixian reopened this May 18, 2021
@caizixian caizixian self-assigned this May 20, 2021
caizixian added a commit that referenced this pull request May 28, 2021
This PR refactors work-packet level statistics collection.
Work packet execution time measuring was hardcoded. It's now abstracted through a WorkCounter trait interface.
This PR also makes #315 easier.
k-sareen pushed a commit to k-sareen/mmtk-core that referenced this pull request Jun 10, 2021
This PR refactors work-packet level statistics collection.
Work packet execution time measuring was hardcoded. It's now abstracted through a WorkCounter trait interface.
This PR also makes mmtk#315 easier.
@caizixian
Copy link
Member Author

@caizixian caizixian marked this pull request as ready for review June 13, 2021 05:39
@k-sareen
Copy link
Collaborator

k-sareen commented Jun 14, 2021

EDIT: Nvm, the issue is that Intel CPUs do not have as many performance counters as AMD CPUs. I should I realized the issue from the comment at the assertion

Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest 1. creating a new type for PerfEventOptions, and use that in the Options rather than using a String, and 2. getting rid of the PERF_EVENTS global.

Cargo.toml Outdated Show resolved Hide resolved
src/scheduler/stat.rs Outdated Show resolved Hide resolved
src/util/statistics/stats.rs Show resolved Hide resolved
src/util/statistics/stats.rs Outdated Show resolved Hide resolved
src/memory_manager.rs Outdated Show resolved Hide resolved
src/scheduler/mod.rs Outdated Show resolved Hide resolved
src/scheduler/stat.rs Outdated Show resolved Hide resolved
@qinsoon qinsoon added the PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) label Jun 26, 2021
@qinsoon qinsoon merged commit 9d7305e into master Jun 26, 2021
@qinsoon qinsoon deleted the perf-event branch June 26, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants