rr icon indicating copy to clipboard operation
rr copied to clipboard

[discussions] rr everywhere

Open lwintermelon opened this issue 7 months ago • 4 comments

Can rr work if

  1. intel hybrid cores on KVM or hyper-v: It seems that PMU won't work if you are in KVM on intel hybrid cores, can anyone confirm that? @rocallahan I learned from your blog that you've built a new computer with an Intel hybrid-core processor. [added] I can confirm that PMU doesn't work on Intel hybrid cores in Hyper-V, nor does it work in VMware Workstation even for 11th-gen Intel CPUs that aren't hybrid cores.
  2. AMD Zen on hypervisor: the workaround may work on bare mental, but not for hypervisor like hyper-v.
  3. You can't get access to PMU: Don't worry, have you noticed rr.soft? I've tested it, and it passed 99% of the tests.

Summary: 1. and 2. , If you are on hypervisor with intel hybrid cores or AMD zen, or you are in VMware Workstation with newer intel cpus, you have trouble running rr.

lwintermelon avatar Jul 06 '25 12:07 lwintermelon

For 2: ... and as part of Hyper-V, also not on WSL2 (at least I've found no solution, including custom kernel builds)

3 looks interesting (haven't tried, do I understand it correctly that you need a GCC/Clang plugin to make it usable, either in general or for acceptable performance)?

Also for 3, from its README about merging this upstream:

The ability to run without CPU HW performance counters is a large feature patch and would require additional time and effort to get merged upstream. It also depends on whether rr maintainers want dynamic/static instrumentation in their codebase or wish to continue keeping rr purely HW performance counters based.

... so: Do rr maintainers accept dynamic/static instrumentation in their codebase?

GitMensch avatar Jul 07 '25 07:07 GitMensch

3 looks interesting (haven't tried, do I understand it correctly that you need a GCC/Clang plugin to make it usable, either in general or for acceptable performance)?

You don't require a GCC/Clang plugin to make it usable.

The plugin makes things a bit more robust as dynamic instrumentation is then not required. Try record/replaying without the use of a plugin first -- in most cases things should work fine. Reach for the plugin for enhanced robustness and if you are encountering issues with record/replay with dynamic instrumentation.

... so: Do rr maintainers accept dynamic/static instrumentation in their codebase?

I would very much love it if @rocallahan / @khuey accepted it in this repo. I don't think the code changes are very intrusive.

sidkshatriya avatar Jul 07 '25 07:07 sidkshatriya

Thanks for the information on the plugin.

I would very much love it if [the maintainers] accepted it in this repo. I don't think the code changes are very intrusive.

Then please create a PR to show and discuss the changes.

GitMensch avatar Jul 07 '25 07:07 GitMensch

Then please create a PR to show and discuss the changes.

The rr maintainers are aware of rr.soft and the broad strategy used to implement it.

It would take some time and effort to create a PR.

I would love for the maintainers to play around with rr.soft a bit (if they haven't already) and let me know they would like something like this in their code base. If so I can subsequently work on this.

sidkshatriya avatar Jul 07 '25 07:07 sidkshatriya