Add sequence and array
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 14 May 2011 14:01:22 +0000 (10:01 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 14 May 2011 14:01:22 +0000 (10:01 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-events.c

index 29ea9baaa022830789255ff96de65d7d7f4a4801..cc189b31533cbbd79f8621c4b69fb650ba1a4070 100644 (file)
@@ -363,9 +363,52 @@ int _ltt_fields_metadata_statedump(struct ltt_session *session,
                                field->name);
                        break;
                case atype_array:
+               {
+                       const struct lttng_basic_type *elem_type;
+
+                       elem_type = &field->type.u.array.elem_type;
+                       ret = lttng_metadata_printf(session,
+                               "               integer { size = %u; align = %u; signed = %u;%s } %s[%u];\n",
+                               elem_type->u.basic.integer.size,
+                               elem_type->u.basic.integer.alignment,
+                               elem_type->u.basic.integer.signedness,
+#ifdef __BIG_ENDIAN
+                               elem_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
+#else
+                               elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
+#endif
+                               field->name, field->type.u.array.length);
                        break;
+               }
                case atype_sequence:
+               {
+                       const struct lttng_basic_type *elem_type;
+                       const struct lttng_basic_type *length_type;
+
+                       elem_type = &field->type.u.sequence.elem_type;
+                       length_type = &field->type.u.sequence.length_type;
+                       ret = lttng_metadata_printf(session,
+                               "               integer { size = %u; align = %u; signed = %u;%s } %s[ integer { size = %u; align = %u; signed = %u;%s } ];\n",
+                               elem_type->u.basic.integer.size,
+                               elem_type->u.basic.integer.alignment,
+                               elem_type->u.basic.integer.signedness,
+#ifdef __BIG_ENDIAN
+                               elem_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
+#else
+                               elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
+#endif
+                               field->name,
+                                       length_type->u.basic.integer.size,
+                                       length_type->u.basic.integer.alignment,
+                                       length_type->u.basic.integer.signedness,
+#ifdef __BIG_ENDIAN
+                                       length_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
+#else
+                                       length_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : ""
+#endif
+                               );
                        break;
+               }
 
                case atype_string:
                        ret = lttng_metadata_printf(session,
This page took 0.027184 seconds and 4 git commands to generate.