From a4948d9fb1aded11e3111f3730b4e3e4e5bd540c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 14 Mar 2025 20:12:53 +0200 Subject: use syscall name without enter_ prefix --- internal/eventloop.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'internal/eventloop.go') diff --git a/internal/eventloop.go b/internal/eventloop.go index 26718b5..0fc7387 100644 --- a/internal/eventloop.go +++ b/internal/eventloop.go @@ -60,13 +60,13 @@ func (e *eventLoop) stats() string { } func (e *eventLoop) run(ctx context.Context, rawCh <-chan []byte) { - var recycle bool - if e.flags.FlamegraphEnable { e.flamegraph.Start(ctx) } if e.flags.PprofEnable { fmt.Println("Profiling, press Ctrl+C to stop") + } + if !e.flags.FlamegraphEnable && !e.flags.PprofEnable { fmt.Println(event.EventStreamHeader) } @@ -75,14 +75,10 @@ func (e *eventLoop) run(ctx context.Context, rawCh <-chan []byte) { switch { case e.flags.FlamegraphEnable: e.flamegraph.Add(ev) - recycle = false // Flamegraph needs to recycle by itself case e.flags.PprofEnable: - recycle = true + ev.RecyclePrev() default: - recycle = true fmt.Println(ev.String()) - } - if recycle { ev.RecyclePrev() } e.numSyscallsAfterFilter++ -- cgit v1.2.3