<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/runtime/pprof/pprof.go, branch main</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-04-13T16:24:54Z</updated>
<entry>
<title>runtime/pprof: using buffer writer instead of original writer</title>
<updated>2026-04-13T16:24:54Z</updated>
<author>
<name>Weixie Cui</name>
<email>cuiweixie@gmail.com</email>
</author>
<published>2026-04-10T18:28:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6eb5a4122879941275ca1e292d873b2a3452bf21'/>
<id>urn:sha1:6eb5a4122879941275ca1e292d873b2a3452bf21</id>
<content type='text'>
Change-Id: Ibff8e7a08090d67d9a0625dee068c8d2eefbd190
GitHub-Last-Rev: b90b986121314615cf5d259d76a7be59303de1b0
GitHub-Pull-Request: golang/go#78630
Reviewed-on: https://go-review.googlesource.com/c/go/+/765480
Reviewed-by: Florian Lehner &lt;lehner.florian86@gmail.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Auto-Submit: Keith Randall &lt;khr@google.com&gt;
Reviewed-by: Keith Randall &lt;khr@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>runtime: remove redundant fields from memory profile records</title>
<updated>2026-03-28T20:07:33Z</updated>
<author>
<name>Nick Ripley</name>
<email>nick.ripley@datadoghq.com</email>
</author>
<published>2026-03-27T13:35:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d247ed00e498e9717fb7c80d126bee5a8afdb4e8'/>
<id>urn:sha1:d247ed00e498e9717fb7c80d126bee5a8afdb4e8</id>
<content type='text'>
The memProfCycle struct holds allocation counts and bytes allocated, and
frees and bytes freed. But the memory profile records are already
aggregated by allocation size, which is stored in the "size" field of
the bucket struct. We can derive the bytes allocated/freed using the
counts and the size we already store. Thus we can delete the bytes
fields from memProfCycle, saving 64 bytes per memRecord.

We can do something similar for the profilerecord.MemProfileRecord type.
We just need to know the object size and we can derive the allocated and
freed bytes accordingly.

Change-Id: I103885c2f29471b25283e330674fc16d6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/760140
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime/pprof: fix missing Profile docs</title>
<updated>2026-02-10T00:41:50Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2026-02-10T00:17:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=86f7959aa6e4cb9a0ac67ccd84c5586701583ca4'/>
<id>urn:sha1:86f7959aa6e4cb9a0ac67ccd84c5586701583ca4</id>
<content type='text'>
CL 688335 accidentally introduced a blank line between the Profile doc
comment and the type definition, causing the entire doc to get dropped.

Change-Id: I97b1c0e57d142d7caea6e543a0138ed6dcd1c3fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/743660
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Auto-Submit: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: add GODEBUG=tracebacklabels=1 to include pprof labels in tracebacks</title>
<updated>2025-11-25T04:07:56Z</updated>
<author>
<name>David Finkel</name>
<email>davidf@vimeo.com</email>
</author>
<published>2025-05-23T20:04:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6851795fb6cda61e2c8396c36da187a2bd87b29e'/>
<id>urn:sha1:6851795fb6cda61e2c8396c36da187a2bd87b29e</id>
<content type='text'>
Copy LabelSet to an internal package as label.Set, and include (escaped)
labels within goroutine stack dumps.

Labels are added to the goroutine header as quoted key:value pairs, so
the line may get long if there are a lot of labels.

To handle escaping, we add a printescaped function to the
runtime and hook it up to the print function in the compiler with a new
runtime.quoted type that's a sibling to runtime.hex. (in fact, we
leverage some of the machinery from printhex to generate escape
sequences).

The escaping can be improved for printable runes outside basic ASCII
(particularly for languages using non-latin stripts). Additionally,
invalid UTF-8 can be improved.

So we can experiment with the output format make this opt-in via a
a new tracebacklabels GODEBUG var.

Updates #23458
Updates #76349

Change-Id: I08e78a40c55839a809236fff593ef2090c13c036
Reviewed-on: https://go-review.googlesource.com/c/go/+/694119
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
</content>
</entry>
<entry>
<title>runtime/pprof: remove hard-coded sleep in CPU profile reader</title>
<updated>2025-11-21T21:25:29Z</updated>
<author>
<name>Nick Ripley</name>
<email>nick.ripley@datadoghq.com</email>
</author>
<published>2025-11-21T16:01:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=121bc3e464b901327a5c138d8a992bb85c440862'/>
<id>urn:sha1:121bc3e464b901327a5c138d8a992bb85c440862</id>
<content type='text'>
The CPU profiler reader goroutine has a hard-coded 100ms sleep between
reads of the CPU profile sample buffer. This is done because waking up
the CPU profile reader is not signal-safe on some platforms. As a
consequence, stopping the profiler takes 200ms (one iteration to read
the last samples and one to see the "eof"), and on many-core systems the
reader does not wake up frequently enought to keep up with incoming
data.

This CL removes the sleep where it is safe to do so, following a
suggestion by Austin Clements in the comments on CL 445375. We let the
reader fully block, and wake up the reader when the buffer is over
half-full.

