summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-08-05 11:28:15 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-05 11:30:11 -0700
commit190b1e6bd4aae56eff3ff846efea38629361b3a9 (patch)
tree673703a8fc2de5ab1b273f05950efbcb9359e8a3 /pkg/sentry
parentd0127b23f26d546db0d525201f0ad3f43d5b8d24 (diff)
Stop profiling when the sentry exits
Also removes `--profile-goroutine` because it's equivalent to `debug --stacks`. PiperOrigin-RevId: 325061502
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/control/pprof.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/control/pprof.go b/pkg/sentry/control/pprof.go
index 663e51989..2bf3c45e1 100644
--- a/pkg/sentry/control/pprof.go
+++ b/pkg/sentry/control/pprof.go
@@ -49,6 +49,9 @@ type ProfileOpts struct {
// - dump out the stack trace of current go routines.
// sentryctl -pid <pid> pprof-goroutine
type Profile struct {
+ // Kernel is the kernel under profile. It's immutable.
+ Kernel *kernel.Kernel
+
// mu protects the fields below.
mu sync.Mutex
@@ -57,9 +60,6 @@ type Profile struct {
// traceFile is the current execution trace output file.
traceFile *fd.FD
-
- // Kernel is the kernel under profile.
- Kernel *kernel.Kernel
}
// StartCPUProfile is an RPC stub which starts recording the CPU profile in a