mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 23:17:03 +08:00
Merge remote-tracking branch 'origin/GP-3527_ghidra007_AutoVT_dupFunctionMatchSpeedup'
This commit is contained in:
+15
-1
@@ -464,13 +464,27 @@ public class AutoVersionTrackingTask extends Task {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if already matched or blocked skip it
|
||||||
|
if (match.getAssociation().getStatus() != VTAssociationStatus.AVAILABLE) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Get a set of related matches from the set of all matches. These all have the same
|
// Get a set of related matches from the set of all matches. These all have the same
|
||||||
// instructions as each other but not necessarily the same operands.
|
// instructions as each other but not necessarily the same operands.
|
||||||
Set<VTMatch> relatedMatches = getRelatedMatches(match, matches, monitor);
|
Set<VTMatch> relatedMatches = getRelatedMatches(match, matches, monitor);
|
||||||
|
|
||||||
// remove related matches from the set of matches to process next time
|
// remove related matches from the copy of set of matches which gets checked
|
||||||
|
// and skipped if not in the set
|
||||||
removeMatches(copyOfMatches, relatedMatches);
|
removeMatches(copyOfMatches, relatedMatches);
|
||||||
|
|
||||||
|
if (relatedMatches.size() > 20) {
|
||||||
|
Msg.debug(this, "Too many related matches to process this match set " +
|
||||||
|
match.getSourceAddress());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// remove any matches that have identical source functions - if more than one
|
// remove any matches that have identical source functions - if more than one
|
||||||
// with exactly the same instructions and operands then cannot determine a unique match
|
// with exactly the same instructions and operands then cannot determine a unique match
|
||||||
Set<Address> sourceAddresses = getSourceAddressesFromMatches(relatedMatches, monitor);
|
Set<Address> sourceAddresses = getSourceAddressesFromMatches(relatedMatches, monitor);
|
||||||
|
|||||||
Reference in New Issue
Block a user