GP-6454 more TaskMonitor'ing during GccExceptionAnalyzer

This commit is contained in:
dev747368
2026-02-18 00:26:17 +00:00
parent da798dfea6
commit f5bc8a800e

View File

@@ -175,18 +175,15 @@ public class GccExceptionAnalyzer extends AbstractAnalyzer {
List<RegionDescriptor> regions = ehframeSection.analyze(fdeTableCount);
AddressSet ehProtected = new AddressSet();
monitor.initialize(getCallSiteRecordCount(regions), "Marking up Call Site records");
for (RegionDescriptor region : regions) {
monitor.checkCancelled();
ehProtected.add(region.getRange());
LSDACallSiteTable callSiteTable = region.getCallSiteTable();
if (callSiteTable != null) {
// Process this table's call site records.
for (LSDACallSiteRecord cs : callSiteTable.getCallSiteRecords()) {
monitor.checkCancelled();
monitor.increment();
processCallSiteRecord(program, ehProtected, region, cs);
}
}
@@ -199,6 +196,17 @@ public class GccExceptionAnalyzer extends AbstractAnalyzer {
}
}
private int getCallSiteRecordCount(List<RegionDescriptor> regions) {
int total = 0;
for (RegionDescriptor region : regions) {
LSDACallSiteTable callSiteTable = region.getCallSiteTable();
if (callSiteTable != null) {
total += callSiteTable.getCallSiteRecords().size();
}
}
return total;
}
private void processCallSiteRecord(Program program, AddressSet ehProtected,
RegionDescriptor region, LSDACallSiteRecord cs) {
AddressRange callSite = cs.getCallSite();