linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: John Keeping <john@metanate.com>
Cc: linux-trace-devel@vger.kernel.org, williskung@google.com,
	kaleshsingh@google.com, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH 09/12] trace-cmd analyze: Add wake up latency timings
Date: Fri, 25 Mar 2022 16:31:48 -0400	[thread overview]
Message-ID: <20220325163148.0bf4146b@gandalf.local.home> (raw)
In-Reply-To: <20220325161333.65ffb789@gandalf.local.home>

On Fri, 25 Mar 2022 16:13:33 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> I'll fix it in v2.

BTW, I plan on rewriting a lot of this to move it into libtracecmd. That
way other tools can easily extract data from it.

For example, instead of hard coding "page faults" and "wake ups" I plan on
adding a way to register events to trigger on. Something like:

 tracecmd_analyze_register_event_timing(handle, name, start_event,
		 start_field, start_record, end_event, end_field,
		 end_record);

Where "start_record" and "end_record" is if the field is a task to record.

enum {
	TRACECMD_ANALYZE_FL_NONE,
	TRACECMD_ANALYZE_FL_PID,
	TRACECMD_ANALYZE_FL_PID_CPU,
};

Thus, we could have:

	tracecmd_analyze_register_event_timing(handle,
			"Wakeup", sched_waking,
			pid_field, TRACECMD_ANALYZE_FL_PID,
			sched_switch, next_pid,
			TRACECMD_ANALYZE_FL_PID_CPU);

Or something like the above, that will end up turning into the
process_wakeup() function (and properly record the waking pid globally).

One tool I want to use this with, is my ktrace shell (development has
stalled, but I do plan on starting it again). 

  https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/ktrace.git/

And then I could have commands like:

ktrace> open trace.dat
ktrace> analyze register timing sched.sched_switch pid global \
  sched.sched_switch next_pid cpu
ktrace> analyze
ktrace> analyze show cpu 1

And it only shows cpu 1 data.

ktrace> analyze show pid 512

to see just pid 512

etc.

-- Steve

  reply	other threads:[~2022-03-25 20:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  2:57 [PATCH 00/12] trace-cmd: Add trace-cmd analyze command Steven Rostedt
2022-03-24  2:57 ` [PATCH 01/12] trace-cmd: Add trace-cmd analyze Steven Rostedt
2022-03-28 16:08   ` Kalesh Singh
2022-03-28 16:34     ` Steven Rostedt
2022-03-24  2:57 ` [PATCH 02/12] trace-cmd analyze: Show what tasks are running the most Steven Rostedt
2022-03-24  2:57 ` [PATCH 03/12] trace-cmd analyze: Show how much tasks run on each CPU Steven Rostedt
2022-03-25 19:36   ` John Keeping
2022-03-25 20:18     ` Steven Rostedt
2022-03-26 11:07       ` John Keeping
2022-03-26 15:16         ` Steven Rostedt
2022-03-28 16:23           ` Kalesh Singh
2022-03-24  2:57 ` [PATCH 04/12] trace-cmd analyze: Use sched_switch to find comm mappings Steven Rostedt
2022-03-24  2:57 ` [PATCH 05/12] trace-cmd analyze: Use sched_switch event to update times Steven Rostedt
2022-03-24  2:57 ` [PATCH 06/12] trace-cmd analyze: Add tracing of tasks and their states Steven Rostedt
2022-03-25 19:37   ` John Keeping
2022-03-25 20:19     ` Steven Rostedt
2022-03-24  2:57 ` [PATCH 07/12] trace-cmd analyze: Add "idleness" Steven Rostedt
2022-03-24  2:57 ` [PATCH 08/12] trace-cmd analyze: Track migration Steven Rostedt
2022-03-24  2:57 ` [PATCH 09/12] trace-cmd analyze: Add wake up latency timings Steven Rostedt
2022-03-25 19:34   ` John Keeping
2022-03-25 20:13     ` Steven Rostedt
2022-03-25 20:31       ` Steven Rostedt [this message]
2022-03-26 11:14         ` John Keeping
2022-03-26 15:32           ` Steven Rostedt
2022-03-24  2:57 ` [PATCH 10/12] trace-cmd analyze: Add counting of page faults Steven Rostedt
2022-03-24  2:57 ` [PATCH 11/12] trace-cmd analyze: Account for dropped events Steven Rostedt
2022-03-24  2:57 ` [PATCH 12/12] trace-cmd analyze: Add documentation 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=20220325163148.0bf4146b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=john@metanate.com \
    --cc=kaleshsingh@google.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=williskung@google.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).