<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/internal/trace/parser.go, branch bench-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=bench-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=bench-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2024-01-24T21:01:14Z</updated>
<entry>
<title>all: prealloc slice with possible minimum capabilities</title>
<updated>2024-01-24T21:01:14Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2023-05-01T18:06:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8096b47dd09fcda8712f7a3c07dced5244123a4d'/>
<id>urn:sha1:8096b47dd09fcda8712f7a3c07dced5244123a4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cmd/trace: add almost full support for v2 traces in the trace viewer</title>
<updated>2023-11-21T20:45:06Z</updated>
<author>
<name>Michael Anthony Knyszek</name>
<email>mknyszek@google.com</email>
</author>
<published>2023-11-14T17:03:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=748952f494f359acf945b7984929024c248bedab'/>
<id>urn:sha1:748952f494f359acf945b7984929024c248bedab</id>
<content type='text'>
This change refactors the cmd/trace package and adds most of the support
for v2 traces.

The following features of note are missing in this CL and will be
implemented in follow-up CLs:
- The focustask filter for the trace viewer
- The taskid filter for the trace viewer
- The goid filter for the trace viewer
- Pprof profiles
- The MMU graph
- The goroutine analysis pages
- The task analysis pages
- The region analysis pages

This CL makes one notable change to the trace CLI: it makes the -d flag
accept an integer to set the debug mode. For old traces -d != 0 works
just like -d. For new traces -d=1 means the high-level events and -d=2
means the low-level events.

Thanks to Felix Geisendörfer (felix.geisendoerfer@datadoghq.com) for
doing a lot of work on this CL; I picked this up from him and got a
massive headstart as a result.

For #60773.
For #63960.

Change-Id: I3626e22473227c5980134a85f1bb6a845f567b1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/542218
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Knyszek &lt;mknyszek@google.com&gt;
TryBot-Bypass: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: emit STW events for all pauses, not just those for the GC</title>
<updated>2023-05-19T17:06:45Z</updated>
<author>
<name>Michael Anthony Knyszek</name>
<email>mknyszek@google.com</email>
</author>
<published>2023-05-11T21:09:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b1aadd034c1feb6ac8409aca5f0efd10ef442950'/>
<id>urn:sha1:b1aadd034c1feb6ac8409aca5f0efd10ef442950</id>
<content type='text'>
Currently STW events are only emitted for GC STWs. There's little reason
why the trace can't contain events for every STW: they're rare so don't
take up much space in the trace, yet being able to see when the world
was stopped is often critical to debugging certain latency issues,
especially when they stem from user-level APIs.

This change adds new "kinds" to the EvGCSTWStart event, renames the
GCSTW events to just "STW," and lets the parser deal with unknown STW
kinds for future backwards compatibility.

But, this change must break trace compatibility, so it bumps the trace
version to Go 1.21.

This change also includes a small cleanup in the trace command, which
previously checked for STW events when deciding whether user tasks
overlapped with a GC. Looking at the source, I don't see a way for STW
events to ever enter the stream that that code looks at, so that
condition has been deleted.

Change-Id: I9a5dc144092c53e92eb6950e9a5504a790ac00cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/494495
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime/trace: update outdated Task and Region documentation</title>
<updated>2023-03-09T19:10:52Z</updated>
<author>
<name>Nick Ripley</name>
<email>nick.ripley@datadoghq.com</email>
</author>
<published>2023-03-02T21:20:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4460291e0eb291ad90d814ae1e2e18140677ddcb'/>
<id>urn:sha1:4460291e0eb291ad90d814ae1e2e18140677ddcb</id>
<content type='text'>
A previous iteration of the tracer's user annotation API had different
names for tasks and regions, and used to return functions for ending
them rather than types with End methods. This CL updates the doc
comments to reflect those changes, and also fixes up the internal
documentation of the events (similar to go.dev/cl/465335, the stack
argument was in the wrong place in the list).

The User Log event internal documentation might also look wrong since
the value argument follows the stack argument. However, the User Log
event is a special case where the log message is appended immediately
following the normal event, including the stack argument. There isn't
much room to clarify this next to the event type definitions, so this CL
clarifies the comment where the event is encoded.

Change-Id: I846c709f6026ef01c0a272557d6390b2c17074e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/472955
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Nick Ripley &lt;nick.ripley@datadoghq.com&gt;
</content>
</entry>
<entry>
<title>runtime: fix cpu sample comment</title>
<updated>2023-02-06T22:13:07Z</updated>
<author>
<name>Maksim Meshkov</name>
<email>subtle.byte.dev@gmail.com</email>
</author>
<published>2023-02-05T13:01:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=02d8ebda8398342516a24a3e8435d527ed156cab'/>
<id>urn:sha1:02d8ebda8398342516a24a3e8435d527ed156cab</id>
<content type='text'>
Fixes #58327

