Emit codegen lock waiting time in compilation traces#257
Merged
Conversation
c8a3421 to
f843f0a
Compare
- Add control for recording wait time to Julia mutexes - Enable this control for the codegen lock - Record the codegen lock waiting time in `jl_generate_fptr` when called from `jl_compile_method_internal` - Emit the codegen lock waiting time as well as the codegen lock nesting level in compilation traces
f843f0a to
9af9d4c
Compare
kpamnany
approved these changes
Nov 5, 2025
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.
PR Description
This PR adds instrumentation when tracing the functions compiled, emitted as part of the output of the precompile statements. The instrumentation is represented as JSON object inside a julia comment, in the same line of the associated precompile statement. It provides the time, in milliseconds, spent waiting for the codegen lock, and whether the same function has been compiled multiple times in nested calls.
Checklist
Requirements for merging:
port-to-*labels that don't apply.