https://github.com/python/cpython/commit/104cae039ac428709c7bcf9b1a00102f97be0a5c
commit: 104cae039ac428709c7bcf9b1a00102f97be0a5c
branch: main
author: Hugo van Kemenade <[email protected]>
committer: pablogsal <[email protected]>
date: 2026-03-16T23:01:41Z
summary:

gh-142927: Move hotspots up flamegraph sidebar (#145428)

files:
M Lib/profiling/sampling/_flamegraph_assets/flamegraph_template.html

diff --git a/Lib/profiling/sampling/_flamegraph_assets/flamegraph_template.html 
b/Lib/profiling/sampling/_flamegraph_assets/flamegraph_template.html
index 07b15a5a2b48c7..c0d40b2712beea 100644
--- a/Lib/profiling/sampling/_flamegraph_assets/flamegraph_template.html
+++ b/Lib/profiling/sampling/_flamegraph_assets/flamegraph_template.html
@@ -178,6 +178,51 @@ <h3 class="section-title">Profile Summary</h3>
               </div>
             </section>
 
+            <!-- Hotspots Section -->
+            <section class="sidebar-section collapsible" id="hotspots-section">
+              <button class="section-header" 
onclick="toggleSection('hotspots-section')">
+                <h3 class="section-title">Hotspots</h3>
+                <svg class="section-chevron" width="12" height="12" viewBox="0 
0 12 12" fill="none">
+                  <path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" 
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+                </svg>
+              </button>
+              <div class="section-content">
+              <div class="hotspot" id="hotspot-1">
+                <div class="hotspot-rank hotspot-rank--1">1</div>
+                <div class="hotspot-info">
+                  <div class="hotspot-func" id="hotspot-func-1">--</div>
+                  <div class="hotspot-file" id="hotspot-file-1">--</div>
+                  <div class="hotspot-stats">
+                    <span class="hotspot-percent" 
id="hotspot-percent-1">--</span>
+                    <span id="hotspot-samples-1"></span>
+                  </div>
+                </div>
+              </div>
+              <div class="hotspot" id="hotspot-2">
+                <div class="hotspot-rank hotspot-rank--2">2</div>
+                <div class="hotspot-info">
+                  <div class="hotspot-func" id="hotspot-func-2">--</div>
+                  <div class="hotspot-file" id="hotspot-file-2">--</div>
+                  <div class="hotspot-stats">
+                    <span class="hotspot-percent" 
id="hotspot-percent-2">--</span>
+                    <span id="hotspot-samples-2"></span>
+                  </div>
+                </div>
+              </div>
+              <div class="hotspot" id="hotspot-3">
+                <div class="hotspot-rank hotspot-rank--3">3</div>
+                <div class="hotspot-info">
+                  <div class="hotspot-func" id="hotspot-func-3">--</div>
+                  <div class="hotspot-file" id="hotspot-file-3">--</div>
+                  <div class="hotspot-stats">
+                    <span class="hotspot-percent" 
id="hotspot-percent-3">--</span>
+                    <span id="hotspot-samples-3"></span>
+                  </div>
+                </div>
+              </div>
+              </div>
+            </section>
+
             <!-- Thread Stats Section (GIL/GC) -->
             <section class="sidebar-section thread-stats-section collapsible" 
id="thread-stats-bar" style="display: none;">
               <button class="section-header" 
onclick="toggleSection('thread-stats-bar')">
@@ -237,51 +282,6 @@ <h3 class="section-title">Runtime Stats</h3>
               </div>
             </section>
 
-            <!-- Hotspots Section -->
-            <section class="sidebar-section collapsible" id="hotspots-section">
-              <button class="section-header" 
onclick="toggleSection('hotspots-section')">
-                <h3 class="section-title">Hotspots</h3>
-                <svg class="section-chevron" width="12" height="12" viewBox="0 
0 12 12" fill="none">
-                  <path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" 
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-                </svg>
-              </button>
-              <div class="section-content">
-              <div class="hotspot" id="hotspot-1">
-                <div class="hotspot-rank hotspot-rank--1">1</div>
-                <div class="hotspot-info">
-                  <div class="hotspot-func" id="hotspot-func-1">--</div>
-                  <div class="hotspot-file" id="hotspot-file-1">--</div>
-                  <div class="hotspot-stats">
-                    <span class="hotspot-percent" 
id="hotspot-percent-1">--</span>
-                    <span id="hotspot-samples-1"></span>
-                  </div>
-                </div>
-              </div>
-              <div class="hotspot" id="hotspot-2">
-                <div class="hotspot-rank hotspot-rank--2">2</div>
-                <div class="hotspot-info">
-                  <div class="hotspot-func" id="hotspot-func-2">--</div>
-                  <div class="hotspot-file" id="hotspot-file-2">--</div>
-                  <div class="hotspot-stats">
-                    <span class="hotspot-percent" 
id="hotspot-percent-2">--</span>
-                    <span id="hotspot-samples-2"></span>
-                  </div>
-                </div>
-              </div>
-              <div class="hotspot" id="hotspot-3">
-                <div class="hotspot-rank hotspot-rank--3">3</div>
-                <div class="hotspot-info">
-                  <div class="hotspot-func" id="hotspot-func-3">--</div>
-                  <div class="hotspot-file" id="hotspot-file-3">--</div>
-                  <div class="hotspot-stats">
-                    <span class="hotspot-percent" 
id="hotspot-percent-3">--</span>
-                    <span id="hotspot-samples-3"></span>
-                  </div>
-                </div>
-              </div>
-              </div>
-            </section>
-
             <!-- Thread Filter Section -->
             <section class="sidebar-section filter-section" 
id="thread-section" style="display: none;">
               <label class="filter-label" for="thread-filter">Thread 
Filter</label>

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to