Skip to content

RFC: Sequence Point feature#1376

Draft
slomp wants to merge 2 commits into
masterfrom
slomp/seq-feature
Draft

RFC: Sequence Point feature#1376
slomp wants to merge 2 commits into
masterfrom
slomp/seq-feature

Conversation

@slomp
Copy link
Copy Markdown
Collaborator

@slomp slomp commented May 28, 2026

This is an experiment with adding "sequence point" instrumentation directives to Tracy.
The use case here is asynchronous compute chains/graphs, especially those driven by callbacks chains.

You'd use TracySeqCreate() to request a unique sequence identifier, and pass that id along to TarcySeqResume(id) and TracySeqSuspend(id) at each "continuation" scope. At the end of the processing, you'd TracySeqRetire(id) it. Later, in the profiler GUI, hovering over a sequenced zone would show arrows pointing to the previous and next sequence point zones.

In addition, if you right-click on a zone that belongs to a sequence point, there's the option to "flatten" it to a "virtual thread" in order to visualize it in isolation in the timeline.

Context: over the years, I managed to workaround just by using TRACY_FIBERS as a way to define "virtual threads", and then assigning each async compute chain to one such virtual thread.

Curious to know other people's opinion. There's a (vibe-coded) examples/seq to demonstrate the feature.

Screen.Recording.2026-05-28.at.11.11.11.AM.mp4

@slomp slomp marked this pull request as draft May 28, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant