diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index ec9021595ce0b..34043e315b64e 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -73,9 +73,11 @@ Set the duration in seconds of the profile "peek" that is triggered via `SIGINFO set_peek_duration(t::Float64) = ccall(:jl_set_profile_peek_duration, Cvoid, (Float64,), t) precompile_script = """ -Base.loaded_modules[Base.PkgId(Base.UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"), "Profile")].@profile sleep(1) -Base.loaded_modules[Base.PkgId(Base.UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"), "Profile")].peek_report[]() -Base.loaded_modules[Base.PkgId(Base.UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"), "Profile")].clear() +let _Profile = Base.PkgId(Base.UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"), "Profile") + Base.loaded_modules[_Profile].@profile sleep(1) + Base.loaded_modules[_Profile].peek_report[]() + Base.loaded_modules[_Profile].clear() +end """ ####