Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile: doc: update the Allocs.@profile doc string #53825

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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