diff mbox series

oslat: Print offending cpu number when above threshold

Message ID 20220412135518.531234-1-nsaenzju@redhat.com
State New
Headers show
Series oslat: Print offending cpu number when above threshold | expand

Commit Message

Nicolas Saenz Julienne April 12, 2022, 1:55 p.m. UTC
Knowing which CPU went above the trace threshold is useful information,
even when not tracing. So let's print it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
---
 src/oslat/oslat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index aa0e9a7..55302f1 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -334,10 +334,10 @@  static void insert_bucket(struct thread *t, stamp_t value)
 	assert(us > 0);
 
 	if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) {
-		char *line = "%s: Trace threshold (%d us) triggered with %u us!\n"
+		char *line = "%s: Trace threshold (%d us) triggered on cpu %d with %u us!\n"
 		    "Stopping the test.\n";
-		tracemark(line, g.app_name, g.trace_threshold, us);
-		err_quit(line, g.app_name, g.trace_threshold, us);
+		tracemark(line, g.app_name, g.trace_threshold, t->core_i, us);
+		err_quit(line, g.app_name, g.trace_threshold, t->core_i, us);
 	}
 
 	/* Update max latency */