X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Finstrumentation%2Fevents%2Farch%2Fx86%2Fexceptions.h;h=89769e2ce3de7dd98ffd17fc54e181cb7b2b77ba;hb=2eb43df613157244ac7b391f77d81d8149f919b8;hp=53c554f44b54c859b51a9905cf985fa2daae0588;hpb=4f65dbd279a289c2801985aaa419df575ea90e17;p=lttng-modules.git 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 ) )