Skip to contentSkip to conversation

oslat: remove newline from tracemark message

PATCH In review Marcelo Tosatti 2 participants 2 messages Jun 1, 2023 – Jun 2, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oslat: remove newline from tracemark message

Remove the newline from the trace mark message: it breaks tools that expect the trace files to contain the standard trace format on each new trace line.

src/oslat/oslat.c +1 -2
index b680f1e..99f86b8 100644
@@ -337,8 +337,7 @@ static void insert_bucket(struct thread *t, stamp_t value)
 	lat = (value * g.unit_per_us + t->counter_mhz - 1) / t->counter_mhz;
 	us = (double)lat / g.unit_per_us;
 	if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
-		char *line = "%s: Trace threshold (%d us) triggered on cpu %d with %.*f us!\n"
-		    "Stopping the test.\n";
+		char *line = "%s: Trace threshold (%d us) triggered on cpu %d with %.*f us!\n";
 		tracemark(line, g.app_name, g.trace_threshold, t->core_i,
 			  g.precision, us);
 		err_quit(line, g.app_name, g.trace_threshold, t->core_i,
#1 lore raw
Quoted 14 lines · Marcelo Tosatti

Remove the newline from the trace mark message: it breaks tools that expect the trace files to contain the standard trace format on each new trace line.

src/oslat/oslat.c +0 -0
index b680f1e..99f86b8 100644

src/oslat/oslat.c static void insert_bucket(struct thread *t, stamp_t value) · line 343

Quoted 9 lines
src/oslat/oslat.c +1 -2
@@ -337,8 +337,7 @@ static void insert_bucket(struct thread *t, stamp_t value)
 	lat = (value * g.unit_per_us + t->counter_mhz - 1) / t->counter_mhz;
 	us = (double)lat / g.unit_per_us;
 	if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
-		char *line = "%s: Trace threshold (%d us) triggered on cpu %d with %.*f us!\n"
-		    "Stopping the test.\n";
+		char *line = "%s: Trace threshold (%d us) triggered on cpu %d with %.*f us!\n";
 		tracemark(line, g.app_name, g.trace_threshold, t->core_i,
 			  g.precision, us);
 		err_quit(line, g.app_name, g.trace_threshold, t->core_i,