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:51:47 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> 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.

Of course then things get confusing if we were to have:

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

We could specify that each -B will just use the top level by default. So
the above would create:

 /tmp/trace-foo.dat

With the instance "foo"

But the "bar" would be in:

 /work/traces/trace-tast.dat.bar

because the top level didn't specify a -o.

So to make it more specific. Each -B will default to the toplevel output
with ".<instance>" appended to it.

That is:

  split <top-level-commands> -B instance1 <instance1-commands> -B <instance2-commands>

If a -o is specified in the <top-level-commands> it becomes the default top
level output file.  If a -o is not specified in any of the
<instance*-commands> then, it will default to the top level output file
with ".<instance-name>" attached to it unless it has its own -o specified.

For multi-file splits, it will append ".0001", ".0002", etc to that file.

-- Steve






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

  Powered by Linux