From b1a6bd98fa38436758fd42feb6097465a522f4cf Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Mon, 10 Jul 2023 10:12:22 -0500 Subject: [PATCH] Migrate from SnoopPrecompile to PrecompileTools (#220) --- Project.toml | 4 ++-- src/ProfileView.jl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index c881e13..d10ee0c 100644 --- a/Project.toml +++ b/Project.toml @@ -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] @@ -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] diff --git a/src/ProfileView.jl b/src/ProfileView.jl index d521348..1f61ca2 100644 --- a/src/ProfileView.jl +++ b/src/ProfileView.jl @@ -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 @@ -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)