FAQ
I run my program in Linux inside VirtualBox, installed on Windows 7.

     Linux nico-Qiana-Xfce 3.13.0-24-generic #47-Ubuntu SMP Fri May 2
23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

     go version go1.3.1 linux/amd64


I have made this small program:

     http://play.golang.org/p/gtQJ8et_1w

When I run it, I find "ExternalCode" at top of pprof listing.

nico@nico-Qiana-Xfce ~/z_go/src/inut/inut15 $ time ./inut15
-cpuprofile=myprof.prof
i=100000000, r=100000000, a=100000000

real 0m22.885s
user 0m13.213s
sys 0m9.412s

nico@nico-Qiana-Xfce ~/z_go/src/inut/inut15 $ go tool pprof -text ./inut15
myprof.prof
Total: 2197 samples
     1617 73.6% 73.6% 1617 73.6% ExternalCode
      425 19.3% 92.9% 425 19.3% runtime.usleep
       50 2.3% 95.2% 93 4.2% runtime.mallocgc
       26 1.2% 96.4% 26 1.2% runtime.MSpan_Sweep
       24 1.1% 97.5% 24 1.1% runtime.futex
       17 0.8% 98.3% 110 5.0% runtime.new
       12 0.5% 98.8% 12 0.5% scanblock
        8 0.4% 99.2% 118 5.4% main.main
        3 0.1% 99.3% 3 0.1% runtime.memclr
        2 0.1% 99.4% 2 0.1% flushptrbuf
        2 0.1% 99.5% 3 0.1% runtime.gentraceback
        1 0.0% 99.5% 15 0.7% MCentral_Grow
        1 0.0% 99.6% 1 0.0% flushallmcaches
        1 0.0% 99.6% 1 0.0% gc
        1 0.0% 99.7% 1 0.0% markonly
        1 0.0% 99.7% 1 0.0% runtime.MCentral_UncacheSpan
        1 0.0% 99.8% 1 0.0% runtime.MHeap_LookupMaybe
        1 0.0% 99.8% 1 0.0% runtime.cas
        1 0.0% 99.9% 1 0.0% runtime.findfunc
        1 0.0% 99.9% 1 0.0% runtime.funcspdelta
        1 0.0% 100.0% 1 0.0% runtime.markspan
        1 0.0% 100.0% 1 0.0% scanframe
        0 0.0% 100.0% 78 3.6% GC
        0 0.0% 100.0% 11 0.5% MHeap_AllocLocked
        0 0.0% 100.0% 11 0.5% MHeap_Reclaim
        0 0.0% 100.0% 2001 91.1% System
        0 0.0% 100.0% 1 0.0% profilealloc
        0 0.0% 100.0% 32 1.5% runtime.MCache_Refill
        0 0.0% 100.0% 31 1.4% runtime.MCentral_CacheSpan
        0 0.0% 100.0% 13 0.6% runtime.MHeap_Alloc
        0 0.0% 100.0% 1 0.0% runtime.MProf_Malloc
        0 0.0% 100.0% 1 0.0% runtime.callers
        0 0.0% 100.0% 10 0.5% runtime.futexwakeup
        0 0.0% 100.0% 10 0.5% runtime.gc
        0 0.0% 100.0% 118 5.4% runtime.gosched0
        0 0.0% 100.0% 118 5.4% runtime.main
        0 0.0% 100.0% 10 0.5% runtime.notewakeup
        0 0.0% 100.0% 10 0.5% runtime.starttheworld
        0 0.0% 100.0% 11 0.5% runtime.sweepone

There is no cgo code. But as the loop is creating a lot of objects, it may
be that this "ExternalCode" is the garbage collector ?

Can someone run this code and tell me if he sees the same pprof output ?




--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 8 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 30, '14 at 12:57a
activeSep 30, '14 at 11:25p
posts8
users4
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase