X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=blobdiff_plain;f=src%2Flttng-context-vtid.c;h=3b0cadc4c3f01a679cf91d9d3062f8302b1c0ef9;hp=76750adc8b84e4520b54cae67a7c7b0951386080;hb=HEAD;hpb=437d5aa59380583ce1cd14d394a53b398be1275d diff --git a/src/lttng-context-vtid.c b/src/lttng-context-vtid.c index 76750adc..4cb595a6 100644 --- a/src/lttng-context-vtid.c +++ b/src/lttng-context-vtid.c @@ -17,7 +17,7 @@ #include static -size_t vtid_get_size(size_t offset) +size_t vtid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { size_t size = 0; @@ -27,9 +27,9 @@ size_t vtid_get_size(size_t offset) } static -void vtid_record(struct lttng_kernel_ctx_field *field, - struct lib_ring_buffer_ctx *ctx, - struct lttng_channel *chan) +void vtid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, + struct lttng_kernel_channel_buffer *chan) { pid_t vtid; @@ -40,14 +40,13 @@ void vtid_record(struct lttng_kernel_ctx_field *field, vtid = 0; else vtid = task_pid_vnr(current); - lib_ring_buffer_align_ctx(ctx, lttng_alignof(vtid)); - chan->ops->event_write(ctx, &vtid, sizeof(vtid)); + chan->ops->event_write(ctx, &vtid, sizeof(vtid), lttng_alignof(vtid)); } static -void vtid_get_value(struct lttng_kernel_ctx_field *field, - struct lttng_probe_ctx *lttng_probe_ctx, - union lttng_ctx_value *value) +void vtid_get_value(void *priv, + struct lttng_kernel_probe_ctx *lttng_probe_ctx, + struct lttng_ctx_value *value) { pid_t vtid; @@ -58,15 +57,14 @@ void vtid_get_value(struct lttng_kernel_ctx_field *field, vtid = 0; else vtid = task_pid_vnr(current); - value->s64 = vtid; + value->u.s64 = vtid; } 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, - NULL, vtid_record, vtid_get_value, NULL, NULL);