Don't automatically generate a clock UUID in _bt_ctf_clock_create

While the public clock constructor still generates a UUID,
it should not be done when creating a clock during TSDL metadata
parsing.

This makes it possible to use bt_ctf_clock_get_uuid to check
if a UUID has already been set during clock definition parsing.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Reuse existing g_string instance when setting a clock name

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add clock accessor to CTF IR Trace

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add trace accessor to CTF Writer

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: add tests for the new trace and trace clock accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Cleanup: Missing space after cast operator

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Ensure types used for index and count in CTF IR API match

This makes it easier for users to write code not producing
warnings.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: respect signed integers' length when printing in hex base

Make sure we don't print a full 64-bit sign-extended value
when printing a negative integer in hexadecimal base.

Fixes #848

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: make sure we can exit the get_new_metadata loop

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Remove duplicate include of unistd in test_ctf_writer

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Move functors from Writer to IR

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Generate CTF-IR metadata