Skip to content

Commit

Permalink
edit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vilterp committed Jan 6, 2023
1 parent dd29e97 commit 8f02963
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ function finish_timing_profile(timing::Timing)
ccall(:jl_typeinf_profiling_push_timing, Cvoid, (Any, Any,), _finished_timings, timing)
end

# TODO(PR): Comment this vector, explain that it should only be accessed thru C.
# DO NOT ACCESS DIRECTLY. This vector should only be accessed through the
# functions above. It is a buffer that lives in the Julia module only to be *rooted*
# for GC, but all accesses to the vector must go through C code, in order to be
# thread safe.
const _finished_timings = Timing[]

# We keep a stack of the Timings for each of the MethodInstances currently being timed.
Expand All @@ -113,7 +116,7 @@ Empty out the previously recorded type inference timings (`Core.Compiler._timing
start the ROOT() timer again. `ROOT()` measures all time spent _outside_ inference.
!!! info
This functions is deprecated as of Julia 1.9; use [`clear_and_fetch_timings`](@ref) instead.
This function is deprecated as of Julia 1.9; use [`clear_and_fetch_timings`](@ref) instead.
"""
function reset_timings()
empty!(_timings)
Expand Down

0 comments on commit 8f02963

Please sign in to comment.