X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Finstrumentation%2Fsyscalls%2Fheaders%2Fsyscalls_integers_override.h;h=eb0cf80f7c94e01cf996eb1bc9b7f00de9e2e3d8;hb=4f65dbd279a289c2801985aaa419df575ea90e17;hp=334aea8f48369387c4d446878194d77378514772;hpb=437d5aa59380583ce1cd14d394a53b398be1275d;p=lttng-modules.git diff --git a/include/instrumentation/syscalls/headers/syscalls_integers_override.h b/include/instrumentation/syscalls/headers/syscalls_integers_override.h index 334aea8f..eb0cf80f 100644 --- a/include/instrumentation/syscalls/headers/syscalls_integers_override.h +++ b/include/instrumentation/syscalls/headers/syscalls_integers_override.h @@ -2,6 +2,8 @@ #ifndef CREATE_SYSCALL_TABLE +#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM + /* * The `flags` argument of the mmap syscall is split in two parts: * - The type of mapping is described by the four least significant bits of the 4 @@ -113,10 +115,8 @@ lttng_kernel_static_event_field_array( \ ) #endif -/* - * Use a custom field here so that tracer writes a single integer and the - * work of splitting it up in two fields is left to the trace reader. - */ +#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ + #define OVERRIDE_32_mmap #define OVERRIDE_64_mmap SC_LTTNG_TRACEPOINT_EVENT(mmap, @@ -128,6 +128,12 @@ SC_LTTNG_TRACEPOINT_EVENT(mmap, TP_FIELDS(sc_exit(ctf_integer_hex(unsigned long, ret, ret)) sc_in(ctf_integer_hex(unsigned long, addr, addr)) sc_in(ctf_integer(size_t, len, len)) +#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM + /* + * Use a custom field here so that tracer writes a single + * integer and the work of splitting it up in two fields is + * left to the trace reader. + */ sc_in(ctf_enum(lttng_mmap_protection, int, prot, prot)) sc_in( ctf_custom_field( @@ -140,11 +146,16 @@ SC_LTTNG_TRACEPOINT_EVENT(mmap, ) ) ) +#else + sc_in(ctf_integer(int, prot, prot)) + sc_in(ctf_integer(int, flags, flags)) +#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(off_t, offset, off)) ) ) +#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM /* * Enumeration of the open flags, as described in the 'open' * system call man page. @@ -209,5 +220,6 @@ SC_LTTNG_TRACEPOINT_EVENT(fcntl, sc_in(ctf_enum(lttng_fcntl_cmd_flags, unsigned int, cmd, cmd)) sc_inout(ctf_integer(unsigned long, arg, arg))) ) +#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */ #endif /* CREATE_SYSCALL_TABLE */