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.
This commit is contained in:
Alessio Podda 2025-07-17 06:51:36 +02:00 committed by Ondřej Surý
parent cb0807be2b
commit 6e7aec2cb7
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41
11 changed files with 53 additions and 41 deletions

View file

@ -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,
)

View file

@ -49,7 +49,7 @@
#include <dst/dst.h>
#include "probes.h"
#include "probes-dns.h"
/*
* Incoming AXFR and IXFR.

View file

@ -34,7 +34,7 @@
#include "job_p.h"
#include "loop_p.h"
#include "probes.h"
#include "probes-isc.h"
/*
* Public: #include <isc/job.h>

View file

@ -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,
)

View file

@ -44,8 +44,8 @@
#include <isc/uv.h>
#include "../loop_p.h"
#include "../openssl_shim.h"
#include "netmgr-int.h"
#include "openssl_shim.h"
isc__netmgr_t *isc__netmgr = NULL;

View file

@ -62,7 +62,7 @@
#include <isc/tid.h>
#include <isc/util.h>
#include "probes.h"
#include "probes-isc.h"
static atomic_uint_fast16_t isc__crwlock_workers = 128;

View file

@ -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,
)

View file

@ -75,7 +75,7 @@
#include <ns/stats.h>
#include <ns/xfrout.h>
#include "probes.h"
#include "probes-ns.h"
#if 0
/*