From 74371aa1222f2ca290c4766ceb55d11ab987c7bb Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Sun, 25 Jul 2021 13:29:13 -0400 Subject: [PATCH 1/8] Add `pspawn=true` to `@snoopl` to allow staying in the same process! --- SnoopCompileCore/src/snoopl.jl | 44 ++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/SnoopCompileCore/src/snoopl.jl b/SnoopCompileCore/src/snoopl.jl index 26e0832b4..2e858d028 100644 --- a/SnoopCompileCore/src/snoopl.jl +++ b/SnoopCompileCore/src/snoopl.jl @@ -4,7 +4,7 @@ using Serialization """ ``` -@snoopl "func_names.csv" "llvm_timings.yaml" begin +@snoopl [jlflags="..."] [pspawn=true] "func_names.csv" "llvm_timings.yaml" begin # Commands to execute, in a new process end ``` @@ -14,16 +14,26 @@ be used for the input to `SnoopCompile.read_snoopl("func_names.csv", "llvm_timin The logs contain the amount of time spent optimizing each "llvm module", and information about each module, where a module is a collection of functions being optimized together. + +If `pspawn=false`, the commands will be run in the same julia process, via `eval()` in +the current module. This will only report LLVM optimizations for _new_ compilations, that +haven't already been cached in this process, which can be (carefully) used to pruned down +the results to only the code you are interested in. """ -macro snoopl(flags, func_file, llvm_file, commands) - return :(snoopl($(esc(flags)), $(esc(func_file)), $(esc(llvm_file)), $(QuoteNode(commands)))) +macro snoopl(args...) + @assert length(args) >= 3 """Usage: @snoopl [args...] "snoopl.csv" "snoopl.yaml" commands""" + flags, (func_file, llvm_file, commands) = args[1:end-3], args[end-2:end] + flags = [esc(e) for e in flags] + return :(snoopl($(esc(func_file)), $(esc(llvm_file)), $(QuoteNode(commands)), $__module__; $(flags...))) end macro snoopl(func_file, llvm_file, commands) - return :(snoopl(String[], $(esc(func_file)), $(esc(llvm_file)), $(QuoteNode(commands)))) + return :(snoopl($(esc(func_file)), $(esc(llvm_file)), $(QuoteNode(commands)), $__module__)) end -function snoopl(flags, func_file, llvm_file, commands) - println("Launching new julia process to run commands...") +function snoopl(func_file, llvm_file, commands, _module; pspawn=true, jlflags="") + if pspawn + println("Launching new julia process to run commands...") + end # addprocs will run the unmodified version of julia, so we # launch it as a command. code_object = """ @@ -32,13 +42,12 @@ function snoopl(flags, func_file, llvm_file, commands) Core.eval(Main, deserialize(stdin)) end """ - process = open(`$(Base.julia_cmd()) $flags --eval $code_object`, stdout, write=true) - serialize(process, quote + record_and_run_quote = quote let func_io = open($func_file, "w"), llvm_io = open($llvm_file, "w") ccall(:jl_dump_emitted_mi_name, Nothing, (Ptr{Nothing},), func_io.handle) ccall(:jl_dump_llvm_opt, Nothing, (Ptr{Nothing},), llvm_io.handle) try - $commands + @eval $commands finally ccall(:jl_dump_emitted_mi_name, Nothing, (Ptr{Nothing},), C_NULL) ccall(:jl_dump_llvm_opt, Nothing, (Ptr{Nothing},), C_NULL) @@ -46,9 +55,18 @@ function snoopl(flags, func_file, llvm_file, commands) close(llvm_io) end end - exit() - end) - wait(process) - println("done.") + end + + if pspawn + process = open(`$(Base.julia_cmd()) $jlflags --eval $code_object`, stdout, write=true) + serialize(process, quote + $record_and_run_quote + exit() + end) + wait(process) + println("done.") + else + Core.eval(_module, record_and_run_quote) + end nothing end From 25c2d6e24a69a1861bcf7fa426e8cc1219fecf87 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Oct 2020 23:12:23 -0400 Subject: [PATCH 2/8] Add `@snoop_all` to run snoopi, snoopc, snoopl --- SnoopCompileCore/src/SnoopCompileCore.jl | 4 ++++ SnoopCompileCore/src/snoop_all.jl | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 SnoopCompileCore/src/snoop_all.jl diff --git a/SnoopCompileCore/src/SnoopCompileCore.jl b/SnoopCompileCore/src/SnoopCompileCore.jl index 032dd8a8a..00d0c47f5 100644 --- a/SnoopCompileCore/src/SnoopCompileCore.jl +++ b/SnoopCompileCore/src/SnoopCompileCore.jl @@ -23,4 +23,8 @@ if VERSION >= v"1.6.0-DEV.1192" # https://github.com/JuliaLang/julia/pull/37136 include("snoopl.jl") end +if VERSION >= v"1.6.0-DEV.1192" # https://github.com/JuliaLang/julia/pull/37136 + include("snoop_all.jl") +end + end diff --git a/SnoopCompileCore/src/snoop_all.jl b/SnoopCompileCore/src/snoop_all.jl new file mode 100644 index 000000000..548deb818 --- /dev/null +++ b/SnoopCompileCore/src/snoop_all.jl @@ -0,0 +1,11 @@ +# TODO: Add `@snoopc` into the mix +macro snoop_all(csv_f, yaml_f, commands) + esc(quote + v = @snoopi_deep begin + @snoopl pspawn=false $csv_f $yaml_f begin + $commands + end + end; + v + end) +end \ No newline at end of file From ecdb2724308ad1ce2ee473404d656d6514a75221 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Jul 2021 11:15:09 -0400 Subject: [PATCH 3/8] Add `pspawn=` option to snoopc; add snoopc to snoop_all --- SnoopCompileCore/src/SnoopCompileCore.jl | 3 -- SnoopCompileCore/src/snoop_all.jl | 13 +++--- SnoopCompileCore/src/snoopc.jl | 54 ++++++++++++++++++------ SnoopCompileCore/src/snoopl.jl | 8 ++-- 4 files changed, 54 insertions(+), 24 deletions(-) diff --git a/SnoopCompileCore/src/SnoopCompileCore.jl b/SnoopCompileCore/src/SnoopCompileCore.jl index 00d0c47f5..1cbf8ffd6 100644 --- a/SnoopCompileCore/src/SnoopCompileCore.jl +++ b/SnoopCompileCore/src/SnoopCompileCore.jl @@ -21,9 +21,6 @@ end if VERSION >= v"1.6.0-DEV.1192" # https://github.com/JuliaLang/julia/pull/37136 include("snoopl.jl") -end - -if VERSION >= v"1.6.0-DEV.1192" # https://github.com/JuliaLang/julia/pull/37136 include("snoop_all.jl") end diff --git a/SnoopCompileCore/src/snoop_all.jl b/SnoopCompileCore/src/snoop_all.jl index 548deb818..37da06af9 100644 --- a/SnoopCompileCore/src/snoop_all.jl +++ b/SnoopCompileCore/src/snoop_all.jl @@ -1,11 +1,14 @@ # TODO: Add `@snoopc` into the mix -macro snoop_all(csv_f, yaml_f, commands) +macro snoop_all(snoopl_csv_f, snoopl_yaml_f, snoopc_csv_f, commands) + outsym = gensym(:output) esc(quote - v = @snoopi_deep begin - @snoopl pspawn=false $csv_f $yaml_f begin - $commands + @snoopl pspawn=false $snoopl_csv_f $snoopl_yaml_f begin + @snoopc pspawn=false $snoopc_csv_f begin + global outsym = @snoopi_deep begin + @eval $commands + end end end; - v + outsym end) end \ No newline at end of file diff --git a/SnoopCompileCore/src/snoopc.jl b/SnoopCompileCore/src/snoopc.jl index 08dc2c77d..3a0a91030 100644 --- a/SnoopCompileCore/src/snoopc.jl +++ b/SnoopCompileCore/src/snoopc.jl @@ -4,23 +4,45 @@ using Serialization """ ``` -@snoopc "compiledata.csv" begin - # Commands to execute, in a new process +@snoopc [pspawn=true] [String[""]] "compiledata.csv" begin + # Commands to execute, either in a new process if pspawn==true, or via eval if false. end ``` causes the julia compiler to log all functions compiled in the course of executing the commands to the file "compiledata.csv". This file can be used for the input to `SnoopCompile.read`. + +Julia flags can optionally be passed as a string or an array of strings, which will be set +on the newly spawned julia process if `pspawn=true`. If `pspawn=false`, setting +`julia_flags` will be ignored. + +If `pspawn=false`, the commands will be run in the same julia process, via `eval()` in +the current module. This will only report _new_ compilations, that haven't already been +cached in the current julia process, which can be (carefully) used to prune down the +results to only the code you are interested in. """ -macro snoopc(flags, filename, commands) - return :(snoopc($(esc(flags)), $(esc(filename)), $(QuoteNode(commands)))) +macro snoopc(args...) + @assert 4 >= length(args) >= 2 """Usage: @snoopl [args...] "snoopl.csv" "snoopl.yaml" commands""" + flags, (filename, commands) = args[1:end-2], args[end-1:end] + pspawn_expr, julia_flags = begin + if length(flags) == 2 + flags[1], flags[2] + elseif flags[1].head == :(=) && flags[1].args[1] == :pspawn + flags[1], String[] + else + :(pspawn=false), flags[1] + end + end + return :(snoopc($(esc(julia_flags)), $(esc(filename)), $(QuoteNode(commands)), $__module__; $(esc(pspawn_expr)))) end macro snoopc(filename, commands) return :(snoopc(String[], $(esc(filename)), $(QuoteNode(commands)))) end -function snoopc(flags, filename, commands) - println("Launching new julia process to run commands...") +function snoopc(flags, filename, commands, _module=nothing; pspawn=true) + if pspawn + println("Launching new julia process to run commands...") + end # addprocs will run the unmodified version of julia, so we # launch it as a command. code_object = """ @@ -29,8 +51,7 @@ function snoopc(flags, filename, commands) Core.eval(Main, deserialize(stdin)) end """ - process = open(`$(Base.julia_cmd()) $flags --eval $code_object`, stdout, write=true) - serialize(process, quote + record_and_run_quote = quote let io = open($filename, "w") ccall(:jl_dump_compiles, Nothing, (Ptr{Nothing},), io.handle) try @@ -40,9 +61,18 @@ function snoopc(flags, filename, commands) close(io) end end - exit() - end) - wait(process) - println("done.") + end + + if pspawn + process = open(`$(Base.julia_cmd()) $flags --eval $code_object`, stdout, write=true) + serialize(process, quote + $record_and_run_quote + exit() + end) + wait(process) + println("done.") + else + Core.eval(_module, record_and_run_quote) + end nothing end diff --git a/SnoopCompileCore/src/snoopl.jl b/SnoopCompileCore/src/snoopl.jl index 2e858d028..78bb32afa 100644 --- a/SnoopCompileCore/src/snoopl.jl +++ b/SnoopCompileCore/src/snoopl.jl @@ -5,7 +5,7 @@ using Serialization """ ``` @snoopl [jlflags="..."] [pspawn=true] "func_names.csv" "llvm_timings.yaml" begin - # Commands to execute, in a new process + # Commands to execute, either in a new process if pspawn==true, or via eval if false. end ``` causes the julia compiler to log timing information for LLVM optimization during the @@ -16,9 +16,9 @@ The logs contain the amount of time spent optimizing each "llvm module", and inf about each module, where a module is a collection of functions being optimized together. If `pspawn=false`, the commands will be run in the same julia process, via `eval()` in -the current module. This will only report LLVM optimizations for _new_ compilations, that -haven't already been cached in this process, which can be (carefully) used to pruned down -the results to only the code you are interested in. +the current module. This will only report _new_ compilations, that haven't already been +cached in the current julia process, which can be (carefully) used to prune down the +results to only the code you are interested in. """ macro snoopl(args...) @assert length(args) >= 3 """Usage: @snoopl [args...] "snoopl.csv" "snoopl.yaml" commands""" From 50c030a850e0084237b39cd09cdca8785844a06f Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Jul 2021 11:23:07 -0400 Subject: [PATCH 4/8] Add basic test for snoop_all. --- SnoopCompileCore/src/snoop_all.jl | 4 ++-- test/runtests.jl | 3 +++ test/snoop_all.jl | 32 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 test/snoop_all.jl diff --git a/SnoopCompileCore/src/snoop_all.jl b/SnoopCompileCore/src/snoop_all.jl index 37da06af9..e7d884345 100644 --- a/SnoopCompileCore/src/snoop_all.jl +++ b/SnoopCompileCore/src/snoop_all.jl @@ -2,8 +2,8 @@ macro snoop_all(snoopl_csv_f, snoopl_yaml_f, snoopc_csv_f, commands) outsym = gensym(:output) esc(quote - @snoopl pspawn=false $snoopl_csv_f $snoopl_yaml_f begin - @snoopc pspawn=false $snoopc_csv_f begin + @snoopc pspawn=false $snoopc_csv_f begin + @snoopl pspawn=false $snoopl_csv_f $snoopl_yaml_f begin global outsym = @snoopi_deep begin @eval $commands end diff --git a/test/runtests.jl b/test/runtests.jl index 75bc4fcf0..704367d54 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,6 +14,9 @@ if VERSION >= v"1.6.0-DEV.1192" # https://github.com/JuliaLang/julia/pull/37136 @testset "snoopl" begin include("snoopl.jl") end + @testset "snoop_all" begin + include("snoop_all.jl") + end end using SnoopCompile diff --git a/test/snoop_all.jl b/test/snoop_all.jl new file mode 100644 index 000000000..a23688f84 --- /dev/null +++ b/test/snoop_all.jl @@ -0,0 +1,32 @@ +using Test + +using SnoopCompile + +f(x) = 2^x + 100 + +@testset "basic snoop_all" begin + # First time not empty + tinf = SnoopCompileCore.@snoop_all "snoopl.csv" "snoopl.yaml" "snoopc.csv" f(2) + + @test length(collect(flatten(tinf))) > 1 + @test filesize("snoopl.csv") != 0 + @test filesize("snoopl.yaml") != 0 + @test filesize("snoopc.csv") != 0 + + rm("snoopl.csv") + rm("snoopl.yaml") + rm("snoopc.csv") + + # Second run is empty because f(x) is already compiled + tinf = SnoopCompileCore.@snoop_all "snoopl.csv" "snoopl.yaml" "snoopc.csv" f(2) + + @test length(collect(flatten(tinf))) == 1 + @test filesize("snoopl.csv") == 0 + @test filesize("snoopl.yaml") == 0 + @test filesize("snoopc.csv") == 0 + + rm("snoopl.csv") + rm("snoopl.yaml") + rm("snoopc.csv") +end + From e1795a13c1f86360561c633e0d372c9857b0c73a Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Jul 2021 11:38:47 -0400 Subject: [PATCH 5/8] Change `@snoop_all` to generate the output filenames ```julia julia> f(x) = 2^x+100 f (generic function with 1 method) julia> tinf, snoopl_csv, snoopl_yaml, snoopc_csv = SnoopCompileCore.@snoop_all "snoop_all-f" f(2) (InferenceTimingNode: 0.003273/0.003523 on Core.Compiler.Timings.ROOT() with 1 direct children, "snoop_all-f.snoopl.csv", "snoop_all-f.snoopl.yaml", "snoop_all-f.snoopc.csv") ``` --- SnoopCompileCore/src/snoop_all.jl | 11 +++++++---- test/snoop_all.jl | 30 ++++++++++++++++-------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/SnoopCompileCore/src/snoop_all.jl b/SnoopCompileCore/src/snoop_all.jl index e7d884345..723b1d1a1 100644 --- a/SnoopCompileCore/src/snoop_all.jl +++ b/SnoopCompileCore/src/snoop_all.jl @@ -1,14 +1,17 @@ -# TODO: Add `@snoopc` into the mix -macro snoop_all(snoopl_csv_f, snoopl_yaml_f, snoopc_csv_f, commands) +""" +""" +macro snoop_all(fname_prefix, commands) + snoopl_csv_f, snoopl_yaml_f, snoopc_csv_f = + "$fname_prefix.snoopl.csv", "$fname_prefix.snoopl.yaml", "$fname_prefix.snoopc.csv" outsym = gensym(:output) esc(quote @snoopc pspawn=false $snoopc_csv_f begin @snoopl pspawn=false $snoopl_csv_f $snoopl_yaml_f begin - global outsym = @snoopi_deep begin + global $outsym = @snoopi_deep begin @eval $commands end end end; - outsym + $outsym, $snoopl_csv_f, $snoopl_yaml_f, $snoopc_csv_f end) end \ No newline at end of file diff --git a/test/snoop_all.jl b/test/snoop_all.jl index a23688f84..dd321843f 100644 --- a/test/snoop_all.jl +++ b/test/snoop_all.jl @@ -6,27 +6,29 @@ f(x) = 2^x + 100 @testset "basic snoop_all" begin # First time not empty - tinf = SnoopCompileCore.@snoop_all "snoopl.csv" "snoopl.yaml" "snoopc.csv" f(2) + tinf, snoopl_csv, snoopl_yaml, snoopc_csv = + SnoopCompileCore.@snoop_all "snoop_all-f" f(2) @test length(collect(flatten(tinf))) > 1 - @test filesize("snoopl.csv") != 0 - @test filesize("snoopl.yaml") != 0 - @test filesize("snoopc.csv") != 0 + @test filesize(snoopl_csv) != 0 + @test filesize(snoopl_yaml) != 0 + @test filesize(snoopc_csv) != 0 - rm("snoopl.csv") - rm("snoopl.yaml") - rm("snoopc.csv") + rm(snoopl_csv) + rm(snoopl_yaml) + rm(snoopc_csv) # Second run is empty because f(x) is already compiled - tinf = SnoopCompileCore.@snoop_all "snoopl.csv" "snoopl.yaml" "snoopc.csv" f(2) + tinf, snoopl_csv, snoopl_yaml, snoopc_csv = + SnoopCompileCore.@snoop_all "snoop_all-f" f(2) @test length(collect(flatten(tinf))) == 1 - @test filesize("snoopl.csv") == 0 - @test filesize("snoopl.yaml") == 0 - @test filesize("snoopc.csv") == 0 + @test filesize(snoopl_csv) == 0 + @test filesize(snoopl_yaml) == 0 + @test filesize(snoopc_csv) == 0 - rm("snoopl.csv") - rm("snoopl.yaml") - rm("snoopc.csv") + rm(snoopl_csv) + rm(snoopl_yaml) + rm(snoopc_csv) end From 24c8c475f480fdb68d86fec0780205c8a18f0f00 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Jul 2021 11:48:22 -0400 Subject: [PATCH 6/8] Add docstring to snoop_all --- SnoopCompileCore/src/snoop_all.jl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/SnoopCompileCore/src/snoop_all.jl b/SnoopCompileCore/src/snoop_all.jl index 723b1d1a1..7feafc0e7 100644 --- a/SnoopCompileCore/src/snoop_all.jl +++ b/SnoopCompileCore/src/snoop_all.jl @@ -1,17 +1,31 @@ """ +``` +SnoopCompileCore.@snoop_all "output_filename" begin + # Commands to execute +end +``` + +Runs provided commands *in the current process*, and records snoop compilation results for +all phases of the compiler supported by SnoopCompile: Inference, LLVM Optimization, Codegen. + +Returns a tuple of four values: +- `tinf`: Results from `@snoopi_deep` +- `"snoopl.csv"`: File 1 of results for `@snoopl` +- `"snoopl.yaml"`: File 2 of results for `@snoopl` +- `"snoopc.csv"`: Results file for `@snoopc` """ macro snoop_all(fname_prefix, commands) snoopl_csv_f, snoopl_yaml_f, snoopc_csv_f = "$fname_prefix.snoopl.csv", "$fname_prefix.snoopl.yaml", "$fname_prefix.snoopc.csv" - outsym = gensym(:output) + tinf = gensym(:tinf) esc(quote @snoopc pspawn=false $snoopc_csv_f begin @snoopl pspawn=false $snoopl_csv_f $snoopl_yaml_f begin - global $outsym = @snoopi_deep begin + global $tinf = @snoopi_deep begin @eval $commands end end end; - $outsym, $snoopl_csv_f, $snoopl_yaml_f, $snoopc_csv_f + $tinf, $snoopl_csv_f, $snoopl_yaml_f, $snoopc_csv_f end) end \ No newline at end of file From 995ffd2b03189f6c2a358cd04a5b1d83ae85475b Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Jul 2021 12:09:29 -0400 Subject: [PATCH 7/8] Simplify process spawning code --- SnoopCompileCore/src/snoopc.jl | 10 ++++------ SnoopCompileCore/src/snoopl.jl | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/SnoopCompileCore/src/snoopc.jl b/SnoopCompileCore/src/snoopc.jl index 3a0a91030..f9ada0afe 100644 --- a/SnoopCompileCore/src/snoopc.jl +++ b/SnoopCompileCore/src/snoopc.jl @@ -43,13 +43,9 @@ function snoopc(flags, filename, commands, _module=nothing; pspawn=true) if pspawn println("Launching new julia process to run commands...") end - # addprocs will run the unmodified version of julia, so we - # launch it as a command. code_object = """ using Serialization - while !eof(stdin) - Core.eval(Main, deserialize(stdin)) - end + Core.eval(Main, deserialize(IOBuffer(read(stdin)))) """ record_and_run_quote = quote let io = open($filename, "w") @@ -64,11 +60,13 @@ function snoopc(flags, filename, commands, _module=nothing; pspawn=true) end if pspawn + # addprocs will run the unmodified version of julia, so we + # launch it as a command. process = open(`$(Base.julia_cmd()) $flags --eval $code_object`, stdout, write=true) serialize(process, quote $record_and_run_quote - exit() end) + close(process) wait(process) println("done.") else diff --git a/SnoopCompileCore/src/snoopl.jl b/SnoopCompileCore/src/snoopl.jl index 78bb32afa..2f6834c51 100644 --- a/SnoopCompileCore/src/snoopl.jl +++ b/SnoopCompileCore/src/snoopl.jl @@ -38,9 +38,7 @@ function snoopl(func_file, llvm_file, commands, _module; pspawn=true, jlflags="" # launch it as a command. code_object = """ using Serialization - while !eof(stdin) - Core.eval(Main, deserialize(stdin)) - end + Core.eval(Main, deserialize(IOBuffer(read(stdin)))) """ record_and_run_quote = quote let func_io = open($func_file, "w"), llvm_io = open($llvm_file, "w") @@ -59,10 +57,11 @@ function snoopl(func_file, llvm_file, commands, _module; pspawn=true, jlflags="" if pspawn process = open(`$(Base.julia_cmd()) $jlflags --eval $code_object`, stdout, write=true) + @info process serialize(process, quote $record_and_run_quote - exit() end) + close(process) wait(process) println("done.") else From c06d84e0fcc245c1c539cff0ef74cfed7d1f3bc8 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Mon, 26 Jul 2021 19:21:12 -0400 Subject: [PATCH 8/8] Add documentation links & example to docstring --- SnoopCompileCore/src/snoop_all.jl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/SnoopCompileCore/src/snoop_all.jl b/SnoopCompileCore/src/snoop_all.jl index 7feafc0e7..176c82bef 100644 --- a/SnoopCompileCore/src/snoop_all.jl +++ b/SnoopCompileCore/src/snoop_all.jl @@ -9,10 +9,15 @@ Runs provided commands *in the current process*, and records snoop compilation r all phases of the compiler supported by SnoopCompile: Inference, LLVM Optimization, Codegen. Returns a tuple of four values: -- `tinf`: Results from `@snoopi_deep` -- `"snoopl.csv"`: File 1 of results for `@snoopl` -- `"snoopl.yaml"`: File 2 of results for `@snoopl` -- `"snoopc.csv"`: Results file for `@snoopc` +- `tinf`: Results from `@snoopi_deep` - See https://timholy.github.io/SnoopCompile.jl/stable/snoopi_deep/#Viewing-the-results +- `"snoopl.csv"`: File 1 of results for `@snoopl` - See https://timholy.github.io/SnoopCompile.jl/stable/reference/#SnoopCompile.read_snoopl +- `"snoopl.yaml"`: File 2 of results for `@snoopl` - See https://timholy.github.io/SnoopCompile.jl/stable/reference/#SnoopCompile.read_snoopl +- `"snoopc.csv"`: Results file for `@snoopc` - See https://timholy.github.io/SnoopCompile.jl/stable/snoopc/ + +# Example +```julia +julia> tinf, snoopl_csv, snoopl_yaml, snoopc_csv = @snoop_all "foo" foo(1, 2, 3); +``` """ macro snoop_all(fname_prefix, commands) snoopl_csv_f, snoopl_yaml_f, snoopc_csv_f = @@ -28,4 +33,4 @@ macro snoop_all(fname_prefix, commands) end; $tinf, $snoopl_csv_f, $snoopl_yaml_f, $snoopc_csv_f end) -end \ No newline at end of file +end