Skip to content

Commit

Permalink
Migrate from SnoopPrecompile to PrecompileTools (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy authored Jul 10, 2023
1 parent 56c304d commit b1a6bd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MethodAnalysis = "85b6ec6f-f7df-4429-9514-a64bcd9ee824"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
Expand All @@ -33,7 +33,7 @@ IntervalSets = "0.2, 0.3, 0.4, 0.5, 0.6, 0.7"
MethodAnalysis = "0.4"
Preferences = "1.2"
Requires = "1"
SnoopPrecompile = "1"
PrecompileTools = "1"
julia = "1.6"

[extras]
Expand Down
6 changes: 3 additions & 3 deletions src/ProfileView.jl
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,10 @@ function __init__()
end
end

using SnoopPrecompile
using PrecompileTools

let
@precompile_setup begin
@setup_workload begin
stackframe(func, file, line; C=false) = StackFrame(Symbol(func), Symbol(file), line, nothing, C, false, 0)

backtraces = UInt64[0, 4, 3, 2, 1, # order: calles then caller
Expand All @@ -601,7 +601,7 @@ let
6=>stackframe(:f5, :file3, 1),
7=>stackframe(:f1, :file1, 2),
8=>stackframe(:f6, :file3, 10))
@precompile_all_calls begin
@compile_workload begin
g = flamegraph(backtraces; lidict=lidict)
gdict = Dict(tabname_allthreads => Dict(tabname_alltasks => g))
win, c, fdraw = viewgui(FlameGraphs.default_colors, gdict)
Expand Down

0 comments on commit b1a6bd9

Please sign in to comment.