All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trace-cmd report: Add interrupt info in output
@ 2024-01-09  0:17 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2024-01-09  0:17 UTC (permalink / raw)
  To: Linux Trace Devel

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

In the Linux kernel version 3.3 the default output showed the irq information
that is typically only for the latency format. That is, it shows:

               <idle>-0     [000] d..2    49.309305: cpuidle_get_driver <-cpuidle_idle_call
               <idle>-0     [000] d..2    49.309307: mwait_idle <-cpu_idle
               <idle>-0     [000] d..2    49.309309: need_resched <-mwait_idle

Instead of:

               <idle>-0     [000]     49.309305: cpuidle_get_driver <-cpuidle_idle_call
               <idle>-0     [000]     49.309307: mwait_idle <-cpu_idle
               <idle>-0     [000]     49.309309: need_resched <-mwait_idle

After 12 years, it's about time that the default trace-cmd report output did
the same!

This does change the output format and possibly can break anything that
tries to parse it.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tracecmd/trace-read.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c
index f645c053..1dea54c4 100644
--- a/tracecmd/trace-read.c
+++ b/tracecmd/trace-read.c
@@ -870,14 +870,13 @@ void trace_show_data(struct tracecmd_input *handle, struct tep_record *record)
 			TEP_PRINT_PID,
 			TEP_PRINT_CPU);
 
-	if (latency_format) {
-		if (raw_format)
-			trace_seq_printf(&s, "-0x%x",
-					 tep_data_flags(pevent, record));
-		else
-			tep_print_event(pevent, &s, record, "%s",
-					TEP_PRINT_LATENCY);
-	}
+	if (raw_format)
+		trace_seq_printf(&s, "-0x%x",
+				 tep_data_flags(pevent, record));
+	else
+		tep_print_event(pevent, &s, record,
+				latency_format ? "%s" : " %s",
+				TEP_PRINT_LATENCY);
 
 	tep_print_event(pevent, &s, record, tfmt, TEP_PRINT_TIME);
 
-- 
2.42.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-09  0:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09  0:17 [PATCH] trace-cmd report: Add interrupt info in output Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.