[PATCH] mm/damon: make damos_esz unconditional trace event

From: SeongJae Park
Date: Wed Jul 09 2025 - 14:22:39 EST


It has no reason to be conditional. Make it unconditional trace event.

Fixes: 9a365a71b830 ("mm/damon: add trace event for effective size quota") # mm-unstable
Closes: https://lore.kernel.org/20250709122123.779c874f@xxxxxxxxxxxxxxxxx
Reported-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
include/trace/events/damon.h | 8 +++-----
mm/damon/core.c | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h
index 2e4d7d281fa7..fc2c61ccc887 100644
--- a/include/trace/events/damon.h
+++ b/include/trace/events/damon.h
@@ -9,14 +9,12 @@
#include <linux/types.h>
#include <linux/tracepoint.h>

-TRACE_EVENT_CONDITION(damos_esz,
+TRACE_EVENT(damos_esz,

TP_PROTO(unsigned int context_idx, unsigned int scheme_idx,
- unsigned long esz, bool do_trace),
+ unsigned long esz),

- TP_ARGS(context_idx, scheme_idx, esz, do_trace),
-
- TP_CONDITION(do_trace),
+ TP_ARGS(context_idx, scheme_idx, esz),

TP_STRUCT__entry(
__field(unsigned int, context_idx)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 0f7d8b37c91d..775e097b6538 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2223,7 +2223,7 @@ static void damos_trace_esz(struct damon_ctx *c, struct damos *s,
break;
sidx++;
}
- trace_damos_esz(cidx, sidx, quota->esz, true);
+ trace_damos_esz(cidx, sidx, quota->esz);
}

static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
--
2.39.5