X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flttng-context-procname.c;h=a2e07453a48c1f00cf09f342a4ad375745916bec;hb=45fe4e1a42028b821757e0b98f9b33bf435a108a;hp=3254c2e9c9448f458bda20b919ede304f00a7df5;hpb=437d5aa59380583ce1cd14d394a53b398be1275d;p=lttng-modules.git diff --git a/src/lttng-context-procname.c b/src/lttng-context-procname.c index 3254c2e9..a2e07453 100644 --- a/src/lttng-context-procname.c +++ b/src/lttng-context-procname.c @@ -18,7 +18,7 @@ #include static -size_t procname_get_size(size_t offset) +size_t procname_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset) { size_t size = 0; @@ -33,19 +33,19 @@ size_t procname_get_size(size_t offset) * could lead to crash in IRQ context and deadlock of the lockdep tracer. */ static -void procname_record(struct lttng_kernel_ctx_field *field, - struct lib_ring_buffer_ctx *ctx, - struct lttng_channel *chan) +void procname_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, + struct lttng_kernel_ring_buffer_ctx *ctx, + struct lttng_kernel_channel_buffer *chan) { - chan->ops->event_write(ctx, current->comm, sizeof(current->comm)); + chan->ops->event_write(ctx, current->comm, sizeof(current->comm), 1); } static -void procname_get_value(struct lttng_kernel_ctx_field *field, - struct lttng_probe_ctx *lttng_probe_ctx, - union lttng_ctx_value *value) +void procname_get_value(void *priv, + struct lttng_kernel_probe_ctx *lttng_probe_ctx, + struct lttng_ctx_value *value) { - value->str = current->comm; + value->u.str = current->comm; } static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_field( @@ -53,7 +53,6 @@ static const struct lttng_kernel_ctx_field *ctx_field = lttng_kernel_static_ctx_ lttng_kernel_static_type_array_text(sizeof(current->comm)), false, false, false), procname_get_size, - NULL, procname_record, procname_get_value, NULL, NULL);