|
pprof: add goroutine blocking profiling
The profiler collects goroutine blocking information similar to Google Perf Tools.
You may see an example of the profile (converted to svg) attached to
http://code.google.com/p/go/issues/detail?id=3946
The public API changes are:
+pkg runtime, func BlockProfile([]BlockProfileRecord) (int, bool)
+pkg runtime, func SetBlockProfileRate(int)
+pkg runtime, method (*BlockProfileRecord) Stack() []uintptr
+pkg runtime, type BlockProfileRecord struct
+pkg runtime, type BlockProfileRecord struct, Count int64
+pkg runtime, type BlockProfileRecord struct, Cycles int64
+pkg runtime, type BlockProfileRecord struct, embedded StackRecord
Total comments: 3
Total comments: 13
Total comments: 8
Total comments: 6
Total comments: 2
Total comments: 6
Total comments: 6
Total comments: 3
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+350 lines, -52 lines) |
Patch |
 |
M |
src/cmd/go/test.go
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/cmd/go/testflag.go
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/net/http/pprof/pprof.go
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/chan.c
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
13 chunks |
+36 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/debug.go
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/mprof.goc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
8 chunks |
+102 lines, -19 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/pprof/pprof.go
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
21
|
4 chunks |
+65 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/runtime.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/runtime.c
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/sema.goc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
5 chunks |
+34 lines, -14 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/signal_linux_arm.c
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+4 lines, -10 lines |
0 comments
|
Download
|
 |
M |
src/pkg/testing/testing.go
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
3 chunks |
+24 lines, -9 lines |
0 comments
|
Download
|
Total messages: 62
|