Skip to content

Commit

Permalink
internal/debug: remove memsize (#30253)
Browse files Browse the repository at this point in the history
commit ethereum/go-ethereum@e467577.

Removing because memsize will very likely be broken by Go 1.23. See
fjl/memsize#4
  • Loading branch information
fjl authored and minh-bq committed Aug 29, 2024
1 parent cef298f commit d39aa7f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions cmd/ronin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ func setupPyroScopeProfiler(ctx *cli.Context) (*pyroscope.Profiler, error) {
// it unlocks any requested accounts, and starts the RPC/IPC interfaces and the
// miner.
func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend) {
debug.Memsize.Add("node", stack)

// Start up the node itself
utils.StartNode(ctx, stack)

Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ require (
github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3
github.com/edsrzf/mmap-go v1.1.0
github.com/fatih/color v1.9.0
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08
github.com/go-stack/stack v1.8.1
github.com/golang/protobuf v1.5.4
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/ferranbt/fastssz v0.1.3 h1:ZI+z3JH05h4kgmFXdHuR1aWYsgrg7o+Fw7/NCzM16Mo=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
Expand Down
4 changes: 0 additions & 4 deletions internal/debug/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/metrics/exp"
"github.com/fjl/memsize/memsizeui"
"github.com/mattn/go-colorable"
"github.com/mattn/go-isatty"

"github.com/urfave/cli/v2"
)

var Memsize memsizeui.Handler

var (
verbosityFlag = cli.IntFlag{
Name: "verbosity",
Expand Down Expand Up @@ -191,7 +188,6 @@ func StartPProf(address string, withMetrics bool) {
if withMetrics {
exp.Exp(metrics.DefaultRegistry)
}
http.Handle("/memsize/", http.StripPrefix("/memsize", &Memsize))
log.Info("Starting pprof server", "addr", fmt.Sprintf("http://%s/debug/pprof", address))
go func() {
if err := http.ListenAndServe(address, nil); err != nil {
Expand Down
5 changes: 2 additions & 3 deletions mobile/geth.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ package geth
import (
"encoding/json"
"fmt"
"github.com/ethereum/go-ethereum/common"
"path/filepath"

"github.com/ethereum/go-ethereum/common"

"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/eth/ethconfig"
Expand Down Expand Up @@ -150,8 +151,6 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
return nil, err
}

debug.Memsize.Add("node", rawStack)

var genesis *core.Genesis
if config.EthereumGenesis != "" {
// Parse the user supplied genesis spec if not mainnet
Expand Down

0 comments on commit d39aa7f

Please sign in to comment.