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#5538 memtrace seek, part 8: Add skip_thread_instructions() #5731

Merged
merged 6 commits into from
Nov 11, 2022

Conversation

derekbruening
Copy link
Contributor

Adds a new skip_instructions() reader iterator interface. It is a linear walk for every type of reader except a chunked zipfile walking a single thread.

Adds a drcachesim command line option -skip_instrs which triggers the analyzer to skip from the start before passing anything to the tool.

Refactors the reader_t++ to provide a process_input_entry to update state while skipping.

Adds a unit test with an added trace file with a small chunk size. The test checks the view output for every skip value from 0 to over double the chunk size.

Leaves several pieces for future work:

  • Recording the record count in each chunk so we have an accurate count after skipping.
  • Presenting global headers skipped over as memtrace_stream_t values that tools can query.
  • Reading the schedule files for serial skipping (or the planned cpu iterator and skipping).
  • Repeating the timestamp+cpu for non-zipfile skipping.

Issue: #5538

Adds a new skip_instructions() reader iterator interface.  It is a
linear walk for every type of reader except a chunked zipfile walking
a single thread.

Adds a drcachesim command line option -skip_instrs which triggers the
analyzer to skip from the start before passing anything to the tool.

Refactors the reader_t++ to provide a process_input_entry to update
state while skipping.

Adds a unit test with an added trace file with a small chunk size.
The test checks the view output for every skip value from 0 to over
double the chunk size.

Leaves several pieces for future work:
+ Recording the record count in each chunk so we have an accurate
  count after skipping.
+ Presenting global headers skipped over as memtrace_stream_t values
  that tools can query.
+ Reading the schedule files for serial skipping (or the planned cpu
  iterator and skipping).
+ Repeating the timestamp+cpu for non-zipfile skipping.

Issue: #5538
@derekbruening
Copy link
Contributor Author

I am not understanding how my code here caused these OSX format string warnings: I thought maybe they upgraded the OSX compiler, but your PR #5711 isn't hitting these, right? I tried to fix thinking the APPLE_ define that's in there was incorrectly requesting long long, but the warning claims the type is long long: but it's uint64_t and size_t for the two things being printed. Going ahead and asking for a review as maybe you can see what I'm missing, or maybe you did hit this in your PR's?

@derekbruening
Copy link
Contributor Author

I am not understanding how my code here caused these OSX format string warnings

I removed the dr_api.h from skip_unit_tests.cpp which was the cause as it turns out: it was only the include from that file that hit these. I'll leave the PRIx64 change as that seems an improvement.

@derekbruening
Copy link
Contributor Author

a64 run in the latest is #5493

clients/drcachesim/analyzer.h Show resolved Hide resolved
clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/reader/reader.cpp Outdated Show resolved Hide resolved
clients/drcachesim/reader/reader.h Show resolved Hide resolved
clients/drcachesim/tests/skip_unit_tests.cpp Show resolved Hide resolved
clients/drcachesim/reader/reader.cpp Show resolved Hide resolved
clients/drcachesim/tests/skip_unit_tests.cpp Show resolved Hide resolved
@derekbruening
Copy link
Contributor Author

arm failed on linux.signal0101 which is #5167

@derekbruening derekbruening merged commit 2c81eb8 into master Nov 11, 2022
@derekbruening derekbruening deleted the i5538-seek branch November 11, 2022 21:43
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