Skip to content

Loss of invalidation-logging on master #48967

Closed
@timholy

Description

@timholy

SnoopCompile has tests that look like this:

PkgC.jl

 module PkgC

nbits(::Int8) = 8
nbits(::Int16) = 16

end # module PkgC

PkgD.jl:

module PkgD

using PkgC

call_nbits(x::Integer) = PkgC.nbits(x)
# The rest forces precompilation
map_nbits(list) = map(call_nbits, list)
nbits_list() = map_nbits(Integer[Int8(1), Int16(1)])

nbits_list()

end # module PkgD

and after precompilation,

using PkgC
PkgC.nbits(::UInt8) = 8
using PkgD

The method definition for UInt8 prepares the way to invalidate PkgD.call_nbits, but PkgD is not yet loaded at the time of the invalidation.

On 1.9rc1, one gets the following entries in the _jl_debug_method_invalidation log:

   Tuple{typeof(PkgC.nbits), Integer}
   "insert_backedges_callee"
 56
   Any[nbits(::UInt8) @ Main REPL[9]:4]
   MethodInstance for PkgD.call_nbits(::Integer)
   "verify_methods"
 56

whereas on nightly we get

  Tuple{typeof(PkgC.nbits), Integer}
  "insert_backedges_callee"
 7
  nothing
  MethodInstance for PkgD.call_nbits(::Integer)
  "verify_methods"
 7

(The specific integer values don't matter as long as they are internally consistent.)

The matches log went from a list that contains the method that caused the invalidation to being nothing. Consequently it's not possible to determine the cause of the invalidation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions