<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/runtime/funcdata.h, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-10-28T16:45:10Z</updated>
<entry>
<title>runtime: define PanicBounds in funcdata.h</title>
<updated>2025-10-28T16:45:10Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2025-10-27T23:51:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=46e5e2b09a6df80a3b6472c5f7ca5739365b6676'/>
<id>urn:sha1:46e5e2b09a6df80a3b6472c5f7ca5739365b6676</id>
<content type='text'>
The comment in funcdata.h says that the constants must agree
with those in internal/abi/symtab.go. Make that so.

Change-Id: Ib64146bfb31fdecfc1cc6ae03ae746a1b4a4d22e
Reviewed-on: https://go-review.googlesource.com/c/go/+/715521
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>cmd/internal/obj: tweak implicit {ArgsPointerMaps,ArgInfo} behavior</title>
<updated>2023-08-29T18:28:09Z</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2023-08-27T22:31:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=208f36180051c866ee8d1c0de2d92459252c5082'/>
<id>urn:sha1:208f36180051c866ee8d1c0de2d92459252c5082</id>
<content type='text'>
This CL changes cmd/internal/obj to also implicitly set
ArgsPointerMaps and ArgInfo for assembly functions that are explicitly
package qualified (e.g., "pkg·name", not just "·name"). This is a
prerequisite for changing cmd/asm to stop emitting `"".`-prefixed
symbol names.

Change-Id: I4e14bc24c87cf4d7114a7aed9beaf0c8d1f9c07f
Reviewed-on: https://go-review.googlesource.com/c/go/+/523335
Auto-Submit: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
<entry>
<title>internal/abi, runtime, cmd: merge PCDATA_* and FUNCDATA_* consts into internal/abi</title>
<updated>2023-04-21T19:28:49Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2023-04-17T20:50:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7843ca83e7c8229f4fdca22949428a2418f45138'/>
<id>urn:sha1:7843ca83e7c8229f4fdca22949428a2418f45138</id>
<content type='text'>
We also rename the constants related to unsafe-points: currently, they
follow the same naming scheme as the PCDATA table indexes, but are not
PCDATA table indexes.

For #59670.

Change-Id: I06529fecfae535be5fe7d9ac56c886b9106c74fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/485497
Run-TryBot: Austin Clements &lt;austin@google.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Austin Clements &lt;austin@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/compile, runtime: use unwrapped PC for goroutine creation tracing</title>
<updated>2022-02-11T20:01:24Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2022-02-07T17:00:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bcee121ae4f67281450280c72399890a3c7a7d5b'/>
<id>urn:sha1:bcee121ae4f67281450280c72399890a3c7a7d5b</id>
<content type='text'>
With the switch to the register ABI, we now generate wrapper
functions for go statements in many cases. A new goroutine's start
PC now points to the wrapper function. This does not affect
execution, but the runtime tracer uses the start PC and the
function name as the name/label of that goroutine. If the start
function is a named function, using the name of the wrapper loses
that information. Furthur, the tracer's goroutine view groups
goroutines by start PC. For multiple go statements with the same
callee, they are grouped together. With the wrappers, which is
context-dependent as it is a closure, they are no longer grouped.

This CL fixes the problem by providing the underlying unwrapped
PC for tracing. The compiler emits metadata to link the unwrapped
PC to the wrapper function. And the runtime reads that metadata
and record that unwrapped PC for tracing.

