diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-02-17 20:48:04 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-02-17 20:48:04 +0000 |
| commit | 5a02f004fbacee9b2d59b59b11f8910e5736b89c (patch) | |
| tree | c126466ea0c74849c7ff409b6c8d2c559bd5d21e | |
| parent | 1101292a555d24c11d7630b638dc25e1ed22c061 (diff) | |
sdt: Disable SDT probes in kernel modules for GCC on aarch64
For PIC code, the existing assembly constraints do compile on aarch64.
Some kernel modules build ok using the 'p' constraint with the 'a'
operand modifier, but not all.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55166
| -rw-r--r-- | sys/sys/sdt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 0be4e9ba6240..26c60831f667 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -212,6 +212,12 @@ struct sdt_tracepoint { STAILQ_ENTRY(sdt_tracepoint) tracepoint_entry; }; +/* XXX: GCC is not able to compile probes in kernel modules for aarch64. */ +#if !defined(__clang__) && defined(KLD_MODULE) && defined(__aarch64__) +#undef __sdt_used +#define __sdt_used __unused +#define __SDT_PROBE(prov, mod, func, name, uniq, f, ...) +#else #define __SDT_PROBE(prov, mod, func, name, uniq, f, ...) do { \ __WEAK(__CONCAT(__start_set_, _SDT_TRACEPOINT_SET)); \ __WEAK(__CONCAT(__stop_set_, _SDT_TRACEPOINT_SET)); \ @@ -234,6 +240,7 @@ __sdt_probe##uniq:; \ f(_SDT_PROBE_NAME(prov, mod, func, name).id, __VA_ARGS__); \ } \ } while (0) +#endif #define _SDT_PROBE(prov, mod, func, name, uniq, f, ...) \ __SDT_PROBE(prov, mod, func, name, uniq, f, __VA_ARGS__) #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ |
