]> Cypherpunks repositories - gostls13.git/commit
runtime: new profile buffer implementation supporting label pointers
authorRuss Cox <rsc@golang.org>
Thu, 9 Feb 2017 18:58:48 +0000 (13:58 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 23 Feb 2017 19:47:23 +0000 (19:47 +0000)
commitb788fd80e68addd181983ca589d28bc1075f4a36
tree9a6ab7105b9bea137ac7f23e36fe3b6f2138acfd
parent9230ee20f3893814cbfb5e0bdc1a117b092eae35
runtime: new profile buffer implementation supporting label pointers

The existing CPU profiling buffer is a slice of uintptr, but we want to
start including profiling label data in the profiles, and those labels need
to be pointers in order to let them describe rich information.

This CL implements a new profBuf type that holds both a slice of uint64
for data and a slice of unsafe.Pointer for profiling labels (aka tags).
Making the runtime use these buffers will happen in followup CLs.

Change-Id: I9ff16b532d8edaf4ce0cbba1098229a561834efc
Reviewed-on: https://go-review.googlesource.com/36713
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/export_test.go
src/runtime/mbarrier.go
src/runtime/profbuf.go [new file with mode: 0644]
src/runtime/profbuf_test.go [new file with mode: 0644]
src/runtime/runtime2.go