Skip to content
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

improve inferrability of create_expr_cache #46801

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ranocha
Copy link
Member

@ranocha ranocha commented Sep 16, 2022

I improved type stability to fix some invalidations. This is based on the following code:

julia> import Pkg; Pkg.activate(temp=true); Pkg.add("HDF5")

julia> using SnoopCompileCore; invalidations = @snoopr(using HDF5); using SnoopCompile

julia> trees = invalidation_trees(invalidations)
...
 inserting write(obj::HDF5.Dataset, x) in HDF5 at ~.julia/packages/HDF5/T4H0V/src/datasets.jl:296 invalidated:
   mt_backedges: 1: signature Tuple{typeof(write), Any, String} triggered MethodInstance for Base.create_expr_cache(::Base.PkgId, ::String, ::String, ::Vector{Pair{Base.PkgId, UInt64}}, ::IOBuffer, ::Base.DevNull) (1 children)
                 2: signature Tuple{typeof(write), Any, String} triggered MethodInstance for Base.create_expr_cache(::Base.PkgId, ::String, ::String, ::Vector{Pair{Base.PkgId, UInt64}}, ::IO, ::IO) (21 children)
   24 mt_cache

The majority of invalidations from loading HDF5.jl are fixed by JuliaLang/Pkg.jl#3202 but I discovered these along the way, too, so I can also fix them here.

@ranocha ranocha added compiler:latency Compiler latency backport 1.8 Change should be backported to release-1.8 labels Sep 16, 2022
@ranocha
Copy link
Member Author

ranocha commented Sep 25, 2022

Bump

@ranocha
Copy link
Member Author

ranocha commented Oct 4, 2022

Bump

1 similar comment
@ranocha
Copy link
Member Author

ranocha commented Oct 7, 2022

Bump

This fixes some invalidations when loading HDF5.jl
@KristofferC
Copy link
Sponsor Member

CI looks really sad so I rebased it again.

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Nov 2, 2022

The has already been reviewed/"approved", just Jeff busy or waiting for CI to not fail or just end...?

PowerPC is still running for a long time, has failures (false alarms?) and/or CI needs restarting?

@KristofferC
Copy link
Sponsor Member

I think the CI failure in here is related so they have to be fixed for this to be able to get merged.

@ranocha
Copy link
Member Author

ranocha commented Nov 3, 2022

CI runs of buildkite fail with

Error in testset compiler/codegen:
  | Error During Test at /cache/build/default-amdci4-1/julialang/julia-master/julia-5741f5740d/share/julia/test/compiler/codegen.jl:698
  | Test threw exception
  | Expression: readchomp(`$pfx/bin/$(Base.julia_exename()) -e 'print("no codegen!\n")'`) == "no codegen!"
  | failed process: Process(`/tmp/jl_KDMiFk/bin/julia -e 'print("no codegen!\n")'`, ProcessExited(1)) [1]

Does anybody know how this might be related?

@KristofferC KristofferC mentioned this pull request Nov 8, 2022
26 tasks
@KristofferC KristofferC mentioned this pull request Dec 27, 2022
10 tasks
@KristofferC KristofferC mentioned this pull request Feb 6, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.8 Change should be backported to release-1.8 compiler:latency Compiler latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants