Skip to content

Commit ae3aad4

Browse files
Fix InterpreterIP reference (#404)
* Fix InterpreterIP reference * fix CI arch on macos * test nightly
1 parent 41b506e commit ae3aad4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/ci.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,16 @@ jobs:
2323
- '1.10'
2424
- '1'
2525
- 'pre'
26+
- 'nightly'
2627
os:
2728
- ubuntu-latest
2829
- macOS-latest
2930
- windows-latest
30-
arch:
31-
- x64
3231
steps:
3332
- uses: actions/checkout@v4
3433
- uses: julia-actions/setup-julia@v2
3534
with:
3635
version: ${{ matrix.version }}
37-
arch: ${{ matrix.arch }}
3836
show-versioninfo: ${{ matrix.version == 'nightly' }}
3937
- uses: actions/cache@v4
4038
env:

src/parcel_snoop_inference.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ isROOT(node::InferenceTimingNode) = isROOT(node.mi_timing)
3131
getroot(node::InferenceTimingNode) = isdefined(node.parent, :parent) ? getroot(node.parent) : node
3232

3333
# Record instruction pointers we've already looked up (performance optimization)
34-
const lookups = Dict{Union{UInt, Core.Compiler.InterpreterIP}, Vector{StackTraces.StackFrame}}()
34+
const lookups = if isdefined(Core.Compiler, :InterpreterIP)
35+
Dict{Union{UInt, Core.Compiler.InterpreterIP}, Vector{StackTraces.StackFrame}}()
36+
else
37+
# Julia 1.12+
38+
Dict{Union{UInt, Base.InterpreterIP}, Vector{StackTraces.StackFrame}}()
39+
end
3540
lookups_key(ip) = ip
3641
lookups_key(ip::Ptr{Nothing}) = UInt(ip)
3742

0 commit comments

Comments
 (0)