diff options
author | Chong Cai <chongc@google.com> | 2021-08-13 14:17:56 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-13 14:20:12 -0700 |
commit | 6eb8596f72f3c889de3f826b82319d41ac655829 (patch) | |
tree | 6dcae39e3fbb4bdf078dd5d77e19ef5626712d8d /runsc/boot/strace.go | |
parent | a7b59445db6b76611ea384659cff8f0dfa75cb00 (diff) |
Add Event controls
Add Event controls and implement "stream" commands.
PiperOrigin-RevId: 390691702
Diffstat (limited to 'runsc/boot/strace.go')
-rw-r--r-- | runsc/boot/strace.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runsc/boot/strace.go b/runsc/boot/strace.go index c21648a32..cf5be34cd 100644 --- a/runsc/boot/strace.go +++ b/runsc/boot/strace.go @@ -35,9 +35,14 @@ func enableStrace(conf *config.Config) error { } strace.LogMaximumSize = max + sink := strace.SinkTypeLog + if conf.StraceEvent { + sink = strace.SinkTypeEvent + } + if len(conf.StraceSyscalls) == 0 { - strace.EnableAll(strace.SinkTypeLog) + strace.EnableAll(sink) return nil } - return strace.Enable(strings.Split(conf.StraceSyscalls, ","), strace.SinkTypeLog) + return strace.Enable(strings.Split(conf.StraceSyscalls, ","), sink) } |