Skip to content

Commit

Permalink
Profile: fix Compiler short path (#56515)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Nov 10, 2024
1 parent 4feca1f commit 88201cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stdlib/Profile/src/Profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,11 @@ function flatten(data::Vector, lidict::LineInfoDict)
end

const SRC_DIR = normpath(joinpath(Sys.BUILD_ROOT_PATH, "src"))
const COMPILER_DIR = "././../usr/share/julia/Compiler/"

# Take a file-system path and try to form a concise representation of it
# based on the package ecosystem
# filenamecache is a dict of spath -> (fullpath or "" if !isfile, modulename, shortpath)
function short_path(spath::Symbol, filenamecache::Dict{Symbol, Tuple{String,String,String}})
return get!(filenamecache, spath) do
path = Base.fixup_stdlib_path(string(spath))
Expand All @@ -544,6 +546,10 @@ function short_path(spath::Symbol, filenamecache::Dict{Symbol, Tuple{String,Stri
elseif startswith(path_norm, lib_dir)
remainder = only(split(path_norm, lib_dir, keepempty=false))
return (isfile(path_norm) ? path_norm : ""), "@julialib", remainder
elseif startswith(path, COMPILER_DIR)
remainder = only(split(path, COMPILER_DIR, keepempty=false))
possible_compiler_path = normpath(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "Compiler", remainder))
return (isfile(possible_compiler_path) ? possible_compiler_path : ""), "@Compiler", remainder
elseif isabspath(path)
if ispath(path)
# try to replace the file-system prefix with a short "@Module" one,
Expand Down

2 comments on commit 88201cf

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package evaluation job you requested has completed - possible new issues were detected.
The full report is available.

Please sign in to comment.