Skip to content

Commit 2f7041e

Browse files
committed
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
2 parents 565848b + 2c22361 commit 2f7041e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26455,6 +26455,7 @@ F: include/trace/
2645526455
F: kernel/trace/
2645626456
F: kernel/tracepoint.c
2645726457
F: scripts/tracing/
26458+
F: scripts/tracepoint-update.c
2645826459
F: tools/testing/selftests/ftrace/
2645926460

2646026461
TRACING MMIO ACCESSES (MMIOTRACE)

scripts/tracepoint-update.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ static int process_tracepoints(bool mod, void *addr, const char *fname)
210210
}
211211

212212
if (!tracepoint_data_sec) {
213+
/* A module may reference only exported tracepoints */
214+
if (mod)
215+
return 0;
213216
fprintf(stderr, "no __tracepoint_strings in file: %s\n", fname);
214217
return -1;
215218
}

0 commit comments

Comments
 (0)