Change-Id: I15593e6ee42e04f2de13804ef26e0e66a2307db0
GitHub-Last-Rev: 7e0d04b503d2ba217b76b1ac668a67cd72ec6d7c
GitHub-Pull-Request: golang/go#58338
Reviewed-on: https://go-review.googlesource.com/c/go/+/465335
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Michael Knyszek &lt;mknyszek@google.com&gt;
Auto-Submit: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>internal/trace: use strings.Builder</title>
<updated>2022-09-06T12:35:13Z</updated>
<author>
<name>cuiweixie</name>
<email>cuiweixie@gmail.com</email>
</author>
<published>2022-09-04T10:02:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8a323542190ec3ba8f0ff0ec057e75e25ad1f408'/>
<id>urn:sha1:8a323542190ec3ba8f0ff0ec057e75e25ad1f408</id>
<content type='text'>
Change-Id: Ic7f827b8ee758c991ed76be65026b0330207deea
Reviewed-on: https://go-review.googlesource.com/c/go/+/428262
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>internal/trace: add Go 1.19 test data</title>
<updated>2022-06-24T22:08:17Z</updated>
<author>
<name>Rhys Hiltner</name>
<email>rhys@justin.tv</email>
</author>
<published>2022-06-23T16:43:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bd4753905d15035fabbc4dda79573506090fe40b'/>
<id>urn:sha1:bd4753905d15035fabbc4dda79573506090fe40b</id>
<content type='text'>
Update instructions to match what seems to be the historical practice:
to generate canned traces when a version is finalized, rather than
waiting until it is superseded.

Follow rename of trace-internal tests from "Span" to "Region". Update
the net/http test invocation to match the apparent intent and the actual
http_1_5_good behavior (about 7ms of total run time and trace file size
under 50kB).

Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/413776
Run-TryBot: Rhys Hiltner &lt;rhys@justin.tv&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: add CPU samples to execution trace</title>
<updated>2022-05-03T20:49:46Z</updated>
<author>
<name>Rhys Hiltner</name>
<email>rhys@justin.tv</email>
</author>
<published>2022-04-18T19:32:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2c0a9884e0dc930c1a3596bc1decf183c8fdcf77'/>
<id>urn:sha1:2c0a9884e0dc930c1a3596bc1decf183c8fdcf77</id>
<content type='text'>
When the CPU profiler and execution tracer are both active, report the
CPU profile samples in the execution trace data stream.

Include only samples that arrive on the threads known to the runtime,
but include them even when running g0 (such as near the scheduler) or if
there's no P (such as near syscalls).

Render them in "go tool trace" as instantaneous events.

For #16895

Change-Id: I0aa501a7b450c971e510961c0290838729033f7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/400795
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Rhys Hiltner &lt;rhys@justin.tv&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime: move next_gc and last_next_gc into gcControllerState</title>
<updated>2021-04-14T14:03:30Z</updated>
<author>
<name>Michael Anthony Knyszek</name>
<email>mknyszek@google.com</email>
</author>
<published>2021-04-01T18:38:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130'/>
<id>urn:sha1:3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130</id>
<content type='text'>
This change moves next_gc and last_next_gc into gcControllerState under
the names heapGoal and lastHeapGoal respectively. These are
fundamentally GC pacer related values, and so it makes sense for them to
live here.

Partially generated by

rf '
    ex . {
	memstats.next_gc -&gt; gcController.heapGoal
	memstats.last_next_gc -&gt; gcController.lastHeapGoal
    }
'

except for updates to comments and gcControllerState methods, where
they're accessed through the receiver, and trace-related renames of
NextGC -&gt; HeapGoal, while we're here.

For #44167.

Change-Id: I1e871ad78a57b01be8d9f71bd662530c84853bed
Reviewed-on: https://go-review.googlesource.com/c/go/+/306603
Trust: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Michael Knyszek &lt;mknyszek@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime/trace: rename "Span" with "Region"</title>
<updated>2018-04-24T16:33:15Z</updated>
<author>
<name>Hana Kim</name>
<email>hakim@google.com</email>
</author>
<published>2018-04-19T18:58:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c2d10243688194346f660591fe4159e30a8d20ec'/>
<id>urn:sha1:c2d10243688194346f660591fe4159e30a8d20ec</id>
<content type='text'>
"Span" is a commonly used term in many distributed tracing systems
(Dapper, OpenCensus, OpenTracing, ...). They use it to refer to a
period of time, not necessarily tied into execution of underlying
processor, thread, or goroutine, unlike the "Span" of runtime/trace
package.

Since distributed tracing and go runtime execution tracing are
already similar enough to cause confusion, this CL attempts to avoid
using the same word if possible.

"Region" is being used in a certain tracing system to refer to a code
region which is pretty close to what runtime/trace.Span currently
refers to. So, replace that.
https://software.intel.com/en-us/itc-user-and-reference-guide-defining-and-recording-functions-or-regions

This CL also tweaks APIs a bit based on jbd and heschi's comments:

  NewContext -&gt; NewTask
    and it now returns a Task object that exports End method.

  StartSpan -&gt; StartRegion
    and it now returns a Region object that exports End method.

Also, changed WithSpan to WithRegion and it now takes func() with no
context. Another thought is to get rid of WithRegion. It is a nice
concept but in practice, it seems problematic (a lot of code churn,
and polluting stack trace). Already, the tracing concept is very low
level, and we hope this API to be used with great care.

Recommended usage will be
   defer trace.StartRegion(ctx, "someRegion").End()

Left old APIs untouched in this CL. Once the usage of them are cleaned
up, they will be removed in a separate CL.

Change-Id: I73880635e437f3aad51314331a035dd1459b9f3a
Reviewed-on: https://go-review.googlesource.com/108296
Run-TryBot: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: JBD &lt;jbd@google.com&gt;
</content>
</entry>
</feed>
