-
Notifications
You must be signed in to change notification settings - Fork 571
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
Update memtrace analyzer docs and tools for skipped headers when fast-forwarding #7224
Comments
Though another way to look at this is that -skip_instrs asks for instrs to be skipped, not memrefs. And I think scheduler region_of_interests apply only to instrs, not memrefs. So maybe another possibility is that we provide the header entries regardless of the scheduler regions of interest? |
We discussed this while implementing the skip-instruction feature #5538 and decided to not duplicate any headers and to instead add stream API access in PR #5739 . The discussion included this: ** DONE should top headers in each thread be re-emitted at seek point if skip them (b/c start from 0, or b/c using serial or per-cpu iterator)? => no: user has to do linear walk if wants to read them (but reader has to do this too to get chunk size) Should the top headers be cached and re-emitted at the seek point if
=> Or, reader caches top headers and provides API to query. |
Fixes the opcode_mix tool to get the filetype from the memtrace_stream_t interface instead of the TRACE_MARKER_TYPE_FILETYPE marker memref which may not be seen if -skip_instrs is applied by the user. Adds a new unit test that runs the opcode_mix tool with -skip_instrs, which would fail because of an unseen filetype prior to this fix. Issue: #7224, #7113
Clarifies that the -{skip,sim,warmup}_refs options skip a count of trace records inside particular tools, rather than in the framework. Clarifies that the -skip_{instrs,to_timestamp} options skip over top-level markers, but their values are available from the stream API. Adds i#7230 TODO comments on fixing the -{sim,warmup}_refs options in the simulators to count marker records (or possibly to keep as is and update the docs). Issue: #7224, #7230
Fixes the opcode_mix tool to get the filetype from the memtrace_stream_t interface instead of the TRACE_MARKER_TYPE_FILETYPE marker memref which may not be seen if -skip_instrs is applied by the user. Modifies opcode_mix_t to use initialize_stream instead of initialize, to get the serial stream. Adds a new unit test that runs the opcode_mix tool with -skip_instrs, which would fail because of an unseen filetype prior to this fix. Augments decode_cache_t::init() documentation to suggest a reliable way to obtain the filetype. Issue: #7224, #7113
Refactors the view_t tool to use the new decode_cache_t instead of duplicating the instr decoding logic. Modifies decode_info_base_t::set_decode_info_derived to allow it to return the error string. This is useful for cases where there was an error during its operation, which is especially possible when used with a decode_cache_t with include_decoded_instr_ = false in which case the decode_info_t also performs the decoding on its own. Adds new tests to decode_cache_test to verify some related cases. Not adding a new release note for the API signature change as there was no intervening release since it was initially added. Also fixes the view_t logic to get filetype, which should be obtained from the memtrace_stream_t object instead of TRACE_MARKER_TYPE_FILETYPE to handle cases where the filetype marker is not seen by the tool because of analyzer options like -skip_instrs that skip over a certain initial part of the trace. Issue: #7113, #7224
Clarifies that the -{skip,sim,warmup}_refs options skip a count of trace records inside particular tools, rather than in the framework. Clarifies that the -skip_{instrs,to_timestamp} options skip over top-level markers, but their values are available from the stream API. Adds i#7230 TODO comments on fixing the -{sim,warmup}_refs options in the simulators to count marker records (or possibly to keep as is and update the docs). Issue: #7224, #7230
The drmemtrace scheduler allows the user to specify regions of interest in the trace.
dynamorio/clients/drcachesim/scheduler/scheduler.h
Line 271 in f14c76c
As documented, when this is specified, entries outside these regions are simply skipped. What is not documented explicitly, is that this may include the trace header entries, such as TRACE_MARKER_TYPE_FILETYPE.
Some trace analysis tools rely on seeing the TRACE_MARKER_TYPE_FILETYPE marker and fail if they don't see it, particularly opcode_mix. E.g.,
dynamorio/clients/drcachesim/tools/opcode_mix.cpp
Line 194 in f14c76c
This issue is to fix such tools and also improve documentation.
The text was updated successfully, but these errors were encountered: