<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/runtime/pprof/label.go, branch dev.cmdgo</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/'/>
<entry>
<title>runtime/pprof: plumb labels for goroutine profiles</title>
<updated>2020-04-22T16:01:25+00:00</updated>
<author>
<name>David Finkel</name>
<email>david.finkel@gmail.com</email>
</author>
<published>2019-08-04T19:14:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=38c2c12bc1b3da40e1b33cac9268b7df9fa49a7e'/>
<id>38c2c12bc1b3da40e1b33cac9268b7df9fa49a7e</id>
<content type='text'>
Goroutines are directly associated with labels. It's relatively easy to
plumb those through without creating goroutine-locals in the wild.

This is accomplished by splitting out most of the code from the public
`runtime.GoroutineProfile` into a new unexported
`runtime.goroutineProfileWithLabels`, which then has a thin wrapper
linked into the `runtime/pprof` package as
`runtime_goroutineProfileWithLabels`. (mirroring the way labels get
associated with the `g` for a goroutine in the first place)

Per-#6104, OS-thread creation profiles are a bit useless, as `M`s tend
to be created be created by a background goroutine. As such, I decided
not to add support for capturing the labels at `M`-creation-time, since
the stack-traces seem to always come out `nil` for my simple test
binaries.

This change currently provides labels for debug=0 and debug=1, as
debug=2 is currently entirely generated by the runtime package and I
don't see a clean way of getting the `labelMap` type handled properly
within the `runtime` package.

Update the comment added in cl/131275 to mention goroutine support for
labels.

Updates #23458

Change-Id: Ia4b558893d7d10156b77121cd9b70c4ccd9e1889
Reviewed-on: https://go-review.googlesource.com/c/go/+/189318
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Goroutines are directly associated with labels. It's relatively easy to
plumb those through without creating goroutine-locals in the wild.

This is accomplished by splitting out most of the code from the public
`runtime.GoroutineProfile` into a new unexported
`runtime.goroutineProfileWithLabels`, which then has a thin wrapper
linked into the `runtime/pprof` package as
`runtime_goroutineProfileWithLabels`. (mirroring the way labels get
associated with the `g` for a goroutine in the first place)

Per-#6104, OS-thread creation profiles are a bit useless, as `M`s tend
to be created be created by a background goroutine. As such, I decided
not to add support for capturing the labels at `M`-creation-time, since
the stack-traces seem to always come out `nil` for my simple test
binaries.

This change currently provides labels for debug=0 and debug=1, as
debug=2 is currently entirely generated by the runtime package and I
don't see a clean way of getting the `labelMap` type handled properly
within the `runtime` package.

Update the comment added in cl/131275 to mention goroutine support for
labels.

Updates #23458

Change-Id: Ia4b558893d7d10156b77121cd9b70c4ccd9e1889
Reviewed-on: https://go-review.googlesource.com/c/go/+/189318
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: reduce allocations when building pprof LabelSet</title>
<updated>2019-08-28T10:43:11+00:00</updated>
<author>
<name>Martin Möhrmann</name>
<email>moehrmann@google.com</email>
</author>
<published>2019-06-10T10:56:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=5fb74fc13853b950b5102ef26d665db97f4838fd'/>
<id>5fb74fc13853b950b5102ef26d665db97f4838fd</id>
<content type='text'>
Pre-allocate the slice of labels with enough capacity
to avoid growslice calls.

Change-Id: I89db59ac722c03b0202e042d1f707bb041e0999f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181517
Run-TryBot: Martin Möhrmann &lt;moehrmann@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pre-allocate the slice of labels with enough capacity
to avoid growslice calls.

Change-Id: I89db59ac722c03b0202e042d1f707bb041e0999f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181517
Run-TryBot: Martin Möhrmann &lt;moehrmann@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime/pprof: document labels bug</title>
<updated>2019-03-07T17:53:44+00:00</updated>
<author>
<name>Komu Wairagu</name>
<email>komuw05@gmail.com</email>
</author>
<published>2019-03-07T17:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=9a7101586041a5ad69d65d845db78fb0e249cac6'/>
<id>9a7101586041a5ad69d65d845db78fb0e249cac6</id>
<content type='text'>
Currently only CPU profile utilizes tag information.
This change documents that fact

Updates #23458

