Disable clone bitwise enum in default build
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 11 May 2021 20:16:18 +0000 (16:16 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 13 May 2021 15:51:30 +0000 (11:51 -0400)
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.

Original commit:

  commit d775625e2ba4825b73b5897e7701ad6e2bdba115
  Author: Geneviève Bastien <gbastien@versatic.net>
  Date:   Wed Apr 1 14:31:49 2020 -0400

    syscalls: Make clone()'s `flags` field a 2 enum struct.

Change-Id: Ia67b5fc93b932b8b76330b4965753a43401c1514
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/syscalls/headers/syscalls_pointers_override.h

index c84efdc900b39aa902674084dee57985f988e13a..ff91a654a7c8552ccbf3b833c67de1b96fc764a9 100644 (file)
@@ -14,6 +14,8 @@ SC_LTTNG_TRACEPOINT_EVENT(execve,
        )
 )
 
+#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
+
 /*
  * Clone()'s `flags` field has two parts:
  *     1. exit signal: the least significant byte of the `unsigned long` is
@@ -145,6 +147,7 @@ lttng_kernel_static_event_field_array(              \
 )
 #endif
 
+#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */
 
 #define OVERRIDE_32_clone
 #define OVERRIDE_64_clone
@@ -156,6 +159,7 @@ SC_LTTNG_TRACEPOINT_EVENT(clone,
        TP_FIELDS(
                sc_exit(ctf_integer(long, ret, ret))
                sc_in(
+#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
                        ctf_custom_field(
                                ctf_custom_type(
                                        lttng_kernel_static_type_struct(2, LTTNG_CLONE_FLAGS, lttng_alignof(unsigned long) * CHAR_BIT)
@@ -165,6 +169,9 @@ SC_LTTNG_TRACEPOINT_EVENT(clone,
                                        ctf_integer_type(unsigned long, clone_flags)
                                )
                        )
+#else
+                       ctf_integer_hex(unsigned long, flags, clone_flags)
+#endif
                )
                sc_in(ctf_integer_hex(unsigned long, newsp, newsp))
                sc_in(ctf_integer_hex(void *, parent_tid, parent_tid))
This page took 0.026925 seconds and 4 git commands to generate.