From: Mathieu Desnoyers Date: Mon, 5 Sep 2022 20:45:39 +0000 (-0400) Subject: Fix: move "user" attribute from field to type X-Git-Tag: v2.13.6~13 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=07aafa15e9c655db53f575f7b9c8ea30ec7f6e26;p=lttng-modules.git Fix: move "user" attribute from field to type The "user" field attribute (copy from userspace) is not taken into account in the bytecode specialization and interpreter recursive traversal through composed types (LOAD_FIELD bytecode instructions). Those are currently used by the event notification capture bytecode, and by filter expressions which access fields nested within composed types. Move the "user" attribute from the event fields to the integer and string types. This will allow ensuring that the bytecode specialization, interpreter and event notification output capture have access to this user attribute even in nested types (e.g. arrays, sequences) in a subsequent change. Signed-off-by: Mathieu Desnoyers Change-Id: I044a0845b256b5e2cf65aa0888af2b906678d19d --- diff --git a/include/instrumentation/events/net.h b/include/instrumentation/events/net.h index dc0e77b7..93f47a33 100644 --- a/include/instrumentation/events/net.h +++ b/include/instrumentation/events/net.h @@ -117,79 +117,79 @@ static const struct lttng_kernel_event_field *emptyfields[] = { static const struct lttng_kernel_event_field *tcpfields[] = { [0] = lttng_kernel_static_event_field("source_port", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("dest_port", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("seq", lttng_kernel_static_type_integer_from_type(uint32_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [3] = lttng_kernel_static_event_field("ack_seq", lttng_kernel_static_type_integer_from_type(uint32_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [4] = lttng_kernel_static_event_field("data_offset", lttng_kernel_static_type_integer(4, 4, 0, __BIG_ENDIAN, 10), - false, false, false), + false, false), [5] = lttng_kernel_static_event_field("reserved", lttng_kernel_static_type_integer(3, 1, 0, __BIG_ENDIAN, 10), - false, false, false), + false, false), [6] = lttng_kernel_static_event_field("flags", lttng_kernel_static_type_integer(9, 1, 0, __BIG_ENDIAN, 16), - false, false, false), + false, false), [7] = lttng_kernel_static_event_field("window_size", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [8] = lttng_kernel_static_event_field("checksum", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 16), - false, false, false), + false, false), [9] = lttng_kernel_static_event_field("urg_ptr", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), }; static const struct lttng_kernel_event_field *udpfields[] = { [0] = lttng_kernel_static_event_field("source_port", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("dest_port", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("len", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [3] = lttng_kernel_static_event_field("check", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), }; static const struct lttng_kernel_event_field *icmpfields[] = { [0] = lttng_kernel_static_event_field("type", lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("code", lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("checksum", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [3] = lttng_kernel_static_event_field("gateway", lttng_kernel_static_type_integer_from_type(uint32_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), }; static const struct lttng_kernel_event_field *transport_fields[] = { [0] = lttng_kernel_static_event_field("unknown", lttng_kernel_static_type_struct(ARRAY_SIZE(emptyfields), emptyfields, 0), - false, false, true), + false, true), [1] = lttng_kernel_static_event_field("tcp", lttng_kernel_static_type_struct(ARRAY_SIZE(tcpfields), tcpfields, 0), - false, false, true), + false, true), [2] = lttng_kernel_static_event_field("udp", lttng_kernel_static_type_struct(ARRAY_SIZE(udpfields), udpfields, 0), - false, false, true), + false, true), [3] = lttng_kernel_static_event_field("icmp", lttng_kernel_static_type_struct(ARRAY_SIZE(icmpfields), icmpfields, 0), - false, false, true), + false, true), }; #endif /* LTTNG_CREATE_FIELD_METADATA */ @@ -222,98 +222,98 @@ LTTNG_TRACEPOINT_ENUM(transport_header_type, static const struct lttng_kernel_event_field *ipv4fields[] = { [0] = lttng_kernel_static_event_field("version", lttng_kernel_static_type_integer(4, 4, 0, __BIG_ENDIAN, 10), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("ihl", lttng_kernel_static_type_integer(4, 4, 0, __BIG_ENDIAN, 10), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("tos", lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [3] = lttng_kernel_static_event_field("tot_len", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [4] = lttng_kernel_static_event_field("id", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 16), - false, false, false), + false, false), [5] = lttng_kernel_static_event_field("frag_off", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [6] = lttng_kernel_static_event_field("ttl", lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [7] = lttng_kernel_static_event_field("protocol", lttng_kernel_static_type_enum(&__enum_proto_transport_header_type, lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10)), - false, false, false), + false, false), [8] = lttng_kernel_static_event_field("checksum", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 16), - false, false, false), + false, false), [9] = lttng_kernel_static_event_field("saddr", lttng_kernel_static_type_array(4, lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), lttng_alignof(uint8_t), none), - false, false, false), + false, false), [10] = lttng_kernel_static_event_field("daddr", lttng_kernel_static_type_array(4, lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), lttng_alignof(uint8_t), none), - false, false, false), + false, false), [11] = lttng_kernel_static_event_field("transport_header_type", lttng_kernel_static_type_enum(&__enum_transport_header_type, lttng_kernel_static_type_integer_from_type(uint8_t, __BYTE_ORDER, 10)), - false, false, false), + false, false), [12] = lttng_kernel_static_event_field("transport_header", lttng_kernel_static_type_variant(ARRAY_SIZE(transport_fields), transport_fields, NULL, 0), /* Previous field as tag. */ - false, false, false), + false, false), }; static const struct lttng_kernel_event_field *ipv6fields[] = { [0] = lttng_kernel_static_event_field("version", lttng_kernel_static_type_integer(4, 4, 0, __BIG_ENDIAN, 10), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("prio", lttng_kernel_static_type_integer(4, 4, 0, __BIG_ENDIAN, 10), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("flow_lbl", lttng_kernel_static_type_array(3, lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 16), lttng_alignof(uint8_t), none), - false, false, false), + false, false), [3] = lttng_kernel_static_event_field("payload_len", lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [4] = lttng_kernel_static_event_field("nexthdr", lttng_kernel_static_type_enum(&__enum_proto_transport_header_type, lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10)), - false, false, false), + false, false), [5] = lttng_kernel_static_event_field("hop_limit", lttng_kernel_static_type_integer_from_type(uint8_t, __BIG_ENDIAN, 10), - false, false, false), + false, false), [6] = lttng_kernel_static_event_field("saddr", lttng_kernel_static_type_array(8, lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 16), lttng_alignof(uint16_t), none), - false, false, false), + false, false), [7] = lttng_kernel_static_event_field("daddr", lttng_kernel_static_type_array(8, lttng_kernel_static_type_integer_from_type(uint16_t, __BIG_ENDIAN, 16), lttng_alignof(uint16_t), none), - false, false, false), + false, false), [8] = lttng_kernel_static_event_field("transport_header_type", lttng_kernel_static_type_enum(&__enum_transport_header_type, lttng_kernel_static_type_integer_from_type(uint8_t, __BYTE_ORDER, 10)), - false, false, false), + false, false), [9] = lttng_kernel_static_event_field("transport_header", lttng_kernel_static_type_variant(ARRAY_SIZE(transport_fields), transport_fields, NULL, 0), /* Previous field as tag. */ - false, false, false), + false, false), }; static const struct lttng_kernel_event_field *network_fields[] = { [0] = lttng_kernel_static_event_field("unknown", lttng_kernel_static_type_struct(0, emptyfields, 0), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("ipv4", lttng_kernel_static_type_struct(ARRAY_SIZE(ipv4fields), ipv4fields, 0), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("ipv6", lttng_kernel_static_type_struct(ARRAY_SIZE(ipv6fields), ipv6fields, 0), - false, false, false), + false, false), }; #endif /* LTTNG_CREATE_FIELD_METADATA */ diff --git a/include/instrumentation/syscalls/headers/syscalls_integers_override.h b/include/instrumentation/syscalls/headers/syscalls_integers_override.h index eb0cf80f..74bc9dcf 100644 --- a/include/instrumentation/syscalls/headers/syscalls_integers_override.h +++ b/include/instrumentation/syscalls/headers/syscalls_integers_override.h @@ -93,13 +93,13 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_mmap_flags_options, lttng_kernel_static_event_field("type", \ lttng_kernel_static_type_enum(&__enum_lttng_mmap_flags_mapping_type, \ lttng_kernel_static_type_integer(4, 1, 0, __BYTE_ORDER, 16)), \ - false, false, false) + false, false) #define LTTNG_MMAP_FLAGS_OPTIONS \ lttng_kernel_static_event_field("options", \ lttng_kernel_static_type_enum(&__enum_lttng_mmap_flags_options, \ lttng_kernel_static_type_integer(28, 1, 0, __BYTE_ORDER, 16)), \ - false, false, false) + false, false) #if (__BYTE_ORDER == __LITTLE_ENDIAN) #define LTTNG_MMAP_FLAGS \ diff --git a/include/instrumentation/syscalls/headers/syscalls_pointers_override.h b/include/instrumentation/syscalls/headers/syscalls_pointers_override.h index ed8041dd..cd084f93 100644 --- a/include/instrumentation/syscalls/headers/syscalls_pointers_override.h +++ b/include/instrumentation/syscalls/headers/syscalls_pointers_override.h @@ -123,7 +123,7 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_clone_option_flags, lttng_kernel_static_type_enum(&__enum_lttng_clone_exit_signal_flags, \ lttng_kernel_static_type_integer(CLONE_EXIT_SIGNAL_FLAG_RESERVED_BITS, \ 1, 0, __BYTE_ORDER, 16)), \ - false, false, false) + false, false) #define LTTNG_CLONE_FLAGS_OPTIONS \ lttng_kernel_static_event_field("options", \ @@ -131,7 +131,7 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_clone_option_flags, lttng_kernel_static_type_integer( \ sizeof(unsigned long) * CHAR_BIT - CLONE_EXIT_SIGNAL_FLAG_RESERVED_BITS, \ 1, 0, __BYTE_ORDER, 16)), \ - false, false, false) + false, false) #if (__BYTE_ORDER == __LITTLE_ENDIAN) #define LTTNG_CLONE_FLAGS \ @@ -479,25 +479,25 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(pselect6, static const struct lttng_kernel_event_field *lttng_pollfd_flag_fields[] = { [ilog2(POLLIN)] = lttng_kernel_static_event_field("POLLIN", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(POLLPRI)] = lttng_kernel_static_event_field("POLLPRI", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(POLLOUT)] = lttng_kernel_static_event_field("POLLOUT", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(POLLERR)] = lttng_kernel_static_event_field("POLLERR", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(POLLHUP)] = lttng_kernel_static_event_field("POLLHUP", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(POLLNVAL)] = lttng_kernel_static_event_field("POLLNVAL", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(LTTNG_POLL_NRFLAGS)] = lttng_kernel_static_event_field("padding", lttng_kernel_static_type_integer(POLL_FLAGS_PADDING_SIZE, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), }; static_assert(((ARRAY_SIZE(lttng_pollfd_flag_fields) - 1) + POLL_FLAGS_PADDING_SIZE) == sizeof(uint8_t) * BITS_PER_BYTE); @@ -510,12 +510,12 @@ LTTNG_TRACEPOINT_TYPE(PARAMS(const struct lttng_kernel_type_struct lttng_pollfd_ #ifndef LTTNG_TRACEPOINT_TYPE_EXTERN static const struct lttng_kernel_event_field *lttng_pollfd_fields[] = { [0] = lttng_kernel_static_event_field("fd", lttng_kernel_static_type_integer_from_type(int, __BYTE_ORDER, 10), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("raw_events", lttng_kernel_static_type_integer_from_type(uint16_t, __BYTE_ORDER, 16), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("events", (const struct lttng_kernel_type_common *) <tng_pollfd_flag_fields_struct, - false, false, false), + false, false), }; #endif /* LTTNG_TRACEPOINT_TYPE_EXTERN */ @@ -734,26 +734,26 @@ static const struct lttng_kernel_event_field *lttng_epoll_ctl_events_fields[] = /* 0x0001 */ [ilog2(POLLIN)] = lttng_kernel_static_event_field("EPOLLIN", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), /* 0x0002 */ [ilog2(POLLPRI)] = lttng_kernel_static_event_field("EPOLLPRI", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), /* 0x0004 */ [ilog2(POLLOUT)] = lttng_kernel_static_event_field("EPOLLOUT", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), /* 0x0008 */ [ilog2(POLLERR)] = lttng_kernel_static_event_field("EPOLLERR", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), /* 0x0010 */ [ilog2(POLLHUP)] = lttng_kernel_static_event_field("EPOLLHUP", lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), [ilog2(LTTNG_EPOLL_NRFLAGS)] = lttng_kernel_static_event_field("padding", lttng_kernel_static_type_integer(EPOLL_FLAGS_PADDING_SIZE, 1, 0, __LITTLE_ENDIAN, 10), - false, false, false), + false, false), }; #endif /* LTTNG_TRACEPOINT_TYPE_EXTERN */ @@ -764,10 +764,10 @@ LTTNG_TRACEPOINT_TYPE(PARAMS(const struct lttng_kernel_type_struct lttng_epoll_c static const struct lttng_kernel_event_field *lttng_epoll_data_fields[] = { [0] = lttng_kernel_static_event_field("u64", lttng_kernel_static_type_integer_from_type(uint64_t, __BYTE_ORDER, 16), - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("fd", lttng_kernel_static_type_integer_from_type(int, __BYTE_ORDER, 10), - false, false, false), + false, false), }; #endif /* LTTNG_TRACEPOINT_TYPE_EXTERN */ @@ -778,13 +778,13 @@ LTTNG_TRACEPOINT_TYPE(PARAMS(const struct lttng_kernel_type_struct lttng_epoll_d static const struct lttng_kernel_event_field *epoll_ctl_fields[] = { [0] = lttng_kernel_static_event_field("data_union", (const struct lttng_kernel_type_common *) <tng_epoll_data_fields_struct, - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("raw_events", lttng_kernel_static_type_integer_from_type(uint32_t, __BYTE_ORDER, 16), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("events", (const struct lttng_kernel_type_common *) <tng_epoll_ctl_events_fields_struct, - false, false, false), + false, false), }; #endif /* LTTNG_TRACEPOINT_TYPE_EXTERN */ @@ -851,12 +851,12 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_ctl, static const struct lttng_kernel_event_field *lttng_epoll_wait_fields[] = lttng_kernel_static_event_field_array( [0] = lttng_kernel_static_event_field("data_union", (const struct lttng_kernel_type_common *) <tng_epoll_data_fields_struct, - false, false, false), + false, false), [1] = lttng_kernel_static_event_field("raw_events", lttng_kernel_static_type_integer_from_type(uint32_t, __BYTE_ORDER, 16), - false, false, false), + false, false), [2] = lttng_kernel_static_event_field("events", (const struct lttng_kernel_type_common *) <tng_epoll_ctl_events_fields_struct, - false, false, false), + false, false), ); static_assert(((ARRAY_SIZE(lttng_epoll_ctl_events_fields) - 1) + EPOLL_FLAGS_PADDING_SIZE) == sizeof(uint8_t) * BITS_PER_BYTE); diff --git a/include/lttng/events.h b/include/lttng/events.h index fa3e7e90..71ad1274 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -75,13 +75,15 @@ struct lttng_kernel_type_integer { unsigned int size; /* in bits */ unsigned short alignment; /* in bits */ unsigned int signedness:1, - reverse_byte_order:1; + reverse_byte_order:1, + user:1; /* fetch from user-space */ unsigned int base; /* 2, 8, 10, 16, for pretty print */ }; struct lttng_kernel_type_string { struct lttng_kernel_type_common parent; enum lttng_kernel_string_encoding encoding; + unsigned int user:1; /* fetch from user-space */ }; struct lttng_kernel_type_enum { @@ -134,7 +136,6 @@ struct lttng_kernel_event_field { const char *name; const struct lttng_kernel_type_common *type; unsigned int nowrite:1, /* do not write into trace */ - user:1, /* fetch from user-space */ nofilter:1; /* do not consider for filter */ }; @@ -142,7 +143,7 @@ struct lttng_kernel_event_field { #define PARAMS(args...) args #endif -#define lttng_kernel_static_type_integer(_size, _alignment, _signedness, _byte_order, _base) \ +#define _lttng_kernel_static_type_integer(_size, _alignment, _signedness, _byte_order, _user, _base) \ ((const struct lttng_kernel_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_kernel_type_integer, { \ .parent = { \ .type = lttng_kernel_type_integer, \ @@ -151,16 +152,29 @@ struct lttng_kernel_event_field { .alignment = (_alignment), \ .signedness = (_signedness), \ .reverse_byte_order = (_byte_order) != __BYTE_ORDER, \ + .user = (_user), \ .base = (_base), \ })) -#define lttng_kernel_static_type_integer_from_type(_type, _byte_order, _base) \ +#define lttng_kernel_static_type_integer(_size, _alignment, _signedness, _byte_order, _base) \ + _lttng_kernel_static_type_integer(_size, _alignment, _signedness, _byte_order, 0, _base) + +#define lttng_kernel_static_type_user_integer(_size, _alignment, _signedness, _byte_order, _base) \ + _lttng_kernel_static_type_integer(_size, _alignment, _signedness, _byte_order, 1, _base) + +#define _lttng_kernel_static_type_integer_from_type(_type, _byte_order, _user, _base) \ lttng_kernel_static_type_integer(sizeof(_type) * CHAR_BIT, \ lttng_alignof(_type) * CHAR_BIT, \ lttng_is_signed_type(_type), \ _byte_order, \ _base) +#define lttng_kernel_static_type_integer_from_type(_type, _byte_order, _base) \ + _lttng_kernel_static_type_integer_from_type(_type, _byte_order, 0, _base) + +#define lttng_kernel_static_type_user_integer_from_type(_type, _byte_order, _base) \ + _lttng_kernel_static_type_integer_from_type(_type, _byte_order, 1, _base) + #define lttng_kernel_static_type_enum(_desc, _container_type) \ ((const struct lttng_kernel_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_kernel_type_enum, { \ .parent = { \ @@ -199,12 +213,13 @@ struct lttng_kernel_event_field { .elem_type = (_elem_type), \ })) -#define lttng_kernel_static_type_string(_encoding) \ +#define lttng_kernel_static_type_string(_encoding, _user) \ ((const struct lttng_kernel_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_kernel_type_string, { \ .parent = { \ .type = lttng_kernel_type_string, \ }, \ .encoding = lttng_kernel_string_encoding_##_encoding, \ + .user = (_user), \ })) #define lttng_kernel_static_type_struct_init(_nr_fields, _fields, _alignment) \ @@ -233,12 +248,11 @@ struct lttng_kernel_event_field { .alignment = (_alignment), \ })) -#define lttng_kernel_static_event_field(_name, _type, _nowrite, _user, _nofilter) \ +#define lttng_kernel_static_event_field(_name, _type, _nowrite, _nofilter) \ __LTTNG_COMPOUND_LITERAL(const struct lttng_kernel_event_field, { \ .name = (_name), \ .type = (_type), \ .nowrite = (_nowrite), \ - .user = (_user), \ .nofilter = (_nofilter), \ }) diff --git a/include/lttng/tracepoint-event-impl.h b/include/lttng/tracepoint-event-impl.h index dcb22247..8e552556 100644 --- a/include/lttng/tracepoint-event-impl.h +++ b/include/lttng/tracepoint-event-impl.h @@ -259,27 +259,27 @@ static __used struct lttng_kernel_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM #undef _ctf_integer_ext #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ lttng_kernel_static_event_field(#_item, \ - lttng_kernel_static_type_integer_from_type(_type, _byte_order, _base), \ - _nowrite, _user, 0), + _lttng_kernel_static_type_integer_from_type(_type, _byte_order, _user, _base), \ + _nowrite, 0), #undef _ctf_array_encoded #define _ctf_array_encoded(_type, _item, _src, _length, \ _encoding, _byte_order, _elem_type_base, _user, _nowrite) \ lttng_kernel_static_event_field(#_item, \ lttng_kernel_static_type_array(_length, \ - lttng_kernel_static_type_integer_from_type(_type, _byte_order, _elem_type_base), \ + _lttng_kernel_static_type_integer_from_type(_type, _byte_order, _user, _elem_type_base), \ 0, \ _encoding), \ - _nowrite, _user, 0), + _nowrite, 0), #undef _ctf_array_bitfield #define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ lttng_kernel_static_event_field(#_item, \ lttng_kernel_static_type_array((_length) * sizeof(_type) * CHAR_BIT, \ - lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), \ + _lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, _user, 10), \ lttng_alignof(_type), \ none), \ - _nowrite, _user, 0), + _nowrite, 0), #undef _ctf_sequence_encoded #define _ctf_sequence_encoded(_type, _item, _src, \ @@ -287,13 +287,13 @@ static __used struct lttng_kernel_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM _byte_order, _elem_type_base, _user, _nowrite) \ lttng_kernel_static_event_field("_" #_item "_length", \ lttng_kernel_static_type_integer_from_type(_length_type, __BYTE_ORDER, 10), \ - _nowrite, 0, 1), \ + _nowrite, 1), \ lttng_kernel_static_event_field(#_item, \ lttng_kernel_static_type_sequence(NULL, /* Use previous field. */ \ - lttng_kernel_static_type_integer_from_type(_type, _byte_order, _elem_type_base), \ + _lttng_kernel_static_type_integer_from_type(_type, _byte_order, _user, _elem_type_base), \ 0, \ _encoding), \ - _nowrite, _user, 0), + _nowrite, 0), #undef _ctf_sequence_bitfield #define _ctf_sequence_bitfield(_type, _item, _src, \ @@ -301,19 +301,19 @@ static __used struct lttng_kernel_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM _user, _nowrite) \ lttng_kernel_static_event_field("_" #_item "_length", \ lttng_kernel_static_type_integer_from_type(_length_type, __BYTE_ORDER, 10), \ - _nowrite, 0, 1), \ + _nowrite, 1), \ lttng_kernel_static_event_field(#_item, \ lttng_kernel_static_type_sequence(NULL, /* Use previous field. */ \ - lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, 10), \ + _lttng_kernel_static_type_integer(1, 1, 0, __LITTLE_ENDIAN, _user, 10), \ lttng_alignof(_type), \ none), \ - _nowrite, _user, 0), + _nowrite, 0), #undef _ctf_string #define _ctf_string(_item, _src, _user, _nowrite) \ lttng_kernel_static_event_field(#_item, \ - lttng_kernel_static_type_string(UTF8), \ - _nowrite, _user, 0), + lttng_kernel_static_type_string(UTF8, _user), \ + _nowrite, 0), #undef _ctf_unused #define _ctf_unused(_src) @@ -322,12 +322,12 @@ static __used struct lttng_kernel_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM #define _ctf_enum(_name, _type, _item, _src, _user, _nowrite) \ lttng_kernel_static_event_field(#_item, \ lttng_kernel_static_type_enum(&__enum_##_name, \ - lttng_kernel_static_type_integer_from_type(_type, __BYTE_ORDER, 10)), \ - _nowrite, _user, 0), + _lttng_kernel_static_type_integer_from_type(_type, __BYTE_ORDER, _user, 10)), \ + _nowrite, 0), #undef ctf_custom_field #define ctf_custom_field(_type, _item, _code) \ - lttng_kernel_static_event_field(#_item, PARAMS(_type), 0, 0, 1), + lttng_kernel_static_event_field(#_item, PARAMS(_type), 0, 1), #undef ctf_custom_type #define ctf_custom_type(...) __VA_ARGS__ diff --git a/src/lttng-bytecode.c b/src/lttng-bytecode.c index b1437774..9a71a80c 100644 --- a/src/lttng-bytecode.c +++ b/src/lttng-bytecode.c @@ -248,10 +248,12 @@ int apply_field_reloc(const struct lttng_kernel_event_desc *event_desc, { const struct lttng_kernel_type_array *array_type = lttng_kernel_get_type_array(field->type); const struct lttng_kernel_type_common *elem_type = array_type->elem_type; + const struct lttng_kernel_type_integer *elem_integer_type; if (!lttng_kernel_type_is_bytewise_integer(elem_type) || array_type->encoding == lttng_kernel_string_encoding_none) return -EINVAL; - if (field->user) + elem_integer_type = container_of(elem_type, const struct lttng_kernel_type_integer, parent); + if (elem_integer_type->user) op->op = BYTECODE_OP_LOAD_FIELD_REF_USER_SEQUENCE; else op->op = BYTECODE_OP_LOAD_FIELD_REF_SEQUENCE; @@ -261,21 +263,27 @@ int apply_field_reloc(const struct lttng_kernel_event_desc *event_desc, { const struct lttng_kernel_type_sequence *sequence_type = lttng_kernel_get_type_sequence(field->type); const struct lttng_kernel_type_common *elem_type = sequence_type->elem_type; + const struct lttng_kernel_type_integer *elem_integer_type; if (!lttng_kernel_type_is_bytewise_integer(elem_type) || sequence_type->encoding == lttng_kernel_string_encoding_none) return -EINVAL; - if (field->user) + elem_integer_type = container_of(elem_type, const struct lttng_kernel_type_integer, parent); + if (elem_integer_type->user) op->op = BYTECODE_OP_LOAD_FIELD_REF_USER_SEQUENCE; else op->op = BYTECODE_OP_LOAD_FIELD_REF_SEQUENCE; break; } case lttng_kernel_type_string: - if (field->user) + { + const struct lttng_kernel_type_string *string_type = lttng_kernel_get_type_string(field->type); + + if (string_type->user) op->op = BYTECODE_OP_LOAD_FIELD_REF_USER_STRING; else op->op = BYTECODE_OP_LOAD_FIELD_REF_STRING; break; + } case lttng_kernel_type_struct: /* Unsupported. */ case lttng_kernel_type_variant: /* Unsupported. */ default: @@ -330,17 +338,23 @@ int apply_context_reloc(struct bytecode_runtime *runtime, break; /* Sequence and array supported as string */ case lttng_kernel_type_string: - BUG_ON(ctx_field->event_field->user); + { + const struct lttng_kernel_type_string *string_type = lttng_kernel_get_type_string(ctx_field->event_field->type); + + BUG_ON(string_type->user); op->op = BYTECODE_OP_GET_CONTEXT_REF_STRING; break; + } case lttng_kernel_type_array: { const struct lttng_kernel_type_array *array_type = lttng_kernel_get_type_array(ctx_field->event_field->type); const struct lttng_kernel_type_common *elem_type = array_type->elem_type; + const struct lttng_kernel_type_integer *elem_integer_type; if (!lttng_kernel_type_is_bytewise_integer(elem_type) || array_type->encoding == lttng_kernel_string_encoding_none) return -EINVAL; - BUG_ON(ctx_field->event_field->user); + elem_integer_type = container_of(elem_type, const struct lttng_kernel_type_integer, parent); + BUG_ON(elem_integer_type->user); op->op = BYTECODE_OP_GET_CONTEXT_REF_STRING; break; } @@ -348,10 +362,12 @@ int apply_context_reloc(struct bytecode_runtime *runtime, { const struct lttng_kernel_type_sequence *sequence_type = lttng_kernel_get_type_sequence(ctx_field->event_field->type); const struct lttng_kernel_type_common *elem_type = sequence_type->elem_type; + const struct lttng_kernel_type_integer *elem_integer_type; if (!lttng_kernel_type_is_bytewise_integer(elem_type) || sequence_type->encoding == lttng_kernel_string_encoding_none) return -EINVAL; - BUG_ON(ctx_field->event_field->user); + elem_integer_type = container_of(elem_type, const struct lttng_kernel_type_integer, parent); + BUG_ON(elem_integer_type->user); op->op = BYTECODE_OP_GET_CONTEXT_REF_STRING; break; } diff --git a/src/lttng-context-callstack.c b/src/lttng-context-callstack.c index 1ae340a1..5034d8a7 100644 --- a/src/lttng-context-callstack.c +++ b/src/lttng-context-callstack.c @@ -101,23 +101,23 @@ void lttng_callstack_sequence_destroy(void *priv) static const struct lttng_kernel_event_field *event_fields_kernel[NR_FIELDS] = { lttng_kernel_static_event_field("_callstack_kernel_length", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), lttng_kernel_static_event_field("callstack_kernel", lttng_kernel_static_type_sequence(NULL, lttng_kernel_static_type_integer_from_type(unsigned long, __BYTE_ORDER, 16), 0, none), - false, false, false), + false, false), }; static const struct lttng_kernel_event_field *event_fields_user[NR_FIELDS] = { lttng_kernel_static_event_field("_callstack_user_length", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), lttng_kernel_static_event_field("callstack_user", lttng_kernel_static_type_sequence(NULL, lttng_kernel_static_type_integer_from_type(unsigned long, __BYTE_ORDER, 16), 0, none), - false, false, false), + false, false), }; const struct lttng_kernel_event_field **lttng_cs_event_fields(enum lttng_cs_ctx_modes mode) diff --git a/src/lttng-context-cgroup-ns.c b/src/lttng-context-cgroup-ns.c index 3a7f574c..656ab8fb 100644 --- a/src/lttng-context-cgroup-ns.c +++ b/src/lttng-context-cgroup-ns.c @@ -77,7 +77,7 @@ void cgroup_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("cgroup_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), cgroup_ns_get_size, cgroup_ns_record, cgroup_ns_get_value, diff --git a/src/lttng-context-cpu-id.c b/src/lttng-context-cpu-id.c index 30247c31..af36409e 100644 --- a/src/lttng-context-cpu-id.c +++ b/src/lttng-context-cpu-id.c @@ -48,7 +48,7 @@ void cpu_id_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("cpu_id", lttng_kernel_static_type_integer_from_type(int, __BYTE_ORDER, 10), - false, false, false), + false, false), cpu_id_get_size, cpu_id_record, cpu_id_get_value, diff --git a/src/lttng-context-egid.c b/src/lttng-context-egid.c index 1473688b..2b6d3ef9 100644 --- a/src/lttng-context-egid.c +++ b/src/lttng-context-egid.c @@ -50,7 +50,7 @@ void egid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("egid", lttng_kernel_static_type_integer_from_type(gid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), egid_get_size, egid_record, egid_get_value, diff --git a/src/lttng-context-euid.c b/src/lttng-context-euid.c index 7d344b1f..ace9f800 100644 --- a/src/lttng-context-euid.c +++ b/src/lttng-context-euid.c @@ -50,7 +50,7 @@ void euid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("euid", lttng_kernel_static_type_integer_from_type(uid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), euid_get_size, euid_record, euid_get_value, diff --git a/src/lttng-context-gid.c b/src/lttng-context-gid.c index 17f637d7..142061c1 100644 --- a/src/lttng-context-gid.c +++ b/src/lttng-context-gid.c @@ -50,7 +50,7 @@ void gid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("gid", lttng_kernel_static_type_integer_from_type(gid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), gid_get_size, gid_record, gid_get_value, diff --git a/src/lttng-context-hostname.c b/src/lttng-context-hostname.c index 96320ad3..68e142c1 100644 --- a/src/lttng-context-hostname.c +++ b/src/lttng-context-hostname.c @@ -79,7 +79,7 @@ void hostname_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("hostname", lttng_kernel_static_type_array_text(LTTNG_HOSTNAME_CTX_LEN), - false, false, false), + false, false), hostname_get_size, hostname_record, hostname_get_value, diff --git a/src/lttng-context-interruptible.c b/src/lttng-context-interruptible.c index 48ff7efe..2b900bb5 100644 --- a/src/lttng-context-interruptible.c +++ b/src/lttng-context-interruptible.c @@ -55,7 +55,7 @@ void interruptible_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("interruptible", lttng_kernel_static_type_integer_from_type(int8_t, __BYTE_ORDER, 10), - false, false, false), + false, false), interruptible_get_size, interruptible_record, interruptible_get_value, diff --git a/src/lttng-context-ipc-ns.c b/src/lttng-context-ipc-ns.c index d5d0608f..80ef40c9 100644 --- a/src/lttng-context-ipc-ns.c +++ b/src/lttng-context-ipc-ns.c @@ -76,7 +76,7 @@ void ipc_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("ipc_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), ipc_ns_get_size, ipc_ns_record, ipc_ns_get_value, diff --git a/src/lttng-context-migratable.c b/src/lttng-context-migratable.c index 82d3dba0..f39286f0 100644 --- a/src/lttng-context-migratable.c +++ b/src/lttng-context-migratable.c @@ -48,7 +48,7 @@ void migratable_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("migratable", lttng_kernel_static_type_integer_from_type(uint8_t, __BYTE_ORDER, 10), - false, false, false), + false, false), migratable_get_size, migratable_record, migratable_get_value, diff --git a/src/lttng-context-mnt-ns.c b/src/lttng-context-mnt-ns.c index 7853c94b..1757d5a4 100644 --- a/src/lttng-context-mnt-ns.c +++ b/src/lttng-context-mnt-ns.c @@ -78,7 +78,7 @@ void mnt_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("mnt_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), mnt_ns_get_size, mnt_ns_record, mnt_ns_get_value, diff --git a/src/lttng-context-need-reschedule.c b/src/lttng-context-need-reschedule.c index 0ccbfc78..bc8bdff1 100644 --- a/src/lttng-context-need-reschedule.c +++ b/src/lttng-context-need-reschedule.c @@ -48,7 +48,7 @@ void need_reschedule_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("need_reschedule", lttng_kernel_static_type_integer_from_type(uint8_t, __BYTE_ORDER, 10), - false, false, false), + false, false), need_reschedule_get_size, need_reschedule_record, need_reschedule_get_value, diff --git a/src/lttng-context-net-ns.c b/src/lttng-context-net-ns.c index 2d8994af..3e3c3944 100644 --- a/src/lttng-context-net-ns.c +++ b/src/lttng-context-net-ns.c @@ -77,7 +77,7 @@ void net_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("net_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), net_ns_get_size, net_ns_record, net_ns_get_value, diff --git a/src/lttng-context-nice.c b/src/lttng-context-nice.c index 91feb8d1..891e3339 100644 --- a/src/lttng-context-nice.c +++ b/src/lttng-context-nice.c @@ -48,7 +48,7 @@ void nice_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("nice", lttng_kernel_static_type_integer_from_type(int, __BYTE_ORDER, 10), - false, false, false), + false, false), nice_get_size, nice_record, nice_get_value, diff --git a/src/lttng-context-pid-ns.c b/src/lttng-context-pid-ns.c index fdf91bb8..965580ba 100644 --- a/src/lttng-context-pid-ns.c +++ b/src/lttng-context-pid-ns.c @@ -78,7 +78,7 @@ void pid_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("pid_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), pid_ns_get_size, pid_ns_record, pid_ns_get_value, diff --git a/src/lttng-context-pid.c b/src/lttng-context-pid.c index 5bcbe00c..ed000200 100644 --- a/src/lttng-context-pid.c +++ b/src/lttng-context-pid.c @@ -48,7 +48,7 @@ void pid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("pid", lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), pid_get_size, pid_record, pid_get_value, diff --git a/src/lttng-context-ppid.c b/src/lttng-context-ppid.c index 1286c376..b171fe75 100644 --- a/src/lttng-context-ppid.c +++ b/src/lttng-context-ppid.c @@ -70,7 +70,7 @@ void ppid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("ppid", lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), ppid_get_size, ppid_record, ppid_get_value, diff --git a/src/lttng-context-preemptible.c b/src/lttng-context-preemptible.c index 11c15792..2d6b2e34 100644 --- a/src/lttng-context-preemptible.c +++ b/src/lttng-context-preemptible.c @@ -66,7 +66,7 @@ void preemptible_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("preemptible", lttng_kernel_static_type_integer_from_type(uint8_t, __BYTE_ORDER, 10), - false, false, false), + false, false), preemptible_get_size, preemptible_record, preemptible_get_value, diff --git a/src/lttng-context-prio.c b/src/lttng-context-prio.c index ea1a5ea6..a3034e4e 100644 --- a/src/lttng-context-prio.c +++ b/src/lttng-context-prio.c @@ -75,7 +75,7 @@ void prio_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("prio", lttng_kernel_static_type_integer_from_type(int, __BYTE_ORDER, 10), - false, false, false), + false, false), prio_get_size, prio_record, prio_get_value, diff --git a/src/lttng-context-procname.c b/src/lttng-context-procname.c index a2e07453..1e1d9b59 100644 --- a/src/lttng-context-procname.c +++ b/src/lttng-context-procname.c @@ -51,7 +51,7 @@ void procname_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("procname", lttng_kernel_static_type_array_text(sizeof(current->comm)), - false, false, false), + false, false), procname_get_size, procname_record, procname_get_value, diff --git a/src/lttng-context-sgid.c b/src/lttng-context-sgid.c index dde6f713..c9d4211a 100644 --- a/src/lttng-context-sgid.c +++ b/src/lttng-context-sgid.c @@ -50,7 +50,7 @@ void sgid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("sgid", lttng_kernel_static_type_integer_from_type(gid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), sgid_get_size, sgid_record, sgid_get_value, diff --git a/src/lttng-context-suid.c b/src/lttng-context-suid.c index 214de9ac..bd1f0246 100644 --- a/src/lttng-context-suid.c +++ b/src/lttng-context-suid.c @@ -50,7 +50,7 @@ void suid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("suid", lttng_kernel_static_type_integer_from_type(uid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), suid_get_size, suid_record, suid_get_value, diff --git a/src/lttng-context-tid.c b/src/lttng-context-tid.c index 5ca7346c..08857672 100644 --- a/src/lttng-context-tid.c +++ b/src/lttng-context-tid.c @@ -51,7 +51,7 @@ void tid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("tid", lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), tid_get_size, tid_record, tid_get_value, diff --git a/src/lttng-context-time-ns.c b/src/lttng-context-time-ns.c index fe29e206..78a8f2ed 100644 --- a/src/lttng-context-time-ns.c +++ b/src/lttng-context-time-ns.c @@ -76,7 +76,7 @@ void time_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("time_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), time_ns_get_size, time_ns_record, time_ns_get_value, diff --git a/src/lttng-context-uid.c b/src/lttng-context-uid.c index b4b5b6ce..6121beef 100644 --- a/src/lttng-context-uid.c +++ b/src/lttng-context-uid.c @@ -50,7 +50,7 @@ void uid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("uid", lttng_kernel_static_type_integer_from_type(uid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), uid_get_size, uid_record, uid_get_value, diff --git a/src/lttng-context-user-ns.c b/src/lttng-context-user-ns.c index b921f2aa..5ed0cc03 100644 --- a/src/lttng-context-user-ns.c +++ b/src/lttng-context-user-ns.c @@ -62,7 +62,7 @@ void user_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("user_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), user_ns_get_size, user_ns_record, user_ns_get_value, diff --git a/src/lttng-context-uts-ns.c b/src/lttng-context-uts-ns.c index 1c34ae21..76e7b3d7 100644 --- a/src/lttng-context-uts-ns.c +++ b/src/lttng-context-uts-ns.c @@ -76,7 +76,7 @@ void uts_ns_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("uts_ns", lttng_kernel_static_type_integer_from_type(unsigned int, __BYTE_ORDER, 10), - false, false, false), + false, false), uts_ns_get_size, uts_ns_record, uts_ns_get_value, diff --git a/src/lttng-context-vegid.c b/src/lttng-context-vegid.c index 6aee7cbc..aa40c40f 100644 --- a/src/lttng-context-vegid.c +++ b/src/lttng-context-vegid.c @@ -50,7 +50,7 @@ void vegid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vegid", lttng_kernel_static_type_integer_from_type(gid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vegid_get_size, vegid_record, vegid_get_value, diff --git a/src/lttng-context-veuid.c b/src/lttng-context-veuid.c index 30ace857..b941967b 100644 --- a/src/lttng-context-veuid.c +++ b/src/lttng-context-veuid.c @@ -50,7 +50,7 @@ void veuid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("veuid", lttng_kernel_static_type_integer_from_type(uid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), veuid_get_size, veuid_record, veuid_get_value, diff --git a/src/lttng-context-vgid.c b/src/lttng-context-vgid.c index eb05d30a..cd3091e8 100644 --- a/src/lttng-context-vgid.c +++ b/src/lttng-context-vgid.c @@ -50,7 +50,7 @@ void vgid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vgid", lttng_kernel_static_type_integer_from_type(gid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vgid_get_size, vgid_record, vgid_get_value, diff --git a/src/lttng-context-vpid.c b/src/lttng-context-vpid.c index 3aff90f4..47259a7d 100644 --- a/src/lttng-context-vpid.c +++ b/src/lttng-context-vpid.c @@ -63,7 +63,7 @@ void vpid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vpid", lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vpid_get_size, vpid_record, vpid_get_value, diff --git a/src/lttng-context-vppid.c b/src/lttng-context-vppid.c index 55a84c2e..c6f9646d 100644 --- a/src/lttng-context-vppid.c +++ b/src/lttng-context-vppid.c @@ -92,7 +92,7 @@ void vppid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vppid", lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vppid_get_size, vppid_record, vppid_get_value, diff --git a/src/lttng-context-vsgid.c b/src/lttng-context-vsgid.c index 08ee829b..e9b18b67 100644 --- a/src/lttng-context-vsgid.c +++ b/src/lttng-context-vsgid.c @@ -50,7 +50,7 @@ void vsgid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vsgid", lttng_kernel_static_type_integer_from_type(gid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vsgid_get_size, vsgid_record, vsgid_get_value, diff --git a/src/lttng-context-vsuid.c b/src/lttng-context-vsuid.c index 36d562d1..f7d5226b 100644 --- a/src/lttng-context-vsuid.c +++ b/src/lttng-context-vsuid.c @@ -50,7 +50,7 @@ void vsuid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vsuid", lttng_kernel_static_type_integer_from_type(uid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vsuid_get_size, vsuid_record, vsuid_get_value, diff --git a/src/lttng-context-vtid.c b/src/lttng-context-vtid.c index 9f1a399a..4cb595a6 100644 --- a/src/lttng-context-vtid.c +++ b/src/lttng-context-vtid.c @@ -63,7 +63,7 @@ void vtid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vtid", lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vtid_get_size, vtid_record, vtid_get_value, diff --git a/src/lttng-context-vuid.c b/src/lttng-context-vuid.c index 9ffc2cdf..c76115f4 100644 --- a/src/lttng-context-vuid.c +++ b/src/lttng-context-vuid.c @@ -50,7 +50,7 @@ void vuid_get_value(void *priv, static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( lttng_kernel_static_event_field("vuid", lttng_kernel_static_type_integer_from_type(uid_t, __BYTE_ORDER, 10), - false, false, false), + false, false), vuid_get_size, vuid_record, vuid_get_value, diff --git a/src/probes/lttng-kprobes.c b/src/probes/lttng-kprobes.c index 12de611a..b30a6075 100644 --- a/src/probes/lttng-kprobes.c +++ b/src/probes/lttng-kprobes.c @@ -91,7 +91,7 @@ int lttng_kprobes_event_handler_pre(struct kprobe *p, struct pt_regs *regs) static const struct lttng_kernel_event_field *event_fields[] = { lttng_kernel_static_event_field("ip", lttng_kernel_static_type_integer_from_type(unsigned long, __BYTE_ORDER, 16), - false, false, false), + false, false), }; static const struct lttng_kernel_tracepoint_class tp_class = { diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c index 0073d82c..69657242 100644 --- a/src/probes/lttng-kretprobes.c +++ b/src/probes/lttng-kretprobes.c @@ -117,10 +117,10 @@ int lttng_kretprobes_handler_exit(struct kretprobe_instance *krpi, static const struct lttng_kernel_event_field *event_fields[] = { lttng_kernel_static_event_field("ip", lttng_kernel_static_type_integer_from_type(unsigned long, __BYTE_ORDER, 16), - false, false, false), + false, false), lttng_kernel_static_event_field("parent_ip", lttng_kernel_static_type_integer_from_type(unsigned long, __BYTE_ORDER, 16), - false, false, false), + false, false), }; static const struct lttng_kernel_tracepoint_class tp_class = { diff --git a/src/probes/lttng-uprobes.c b/src/probes/lttng-uprobes.c index fed3a1d5..ae5d0941 100644 --- a/src/probes/lttng-uprobes.c +++ b/src/probes/lttng-uprobes.c @@ -101,7 +101,7 @@ int lttng_uprobes_event_handler_pre(struct uprobe_consumer *uc, struct pt_regs * static const struct lttng_kernel_event_field *event_fields[] = { lttng_kernel_static_event_field("ip", lttng_kernel_static_type_integer_from_type(unsigned long, __BYTE_ORDER, 16), - false, false, false), + false, false), }; static const struct lttng_kernel_tracepoint_class tp_class = {