diff --git a/src/jrd/RuntimeStatistics.cpp b/src/jrd/RuntimeStatistics.cpp index 15797e896a..d5f3063e1b 100644 --- a/src/jrd/RuntimeStatistics.cpp +++ b/src/jrd/RuntimeStatistics.cpp @@ -44,11 +44,9 @@ void RuntimeStatistics::setParent(RuntimeStatistics* p) void RuntimeStatistics::bumpValue(size_t index) { - fb_assert(index < values.getCount()); - values[index]++; - - if (parent) { - parent->bumpValue(index); + for (RuntimeStatistics* stats = this; stats; stats = stats->parent) { + fb_assert(index < stats->values.getCount()); + stats->values[index]++; } }