Skip to contentSkip to conversation

tools lib traceevent: Remove redundant CPU output

PATCH Applied Steven Rostedt 3 participants 3 messages Mar 23, 2016 – Mar 24, 2016

lore
Share & tools
lore
#0 lore raw

Commit a6745330789f "tools lib traceevent: Split pevent_print_event() into specific functionality functions" Broke apart the function pevent_print_event() into three functions. The first function prints the comm, pid and CPU, the second prints the timestamp. But that commit added the printing of the CPU in the timestamp function, which now causes pevent_print_event() to duplicate the CPU output.

Remove the redundant printing of the record's CPU from the timestamp function.

Fixes a6745330789f "tools lib traceevent: Split pevent_print_event() into specific functionality functions"

---

tools/lib/traceevent/event-parse.c +1 -3
index 190cc886ab91..a8b6357d1ffe 100644
@@ -5427,10 +5427,8 @@ void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s,
 	}
 
 	if (pevent->latency_format) {
-		trace_seq_printf(s, " %3d", record->cpu);
 		pevent_data_lat_fmt(pevent, s, record);
-	} else
-		trace_seq_printf(s, " [%03d]", record->cpu);
+	}
 
 	if (use_usec_format) {
 		if (pevent->flags & PEVENT_NSEC_OUTPUT) {
#1 lore raw

Em Wed, Mar 23, 2016 at 10:16:28AM -0400, Steven Rostedt escreveu:

Quoted 9 lines

Commit a6745330789f "tools lib traceevent: Split pevent_print_event() into specific functionality functions" Broke apart the function pevent_print_event() into three functions. The first function prints the comm, pid and CPU, the second prints the timestamp. But that commit added the printing of the CPU in the timestamp function, which now causes pevent_print_event() to duplicate the CPU output.

Remove the redundant printing of the record's CPU from the timestamp function.

Thanks, applied.

- Arnaldo

#2 lore raw
In reply to Steven Rostedt
tools lib traceevent: Remove redundant CPU output
Commit-ID:  4f3c887688a2b0c01b241afcfedbb4e5e4a8e022
Gitweb:     http://git.kernel.org/tip/4f3c887688a2b0c01b241afcfedbb4e5e4a8e022
Author:     Steven Rostedt <[email protected]>
AuthorDate: Wed, 23 Mar 2016 10:16:28 -0400
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 23 Mar 2016 15:08:12 -0300

tools lib traceevent: Remove redundant CPU output

Commit a6745330789f ("tools lib traceevent: Split pevent_print_event() into specific functionality functions") broke apart the function pevent_print_event() into three functions.

The first function prints the comm, pid and CPU, the second prints the timestamp.

But that commit added the printing of the CPU in the timestamp function, which now causes pevent_print_event() to duplicate the CPU output.

Remove the redundant printing of the record's CPU from the timestamp function.

Cc Namhyung Kim <[email protected]>
Fixes a6745330789f ("tools lib traceevent: Split pevent_print_event() into specific functionality functions")
---
 tools/lib/traceevent/event-parse.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tools/lib/traceevent/event-parse.c +1 -3
index 190cc88..a8b6357 100644
@@ -5427,10 +5427,8 @@ void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s,
 	}
 
 	if (pevent->latency_format) {
-		trace_seq_printf(s, " %3d", record->cpu);
 		pevent_data_lat_fmt(pevent, s, record);
-	} else
-		trace_seq_printf(s, " [%03d]", record->cpu);
+	}
 
 	if (use_usec_format) {
 		if (pevent->flags & PEVENT_NSEC_OUTPUT) {