Skip to content

Commit 38c66c9

Browse files
minh-bqfjl
andauthored
internal/debug: remove memsize (#30253) (#549)
commit ethereum/go-ethereum@e467577. Removing because memsize will very likely be broken by Go 1.23. See fjl/memsize#4 Co-authored-by: Felix Lange <[email protected]>
1 parent 04069c8 commit 38c66c9

File tree

5 files changed

+2
-12
lines changed

5 files changed

+2
-12
lines changed

cmd/ronin/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,6 @@ func setupPyroScopeProfiler(ctx *cli.Context) (*pyroscope.Profiler, error) {
426426
// it unlocks any requested accounts, and starts the RPC/IPC interfaces and the
427427
// miner.
428428
func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend) {
429-
debug.Memsize.Add("node", stack)
430-
431429
// Start up the node itself
432430
utils.StartNode(ctx, stack)
433431

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ require (
2121
github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3
2222
github.com/edsrzf/mmap-go v1.1.0
2323
github.com/fatih/color v1.9.0
24-
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5
2524
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08
2625
github.com/go-stack/stack v1.8.1
2726
github.com/golang/protobuf v1.5.4

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
238238
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
239239
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
240240
github.com/ferranbt/fastssz v0.1.3 h1:ZI+z3JH05h4kgmFXdHuR1aWYsgrg7o+Fw7/NCzM16Mo=
241-
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
242-
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
243241
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
244242
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
245243
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=

internal/debug/flags.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@ import (
2727
"github.com/ethereum/go-ethereum/log"
2828
"github.com/ethereum/go-ethereum/metrics"
2929
"github.com/ethereum/go-ethereum/metrics/exp"
30-
"github.com/fjl/memsize/memsizeui"
3130
"github.com/mattn/go-colorable"
3231
"github.com/mattn/go-isatty"
3332

3433
"github.com/urfave/cli/v2"
3534
)
3635

37-
var Memsize memsizeui.Handler
38-
3936
var (
4037
verbosityFlag = cli.IntFlag{
4138
Name: "verbosity",
@@ -191,7 +188,6 @@ func StartPProf(address string, withMetrics bool) {
191188
if withMetrics {
192189
exp.Exp(metrics.DefaultRegistry)
193190
}
194-
http.Handle("/memsize/", http.StripPrefix("/memsize", &Memsize))
195191
log.Info("Starting pprof server", "addr", fmt.Sprintf("http://%s/debug/pprof", address))
196192
go func() {
197193
if err := http.ListenAndServe(address, nil); err != nil {

mobile/geth.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ package geth
2222
import (
2323
"encoding/json"
2424
"fmt"
25-
"github.com/ethereum/go-ethereum/common"
2625
"path/filepath"
2726

27+
"github.com/ethereum/go-ethereum/common"
28+
2829
"github.com/ethereum/go-ethereum/core"
2930
"github.com/ethereum/go-ethereum/eth/downloader"
3031
"github.com/ethereum/go-ethereum/eth/ethconfig"
@@ -150,8 +151,6 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
150151
return nil, err
151152
}
152153

153-
debug.Memsize.Add("node", rawStack)
154-
155154
var genesis *core.Genesis
156155
if config.EthereumGenesis != "" {
157156
// Parse the user supplied genesis spec if not mainnet

0 commit comments

Comments
 (0)