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 {
.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, \
}, \
} \
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 {
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 */
.type = lttng_kernel_type_string, \
.u = \
{ \
- .string = { .encoding = lttng_encode_UTF8 }, \
+ .string = { .encoding = lttng_kernel_string_encoding_UTF8 }, \
}, \
}, \
.nowrite = _nowrite, \
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;
}
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;
}
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 {
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 {
{
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;
{
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;
{
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;
{
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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,
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;
}
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;
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;
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;
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;