From 79684ad60f2da0e5d38aa9e0693f77b9da202a48 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 28 Dec 2023 07:42:28 -0500 Subject: [PATCH] update nthreads info in versioninfo (#52423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/JuliaLang/julia/issues/52404 @nilshg I opted to make it one line as it fits. ``` julia> versioninfo() Julia Version 1.11.0-DEV.1011 Commit bb7091c6f2* (2023-12-04 14:58 UTC) Platform Info: OS: macOS (arm64-apple-darwin23.0.0) CPU: 10 × Apple M2 Pro WORD_SIZE: 64 LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1) Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores) Environment: JULIA_EDITOR = code ``` (cherry picked from commit e96c13aa5b2e2b41e618ac009d43e1fdea0a70d4) --- stdlib/InteractiveUtils/src/InteractiveUtils.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/InteractiveUtils/src/InteractiveUtils.jl b/stdlib/InteractiveUtils/src/InteractiveUtils.jl index 6cbfc23ac905d..f4557689122c6 100644 --- a/stdlib/InteractiveUtils/src/InteractiveUtils.jl +++ b/stdlib/InteractiveUtils/src/InteractiveUtils.jl @@ -161,7 +161,8 @@ function versioninfo(io::IO=stdout; verbose::Bool=false) println(io, " WORD_SIZE: ", Sys.WORD_SIZE) println(io, " LIBM: ",Base.libm_name) println(io, " LLVM: libLLVM-",Base.libllvm_version," (", Sys.JIT, ", ", Sys.CPU_NAME, ")") - println(io, " Threads: ", Threads.maxthreadid(), " on ", Sys.CPU_THREADS, " virtual cores") + println(io, """Threads: $(Threads.nthreads(:default)) default, $(Threads.nthreads(:interactive)) interactive, \ + $(Threads.ngcthreads()) GC (on $(Sys.CPU_THREADS) virtual cores)""") function is_nonverbose_env(k::String) return occursin(r"^JULIA_|^DYLD_|^LD_", k)