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

Invalidations tracker #1174

Open
mkitti opened this issue Nov 14, 2024 · 0 comments
Open

Invalidations tracker #1174

mkitti opened this issue Nov 14, 2024 · 0 comments

Comments

@mkitti
Copy link
Member

mkitti commented Nov 14, 2024

(invalidations) pkg> st
Status `~/.julia/dev/HDF5/invalidations/Project.toml`
  [f67ccb44] HDF5 v0.17.1 `..`
  [08abe8d2] PrettyTables v2.4.0
  [aa65fe97] SnoopCompile v3.0.1
  [e2b509da] SnoopCompileCore v3.0.0

julia> using SnoopCompileCore

julia> invalidations = @snoop_invalidations using HDF5;

julia> using SnoopCompile

julia> trees = invalidation_trees(invalidations)
2-element Vector{SnoopCompile.MethodInvalidations}:
 inserting convert(::Type{I}, ::Type{F}) where {I<:Integer, F<:Filter} @ HDF5.Filters ~/.julia/dev/HDF5/src/filters/filters.jl:428 invalidated:
   mt_backedges: 1: signature Tuple{typeof(convert), Type{Bool}, Type} triggered MethodInstance for setindex!(::BitArray, ::Type, ::Int64) (1 children)
                 2: signature Tuple{typeof(convert), Type{Bool}, DataType} triggered MethodInstance for setindex!(::BitVector, ::DataType, ::Int64) (1 children)
                 3: signature Tuple{typeof(convert), Type{Bool}, Type{<:Function}} triggered MethodInstance for setindex!(::BitVector, ::Type{<:Function}, ::Int64) (7 children)

 inserting keys(attrdict::HDF5.AttributeDict) @ HDF5 ~/.julia/dev/HDF5/src/attributes.jl:364 invalidated:
   backedges: 1: superseding keys(a::AbstractDict) @ Base abstractdict.jl:107 with MethodInstance for keys(::AbstractDict{<:AbstractString}) (33 children)


julia> using PrettyTables

julia> report_invalidations(; invalidations)
[ Info: 40 methods invalidated for 2 functions
┌─────────────────────────────────────────────────────────┬───────────────┬───────────────┬─────────────────┐
│ <file name>:<line number>                               │ Function Name │ Invalidations │ Invalidations % │
│                                                         │               │               │     (xᵢ/∑x)     │
├─────────────────────────────────────────────────────────┼───────────────┼───────────────┼─────────────────┤
│ /home/mkitti/.julia/dev/HDF5/src/attributes.jl:364      │     keys      │      3379        │
│ /home/mkitti/.julia/dev/HDF5/src/filters/filters.jl:428 │    convert    │       921        │
└─────────────────────────────────────────────────────────┴───────────────┴───────────────┴─────────────────┘
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

No branches or pull requests

1 participant