From e32c9756408a3b88394f687c4f55789a8bd21b73 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Mon, 1 Dec 2025 18:37:46 +0000 Subject: [PATCH] gh-138122: Small fixes to the new tachyon UI (#142157) --- Lib/profiling/sampling/flamegraph.js | 4 +++- Lib/profiling/sampling/flamegraph_template.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/profiling/sampling/flamegraph.js b/Lib/profiling/sampling/flamegraph.js index 7a2b2ef2e313..494d156a8ddd 100644 --- a/Lib/profiling/sampling/flamegraph.js +++ b/Lib/profiling/sampling/flamegraph.js @@ -633,7 +633,9 @@ function populateThreadStats(data, selectedThreadId = null) { if (gilHeldPctElem) gilHeldPctElem.textContent = `${(threadStats.has_gil_pct || 0).toFixed(1)}%`; const gilReleasedPctElem = document.getElementById('gil-released-pct'); - if (gilReleasedPctElem) gilReleasedPctElem.textContent = `${(threadStats.on_cpu_pct || 0).toFixed(1)}%`; + // GIL Released = not holding GIL and not waiting for it + const gilReleasedPct = Math.max(0, 100 - (threadStats.has_gil_pct || 0) - (threadStats.gil_requested_pct || 0)); + if (gilReleasedPctElem) gilReleasedPctElem.textContent = `${gilReleasedPct.toFixed(1)}%`; const gilWaitingPctElem = document.getElementById('gil-waiting-pct'); if (gilWaitingPctElem) gilWaitingPctElem.textContent = `${(threadStats.gil_requested_pct || 0).toFixed(1)}%`; diff --git a/Lib/profiling/sampling/flamegraph_template.html b/Lib/profiling/sampling/flamegraph_template.html index 09b673b76da5..82102c229e7a 100644 --- a/Lib/profiling/sampling/flamegraph_template.html +++ b/Lib/profiling/sampling/flamegraph_template.html @@ -155,7 +155,7 @@
--
-
Waiting
+
Waiting GIL
--
-- 2.47.3