Skip to content

gh-138122: Extend binary profiling format with full source location and opcode - #143088

Merged
pablogsal merged 5 commits into
python:mainfrom
pablogsal:tachyon-binary-file-refux
Dec 24, 2025
Merged

gh-138122: Extend binary profiling format with full source location and opcode#143088
pablogsal merged 5 commits into
python:mainfrom
pablogsal:tachyon-binary-file-refux

Conversation

@pablogsal

@pablogsalpablogsal commented Dec 23, 2025

Copy link
Copy Markdown
Member

Add end_lineno, column, end_column, and opcode fields to frame entries.
Uses delta encoding for end positions to minimize file size.
reader, writer, tests, and documentation.

@pablogsal

pablogsal commented Dec 23, 2025

Copy link
Copy Markdown
MemberAuthor

@lkollar smaller PR here to add opcode and location support to the file format. Most of the bulk is tests + docs update.

…tion and opcode
Add end_lineno, column, end_column, and opcode fields to frame entries.
Uses delta encoding for end positions to minimize file size.
reader, writer, tests, and documentation.
@pablogsal
pablogsalforce-pushed the tachyon-binary-file-refux branch from 97a86dd to bb4129fCompareDecember 23, 2025 01:42
Comment threadInternalDocs/profiling_binary_format.md Outdated
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

@lkollarlkollar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, just a couple of minor things.

Comment threadModules/_remote_debugging/binary_io_writer.c Outdated
Comment threadModules/_remote_debugging/binary_io_writer.c Outdated
Comment threadModules/_remote_debugging/binary_io_writer.c Outdated
@pablogsal

Copy link
Copy Markdown
MemberAuthor

@lkollar fixed

f"Thread ({interp_id}, {thread_id}), sample {i}, "
f"frame {j}: opcode mismatch "
f"(expected {exp_frame['opcode']}, got {act_frame['opcode']})",
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a long and duplicate list, that's not very dry, I wrote pablogsal#119

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @StanFromIreland !

@StanFromIrelandStanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablogsal
pablogsal merged commit 7c44f37 into python:mainDec 24, 2025
46 checks passed
@pablogsal
pablogsal deleted the tachyon-binary-file-refux branch December 24, 2025 16:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pablogsal@lkollar@StanFromIreland