Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Rename PProf.Allocs.pprof()
  • Loading branch information
NHDaly committed Jan 21, 2022
commit e2a81292004e1c9936c35a07c6485954de88d9c8
15 changes: 12 additions & 3 deletions src/allocs_profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ using Base.StackTraces: StackFrame
using PProf.ProtoBuf
using PProf.OrderedCollections

function to_pprof(alloc_profile::Profile.Allocs.AllocResults
"""
PProf.Allocs.pprof([alloc_profile]; kwargs...)

The `kwargs` are the same as [`PProf.pprof`](@ref), except:
- `frame_for_type = true`: If true, add a frame to the FlameGraph for the Type:
of every allocation. Note that this tends to make the Graph view harder to
read, because it's over-aggregated, so we recommend filtering out the `Type:`
nodes in the PProf web UI.
"""
function pprof(alloc_profile::Profile.Allocs.AllocResults = Profile.Allocs.fetch()
;
web::Bool = true,
webhost::AbstractString = "localhost",
Expand All @@ -30,8 +39,8 @@ function to_pprof(alloc_profile::Profile.Allocs.AllocResults
keep_frames::Union{Nothing, AbstractString} = nothing,
ui_relative_percentages::Bool = true,
full_signatures::Bool = true,
# TODO: decide how to name this:
aggregate_by_type::Bool = true,
# Allocs-specific arguments:
frame_for_type::Bool = true,
)
period = UInt64(0x1)

Expand Down