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
Support better profiling in bench #2624
Comments
Thanks for the report! We've often thought that a specific workflow around profiling would be nice to have in Cargo, although a cross-platform story is pretty difficult unfortunately :( I suspect that this may best be done growing as a separate subcommand for now, and if it turns out well we can merge it back in. |
Great, sounds good! Will get on it and circle back soon. |
just started some work here: https://github.com/pegasos1/cargo-profiler Right now I plan on gathering information with multiple linux-based profiling tools, presenting info in most user-friendly way possible. Any other basic statistics we can easily implement. We can expand from there based on interest. Sound good? |
It would also be cool to be able to profile individual functions with #[profile] attribute |
Awesome! Sounds good to me! |
Hey Alex, check out the project so far: https://github.com/pegasos1/cargo-profiler I'm still improving some aspects of the code, but version 1 is almost complete. You can see some example output in the README. Actual output is colored. Let me know if you have any initial feedback. |
Nice! That looks pretty slick. You could even recommend I wonder if we can help out valgrind to demangle symbols wherever possible as well |
thanks! will add that in. Good idea. I'm pretty sure that just means removing "$*$" and everything past the last "::", but i'll have to make sure there aren't any weird edge cases. |
Do you know if those symbols are a result of valgrind or rustc? |
I believe they're all from the compiler, probably around impls and closures and such. |
first release! http://www.suchin.co/2016/05/11/Introducing-Cargo-Profiler/ |
While I feel we should make the workflow clearer for profiling, I'm not sure how we'd address the problem that users might want to use one of several profilers which also have different modes and OS support. |
I find myself jumping between cargo bench and valgrind/perf a lot. It would be great if bench supported better profiling.
If this is something that interests the team, would it be better to implement this as something that talks to existing profilers, or sandbox the code directly? Could start out with basic information like what's available in perf stat.
The text was updated successfully, but these errors were encountered: