rangeInfo.setTraceIndex(traceIndex.index);
combineContiguousSimilarRanges();
+
+ if (pass != FirstPass) {
+ auto& allocation = findAllocation(traceIndex);
+
+ assert(allocation.traceIndex == traceIndex);
+
+ handleTotalCostUpdate();
+ }
} else if (reader.mode() == '/') {
uint64_t length, ptr;
}
}
}
+
+ handleTotalCostUpdate();
} else if (reader.mode() == 'k') {
if (!isSmapsChunkInProcess) {
cerr << "wrong trace format (smaps data outside of smaps chunk)" << endl;
allocation.malloc.allocated += info.size;
++allocation.malloc.allocations;
+ handleTotalCostUpdate();
handleAllocation(info, allocationIndex);
}
virtual ~AccumulatedTraceData() = default;
virtual void handleTimeStamp(int64_t oldStamp, int64_t newStamp) = 0;
+ virtual void handleTotalCostUpdate() = 0;
virtual void handleAllocation(const AllocationInfo& info, const AllocationIndex index) = 0;
virtual void handleDebuggee(const char* command) = 0;
temporaryChartData.rows << temporary;
}
- void handleAllocation(const AllocationInfo& info, const AllocationIndex index)
+ void handleTotalCostUpdate()
{
maxConsumedSinceLastTimeStamp = max(maxConsumedSinceLastTimeStamp, totalCost.getDisplay()->leaked);
+ }
+ void handleAllocation(const AllocationInfo& info, const AllocationIndex index)
+ {
if (index.index == allocationInfoCounter.size()) {
allocationInfoCounter.push_back({info, 1});
} else {
}
}
+ void handleTotalCostUpdate()
+ {
+ }
+
void handleAllocation(const AllocationInfo& info, const AllocationIndex /*index*/) override
{
if (printHistogram) {