summaryrefslogtreecommitdiffhomepage
path: root/runsc
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2021-04-22 16:04:40 -0700
committergVisor bot <gvisor-bot@google.com>2021-04-22 16:07:15 -0700
commit0a6eaed50b83a35a687699aa5e871b80605c9f46 (patch)
tree5db0976f79c0781ef803f1299bf4781b29c1b08c /runsc
parentd93907110eebdfb1e51dacd9ccffd0f0c2633a81 (diff)
Add weirdness sentry metric.
Weirdness metric contains fields to track the number of clock fallback, partial result and vsyscalls. This metric will avoid the overhead of having three different metrics (fallbackMetric, partialResultMetric, vsyscallCount). PiperOrigin-RevId: 369970218
Diffstat (limited to 'runsc')
-rw-r--r--runsc/boot/BUILD1
-rw-r--r--runsc/boot/loader.go3
2 files changed, 4 insertions, 0 deletions
diff --git a/runsc/boot/BUILD b/runsc/boot/BUILD
index a79afbdc4..d51347fe1 100644
--- a/runsc/boot/BUILD
+++ b/runsc/boot/BUILD
@@ -38,6 +38,7 @@ go_library(
"//pkg/fspath",
"//pkg/log",
"//pkg/memutil",
+ "//pkg/metric",
"//pkg/rand",
"//pkg/refs",
"//pkg/refsvfs2",
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 798c1a7a7..25f06165f 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -34,6 +34,7 @@ import (
"gvisor.dev/gvisor/pkg/fd"
"gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/pkg/memutil"
+ "gvisor.dev/gvisor/pkg/metric"
"gvisor.dev/gvisor/pkg/rand"
"gvisor.dev/gvisor/pkg/refs"
"gvisor.dev/gvisor/pkg/refsvfs2"
@@ -217,6 +218,8 @@ func New(args Args) (*Loader, error) {
return nil, fmt.Errorf("setting up memory usage: %v", err)
}
+ metric.CreateSentryMetrics()
+
// Is this a VFSv2 kernel?
if args.Conf.VFS2 {
kernel.VFS2Enabled = true