Fixes #63043
Updates #56029

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-linux-arm64-longtest,gotip-linux-386-longtest
Change-Id: I9f7e7e9918a4a6f16e80f6aaf33103126568a81f
Reviewed-on: https://go-review.googlesource.com/c/go/+/610815
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Mark Freeman &lt;markfreeman@google.com&gt;
</content>
</entry>
<entry>
<title>runtime,runtime/pprof: clean up goroutine leak profile writing</title>
<updated>2025-11-12T16:08:34Z</updated>
<author>
<name>Vlad Saioc</name>
<email>vsaioc@uber.com</email>
</author>
<published>2025-11-06T09:53:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8873e8bea29ac6de5fecee88b8b81239bd2eb179'/>
<id>urn:sha1:8873e8bea29ac6de5fecee88b8b81239bd2eb179</id>
<content type='text'>
Cleaned up goroutine leak profile extraction:
- removed the acquisition of goroutineProfile semaphore
- inlined the call to saveg when recording stacks instead of using
doRecordGoroutineProfile, which had side-effects over
goroutineProfile fields.

Added regression tests for goroutine leak profiling frontend for binary
and debug=1 profile formats.
Added stress tests for concurrent goroutine and goroutine leak profile requests.

Change-Id: I55c1bcef11e9a7fb7699b4c5a2353e594d3e7173
GitHub-Last-Rev: 5e9eb3b1d80c4d2d9b668a01f6b39a7b42f7bb45
GitHub-Pull-Request: golang/go#76045
Reviewed-on: https://go-review.googlesource.com/c/go/+/714580
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Junyang Shao &lt;shaojunyang@google.com&gt;
</content>
</entry>
<entry>
<title>runtime,net/http/pprof: goroutine leak detection by using the garbage collector</title>
<updated>2025-10-02T18:06:21Z</updated>
<author>
<name>Vlad Saioc</name>
<email>vsaioc@uber.com</email>
</author>
<published>2025-10-02T11:57:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8c68a1c1abade565c6719159858e76f9b122ddc8'/>
<id>urn:sha1:8c68a1c1abade565c6719159858e76f9b122ddc8</id>
<content type='text'>
Proposal #74609

Change-Id: I97a754b128aac1bc5b7b9ab607fcd5bb390058c8
GitHub-Last-Rev: 60f2a192badf415112246de8bc6c0084085314f6
GitHub-Pull-Request: golang/go#74622
Reviewed-on: https://go-review.googlesource.com/c/go/+/688335
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: t hepudds &lt;thepudds1460@gmail.com&gt;
Auto-Submit: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime/pprof: return errors from writing profiles</title>
<updated>2025-05-13T17:01:48Z</updated>
<author>
<name>Sean Liao</name>
<email>sean@liao.dev</email>
</author>
<published>2025-05-11T20:55:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4aeb9ba0deac4eced472a8fc7869a14fb9340d04'/>
<id>urn:sha1:4aeb9ba0deac4eced472a8fc7869a14fb9340d04</id>
<content type='text'>
Fixes #73107

Change-Id: I41f3e1bd1fdaca2f0e94151b2320bd569e258a51
Reviewed-on: https://go-review.googlesource.com/c/go/+/671576
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: remove GODEBUG=runtimecontentionstacks</title>
<updated>2025-05-07T19:22:24Z</updated>
<author>
<name>Rhys Hiltner</name>
<email>rhys.hiltner@gmail.com</email>
</author>
<published>2025-04-29T21:39:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=94c4cdc94869454eb25c725c5f4a92ff305ffa3b'/>
<id>urn:sha1:94c4cdc94869454eb25c725c5f4a92ff305ffa3b</id>
<content type='text'>
Go 1.22 promised to remove the setting in a future release once the
semantics of runtime-internal lock contention matched that of
sync.Mutex. That work is done, remove the setting.

Previously reviewed as https://go.dev/cl/585639.

For #66999

Change-Id: I9fe62558ba0ac12824874a0bb1b41efeb7c0853f
Reviewed-on: https://go-review.googlesource.com/c/go/+/668995
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Auto-Submit: Rhys Hiltner &lt;rhys.hiltner@gmail.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime/pprof: hide map runtime frames from heap profiles</title>
<updated>2025-01-09T21:59:08Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2025-01-09T17:22:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d0c9142ce3b6fac83dadcc76ecfb85311431e743'/>
<id>urn:sha1:d0c9142ce3b6fac83dadcc76ecfb85311431e743</id>
<content type='text'>
Heap profiles hide "runtime" frames like runtime.mapassign. This broke
in 1.24 because the map implementation moved to internal/runtime/maps,
and runtime/pprof only considered literal "runtime." when looking for
runtime frames.

It would be nice to use cmd/internal/objabi.PkgSpecial to find runtime
packages, but that is hidden away in cmd.

Fixes #71174.

Change-Id: I6a6a636cb42aa17539e47da16854bd3fd8cb1bfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/641775
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
</feed>
