Skip to content

Commit 40346e1

Browse files
authored
Improve the memory profiler documentation (#47144)
- PProf is a package, not a library - mention PProf in the docstring and say how to invoke it - turn URLs into markdown links
1 parent 01310a9 commit 40346e1

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

doc/src/manual/profile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ allocation while it is running. It can be invoked with
346346
This information about the allocations is returned as an array of `Alloc`
347347
objects, wrapped in an `AllocResults` object. The best way to visualize
348348
these is currently with the [PProf.jl](https://github.com/JuliaPerf/PProf.jl)
349-
library, which can visualize the call stacks which are making the most
349+
package, which can visualize the call stacks which are making the most
350350
allocations.
351351

352352
The allocation profiler does have significant overhead, so a `sample_rate`
@@ -362,7 +362,7 @@ Passing `sample_rate=1.0` will make it record everything (which is slow);
362362
`Profile.Allocs.UnknownType`.
363363

364364
You can read more about the missing types and the plan to improve this, here:
365-
https://github.com/JuliaLang/julia/issues/43688.
365+
<https://github.com/JuliaLang/julia/issues/43688>.
366366

367367
## External Profiling
368368

stdlib/Profile/src/Allocs.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,18 @@ julia> last(sort(results.allocs, by=x->x.size))
4747
Profile.Allocs.Alloc(Vector{Any}, Base.StackTraces.StackFrame[_new_array_ at array.c:127, ...], 5576)
4848
```
4949
50+
The best way to visualize these is currently with the
51+
[PProf.jl](https://github.com/JuliaPerf/PProf.jl) package,
52+
by invoking `PProf.Allocs.pprof`.
53+
5054
!!! note
5155
The current implementation of the Allocations Profiler does not
5256
capture types for all allocations. Allocations for which the profiler
5357
could not capture the type are represented as having type
5458
`Profile.Allocs.UnknownType`.
5559
5660
You can read more about the missing types and the plan to improve this, here:
57-
https://github.com/JuliaLang/julia/issues/43688.
61+
<https://github.com/JuliaLang/julia/issues/43688>.
5862
5963
!!! compat "Julia 1.8"
6064
The allocation profiler was added in Julia 1.8.

0 commit comments

Comments
 (0)