- } \
- goto __end_field_##dest;
-
-/* fixed length array memcpy */
-#undef tp_memcpy_gen
-#define tp_memcpy_gen(write_ops, dest, src, len) \
-__assign_##dest: \
- if (0) \
- (void) __typemap.dest; \
- lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest)); \
- __chan->ops->write_ops(&__ctx, src, len); \
- goto __end_field_##dest;
-
-#undef tp_memcpy
-#define tp_memcpy(dest, src, len) \
- tp_memcpy_gen(event_write, dest, src, len)
-
-#undef tp_memcpy_from_user
-#define tp_memcpy_from_user(dest, src, len) \
- tp_memcpy_gen(event_write_from_user, dest, src, len)
-
-/* variable length sequence memcpy */
-#undef tp_memcpy_dyn_gen
-#define tp_memcpy_dyn_gen(write_ops, dest, src) \
-__assign_##dest##_1: \
- { \
- u32 __tmpl = __dynamic_len[__dynamic_len_idx]; \
- lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(u32)); \
- __chan->ops->event_write(&__ctx, &__tmpl, sizeof(u32)); \
- } \
- goto __end_field_##dest##_1; \
-__assign_##dest##_2: \
- lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest)); \
- __chan->ops->write_ops(&__ctx, src, \
- sizeof(__typemap.dest) * __get_dynamic_array_len(dest));\
- goto __end_field_##dest##_2;
-
-#undef tp_memcpy_dyn_gen_2
-#define tp_memcpy_dyn_gen_2(write_ops, dest, src1, src2) \
-__assign_##dest##_1: \
- { \
- u32 __tmpl = __dynamic_len[__dynamic_len_idx] \
- + __dynamic_len[__dynamic_len_idx + 1]; \
- lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(u32)); \
- __chan->ops->event_write(&__ctx, &__tmpl, sizeof(u32)); \
- } \
- goto __end_field_##dest##_1; \
-__assign_##dest##_2: \
- lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest)); \
- __chan->ops->write_ops(&__ctx, src1, \
- sizeof(__typemap.dest) * __get_dynamic_array_len(dest));\
- goto __end_field_##dest##_2; \
-__assign_##dest##_3: \
- __chan->ops->write_ops(&__ctx, src2, \
- sizeof(__typemap.dest) * __get_dynamic_array_len(dest));\
- goto __end_field_##dest##_3;
-
-#undef tp_memcpy_dyn
-#define tp_memcpy_dyn(dest, src) \
- tp_memcpy_dyn_gen(event_write, dest, src)
-
-#undef tp_memcpy_dyn_2
-#define tp_memcpy_dyn_2(dest, src1, src2) \
- tp_memcpy_dyn_gen_2(event_write, dest, src1, src2)
-
-#undef tp_memcpy_dyn_from_user
-#define tp_memcpy_dyn_from_user(dest, src) \
- tp_memcpy_dyn_gen(event_write_from_user, dest, src)
+ }
+
+#undef _ctf_integer_ext_isuser0
+#define _ctf_integer_ext_isuser0(_type, _item, _src, _byte_order, _base, _nowrite) \
+ _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite)
+
+#undef _ctf_integer_ext_isuser1
+#define _ctf_integer_ext_isuser1(_type, _item, _user_src, _byte_order, _base, _nowrite) \
+{ \
+ union { \
+ char __array[sizeof(_user_src)]; \
+ __typeof__(_user_src) __v; \
+ } __tmp_fetch; \
+ if (lib_ring_buffer_copy_from_user_check_nofault(__tmp_fetch.__array, \
+ &(_user_src), sizeof(_user_src))) \
+ memset(__tmp_fetch.__array, 0, sizeof(__tmp_fetch.__array)); \
+ _ctf_integer_ext_fetched(_type, _item, __tmp_fetch.__v, _byte_order, _base, _nowrite) \
+}