diff --git a/overlay/src/runtime/encore.go b/overlay/src/runtime/encore.go index 41152e1339..14ff88587f 100644 --- a/overlay/src/runtime/encore.go +++ b/overlay/src/runtime/encore.go @@ -21,3 +21,9 @@ func encoreCallers(skip int, pc []uintptr) (n int, off uintptr) { n = Callers(skip+1, pc) return n, firstmoduledata.text } + +// To allow Encore to use go:linkname: + +//go:linkname getEncoreG +//go:linkname setEncoreG +//go:linkname encoreCallers diff --git a/patches/net_patch.diff b/patches/net_patch.diff index 85a3be40da..2be24730b8 100644 --- a/patches/net_patch.diff +++ b/patches/net_patch.diff @@ -6,14 +6,14 @@ This patch modifies the standard libraries roundTrip function on the HTTP interf instrument the call. diff --git a/src/net/http/transport.go b/src/net/http/transport.go -index 7561f7f5cb..302425e3b4 100644 +index da9163a27a..b2200d5952 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go -@@ -510,9 +510,17 @@ func (t *Transport) alternateRoundTripper(req *Request) RoundTripper { +@@ -527,9 +527,17 @@ func validateHeaders(hdrs Header) string { } // roundTrip implements a RoundTripper over HTTP. --func (t *Transport) roundTrip(req *Request) (*Response, error) { +-func (t *Transport) roundTrip(req *Request) (_ *Response, err error) { +func (t *Transport) roundTrip(req *Request) (rr *Response, err error) { t.nextProtoOnce.Do(t.onceSetNextProtoDefaults) - ctx := req.Context() diff --git a/patches/runtime_patch.diff b/patches/runtime_patch.diff index a0bf14fbaa..91c385d2b1 100644 --- a/patches/runtime_patch.diff +++ b/patches/runtime_patch.diff @@ -34,15 +34,15 @@ index aba2e2b27b..588a98ff74 100644 sched.ngsys.Add(1) diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go -index 63320d4a8a..f3be797f7d 100644 +index 4a78963961..87932dfd73 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go -@@ -510,6 +510,8 @@ type g struct { - +@@ -516,6 +516,8 @@ type g struct { + coroarg *coro // argument during coroutine transfers - + + encore unsafe.Pointer // encore-specific goroutine data + - // goroutineProfiled indicates the status of this goroutine's stack for the - // current in-progress goroutine profile - goroutineProfiled goroutineProfileStateHolder + // Per-G tracer state. + trace gTraceState +