2 dnl # 6.10 kernel, check number of args of __assign_str() for trace:
5 dnl # 6.9 and older: two args
7 dnl # More specifically, this will test to see if __assign_str() takes one
8 dnl # arg. If __assign_str() takes two args, or is not defined, then
9 dnl # HAVE_1ARG_ASSIGN_STR will not be set.
11 AC_DEFUN([ZFS_AC_KERNEL_1ARG_ASSIGN_STR], [
12 AC_MSG_CHECKING([whether __assign_str() has one arg])
13 ZFS_LINUX_TRY_COMPILE_HEADER([
14 #include <linux/module.h>
15 MODULE_LICENSE("$ZFS_META_LICENSE");
17 #define CREATE_TRACE_POINTS
20 trace_zfs_autoconf_event_one("1");
21 trace_zfs_autoconf_event_two("2");
24 AC_DEFINE(HAVE_1ARG_ASSIGN_STR, 1,
25 [__assign_str() has one arg])
29 #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
33 #define TRACE_SYSTEM zfs
34 #include <linux/tracepoint.h>
36 DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
37 TP_PROTO(char *string),
45 TP_printk("str = %s", __get_str(str))
48 #define DEFINE_AUTOCONF_EVENT(name) \
49 DEFINE_EVENT(zfs_autoconf_event_class, name, \
50 TP_PROTO(char * str), \
52 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
53 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
55 #endif /* _CONFTEST_H */
57 #undef TRACE_INCLUDE_PATH
58 #define TRACE_INCLUDE_PATH .
59 #define TRACE_INCLUDE_FILE conftest
60 #include <trace/define_trace.h>