Skip to content

Run cachegrind output through rustfilt #1043

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

Merged
merged 1 commit into from
Oct 3, 2021

Conversation

erikdesjardins
Copy link
Contributor

I have valgrind-3.16.1, which should be able to demangle Rust symbols (according to the changelog, support was added in 3.13.0), but it doesn't do a very good job...

e.g. cargo +nightly run --release --bin collector -- diff_local cachegrind --include helloworld --builds Opt --runs IncrUnchanged +3b3ce374d203445eb1d0dce50f4211f4aceb7db6 +20997f6ad81721542e9ef97bb2f58190903a34d8 outputs:

-10,848  ???:rustc_query_system::query::plumbing::incremental_verify_ich
 -6,532  ./string/../sysdeps/x86_64/strcmp.S:strcmp
  5,320  ???:_ZN18rustc_query_system5query8plumbing22incremental_verify_ich17h7b6e470314c3c592E
 -3,960  ???:llvm::PMDataManager::initializeAnalysisImpl(llvm::Pass*)
  3,945  ???:llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)
  2,792  ???:_ZN18rustc_query_system5query8plumbing22incremental_verify_ich17hd69396997e117d33E
  2,736  ???:_ZN18rustc_query_system5query8plumbing22incremental_verify_ich17h6c9f4a8f7833e3a5E
...

(with rustfilt the incremental_verify_ich clones get demangled and they cancel out)

@Mark-Simulacrum
Copy link
Member

Yeah, I've seen the same as well. Not sure what is up with cachegrind, but seems reasonable to just patch over it.

@Mark-Simulacrum Mark-Simulacrum merged commit f68da5c into rust-lang:master Oct 3, 2021
@erikdesjardins erikdesjardins deleted the filt branch October 3, 2021 04:18
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

Successfully merging this pull request may close these issues.

2 participants