-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix package precompilation (PrecompileTools) #57828
Conversation
With the "classic" inference timing disabled, PrecompileTools and SnoopCompile are non-functional on 1.12 & master. #57074 added timing data to the CodeInstances themselves, which should help restore SnoopCompile. However, without the tree structure provided by the old inference timing system, we still need a way to tag MethodInstances that get inferred inside `PrecompileTools.@compile_workload` blocks. This adds a simple mechanism modeled after `@trace_compile` that switching to tagging MethodInstances in `jl_push_newly_inferred`. JuliaLang/PrecompileTools.jl#47 contains the corresponding changes to PrecompileTools.jl.
Will Pkg's internalized https://github.com/JuliaLang/Pkg.jl/blob/master/src/precompile.jl#L217-L244 |
Yes, I'll push a very simple test in the next commit. (PrecompileTools is a test of sorts, but good to have one here too.) |
Corresponding changes in JuliaLang/PrecompileTools.jl#47 are now up too |
I just noticed that #54899 deleted the corresponding internalized Shall we make a barebones version for Base so that we're not duplicating code between Pkg and REPL and any other stdlibs that want to benefit? |
I deleted it there because I noticed it seemed to be making the quality of the REPL script worse not better |
With the "classic" inference timing disabled, PrecompileTools and SnoopCompile are non-functional on 1.12 & master. #57074 added timing data to the CodeInstances themselves, which should help restore SnoopCompile. However, without the tree structure provided by the old inference timing system, we still need a way to tag MethodInstances that get inferred inside `PrecompileTools.@compile_workload` blocks. This adds a simple mechanism modeled after `@trace_compile` that switches to tagging MethodInstances in `jl_push_newly_inferred`. JuliaLang/PrecompileTools.jl#47 contains (or will contain) the corresponding changes to PrecompileTools.jl. (cherry picked from commit c89b1ff)
With the "classic" inference timing disabled, PrecompileTools and SnoopCompile are non-functional on 1.12 & master. #57074 added timing data to the CodeInstances themselves, which should help restore SnoopCompile. However, without the tree structure provided by the old inference timing system, we still need a way to tag MethodInstances that get inferred inside
PrecompileTools.@compile_workload
blocks.This adds a simple mechanism modeled after
@trace_compile
that switches to tagging MethodInstances injl_push_newly_inferred
. JuliaLang/PrecompileTools.jl#47 contains (or will contain) the corresponding changes to PrecompileTools.jl.