JuliaPerf / PProf.jl

Export Julia profiles to the pprof format
MIT License
155 stars 17 forks source link

Add `full_signatures::Bool` arg to print frames with full argument types #31

Closed NHDaly closed 3 years ago

NHDaly commented 3 years ago

Fixes https://github.com/JuliaPerf/PProf.jl/issues/24

It turns out that (as far as I can tell), setting a separate Name and OriginalName in the proto is enough to cause google/pprof to not modify the user-supplied Name.

This PR uses this trick to prevent name mangling in pprof, and provides an optional argument to control whether we emit only the generic function name or the full method signature for the given method.

NHDaly commented 3 years ago

I've asked about this discovery here: https://github.com/google/pprof/issues/573

Hopefully this is indeed a good enough solution! 🤞

NHDaly commented 3 years ago

I currently have full_signatures = false as the default, to preserve old behavior, but then i'm thinking maybe we release a v2.0.0 and flip the default to true? 😁 Because it just seems strictly better!