• 张sir
    2019-12-01
    请问老师,我如何通过这些分析指标来定位具体哪个代码包或者哪个方法执行会有性能问题,比如pprof/goroutine采样结果,我输入topN或者web,输出0 0% 100% 36 64.29% github.com/go-redis/redis/internal/pool.(*ConnPool).reaper这些内容,应该怎么去分析呢

    作者回复: 这里有一些参考:https://github.com/hyper0x/go_command_tutorial/blob/master/0.12.md

    
     1
  • 虢國技醬
    2019-08-24
    二刷理解更加深刻😊
    
     1
  • 党
    2019-07-31
    至少看完了,可能因为一直都用的go中简单的"技能"吧,对于后边的一些技能感触不是太深,但至少心里有个大概印象了,等到工作中用上了在来翻看这些内容。这些知识的确不同于一般的go教程,所涉及到的每个技术点都很有深度,对提升go技能很有帮助,但初学者不建议看。
    
     1
  • 嘎嘎
    2019-04-08
    runtime/trace可以跟踪代码执行期间的每一个事件,“The trace contains events related to goroutine scheduling: a goroutine starts executing on a processor, a goroutine blocks on a synchronization primitive, a goroutine creates or unblocks another goroutine; network-related events: a goroutine blocks on network IO, a goroutine is unblocked on network IO; syscalls-related events: a goroutine enters into syscall, a goroutine returns from syscall; garbage-collector-related events: GC start/stop, concurrent sweep start/stop; and user events. Here and below by "processor" I mean a logical processor, unit of GOMAXPROCS. Each event contains event id, a precise timestamp, OS thread id, processor id, goroutine id, stack trace and other relevant information” -- https://docs.google.com/document/u/1/d/1FP5apqzBgr7ahCCgFO-yoVhk4YZrNIDNf9RybngBc14/pub
    展开
    
     1
  • 上山的o牛
    2019-10-12
    工作中会用到的,再遇吧
    
    
  • 安排
    2019-09-10
    go语言可执行程序加载到内存中,内存布局和 C语言的一样吗?go编出来的可执行程序也是elf格式吗?编译go程序的步骤是什么样的?预处理,编译汇编这些都有吗?可不可以只执行预处理或者只编译不链接?

    作者回复: Go 属于现代高级编程语言,所以隐藏了很多编译的东西。这方面的东西你可以参看 Go 语言的源码,具体在 cmd/compile 等包下。

    
    
  • kuzan
    2019-01-21
    老师好,golang的gc会根据什么尺寸做回收呢,比如java里有xmx,那go呢?

    作者回复: 可以查阅 runtime/debug.SetGCPercent 函数的文档。

    
    
我们在线,来聊聊吧