diff options
| author | Paul Buetow <paul@buetow.org> | 2025-03-14 20:12:53 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-03-14 20:12:53 +0200 |
| commit | a4948d9fb1aded11e3111f3730b4e3e4e5bd540c (patch) | |
| tree | a769be7265ea956033380919eaf1d8d56e395892 /internal/eventloop.go | |
| parent | 5373526439ef4f7554da365bff7817e8c621a9b4 (diff) | |
use syscall name without enter_ prefix
Diffstat (limited to 'internal/eventloop.go')
| -rw-r--r-- | internal/eventloop.go | 10 |
1 files changed, 3 insertions, 7 deletions
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++ |
