2020. március 30., hétfő 19:44:05 UTC+2 időpontban Nitish Saboo a következőt írta: > > Hi, > > Requesting valuable inputs on this. > > Thanks, > Nitish > > On Thu, Mar 26, 2020 at 5:08 PM Nitish Saboo <nitish...@gmail.com > <javascript:>> wrote: > >> Hi Tamas, >> >> 1) There is no such option '--heap_inuse'. We have an -*-inuse_space* >> option. Is this what you are talking about? >> >> nsaboo@ubuntu:~/Desktop/memprof$ go tool pprof --inuse_space main >> mem3.prof >> Fetched 1 source profiles out of 2 >> File: main >> Build ID: 99b8f2b91a4e037cf4a622aa32f2c1866764e7eb >> Type: inuse_space >> Time: Mar 22, 2020 at 6:32am (PDT) >> Entering interactive mode (type "help" for commands, "o" for options) >> (pprof) o >> call_tree = false >> compact_labels = true >> cumulative = flat //: [cum | flat] >> divide_by = 1 >> drop_negative = false >> edgefraction = 0.001 >> focus = "" >> granularity = filefunctions //: [addresses | >> filefunctions | files | functions | lines] >> hide = "" >> ignore = "" >> mean = false >> nodecount = -1 //: default >> nodefraction = 0.005 >> noinlines = false >> normalize = false >> output = "" >> prune_from = "" >> relative_percentages = false >> sample_index = inuse_space //: [alloc_objects | >> alloc_space | inuse_objects | inuse_space] >> show = "" >> show_from = "" >> tagfocus = "" >> taghide = "" >> tagignore = "" >> tagshow = "" >> trim = true >> trim_path = "" >> unit = minimum >> >> 2) When I don't pass the flag it defaults to *--inuse_space*: >> >> File: main >> Build ID: 99b8f2b91a4e037cf4a622aa32f2c1866764e7eb >> Type: inuse_space >> Time: Mar 22, 2020 at 6:32am (PDT) >> Entering interactive mode (type "help" for commands, "o" for options) >> (pprof) top >> Showing nodes accounting for 3303.21kB, 100% of 3303.21kB total >> Showing top 10 nodes out of 28 >> flat flat% sum% cum cum% >> 1762.94kB 53.37% 53.37% 1762.94kB 53.37% runtime/pprof.StartCPUProfile >> 516.01kB 15.62% 68.99% 516.01kB 15.62% >> runtime/pprof.(*profMap).lookup >> 512.19kB 15.51% 84.50% 512.19kB 15.51% runtime.malg >> 512.08kB 15.50% 100% 512.08kB 15.50% >> crypto/x509/pkix.(*Name).FillFromRDNSequence >> 0 0% 100% 512.08kB 15.50% crypto/tls.(*Conn).Handshake >> 0 0% 100% 512.08kB 15.50% >> crypto/tls.(*Conn).clientHandshake >> 0 0% 100% 512.08kB 15.50% >> crypto/tls.(*Conn).verifyServerCertificate >> 0 0% 100% 512.08kB 15.50% >> crypto/tls.(*clientHandshakeState).doFullHandshake >> 0 0% 100% 512.08kB 15.50% >> crypto/tls.(*clientHandshakeState).handshake >> 0 0% 100% 512.08kB 15.50% >> crypto/x509.(*CertPool).AppendCertsFromPEM >> >> Please correct me if I am missing something here. >> >> Thanks, >> Nitish >> >> >>> " Showing nodes accounting for 3303.21kB, 100% of 3303.21kB total"
means Go has occupies only about 3.3MB of memory - if you see waay more RSS, than its somewhere else. If you use cgo, than that's the principal suspect. I mean your C code. Tamás -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/06b987a8-230b-4b66-bd9f-9805f9277ddd%40googlegroups.com.