Re: [PATCH v2] trace/osnoise: Add trace events for samples

From: Gabriele Monaco
Date: Wed Feb 05 2025 - 07:02:12 EST


On Tue, 2025-02-04 at 14:35 +0100, Tomas Glozar wrote:
> po 3. 2. 2025 v 10:04 odesílatel Tomas Glozar <tglozar@xxxxxxxxxx>
> napsal:
> > A proof-of-concept bpftrace script using this feature:
> > https://gitlab.com/-/snippets/4801190
> >
>
> I added another PoC using event histograms to the snippet. That one
> captures data from all CPUs, and thus can be used for testing on
> machines with a high number of CPUs where rtla cannot keep up with
> timerlat samples (in our measurements, >100).
>
> There seems to be an issue with division where most values are
> rounded up, e.g.:
> max:        135  timer_latency:     134657
>
> This also affects the main histogram and seems to be specific to the
> event histogram PoC. The bpftrace one shows exactly the same results
> as rtla when run concurrently with it. Another difference compared to
> the bpftrace PoC is that you have to calculate averages manually from
> the latency sum and the sample count.
>
> Tomas
>

The patch and scripts using the new tracepoints produce reasonable
results on a large arm64 machine (128 cores).

Tested-by: Gabriele Monaco <gmonaco@xxxxxxxxxx>

Thanks,
Gabriele