TP_ENUM_VALUES(
ctf_enum_value("MAP_SHARED", MAP_SHARED)
ctf_enum_value("MAP_PRIVATE", MAP_PRIVATE)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
ctf_enum_value("MAP_SHARED_VALIDATE", MAP_SHARED_VALIDATE)
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
)
)
SC_LTTNG_TRACEPOINT_ENUM(lttng_mmap_flags_options,
TP_ENUM_VALUES(
ctf_enum_value("<none>", 0)
+
+#if defined (MAP_32BIT) && MAP_32BIT != 0
ctf_enum_value("MAP_32BIT", LTTNG_MMAP_FLAGS_TO_CTF(MAP_32BIT))
+#endif /* defined (MAP_32BIT) && MAP_32BIT != 0 */
+
ctf_enum_value("MAP_ANONYMOUS", LTTNG_MMAP_FLAGS_TO_CTF(MAP_ANONYMOUS))
ctf_enum_value("MAP_DENYWRITE", LTTNG_MMAP_FLAGS_TO_CTF(MAP_DENYWRITE))
ctf_enum_value("MAP_EXECUTABLE", LTTNG_MMAP_FLAGS_TO_CTF(MAP_EXECUTABLE))
ctf_enum_value("MAP_FIXED", LTTNG_MMAP_FLAGS_TO_CTF(MAP_FIXED))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
ctf_enum_value("MAP_FIXED_NOREPLACE", LTTNG_MMAP_FLAGS_TO_CTF(MAP_FIXED_NOREPLACE))
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0)) */
+
ctf_enum_value("MAP_GROWSDOWN", LTTNG_MMAP_FLAGS_TO_CTF(MAP_GROWSDOWN))
ctf_enum_value("MAP_HUGETLB", LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGETLB))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
- ctf_enum_value("MAP_HUGETLB_2MB", LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGE_2MB))
- ctf_enum_value("MAP_HUGETLB_1GB", LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGE_1GB))
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
+
+#if defined (MAP_HUGE_2MB) && MAP_HUGE_2MB != 0
+ ctf_enum_value("MAP_HUGE_2MB", LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGE_2MB))
+#endif /* defined (MAP_HUGE_2MB) && MAP_HUGE_2MB != 0 */
+
+#if defined (MAP_HUGE_1GB) && MAP_HUGE_1GB != 0
+ ctf_enum_value("MAP_HUGE_1GB", LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGE_1GB))
+#endif /* defined (MAP_HUGE_1GB) && MAP_HUGE_1GB != 0 */
+
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
+
ctf_enum_value("MAP_LOCKED", LTTNG_MMAP_FLAGS_TO_CTF(MAP_LOCKED))
ctf_enum_value("MAP_NONBLOCK", LTTNG_MMAP_FLAGS_TO_CTF(MAP_NONBLOCK))
ctf_enum_value("MAP_NORESERVE", LTTNG_MMAP_FLAGS_TO_CTF(MAP_NORESERVE))
ctf_enum_value("MAP_POPULATE", LTTNG_MMAP_FLAGS_TO_CTF(MAP_POPULATE))
ctf_enum_value("MAP_STACK", LTTNG_MMAP_FLAGS_TO_CTF(MAP_STACK))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
ctf_enum_value("MAP_SYNC", LTTNG_MMAP_FLAGS_TO_CTF(MAP_SYNC))
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
+
+#if defined (MAP_UNINITIALIZED) && MAP_UNINITIALIZED != 0
ctf_enum_value("MAP_UNINITIALIZED", LTTNG_MMAP_FLAGS_TO_CTF(MAP_UNINITIALIZED))
+#endif /* defined (MAP_UNINITIALIZED) && MAP_UNINITIALIZED != 0 */
)
)
#endif /* #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) */
ctf_enum_value("F_SETOWN_EX", F_SETOWN_EX)
ctf_enum_value("F_GETOWN_EX", F_GETOWN_EX)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0))
ctf_enum_value("F_GETOWNER_UIDS", F_GETOWNER_UIDS)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0)) */
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
ctf_enum_value("F_OFD_GETLK", F_OFD_GETLK)
ctf_enum_value("F_OFD_SETLK", F_OFD_SETLK)
ctf_enum_value("F_OFD_SETLKW", F_OFD_SETLKW)
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
ctf_enum_value("F_SETLEASE", F_SETLEASE)
ctf_enum_value("F_GETLEASE", F_GETLEASE)
ctf_enum_value("F_NOTIFY", F_NOTIFY)
ctf_enum_value("F_DUPFD_CLOEXEC", F_DUPFD_CLOEXEC)
ctf_enum_value("F_SETPIPE_SZ", F_SETPIPE_SZ)
ctf_enum_value("F_GETPIPE_SZ", F_GETPIPE_SZ)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0))
ctf_enum_value("F_ADD_SEALS", F_ADD_SEALS)
ctf_enum_value("F_GET_SEALS", F_GET_SEALS)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0)) */
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
ctf_enum_value("F_GET_RW_HINT", F_GET_RW_HINT)
ctf_enum_value("F_SET_RW_HINT", F_SET_RW_HINT)
ctf_enum_value("F_GET_FILE_RW_HINT", F_GET_FILE_RW_HINT)
ctf_enum_value("F_SET_FILE_RW_HINT", F_SET_FILE_RW_HINT)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) */
)
)