cmd/geth, mobile: add memsize to pprof server (#16532)

* cmd/geth, mobile: add memsize to pprof server

This is a temporary change, to be reverted before the next release.

* cmd/geth: fix variable name
This commit is contained in:
Felix Lange
2018-04-23 15:20:39 +02:00
committed by Péter Szilágyi
parent 9586f2acc7
commit e7067be94f
13 changed files with 834 additions and 10 deletions

16
vendor/github.com/fjl/memsize/doc.go generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/*
Package memsize computes the size of your object graph.
So you made a spiffy algorithm and it works really well, but geez it's using
way too much memory. Where did it all go? memsize to the rescue!
To get started, find a value that references all your objects and scan it.
This traverses the graph, counting sizes per type.
sizes := memsize.Scan(myValue)
fmt.Println(sizes.Total)
memsize can handle cycles just fine and tracks both private and public struct fields.
Unfortunately function closures cannot be inspected in any way.
*/
package memsize