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

i#2708 trace discontinuity: add test, fix bugs found by test #2747

Merged
merged 2 commits into from
Dec 8, 2017

Conversation

derekbruening
Copy link
Contributor

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.
  • drcachesim's ifetch results are inflated from rep string expansion #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

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 derekbruening merged commit f9b6914 into master Dec 8, 2017
@derekbruening derekbruening deleted the i2638-trace-gaps-and-markers branch December 8, 2017 03:22
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.

[drmemtrace] record signal handler boundaries in traces
1 participant