Re: [PATCH v3 4/5] trace-cmd split: Enable support for buffer selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Jan 2024 11:28:34 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Thu, 25 Jan 2024 16:16:42 +0100
> Pierre Gondois <pierre.gondois@xxxxxxx> wrote:
> 
> > >> For example, with a trace recorded with:
> > >>    $ trace-cmd record -e sched_wakeup -B switch_instance \
> > >>      -e sched_switch -B timer_instance -e timer    
> > > 
> > > I tried this with a trace.dat file that has a instance called "tast" and it
> > > didn't work. Note, the top instance had no data.
> > > 
> > >    $ trace-cmd split -i /work/traces/trace-tast.dat -o /tmp/trace-tast2.dat -B tast    
> > 
> > With this command, the expected behaviour should be:
> > trace-tast2.dat:
> > - Contains all the instances of the input trace-tast.dat file  
> 
> Wait what? -i should *not* be used for output if -o is specified!

OK, I see what you did.

As if I wrote:

trace-cmd split -i /work/traces/trace-tast.dat  -B tast -o /tmp/trace-tast2.dat

I got what I want.

But once -o is used, it should repeat for the -B. the -B should *not* use
the input file unless -o is not specified.

  trace-cmd split -i /work/traces/trace-tast.dat -o /tmp/trace-tast2.dat -B tast

What the above should have done the same. But if we added:

  trace-cmd split -i /work/traces/trace-tast.dat --top -o /tmp/trace-tast2.dat -B tast

Then /tmp/trace-tast2.dat would just have the top instance, and it should create:

 /tmp/trace-tast2.dat.tast

to hold the tast image.

Now if I had had:

  trace-cmd split -i /work/traces/trace-tast.dat --top  -B tast -o /tmp/trace-tast2.dat

Then because there was a command "--top" before the -B but it had no -o
assigned for it, then the input_file would be considered the output file
and that should act like you described.

-- Steve






[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux