Thread (3 messages) flat view 3 messages, 2 authors, 2025-09-26

Re: [PATCH v2] rtla/actions: Fix condition for buffer reallocation

From: Tomas Glozar <tglozar@redhat.com>
Date: 2025-09-26 14:35:47
Also in: lkml

Steven,

po 15. 9. 2025 v 20:11 odesílatel Wander Lairson Costa
[off-list ref] napsal:
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.

Fixes: 6ea082b171e00 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Wander Lairson Costa <redacted>

---
v1 -> v2
* Put the commit message in imperative language

---
 tools/tracing/rtla/src/actions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Can you take this fix as well?

Thank you.

Tomas

PS: This should be all for RTLA now.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help