linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH 5/5] trace-cmd: split: Handle splitting files with multiple instances
Date: Fri, 12 Jan 2024 11:18:16 -0500	[thread overview]
Message-ID: <20240112111816.26f2cd6b@gandalf.local.home> (raw)
In-Reply-To: <20240112083945.1361293-6-pierre.gondois@arm.com>

On Fri, 12 Jan 2024 09:39:45 +0100
Pierre Gondois <pierre.gondois@arm.com> 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"?

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?

-- Steve



> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=218357
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> ---
>

  reply	other threads:[~2024-01-12 16:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  8:39 [PATCH 0/5] trace-cmd: split: Handle splitting files with multiple instances Pierre Gondois
2024-01-12  8:39 ` [PATCH 1/5] trace-cmd: split: Small fixes Pierre Gondois
2024-01-12  8:39 ` [PATCH 2/5] trace-cmd: usage: Update usage for trace-cmd split Pierre Gondois
2024-01-12 15:37   ` Steven Rostedt
2024-01-15 17:22     ` Pierre Gondois
2024-01-19 17:31       ` Steven Rostedt
2024-01-12  8:39 ` [PATCH 3/5] trace-cmd: split: Store instances in local list Pierre Gondois
2024-01-12  8:39 ` [PATCH 4/5] trace-cmd: split: Add functions to generate temp files Pierre Gondois
2024-01-12  8:39 ` [PATCH 5/5] trace-cmd: split: Handle splitting files with multiple instances Pierre Gondois
2024-01-12 16:18   ` Steven Rostedt [this message]
2024-01-15 17:25     ` Pierre Gondois
2024-01-15 18:56       ` Steven Rostedt
2024-01-19 16:41     ` Pierre Gondois
2024-01-19 17:06       ` Pierre Gondois
2024-01-19 17:25         ` Steven Rostedt
2024-01-12 15:36 ` [PATCH 0/5] " Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240112111816.26f2cd6b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=pierre.gondois@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).