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#5994 opcode_mix, part1: add categories to opcode_mix output #6512

Merged
merged 36 commits into from
Feb 14, 2024
Merged

i#5994 opcode_mix, part1: add categories to opcode_mix output #6512

merged 36 commits into from
Feb 14, 2024

Conversation

edeiana
Copy link
Contributor

@edeiana edeiana commented Dec 17, 2023

Groups instructions that belong to the same categories together, and prints (to std::cerr) a count of them at the end of opcode counts.

Issue: #5994

Groups instructions that belong to the same categories together,
and prints (to std::cerr) a count of them at the end of opcode counts.

Issue: #5994
Copy link
Contributor

@derekbruening derekbruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing! I have some suggestions.

clients/drcachesim/tools/opcode_mix.cpp Outdated Show resolved Hide resolved
core/ir/instr_api.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.h Show resolved Hide resolved
Copy link
Contributor

@derekbruening derekbruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, but I had a few more suggestions.

clients/drcachesim/tools/opcode_mix.h Outdated Show resolved Hide resolved
core/ir/instr_api.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@derekbruening derekbruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more requests. (Sorry, not trying to "move the goalposts": should have put these in the first round of reviews.)

core/ir/instr_shared.c Show resolved Hide resolved
core/ir/instr_shared.c Show resolved Hide resolved
32 bits (i.e., all possible categories an instruction can belong to).
This way we have single point of control in core/ir/instr_shared.c
to assign a name for a new category.
core/ir/instr_api.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.cpp Outdated Show resolved Hide resolved
core/ir/instr_shared.c Show resolved Hide resolved
suite/tests/api/drdecode_x86.c Outdated Show resolved Hide resolved
suite/tests/api/drdecode_x86.c Outdated Show resolved Hide resolved
edeiana and others added 8 commits January 29, 2024 20:59
Moved run position after set() for unrelated opcode_mix test.
Enforced order on opcode and categories when printed for
consistency in expected output.
Undo tmate changes.
Only for x86_64 Linux, since the tested program is allasm_x86_64.
@edeiana
Copy link
Contributor Author

edeiana commented Feb 7, 2024

Test opcode_categories fixed.
It was in the wrong place in suite/tests/CMakeLists.txt.
However, a few (minor) things changed since last approval, so I'd like a second pair of eyes before merging into master.

clients/drcachesim/tools/opcode_mix.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.h Outdated Show resolved Hide resolved
clients/drcachesim/tools/opcode_mix.h Outdated Show resolved Hide resolved
core/ir/instr_shared.c Show resolved Hide resolved
suite/tests/api/drdecode_x86.c Outdated Show resolved Hide resolved
suite/tests/api/drdecode_x86.c Outdated Show resolved Hide resolved
@edeiana edeiana merged commit 4627576 into DynamoRIO:master Feb 14, 2024
16 checks passed
@edeiana edeiana deleted the i5994-category-opcode_mix branch February 14, 2024 22:11
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