Skip to content

Add DhatCopy as a profiler. #1192

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
Mar 8, 2022
Merged

Conversation

nnethercote
Copy link
Contributor

This is DHAT running in "copy mode", which profiles memcpy/memmove
calls instead of allocations. I have found it useful numerous times but
I've always had to invoke it for rustc-perf by just modifying the
existing DHAT invocation. Time to provide an easier way of doing it.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though seems like CI is too old for the copy mode to be available. Not sure what we should do about that; it seems like we're using latest Ubuntu LTS currently. One approach might be to run the test in Docker in a more recent Ubuntu, but that seems like a lot of hassle. I do think we should try to add a test of some kind though...

@nnethercote
Copy link
Contributor Author

I'm on Ubuntu 21.10 and I have Valgrind 3.17, which works with --mode=copy. Is there a way to install a package from a newer distro? I just did some googling and it seems... complicated.

The easy thing here is to just comment out the test and add a FIXME comment. We are already testing vanilla DHAT, so we're not really losing that much by not testing DHAT-copy...

@Mark-Simulacrum
Copy link
Member

Yeah, that seems OK for now. 22.04 should be out soon and we can bump to that once GitHub upgrades, which should allow uncommenting the extra test case.

This is DHAT running in "copy mode", which profiles `memcpy`/`memmove`
calls instead of allocations. I have found it useful numerous times but
I've always had to invoke it for rustc-perf by just modifying the
existing DHAT invocation. Time to provide an easier way of doing it.
@nnethercote nnethercote merged commit f4d787b into rust-lang:master Mar 8, 2022
@nnethercote nnethercote deleted the add-dhat-copy branch March 8, 2022 00:08
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