diff mbox series

[4/4] rtla: Report missed event count

Message ID 20250123142339.990300-5-tglozar@redhat.com (mailing list archive)
State Accepted
Commit cf186201118c953c3a0256312a186b3d24ffdb9f
Headers show
Series rtla: Collect and print number of missed events | expand

Commit Message

Tomas Glozar Jan. 23, 2025, 2:23 p.m. UTC
Print how many events were missed by trace buffer overflow in the main
instance at the end of the run (for hist) or during the run (for top).

Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
 tools/tracing/rtla/src/osnoise_hist.c  | 1 +
 tools/tracing/rtla/src/osnoise_top.c   | 1 +
 tools/tracing/rtla/src/timerlat_hist.c | 1 +
 tools/tracing/rtla/src/timerlat_top.c  | 1 +
 4 files changed, 4 insertions(+)

Comments

Gabriele Monaco Jan. 24, 2025, 9:24 a.m. UTC | #1
On Thu, 2025-01-23 at 15:23 +0100, Tomas Glozar wrote:
> Print how many events were missed by trace buffer overflow in the
> main
> instance at the end of the run (for hist) or during the run (for
> top).
> 
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---

The patchset seems to work as expected, I get the number of dropped
events and the percentage, of course if I let it run too long, I get
unknown number.
Tested on a 128 cores arm64 box with -p100, known to miss events:

run for 5s
4611870 (24.12%) events missed, results might not be accurate

run for 1m
104653605 (45.44%) events missed, results might not be accurate

run for 5m
539717695 (46.85%) events missed, results might not be accurate

run for 10m
1098569155 (47.68%) events missed, results might not be accurate

run for 1h
6749574550 (48.83%) events missed, results might not be accurate

Tested-by: Gabriele Monaco <gmonaco@redhat.com>
diff mbox series

Patch

diff --git a/tools/tracing/rtla/src/osnoise_hist.c b/tools/tracing/rtla/src/osnoise_hist.c
index 214e2c93fde0..21376c00bcb3 100644
--- a/tools/tracing/rtla/src/osnoise_hist.c
+++ b/tools/tracing/rtla/src/osnoise_hist.c
@@ -440,6 +440,7 @@  osnoise_print_stats(struct osnoise_hist_params *params, struct osnoise_tool *too
 	trace_seq_reset(trace->seq);
 
 	osnoise_print_summary(params, trace, data);
+	osnoise_report_missed_events(tool);
 }
 
 /*
diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c
index 45647495ce3b..3d3daf12538d 100644
--- a/tools/tracing/rtla/src/osnoise_top.c
+++ b/tools/tracing/rtla/src/osnoise_top.c
@@ -280,6 +280,7 @@  osnoise_print_stats(struct osnoise_top_params *params, struct osnoise_tool *top)
 
 	trace_seq_do_printf(trace->seq);
 	trace_seq_reset(trace->seq);
+	osnoise_report_missed_events(top);
 }
 
 /*
diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c
index 4403cc4eba30..c18b3456a3d5 100644
--- a/tools/tracing/rtla/src/timerlat_hist.c
+++ b/tools/tracing/rtla/src/timerlat_hist.c
@@ -656,6 +656,7 @@  timerlat_print_stats(struct timerlat_hist_params *params, struct osnoise_tool *t
 
 	timerlat_print_summary(params, trace, data);
 	timerlat_print_stats_all(params, trace, data);
+	osnoise_report_missed_events(tool);
 }
 
 /*
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 059b468981e4..8869a0988955 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -435,6 +435,7 @@  timerlat_print_stats(struct timerlat_top_params *params, struct osnoise_tool *to
 
 	trace_seq_do_printf(trace->seq);
 	trace_seq_reset(trace->seq);
+	osnoise_report_missed_events(top);
 }
 
 /*