Files
linux/tools/tracing
Wander Lairson Costa 2227f273b7 rtla/actions: Fix condition for buffer reallocation
The condition to check if the actions buffer needs to be resized was
incorrect. The check `self->size >= self->len` would evaluate to
true on almost every call to `actions_new()`, causing the buffer to
be reallocated unnecessarily each time an action was added.

Fix the condition to `self->len >= self.size`, ensuring
that the buffer is only resized when it is actually full.

Cc: John Kacur <[email protected]>
Cc: Luis Goncalves <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Chang Yin <[email protected]>
Cc: Costa Shulyupin <[email protected]>
Cc: Crystal Wood <[email protected]>
Cc: Gabriele Monaco <[email protected]>
Link: https://lore.kernel.org/[email protected]
Fixes: 6ea082b171 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Wander Lairson Costa <[email protected]>
Reviewed-by: Tomas Glozar <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
2025-09-27 06:01:20 -04:00
..