-
Notifications
You must be signed in to change notification settings - Fork 573
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#7113 decode cache: Refactor view_t to use the new lib #7219
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactors the view_t to use the new decode_cache_t instead of duplicating the logic. Modifies decode_info_base_t::set_decode_info_derived to allow it to return the error string. This is useful for cases where the decode_info_t object encountered some 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. Issue: #7113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this sudden re-interpretation of OFFLINE_FILE_TYPE_DEFAULT as a sentinel that cannot happen in a real trace.
derekbruening
approved these changes
Jan 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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