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:
@@ -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
@@ -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
@@ -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. */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user