-
Notifications
You must be signed in to change notification settings - Fork 570
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
drcachesim's ifetch results are inflated from rep string expansion #2011
Comments
There's a bug here: a zero-iter rep loop ends up without any instruction fetch at all. |
Here's an example, found by a new trace invariants test for #2638 and #2708:
#2011 is what removed the ifetches. Should we add an instr entry after "zero:"?
|
Better to just move the current instru to the top of the bb. |
derekbruening
added a commit
that referenced
this issue
Dec 6, 2017
Adds a missing instruction fetch for zero-iteration rep string loops by moving the instruction instrumentation to the top of a rep string bb rather than prior to the single memory reference. The forthcoming trace_invariants continuous PC checks for #2708 will add an automated test for this. Fixes #2011
derekbruening
added a commit
that referenced
this issue
Dec 7, 2017
Extends the trace_invariants test from #2638 to ensure there's no discontinuity in control flow not indicated by a branch or a kernel xfer marker. Adds an online trace_invariants test. Switches the trace_invariants test to run pthreads.ptsig on UNIX, which is marked un-FLAKY, to test both threads and signals, and on winxfer on Windows. Fixes several issues found by this new test: + Adds TRACE_TYPE_INSTR_SYSENTER to mark the PC discontinuity from OP_sysenter. + Adds proper handling of a mid-bb fault in offline trace conversion by looking ahead after each memref to see whether there's a marker. + #2011 follow-up: fixes the zero-iter code from 2772b0b which it turns out only worked for offline traces. For online, the top-of-bb instr is jecxz, so the instr type and size were wrong. + Fixes pipe write splitting to avoid separating an instr from its bundle entries. + Avoids a marker for a thread init kernel xfer event on Windows. Fixes #2708
derekbruening
added a commit
that referenced
this issue
Dec 8, 2017
Extends the trace_invariants test from #2638 to ensure there's no discontinuity in control flow not indicated by a branch or a kernel xfer marker. Adds an online trace_invariants test. Switches the trace_invariants test to run pthreads.ptsig on UNIX, which is marked un-FLAKY, to test both threads and signals, and on winxfer on Windows. Fixes several issues found by this new test: + Adds TRACE_TYPE_INSTR_SYSENTER to mark the PC discontinuity from OP_sysenter. + Adds proper handling of a mid-bb fault in offline trace conversion by looking ahead after each memref to see whether there's a marker. + #2011 follow-up: fixes the zero-iter code from 2772b0b which it turns out only worked for offline traces. For online, the top-of-bb instr is jecxz, so the instr type and size were wrong. + Fixes pipe write splitting to avoid separating an instr from its bundle entries. + Avoids a marker for a thread init kernel xfer event on Windows. Fixes #2708
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working on #1729 I saw that offline had fewer instruction fetches than online:
That's a significant difference.
Tiny app is the same for both:
Diffing simple_app, online has many more *4bb is the difference.
Online has 4 or 5 *4bb before every *4ba.
It's rep stos:
drutil uses 2 different translations: everything's xl8 is +1 except the stos or movs itself:
Online is counting all those expanded instrs. I explicitly have code to not count them for offline. I'll address this by trying to do something similar for online.
The text was updated successfully, but these errors were encountered: