Skip to content

Commit

Permalink
Fix bug in computing aggregate profiler stats.
Browse files Browse the repository at this point in the history
In some cases, we'd inadvertently zero out partially-accumulated sums,
which in turn gave incorrect printed results.
  • Loading branch information
mmp committed Jan 12, 2017
1 parent bbcb086 commit b5e45e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void ReportProfilerResults(FILE *dest) {
s += ProfNames[b];
}
}
hierarchicalResults[s] = ps.count;
hierarchicalResults[s] += ps.count;

int nameIndex = Log2Int(ps.profilerState);
DCHECK_LT(nameIndex, NumProfCategories);
Expand Down

0 comments on commit b5e45e4

Please sign in to comment.