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))
ctf_enum_value("MAP_FIXED_NOREPLACE", LTTNG_MMAP_FLAGS_TO_CTF(MAP_FIXED_NOREPLACE))
#endif /* (LINUX_VERSION_CODE >= 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))
+
+#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 /* (LINUX_VERSION_CODE >= 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))
ctf_enum_value("MAP_SYNC", LTTNG_MMAP_FLAGS_TO_CTF(MAP_SYNC))
#endif /* (LINUX_VERSION_CODE >= 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 */
)
)