diff options
author | Nayana Bidari <nybidari@google.com> | 2021-04-22 16:04:40 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-22 16:07:15 -0700 |
commit | 0a6eaed50b83a35a687699aa5e871b80605c9f46 (patch) | |
tree | 5db0976f79c0781ef803f1299bf4781b29c1b08c /pkg/sentry/kernel | |
parent | d93907110eebdfb1e51dacd9ccffd0f0c2633a81 (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 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/task_syscall.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/task_syscall.go b/pkg/sentry/kernel/task_syscall.go index 2c658d001..36855e3ec 100644 --- a/pkg/sentry/kernel/task_syscall.go +++ b/pkg/sentry/kernel/task_syscall.go @@ -285,6 +285,7 @@ func (*runSyscallExit) execute(t *Task) taskRunState { // task's next run state. func (t *Task) doVsyscall(addr hostarch.Addr, sysno uintptr) taskRunState { vsyscallCount.Increment() + metric.WeirdnessMetric.Increment("vsyscall_count") // Grab the caller up front, to make sure there's a sensible stack. caller := t.Arch().Native(uintptr(0)) |