sdt: Fix the probe ID type in struct sdt_probe

This is supposed to be a dtrace_id_t, which is a uint32_t, while id_t is
a uint64_t.  sdt.h avoids depending on dtrace.h so we can't use
dtrace_id_t directly.

Bump __FreeBSD_version since the layout of structures in the SDT probe
linker set has changed.

Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
This commit is contained in:
Mark Johnston
2026-01-13 15:35:05 +00:00
parent acb71820d6
commit 66eedcb022
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -60,6 +60,9 @@
#include <cddl/dev/dtrace/dtrace_cddl.h>
_Static_assert(sizeof((struct sdt_probe *)NULL)->id == sizeof(dtrace_id_t),
"sdt_probe.id and dtrace_id_t size mismatch");
/* DTrace methods. */
static void sdt_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *);
static uint64_t sdt_getargval(void *, dtrace_id_t, void *, int, int);
+1 -1
View File
@@ -74,7 +74,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 1600007
#define __FreeBSD_version 1600008
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
+1 -1
View File
@@ -447,7 +447,7 @@ struct sdt_probe {
const char *mod;
const char *func;
const char *name;
id_t id; /* DTrace probe ID. */
uint32_t id; /* DTrace probe ID. */
int n_args; /* Number of arguments. */
struct linker_file *sdtp_lf; /* Module in which we're defined. */
};