-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Branch Miss Analysis #26
Comments
While maybe not as accurate as See: https://adamsitnik.com/Hardware-Counters-Diagnoser/ AddHardwareCounters(HardwareCounter.BranchMispredictions, HardwareCounter.CacheMisses); Bartosz Adamczewski on Twitter gave some good advice for using it:
Example of it working in the Basic Benchmark: May leave this open until I can work out an easier way of running the benchmark as an admin directly from VS (sometimes though, not running as an admin all the time in case it interferes with anything else). |
Perf counters and virtualization are a special pain in this world. Between what your specific CPU supports under virtualization, what WSL2 (I assume v1 is out of scope) or other VMs support... It's a bit of a mess, and I, for one, have mostly refrained from using it, simply dropping to linux and using it's perf tool with the proper environment vars. What I mostly appreciate about perf is that it's very friendly for explortion, and there's a large body of knowledge about what every counter does, compared to the limited amount of information and coverage provided by ETW. Specifically for the counter you mention, I don't think there is a problem with ETW. |
Similar to how damageboy does in their blog post for sorting, it would be useful to track branch misses etc with the same tool -
perf
, a program on Linux.This is how damageboy called it:
Does
perf
work well in WSL? What exactly do I need the example program to do to be compatible with it?This could be a useful utility to make sure we are optimised with our branching logic and whether there are any gains by optimising this further.
The text was updated successfully, but these errors were encountered: