Commit 38c589c2 authored by Kirill Smelkov's avatar Kirill Smelkov

tracing/runtime: Update support for Go1.23 (still incomplete)

Regenerate g for today's state of Go 1.23 (go1.23.6-0-ga991f9c34d).
Compared to go1.23rc1, for which we generated g in 48920809
(tracing/runtime: Add support for Go1.23 (preliminary, incomplete),
.isSending was added to struct timer in

https://github.com/golang/go/commit/3b2e846e11d0  (go.dev/cl/611496)
https://github.com/golang/go/commit/58babf6e0bf5  (go.dev/cl/621616)

Regenerated files stay without changes for Go1.22 and previous releases.

Support for Go1.23 still remains incomplete because there is still no way to
access runtime.stopTheWorld via go:linkname as explained in 48920809.
parent 48920809
......@@ -187,9 +187,10 @@ type timer struct {
// mu protects reads and writes to all fields, with exceptions noted below.
mu mutex
astate uint8 // atomic copy of state bits at last unlock
state uint8 // state bits
isChan bool // timer has a channel; immutable; can be read without lock
astate uint8 // atomic copy of state bits at last unlock
state uint8 // state bits
isChan bool // timer has a channel; immutable; can be read without lock
blocked uint32 // number of goroutines blocked on timer's channel
// Timer wakes up at when, and then at when+period, ... (period > 0 only)
......@@ -229,6 +230,20 @@ type timer struct {
// sendLock protects sends on the timer's channel.
// Not used for async (pre-Go 1.23) behavior when debug.asynctimerchan.Load() != 0.
sendLock mutex
// isSending is used to handle races between running a
// channel timer and stopping or resetting the timer.
// It is used only for channel timers (t.isChan == true).
// It is not used for tickers.
// The value is incremented when about to send a value on the channel,
// and decremented after sending the value.
// The stop/reset code uses this to detect whether it
// stopped the channel send.
//
// isSending is incremented only when t.mu is held.
// isSending is decremented only when t.sendLock is held.
// isSending is read only when both t.mu and t.sendLock are held.
isSending atomic.Int32
}
type guintptr uintptr
type puintptr uintptr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment