Hello Steven, On 1/12/24 17:18, Steven Rostedt wrote:
On Fri, 12 Jan 2024 09:39:45 +0100 Pierre Gondois <pierre.gondois@xxxxxxx> wrote:trace-cmd can record events in multiple instances: $ trace-cmd record -e sched_wakeup -B test_instance -e sched_switch When trying to split a trace.dat file recorded with the above command, only the events located in the main buffer seems to be split. The events recorded in the test_instance buffer seem to be discarded: $ trace-cmd split -i trace.dat -o trace_2.dat 284443 284444 $ trace-cmd report trace_2.dat cpus=8 <...>-525991 [004] 284443.173879: sched_wakeup: [...] <...>-525991 [004] 284443.173879: sched_wakeup: [...] <...>-525990 [007] 284443.173885: sched_wakeup: [...] <...>-525990 [007] 284443.173885: sched_wakeup: [...] (no sign of sched_switch events)Make use of the previous patches to split all the instances of a trace.This shouldn't be in the change log. As the change log is for history. Think about reading this 5 years from now. Would it make sense about "previous patches"?
I thought it was acceptable to do so as the previous patches would be just before in the git log, but ok I will write something better.
Thanks for doing this, I'll try to set some time next week to review them. I want to release 3.3 soon. Would you be able to add a way to split out an instance into its own trace.dat file? Or to choose what you want. $ trace-cmd record -e sched_wakeup -B test_instance -e sched_switch $ trace-cmd split -B test_instance -o test.dat Would make test_instance the main buffer in test.dat. If you add more than one instance: $ trace-cmd record -e sched_wakeup -B test_instance -e sched_switch -B timer_instance -e timer $ trace-cmd split -B test_instance -o test.dat -B timer_instance This would make "test_instance" the main buffer, and keep "timer_instance" as an instance. The "-o file" placement is important. It will make whatever came before it the main buffer. And perhaps even split out more than one! $ trace-cmd split -B test_instance -o test.dat -B timer_instance -o timer.dat Would place the "test_instance" as the main instance in test.dat, and the "timer_instance" as the main instance in timer.dat. Thoughts?
This should be possible, I will try to make an update in this direction, Regards, Pierre
-- SteveBugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=218357 Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx> ---