Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Aug 2, 2022
1 parent 4944c9a commit 79ad2c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stdlib/Profile/src/Profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ using keywords or in the order `(n, delay)`.
"""
function init(; n::Union{Nothing,Integer} = nothing, delay::Union{Nothing,Real} = nothing, limitwarn::Bool = true)
n_cur = ccall(:jl_profile_maxlen_data, Csize_t, ())
if n_cur == 0 && isnothing(n) && isnothing(delay)
# indicates that the buffer hasn't been initialized at all, so set the default
return default_init()
end
delay_cur = ccall(:jl_profile_delay_nsec, UInt64, ())/10^9
if n === nothing && delay === nothing
nthreads = Sys.iswindows() ? 1 : Threads.nthreads() # windows only profiles the main thread
Expand Down

0 comments on commit 79ad2c7

Please sign in to comment.