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
This commit is contained in:
John Baldwin
2026-02-17 15:48:04 -05:00
parent 1101292a55
commit 5a02f004fb
+7
View File
@@ -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) \