We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49e3aec commit dd8d3c7Copy full SHA for dd8d3c7
stdlib/Profile/src/Profile.jl
@@ -214,10 +214,14 @@ function retrieve()
214
end
215
216
function getdict(data::Vector{UInt})
217
- # Lookup is expensive, so do it only once per ip.
218
- udata = unique(data)
219
dict = LineInfoDict()
220
- for ip in udata
+ return getdict!(dict, data)
+end
+
221
+function getdict!(dict::LineInfoDict, data::Vector{UInt})
222
+ for ip in data
223
+ # Lookup is expensive, so do it only once per ip.
224
+ haskey(dict, UInt64(ip)) && continue
225
st = lookup(convert(Ptr{Cvoid}, ip))
226
# To correct line numbers for moving code, put it in the form expected by
227
# Base.update_stackframes_callback[]
0 commit comments