From: Mathieu Desnoyers Date: Wed, 7 Apr 2021 17:47:03 +0000 (-0400) Subject: Cleanup: namespace string encoding X-Git-Tag: v2.13.0-rc1~22 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=28cbcb59855c099a89b02054b15b45ee3ad6a52a;p=lttng-modules.git Cleanup: namespace string encoding Signed-off-by: Mathieu Desnoyers Change-Id: Ic7265a6617feaacfe621d895cd0bc8ce2b50d912 --- diff --git a/include/lttng/events.h b/include/lttng/events.h index 9cbc3b99..5e456c52 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -46,11 +46,11 @@ enum lttng_kernel_type { NR_LTTNG_KERNEL_TYPES, }; -enum lttng_string_encodings { - lttng_encode_none = 0, - lttng_encode_UTF8 = 1, - lttng_encode_ASCII = 2, - NR_STRING_ENCODINGS, +enum lttng_kernel_string_encoding { + lttng_kernel_string_encoding_none = 0, + lttng_kernel_string_encoding_UTF8 = 1, + lttng_kernel_string_encoding_ASCII = 2, + NR_LTTNG_KERNEL_STRING_ENCODING, }; enum channel_type { @@ -82,7 +82,7 @@ struct lttng_enum_entry { .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \ .reverse_byte_order = _byte_order != __BYTE_ORDER, \ .base = _base, \ - .encoding = lttng_encode_##_encoding, \ + .encoding = lttng_kernel_string_encoding_##_encoding, \ }, \ } \ @@ -92,7 +92,7 @@ struct lttng_integer_type { unsigned int signedness:1, reverse_byte_order:1; unsigned int base; /* 2, 8, 10, 16, for pretty print */ - enum lttng_string_encodings encoding; + enum lttng_kernel_string_encoding encoding; }; struct lttng_type { @@ -100,7 +100,7 @@ struct lttng_type { union { struct lttng_integer_type integer; struct { - enum lttng_string_encodings encoding; + enum lttng_kernel_string_encoding encoding; } string; struct { const struct lttng_enum_desc *desc; /* Enumeration mapping */ diff --git a/include/lttng/tracepoint-event-impl.h b/include/lttng/tracepoint-event-impl.h index 5259c596..74e246b8 100644 --- a/include/lttng/tracepoint-event-impl.h +++ b/include/lttng/tracepoint-event-impl.h @@ -419,7 +419,7 @@ void __event_notifier_template_proto___##_name(void); .type = lttng_kernel_type_string, \ .u = \ { \ - .string = { .encoding = lttng_encode_UTF8 }, \ + .string = { .encoding = lttng_kernel_string_encoding_UTF8 }, \ }, \ }, \ .nowrite = _nowrite, \ diff --git a/src/lttng-bytecode-interpreter.c b/src/lttng-bytecode-interpreter.c index 01828b17..fcbfe0b1 100644 --- a/src/lttng-bytecode-interpreter.c +++ b/src/lttng-bytecode-interpreter.c @@ -321,7 +321,7 @@ static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx, printk(KERN_WARNING "LTTng: bytecode: Array nesting only supports integer types.\n"); return -EINVAL; } - if (field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_encode_none) { + if (field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) { printk(KERN_WARNING "LTTng: bytecode: Only string arrays are supported for contexts.\n"); return -EINVAL; } @@ -334,7 +334,7 @@ static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx, printk(KERN_WARNING "LTTng: bytecode: Sequence nesting only supports integer types.\n"); return -EINVAL; } - if (field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_encode_none) { + if (field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) { printk(KERN_WARNING "LTTng: bytecode: Only string sequences are supported for contexts.\n"); return -EINVAL; } diff --git a/src/lttng-bytecode-specialize.c b/src/lttng-bytecode-specialize.c index b5869a88..091879ea 100644 --- a/src/lttng-bytecode-specialize.c +++ b/src/lttng-bytecode-specialize.c @@ -350,7 +350,7 @@ static int specialize_load_object(const struct lttng_event_field *field, if (is_context) { load->object_type = OBJECT_TYPE_STRING; } else { - if (field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_encode_none) { + if (field->type.u.array_nestable.elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) { load->object_type = OBJECT_TYPE_ARRAY; load->field = field; } else { @@ -366,7 +366,7 @@ static int specialize_load_object(const struct lttng_event_field *field, if (is_context) { load->object_type = OBJECT_TYPE_STRING; } else { - if (field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_encode_none) { + if (field->type.u.sequence_nestable.elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) { load->object_type = OBJECT_TYPE_SEQUENCE; load->field = field; } else { diff --git a/src/lttng-bytecode.c b/src/lttng-bytecode.c index bd6a30ea..3e9b3e53 100644 --- a/src/lttng-bytecode.c +++ b/src/lttng-bytecode.c @@ -247,7 +247,7 @@ int apply_field_reloc(const struct lttng_event_desc *event_desc, { const struct lttng_type *elem_type = field->type.u.array_nestable.elem_type; - if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_encode_none) + if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) return -EINVAL; if (field->user) op->op = BYTECODE_OP_LOAD_FIELD_REF_USER_SEQUENCE; @@ -259,7 +259,7 @@ int apply_field_reloc(const struct lttng_event_desc *event_desc, { const struct lttng_type *elem_type = field->type.u.sequence_nestable.elem_type; - if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_encode_none) + if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) return -EINVAL; if (field->user) op->op = BYTECODE_OP_LOAD_FIELD_REF_USER_SEQUENCE; @@ -334,7 +334,7 @@ int apply_context_reloc(struct bytecode_runtime *runtime, { const struct lttng_type *elem_type = ctx_field->event_field.type.u.array_nestable.elem_type; - if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_encode_none) + if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) return -EINVAL; BUG_ON(ctx_field->event_field.user); op->op = BYTECODE_OP_GET_CONTEXT_REF_STRING; @@ -344,7 +344,7 @@ int apply_context_reloc(struct bytecode_runtime *runtime, { const struct lttng_type *elem_type = ctx_field->event_field.type.u.sequence_nestable.elem_type; - if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_encode_none) + if (!lttng_is_bytewise_integer(elem_type) || elem_type->u.integer.encoding == lttng_kernel_string_encoding_none) return -EINVAL; BUG_ON(ctx_field->event_field.user); op->op = BYTECODE_OP_GET_CONTEXT_REF_STRING; diff --git a/src/lttng-context-callstack.c b/src/lttng-context-callstack.c index d1da784e..dc61c710 100644 --- a/src/lttng-context-callstack.c +++ b/src/lttng-context-callstack.c @@ -143,7 +143,7 @@ int __lttng_add_callstack_generic(struct lttng_ctx **ctx, field->type.u.integer.signedness = lttng_is_signed_type(unsigned int); field->type.u.integer.reverse_byte_order = 0; field->type.u.integer.base = 10; - field->type.u.integer.encoding = lttng_encode_none; + field->type.u.integer.encoding = lttng_kernel_string_encoding_none; length_field->get_size_arg = lttng_callstack_length_get_size; length_field->record = lttng_callstack_length_record; length_field->priv = fdata; diff --git a/src/lttng-context-cgroup-ns.c b/src/lttng-context-cgroup-ns.c index 3d5b518f..bb7587ff 100644 --- a/src/lttng-context-cgroup-ns.c +++ b/src/lttng-context-cgroup-ns.c @@ -92,7 +92,7 @@ int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = cgroup_ns_get_size; field->record = cgroup_ns_record; field->get_value = cgroup_ns_get_value; diff --git a/src/lttng-context-cpu-id.c b/src/lttng-context-cpu-id.c index d0eac981..c02aad7e 100644 --- a/src/lttng-context-cpu-id.c +++ b/src/lttng-context-cpu-id.c @@ -63,7 +63,7 @@ int lttng_add_cpu_id_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = cpu_id_get_size; field->record = cpu_id_record; field->get_value = cpu_id_get_value; diff --git a/src/lttng-context-egid.c b/src/lttng-context-egid.c index f12158cd..0d20c3f0 100644 --- a/src/lttng-context-egid.c +++ b/src/lttng-context-egid.c @@ -65,7 +65,7 @@ int lttng_add_egid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(gid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = egid_get_size; field->record = egid_record; field->get_value = egid_get_value; diff --git a/src/lttng-context-euid.c b/src/lttng-context-euid.c index 00d201ff..3105cb7a 100644 --- a/src/lttng-context-euid.c +++ b/src/lttng-context-euid.c @@ -65,7 +65,7 @@ int lttng_add_euid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = euid_get_size; field->record = euid_record; field->get_value = euid_get_value; diff --git a/src/lttng-context-gid.c b/src/lttng-context-gid.c index 0dbdd301..8f33e937 100644 --- a/src/lttng-context-gid.c +++ b/src/lttng-context-gid.c @@ -65,7 +65,7 @@ int lttng_add_gid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(gid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = gid_get_size; field->record = gid_record; field->get_value = gid_get_value; diff --git a/src/lttng-context-interruptible.c b/src/lttng-context-interruptible.c index 4bc4d8d7..7229a2a7 100644 --- a/src/lttng-context-interruptible.c +++ b/src/lttng-context-interruptible.c @@ -70,7 +70,7 @@ int lttng_add_interruptible_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(int8_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = interruptible_get_size; field->record = interruptible_record; field->get_value = interruptible_get_value; diff --git a/src/lttng-context-ipc-ns.c b/src/lttng-context-ipc-ns.c index b4925ac9..e6f83e94 100644 --- a/src/lttng-context-ipc-ns.c +++ b/src/lttng-context-ipc-ns.c @@ -91,7 +91,7 @@ int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = ipc_ns_get_size; field->record = ipc_ns_record; field->get_value = ipc_ns_get_value; diff --git a/src/lttng-context-migratable.c b/src/lttng-context-migratable.c index 604f487e..797f8eca 100644 --- a/src/lttng-context-migratable.c +++ b/src/lttng-context-migratable.c @@ -63,7 +63,7 @@ int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uint8_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = migratable_get_size; field->record = migratable_record; field->get_value = migratable_get_value; diff --git a/src/lttng-context-mnt-ns.c b/src/lttng-context-mnt-ns.c index 09fb81a7..7f215a8a 100644 --- a/src/lttng-context-mnt-ns.c +++ b/src/lttng-context-mnt-ns.c @@ -93,7 +93,7 @@ int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = mnt_ns_get_size; field->record = mnt_ns_record; field->get_value = mnt_ns_get_value; diff --git a/src/lttng-context-need-reschedule.c b/src/lttng-context-need-reschedule.c index e7a30955..3a5517dd 100644 --- a/src/lttng-context-need-reschedule.c +++ b/src/lttng-context-need-reschedule.c @@ -63,7 +63,7 @@ int lttng_add_need_reschedule_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uint8_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = need_reschedule_get_size; field->record = need_reschedule_record; field->get_value = need_reschedule_get_value; diff --git a/src/lttng-context-net-ns.c b/src/lttng-context-net-ns.c index 66b3b8d5..8ccaaefd 100644 --- a/src/lttng-context-net-ns.c +++ b/src/lttng-context-net-ns.c @@ -92,7 +92,7 @@ int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = net_ns_get_size; field->record = net_ns_record; field->get_value = net_ns_get_value; diff --git a/src/lttng-context-nice.c b/src/lttng-context-nice.c index 411f336e..b914c03a 100644 --- a/src/lttng-context-nice.c +++ b/src/lttng-context-nice.c @@ -63,7 +63,7 @@ int lttng_add_nice_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = nice_get_size; field->record = nice_record; field->get_value = nice_get_value; diff --git a/src/lttng-context-perf-counters.c b/src/lttng-context-perf-counters.c index b9b1e27d..6f0bb791 100644 --- a/src/lttng-context-perf-counters.c +++ b/src/lttng-context-perf-counters.c @@ -315,7 +315,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, field->event_field.type.u.integer.signedness = lttng_is_signed_type(uint64_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = perf_counter_get_size; field->record = perf_counter_record; field->u.perf_counter = perf_field; diff --git a/src/lttng-context-pid-ns.c b/src/lttng-context-pid-ns.c index 705b50f5..1a18897c 100644 --- a/src/lttng-context-pid-ns.c +++ b/src/lttng-context-pid-ns.c @@ -93,7 +93,7 @@ int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = pid_ns_get_size; field->record = pid_ns_record; field->get_value = pid_ns_get_value; diff --git a/src/lttng-context-pid.c b/src/lttng-context-pid.c index cfce9974..c52973bf 100644 --- a/src/lttng-context-pid.c +++ b/src/lttng-context-pid.c @@ -63,7 +63,7 @@ int lttng_add_pid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(pid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = pid_get_size; field->record = pid_record; field->get_value = pid_get_value; diff --git a/src/lttng-context-ppid.c b/src/lttng-context-ppid.c index 07663f6c..4d065bce 100644 --- a/src/lttng-context-ppid.c +++ b/src/lttng-context-ppid.c @@ -85,7 +85,7 @@ int lttng_add_ppid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(pid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = ppid_get_size; field->record = ppid_record; field->get_value = ppid_get_value; diff --git a/src/lttng-context-preemptible.c b/src/lttng-context-preemptible.c index ae5f8256..0e67b250 100644 --- a/src/lttng-context-preemptible.c +++ b/src/lttng-context-preemptible.c @@ -81,7 +81,7 @@ int lttng_add_preemptible_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uint8_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = preemptible_get_size; field->record = preemptible_record; field->get_value = preemptible_get_value; diff --git a/src/lttng-context-prio.c b/src/lttng-context-prio.c index 885c48bc..a1840251 100644 --- a/src/lttng-context-prio.c +++ b/src/lttng-context-prio.c @@ -97,7 +97,7 @@ int lttng_add_prio_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = prio_get_size; field->record = prio_record; field->get_value = prio_get_value; diff --git a/src/lttng-context-sgid.c b/src/lttng-context-sgid.c index c2708283..0cb536e4 100644 --- a/src/lttng-context-sgid.c +++ b/src/lttng-context-sgid.c @@ -65,7 +65,7 @@ int lttng_add_sgid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(gid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = sgid_get_size; field->record = sgid_record; field->get_value = sgid_get_value; diff --git a/src/lttng-context-suid.c b/src/lttng-context-suid.c index c26b1413..86cbb9e1 100644 --- a/src/lttng-context-suid.c +++ b/src/lttng-context-suid.c @@ -65,7 +65,7 @@ int lttng_add_suid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = suid_get_size; field->record = suid_record; field->get_value = suid_get_value; diff --git a/src/lttng-context-tid.c b/src/lttng-context-tid.c index d4bedafc..22a04476 100644 --- a/src/lttng-context-tid.c +++ b/src/lttng-context-tid.c @@ -66,7 +66,7 @@ int lttng_add_tid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(pid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = tid_get_size; field->record = tid_record; field->get_value = tid_get_value; diff --git a/src/lttng-context-time-ns.c b/src/lttng-context-time-ns.c index 3d197827..723b8bab 100644 --- a/src/lttng-context-time-ns.c +++ b/src/lttng-context-time-ns.c @@ -91,7 +91,7 @@ int lttng_add_time_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = time_ns_get_size; field->record = time_ns_record; field->get_value = time_ns_get_value; diff --git a/src/lttng-context-uid.c b/src/lttng-context-uid.c index 47c740f9..710b22a6 100644 --- a/src/lttng-context-uid.c +++ b/src/lttng-context-uid.c @@ -65,7 +65,7 @@ int lttng_add_uid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = uid_get_size; field->record = uid_record; field->get_value = uid_get_value; diff --git a/src/lttng-context-user-ns.c b/src/lttng-context-user-ns.c index 2b5f46c6..85153db2 100644 --- a/src/lttng-context-user-ns.c +++ b/src/lttng-context-user-ns.c @@ -77,7 +77,7 @@ int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = user_ns_get_size; field->record = user_ns_record; field->get_value = user_ns_get_value; diff --git a/src/lttng-context-uts-ns.c b/src/lttng-context-uts-ns.c index 6e1fabe8..554f18b1 100644 --- a/src/lttng-context-uts-ns.c +++ b/src/lttng-context-uts-ns.c @@ -91,7 +91,7 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx) 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = uts_ns_get_size; field->record = uts_ns_record; field->get_value = uts_ns_get_value; diff --git a/src/lttng-context-vegid.c b/src/lttng-context-vegid.c index 75327824..eebbe1cc 100644 --- a/src/lttng-context-vegid.c +++ b/src/lttng-context-vegid.c @@ -65,7 +65,7 @@ int lttng_add_vegid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(gid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vegid_get_size; field->record = vegid_record; field->get_value = vegid_get_value; diff --git a/src/lttng-context-veuid.c b/src/lttng-context-veuid.c index 2c49b182..63e7bd42 100644 --- a/src/lttng-context-veuid.c +++ b/src/lttng-context-veuid.c @@ -65,7 +65,7 @@ int lttng_add_veuid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = veuid_get_size; field->record = veuid_record; field->get_value = veuid_get_value; diff --git a/src/lttng-context-vgid.c b/src/lttng-context-vgid.c index b42e4988..e8167c97 100644 --- a/src/lttng-context-vgid.c +++ b/src/lttng-context-vgid.c @@ -65,7 +65,7 @@ int lttng_add_vgid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(gid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vgid_get_size; field->record = vgid_record; field->get_value = vgid_get_value; diff --git a/src/lttng-context-vpid.c b/src/lttng-context-vpid.c index 41296c48..e0531958 100644 --- a/src/lttng-context-vpid.c +++ b/src/lttng-context-vpid.c @@ -78,7 +78,7 @@ int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(pid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vpid_get_size; field->record = vpid_record; field->get_value = vpid_get_value; diff --git a/src/lttng-context-vppid.c b/src/lttng-context-vppid.c index 1ff182c3..b93e292f 100644 --- a/src/lttng-context-vppid.c +++ b/src/lttng-context-vppid.c @@ -107,7 +107,7 @@ int lttng_add_vppid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(pid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vppid_get_size; field->record = vppid_record; field->get_value = vppid_get_value; diff --git a/src/lttng-context-vsgid.c b/src/lttng-context-vsgid.c index a00545b5..2bb8db7e 100644 --- a/src/lttng-context-vsgid.c +++ b/src/lttng-context-vsgid.c @@ -65,7 +65,7 @@ int lttng_add_vsgid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(gid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vsgid_get_size; field->record = vsgid_record; field->get_value = vsgid_get_value; diff --git a/src/lttng-context-vsuid.c b/src/lttng-context-vsuid.c index 635bba48..9571992a 100644 --- a/src/lttng-context-vsuid.c +++ b/src/lttng-context-vsuid.c @@ -65,7 +65,7 @@ int lttng_add_vsuid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vsuid_get_size; field->record = vsuid_record; field->get_value = vsuid_get_value; diff --git a/src/lttng-context-vtid.c b/src/lttng-context-vtid.c index 1e2e1ad9..106fa4e5 100644 --- a/src/lttng-context-vtid.c +++ b/src/lttng-context-vtid.c @@ -78,7 +78,7 @@ int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(pid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vtid_get_size; field->record = vtid_record; field->get_value = vtid_get_value; diff --git a/src/lttng-context-vuid.c b/src/lttng-context-vuid.c index 6980af9f..978cc545 100644 --- a/src/lttng-context-vuid.c +++ b/src/lttng-context-vuid.c @@ -65,7 +65,7 @@ int lttng_add_vuid_to_ctx(struct lttng_ctx **ctx) field->event_field.type.u.integer.signedness = lttng_is_signed_type(uid_t); 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->event_field.type.u.integer.encoding = lttng_kernel_string_encoding_none; field->get_size = vuid_get_size; field->record = vuid_record; field->get_value = vuid_get_value; diff --git a/src/lttng-events.c b/src/lttng-events.c index 9df49fac..1ae0d85c 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -3022,9 +3022,9 @@ int _lttng_integer_type_statedump(struct lttng_session *session, type->u.integer.size, type->u.integer.alignment, type->u.integer.signedness, - (type->u.integer.encoding == lttng_encode_none) + (type->u.integer.encoding == lttng_kernel_string_encoding_none) ? "none" - : (type->u.integer.encoding == lttng_encode_UTF8) + : (type->u.integer.encoding == lttng_kernel_string_encoding_UTF8) ? "UTF8" : "ASCII", type->u.integer.base, @@ -3417,7 +3417,7 @@ int _lttng_string_type_statedump(struct lttng_session *session, return ret; ret = lttng_metadata_printf(session, "string%s", - type->u.string.encoding == lttng_encode_ASCII ? + type->u.string.encoding == lttng_kernel_string_encoding_ASCII ? " { encoding = ASCII; }" : ""); return ret; } diff --git a/src/probes/lttng-kprobes.c b/src/probes/lttng-kprobes.c index c4b089c6..01bc16e4 100644 --- a/src/probes/lttng-kprobes.c +++ b/src/probes/lttng-kprobes.c @@ -97,7 +97,7 @@ int lttng_create_kprobe_event(const char *name, struct lttng_event *event) field->type.u.integer.signedness = lttng_is_signed_type(unsigned long); field->type.u.integer.reverse_byte_order = 0; field->type.u.integer.base = 16; - field->type.u.integer.encoding = lttng_encode_none; + field->type.u.integer.encoding = lttng_kernel_string_encoding_none; desc->owner = THIS_MODULE; event->desc = desc; diff --git a/src/probes/lttng-kretprobes.c b/src/probes/lttng-kretprobes.c index 25bdec90..c9991d91 100644 --- a/src/probes/lttng-kretprobes.c +++ b/src/probes/lttng-kretprobes.c @@ -135,7 +135,7 @@ int lttng_create_kprobe_event(const char *name, struct lttng_event *event, fields[0].type.u.integer.signedness = lttng_is_signed_type(unsigned long); fields[0].type.u.integer.reverse_byte_order = 0; fields[0].type.u.integer.base = 16; - fields[0].type.u.integer.encoding = lttng_encode_none; + fields[0].type.u.integer.encoding = lttng_kernel_string_encoding_none; fields[1].name = "parent_ip"; fields[1].type.type = lttng_kernel_type_integer; @@ -144,7 +144,7 @@ int lttng_create_kprobe_event(const char *name, struct lttng_event *event, fields[1].type.u.integer.signedness = lttng_is_signed_type(unsigned long); fields[1].type.u.integer.reverse_byte_order = 0; fields[1].type.u.integer.base = 16; - fields[1].type.u.integer.encoding = lttng_encode_none; + fields[1].type.u.integer.encoding = lttng_kernel_string_encoding_none; desc->owner = THIS_MODULE; event->desc = desc; diff --git a/src/probes/lttng-uprobes.c b/src/probes/lttng-uprobes.c index b738847f..816b7fc1 100644 --- a/src/probes/lttng-uprobes.c +++ b/src/probes/lttng-uprobes.c @@ -113,7 +113,7 @@ int lttng_create_uprobe_event(const char *name, struct lttng_event *event) fields[0].type.u.integer.signedness = lttng_is_signed_type(unsigned long); fields[0].type.u.integer.reverse_byte_order = 0; fields[0].type.u.integer.base = 16; - fields[0].type.u.integer.encoding = lttng_encode_none; + fields[0].type.u.integer.encoding = lttng_kernel_string_encoding_none; desc->owner = THIS_MODULE; event->desc = desc;