-
-
Couldn't load subscription status.
- Fork 5.7k
CoreLogging: prevent some Annotated*-related instability
#59467
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
CoreLogging: prevent some Annotated*-related instability
#59467
Conversation
|
Some of the sysimage invalidation eliminated with this PR, appearing on {
"method_instance": {
"method": "chomp(s::AbstractString) @ Base strings/util.jl:338",
"method_instance": "MethodInstance for chomp(::AbstractString)"
},
"children": [
{
"method_instance": {
"method": "var\"#handle_message#6\"(kwargs::Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Base.CoreLogging.var\"#handle_message#6\"(::Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
{
"method_instance": {
"method": "handle_message(logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line; kwargs...) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Base.CoreLogging.handle_message(::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
]
}
]
},
{
"method_instance": {
"method": "var\"#handle_message#6\"(kwargs::Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Base.CoreLogging.var\"#handle_message#6\"(::Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
{
"method_instance": {
"method": "handle_message(logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line; kwargs...) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Base.CoreLogging.handle_message(::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
]
},
{
"method_instance": {
"method": "kwcall(::NamedTuple, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Core.kwcall(::NamedTuple, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
{
"method_instance": {
"method": "logging_error(logger, level, _module, group, id, filepath, line, err, real::Bool) @ Base.CoreLogging logging/logging.jl:496",
"method_instance": "MethodInstance for Base.CoreLogging.logging_error(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Bool)"
},
"children": [
]
}
]
},
{
"method_instance": {
"method": "kwcall(::NamedTuple, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Core.kwcall(::NamedTuple{(:exception,), <:Tuple{Tuple{Any, Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}}}}, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::LazyString, ::Any, ::Symbol, ::Any, ::Any, ::Any)"
},
"children": [
{
"method_instance": {
"method": "logging_error(logger, level, _module, group, id, filepath, line, err, real::Bool) @ Base.CoreLogging logging/logging.jl:496",
"method_instance": "MethodInstance for Base.CoreLogging.logging_error(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Bool)"
},
"children": [
]
}
]
},
{
"method_instance": {
"method": "kwcall(::NamedTuple, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Core.kwcall(::NamedTuple{(:exception,), <:Tuple{Tuple{Any, Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}}}}, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::String, ::Any, ::Symbol, ::Any, ::Any, ::Any)"
},
"children": [
{
"method_instance": {
"method": "logging_error(logger, level, _module, group, id, filepath, line, err, real::Bool) @ Base.CoreLogging logging/logging.jl:496",
"method_instance": "MethodInstance for Base.CoreLogging.logging_error(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Bool)"
},
"children": [
]
}
]
}
]
}
]
}Another tree of invalidations with the same reproducer: {
"method_instance": {
"method": "iterate(iter::Base.SplitIterator) @ Base strings/util.jl:741",
"method_instance": "MethodInstance for iterate(::Base.SplitIterator{S, Base.Fix2{typeof(isequal), Char}} where S<:SubString)"
},
"children": [
{
"method_instance": {
"method": "_collect(cont, itr, ::Base.HasEltype, isz::Base.SizeUnknown) @ Base array.jl:743",
"method_instance": "MethodInstance for Base._collect(::UnitRange{Int64}, ::Base.SplitIterator{S, Base.Fix2{typeof(isequal), Char}} where S<:SubString, ::Base.HasEltype, ::Base.SizeUnknown)"
},
"children": [
{
"method_instance": {
"method": "collect(itr) @ Base array.jl:734",
"method_instance": "MethodInstance for collect(::Base.SplitIterator{S, Base.Fix2{typeof(isequal), Char}} where S<:SubString)"
},
"children": [
{
"method_instance": {
"method": "var\"#split#431\"(limit::Integer, keepempty::Bool, ::typeof(split), str::T, splitter) where T<:AbstractString @ Base strings/util.jl:908",
"method_instance": "MethodInstance for Base.var\"#split#431\"(::Int64, ::Bool, ::typeof(split), ::SubString, ::Char)"
},
"children": [
{
"method_instance": {
"method": "split(str::T, splitter; limit, keepempty) where T<:AbstractString @ Base strings/util.jl:908",
"method_instance": "MethodInstance for split(::SubString, ::Char)"
},
"children": [
{
"method_instance": {
"method": "var\"#handle_message#6\"(kwargs::Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Base.CoreLogging.var\"#handle_message#6\"(::Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
]
},
{
"method_instance": {
"method": "var\"#handle_message#6\"(kwargs::Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, ::typeof(Base.CoreLogging.handle_message), logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message, _module, group, id, filepath, line) @ Base.CoreLogging logging/ConsoleLogger.jl:110",
"method_instance": "MethodInstance for Base.CoreLogging.var\"#handle_message#6\"(::Base.Pairs{Symbol, V, Nothing, NT} where {V, NT<:NamedTuple}, ::typeof(Base.CoreLogging.handle_message), ::Base.CoreLogging.ConsoleLogger, ::Base.CoreLogging.LogLevel, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)"
},
"children": [
]
}
]
}
]
}
]
}
]
}
]
} |
Add some concrete `typeassert`s to increase the resistance of the sysimage to invalidation by helping inference within the method body.
ed264f4 to
1d26139
Compare
|
bump |
|
ping |
Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
…edString-related_type-instability_by_adding_concrete_typeasserts
Add some concrete `typeassert`s to increase the resistance of the sysimage to invalidation by helping inference within the method body. (cherry picked from commit bb51d56)
Add some concrete `typeassert`s to increase the resistance of the sysimage to invalidation by helping inference within the method body. (cherry picked from commit bb51d56)
Add some concrete `typeassert`s to increase the resistance of the sysimage to invalidation by helping inference within the method body. (cherry picked from commit bb51d56)
Add some concrete
typeasserts to increase the resistance of the sysimage to invalidation by helping inference within the method body.