diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-05 21:33:03 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-05 21:33:03 +0000 |
commit | ba74ccdec1f21b071355a4768d5fc0d5b036d33e (patch) | |
tree | 64ce8912999828dfd55101a17bc2f012a79f0599 /runsc/boot | |
parent | cd29587db7a9b3cf298450778a9c335426b5fa00 (diff) | |
parent | b06e5bc5b0913d3740b435d8753a2569220e0a33 (diff) |
Merge release-20201208.0-109-gb06e5bc5b (automated)
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/controller.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go index 9008e1282..cb5d8ea31 100644 --- a/runsc/boot/controller.go +++ b/runsc/boot/controller.go @@ -129,14 +129,6 @@ type controller struct { // manager holds the containerManager methods. manager *containerManager - - // pprof holds the profile instance if enabled. It may be nil. - pprof *control.Profile - - // stopProfiling has the callback to stop profiling calls. As - // this may be executed only once at most, it will be set to nil - // after it is executed for the first time. - stopProfiling func() } // newController creates a new controller. The caller must call @@ -167,18 +159,14 @@ func newController(fd int, l *Loader) (*controller, error) { ctrl.srv.Register(&control.Logging{}) if l.root.conf.ProfileEnable { - ctrl.pprof, ctrl.stopProfiling = control.NewProfile(l.k) - ctrl.srv.Register(ctrl.pprof) + ctrl.srv.Register(control.NewProfile(l.k)) } return ctrl, nil } func (c *controller) stop() { - if c.stopProfiling != nil { - c.stopProfiling() - c.stopProfiling = nil - } + c.srv.Stop() } // containerManager manages sandbox containers. |