-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Open
nsajko
wants to merge
1
commit into
JuliaLang:master
Choose a base branch
from
nsajko:CoreLogging-handle_message-prevent_AnnotatedString-related_type-instability_by_adding_concrete_typeasserts
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+3
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
65 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 1.11
Change should be backported to release-1.11
backport 1.12
Change should be backported to release-1.12
invalidations
logging
The logging framework
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add some concrete
typeassert
s to increase the resistance of the sysimage to invalidation by helping inference within the method body.