Commit 443006d5 authored by Kirill Smelkov's avatar Kirill Smelkov

tracing/runtime: Add support for Go1.24 (incomplete)

Generate3d g for today's state of Go 1.24 (go1.24.0-1-g80e2e474b8).
Compared to Go1.23 g gained fipsIndicator and syncGroup fields, while
timer gained isFake field.

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

Support for Go1.24 remains incomplete because there is still no way to
access runtime.stopTheWorld via go:linkname as explained in 48920809.

---- 8< ----
diff --git a/zruntime_g_go1.23.go b/zruntime_g_go1.24.go
index dd3727b..951caa1 100644
--- a/zruntime_g_go1.23.go
+++ b/zruntime_g_go1.24.go
@@ -1,7 +1,7 @@
 // Code generated by g_typedef; DO NOT EDIT.

-//go:build go1.23 && !go1.24
-// +build go1.23,!go1.24
+//go:build go1.24 && !go1.25
+// +build go1.24,!go1.25

 package xruntime

@@ -82,6 +82,7 @@ type g struct {
 	trackingStamp int64 // timestamp of when the G last started being tracked
 	runnableTime  int64 // the amount of time spent runnable, cleared when running, only used when tracking
 	lockedm       muintptr
+	fipsIndicator uint8
 	sig           uint32
 	writebuf      []byte
 	sigcode0      uintptr
@@ -104,6 +105,7 @@ type g struct {
 	goroutineProfiled goroutineProfileStateHolder

 	coroarg   *coro // argument during coroutine transfers
+	syncGroup *synctestGroup

 	// Per-G tracer state.
 	trace gTraceState
@@ -190,6 +192,7 @@ type timer struct {
 	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
+	isFake bool  // timer is using fake time; immutable; can be read without lock

 	blocked uint32 // number of goroutines blocked on timer's channel

@@ -200,7 +203,7 @@ type timer struct {
 	// The arg and seq are client-specified opaque arguments passed back to f.
 	// When used from netpoll, arg and seq have meanings defined by netpoll
 	// and are completely opaque to this code; in that context, seq is a sequence
-	// number to recognize and squech stale function invocations.
+	// number to recognize and squelch stale function invocations.
 	// When used from package time, arg is a channel (for After, NewTicker)
 	// or the function to call (for AfterFunc) and seq is unused (0).
 	//
@@ -301,3 +304,4 @@ type m struct{}            // FIXME stub
 type sudog struct{}         // FIXME stub
 type timersBucket struct{}  // FIXME stub
 type timers struct{}        // FIXME stub
+type synctestGroup struct{} // FIXME stub
parent 38c589c2
#!/bin/bash
# g_typedef -- generate type definition of runtime.g
#
# Copyright (C) 2017-2024 Nexedi SA and Contributors.
# Copyright (C) 2017-2025 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -112,6 +112,10 @@ typedef_g_fixed() {
if (( $govern >= 123 )); then
echo "type timers struct {} // FIXME stub"
fi
if (( $govern >= 124 )); then
echo "type synctestGroup struct {} // FIXME stub"
fi
}
......@@ -142,7 +146,7 @@ gen_zruntime() {
# main driver
gov="go18 go19 go1.10 go1.11 go1.12 go1.13 go1.14 go1.15 go1.16 go1.17 go1.18 go1.19 go1.20 go1.21 go1.22 go1.23"
gov="go18 go19 go1.10 go1.11 go1.12 go1.13 go1.14 go1.15 go1.16 go1.17 go1.18 go1.19 go1.20 go1.21 go1.22 go1.23 go1.24"
for g in $gov; do
goset $g
......
This diff is collapsed.
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