diff --git a/dbg/keep.go b/dbg/keep.go new file mode 100644 index 0000000..4744c85 --- /dev/null +++ b/dbg/keep.go @@ -0,0 +1 @@ +package dbg diff --git a/dbg/pprof_cgo.go b/dbg/pprof_cgo.go new file mode 100644 index 0000000..28ddf5e --- /dev/null +++ b/dbg/pprof_cgo.go @@ -0,0 +1,8 @@ +//go:build debug +// +build debug + +package dbg + +import ( + _ "github.com/benesch/cgosymbolizer" +) diff --git a/go.mod b/go.mod index c57a9ef..3b68f44 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,8 @@ module github.com/erigontech/mdbx-go go 1.15 + +require ( + github.com/benesch/cgosymbolizer v0.0.0-20190515212042-bec6fe6e597b + github.com/ianlancetaylor/cgosymbolizer v0.0.0-20240503222823-736c933a666d // indirect +) diff --git a/mdbx/env.go b/mdbx/env.go index 42860c1..00296d9 100644 --- a/mdbx/env.go +++ b/mdbx/env.go @@ -13,6 +13,8 @@ import ( "sync" "time" "unsafe" + + _ "github.com/erigontech/mdbx-go/dbg" ) // success is a value returned from the MDBX API to indicate a successful call.