go tool trace for correct and effective concurrency
2
A special tool for Go's needs
3
goroutine scheduling instrumented
4
Concurrency, and how to manage it
5
Parallelism, and how to exploit it
6
A timing-dependent bug
7
#1: A race condition
8
go test -race go build -race go install -race
9
a logical race, not a data race
10
View trace
11
Sync blocking profile
12
Goroutine analysis
13
It's not a panacea
14
1. Testing with -trace flag
15
and large (40GB) heap
16
The GC is still improving
17
Go 1.1: GC uses parallel threads
18
#3A: Stop-The-World pauses
19
The Go 1.10 compiler should have a general, permanent fix
20
#3B: Other awkward pauses
21
User code works against that
22
Be prepared: practice using the tools
Description:
Explore the execution tracer (go tool trace), one of Go's most powerful diagnosis tools, in this conference talk from GopherCon 2017. Learn how to leverage this complex yet invaluable tool to understand goroutine interactions in great detail, uncover latency bugs, and identify logical races. Dive into topics such as correct and effective concurrency management, parallelism exploitation, and timing-dependent bugs. Discover how to use the -race flag for testing, building, and installing Go programs. Examine trace views, sync blocking profiles, and goroutine analysis techniques. Gain insights into Go's garbage collection improvements, including parallel threads and Stop-The-World pauses. Understand the challenges of large heaps and awkward pauses in user code. Prepare yourself by practicing with these essential tools to enhance your Go programming skills and optimize your concurrent applications.