mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
lttng: Default to not storing buffer content
Signed-off-by: Adam Crume <adamcrume@gmail.com>
This commit is contained in:
parent
0421b69278
commit
4109879f4e
@ -1,7 +1,11 @@
|
||||
#if !defined(TRACING_COMMON_H)
|
||||
#define TRACING_COMMON_H
|
||||
|
||||
#define CEPH_TRACE_BUF_TRUNC_LEN 32
|
||||
// Amount of buffer data to dump when using ceph_ctf_sequence or ceph_ctf_sequencep.
|
||||
// If 0, then *_data field is omitted entirely.
|
||||
#if !defined(CEPH_TRACE_BUF_TRUNC_LEN)
|
||||
#define CEPH_TRACE_BUF_TRUNC_LEN 0
|
||||
#endif
|
||||
|
||||
// TODO: This is GCC-specific. Replace CEPH_MAX and CEPH_MIN with standard macros, if possible.
|
||||
#define CEPH_MAX(a,b) \
|
||||
@ -33,14 +37,22 @@
|
||||
|
||||
// val should have type type*
|
||||
// lenval should have type lentype
|
||||
#if CEPH_TRACE_BUF_TRUNC_LEN > 0
|
||||
#define ceph_ctf_sequence(type, field, val, lentype, lenval) \
|
||||
ctf_integer_hex(void*, field, val) \
|
||||
ctf_sequence(type, field##_data, (val) == NULL ? "" : (val), lentype, (val) == NULL ? 0 : CEPH_MIN((lenval), CEPH_TRACE_BUF_TRUNC_LEN)) \
|
||||
ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
|
||||
ctf_integer(lentype, field##_len, lenval)
|
||||
#else
|
||||
#define ceph_ctf_sequence(type, field, val, lentype, lenval) \
|
||||
ctf_integer_hex(void*, field, val) \
|
||||
ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
|
||||
ctf_integer(lentype, field##_len, lenval)
|
||||
#endif
|
||||
|
||||
// val should have type type**
|
||||
// lenval should have type lentype*
|
||||
#if CEPH_TRACE_BUF_TRUNC_LEN > 0
|
||||
#define ceph_ctf_sequencep(type, field, val, lentype, lenval) \
|
||||
ctf_integer_hex(void*, field, val) \
|
||||
ctf_sequence(type, \
|
||||
@ -52,6 +64,14 @@
|
||||
ctf_integer(uint8_t, field##_data_isnull, ((val) == NULL || *(val) == NULL)) \
|
||||
ctf_integer(lentype, field##_len, (lenval) == NULL ? 0 : *(lenval)) \
|
||||
ctf_integer(lentype, field##_len_isnull, (lenval) == NULL)
|
||||
#else
|
||||
#define ceph_ctf_sequencep(type, field, val, lentype, lenval) \
|
||||
ctf_integer_hex(void*, field, val) \
|
||||
ctf_integer(uint8_t, field##_isnull, (val) == NULL) \
|
||||
ctf_integer(uint8_t, field##_data_isnull, ((val) == NULL || *(val) == NULL)) \
|
||||
ctf_integer(lentype, field##_len, (lenval) == NULL ? 0 : *(lenval)) \
|
||||
ctf_integer(lentype, field##_len_isnull, (lenval) == NULL)
|
||||
#endif
|
||||
|
||||
// p should be of type struct timeval*
|
||||
#define ceph_ctf_timevalp(field, p) \
|
||||
|
Loading…
Reference in New Issue
Block a user