diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-03-11 11:46:18 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-03-11 11:47:30 -0700 |
commit | bc9b979b9412ad5852872c1a9bee462f73d2455e (patch) | |
tree | ca7fda751568879d4ef08aee53d3a8298e1faf55 /runsc/boot/loader.go | |
parent | 71d53382bfb3a6f05e90e31df8f39d22c0131040 (diff) |
Add profiling commands to runsc
Example:
runsc debug --root=<dir> \
--profile-heap=/tmp/heap.prof \
--profile-cpu=/tmp/cpu.prod --profile-delay=30 \
<container ID>
PiperOrigin-RevId: 237848456
Change-Id: Icff3f20c1b157a84d0922599eaea327320dad773
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r-- | runsc/boot/loader.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 42fe6f312..4c7e6abfc 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -445,9 +445,10 @@ func (l *Loader) run() error { filter.Report("syscall filter is DISABLED. Running in less secure mode.") } else { opts := filter.Options{ - Platform: l.k.Platform, - HostNetwork: l.conf.Network == NetworkHost, - ControllerFD: l.ctrl.srv.FD(), + Platform: l.k.Platform, + HostNetwork: l.conf.Network == NetworkHost, + ProfileEnable: l.conf.ProfileEnable, + ControllerFD: l.ctrl.srv.FD(), } if err := filter.Install(opts); err != nil { return fmt.Errorf("installing seccomp filters: %v", err) |