Skip to content

Commit b1a6bd9

Browse files
authored
Migrate from SnoopPrecompile to PrecompileTools (#220)
1 parent 56c304d commit b1a6bd9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ MethodAnalysis = "85b6ec6f-f7df-4429-9514-a64bcd9ee824"
1818
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
1919
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
2020
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
21-
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
21+
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
2222
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
2323

2424
[compat]
@@ -33,7 +33,7 @@ IntervalSets = "0.2, 0.3, 0.4, 0.5, 0.6, 0.7"
3333
MethodAnalysis = "0.4"
3434
Preferences = "1.2"
3535
Requires = "1"
36-
SnoopPrecompile = "1"
36+
PrecompileTools = "1"
3737
julia = "1.6"
3838

3939
[extras]

src/ProfileView.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,10 @@ function __init__()
579579
end
580580
end
581581

582-
using SnoopPrecompile
582+
using PrecompileTools
583583

584584
let
585-
@precompile_setup begin
585+
@setup_workload begin
586586
stackframe(func, file, line; C=false) = StackFrame(Symbol(func), Symbol(file), line, nothing, C, false, 0)
587587

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

0 commit comments

Comments
 (0)