timholy / SnoopCompile.jl

Provide insights about latency (TTFX) for Julia packages
https://timholy.github.io/SnoopCompile.jl/dev/
Other
309 stars 48 forks source link

snoopi_deep: check that mi.def is a Method #151

Closed timholy closed 3 years ago

timholy commented 3 years ago

The def field of Core.MethodInstance is typed as Union{Method,Module}. Consequently, we should not assume that it's a Method.

Unfortunately I've not been able to come up with a simple test that fails without this change, though I have seen failures in real-world usage.

timholy commented 3 years ago

Let's see if this passes with #153 merged.