perf tools: Recalc total periods using top-level entries in hierarchy