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

Record instruction count across all threads created by the benched code #19

Open
rukai opened this issue Mar 8, 2022 · 2 comments
Open

Comments

@rukai
Copy link

rukai commented Mar 8, 2022

I think it should be possible because rustc is multithreaded and measures instruction counts for its benchmarks https://perf.rust-lang.org/?start=&end=&kind=raw&stat=instructions%3Au

@jbreitbart
Copy link
Owner

I have not checked this, but it should already be possible. Can you try to call inherit()[0] on your Builder? If that does not work for you, can you share the code that fails?

This crate is probably not easy to use if you do not know how perf works. I was thinking about providing reasonable defaults, but than I am not sure what user are actually looking for.

[0] https://gz.github.io/rust-perfcnt/perfcnt/linux/struct.PerfCounterBuilderLinux.html#method.inherit

@jbreitbart
Copy link
Owner

@rukai did that solve your problem?

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

No branches or pull requests

2 participants