(This doesn't work for shared buildmode. Unfortunate.)

TODO: is there a way to test?

Fixes #50622.

Change-Id: Iaa20e1b544111c0255eb0fc04427aab7a5e3b877
Reviewed-on: https://go-review.googlesource.com/c/go/+/384158
Trust: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
Run-TryBot: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>cmd/compile, runtime: track argument stack slot liveness</title>
<updated>2021-10-27T20:27:02Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2021-09-24T20:46:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=30a82efcf403fed76bf1542e9477047660d5f54d'/>
<id>urn:sha1:30a82efcf403fed76bf1542e9477047660d5f54d</id>
<content type='text'>
Currently, for stack traces (e.g. at panic or when runtime.Stack
is called), we print argument values from the stack. With register
ABI, we may never store the argument to stack therefore the
argument value on stack may be meaningless. This causes confusion.

This CL makes the compiler keep trace of which argument stack
slots are meaningful. If it is meaningful, it will be printed in
stack traces as before. If it may not be meaningful, it will be
printed as the stack value with a question mark ("?"). In general,
the value could be meaningful on some code paths but not others
depending on the execution, and the compiler couldn't know
statically, so we still print the stack value, instead of not
printing it at all. Also note that if the argument variable is
updated in the function body the printed value may be stale (like
before register ABI) but still considered meaningful.

Arguments passed on stack are always meaningful therefore always
printed without a question mark. Results are never printed, as
before.

(Due to a bug in the compiler we sometimes don't spill args into
their dedicated spill slots (as we should), causing it having
fewer meaningful values than it should be.)

This increases binary sizes a bit:
            old       new
hello      1129760   1142080  +1.09%
cmd/go    13932320  14088016  +1.12%
cmd/link   6267696   6329168  +0.98%

Fixes #45728.

Change-Id: I308a0402e5c5ab94ca0953f8bd85a56acd28f58c
Reviewed-on: https://go-review.googlesource.com/c/go/+/352057
Trust: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>cmd, runtime: eliminate runtime.no_pointers_stackmap</title>
<updated>2021-10-04T22:45:17Z</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josharian@gmail.com</email>
</author>
<published>2021-10-01T23:25:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c2483a5c034152fcdfbb2e6dbcf48b0103d8db6a'/>
<id>urn:sha1:c2483a5c034152fcdfbb2e6dbcf48b0103d8db6a</id>
<content type='text'>
runtime.no_pointers_stackmap is an odd beast.
It is defined in a Go file, populated by assembly,
used by the GC, and its address is magic used
by async pre-emption to ascertain whether a
routine was implemented in assembly.

A subsequent change will force all GC data into the go.func.* linker symbol.
runtime.no_pointers_stackmap is GC data, so it must go there.
Yet it also needs to go into rodata, for the runtime address trick.

This change eliminates it entirely.

Replace the runtime address check with the newly introduced asm funcflag.

Handle the assembly macro as magic, similarly to our handling of go_args_stackmap.
This allows the no_pointers_stackmap to be identical in all ways
to other gclocals stackmaps, including content-addressability.

Change-Id: Id2f20a262cfab0719beb88e6342984ec4b196268
Reviewed-on: https://go-review.googlesource.com/c/go/+/353672
Trust: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/compile, runtime: add metadata for argument printing in traceback</title>
<updated>2021-04-22T17:47:59Z</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2021-01-15T22:58:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=537cde0b4b411f1dc3016cac430b9494cf91caf0'/>
<id>urn:sha1:537cde0b4b411f1dc3016cac430b9494cf91caf0</id>
<content type='text'>
Currently, when the runtime printing a stack track (at panic, or
when runtime.Stack is called), it prints the function arguments
as words in memory. With a register-based calling convention,
the layout of argument area of the memory changes, so the
printing also needs to change. In particular, the memory order
and the syntax order of the arguments may differ. To address
that, this CL lets the compiler to emit some metadata about the
memory layout of the arguments, and the runtime will use this
information to print arguments in syntax order.

Previously we print the memory contents of the results along with
the arguments. The results are likely uninitialized when the
traceback is taken, so that information is rarely useful. Also,
with a register-based calling convention the results may not
have corresponding locations in memory. This CL changes it to not
print results.

Previously the runtime simply prints the memory contents as
pointer-sized words. With a register-based calling convention,
as the layout changes, arguments that were packed in one word
may no longer be in one word. Also, as the spill slots are not
always initialized, it is possible that some part of a word
contains useful informationwhile the rest contains garbage.
Instead of letting the runtime recreating the ABI0 layout and
print them as words, we now print each component separately.
Aggregate-typed argument/component is surrounded by "{}".

For example, for a function

F(int, [3]byte, byte) int

when called as F(1, [3]byte{2, 3, 4}, 5), it used to print

F(0x1, 0x5040302, 0xXXXXXXXX) // assuming little endian, 0xXXXXXXXX is uninitilized result

Now prints

F(0x1, {0x2, 0x3, 0x4}, 0x5).

Note: the liveness tracking of the spill splots has not been
implemented in this CL. Currently the runtime just assumes all
the slots are live and print them all.

Increase binary sizes by ~1.5%.

                     old          new
hello (println)    1171328      1187712 (+1.4%)
hello (fmt)        1877024      1901600 (+1.3%)
cmd/compile       22326928     22662800 (+1.5%)
cmd/go            13505024     13726208 (+1.6%)

Updates #40724.

Change-Id: I351e0bf497f99bdbb3f91df2fb17e3c2c5c316dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/304470
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/internal/objabi, runtime: compact FUNCDATA indices</title>
<updated>2020-10-30T21:14:09Z</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-10-27T23:47:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f96b62be2edd8acc08b79777d692937e8ed79b4a'/>
<id>urn:sha1:f96b62be2edd8acc08b79777d692937e8ed79b4a</id>
<content type='text'>
As we deleted register maps, move FUNCDATA indices of stack
objects, inline trees, and open-coded defers earlier.

Change-Id: If73797b8c11fd207655c9498802fca9f6f9ac338
Reviewed-on: https://go-review.googlesource.com/c/go/+/265761
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: remove go115ReduceLiveness and go115RestartSeq</title>
<updated>2020-10-30T21:13:24Z</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-10-22T00:43:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8414b1a5a40e5ef19508e4895b4c12a91fa498e7'/>
<id>urn:sha1:8414b1a5a40e5ef19508e4895b4c12a91fa498e7</id>
<content type='text'>
Make them always true. Delete code that are only executed when
they are false.

Change-Id: I6194fa00de23486c2b0a0c9075fe3a09d9c52762
Reviewed-on: https://go-review.googlesource.com/c/go/+/264339
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>runtime/internal/atomic: drop package prefixes</title>
<updated>2020-10-16T17:31:16Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2020-10-15T20:11:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=afba990169f41d9026c923da5235584db32cab67'/>
<id>urn:sha1:afba990169f41d9026c923da5235584db32cab67</id>
<content type='text'>
This drops package prefixes from the assembly code on 386 and arm. In
addition to just being nicer, this allows the assembler to
automatically pick up the argument stack map from the Go signatures of
these functions. This doesn't matter right now because these functions
never call back out to Go, but prepares us for the next CL.

Change-Id: I90fed7d4dd63ad49274529c62804211b6390e2e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/262777
Trust: Austin Clements &lt;austin@google.com&gt;
Run-TryBot: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
</feed>
