Skip to contentSkip to conversation

tracing: Create output file from cmd_check_undefined

PATCH In review Thomas Weißschuh 2 participants 2 messages May 20 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: Create output file from cmd_check_undefined

As the output file is currently never created, the check will run every time, even if the inputs have not changed.

Create an empty output file which allows make to skip the execution when it is not necessary.

Fixes 1211907ac0b5 ("tracing: Generate undef symbols allowlist for simple_ring_buffer")
Fixes 58b4bd18390e ("tracing: Adjust cmd_check_undefined to show unexpected undefined symbols")
---
 kernel/trace/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/Makefile +2 -1
index 1decdce8cbef..b5797457f9f4 100644
@@ -154,7 +154,8 @@ quiet_cmd_check_undefined = NM      $<
               echo "Unexpected symbols in $<:" >&2; \
               echo "$$undefsyms" >&2; \
               false; \
-          fi
+          fi; \
+          touch $@
 
 $(obj)/%.o.checked: $(obj)/%.o $(obj)/undefsyms_base.o FORCE
 	$(call if_changed,check_undefined)

---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260520-tracing-ringbuffer-check-3a6e748d37b7

Best regards,

Signature · 1 line
Thomas Weißschuh <[email protected]>
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Thomas Weißschuh

As the output file is currently never created, the check will run every time, even if the inputs have not changed.

Create an empty output file which allows make to skip the execution when it is not necessary.

Fixes 1211907ac0b5 ("tracing: Generate undef symbols allowlist for simple_ring_buffer")
Fixes 58b4bd18390e ("tracing: Adjust cmd_check_undefined to show unexpected undefined symbols")
Quoted 27 lines
---
 kernel/trace/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/Makefile +2 -2
index 1decdce8cbef..b5797457f9f4 100644
@@ -154,7 +154,8 @@ quiet_cmd_check_undefined = NM      $<
               echo "Unexpected symbols in $<:" >&2; \
               echo "$$undefsyms" >&2; \
               false; \
-          fi
+          fi; \
+          touch $@
 
 $(obj)/%.o.checked: $(obj)/%.o $(obj)/undefsyms_base.o FORCE
 	$(call if_changed,check_undefined)
 
---

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260520-tracing-ringbuffer-check-3a6e748d37b7

Best regards,

Signature · 1 line
Thomas Weißschuh <[email protected]>
Signature · 2 lines
Cheers,
Nathan