X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Fltt-events.c;h=85afc1ba63599027ea930d4aea52a0f07856241c;hb=939950af98d044a3b0632cad5293f91cb1493ef8;hp=7d2dc31a8ebc0898a7c493f0cbfbb5b7fb9d6602;hpb=28b120498f554e2478806c27f7bf7ab295f3ffdf;p=lttng-ust.git diff --git a/liblttng-ust/ltt-events.c b/liblttng-ust/ltt-events.c index 7d2dc31a..85afc1ba 100644 --- a/liblttng-ust/ltt-events.c +++ b/liblttng-ust/ltt-events.c @@ -1075,7 +1075,7 @@ static int _ltt_session_metadata_statedump(struct ltt_session *session) { unsigned char *uuid_c = session->uuid; - char uuid_s[37]; + char uuid_s[37], clock_uuid_s[CLOCK_UUID_LEN]; struct ltt_channel *chan; struct ltt_event *event; int ret = 0; @@ -1133,15 +1133,27 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) ret = lttng_metadata_printf(session, "clock {\n" - " name = %s;\n" - " uuid = %s;\n" + " name = %s;\n", + "monotonic" + ); + if (ret) + goto end; + + if (!trace_clock_uuid(clock_uuid_s)) { + ret = lttng_metadata_printf(session, + " uuid = \"%s\";\n", + clock_uuid_s + ); + if (ret) + goto end; + } + + ret = lttng_metadata_printf(session, " description = \"Monotonic Clock\";\n" " freq = %" PRIu64 "; /* Frequency, in Hz */\n" " /* clock value offset from Epoch is: offset * (1/freq) */\n" " offset = %" PRIu64 ";\n" "};\n\n", - "monotonic", - trace_clock_uuid(), trace_clock_freq(), measure_clock_offset() );