diff --git a/godeltaprof/block.go b/godeltaprof/block.go index 10c9d00..9a7000c 100644 --- a/godeltaprof/block.go +++ b/godeltaprof/block.go @@ -50,7 +50,6 @@ func NewMutexProfiler() *BlockProfiler { } } -// todo document func NewMutexProfilerWithOptions(options ProfileOptions) *BlockProfiler { return &BlockProfiler{ runtimeProfile: runtime.MutexProfile, @@ -83,7 +82,6 @@ func NewBlockProfiler() *BlockProfiler { } } -// todo document func NewBlockProfilerWithOptions(options ProfileOptions) *BlockProfiler { return &BlockProfiler{ runtimeProfile: runtime.BlockProfile, diff --git a/godeltaprof/compat/stub_go20_test.go b/godeltaprof/compat/stub_go20_test.go index ba0d649..69facb8 100644 --- a/godeltaprof/compat/stub_go20_test.go +++ b/godeltaprof/compat/stub_go20_test.go @@ -1,24 +1,16 @@ -//go:build go1.20 +//go:build go1.16 && !go1.21 package compat -import ( - "testing" -) +import "testing" func TestRuntimeFrameSymbolName(t *testing.T) { - checkSignature(t, "runtime/pprof", - "runtime_FrameSymbolName", - "func runtime/pprof.runtime_FrameSymbolName(f *runtime.Frame) string") checkSignature(t, "github.com/grafana/pyroscope-go/godeltaprof/internal/pprof", "runtime_FrameSymbolName", "func github.com/grafana/pyroscope-go/godeltaprof/internal/pprof.runtime_FrameSymbolName(f *runtime.Frame) string") } func TestRuntimeFrameStartLine(t *testing.T) { - checkSignature(t, "runtime/pprof", - "runtime_FrameStartLine", - "func runtime/pprof.runtime_FrameStartLine(f *runtime.Frame) int") checkSignature(t, "github.com/grafana/pyroscope-go/godeltaprof/internal/pprof", "runtime_FrameStartLine", "func github.com/grafana/pyroscope-go/godeltaprof/internal/pprof.runtime_FrameStartLine(f *runtime.Frame) int") diff --git a/godeltaprof/compat/stub_go19_test.go b/godeltaprof/compat/stub_go21_test.go similarity index 64% rename from godeltaprof/compat/stub_go19_test.go rename to godeltaprof/compat/stub_go21_test.go index 1d4f5f4..eda7f6b 100644 --- a/godeltaprof/compat/stub_go19_test.go +++ b/godeltaprof/compat/stub_go21_test.go @@ -1,16 +1,24 @@ -//go:build go1.16 && !go1.20 +//go:build go1.21 package compat -import "testing" +import ( + "testing" +) func TestRuntimeFrameSymbolName(t *testing.T) { + checkSignature(t, "runtime/pprof", + "runtime_FrameSymbolName", + "func runtime/pprof.runtime_FrameSymbolName(f *runtime.Frame) string") checkSignature(t, "github.com/grafana/pyroscope-go/godeltaprof/internal/pprof", "runtime_FrameSymbolName", "func github.com/grafana/pyroscope-go/godeltaprof/internal/pprof.runtime_FrameSymbolName(f *runtime.Frame) string") } func TestRuntimeFrameStartLine(t *testing.T) { + checkSignature(t, "runtime/pprof", + "runtime_FrameStartLine", + "func runtime/pprof.runtime_FrameStartLine(f *runtime.Frame) int") checkSignature(t, "github.com/grafana/pyroscope-go/godeltaprof/internal/pprof", "runtime_FrameStartLine", "func github.com/grafana/pyroscope-go/godeltaprof/internal/pprof.runtime_FrameStartLine(f *runtime.Frame) int") diff --git a/godeltaprof/heap.go b/godeltaprof/heap.go index 024c7ad..f619307 100644 --- a/godeltaprof/heap.go +++ b/godeltaprof/heap.go @@ -41,7 +41,6 @@ func NewHeapProfiler() *HeapProfiler { }} } -// todo document func NewHeapProfilerWithOptions(options ProfileOptions) *HeapProfiler { return &HeapProfiler{ impl: pprof.DeltaHeapProfiler{