-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Check for failures in parseFile(), perf events tweaks #84
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martinus
reviewed
Feb 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I've got one note, other than that all is good
Check for failures when opening/reading the CPU frequency related sysfs files, to avoid needless warning messages. Note that if `scaling_min_freq` and `scaling_max_freq` both fail, then `minFreq` and `maxFreq` will be zeroes and no warning is generated.
Not all platforms support the reference cycles, so fallback to the cycle counter, it's better than nothing.
The mixed order of HW and SW events causes EINVAL failures from some of the perf_event_open() syscalls in one embedded device with 4.14 kernel. Fixed by adding all the HW events first, then the SW events.
cj-tommi-rantala
force-pushed
the
perf-events
branch
from
February 6, 2023 06:49
17cfd0a
to
d9ffe94
Compare
Awesome, thanks! |
fanquake
added a commit
to bitcoin-core/gui
that referenced
this pull request
Nov 16, 2023
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan) Pull request description: The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11. Other changes from the release notes: * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84 * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87 * removed the link by martinus in martinus/nanobench#89 * Lots of minor cleanups by martinus in martinus/nanobench#85 * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90 ACKs for top commit: fanquake: ACK fe434a4 - have not tested. Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Oct 24, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan) Pull request description: The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11. Other changes from the release notes: * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84 * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87 * removed the link by martinus in martinus/nanobench#89 * Lots of minor cleanups by martinus in martinus/nanobench#85 * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90 ACKs for top commit: fanquake: ACK fe434a4 - have not tested. Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Oct 24, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan) Pull request description: The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11. Other changes from the release notes: * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84 * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87 * removed the link by martinus in martinus/nanobench#89 * Lots of minor cleanups by martinus in martinus/nanobench#85 * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90 ACKs for top commit: fanquake: ACK fe434a4 - have not tested. Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Oct 24, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan) Pull request description: The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11. Other changes from the release notes: * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84 * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87 * removed the link by martinus in martinus/nanobench#89 * Lots of minor cleanups by martinus in martinus/nanobench#85 * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90 ACKs for top commit: fanquake: ACK fe434a4 - have not tested. Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Oct 25, 2024
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan) Pull request description: The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11. Other changes from the release notes: * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84 * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87 * removed the link by martinus in martinus/nanobench#89 * Lots of minor cleanups by martinus in martinus/nanobench#85 * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90 ACKs for top commit: fanquake: ACK fe434a4 - have not tested. Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check for failures when opening/reading any of the CPU frequency related sysfs files, to avoid needless warning messages.
Plus couple tweaks to the perf events:
PERF_COUNT_HW_CPU_CYCLES
, for example my laptop with AMD Ryzen CPU doesn't have the reference cycles event.