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

Doc Improvements #24

Open
jayanderson opened this issue Jul 11, 2016 · 1 comment
Open

Doc Improvements #24

jayanderson opened this issue Jul 11, 2016 · 1 comment

Comments

@jayanderson
Copy link

Answering these questions will probably just need doc improvements rather than other fixes, but I'm not sure so here goes:

  • Using cargo profiler callgrindwhich executable is run?
  • How does this work with cargo bench? Can I run cargo profiler --bench callgrind (or something like that) to get profile stats for the different benchmarks? For now I've been creating a main.rs building that (with debug symbols) and then using cargo profiler callgrind -n 20 --bin ./target/release/executable_name. I swap out the contents of main with my benchmarks to get results. This seems suboptimal. I'm probably missing something.
  • It's probably worth calling out specifically that -n <count> limits the shown instructions. That wasn't immediately clear.

Thanks.

@MagaTailor
Copy link

MagaTailor commented Jul 13, 2016

The profiled binary comes from the build command.

Normally, rust benchmarks are separate binaries running with or without the --bench flag. This means, at least for now, you can profile benchmarks using the --bin flag (optionally with command line arguments via --)

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