From: Michael Jeanson Date: Thu, 13 May 2021 14:30:24 +0000 (-0400) Subject: Disable x86 error code bitwise enum in default build X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2eb43df613157244ac7b391f77d81d8149f919b8;p=lttng-modules.git Disable x86 error code bitwise enum in default build Only generate the bitwise enumerations when CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM is enabled, so the default build does not generate traces which lead to warnings when viewed with babeltrace 1.x and babeltrace 2 with default options. commit 8c7f2a9f2732b11f5cc9798cecb621420cc0e972 Author: Francis Deslauriers Date: Fri Jun 5 18:42:54 2020 -0400 x86: add error code enum to pagefault tracepoints Change-Id: I7901fad216b4774a9bbf3665568f357321805871 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/instrumentation/events/arch/x86/exceptions.h b/include/instrumentation/events/arch/x86/exceptions.h index 53c554f4..89769e2c 100644 --- a/include/instrumentation/events/arch/x86/exceptions.h +++ b/include/instrumentation/events/arch/x86/exceptions.h @@ -5,6 +5,7 @@ #include #include +#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) #include <../arch/x86/include/asm/traps.h> #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */ @@ -28,10 +29,12 @@ enum { #endif /* ONCE_LTTNG_EXCEPTIONS_H */ #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */ +#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ #undef TRACE_SYSTEM #define TRACE_SYSTEM x86_exceptions +#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM LTTNG_TRACEPOINT_ENUM(lttng_x86_pf_error_code, TP_ENUM_VALUES( ctf_enum_value("PROTECTION_FAULT", X86_PF_PROT) @@ -44,6 +47,7 @@ LTTNG_TRACEPOINT_ENUM(lttng_x86_pf_error_code, #endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0)) */ ) ) +#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ LTTNG_TRACEPOINT_EVENT_CLASS(x86_exceptions_class, @@ -61,7 +65,11 @@ LTTNG_TRACEPOINT_EVENT_CLASS(x86_exceptions_class, * Currently, only 5 low bits are used. Should be made * larger if error codes are added to the kernel. */ +#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM ctf_enum(lttng_x86_pf_error_code, unsigned char, error_code, error_code) +#else + ctf_integer_hex(unsigned char, error_code, error_code) +#endif ) )