зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1306249 - Optimize SumChildTimes by only iterating children, r=jonco
--HG-- extra : rebase_source : 250b8992977a5c5a969c510d812694da8c0ade4e
This commit is contained in:
Родитель
2fbae55abc
Коммит
c389f7e9d7
|
@ -328,7 +328,8 @@ SumChildTimes(size_t phaseSlot, Phase phase, const Statistics::PhaseTimeTable ph
|
|||
{
|
||||
// Sum the contributions from single-parented children.
|
||||
int64_t total = 0;
|
||||
for (unsigned i = 0; i < PHASE_LIMIT; i++) {
|
||||
size_t depth = phaseExtra[phase].depth;
|
||||
for (unsigned i = phase + 1; i < PHASE_LIMIT && phaseExtra[i].depth > depth; i++) {
|
||||
if (phases[i].parent == phase)
|
||||
total += phaseTimes[phaseSlot][i];
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче