Skip to contentSkip to conversation

trace-cmd report: add spacing before raw data flags

PATCH Superseded CaoRuichuang 2 participants 3 messages Apr 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd report: add spacing before raw data flags

---
 tracecmd/trace-read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tracecmd/trace-read.c +1 -1
index 355ee0f4..962ebd89 100644
@@ -871,7 +871,7 @@ void trace_show_data(struct tracecmd_input *handle, struct tep_record *record)
 			TEP_PRINT_CPU);
 
 	if (raw_format)
-		trace_seq_printf(&s, "-0x%x",
+		trace_seq_printf(&s, " -0x%x",
 				 tep_data_flags(pevent, record));
 	else
 		tep_print_event(pevent, &s, record,
Signature · 1 line
2.39.5 (Apple Git-154)
#1 lore raw

Hi!

Thanks for all the updates. I really do appreciate it. But some notes about patches.

The subjects follow the Linux kernel tracing subsystem approach of starting with a capital letter:

trace-cmd report: Add spacing before raw data flags

On Mon, 6 Apr 2026 23:32:21 +0800
CaoRuichuang <[email protected]> wrote:

BTW, is CaoRuichuang your official name? As in one word. The DCO requires real names, so I have to ask.

Also, even for small changes like this, please add content in the change log body. The subject is about what is being done, but the change log body is "why" it is being done. Here you explain "why" spacing is added before raw data flags.

Thanks!

-- Steve

Quoted 18 lines
---
 tracecmd/trace-read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tracecmd/trace-read.c +1 -1
index 355ee0f4..962ebd89 100644
@@ -871,7 +871,7 @@ void trace_show_data(struct tracecmd_input *handle, struct tep_record *record)
 			TEP_PRINT_CPU);
 
 	if (raw_format)
-		trace_seq_printf(&s, "-0x%x",
+		trace_seq_printf(&s, " -0x%x",
 				 tep_data_flags(pevent, record));
 	else
 		tep_print_event(pevent, &s, record,
#2 lore raw

PATCH v2 1/1 trace-cmd report: Add spacing before raw data flags

In reply to CaoRuichuang

In raw report mode, the CPU field is followed immediately by the raw data flags. Without a separator, the flags get glued to the closing CPU bracket and the output becomes hard to parse visually.

Add a leading space before the raw flag field so the raw report output keeps the same field separation that the non-raw path already has.

---
 tracecmd/trace-read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tracecmd/trace-read.c +1 -1
index 355ee0f4..962ebd89 100644
@@ -871,7 +871,7 @@ void trace_show_data(struct tracecmd_input *handle, struct tep_record *record)
 			TEP_PRINT_CPU);
 
 	if (raw_format)
-		trace_seq_printf(&s, "-0x%x",
+		trace_seq_printf(&s, " -0x%x",
 				 tep_data_flags(pevent, record));
 	else
 		tep_print_event(pevent, &s, record,
Signature · 1 line
2.39.5 (Apple Git-154)