proc,dwarf: cache debug.Entry objects (#1931)
Instead of rescanning debug_info every time we want to read a function (either to find inlined calls or its variables) cache the tree of dwarf.Entry that we would generate and use that. Benchmark before: BenchmarkConditionalBreakpoints-4 1 5164689165 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 4817425836 ns/op Updates #1549
Showing
... | ... | @@ -6,6 +6,8 @@ require ( |
github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5 | ||
github.com/cpuguy83/go-md2man v1.0.10 // indirect | ||
github.com/google/go-dap v0.2.0 | ||
github.com/cpuguy83/go-md2man v1.0.8 // indirect | ||
github.com/hashicorp/golang-lru v0.5.4 | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561 | ||
github.com/mattn/go-isatty v0.0.3 | ||
... | ... |
... | ... | @@ -10,6 +10,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM |
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
github.com/google/go-dap v0.2.0 h1:whjIGQRumwbR40qRU7CEKuFLmePUUc2s4Nt9DoXXxWk= | ||
github.com/google/go-dap v0.2.0/go.mod h1:5q8aYQFnHOAZEMP+6vmq25HKYAEwE+LF5yh7JKrrhSQ= | ||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= | ||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= | ||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= | ||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= | ||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= | ||
... | ... |
pkg/dwarf/godwarf/tree.go
0 → 100644
pkg/dwarf/godwarf/tree_test.go
0 → 100644
想要评论请 注册 或 登录