DevTools: Fix self-time calculation when filtering in Bottom-Up tab
Previously we applied the filtering from the user (_textFilter) before we calculated the self-time for each of the nodes. The way this calculation works is that each node is assigned the entire time of its duration, and then child nodes 'steal' self-time from their parent, and the parent is left with the remaining non-stolen self-time. If we filter before calculating time, child nodes won't steal self-time from their parents, and the self-time for the parents will be wrong as seen in the bug report. This change includes all nodes (ignoring _textFilter) in the calculation step and then filters out the nodes from the final data structure. Bug: chromium:970825 Change-Id: I99655877e46671c4e2beb944116aa57eab69b8a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706694Reviewed-by:Alexei Filippov <alph@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#682720}
Showing
Please register or sign in to comment