Skip to content

Commit 17e211e

Browse files
fixes
1 parent 79ad2c7 commit 17e211e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

stdlib/Profile/src/Profile.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ function init(; n::Union{Nothing,Integer} = nothing, delay::Union{Nothing,Real}
9797
n_cur = ccall(:jl_profile_maxlen_data, Csize_t, ())
9898
if n_cur == 0 && isnothing(n) && isnothing(delay)
9999
# indicates that the buffer hasn't been initialized at all, so set the default
100-
return default_init()
100+
default_init()
101+
n_cur = ccall(:jl_profile_maxlen_data, Csize_t, ())
101102
end
102103
delay_cur = ccall(:jl_profile_delay_nsec, UInt64, ())/10^9
103104
if n === nothing && delay === nothing
@@ -622,7 +623,7 @@ By default metadata such as threadid and taskid is included. Set `include_meta`
622623
function fetch(;include_meta = true, limitwarn = true)
623624
maxlen = maxlen_data()
624625
if maxlen == 0
625-
error("The profile data buffer is not initialized, meaning a profile has not been run yet this session.")
626+
error("The profiling data buffer is not initialized. A profile has not been requested this session.")
626627
end
627628
len = len_data()
628629
if limitwarn && is_buffer_full()

stdlib/Profile/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Test, Profile, Serialization, Logging
44
using Base.StackTraces: StackFrame
55

6-
@test_throws "The profile data buffer is not initialized, meaning a profile has not been run yet this session." Profile.print()
6+
@test_throws "The profiling data buffer is not initialized. A profile has not been requested this session." Profile.print()
77

88
Profile.clear()
99
Profile.init()

0 commit comments

Comments
 (0)