Hello, Running "trace-cmd reset" command destroys existing kprobe events: ``` # echo 'p do_sys_open' > /sys/kernel/tracing/kprobe_events # echo 1 > /sys/kernel/tracing/events/kprobes/p_do_sys_open_0/enable # cat /sys/kernel/tracing/kprobe_events p:kprobes/p_do_sys_open_0 do_sys_open # trace-cmd reset # cat /sys/kernel/tracing/kprobe_events # ``` I wonder if introducing a new flag to preserve kprobe events during the reset operation would make sense at all. Thanks,
Yes it does make sense. I'm open to taking patches that add options to trace-cmd reset that limit what it does. We should update libtracecmd's reset option too.
Gotcha. Will send patch(es). Thank you!
> We should update libtracecmd's reset option too. Hi Steven, Could you please share a pointer about reset option in libtracecmd? I implemented necessary changes, but only needed to modify clear_all_dynamic_events() and trace_reset() functions in trace-record.c. Thanks,
Just for the records: posted these patches on the mailing list [1]. [1] https://lore.kernel.org/linux-trace-devel/20241010085350.3479149-1-metin.kaya@arm.com/T/#t
v2 [1] of the patch set is merged. Resolving the ticket. [1] https://lore.kernel.org/linux-trace-devel/20241014123136.3890807-1-metin.kaya@arm.com/#t