Change-Id: Ic893e85f63af0da9100d8cba7d3328c294e8c810
GitHub-Last-Rev: be99a126296493b3085aa5ade91895b36fb1de73
GitHub-Pull-Request: golang/go#27198
Reviewed-on: https://go-review.googlesource.com/c/go/+/131275
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently only CPU profile utilizes tag information.
This change documents that fact

Updates #23458

Change-Id: Ic893e85f63af0da9100d8cba7d3328c294e8c810
GitHub-Last-Rev: be99a126296493b3085aa5ade91895b36fb1de73
GitHub-Pull-Request: golang/go#27198
Reviewed-on: https://go-review.googlesource.com/c/go/+/131275
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime/pprof: Fix type name in function comment</title>
<updated>2017-07-05T18:26:47+00:00</updated>
<author>
<name>Fabian Wickborn</name>
<email>fabian@wickborn.net</email>
</author>
<published>2017-07-05T08:09:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=b5240daa2f56e7dd778cfbab17adecbf50a62674'/>
<id>b5240daa2f56e7dd778cfbab17adecbf50a62674</id>
<content type='text'>
The name LabelList was changed to LabelSet during the development of the
proposal [1], except in one function comment. This commit fixes that.

Fixes #20905.

[1] https://github.com/golang/go/issues/17280

Change-Id: Id4f48d59d7d513fa24b2e42795c2baa5ceb78f36
Reviewed-on: https://go-review.googlesource.com/47470
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The name LabelList was changed to LabelSet during the development of the
proposal [1], except in one function comment. This commit fixes that.

Fixes #20905.

[1] https://github.com/golang/go/issues/17280

Change-Id: Id4f48d59d7d513fa24b2e42795c2baa5ceb78f36
Reviewed-on: https://go-review.googlesource.com/47470
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime: add definitions for SetGoroutineLabels and Do</title>
<updated>2017-02-06T20:29:37+00:00</updated>
<author>
<name>Michael Matloob</name>
<email>matloob@golang.org</email>
</author>
<published>2016-12-09T21:00:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=62956897c1743ee7e79895496180f84432f21d0a'/>
<id>62956897c1743ee7e79895496180f84432f21d0a</id>
<content type='text'>
This change defines runtime/pprof.SetGoroutineLabels and runtime/pprof.Do, which
are used to set profiler labels on goroutines. The change defines functions
in the runtime for setting and getting profile labels, and sets and unsets
profile labels when goroutines are created and deleted. The change also adds
the package runtime/internal/proflabel, which defines the structure the runtime
uses to store profile labels.

Change-Id: I747a4400141f89b6e8160dab6aa94ca9f0d4c94d
Reviewed-on: https://go-review.googlesource.com/34198
Run-TryBot: Michael Matloob &lt;matloob@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/35010
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change defines runtime/pprof.SetGoroutineLabels and runtime/pprof.Do, which
are used to set profiler labels on goroutines. The change defines functions
in the runtime for setting and getting profile labels, and sets and unsets
profile labels when goroutines are created and deleted. The change also adds
the package runtime/internal/proflabel, which defines the structure the runtime
uses to store profile labels.

Change-Id: I747a4400141f89b6e8160dab6aa94ca9f0d4c94d
Reviewed-on: https://go-review.googlesource.com/34198
Run-TryBot: Michael Matloob &lt;matloob@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/35010
</pre>
</div>
</content>
</entry>
<entry>
<title>runtime/pprof: add definitions of profile label types</title>
<updated>2017-02-06T15:43:06+00:00</updated>
<author>
<name>Michael Matloob</name>
<email>matloob@golang.org</email>
</author>
<published>2016-12-09T21:00:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=91ad2a219445d6df3ddb796d0f44190da24f429d'/>
<id>91ad2a219445d6df3ddb796d0f44190da24f429d</id>
<content type='text'>
This change defines WithLabels, Labels, Label, and ForLabels.
This is the first step of the profile labels implemention for go 1.9.

Updates #17280

Change-Id: I2dfc9aae90f7a4aa1ff7080d5747f0a1f0728e75
Reviewed-on: https://go-review.googlesource.com/34198
Run-TryBot: Michael Matloob &lt;matloob@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change defines WithLabels, Labels, Label, and ForLabels.
This is the first step of the profile labels implemention for go 1.9.

Updates #17280

Change-Id: I2dfc9aae90f7a4aa1ff7080d5747f0a1f0728e75
Reviewed-on: https://go-review.googlesource.com/34198
Run-TryBot: Michael Matloob &lt;matloob@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
