From: Mathieu Desnoyers Date: Wed, 3 Aug 2011 01:45:27 +0000 (-0400) Subject: Add float descriptions (metadata) X-Git-Tag: v1.9.1~314 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=403c40b4b90356fddbb18cd12c6e6891c8bd317b;p=lttng-ust.git Add float descriptions (metadata) Signed-off-by: Mathieu Desnoyers --- diff --git a/libust/ltt-events.c b/libust/ltt-events.c index e68b5a2c..d28a430d 100644 --- a/libust/ltt-events.c +++ b/libust/ltt-events.c @@ -435,7 +435,20 @@ int _ltt_field_statedump(struct ltt_session *session, ? "UTF8" : "ASCII", field->type.u.basic.integer.base, -#ifdef BIG_ENDIAN +#ifdef __BIG_ENDIAN + field->type.u.basic.integer.reverse_byte_order ? " byte_order = le;" : "", +#else + field->type.u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", +#endif + field->name); + break; + case atype_float: + ret = lttng_metadata_printf(session, + " floating_point { exp_dig = %u; mant_dig = %u; align = %u; } %s;\n", + field->type.u.basic._float.exp_dig, + field->type.u.basic._float.mant_dig, + field->type.u.basic._float.alignment, +#ifdef __BIG_ENDIAN field->type.u.basic.integer.reverse_byte_order ? " byte_order = le;" : "", #else field->type.u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", @@ -464,7 +477,7 @@ int _ltt_field_statedump(struct ltt_session *session, ? "UTF8" : "ASCII", elem_type->u.basic.integer.base, -#ifdef BIG_ENDIAN +#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;" : "", @@ -490,7 +503,7 @@ int _ltt_field_statedump(struct ltt_session *session, ? "UTF8" : "ASCII"), length_type->u.basic.integer.base, -#ifdef BIG_ENDIAN +#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;" : "", @@ -510,7 +523,7 @@ int _ltt_field_statedump(struct ltt_session *session, ? "UTF8" : "ASCII"), elem_type->u.basic.integer.base, -#ifdef BIG_ENDIAN +#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;" : "", @@ -796,7 +809,7 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) CTF_VERSION_MAJOR, CTF_VERSION_MINOR, uuid_s, -#ifdef BIG_ENDIAN +#ifdef __BIG_ENDIAN "be" #else "le"