зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1177293 - Don't overcount samples when flattening recursion. r=jsantell
This commit is contained in:
Родитель
e8d20bd42c
Коммит
3f8566884e
|
@ -219,7 +219,8 @@ ThreadNode.prototype = {
|
||||||
|
|
||||||
// If we shouldn't flatten the current frame into the previous one, advance a
|
// If we shouldn't flatten the current frame into the previous one, advance a
|
||||||
// level in the call tree.
|
// level in the call tree.
|
||||||
if (!flattenRecursion || frameKey !== prevFrameKey) {
|
let shouldFlatten = flattenRecursion && frameKey === prevFrameKey;
|
||||||
|
if (!shouldFlatten) {
|
||||||
calls = prevCalls;
|
calls = prevCalls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +234,11 @@ ThreadNode.prototype = {
|
||||||
sampleTime, stringTable);
|
sampleTime, stringTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
frameNode.samples++;
|
|
||||||
|
// Don't overcount flattened recursive frames.
|
||||||
|
if (!shouldFlatten) {
|
||||||
|
frameNode.samples++;
|
||||||
|
}
|
||||||
|
|
||||||
prevFrameKey = frameKey;
|
prevFrameKey = frameKey;
|
||||||
prevCalls = frameNode.calls;
|
prevCalls = frameNode.calls;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче