TP_ARGS(const char *, msg, unsigned int, len, void *, ip),
TP_FIELDS(
ctf_sequence_text(char, msg, msg, unsigned int, len)
+ ctf_unused(ip)
)
)
TRACEPOINT_LOGLEVEL(lttng_ust_tracef, event, TRACE_DEBUG)
ctf_string(file, file)
ctf_string(func, func)
ctf_sequence_text(char, msg, msg, unsigned int, len)
+ ctf_unused(ip)
)
)
#define ctf_string_nowrite(_item, _src) \
_ctf_string(_item, _src, 1)
+#undef ctf_unused_nowrite
+#define ctf_unused_nowrite(_src) \
+ _ctf_unused(_src)
+
#undef ctf_enum_nowrite
#define ctf_enum_nowrite(_provider, _name, _type, _item, _src) \
_ctf_enum(_provider, _name, _type, _item, _src, 1)
#undef _ctf_string
#define _ctf_string(_item, _src, _nowrite)
+#undef _ctf_unused
+#define _ctf_unused(_src)
+
#undef _ctf_enum
#define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite)
#undef ctf_string
#define ctf_string(_item, _src)
+#undef ctf_unused
+#define ctf_unused(_src)
+
#undef ctf_enum
#define ctf_enum(_provider, _name, _type, _item, _src)
#undef ctf_string_nowrite
#define ctf_string_nowrite(_item, _src)
+#undef ctf_unused_nowrite
+#define ctf_unused_nowrite(_src)
+
#undef ctf_enum_nowrite
#define ctf_enum_nowrite(_provider, _name, _type, _item, _src)
#define ctf_string(_item, _src) \
_ctf_string(_item, _src, 0)
+#undef ctf_unused
+#define ctf_unused(_src) \
+ _ctf_unused(_src)
+
#undef ctf_enum
#define ctf_enum(_provider, _name, _type, _item, _src) \
_ctf_enum(_provider, _name, _type, _item, _src, 0)
.nofilter = 0, \
}),
+#undef _ctf_unused
+#define _ctf_unused(_src)
+
#undef _ctf_enum
#define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \
__LTTNG_COMPOUND_LITERAL(struct lttng_ust_event_field, { \
#undef _ctf_integer_ext
#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
__event_len += sizeof(_type);
#undef _ctf_float
#define _ctf_float(_type, _item, _src, _nowrite) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
__event_len += sizeof(_type);
#undef _ctf_array_encoded
#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, _encoding, \
_nowrite, _elem_type_base) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
__event_len += sizeof(_type) * (_length);
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type, \
_src_length, _encoding, _nowrite, _elem_type_base) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_length_type)); \
__event_len += sizeof(_length_type); \
__event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
__event_len += __dynamic_len[__dynamic_len_idx++] = \
strlen((_src) ? (_src) : __LTTNG_UST_NULL_STRING) + 1;
+#undef _ctf_unused
+#define _ctf_unused(_src) \
+ if (0) \
+ (void) (_src); /* Unused */
+
#undef _ctf_enum
#define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \
_ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, _nowrite)
size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS_DATA_PROTO(_args)) \
lttng_ust_notrace; \
static inline \
-size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS_DATA_PROTO(_args)) \
+size_t __event_get_size__##_provider##___##_name( \
+ size_t *__dynamic_len __attribute__((__unused__)), \
+ _TP_ARGS_DATA_PROTO(_args)) \
{ \
size_t __event_len = 0; \
- unsigned int __dynamic_len_idx = 0; \
+ unsigned int __dynamic_len_idx __attribute__((__unused__)) = 0; \
\
if (0) \
- (void) __dynamic_len_idx; /* don't warn if unused */ \
+ (void) __tp_data; /* don't warn if unused */ \
+ \
_fields \
return __event_len; \
}
__stack_data += sizeof(void *); \
}
+#undef _ctf_unused
+#define _ctf_unused(_src) \
+ if (0) \
+ (void) (_src);
+
#undef _ctf_enum
#define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \
_ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, _nowrite)
void __event_prepare_interpreter_stack__##_provider##___##_name(char *__stack_data,\
_TP_ARGS_DATA_PROTO(_args)) \
{ \
+ if (0) { \
+ (void) __tp_data; /* don't warn if unused */ \
+ (void) __stack_data; /* don't warn if unused */ \
+ } \
+ \
_fields \
}
#undef _ctf_integer_ext
#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_float
#define _ctf_float(_type, _item, _src, _nowrite) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_array_encoded
#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, \
_encoding, _nowrite, _elem_type_base) \
+ if (0) \
+ (void) (_src); /* Unused */ \
__event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type, \
_src_length, _encoding, _nowrite, _elem_type_base) \
+ if (0) \
+ (void) (_src); /* Unused */ \
+ if (0) \
+ (void) (_src_length); /* Unused */ \
__event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_length_type)); \
__event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
#undef _ctf_string
-#define _ctf_string(_item, _src, _nowrite)
+#define _ctf_string(_item, _src, _nowrite) \
+ if (0) \
+ (void) (_src); /* Unused */
+
+#undef _ctf_unused
+#define _ctf_unused(_src) \
+ if (0) \
+ (void) (_src); /* Unused */
#undef _ctf_enum
#define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \
__get_dynamic_len(dest)); \
}
+#undef _ctf_unused
+#define _ctf_unused(_src)
#undef _ctf_enum
#define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \
TRACEPOINT_EVENT(lttng_ust_cyg_profile_fast, func_exit,
TP_ARGS(void *, func_addr),
- TP_FIELDS()
+ TP_FIELDS(
+ ctf_unused(func_addr)
+ )
)
TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile_fast, func_exit,
int, flags, uint64_t, memsz, uint8_t, has_build_id,
uint8_t, has_debug_link),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint64_t, memsz, memsz)
ctf_integer_hex(int, flags, flags)
uint64_t, memsz, uint8_t, has_build_id,
uint8_t, has_debug_link),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint64_t, memsz, memsz)
ctf_integer(Lmid_t, nsid, nsid)
size_t, build_id_len
),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_sequence_hex(uint8_t, build_id, build_id,
size_t, build_id_len)
uint32_t, crc
),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint32_t, crc, crc)
ctf_string(filename, filename)
TRACEPOINT_EVENT(lttng_ust_dl, dlclose,
TP_ARGS(void *, ip, void *, baddr),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
)
)
TP_FIELDS(
ctf_integer(size_t, size, size)
ctf_integer_hex(void *, ptr, ptr)
+ ctf_unused(ip)
)
)
TP_ARGS(void *, ptr, void *, ip),
TP_FIELDS(
ctf_integer_hex(void *, ptr, ptr)
+ ctf_unused(ip)
)
)
ctf_integer(size_t, nmemb, nmemb)
ctf_integer(size_t, size, size)
ctf_integer_hex(void *, ptr, ptr)
+ ctf_unused(ip)
)
)
ctf_integer_hex(void *, in_ptr, in_ptr)
ctf_integer(size_t, size, size)
ctf_integer_hex(void *, ptr, ptr)
+ ctf_unused(ip)
)
)
ctf_integer(size_t, alignment, alignment)
ctf_integer(size_t, size, size)
ctf_integer_hex(void *, ptr, ptr)
+ ctf_unused(ip)
)
)
ctf_integer(size_t, alignment, alignment)
ctf_integer(size_t, size, size)
ctf_integer(int, result, result)
+ ctf_unused(ip)
)
)
TP_ARGS(pthread_mutex_t *, mutex, void *, ip),
TP_FIELDS(
ctf_integer_hex(void *, mutex, mutex)
+ ctf_unused(ip)
)
)
TP_FIELDS(
ctf_integer_hex(void *, mutex, mutex)
ctf_integer(int, status, status)
+ ctf_unused(ip)
)
)
TP_FIELDS(
ctf_integer_hex(void *, mutex, mutex)
ctf_integer(int, status, status)
+ ctf_unused(ip)
)
)
TP_FIELDS(
ctf_integer_hex(void *, mutex, mutex)
ctf_integer(int, status, status)
+ ctf_unused(ip)
)
)
TRACEPOINT_EVENT(lttng_ust_statedump, start,
TP_ARGS(struct lttng_ust_session *, session),
- TP_FIELDS()
+ TP_FIELDS(
+ ctf_unused(session)
+ )
)
TRACEPOINT_EVENT(lttng_ust_statedump, bin_info,
uint8_t, has_debug_link
),
TP_FIELDS(
+ ctf_unused(session)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint64_t, memsz, memsz)
ctf_string(path, path)
size_t, build_id_len
),
TP_FIELDS(
+ ctf_unused(session)
ctf_integer_hex(void *, baddr, baddr)
ctf_sequence_hex(uint8_t, build_id, build_id,
size_t, build_id_len)
uint32_t, crc
),
TP_FIELDS(
+ ctf_unused(session)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint32_t, crc, crc)
ctf_string(filename, filename)
char *, name
),
TP_FIELDS(
+ ctf_unused(session)
ctf_array_text(char, procname, name, LTTNG_UST_ABI_PROCNAME_LEN)
)
)
TRACEPOINT_EVENT(lttng_ust_statedump, end,
TP_ARGS(struct lttng_ust_session *, session),
- TP_FIELDS()
+ TP_FIELDS(
+ ctf_unused(session)
+ )
)
#endif /* _TRACEPOINT_LTTNG_UST_STATEDUMP_H */
uint64_t, memsz, uint8_t, has_build_id,
uint8_t, has_debug_link),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint64_t, memsz, memsz)
ctf_string(path, path)
size_t, build_id_len
),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_sequence_hex(uint8_t, build_id, build_id,
size_t, build_id_len)
uint32_t, crc
),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
ctf_integer(uint32_t, crc, crc)
ctf_string(filename, filename)
TRACEPOINT_EVENT(lttng_ust_lib, unload,
TP_ARGS(void *, ip, void *, baddr),
TP_FIELDS(
+ ctf_unused(ip)
ctf_integer_hex(void *, baddr, baddr)
)
)