converter. A plugin can be created for any trace format to allow its conversion
to/from another trace format.
+The main format expected to be converted to/from is the Common Trace
+Format (CTF). The latest version of the CTF specification can be found at:
+
+ git tree: git://git.efficios.com/ctf.git
+ gitweb: http://git.efficios.com/?p=ctf.git
+
+The CE Workgroup of the Linux Foundation, Ericsson, and EfficiOS have
+sponsored this work.
+
+
BUILDING
--------
*
* Babeltrace Trace Converter Library
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
{
int ret;
- ret = sin->pos.parent.event_cb(&sin->pos.parent, &sin->stream);
+ ret = sin->pos.parent.event_cb(&sin->pos.parent, &sin->parent);
if (ret == EOF)
return EOF;
else if (ret) {
{
struct ctf_file_stream *s_a = a, *s_b = b;
- if (s_a->stream.timestamp < s_b->stream.timestamp)
+ if (s_a->parent.timestamp < s_b->parent.timestamp)
return 1;
else
return 0;
if (!stream)
continue;
- for (filenr = 0; filenr < stream->files->len; filenr++) {
- struct ctf_file_stream *file_stream = g_ptr_array_index(stream->files, filenr);
+ for (filenr = 0; filenr < stream->streams->len; filenr++) {
+ struct ctf_file_stream *file_stream = g_ptr_array_index(stream->streams, filenr);
ret = read_event(file_stream);
if (ret == EOF) {
ret = 0;
ret = 0;
break;
}
- ret = sout->parent.event_cb(&sout->parent, &file_stream->stream);
+ ret = sout->parent.event_cb(&sout->parent, &file_stream->parent);
if (ret) {
fprintf(stdout, "[error] Writing event failed.\n");
goto end;
*
* BabelTrace - Convert Text Log to CTF
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
static char *s_outputname;
static int s_timestamp;
+static int s_help;
static uuid_t s_uuid;
/* Metadata format string */
/* timestamp */
ctf_align_pos(pos, sizeof(uint64_t) * CHAR_BIT);
if (!pos->dummy)
- *(uint32_t *) ctf_get_pos_addr(pos) = *ts;
+ *(uint64_t *) ctf_get_pos_addr(pos) = *ts;
ctf_move_pos(pos, sizeof(uint64_t) * CHAR_BIT);
}
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-t"))
s_timestamp = 1;
+ else if (!strcmp(argv[i], "-h")) {
+ s_help = 1;
+ return 0;
+ } else if (argv[i][0] == '-')
+ return -EINVAL;
else
s_outputname = argv[i];
}
ret = parse_args(argc, argv);
if (ret) {
+ fprintf(stdout, "Error: invalid argument.\n");
usage(stdout);
goto error;
}
+ if (s_help) {
+ usage(stdout);
+ exit(EXIT_SUCCESS);
+ }
+
ret = mkdir(s_outputname, S_IRWXU|S_IRWXG);
if (ret) {
perror("mkdir");
*
* Babeltrace Trace Converter
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
opt_input_format);
exit(EXIT_FAILURE);
}
- if (!opt_output_format)
- opt_output_format = "ctf";
fmt_write = bt_lookup_format(g_quark_from_static_string(opt_output_format));
if (!fmt_write) {
fprintf(stdout, "[error] format \"%s\" is not supported.\n\n",
*
* CTF Text Format registration.
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
struct ctf_stream_class *stream_class = stream->stream_class;
int field_nr_saved;
struct ctf_event *event_class;
- struct ctf_file_event *event;
+ struct ctf_stream_event *event;
uint64_t id = 0;
int ret;
return -EINVAL;
}
- if (stream->timestamp) {
+ if (stream->has_timestamp) {
if (pos->print_names)
fprintf(pos->fp, "timestamp = ");
else
*
* Array format access functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Enumeration mapping strings (quarks) from/to integers.
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Floating point read/write functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Integers read/write functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Sequence format access functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Strings read/write functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Structure format access functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Variant format access functions.
*
- * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Format registration.
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
struct ctf_stream_pos *pos =
container_of(ppos, struct ctf_stream_pos, parent);
struct ctf_stream_class *stream_class = stream->stream_class;
- struct ctf_file_event *event;
+ struct ctf_stream_event *event;
uint64_t id = 0;
int ret;
}
/* lookup timestamp */
+ stream->has_timestamp = 0;
integer_definition = lookup_integer(&stream->stream_event_header->p, "timestamp", FALSE);
if (integer_definition) {
ctf_update_timestamp(stream, integer_definition);
+ stream->has_timestamp = 1;
} else {
if (variant) {
integer_definition = lookup_integer(variant, "timestamp", FALSE);
if (integer_definition) {
ctf_update_timestamp(stream, integer_definition);
+ stream->has_timestamp = 1;
}
}
}
int ctf_write_event(struct stream_pos *pos, struct ctf_stream *stream)
{
struct ctf_stream_class *stream_class = stream->stream_class;
- struct ctf_file_event *event;
+ struct ctf_stream_event *event;
uint64_t id = 0;
int ret;
pos->mmap_offset = index->offset;
/* Lookup context/packet size in index */
- file_stream->stream.timestamp = index->timestamp_begin;
+ file_stream->parent.timestamp = index->timestamp_begin;
pos->content_size = index->content_size;
pos->packet_size = index->packet_size;
if (index->data_offset < index->content_size)
}
/* update trace_packet_header and stream_packet_context */
- if (file_stream->stream.trace_packet_header) {
+ if (pos->prot != PROT_WRITE && file_stream->parent.trace_packet_header) {
/* Read packet header */
- ret = generic_rw(&pos->parent, &file_stream->stream.trace_packet_header->p);
+ ret = generic_rw(&pos->parent, &file_stream->parent.trace_packet_header->p);
assert(!ret);
}
- if (file_stream->stream.stream_packet_context) {
+ if (pos->prot != PROT_WRITE && file_stream->parent.stream_packet_context) {
/* Read packet context */
- ret = generic_rw(&pos->parent, &file_stream->stream.stream_packet_context->p);
+ ret = generic_rw(&pos->parent, &file_stream->parent.stream_packet_context->p);
assert(!ret);
}
}
int ctf_open_trace_metadata_read(struct ctf_trace *td)
{
struct ctf_scanner *scanner;
+ struct ctf_file_stream *metadata_stream;
FILE *fp;
char *buf = NULL;
int ret = 0;
- td->metadata.pos.fd = openat(td->dirfd, "metadata", O_RDONLY);
- if (td->metadata.pos.fd < 0) {
+ metadata_stream = g_new0(struct ctf_file_stream, 1);
+ td->metadata = &metadata_stream->parent;
+ metadata_stream->pos.fd = openat(td->dirfd, "metadata", O_RDONLY);
+ if (metadata_stream->pos.fd < 0) {
fprintf(stdout, "Unable to open metadata.\n");
- return td->metadata.pos.fd;
+ return metadata_stream->pos.fd;
}
if (babeltrace_debug)
yydebug = 1;
- fp = fdopen(td->metadata.pos.fd, "r");
+ fp = fdopen(metadata_stream->pos.fd, "r");
if (!fp) {
fprintf(stdout, "[error] Unable to open metadata stream.\n");
ret = -errno;
fclose(fp);
free(buf);
end_stream:
- close(td->metadata.pos.fd);
+ close(metadata_stream->pos.fd);
+ if (ret)
+ g_free(metadata_stream);
return ret;
}
static
-struct ctf_file_event *create_event_definitions(struct ctf_trace *td,
- struct ctf_stream *stream,
- struct ctf_event *event)
+struct ctf_stream_event *create_event_definitions(struct ctf_trace *td,
+ struct ctf_stream *stream,
+ struct ctf_event *event)
{
- struct ctf_file_event *file_event = g_new0(struct ctf_file_event, 1);
+ struct ctf_stream_event *stream_event = g_new0(struct ctf_stream_event, 1);
if (event->context_decl) {
struct definition *definition =
if (!definition) {
goto error;
}
- file_event->event_context = container_of(definition,
+ stream_event->event_context = container_of(definition,
struct definition_struct, p);
- stream->parent_def_scope = file_event->event_context->p.scope;
+ stream->parent_def_scope = stream_event->event_context->p.scope;
}
if (event->fields_decl) {
struct definition *definition =
if (!definition) {
goto error;
}
- file_event->event_fields = container_of(definition,
+ stream_event->event_fields = container_of(definition,
struct definition_struct, p);
- stream->parent_def_scope = file_event->event_fields->p.scope;
+ stream->parent_def_scope = stream_event->event_fields->p.scope;
}
- return file_event;
+ return stream_event;
error:
- if (file_event->event_fields)
- definition_unref(&file_event->event_fields->p);
- if (file_event->event_context)
- definition_unref(&file_event->event_context->p);
+ if (stream_event->event_fields)
+ definition_unref(&stream_event->event_fields->p);
+ if (stream_event->event_context)
+ definition_unref(&stream_event->event_context->p);
return NULL;
}
g_ptr_array_set_size(stream->events_by_id, stream_class->events_by_id->len);
for (i = 0; i < stream->events_by_id->len; i++) {
struct ctf_event *event = g_ptr_array_index(stream_class->events_by_id, i);
- struct ctf_file_event *file_event;
+ struct ctf_stream_event *stream_event;
if (!event)
continue;
- file_event = create_event_definitions(td, stream, event);
- if (!file_event)
+ stream_event = create_event_definitions(td, stream, event);
+ if (!stream_event)
goto error_event;
- g_ptr_array_index(stream->events_by_id, i) = file_event;
+ g_ptr_array_index(stream->events_by_id, i) = stream_event;
}
return 0;
error_event:
for (i = 0; i < stream->events_by_id->len; i++) {
- struct ctf_file_event *file_event = g_ptr_array_index(stream->events_by_id, i);
- if (file_event)
- g_free(file_event);
+ struct ctf_stream_event *stream_event = g_ptr_array_index(stream->events_by_id, i);
+ if (stream_event)
+ g_free(stream_event);
}
g_ptr_array_free(stream->events_by_id, TRUE);
error:
packet_index.timestamp_end = 0;
/* read and check header, set stream id (and check) */
- if (file_stream->stream.trace_packet_header) {
+ if (file_stream->parent.trace_packet_header) {
/* Read packet header */
- ret = generic_rw(&pos->parent, &file_stream->stream.trace_packet_header->p);
+ ret = generic_rw(&pos->parent, &file_stream->parent.trace_packet_header->p);
if (ret)
return ret;
- len_index = struct_declaration_lookup_field_index(file_stream->stream.trace_packet_header->declaration, g_quark_from_static_string("magic"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.trace_packet_header->declaration, g_quark_from_static_string("magic"));
if (len_index >= 0) {
struct definition_integer *defint;
struct definition *field;
- field = struct_definition_get_field_from_index(file_stream->stream.trace_packet_header, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.trace_packet_header, len_index);
assert(field->declaration->id == CTF_TYPE_INTEGER);
defint = container_of(field, struct definition_integer, p);
assert(defint->declaration->signedness == FALSE);
}
/* check uuid */
- len_index = struct_declaration_lookup_field_index(file_stream->stream.trace_packet_header->declaration, g_quark_from_static_string("uuid"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.trace_packet_header->declaration, g_quark_from_static_string("uuid"));
if (len_index >= 0) {
struct definition_array *defarray;
struct definition *field;
uint64_t i;
uint8_t uuidval[UUID_LEN];
- field = struct_definition_get_field_from_index(file_stream->stream.trace_packet_header, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.trace_packet_header, len_index);
assert(field->declaration->id == CTF_TYPE_ARRAY);
defarray = container_of(field, struct definition_array, p);
assert(array_len(defarray) == UUID_LEN);
}
- len_index = struct_declaration_lookup_field_index(file_stream->stream.trace_packet_header->declaration, g_quark_from_static_string("stream_id"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.trace_packet_header->declaration, g_quark_from_static_string("stream_id"));
if (len_index >= 0) {
struct definition_integer *defint;
struct definition *field;
- field = struct_definition_get_field_from_index(file_stream->stream.trace_packet_header, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.trace_packet_header, len_index);
assert(field->declaration->id == CTF_TYPE_INTEGER);
defint = container_of(field, struct definition_integer, p);
assert(defint->declaration->signedness == FALSE);
}
}
- if (!first_packet && file_stream->stream_id != stream_id) {
+ if (!first_packet && file_stream->parent.stream_id != stream_id) {
fprintf(stdout, "[error] Stream ID is changing within a stream.\n");
return -EINVAL;
}
if (first_packet) {
- file_stream->stream_id = stream_id;
+ file_stream->parent.stream_id = stream_id;
if (stream_id >= td->streams->len) {
fprintf(stdout, "[error] Stream %" PRIu64 " is not declared in metadata.\n", stream_id);
return -EINVAL;
fprintf(stdout, "[error] Stream %" PRIu64 " is not declared in metadata.\n", stream_id);
return -EINVAL;
}
- file_stream->stream.stream_class = stream;
- ret = create_stream_definitions(td, &file_stream->stream);
+ file_stream->parent.stream_class = stream;
+ ret = create_stream_definitions(td, &file_stream->parent);
if (ret)
return ret;
}
first_packet = 0;
- if (file_stream->stream.stream_packet_context) {
+ if (file_stream->parent.stream_packet_context) {
/* Read packet context */
- ret = generic_rw(&pos->parent, &file_stream->stream.stream_packet_context->p);
+ ret = generic_rw(&pos->parent, &file_stream->parent.stream_packet_context->p);
if (ret)
return ret;
/* read content size from header */
- len_index = struct_declaration_lookup_field_index(file_stream->stream.stream_packet_context->declaration, g_quark_from_static_string("content_size"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("content_size"));
if (len_index >= 0) {
struct definition_integer *defint;
struct definition *field;
- field = struct_definition_get_field_from_index(file_stream->stream.stream_packet_context, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
assert(field->declaration->id == CTF_TYPE_INTEGER);
defint = container_of(field, struct definition_integer, p);
assert(defint->declaration->signedness == FALSE);
}
/* read packet size from header */
- len_index = struct_declaration_lookup_field_index(file_stream->stream.stream_packet_context->declaration, g_quark_from_static_string("packet_size"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("packet_size"));
if (len_index >= 0) {
struct definition_integer *defint;
struct definition *field;
- field = struct_definition_get_field_from_index(file_stream->stream.stream_packet_context, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
assert(field->declaration->id == CTF_TYPE_INTEGER);
defint = container_of(field, struct definition_integer, p);
assert(defint->declaration->signedness == FALSE);
}
/* read timestamp begin from header */
- len_index = struct_declaration_lookup_field_index(file_stream->stream.stream_packet_context->declaration, g_quark_from_static_string("timestamp_begin"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("timestamp_begin"));
if (len_index >= 0) {
struct definition_integer *defint;
struct definition *field;
- field = struct_definition_get_field_from_index(file_stream->stream.stream_packet_context, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
assert(field->declaration->id == CTF_TYPE_INTEGER);
defint = container_of(field, struct definition_integer, p);
assert(defint->declaration->signedness == FALSE);
}
/* read timestamp end from header */
- len_index = struct_declaration_lookup_field_index(file_stream->stream.stream_packet_context->declaration, g_quark_from_static_string("timestamp_end"));
+ len_index = struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("timestamp_end"));
if (len_index >= 0) {
struct definition_integer *defint;
struct definition *field;
- field = struct_definition_get_field_from_index(file_stream->stream.stream_packet_context, len_index);
+ field = struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
assert(field->declaration->id == CTF_TYPE_INTEGER);
defint = container_of(field, struct definition_integer, p);
assert(defint->declaration->signedness == FALSE);
if (packet_index.packet_size > (filestats.st_size - packet_index.offset) * CHAR_BIT) {
fprintf(stdout, "[error] Packet size (%zu bits) is larger than remaining file size (%zu bits).\n",
- packet_index.content_size, (filestats.st_size - packet_index.offset) * CHAR_BIT);
+ packet_index.content_size, (size_t) (filestats.st_size - packet_index.offset) * CHAR_BIT);
return -EINVAL;
}
goto error;
file_stream = g_new0(struct ctf_file_stream, 1);
ctf_init_pos(&file_stream->pos, ret, flags);
- ret = create_trace_definitions(td, &file_stream->stream);
+ ret = create_trace_definitions(td, &file_stream->parent);
if (ret)
goto error_def;
ret = create_stream_packet_index(td, file_stream);
if (ret)
goto error_index;
/* Add stream file to stream class */
- g_ptr_array_add(file_stream->stream.stream_class->files, file_stream);
+ g_ptr_array_add(file_stream->parent.stream_class->streams,
+ &file_stream->parent);
return 0;
error_index:
- if (file_stream->stream.trace_packet_header)
- definition_unref(&file_stream->stream.trace_packet_header->p);
+ if (file_stream->parent.trace_packet_header)
+ definition_unref(&file_stream->parent.trace_packet_header->p);
error_def:
ctf_fini_pos(&file_stream->pos);
close(file_stream->pos.fd);
stream = g_ptr_array_index(td->streams, i);
if (!stream)
continue;
- for (j = 0; j < stream->files->len; j++) {
+ for (j = 0; j < stream->streams->len; j++) {
struct ctf_file_stream *file_stream;
- file_stream = g_ptr_array_index(stream->files, j);
+ file_stream = container_of(g_ptr_array_index(stream->streams, j), struct ctf_file_stream, parent);
ctf_close_file_stream(file_stream);
}
--- /dev/null
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias uint8_t [] := puint8_t;
+
+trace {
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint8_t field;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
These are the CTF metadata parser test. Those under succeed/ should successfully
parse. Those under fail/ should provide an appropriate failure message.
+The tests under tofix/ do not follow the CTF specifications due to
+ambiguity in the LALR parser implementation. These are rarely used.
+
Mathieu Desnoyers
--- /dev/null
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+
+// Define newtype
+typealias uint32_t := newtype;
+
+trace {
+ // Hide newtype
+ typedef uint8_t newtype;
+
+ major = 0;
+ minor = 1;
+ uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+ byte_order = le;
+ packet.header := struct {
+ uint8_t field;
+ };
+};
+
+event {
+ name = string;
+ fields := struct { string str; };
+};
--- /dev/null
+// Define unsigned long
+typealias integer { ... } := unsigned long;
+
+// Define unsigned long int
+typealias integer { ... } := unsigned long int;
+
+// Define int
+typedef unsigned long int;
stream->declaration_scope = new_declaration_scope(parent_declaration_scope);
stream->events_by_id = g_ptr_array_new();
stream->event_quark_to_id = g_hash_table_new(g_direct_hash, g_direct_equal);
- stream->files = g_ptr_array_new();
+ stream->streams = g_ptr_array_new();
if (node) {
cds_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
ret = ctf_stream_declaration_visit(fd, depth + 1, iter, stream, trace);
declaration_unref(&stream->event_context_decl->p);
if (stream->packet_context_decl)
declaration_unref(&stream->packet_context_decl->p);
- g_ptr_array_free(stream->files, TRUE);
+ g_ptr_array_free(stream->streams, TRUE);
g_ptr_array_free(stream->events_by_id, TRUE);
g_hash_table_destroy(stream->event_quark_to_id);
free_declaration_scope(stream->declaration_scope);
if (ret)
return ret;
}
- cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
- siblings) {
- iter->parent = node;
- ret = ctf_visitor_parent_links(fd, depth + 1, iter);
- if (ret)
- return ret;
+ if (!node->u.type_declarator.u.nested.abstract_array) {
+ cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
+ siblings) {
+ iter->parent = node;
+ ret = ctf_visitor_parent_links(fd, depth + 1, iter);
+ if (ret)
+ return ret;
+ }
}
if (node->u.type_declarator.bitfield_len) {
node->u.type_declarator.bitfield_len = node;
if (ret)
return ret;
}
- cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
- siblings) {
- if (iter->type != NODE_UNARY_EXPRESSION) {
- fprintf(fd, "[error] %s: expecting unary expression as length\n", __func__);
+ if (!node->u.type_declarator.u.nested.abstract_array) {
+ cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
+ siblings) {
+ if (iter->type != NODE_UNARY_EXPRESSION) {
+ fprintf(fd, "[error] %s: expecting unary expression as length\n", __func__);
+ return -EINVAL;
+ }
+ ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
+ if (ret)
+ return ret;
+ }
+ } else {
+ if (node->parent->type == NODE_TYPEALIAS_TARGET) {
+ fprintf(fd, "[error] %s: abstract array declarator not permitted as target of typealias\n", __func__);
return -EINVAL;
}
- ret = _ctf_visitor_semantic_check(fd, depth + 1, iter);
- if (ret)
- return ret;
}
if (node->u.type_declarator.bitfield_len) {
ret = _ctf_visitor_semantic_check(fd, depth + 1,
print_tabs(fd, depth);
fprintf(fd, "</type_declarator>\n");
}
- if (!cds_list_empty(&node->u.type_declarator.u.nested.length)) {
+ if (node->u.type_declarator.u.nested.abstract_array) {
+ print_tabs(fd, depth);
+ fprintf(fd, "<length>\n");
+ print_tabs(fd, depth);
+ fprintf(fd, "</length>\n");
+ } else if (!cds_list_empty(&node->u.type_declarator.u.nested.length)) {
print_tabs(fd, depth);
fprintf(fd, "<length>\n");
cds_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
print_tabs(fd, depth);
fprintf(fd, "</length>\n");
}
- if (node->u.type_declarator.u.nested.abstract_array) {
- print_tabs(fd, depth);
- fprintf(fd, "<length>\n");
- print_tabs(fd, depth);
- fprintf(fd, "</length>\n");
- }
if (node->u.type_declarator.bitfield_len) {
print_tabs(fd, depth);
fprintf(fd, "<bitfield_len>\n");
*
* Array format access functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Enumeration mapping strings (quarks) from/to integers.
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Floating point read/write functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Integers read/write functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Sequence format access functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Strings read/write functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Structure format access functions.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Variant format access functions.
*
- * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Format Registry
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
--- /dev/null
+#ifndef _BABELTRACE_CTF_IR_METADATA_H
+#define _BABELTRACE_CTF_IR_METADATA_H
+
+/*
+ * BabelTrace
+ *
+ * CTF Intermediate Representation Metadata Header
+ *
+ * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ */
+
+#include <babeltrace/types.h>
+#include <babeltrace/format.h>
+#include <babeltrace/ctf/types.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <uuid/uuid.h>
+#include <assert.h>
+#include <glib.h>
+
+struct ctf_trace;
+struct ctf_stream_class;
+struct ctf_stream;
+struct ctf_event;
+
+struct ctf_stream {
+ struct ctf_stream_class *stream_class;
+ uint64_t timestamp; /* Current timestamp, in ns */
+ int has_timestamp;
+ uint64_t stream_id;
+
+ struct definition_struct *trace_packet_header;
+ struct definition_struct *stream_packet_context;
+ struct definition_struct *stream_event_header;
+ struct definition_struct *stream_event_context;
+ GPtrArray *events_by_id; /* Array of struct ctf_stream_event pointers indexed by id */
+ struct definition_scope *parent_def_scope; /* for initialization */
+ int stream_definitions_created;
+};
+
+struct ctf_stream_event {
+ struct definition_struct *event_context;
+ struct definition_struct *event_fields;
+};
+
+#define CTF_TRACE_SET_FIELD(ctf_trace, field) \
+ do { \
+ (ctf_trace)->field_mask |= CTF_TRACE_ ## field; \
+ } while (0)
+
+#define CTF_TRACE_FIELD_IS_SET(ctf_trace, field) \
+ ((ctf_trace)->field_mask & CTF_TRACE_ ## field)
+
+#define CTF_TRACE_GET_FIELD(ctf_trace, field) \
+ ({ \
+ assert(CTF_TRACE_FIELD_IS_SET(ctf_trace, field)); \
+ (ctf_trace)->(field); \
+ })
+
+
+struct ctf_trace {
+ struct trace_descriptor parent;
+ /* root scope */
+ struct declaration_scope *root_declaration_scope;
+
+ struct declaration_scope *declaration_scope;
+ /* innermost definition scope. to be used as parent of stream. */
+ struct definition_scope *definition_scope;
+ GPtrArray *streams; /* Array of struct ctf_stream_class pointers */
+ struct ctf_stream *metadata;
+
+ /* Declarations only used when parsing */
+ struct declaration_struct *packet_header_decl;
+
+ uint64_t major;
+ uint64_t minor;
+ uuid_t uuid;
+ int byte_order; /* trace BYTE_ORDER. 0 if unset. */
+
+ enum { /* Fields populated mask */
+ CTF_TRACE_major = (1U << 0),
+ CTF_TRACE_minor = (1U << 1),
+ CTF_TRACE_uuid = (1U << 2),
+ CTF_TRACE_byte_order = (1U << 3),
+ CTF_TRACE_packet_header = (1U << 4),
+ } field_mask;
+
+ /* Information about trace backing directory and files */
+ DIR *dir;
+ int dirfd;
+ int flags; /* open flags */
+
+ /* Heap of streams, ordered to always get the lowest timestam */
+ struct ptr_heap *stream_heap;
+};
+
+#define CTF_STREAM_SET_FIELD(ctf_stream, field) \
+ do { \
+ (ctf_stream)->field_mask |= CTF_STREAM_ ## field; \
+ } while (0)
+
+#define CTF_STREAM_FIELD_IS_SET(ctf_stream, field) \
+ ((ctf_stream)->field_mask & CTF_STREAM_ ## field)
+
+#define CTF_STREAM_GET_FIELD(ctf_stream, field) \
+ ({ \
+ assert(CTF_STREAM_FIELD_IS_SET(ctf_stream, field)); \
+ (ctf_stream)->(field); \
+ })
+
+struct ctf_stream_class {
+ struct ctf_trace *trace;
+ /* parent is lexical scope conaining the stream scope */
+ struct declaration_scope *declaration_scope;
+ /* innermost definition scope. to be used as parent of event. */
+ struct definition_scope *definition_scope;
+ GPtrArray *events_by_id; /* Array of struct ctf_event pointers indexed by id */
+ GHashTable *event_quark_to_id; /* GQuark to numeric id */
+
+ /* Declarations only used when parsing */
+ struct declaration_struct *packet_context_decl;
+ struct declaration_struct *event_header_decl;
+ struct declaration_struct *event_context_decl;
+
+ uint64_t stream_id;
+
+ enum { /* Fields populated mask */
+ CTF_STREAM_stream_id = (1 << 0),
+ } field_mask;
+
+ GPtrArray *streams; /* Array of struct ctf_stream pointers */
+};
+
+#define CTF_EVENT_SET_FIELD(ctf_event, field) \
+ do { \
+ (ctf_event)->field_mask |= CTF_EVENT_ ## field; \
+ } while (0)
+
+#define CTF_EVENT_FIELD_IS_SET(ctf_event, field) \
+ ((ctf_event)->field_mask & CTF_EVENT_ ## field)
+
+#define CTF_EVENT_GET_FIELD(ctf_event, field) \
+ ({ \
+ assert(CTF_EVENT_FIELD_IS_SET(ctf_event, field)); \
+ (ctf_event)->(field); \
+ })
+
+struct ctf_event {
+ /* stream mapped by stream_id */
+ struct ctf_stream_class *stream;
+ /* parent is lexical scope conaining the event scope */
+ struct declaration_scope *declaration_scope;
+
+ /* Declarations only used when parsing */
+ struct declaration_struct *context_decl;
+ struct declaration_struct *fields_decl;
+
+ GQuark name;
+ uint64_t id; /* Numeric identifier within the stream */
+ uint64_t stream_id;
+
+ enum { /* Fields populated mask */
+ CTF_EVENT_name = (1 << 0),
+ CTF_EVENT_id = (1 << 1),
+ CTF_EVENT_stream_id = (1 << 2),
+ } field_mask;
+};
+
+#endif /* _BABELTRACE_CTF_IR_METADATA_H */
#include <babeltrace/types.h>
#include <babeltrace/format.h>
#include <babeltrace/ctf/types.h>
+#include <babeltrace/ctf-ir/metadata.h>
#include <sys/types.h>
#include <dirent.h>
#include <uuid/uuid.h>
#define CTF_MAGIC 0xC1FC1FC1
#define TSDL_MAGIC 0x75D11D57
-struct ctf_trace;
-struct ctf_stream_class;
-struct ctf_stream;
-struct ctf_event;
-
-struct ctf_stream {
- struct ctf_stream_class *stream_class;
- uint64_t timestamp; /* Current timestamp, in ns */
-
- struct definition_struct *trace_packet_header;
- struct definition_struct *stream_packet_context;
- struct definition_struct *stream_event_header;
- struct definition_struct *stream_event_context;
- GPtrArray *events_by_id; /* Array of struct ctf_file_event pointers indexed by id */
- struct definition_scope *parent_def_scope; /* for initialization */
- int stream_definitions_created;
-};
-
-struct ctf_file_event {
- struct definition_struct *event_context;
- struct definition_struct *event_fields;
-};
-
struct ctf_file_stream {
- uint64_t stream_id;
- struct ctf_stream stream;
+ struct ctf_stream parent;
struct ctf_stream_pos pos; /* current stream position */
};
-#define CTF_TRACE_SET_FIELD(ctf_trace, field) \
- do { \
- (ctf_trace)->field_mask |= CTF_TRACE_ ## field; \
- } while (0)
-
-#define CTF_TRACE_FIELD_IS_SET(ctf_trace, field) \
- ((ctf_trace)->field_mask & CTF_TRACE_ ## field)
-
-#define CTF_TRACE_GET_FIELD(ctf_trace, field) \
- ({ \
- assert(CTF_TRACE_FIELD_IS_SET(ctf_trace, field)); \
- (ctf_trace)->(field); \
- })
-
-
-struct ctf_trace {
- struct trace_descriptor parent;
- /* root scope */
- struct declaration_scope *root_declaration_scope;
-
- struct declaration_scope *declaration_scope;
- /* innermost definition scope. to be used as parent of stream. */
- struct definition_scope *definition_scope;
- GPtrArray *streams; /* Array of struct ctf_stream_class pointers */
- struct ctf_file_stream metadata;
-
- /* Declarations only used when parsing */
- struct declaration_struct *packet_header_decl;
-
- uint64_t major;
- uint64_t minor;
- uuid_t uuid;
- int byte_order; /* trace BYTE_ORDER. 0 if unset. */
-
- enum { /* Fields populated mask */
- CTF_TRACE_major = (1U << 0),
- CTF_TRACE_minor = (1U << 1),
- CTF_TRACE_uuid = (1U << 2),
- CTF_TRACE_byte_order = (1U << 3),
- CTF_TRACE_packet_header = (1U << 4),
- } field_mask;
-
- /* Information about trace backing directory and files */
- DIR *dir;
- int dirfd;
- int flags; /* open flags */
-
- /* Heap of streams, ordered to always get the lowest timestam */
- struct ptr_heap *stream_heap;
-};
-
-#define CTF_STREAM_SET_FIELD(ctf_stream, field) \
- do { \
- (ctf_stream)->field_mask |= CTF_STREAM_ ## field; \
- } while (0)
-
-#define CTF_STREAM_FIELD_IS_SET(ctf_stream, field) \
- ((ctf_stream)->field_mask & CTF_STREAM_ ## field)
-
-#define CTF_STREAM_GET_FIELD(ctf_stream, field) \
- ({ \
- assert(CTF_STREAM_FIELD_IS_SET(ctf_stream, field)); \
- (ctf_stream)->(field); \
- })
-
-struct ctf_stream_class {
- struct ctf_trace *trace;
- /* parent is lexical scope conaining the stream scope */
- struct declaration_scope *declaration_scope;
- /* innermost definition scope. to be used as parent of event. */
- struct definition_scope *definition_scope;
- GPtrArray *events_by_id; /* Array of struct ctf_event pointers indexed by id */
- GHashTable *event_quark_to_id; /* GQuark to numeric id */
-
- /* Declarations only used when parsing */
- struct declaration_struct *packet_context_decl;
- struct declaration_struct *event_header_decl;
- struct declaration_struct *event_context_decl;
-
- uint64_t stream_id;
-
- enum { /* Fields populated mask */
- CTF_STREAM_stream_id = (1 << 0),
- } field_mask;
-
- GPtrArray *files; /* Array of struct ctf_file_stream pointers */
-};
-
-#define CTF_EVENT_SET_FIELD(ctf_event, field) \
- do { \
- (ctf_event)->field_mask |= CTF_EVENT_ ## field; \
- } while (0)
-
-#define CTF_EVENT_FIELD_IS_SET(ctf_event, field) \
- ((ctf_event)->field_mask & CTF_EVENT_ ## field)
-
-#define CTF_EVENT_GET_FIELD(ctf_event, field) \
- ({ \
- assert(CTF_EVENT_FIELD_IS_SET(ctf_event, field)); \
- (ctf_event)->(field); \
- })
-
-struct ctf_event {
- /* stream mapped by stream_id */
- struct ctf_stream_class *stream;
- /* parent is lexical scope conaining the event scope */
- struct declaration_scope *declaration_scope;
-
- /* Declarations only used when parsing */
- struct declaration_struct *context_decl;
- struct declaration_struct *fields_decl;
-
- GQuark name;
- uint64_t id; /* Numeric identifier within the stream */
- uint64_t stream_id;
-
- enum { /* Fields populated mask */
- CTF_EVENT_name = (1 << 0),
- CTF_EVENT_id = (1 << 1),
- CTF_EVENT_stream_id = (1 << 2),
- } field_mask;
-};
-
#define HEADER_END char end_field
#define header_sizeof(type) offsetof(typeof(type), end_field)
*
* Trace Format Header
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Type Header
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
/*
* Lookup helpers.
*/
+struct definition *lookup_definition(struct definition *definition,
+ const char *field_name);
struct definition_integer *lookup_integer(struct definition *definition,
const char *field_name,
int signedness);
*
* BabelTrace - Array Type Converter
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* BabelTrace - Enumeration Type
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* BabelTrace - Float Type Converter
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* BabelTrace - Integer Type Converter
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* BabelTrace - Sequence Type Converter
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* BabelTrace - String Type Converter
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* BabelTrace - Structure Type Converter
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
*
* Types registry.
*
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
g_free(scope);
}
-static
struct definition *lookup_definition(struct definition *definition,
const char *field_name)
{
*
* BabelTrace - Variant Type Converter
*
- * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal