Profile.print() lines too long

question

#1

I am profiling some code, using the statistical profiler from Base, augmented with ProfileView.jl. The latter shows some functions at around depth 4-5 in the call stack that are not type stable (red).

I thought I would investigate by calling @code_warntype, but my problem is that Profile.print() lines are too long, eg:

/home/tamas/research/structural-labor-II/DurationModels.jl:77; OLS_estimate(::Array{ForwardDiff.Dual{ForwardDiff.Tag{DurationModels.DurationModel{Float64,Di...

where the ... is part of the truncated output. How can I figure out the type of the call to replicate the problem? Any general advice on this is also appreciated.


#2

https://docs.julialang.org/en/latest/manual/profile/#Options-for-controlling-the-display-of-profile-results-1

"
File/function names are sometimes truncated (with …), and indentation is truncated with a +n at the beginning, where n is the number of extra spaces that would have been inserted, had there been room. If you want a complete profile of deeply-nested code, often a good idea is to save to a file using a wide displaysize in an IOContext:

open("/tmp/prof.txt", "w") do s
    Profile.print(IOContext(s, :displaysize => (24, 500)))
end

"