-
Notifications
You must be signed in to change notification settings - Fork 5
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
Report function alignment accuracy #59
Conversation
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.
Looks great!
reccmp/tools/asmcmp.py
Outdated
@@ -322,15 +332,20 @@ def main(): | |||
|
|||
implemented_funcs = function_count | |||
|
|||
# Substitute an alternate value for the total number of functions in the file |
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.
I like that you added multiple explanations! How about Substitute an alternate value for the total number of functions in the target (e.g. to account for functions that have not been stubbed yet but have been counted by some analysis tool like Ghidra)? Or have I misunderstood the purpose of this argument?
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.
No, that's correct. I'll expand the comment.
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.
While we're here, should this really be function_count = max(function_count, int(args.total))
to prevent exceeding 100% accuracy?
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.
Yes 👍
reccmp/tools/asmcmp.py
Outdated
if args.total: | ||
function_count = int(args.total) | ||
|
||
if function_count > 0: | ||
effective_accuracy = total_effective_accuracy / function_count * 100 | ||
actual_accuracy = total_accuracy / function_count * 100 | ||
alignment_accuracy = functions_aligned_count / function_count * 100 |
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.
Maybe alignment_percentage
? I think accuracy
is fine for the other variables since the code can be matched to a fractional degree, but alignment is binary
reccmp-reccmp
now reports how many functions have the same virtual address in both the original and recompiled binary.For example:
Should we add this to SVG output also?