summaryrefslogtreecommitdiffhomepage
path: root/pkg/coverage
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-03-29 13:28:32 -0700
committergVisor bot <gvisor-bot@google.com>2021-03-29 13:30:21 -0700
commit8a2f7e716dcc62f04d2808e8ade34941c94fc956 (patch)
treeb2195d5728dcbc4f4e59c23ad95d7486ef744371 /pkg/coverage
parentb125afba416ebeba906ea595a44a55afe4729d64 (diff)
[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
Diffstat (limited to 'pkg/coverage')
-rw-r--r--pkg/coverage/BUILD2
-rw-r--r--pkg/coverage/coverage.go4
2 files changed, 3 insertions, 3 deletions
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 {