From 281e3512cf212e7d7976c0a8bd6a8400406dfa82 Mon Sep 17 00:00:00 2001 From: Kiran Pamnany Date: Tue, 4 Feb 2025 05:20:41 -0500 Subject: [PATCH] Add timing when `PRECOMPILE_TRACE_COMPILE` is set (#57251) --- base/loading.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index c1972907b02bb..35cae55eb4ac2 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -2273,7 +2273,11 @@ function create_expr_cache(pkg::PkgId, input::String, output::String, output_o:: deps_eltype = sprint(show, eltype(concrete_deps); context = :module=>nothing) deps = deps_eltype * "[" * join(deps_strs, ",") * "]" - trace = isassigned(PRECOMPILE_TRACE_COMPILE) ? `--trace-compile=$(PRECOMPILE_TRACE_COMPILE[])` : `` + trace = if isassigned(PRECOMPILE_TRACE_COMPILE) + `--trace-compile=$(PRECOMPILE_TRACE_COMPILE[]) --trace-compile-timing` + else + `` + end io = open(pipeline(addenv(`$(julia_cmd(;cpu_target)::Cmd) $(opts) --startup-file=no --history-file=no --warn-overwrite=yes --color=$(have_color === nothing ? "auto" : have_color ? "yes" : "no")