From be50055eef0f460695adb8db2b130392dc367fe7 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Fri, 24 Mar 2023 23:11:55 -0700 Subject: runtime: add remaining wasip1 files Implements OS interactions and memory management. For #58141 Co-authored-by: Richard Musiol Co-authored-by: Achille Roussel Co-authored-by: Julien Fabre Co-authored-by: Evan Phoenix Change-Id: I876e7b033090c2fe2d76d2535bb63d52efa36185 Reviewed-on: https://go-review.googlesource.com/c/go/+/479618 TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Reviewed-by: Ian Lance Taylor Run-TryBot: Cherry Mui Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor --- src/runtime/pprof/pprof_test.go | 6 ++++++ src/runtime/pprof/proto_test.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/runtime/pprof') diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index b19ac16170..56ba6d9803 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -448,6 +448,8 @@ func testCPUProfile(t *testing.T, matches profileMatchFunc, f func(dur time.Dura t.Logf("uname -a: %v", vers) case "plan9": t.Skip("skipping on plan9") + case "wasip1": + t.Skip("skipping on wasip1") } broken := cpuProfilingBroken() @@ -1457,6 +1459,8 @@ func containsCountsLabels(prof *profile.Profile, countLabels map[int64]map[strin } func TestGoroutineProfileConcurrency(t *testing.T) { + testenv.MustHaveParallelism(t) + goroutineProf := Lookup("goroutine") profilerCalls := func(s string) int { @@ -1785,6 +1789,7 @@ func TestCPUProfileLabel(t *testing.T) { } func TestLabelRace(t *testing.T) { + testenv.MustHaveParallelism(t) // Test the race detector annotations for synchronization // between setting labels and consuming them from the // profile. @@ -1809,6 +1814,7 @@ func TestLabelRace(t *testing.T) { } func TestGoroutineProfileLabelRace(t *testing.T) { + testenv.MustHaveParallelism(t) // Test the race detector annotations for synchronization // between setting labels and consuming them from the // goroutine profile. See issue #50292. diff --git a/src/runtime/pprof/proto_test.go b/src/runtime/pprof/proto_test.go index e05a1a60a7..8ec9c9109a 100644 --- a/src/runtime/pprof/proto_test.go +++ b/src/runtime/pprof/proto_test.go @@ -131,7 +131,7 @@ func testPCs(t *testing.T) (addr1, addr2 uint64, map1, map2 *profile.Mapping) { BuildID: peBuildID(exe), HasFunctions: true, } - case "js": + case "js", "wasip1": addr1 = uint64(abi.FuncPCABIInternal(f1)) addr2 = uint64(abi.FuncPCABIInternal(f2)) default: -- cgit v1.3-6-g1900