summaryrefslogtreecommitdiff
path: root/internal/ior.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ior.go')
-rw-r--r--internal/ior.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/ior.go b/internal/ior.go
index decdf12..3afb09a 100644
--- a/internal/ior.go
+++ b/internal/ior.go
@@ -242,6 +242,9 @@ func wireRuntimeBindings(rt *tuiRuntime, bindings runtime.TraceRuntimeBindings)
// live-filter setter so the TUI can swap filters without restarting BPF probes.
func makeTUIEventLoopConfigurer(ctx context.Context, cfg flags.Config, rt *tuiRuntime) func(*eventLoop) {
var recorderWarningOnce sync.Once
+ type aggregateSink interface {
+ IngestSyscallAggregates([]statsengine.SyscallAggregate)
+ }
return func(el *eventLoop) {
// Seed the event loop's filter from config so subsequent reads via
// el.Filter() see the same filter the trace was started with.
@@ -271,6 +274,9 @@ func makeTUIEventLoopConfigurer(ctx context.Context, cfg flags.Config, rt *tuiRu
el.warningCb = func(message string) {
rt.streamBuf.Push(streamrow.NewWarning(rt.streamSeq.Next(), message))
}
+ if sink, ok := rt.snapSource.(aggregateSink); ok {
+ el.aggregateSink = sink
+ }
if bindings, ok := runtime.RuntimeBindingsFromContext(ctx); ok {
bindings.SetLiveFilterSetter(el.SetFilter)
}
@@ -566,6 +572,15 @@ func setupTraceInfra(
bpfModule.Close()
return nil, nil, nil, nil, nil, nil, func() {}, err
}
+ aggregateConsumer, err := newSyscallAggregateConsumer(bpfModule)
+ if err != nil {
+ cancel()
+ stopSignals()
+ rb.Stop()
+ bpfModule.Close()
+ return nil, nil, nil, nil, nil, nil, func() {}, err
+ }
+ el.aggregateSrc = aggregateConsumer
teardown = func() {
// Stop the ring-buffer polling goroutine before the module is closed.