X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lttng-context-procname.c;h=8a747acd3697f0ed61d12141866e09c3f3ae6965;hb=79150a4903b5f31695fcd1d9655555ba6dc4bfa4;hp=5913ee6ac997fefb5a8f65c69cd45aa41a7cc68c;hpb=a9dd15dadd7d58f58cfd19d2503d3b6b541723bc;p=lttng-modules.git diff --git a/lttng-context-procname.c b/lttng-context-procname.c index 5913ee6a..8a747acd 100644 --- a/lttng-context-procname.c +++ b/lttng-context-procname.c @@ -51,6 +51,14 @@ void procname_record(struct lttng_ctx_field *field, chan->ops->event_write(ctx, current->comm, sizeof(current->comm)); } +static +void procname_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, + union lttng_ctx_value *value) +{ + value->str = current->comm; +} + int lttng_add_procname_to_ctx(struct lttng_ctx **ctx) { struct lttng_ctx_field *field; @@ -75,6 +83,7 @@ int lttng_add_procname_to_ctx(struct lttng_ctx **ctx) field->get_size = procname_get_size; field->record = procname_record; + field->get_value = procname_get_value; lttng_context_update(*ctx); wrapper_vmalloc_sync_all(); return 0;