X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-cgroup-ns.c;h=82245011952b3d32fb00bf3f1fa256ced5c8766f;hb=92bfdd34a957065459bbc60b0ad94cec6a2f7f2b;hp=35accb85430b35937a1cd37bb1d9e655701cde28;hpb=b7cdc18250880cc44edeef4a4b42c8ac7a135a6d;p=lttng-modules.git diff --git a/lttng-context-cgroup-ns.c b/lttng-context-cgroup-ns.c index 35accb85..82245011 100644 --- a/lttng-context-cgroup-ns.c +++ b/lttng-context-cgroup-ns.c @@ -15,13 +15,9 @@ #include #include #include -#include -#include #include -#if defined(CONFIG_CGROUPS) && \ - ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) || \ - LTTNG_UBUNTU_KERNEL_RANGE(4,4,0,0, 4,5,0,0)) +#if defined(CONFIG_CGROUPS) static size_t cgroup_ns_get_size(size_t offset) @@ -48,7 +44,7 @@ void cgroup_ns_record(struct lttng_ctx_field *field, * namespaces, just dereference the pointers. */ if (current->nsproxy) - cgroup_ns_inum = current->nsproxy->cgroup_ns->lttng_ns_inum; + cgroup_ns_inum = current->nsproxy->cgroup_ns->ns.inum; lib_ring_buffer_align_ctx(ctx, lttng_alignof(cgroup_ns_inum)); chan->ops->event_write(ctx, &cgroup_ns_inum, sizeof(cgroup_ns_inum)); @@ -69,7 +65,7 @@ void cgroup_ns_get_value(struct lttng_ctx_field *field, * namespaces, just dereference the pointers. */ if (current->nsproxy) - cgroup_ns_inum = current->nsproxy->cgroup_ns->lttng_ns_inum; + cgroup_ns_inum = current->nsproxy->cgroup_ns->ns.inum; value->s64 = cgroup_ns_inum; } @@ -87,17 +83,16 @@ int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx) } field->event_field.name = "cgroup_ns"; field->event_field.type.atype = atype_integer; - field->event_field.type.u.basic.integer.size = sizeof(unsigned int) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = lttng_alignof(unsigned int) * CHAR_BIT; - field->event_field.type.u.basic.integer.signedness = lttng_is_signed_type(unsigned int); - field->event_field.type.u.basic.integer.reverse_byte_order = 0; - field->event_field.type.u.basic.integer.base = 10; - field->event_field.type.u.basic.integer.encoding = lttng_encode_none; + field->event_field.type.u.integer.size = sizeof(unsigned int) * CHAR_BIT; + field->event_field.type.u.integer.alignment = lttng_alignof(unsigned int) * CHAR_BIT; + field->event_field.type.u.integer.signedness = lttng_is_signed_type(unsigned int); + field->event_field.type.u.integer.reverse_byte_order = 0; + field->event_field.type.u.integer.base = 10; + field->event_field.type.u.integer.encoding = lttng_encode_none; field->get_size = cgroup_ns_get_size; field->record = cgroup_ns_record; field->get_value = cgroup_ns_get_value; lttng_context_update(*ctx); - wrapper_vmalloc_sync_all(); return 0; } EXPORT_SYMBOL_GPL(lttng_add_cgroup_ns_to_ctx);