From 765c32838879b1e6fbd69484790a1f823a526ddf Mon Sep 17 00:00:00 2001 From: Tolya Korniltsev Date: Sun, 9 Jul 2023 17:04:19 +0700 Subject: [PATCH] fix(pprof): format pyspy stacktraces with filenames - same as rbspy (#1986) --- pkg/convert/pprof/format.go | 2 +- pkg/convert/pprof/streaming/parser_streaming.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/convert/pprof/format.go b/pkg/convert/pprof/format.go index 7c7effeae2..574fcb61d5 100644 --- a/pkg/convert/pprof/format.go +++ b/pkg/convert/pprof/format.go @@ -33,7 +33,7 @@ func (RbspyFormatter) format(x *tree.Profile, fn *tree.Function, line *tree.Line } func StackFrameFormatterForSpyName(spyName string) StackFrameFormatter { - if spyName == "rbspy" { + if spyName == "rbspy" || spyName == "pyspy" { return RbspyFormatter{} } return UnsafeFunctionNameFormatter{} diff --git a/pkg/convert/pprof/streaming/parser_streaming.go b/pkg/convert/pprof/streaming/parser_streaming.go index 6a9d359562..abfc28a8ea 100644 --- a/pkg/convert/pprof/streaming/parser_streaming.go +++ b/pkg/convert/pprof/streaming/parser_streaming.go @@ -464,7 +464,7 @@ func grow[T any](a arenahelper.ArenaWrapper, it []T, n int) []T { } func StackFrameFormatterForSpyName(spyName string) StackFormatter { - if spyName == "rbspy" { + if spyName == "rbspy" || spyName == "pyspy" { return StackFrameFormatterRuby } return StackFrameFormatterGo