Skip to content

Commit

Permalink
Revert "FlameGraphs: Handle function names with strings in them (e.g.…
Browse files Browse the repository at this point in the history
… `var"#foo"`)"

This reverts commit e3f055c.

Undo this, and fix it in upstream `google/pprof` instead
  • Loading branch information
NHDaly committed Oct 3, 2020
1 parent e3f055c commit 7ec85c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/flamegraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ function pprof(fg::Node{NodeData},
if linfo !== nothing && linfo isa Core.MethodInstance
meth = linfo.def
file = string(meth.file)
# HACK: Apparently proto doesn't escape func names with `"` in them ... >.<
funcProto.name = enter!(repr(string(meth.module, ".", meth.name))[2:end-1])
funcProto.name = enter!(string(meth.module, ".", meth.name))
funcProto.start_line = convert(Int64, meth.line)
else
# frame.linfo either nothing or CodeInfo, either way fallback
# (This could be because we are `from_c`)
file = string(frame.file)
# HACK: Apparently proto doesn't escape func names with `"` in them ... >.<
funcProto.name = enter!(repr(string(frame.func))[2:end-1])
funcProto.name = enter!(string(frame.func))
funcProto.start_line = convert(Int64, frame.line) # TODO: Get start_line properly
end
file = Base.find_source_file(file)
Expand Down

0 comments on commit 7ec85c2

Please sign in to comment.