Skip to content

Commit

Permalink
profile: doc: update the Allocs.@profile doc string (#53825)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko committed Apr 5, 2024
1 parent 59c3c71 commit d963a34
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions stdlib/Profile/src/Allocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,17 @@ julia> last(sort(results.allocs, by=x->x.size))
Profile.Allocs.Alloc(Vector{Any}, Base.StackTraces.StackFrame[_new_array_ at array.c:127, ...], 5576)
```
The best way to visualize these is currently with the
[PProf.jl](https://github.com/JuliaPerf/PProf.jl) package,
by invoking `PProf.Allocs.pprof`.
!!! note
The current implementation of the Allocations Profiler does not
capture types for all allocations. Allocations for which the profiler
could not capture the type are represented as having type
`Profile.Allocs.UnknownType`.
You can read more about the missing types and the plan to improve this, here:
<https://github.com/JuliaLang/julia/issues/43688>.
See the profiling tutorial in the Julia documentation for more information.
!!! compat "Julia 1.11"
Older versions of Julia could not capture types in all cases. In older versions of
Julia, if you see an allocation of type `Profile.Allocs.UnknownType`, it means that
the profiler doesn't know what type of object was allocated. This mainly happened when
the allocation was coming from generated code produced by the compiler. See
[issue #43688](https://github.com/JuliaLang/julia/issues/43688) for more info.
Since Julia 1.11, all allocations should have a type reported.
!!! compat "Julia 1.8"
The allocation profiler was added in Julia 1.8.
Expand Down

0 comments on commit d963a34

Please sign in to comment.