Skip to content

Commit

Permalink
internal/debug: remove memsize (#30253) (#549)
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

Co-authored-by: Felix Lange <[email protected]>
  • Loading branch information
minh-bq and fjl authored Aug 29, 2024
1 parent 04069c8 commit 38c66c9
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 38c66c9

Please sign in to comment.