#include <stdio.h>
#include <unistd.h>
#include <string.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
event_id);
if (eevent_class) {
BT_PUT(eevent_class);
- _PERROR("%s", "duplicate event with ID %" PRId64 " in same stream");
+ _PERROR("duplicate event with ID %" PRId64 " in same stream", event_id);
ret = -EEXIST;
goto error;
}
static
int move_ctx_stream_classes_to_trace(struct ctx *ctx)
{
- int ret;
+ int ret = 0;
GHashTableIter iter;
gpointer key, stream_class;
BT_HIDDEN
struct ctf_visitor_generate_ir *ctf_visitor_generate_ir_create(FILE *efd,
- uint64_t clock_class_offset_ns)
+ uint64_t clock_class_offset_ns, const char *name)
{
int ret;
struct ctx *ctx = NULL;
goto error;
}
+ ret = bt_ctf_trace_set_name(trace, name);
+ if (ret) {
+ _FPERROR(efd, "cannot set trace's name to `%s`", name);
+ goto error;
+ }
+
/* Set packet header to NULL to override the default one */
ret = bt_ctf_trace_set_packet_header_type(trace, NULL);
if (ret) {