diff options
author | Tamir Duberstein <tamird@google.com> | 2021-06-03 13:15:39 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-03 13:18:43 -0700 |
commit | 758713f4c1b789495435a166167f231991828b46 (patch) | |
tree | 9a56f22710d72822cd109586fe871b2eb459d791 /pkg/sentry | |
parent | ddcd17399b1c1083a132772702d516c154815680 (diff) |
Initialize metrics at init
Avoids a race condition at kernel initialization.
Updates #6057.
PiperOrigin-RevId: 377357723
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/fsimpl/testutil/BUILD | 1 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/testutil/kernel.go | 3 |
2 files changed, 0 insertions, 4 deletions
diff --git a/pkg/sentry/fsimpl/testutil/BUILD b/pkg/sentry/fsimpl/testutil/BUILD index c766164c7..b3f9d1010 100644 --- a/pkg/sentry/fsimpl/testutil/BUILD +++ b/pkg/sentry/fsimpl/testutil/BUILD @@ -17,7 +17,6 @@ go_library( "//pkg/fspath", "//pkg/hostarch", "//pkg/memutil", - "//pkg/metric", "//pkg/sentry/fsbridge", "//pkg/sentry/fsimpl/tmpfs", "//pkg/sentry/kernel", diff --git a/pkg/sentry/fsimpl/testutil/kernel.go b/pkg/sentry/fsimpl/testutil/kernel.go index 438840ae2..97aa20cd1 100644 --- a/pkg/sentry/fsimpl/testutil/kernel.go +++ b/pkg/sentry/fsimpl/testutil/kernel.go @@ -25,7 +25,6 @@ import ( "gvisor.dev/gvisor/pkg/cpuid" "gvisor.dev/gvisor/pkg/fspath" "gvisor.dev/gvisor/pkg/memutil" - "gvisor.dev/gvisor/pkg/metric" "gvisor.dev/gvisor/pkg/sentry/fsbridge" "gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs" "gvisor.dev/gvisor/pkg/sentry/kernel" @@ -63,8 +62,6 @@ func Boot() (*kernel.Kernel, error) { return nil, fmt.Errorf("creating platform: %v", err) } - metric.CreateSentryMetrics() - kernel.VFS2Enabled = true k := &kernel.Kernel{ Platform: plat, |