Profiling Revised Base

After running Revise.track(Base) and editing files in Base, @profile & Profile.print() give wrong line numbers. Is there a way around this?

This is very weird. I use this workflow somewhat regularly, and it works for me.

1 Like

Strange. For example, I added a new function radix_sort! to sort.jl. Then I profiled some code that should not have run radix_sort!, and had one line of the profile output: ā•Ž ā•Ž ā•Ž ā•Ž ā•Ž 582 @Base/sort.jl:665; sort!, which is strange because line 665 is a line in the radix_sort! function and the radix_sort! function does not call sort!

My eddited sort.jl is sort.jl - Pastebin.com
Iā€™m on julia version

Julia Version 1.8.0-DEV.1472
Commit 7ccc83ebaf (2022-02-09 01:36 UTC)

and I run

Revise.track(Base)
using Profile
@profile for _ in 1:10^7 sort!(rand(Char, 3)) end
Profile.clear()
@profile for _ in 1:10^7 sort!(rand(Char, 3)) end
Profile.print()

I can also reproduce on 1.7.2