Repository navigation
Conversation
kweronsx
force-pushed
the
detached_event_alloc_for_graph
branch
3 times, most recently
from
October 13, 2026 13:55
ff553df to
4b4ef2f
Compare
pbalcer
reviewed
Oct 14, 2026
Comment on lines
+26
to
+27
| // Must not take the queue lock: it is called while that lock may be held. | ||
| virtual bool isGraphCaptureActiveNoLock() = 0; |
Contributor
There was a problem hiding this comment.
may be held, or is held? Usually, the name we use for such functions is ...Unlocked.
Contributor
Author
There was a problem hiding this comment.
It should be 'is held'; I'll also update the name accordingly.
This change allocates detached events during graph recording, but it also synchronizes the lifetime of these events by having the graph store them. Their non-owning references are returned to the caller of queue::submit.
kweronsx
force-pushed
the
detached_event_alloc_for_graph
branch
from
October 15, 2026 13:25
4b4ef2f to
c1c7f56
Compare
Contributor
|
I've talked with @mmichel11, about the graph event lifetime problem. For the time being, the optimal solution would be to cache the event handles associated with a graph in the After that, we could think about redistributing such cached events for the same graph (a free-list stored in graph struct) as a next optimization step. |
Contributor
Author
|
This change was discontinued in favor of: #23516 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If an event is destroyed it returns to the pool. The problem with this, is that a recorded graph's lifetime may exceed the lifetime of the events of its commands, which could lead to a situation where an event is reported to be used at the same time by the graph and some other function.
This change aims to prevent event recycling in the case of graph recording by making the graph store the events it uses.