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 7: Add instr count to tools #5721

Merged
merged 4 commits into from
Nov 9, 2022

Conversation

derekbruening
Copy link
Contributor

Adds a new memref_stream_t interface class which provides the record and instruction count to drmemtrace analysis tools. A pointer to this interface is passed to new extended-argument versions of analysis_tool_t's initialize() and parallel_shard_init() functions, which are now what is called by the analyzer. The base class implementation of these new functions simply calls the old versions, which are now deprecated but will continue to work.

This new interface is not just for convenience: the tool itself cannot accurately count when the reader skips over records, as will happen with seeking. The counting must be done in the reader. (If the tool indeed wants to count only records/instrs that it actually sees, it can continue using its own counters.)

Updates the view tool to use the new interface to obtain the record ordinal, replacing its own counter. The tool is expanded to print a new column with the instruction ordinal. The view tool test is updated along with example output in the docs.

Issue: #5538

Adds a new memref_stream_t interface class which provides the record
and instruction count to drmemtrace analysis tools.  A pointer to this
interface is passed to new extended-argument versions of
analysis_tool_t's initialize() and parallel_shard_init() functions,
which are now what is called by the analyzer.  The base class
implementation of these new functions simply calls the old versions,
which are now deprecated but will continue to work.

This new interface is not just for convenience: the tool itself cannot
accurately count when the reader skips over records, as will happen
with seeking.  The counting must be done in the reader.  (If the tool
indeed wants to count only records/instrs that it actually sees, it
can continue using its own counters.)

Updates the view tool to use the new interface to obtain the record
ordinal, replacing its own counter.  The tool is expanded to print a
new column with the instruction ordinal.  The view tool test is
updated along with example output in the docs.

Issue: #5538
…/stream/; Fix phys test output; Add to release notes
clients/drcachesim/analysis_tool.h Outdated Show resolved Hide resolved
clients/drcachesim/common/memref_stream.h Outdated Show resolved Hide resolved
Add discussion of other options, to be added to the commit descr too:

 We had considered other avenues for analysis_tool_t to obtain things like
 the record and instruction ordinals within the stream, in the presence of
 skipping: we could add fields to memref but we'd either have to append
 and have them at different offsets for each type or we'd have to break
 compatbility to prepend every time we added more; or we could add parameters
 to process_memref().  Passing an interface to the init routines seems
 the simplest and most flexible.
@derekbruening
Copy link
Contributor Author

a64 failure is windows-zlib #5493

@derekbruening
Copy link
Contributor Author

run arm tests

1 similar comment
@derekbruening
Copy link
Contributor Author

run arm tests

@derekbruening
Copy link
Contributor Author

Hit an invariant check failure on chunk instr counts: this was hit once before on a64 and I couldn't reproduce it. Filed #5724 now.

@derekbruening
Copy link
Contributor Author

run arm tests

@derekbruening
Copy link
Contributor Author

Failed again on a64 invariant_checker...yet when I log in to the machine and run the test in a loop it passes every time. Given that it failed once before this PR and passed in earlier checks I am convinced it is not related to this PR itself.

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