From 3753ebbac00ed66d25dbd4603e7d4b167ef83e7e Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Sat, 7 Mar 2026 10:34:50 -0500 Subject: [PATCH 01/14] Remove special handling of inverted roots from getTimingsForCallNodeIndex. Handle it during display instead. --- src/components/sidebar/CallTreeSidebar.tsx | 6 +- src/components/tooltip/CallNode.tsx | 8 +- src/profile-logic/profile-data.ts | 21 ++++-- .../__snapshots__/profile-view.test.ts.snap | 1 + src/test/store/profile-view.test.ts | 73 ++++++++++--------- 5 files changed, 64 insertions(+), 45 deletions(-) diff --git a/src/components/sidebar/CallTreeSidebar.tsx b/src/components/sidebar/CallTreeSidebar.tsx index 8e0fac7817..9b0bd19dd9 100644 --- a/src/components/sidebar/CallTreeSidebar.tsx +++ b/src/components/sidebar/CallTreeSidebar.tsx @@ -319,7 +319,11 @@ class CallTreeSidebarImpl extends React.PureComponent { const totalTimePercent = Math.round((totalTime.value / rootTime) * 100); const selfTimePercent = Math.round((selfTime.value / rootTime) * 100); const totalTimeBreakdownByCategory = totalTime.breakdownByCategory; - const selfTimeBreakdownByCategory = selfTime.breakdownByCategory; + // For inverted root nodes, self === total, so showing a separate self + // breakdown would be redundant. + const selfTimeBreakdownByCategory = timings.isInvertedRoot + ? null + : selfTime.breakdownByCategory; return (