From 8a2f7e716dcc62f04d2808e8ade34941c94fc956 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Mon, 29 Mar 2021 13:28:32 -0700 Subject: [syserror] Split usermem package Split usermem package to help remove syserror dependency in go_marshal. New hostarch package contains code not dependent on syserror. PiperOrigin-RevId: 365651233 --- pkg/coverage/BUILD | 2 +- pkg/coverage/coverage.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/coverage') diff --git a/pkg/coverage/BUILD b/pkg/coverage/BUILD index a198e8028..ace5895f8 100644 --- a/pkg/coverage/BUILD +++ b/pkg/coverage/BUILD @@ -7,8 +7,8 @@ go_library( srcs = ["coverage.go"], visibility = ["//:sandbox"], deps = [ + "//pkg/hostarch", "//pkg/sync", - "//pkg/usermem", "@io_bazel_rules_go//go/tools/coverdata", ], ) diff --git a/pkg/coverage/coverage.go b/pkg/coverage/coverage.go index 6f3d72e83..a6778a005 100644 --- a/pkg/coverage/coverage.go +++ b/pkg/coverage/coverage.go @@ -28,8 +28,8 @@ import ( "sort" "testing" + "gvisor.dev/gvisor/pkg/hostarch" "gvisor.dev/gvisor/pkg/sync" - "gvisor.dev/gvisor/pkg/usermem" "github.com/bazelbuild/rules_go/go/tools/coverdata" ) @@ -141,7 +141,7 @@ func ConsumeCoverageData(w io.Writer) int { // Non-zero coverage data found; consume it and report as a PC. counters[index] = 0 pc := globalData.syntheticPCs[fileNum][index] - usermem.ByteOrder.PutUint64(pcBuffer[:], pc) + hostarch.ByteOrder.PutUint64(pcBuffer[:], pc) n, err := w.Write(pcBuffer[:]) if err != nil { if err == io.EOF { -- cgit v1.2.3