Rename "tsc" to "timestamp"
[lttng-modules.git] / src / lttng-context-vpid.c
index 4732f2804164d1542ef9ed574cf520a3c05f576d..47259a7d5892ff5754a5acc07b70bc9fac312e09 100644 (file)
@@ -17,7 +17,7 @@
 #include <lttng/tracer.h>
 
 static
-size_t vpid_get_size(size_t offset)
+size_t vpid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset)
 {
        size_t size = 0;
 
@@ -27,9 +27,9 @@ size_t vpid_get_size(size_t offset)
 }
 
 static
-void vpid_record(struct lttng_kernel_ctx_field *field,
-                struct lib_ring_buffer_ctx *ctx,
-                struct lttng_channel *chan)
+void vpid_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 vpid;
 
@@ -40,14 +40,13 @@ void vpid_record(struct lttng_kernel_ctx_field *field,
                vpid = 0;
        else
                vpid = task_tgid_vnr(current);
-       lib_ring_buffer_align_ctx(ctx, lttng_alignof(vpid));
-       chan->ops->event_write(ctx, &vpid, sizeof(vpid));
+       chan->ops->event_write(ctx, &vpid, sizeof(vpid), lttng_alignof(vpid));
 }
 
 static
-void vpid_get_value(struct lttng_kernel_ctx_field *field,
-               struct lttng_probe_ctx *lttng_probe_ctx,
-               union lttng_ctx_value *value)
+void vpid_get_value(void *priv,
+               struct lttng_kernel_probe_ctx *lttng_probe_ctx,
+               struct lttng_ctx_value *value)
 {
        pid_t vpid;
 
@@ -58,15 +57,14 @@ void vpid_get_value(struct lttng_kernel_ctx_field *field,
                vpid = 0;
        else
                vpid = task_tgid_vnr(current);
-       value->s64 = vpid;
+       value->u.s64 = vpid;
 }
 
 static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field(
        lttng_kernel_static_event_field("vpid",
                lttng_kernel_static_type_integer_from_type(pid_t, __BYTE_ORDER, 10),
-               false, false, false),
+               false, false),
        vpid_get_size,
-       NULL,
        vpid_record,
        vpid_get_value,
        NULL, NULL);
This page took 0.024894 seconds and 4 git commands to generate.