Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsalpablogsal commented Dec 25, 2025

The heatmap was only showing caller buttons on function definition
lines, not on interior lines within a function. This happened because
callers were recorded against the function definition line but looked
up by the current line number when building navigation buttons.

Added a line_to_function mapping to track which function each sampled
line belongs to. When building navigation buttons, callers are now
looked up via the function definition line so all lines in a function
show who calls that function. Callees remain line-specific since only
actual call sites should show what they call. Added tests covering
root, middle, and leaf frame behavior in call stacks.

@pablogsal
Copy link
MemberAuthor

CC: @ivonastojanovic@lkollar

The heatmap was only showing caller buttons on function definition lines, not on interior lines within a function. This happened because callers were recorded against the function definition line but looked up by the current line number when building navigation buttons. Added a line_to_function mapping to track which function each sampled line belongs to. When building navigation buttons, callers are now looked up via the function definition line so all lines in a function show who calls that function. Callees remain line-specific since only actual call sites should show what they call. Added tests covering root, middle, and leaf frame behavior in call stacks.
@pablogsalpablogsal merged commit 513ae17 into python:mainJan 1, 2026
44 checks passed
@pablogsalpablogsal deleted the heatmap-fix branch January 1, 2026 19:06
@pablogsalpablogsal added the type-bug An unexpected behavior, bug, or error label Jan 1, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstype-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@pablogsal