mirror of
https://github.com/tinygo-org/net.git
synced 2026-08-14 08:23:39 +00:00
Upgrade net package from Go 1.21.4 to Go 1.26.2
Backport upstream Go standard library changes to TinyGo's net package. Unmodified files (18) replaced directly from Go 1.26.2 source. Modified files (22) merged via 3-way diff, preserving all TinyGo netdev adaptations, TINYGO markers, and embedded-device constraints. Notable upstream changes included: - net/http: cookie handling improvements, fs enhancements, reverse proxy updates, chunked encoding fixes - net/http: ServeMux routing and pattern matching updates - net: IP parsing and MAC address handling improvements - Various doc link syntax modernization (e.g. [Dial], [Buffers]) TinyGo-only files (netdev.go, tlssock.go) unchanged. All TINYGO comment markers preserved.
This commit is contained in:
+16
-10
@@ -1,6 +1,4 @@
|
||||
// TINYGO: The following is copied from Go 1.21.5 official implementation.
|
||||
|
||||
// Copyright 2010 The Go Authors. All rights reserved.
|
||||
// TINYGO: The following is copied from Go 1.26.2 official implementation.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -69,7 +67,7 @@
|
||||
// in your browser.
|
||||
//
|
||||
// For a study of the facility in action, visit
|
||||
// https://blog.golang.org/2011/06/profiling-go-programs.html.
|
||||
// https://go.dev/blog/pprof.
|
||||
package pprof
|
||||
|
||||
import (
|
||||
@@ -79,6 +77,7 @@ import (
|
||||
"fmt"
|
||||
"html"
|
||||
"internal/godebug"
|
||||
"internal/goexperiment"
|
||||
"internal/profile"
|
||||
"io"
|
||||
"log"
|
||||
@@ -353,12 +352,13 @@ func collectProfile(p *pprof.Profile) (*profile.Profile, error) {
|
||||
}
|
||||
|
||||
var profileSupportsDelta = map[handler]bool{
|
||||
"allocs": true,
|
||||
"block": true,
|
||||
"goroutine": true,
|
||||
"heap": true,
|
||||
"mutex": true,
|
||||
"threadcreate": true,
|
||||
"allocs": true,
|
||||
"block": true,
|
||||
"goroutineleak": true,
|
||||
"goroutine": true,
|
||||
"heap": true,
|
||||
"mutex": true,
|
||||
"threadcreate": true,
|
||||
}
|
||||
|
||||
var profileDescriptions = map[string]string{
|
||||
@@ -374,6 +374,12 @@ var profileDescriptions = map[string]string{
|
||||
"trace": "A trace of execution of the current program. You can specify the duration in the seconds GET parameter. After you get the trace file, use the go tool trace command to investigate the trace.",
|
||||
}
|
||||
|
||||
func init() {
|
||||
if goexperiment.GoroutineLeakProfile {
|
||||
profileDescriptions["goroutineleak"] = "Stack traces of all leaked goroutines. Use debug=2 as a query parameter to export in the same format as an unrecovered panic."
|
||||
}
|
||||
}
|
||||
|
||||
type profileEntry struct {
|
||||
Name string
|
||||
Href string
|
||||
|
||||
Reference in New Issue
Block a user