summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-12-10 16:38:50 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2025-12-10 16:38:50 +0900
commit2f7041e59bf023c9e26184b77a1a87bc5e29d83e (patch)
treeb581be405d2121f7ade667963b4761c5d2c3a9d5
parent565848bb3bcdf166fd3ff982376b30806eec0180 (diff)
parent2c22361ab628adbca82ab2da6d41b7cfeb14b83c (diff)
Merge tag 'trace-v6.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing fixes from Steven Rostedt: - Fix unused tracepoint build for modules only using exported tracepoints The tracepoint-update.c code that looks for unused tracepoints expects if tracepoints are used then it will have tracepoints defined. If not, it errors out which fails the build. In most cases this the way things work. A tracepoint can't be used if it is not defined. There is one exception; If a module only uses tracepoints that are defined in other modules or the vmlinux proper, where the tracepoints are exported. In this case, the tracepoint-update.c code thinks tracepoints are used but not defined and errors out, failing the build. When tracepoint-update.c detects this case, if it is a module that is being processed, exit out normally as it is a legitimate case. - Add tracepoint-update.c to MAINTAINERS file The tracepoint-update.c file is specific to tracing so add it to the tracing subsystem in the MAINTAINERS file. * tag 'trace-v6.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: MAINTAINERS: Add tracepoint-update.c to TRACING section tracing: Fix unused tracepoints when module uses only exported ones
-rw-r--r--MAINTAINERS1
-rw-r--r--scripts/tracepoint-update.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index d3f88aab8ba0..aff3e162180d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -26455,6 +26455,7 @@ F: include/trace/
F: kernel/trace/
F: kernel/tracepoint.c
F: scripts/tracing/
+F: scripts/tracepoint-update.c
F: tools/testing/selftests/ftrace/
TRACING MMIO ACCESSES (MMIOTRACE)
diff --git a/scripts/tracepoint-update.c b/scripts/tracepoint-update.c
index 7f7d90df14ce..90046aedc97b 100644
--- a/scripts/tracepoint-update.c
+++ b/scripts/tracepoint-update.c
@@ -210,6 +210,9 @@ static int process_tracepoints(bool mod, void *addr, const char *fname)
}
if (!tracepoint_data_sec) {
+ /* A module may reference only exported tracepoints */
+ if (mod)
+ return 0;
fprintf(stderr, "no __tracepoint_strings in file: %s\n", fname);
return -1;
}