From 6e7aec2cb7de4bb5584f7cc80aa5454ad7dbf93d Mon Sep 17 00:00:00 2001 From: Alessio Podda Date: Thu, 17 Jul 2025 06:51:36 +0200 Subject: [PATCH] Use unique names for probes.d files Enabling LTO in the subsequent commit requires the file names to be unique and having same probes.d in each of the libraries breaks this requirement. Rename probes.d to probes-{isc,dns,ns}.d files and adjust the includes. --- lib/dns/meson.build | 28 ++++++++++++++++------------ lib/dns/{probes.d => probes-dns.d} | 0 lib/dns/xfrin.c | 2 +- lib/isc/job.c | 2 +- lib/isc/meson.build | 28 ++++++++++++++++------------ lib/isc/netmgr/netmgr.c | 2 +- lib/isc/{probes.d => probes-isc.d} | 0 lib/isc/rwlock.c | 2 +- lib/ns/meson.build | 28 ++++++++++++++++------------ lib/ns/{probes.d => probes-ns.d} | 0 lib/ns/query.c | 2 +- 11 files changed, 53 insertions(+), 41 deletions(-) rename lib/dns/{probes.d => probes-dns.d} (100%) rename lib/isc/{probes.d => probes-isc.d} (100%) rename lib/ns/{probes.d => probes-ns.d} (100%) diff --git a/lib/dns/meson.build b/lib/dns/meson.build index 4fa3ccf914..785aa961c1 100644 --- a/lib/dns/meson.build +++ b/lib/dns/meson.build @@ -9,7 +9,8 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -probe_src = [dtrace_header.process('probes.d'), files('xfrin.c')] +probe_hdr = dtrace_header.process('probes-dns.d') +probe_src = [probe_hdr, files('xfrin.c')] # dns_inc += include_directories('include') dns_inc_p += include_directories('.') @@ -57,17 +58,20 @@ endif dns_srcset.add( when: 'HAVE_DTRACE', - if_true: custom_target( - 'dns-probe', - input: [files('probes.d'), dns_probe_objects], - output: 'dns-probes.o', - command: [ - dtrace, - '-G', - '-o', '@OUTPUT@', - '-s', '@INPUT@', - ], - ), + if_true: [ + custom_target( + 'dns-probe', + input: [files('probes-dns.d'), dns_probe_objects], + output: 'dns-probes.o', + command: [ + dtrace, + '-G', + '-o', '@OUTPUT@', + '-s', '@INPUT@', + ], + ), + probe_hdr, + ], if_false: probe_src, ) diff --git a/lib/dns/probes.d b/lib/dns/probes-dns.d similarity index 100% rename from lib/dns/probes.d rename to lib/dns/probes-dns.d diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 132df2aa08..e1389f0422 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -49,7 +49,7 @@ #include -#include "probes.h" +#include "probes-dns.h" /* * Incoming AXFR and IXFR. diff --git a/lib/isc/job.c b/lib/isc/job.c index 09ed7360e5..4536746a19 100644 --- a/lib/isc/job.c +++ b/lib/isc/job.c @@ -34,7 +34,7 @@ #include "job_p.h" #include "loop_p.h" -#include "probes.h" +#include "probes-isc.h" /* * Public: #include diff --git a/lib/isc/meson.build b/lib/isc/meson.build index 223d6796f2..0e8e9cf0b3 100644 --- a/lib/isc/meson.build +++ b/lib/isc/meson.build @@ -11,7 +11,8 @@ probe_src = [] -probe_src += [dtrace_header.process('probes.d'), files('job.c')] +probe_hdr = dtrace_header.process('probes-isc.d') +probe_src += [probe_hdr, files('job.c')] if config.get('USE_PTHREAD_RWLOCK') != 1 probe_src += files('rwlock.c') endif @@ -47,17 +48,20 @@ endif isc_srcset.add( when: 'HAVE_DTRACE', - if_true: custom_target( - 'isc-probe', - input: [files('probes.d'), isc_probe_objects], - output: 'isc-probes.o', - command: [ - dtrace, - '-G', - '-o', '@OUTPUT@', - '-s', '@INPUT@', - ], - ), + if_true: [ + custom_target( + 'isc-probe', + input: [files('probes-isc.d'), isc_probe_objects], + output: 'isc-probes.o', + command: [ + dtrace, + '-G', + '-o', '@OUTPUT@', + '-s', '@INPUT@', + ], + ), + probe_hdr, + ], if_false: probe_src, ) diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 1b7281a8a5..b3fcf33fb2 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -44,8 +44,8 @@ #include #include "../loop_p.h" +#include "../openssl_shim.h" #include "netmgr-int.h" -#include "openssl_shim.h" isc__netmgr_t *isc__netmgr = NULL; diff --git a/lib/isc/probes.d b/lib/isc/probes-isc.d similarity index 100% rename from lib/isc/probes.d rename to lib/isc/probes-isc.d diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 6c040400aa..61ffd17ac2 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -62,7 +62,7 @@ #include #include -#include "probes.h" +#include "probes-isc.h" static atomic_uint_fast16_t isc__crwlock_workers = 128; diff --git a/lib/ns/meson.build b/lib/ns/meson.build index 0ea769e379..ded81571ec 100644 --- a/lib/ns/meson.build +++ b/lib/ns/meson.build @@ -9,7 +9,8 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -probe_src = [dtrace_header.process('probes.d'), files('query.c')] +probe_hdr = dtrace_header.process('probes-ns.d') +probe_src = [probe_hdr, files('query.c')] if config.get('HAVE_DTRACE') ns_probe_objects += static_library( @@ -25,17 +26,20 @@ endif ns_srcset.add( when: 'HAVE_DTRACE', - if_true: custom_target( - 'ns-probe', - input: [files('probes.d'), ns_probe_objects], - output: 'ns-probes.o', - command: [ - dtrace, - '-G', - '-o', '@OUTPUT@', - '-s', '@INPUT@', - ], - ), + if_true: [ + custom_target( + 'ns-probe', + input: [files('probes-ns.d'), ns_probe_objects], + output: 'ns-probes.o', + command: [ + dtrace, + '-G', + '-o', '@OUTPUT@', + '-s', '@INPUT@', + ], + ), + probe_hdr, + ], if_false: probe_src, ) diff --git a/lib/ns/probes.d b/lib/ns/probes-ns.d similarity index 100% rename from lib/ns/probes.d rename to lib/ns/probes-ns.d diff --git a/lib/ns/query.c b/lib/ns/query.c index f5f8d84709..4c781f7d44 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -75,7 +75,7 @@ #include #include -#include "probes.h" +#include "probes-ns.h" #if 0 /*