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#2039 trace trim, part 3: Add nop mode to drmemtrace #5700

Merged
merged 4 commits into from
Oct 25, 2022

Conversation

derekbruening
Copy link
Contributor

Adds a new drbbdup mode to drmemtrace which performs zero instrumentation (except drwrap cleanup). This mode is used when attaching for the period prior to full control of all threads and when detaching prior to starting to let threads go native, to avoid uneven thread instrumentation during these incremental staggered processes. The mode is initially under an off-by-default new option -align_endpoints while drbbdup stability is being worked on (i#5686).

Threads that did nothing during the trace-mode period are now omitted from the trace.

Adds a test by adding 4 idle threads to burst_threads and ensuring they do not show up in the trace.

Alignment itself was tested manually by running larger applications and analyzing the timestamp ranges in the trace.

Fixes the burst_replace test to work properly with .zip output (the output regex still matched despite a printed error from raw2trace, it seems).

Timestamps during detach require further work as they inaccurately imply executing after tracing mode was turned off. The next part will address this issue.

Issue: #2039, #5686

Adds a new drbbdup mode to drmemtrace which performs zero
instrumentation (except drwrap cleanup).  This mode is used when
attaching for the period prior to full control of all threads and when
detaching prior to starting to let threads go native, to avoid uneven
thread instrumentation during these incremental staggered processes.
The mode is initially under an off-by-default new option
-align_endpoints while drbbdup stability is being worked on (i#5686).

Threads that did nothing during the trace-mode period are now omitted
from the trace.

Adds a test by adding 4 idle threads to burst_threads and ensuring
they do not show up in the trace.

Alignment itself was tested manually by running larger applications
and analyzing the timestamp ranges in the trace.

Fixes the burst_replace test to work properly with .zip output (the
output regex still matched despite a printed error from raw2trace, it
seems).

Timestamps during detach require further work as they inaccurately
imply executing after tracing mode was turned off.  The next part will
address this issue.

Issue: #2039, #5686
@derekbruening
Copy link
Contributor Author

The test for ignoring threads is proving difficult: locally it seemed to be working but it turns out to be non-det where the attach signal wakes up the idle threads and depending on timing we can see one instr (syscall to go back to wait state) which thwarts the ignore feature.

…e to attach timing while still expecting many threads to be omitted
clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tracer/output.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tracer/tracer.h Outdated Show resolved Hide resolved
clients/drcachesim/tracer/tracer.cpp Show resolved Hide resolved
clients/drcachesim/tracer/tracer.cpp Show resolved Hide resolved
@derekbruening
Copy link
Contributor Author

failure is Jenkins raw-zlib #5635

@derekbruening derekbruening merged commit df5ab9f into master Oct 25, 2022
@derekbruening derekbruening deleted the i2039-memtrace-nop-mode branch October 25, 2022 23:07
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