X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng-events.h;h=da2637d7800e88cc70c61f1898ac88525a9327bb;hb=refs%2Fheads%2Fstable-2.12;hp=1b9ab167588ff651d9677d3659e2b920eeca7af4;hpb=2d0428212cbfa3f8428feee160b095f48c2ac974;p=lttng-modules.git diff --git a/lttng-events.h b/lttng-events.h index 1b9ab167..da2637d7 100644 --- a/lttng-events.h +++ b/lttng-events.h @@ -22,7 +22,7 @@ #include #include -#define lttng_is_signed_type(type) (((type)(-1)) < 0) +#define lttng_is_signed_type(type) (((type) -1) < (type) 1) struct lttng_channel; struct lttng_session; @@ -75,7 +75,7 @@ struct lttng_enum_entry { }; #define __type_integer(_type, _size, _alignment, _signedness, \ - _byte_order, _base, _encoding) \ + _byte_order, _user, _base, _encoding) \ { \ .atype = atype_integer, \ .u.basic.integer = \ @@ -83,8 +83,9 @@ struct lttng_enum_entry { .size = (_size) ? : sizeof(_type) * CHAR_BIT, \ .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \ .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \ - .reverse_byte_order = _byte_order != __BYTE_ORDER, \ - .base = _base, \ + .reverse_byte_order = (_byte_order) != __BYTE_ORDER, \ + .base = (_base), \ + .user = (_user), \ .encoding = lttng_encode_##_encoding, \ }, \ } \ @@ -93,7 +94,8 @@ struct lttng_integer_type { 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 */ enum lttng_string_encodings encoding; }; @@ -106,6 +108,7 @@ union _lttng_basic_type { } enumeration; struct { enum lttng_string_encodings encoding; + unsigned int user:1; /* fetch from user-space */ } string; }; @@ -161,8 +164,7 @@ struct lttng_enum_desc { struct lttng_event_field { const char *name; struct lttng_type type; - unsigned int nowrite:1, /* do not write into trace */ - user:1; /* fetch from user-space */ + unsigned int nowrite:1; /* do not write into trace */ }; union lttng_ctx_value { @@ -693,13 +695,13 @@ static inline int lttng_syscalls_destroy(struct lttng_channel *chan) } static inline int lttng_syscall_filter_enable(struct lttng_channel *chan, - struct lttng_event *event); + struct lttng_event *event) { return -ENOSYS; } static inline int lttng_syscall_filter_disable(struct lttng_channel *chan, - struct lttng_event *event); + struct lttng_event *event) { return -ENOSYS; } @@ -716,6 +718,7 @@ int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler, struct lttng_kernel_filter_bytecode __user *bytecode); void lttng_enabler_event_link_bytecode(struct lttng_event *event, struct lttng_enabler *enabler); +void lttng_free_event_filter_runtime(struct lttng_event *event); int lttng_probes_init(void);