babeltrace.git
8 years agoir: add bt_ctf_trace_get_stream_class_by_id()
Philippe Proulx [Mon, 27 Jul 2015 13:13:46 +0000 (09:13 -0400)] 
ir: add bt_ctf_trace_get_stream_class_by_id()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add internal field path getters
Philippe Proulx [Mon, 27 Jul 2015 12:40:33 +0000 (08:40 -0400)] 
ir: add internal field path getters

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoRename bt_object to bt_value
Philippe Proulx [Thu, 23 Jul 2015 21:11:27 +0000 (17:11 -0400)] 
Rename bt_object to bt_value

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add BT_CTF_MOVE()
Philippe Proulx [Wed, 22 Jul 2015 21:05:36 +0000 (17:05 -0400)] 
ir: add BT_CTF_MOVE()

Adds semantics to ownership transfers of CTF IR objects.

This is something that is done often enough to justify the
existence of this macro:

    struct bt_ctf_field_type *type;
    struct bt_ctf_field_type *ret_type;

    /* ... */

    /* move ownership */
    ret_type = type;
    type = NULL;

    /* ... */

    /* put both (safe since type was set to NULL) */
    bt_ctf_put(ret_type);
    bt_ctf_put(type);

With BT_CTF_MOVE():

    struct bt_ctf_field_type *type;
    struct bt_ctf_field_type *ret_type;

    /* ... */

    /* move ownership */
    BT_CTF_MOVE(ret_type, type);

    /* ... */

    /* put both (safe since ownership was moved) */
    bt_ctf_put(ret_type);
    bt_ctf_put(type);

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agotest_ctf_writer.c: use bt_ctf_put() everywhere
Philippe Proulx [Thu, 16 Jul 2015 17:08:53 +0000 (13:08 -0400)] 
test_ctf_writer.c: use bt_ctf_put() everywhere

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: consolidate reference counting functions
Philippe Proulx [Thu, 16 Jul 2015 17:04:50 +0000 (13:04 -0400)] 
ir: consolidate reference counting functions

This patch adds the bt_ctf_get() and bt_ctf_put() functions
which resp. get and put references of any CTF IR object.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: allow structure types to have a minimum align
Philippe Proulx [Tue, 14 Jul 2015 23:42:23 +0000 (19:42 -0400)] 
Fix: allow structure types to have a minimum align

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agotest_ctf_writer: add type alignment tests
Philippe Proulx [Tue, 14 Jul 2015 23:41:34 +0000 (19:41 -0400)] 
test_ctf_writer: add type alignment tests

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: require power of two for type alignment
Philippe Proulx [Tue, 14 Jul 2015 23:36:15 +0000 (19:36 -0400)] 
Fix: require power of two for type alignment

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: do not init. BO of enums/arrays/sequences
Philippe Proulx [Tue, 14 Jul 2015 23:01:02 +0000 (19:01 -0400)] 
Fix: do not init. BO of enums/arrays/sequences

The functions used to create enumeration, array, and
sequence types are different from the other creation
functions in that they register another type at creation
time. Other compound types are empty when created. When a
type is initialized, its byte order setting function is
called, which is recursive for compound types and for the
enumeration type. This overrides the previously set byte
order of the underlying type passed to those creation functions.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoBuild: Update m4 for bison & flex version check to match autoconf-archive file
Jonathan Rajotte [Fri, 10 Jul 2015 15:36:45 +0000 (11:36 -0400)] 
Build: Update m4 for bison & flex version check to match autoconf-archive file

Officials m4 were merged in [1][2].

[1] https://github.com/peti/autoconf-archive/commit/b2bdd8591b2d6b1eb580ead5f978a30e3ecfc36c
[2] https://github.com/peti/autoconf-archive/commit/fd1f2862c1524e73495d67646d26000e2e85e807

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoBuild: add version check on flex
Jonathan Rajotte [Thu, 2 Jul 2015 22:20:25 +0000 (18:20 -0400)] 
Build: add version check on flex

This new m4 macro is valid starting from [1].

[1]http://sourceforge.net/p/flex/flex/ci/712c03b38fb35f9d7f16e0fdd27441c3efda0071/tree/

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoBuild: add version check on autoconf
Jonathan Rajotte [Thu, 2 Jul 2015 19:50:20 +0000 (15:50 -0400)] 
Build: add version check on autoconf

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoBuild: m4 macro for Bison version check
Jonathan Rajotte [Thu, 2 Jul 2015 19:12:31 +0000 (15:12 -0400)] 
Build: m4 macro for Bison version check

This new m4 macro make check for a supported version of Bison.
This macro is valid starting from commit id
e79137accc7ea0352cd4677ff22818f9c68d4eab of the GNU Bison git tree[1].
This check works for version 1.29b to this day.

[1] http://git.savannah.gnu.org/cgit/bison.git/commit/?id=e79137accc7ea0352cd4677ff22818f9c68d4eab

Fixes: #891
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTest: Add a test to ensure multiple keywords can be used in a field path
Jérémie Galarneau [Thu, 2 Jul 2015 18:47:26 +0000 (14:47 -0400)] 
Test: Add a test to ensure multiple keywords can be used in a field path

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Missing postfix_expression DOT keywords in CTF grammar
Jérémie Galarneau [Thu, 2 Jul 2015 18:46:06 +0000 (14:46 -0400)] 
Fix: Missing postfix_expression DOT keywords in CTF grammar

This would cause expressions of the form:

uint32_t a[stream.event.header.seq_len]

to fail to parse since two keywords (stream and event) are used in the
path.

Reported-by: Staffan Mansson <staffan@mansson-net.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Create stream after adding its stream class to a trace
Jérémie Galarneau [Thu, 2 Jul 2015 18:43:12 +0000 (14:43 -0400)] 
Fix: Create stream after adding its stream class to a trace

This ensures that a stream class' id is set before we create a stream
instance and initialize its packet header. Otherwise, the packet header
stream_id is initialized to its default value (0).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Remove overly-strict freeze check on variants and structures
Jérémie Galarneau [Thu, 2 Jul 2015 18:39:51 +0000 (14:39 -0400)] 
Fix: Remove overly-strict freeze check on variants and structures

bt_ctf_field_type_structure_set_field_index() and
bt_ctf_field_type_variant_set_field_index() are both internal APIs
which are used when resolving field paths.

For exemple, when a sequence's field path is resolved, the sequence
is copied and replaced in its parent since we are setting the
resolved path as part of the sequence. This is done so that different
sequence members which would have been declared using the same sequence
type instance can have length fields which resolve to different absolute
paths.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoDocs: A stream has no ownership of its trace
Jérémie Galarneau [Thu, 2 Jul 2015 18:38:08 +0000 (14:38 -0400)] 
Docs: A stream has no ownership of its trace

Add a comment to explain why the trace's refcount is not incremented
when setting a stream's trace.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Missing NULL check in bt_ctf_field_sequence_destroy
Jérémie Galarneau [Thu, 2 Jul 2015 18:37:03 +0000 (14:37 -0400)] 
Fix: Missing NULL check in bt_ctf_field_sequence_destroy

A sequence's "elements" array might be NULL if
bt_ctf_field_sequence_set_length() was never called during its lifetime.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoAdd test_bt_objects to .gitignore
Jérémie Galarneau [Wed, 27 May 2015 19:47:58 +0000 (15:47 -0400)] 
Add test_bt_objects to .gitignore

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add tests for bt_ctf_field_variant_get_current_field()
Philippe Proulx [Mon, 25 May 2015 00:33:37 +0000 (20:33 -0400)] 
ir: add tests for bt_ctf_field_variant_get_current_field()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add bt_ctf_field_variant_get_current_field()
Philippe Proulx [Mon, 25 May 2015 00:24:54 +0000 (20:24 -0400)] 
ir: add bt_ctf_field_variant_get_current_field()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoClean-up: get_field_type should only have one return statement
Jérémie Galarneau [Mon, 25 May 2015 20:09:27 +0000 (16:09 -0400)] 
Clean-up: get_field_type should only have one return statement

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: bt_ctf_trace_freeze must fail if type resolving fails
Jérémie Galarneau [Mon, 25 May 2015 20:08:26 +0000 (16:08 -0400)] 
Fix: bt_ctf_trace_freeze must fail if type resolving fails

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Return a variant's alignment as 0 (undefined).
Jérémie Galarneau [Fri, 22 May 2015 20:31:59 +0000 (16:31 -0400)] 
Fix: Return a variant's alignment as 0 (undefined).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: copy variants and sequences when setting a field path
Jérémie Galarneau [Thu, 14 May 2015 16:58:52 +0000 (12:58 -0400)] 
ir: copy variants and sequences when setting a field path

Variants and sequences might be used in multiple structures. Therefore,
they are replaced by a copy with the path to their tag or sequence
length field set.

This is done on freeze, hence a user should not expect to be able
to modify a sequence's or variant's attributes subsequently.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: ir: disallow setting the alignment of certain types
Jérémie Galarneau [Wed, 13 May 2015 18:11:35 +0000 (14:11 -0400)] 
Fix: ir: disallow setting the alignment of certain types

Setting the alignment of sequences, arrays, variants and structures
makes no sense.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: compute array, sequence and structure alignment dynamically
Jérémie Galarneau [Wed, 13 May 2015 18:09:23 +0000 (14:09 -0400)] 
ir: compute array, sequence and structure alignment dynamically

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: support optional parameters in bt_ctf_field_type_variant_get_field
Jérémie Galarneau [Wed, 13 May 2015 18:07:37 +0000 (14:07 -0400)] 
ir: support optional parameters in bt_ctf_field_type_variant_get_field

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: support optional parameters in bt_ctf_field_type_structure_get_field
Jérémie Galarneau [Wed, 13 May 2015 18:05:53 +0000 (14:05 -0400)] 
ir: support optional parameters in bt_ctf_field_type_structure_get_field

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoClean-up: clean multi-line function call
Jérémie Galarneau [Wed, 13 May 2015 18:03:40 +0000 (14:03 -0400)] 
Clean-up: clean multi-line function call

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoTests: fix possible null pointer dereference
Jérémie Galarneau [Wed, 13 May 2015 16:04:35 +0000 (12:04 -0400)] 
Tests: fix possible null pointer dereference

Reported by Coverity Scan
*** CID 1297896:  Null pointer dereferences  (NULL_RETURNS)
/tests/lib/test_ctf_writer.c: 865 in append_complex_event()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Check validity of returned ctf_type_id
Jérémie Galarneau [Wed, 13 May 2015 15:50:05 +0000 (11:50 -0400)] 
Fix: Check validity of returned ctf_type_id

Reported by Coverity Scan as
** CID 1297897:  Error handling issues  (CHECKED_RETURN)
/formats/ctf/ir/visitor.c: 726 in print_path()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoFix: Missing check that token linked-list is not NULL
Jérémie Galarneau [Tue, 12 May 2015 18:22:01 +0000 (14:22 -0400)] 
Fix: Missing check that token linked-list is not NULL

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: validate sequence length fields and variant tags of stream classes
Jérémie Galarneau [Mon, 11 May 2015 21:38:50 +0000 (17:38 -0400)] 
ir: validate sequence length fields and variant tags of stream classes

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: validate sequence length fields and variant tags of event classes
Jérémie Galarneau [Mon, 11 May 2015 21:37:59 +0000 (17:37 -0400)] 
ir: validate sequence length fields and variant tags of event classes

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: Implement a field type visitor to resolve dynamic scopes
Jérémie Galarneau [Mon, 11 May 2015 21:35:28 +0000 (17:35 -0400)] 
ir: Implement a field type visitor to resolve dynamic scopes

Implement a visitor looking for sequences' length field and variants'
tag names and resolve them to their proper type field in the trace.

Validate that sequence lengths are unsigned integers and variant
tags are enumerations and that both respect CTF's lexical and dynamic
scoping rules.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: only perform trace freeze if not already frozen
Jérémie Galarneau [Mon, 11 May 2015 21:34:06 +0000 (17:34 -0400)] 
ir: only perform trace freeze if not already frozen

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoClean-up: line exceeding 80 chars in trace.c
Jérémie Galarneau [Mon, 11 May 2015 21:33:25 +0000 (17:33 -0400)] 
Clean-up: line exceeding 80 chars in trace.c

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoDocs: add comment about bt_ctf_trace_add_stream_class validation
Jérémie Galarneau [Mon, 11 May 2015 21:32:36 +0000 (17:32 -0400)] 
Docs: add comment about bt_ctf_trace_add_stream_class validation

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add bt_ctf_field_type_variant_set_tag()
Jérémie Galarneau [Mon, 11 May 2015 21:31:06 +0000 (17:31 -0400)] 
ir: add bt_ctf_field_type_variant_set_tag()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add tag field path to variant field type
Jérémie Galarneau [Mon, 11 May 2015 21:29:53 +0000 (17:29 -0400)] 
ir: add tag field path to variant field type

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add length_field_path to sequence field type
Jérémie Galarneau [Mon, 11 May 2015 21:27:09 +0000 (17:27 -0400)] 
ir: add length_field_path to sequence field type

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add bt_ctf_field_path internal API
Jérémie Galarneau [Mon, 11 May 2015 21:24:24 +0000 (17:24 -0400)] 
ir: add bt_ctf_field_path internal API

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add bt_ctf_field_type_variant_get_field_name_index()
Jérémie Galarneau [Mon, 11 May 2015 21:22:27 +0000 (17:22 -0400)] 
ir: add bt_ctf_field_type_variant_get_field_name_index()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoir: add bt_ctf_field_type_structure_get_field_name_index()
Jérémie Galarneau [Mon, 11 May 2015 21:19:17 +0000 (17:19 -0400)] 
ir: add bt_ctf_field_type_structure_get_field_name_index()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agoClean-up: Missing space in event-types-internal.h
Jérémie Galarneau [Mon, 11 May 2015 20:02:04 +0000 (16:02 -0400)] 
Clean-up: Missing space in event-types-internal.h

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Updated available input formats on manpage
Glen Keane [Tue, 28 Apr 2015 18:34:07 +0000 (19:34 +0100)] 
Docs: Updated available input formats on manpage

Signed-off-by: Glen Keane <glenkeane.94@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add tests for bt_ctf_event_copy()
Philippe Proulx [Wed, 8 Apr 2015 00:04:47 +0000 (20:04 -0400)] 
ir: add tests for bt_ctf_event_copy()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: match .h names for get/set_header()
Philippe Proulx [Wed, 8 Apr 2015 00:03:55 +0000 (20:03 -0400)] 
Fix: ir: match .h names for get/set_header()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add bt_ctf_event_set_payload_field()
Jérémie Galarneau [Tue, 28 Apr 2015 19:35:07 +0000 (15:35 -0400)] 
ir: add bt_ctf_event_set_payload_field()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add bt_ctf_event_get_payload_field()
Philippe Proulx [Wed, 8 Apr 2015 00:03:31 +0000 (20:03 -0400)] 
ir: add bt_ctf_event_get_payload_field()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add bt_ctf_event_copy() (event deep copy)
Philippe Proulx [Tue, 7 Apr 2015 23:24:17 +0000 (19:24 -0400)] 
ir: add bt_ctf_event_copy() (event deep copy)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add tests for bt_ctf_field_copy()
Philippe Proulx [Sat, 21 Mar 2015 00:31:00 +0000 (20:31 -0400)] 
ir: add tests for bt_ctf_field_copy()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: make bt_ctf_field_copy() public
Philippe Proulx [Fri, 20 Mar 2015 18:04:21 +0000 (14:04 -0400)] 
ir: make bt_ctf_field_copy() public

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: copy struct/seq/array NULL fields
Philippe Proulx [Wed, 8 Apr 2015 00:02:50 +0000 (20:02 -0400)] 
Fix: ir: copy struct/seq/array NULL fields

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: incr ref of existing sequence/array field
Philippe Proulx [Tue, 7 Apr 2015 22:10:15 +0000 (18:10 -0400)] 
Fix: ir: incr ref of existing sequence/array field

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: return current variant's field if possible
Philippe Proulx [Thu, 2 Apr 2015 21:40:21 +0000 (17:40 -0400)] 
Fix: ir: return current variant's field if possible

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: seq copy: initialize internal array
Philippe Proulx [Sat, 21 Mar 2015 00:28:53 +0000 (20:28 -0400)] 
Fix: ir: seq copy: initialize internal array

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: bt_ctf_field_copy(): copy payload_set
Philippe Proulx [Sat, 21 Mar 2015 00:39:27 +0000 (20:39 -0400)] 
Fix: ir: bt_ctf_field_copy(): copy payload_set

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: Doxygen: note about frozen copy
Philippe Proulx [Fri, 20 Mar 2015 17:53:04 +0000 (13:53 -0400)] 
objects: Doxygen: note about frozen copy

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: weird phrasing in Babeltrace(1)
Jérémie Galarneau [Tue, 28 Apr 2015 15:33:30 +0000 (11:33 -0400)] 
Docs: weird phrasing in Babeltrace(1)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoReplace g_string_insert_len() by g_string_append_len()
Jérémie Galarneau [Mon, 20 Apr 2015 15:47:02 +0000 (11:47 -0400)] 
Replace g_string_insert_len() by g_string_append_len()

bt_ctf_field_string_append_len uses g_string_insert_len() with a
position of "-1" to append to the end of the string field's payload
which is what g_string_append_len() does by default.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd tests for bt_ctf_field_string_append_len()
Philippe Proulx [Wed, 15 Apr 2015 21:20:34 +0000 (17:20 -0400)] 
Add tests for bt_ctf_field_string_append_len()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add bt_ctf_field_string_append_len()
Philippe Proulx [Wed, 15 Apr 2015 21:20:25 +0000 (17:20 -0400)] 
ir: add bt_ctf_field_string_append_len()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd tests for bt_ctf_field_string_append()
Philippe Proulx [Wed, 15 Apr 2015 20:30:58 +0000 (16:30 -0400)] 
Add tests for bt_ctf_field_string_append()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add bt_ctf_field_string_append()
Philippe Proulx [Wed, 15 Apr 2015 20:18:34 +0000 (16:18 -0400)] 
ir: add bt_ctf_field_string_append()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: return event timestamp in _timestamp_at_pos
Antoine Busque [Thu, 16 Apr 2015 22:11:30 +0000 (18:11 -0400)] 
Fix: return event timestamp in _timestamp_at_pos

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: make sure "stream_id" attr is always right
Philippe Proulx [Mon, 13 Apr 2015 22:14:59 +0000 (18:14 -0400)] 
Fix: ir: make sure "stream_id" attr is always right

Make sure the "stream_id" attribute of all the event
classes of a given stream class is updated at the following
places:

  * user sets the stream class ID manually: calling
    bt_ctf_stream_class_set_id()
  * stream class ID is automatically set: in
    bt_ctf_trace_add_stream_class()
  * an event class is added to an existing stream
    class: in bt_ctf_stream_class_add_event_class()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: add environment field can be added after stream creation
Jérémie Galarneau [Thu, 9 Apr 2015 19:46:49 +0000 (15:46 -0400)] 
Tests: add environment field can be added after stream creation

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Allow the addition of environment fields to a frozen trace
Jérémie Galarneau [Thu, 9 Apr 2015 18:57:44 +0000 (14:57 -0400)] 
Fix: Allow the addition of environment fields to a frozen trace

Commit 7f800dc7 introduced a behavior change which made it
impossible to add environment fields to a frozen trace (after the
creation of a stream).

This fix makes it possible to add new fields to a trace's
environment while making it impossible to modify existing fields
hereby restoring CTF Writer's v1.2 behavior.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove unused trace environment types
Jérémie Galarneau [Thu, 9 Apr 2015 18:35:29 +0000 (14:35 -0400)] 
Cleanup: Remove unused trace environment types

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: introduce internal bt_ctf_trace_freeze()
Jérémie Galarneau [Thu, 9 Apr 2015 18:34:50 +0000 (14:34 -0400)] 
Cleanup: introduce internal bt_ctf_trace_freeze()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoMove bt_ctf_attributes API to internal headers
Jérémie Galarneau [Thu, 9 Apr 2015 15:45:10 +0000 (11:45 -0400)] 
Move bt_ctf_attributes API to internal headers

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRemove stale file from include/Makefile.am
Jérémie Galarneau [Fri, 20 Mar 2015 20:20:02 +0000 (16:20 -0400)] 
Remove stale file from include/Makefile.am

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: possible NULL pointer dereference in CTF Writer/IR tests
Jérémie Galarneau [Fri, 20 Mar 2015 20:17:07 +0000 (16:17 -0400)] 
Fix: possible NULL pointer dereference in CTF Writer/IR tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Ensure assertions have no side-effect
Jérémie Galarneau [Fri, 20 Mar 2015 20:08:55 +0000 (16:08 -0400)] 
Fix: Ensure assertions have no side-effect

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Uninitialized return value in bt_ctf_event_class_get_id
Jérémie Galarneau [Fri, 20 Mar 2015 19:05:28 +0000 (15:05 -0400)] 
Fix: Uninitialized return value in bt_ctf_event_class_get_id

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add tests for bt_ctf_event's stream accessor
Jérémie Galarneau [Fri, 20 Mar 2015 02:35:23 +0000 (22:35 -0400)] 
ir: add tests for bt_ctf_event's stream accessor

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add tests for bt_ctf_stream_class trace accessor
Jérémie Galarneau [Fri, 20 Mar 2015 02:21:51 +0000 (22:21 -0400)] 
ir: add tests for bt_ctf_stream_class trace accessor

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add trace accessor to bt_ctf_stream_class
Jérémie Galarneau [Fri, 20 Mar 2015 02:12:06 +0000 (22:12 -0400)] 
ir: add trace accessor to bt_ctf_stream_class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add stream accessor to bt_ctf_event
Jérémie Galarneau [Fri, 20 Mar 2015 02:10:47 +0000 (22:10 -0400)] 
ir: add stream accessor to bt_ctf_event

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: remove unused bt_ctf_stream_set_trace function
Jérémie Galarneau [Fri, 20 Mar 2015 01:43:24 +0000 (21:43 -0400)] 
Cleanup: remove unused bt_ctf_stream_set_trace function

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add weak reference to parent trace to bt_ctf_stream_class
Jérémie Galarneau [Fri, 20 Mar 2015 01:43:00 +0000 (21:43 -0400)] 
ir: add weak reference to parent trace to bt_ctf_stream_class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add weak reference to parent stream to bt_ctf_event
Jérémie Galarneau [Fri, 20 Mar 2015 01:41:29 +0000 (21:41 -0400)] 
ir: add weak reference to parent stream to bt_ctf_event

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add tests for duplicate event classes
Philippe Proulx [Thu, 19 Mar 2015 19:09:28 +0000 (15:09 -0400)] 
ir: add tests for duplicate event classes

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: ir: make duplicate event classes check smarter
Philippe Proulx [Thu, 19 Mar 2015 19:07:32 +0000 (15:07 -0400)] 
Fix: ir: make duplicate event classes check smarter

This patch makes bt_ctf_stream_class_add_event_class()
compare not only event classes pointers when checking
for duplicate, but also equal names and equal IDs.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add tests for event class attributes
Philippe Proulx [Thu, 19 Mar 2015 17:40:17 +0000 (13:40 -0400)] 
ir: add tests for event class attributes

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: add attributes support to event classes
Philippe Proulx [Thu, 19 Mar 2015 07:43:00 +0000 (03:43 -0400)] 
ir: add attributes support to event classes

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoir: make trace environment use bt_object
Philippe Proulx [Thu, 19 Mar 2015 07:54:10 +0000 (03:54 -0400)] 
ir: make trace environment use bt_object

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: Doxygen: bt_object_type: minor fix
Philippe Proulx [Thu, 19 Mar 2015 05:07:32 +0000 (01:07 -0400)] 
objects: Doxygen: bt_object_type: minor fix

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: optimize loops by using i instead of x
Philippe Proulx [Thu, 19 Mar 2015 04:33:07 +0000 (00:33 -0400)] 
objects: optimize loops by using i instead of x

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: Doxygen: add cross-references
Philippe Proulx [Thu, 19 Mar 2015 04:25:42 +0000 (00:25 -0400)] 
objects: Doxygen: add cross-references

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: Doxygen: more details on bt_object_null
Philippe Proulx [Thu, 19 Mar 2015 03:59:58 +0000 (23:59 -0400)] 
objects: Doxygen: more details on bt_object_null

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: add bt_object_freeze() and more statuses
Philippe Proulx [Thu, 19 Mar 2015 02:12:19 +0000 (22:12 -0400)] 
objects: add bt_object_freeze() and more statuses

This patch adds the possibility to freeze an object.
By doing this, it introduces a new status code,
BT_OBJECT_STATUS_FROZEN, which is returned when trying
to alter a frozen object. Thus, all functions returning
either 0 or -1 are modified to return an
enum bt_object_status value instead.

The status code BT_OBJECT_STATUS_INVAL is also introduced
to signal invalid arguments, to differentiate this error
from other errors.

Finally, this patch adapts the objects tests and the
documentation to the changes.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: make static functions also inline
Philippe Proulx [Wed, 18 Mar 2015 16:38:20 +0000 (12:38 -0400)] 
objects: make static functions also inline

This makes GCC mask the "unused function" warning.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: Doxygen: \i -> \em
Philippe Proulx [Tue, 17 Mar 2015 21:20:23 +0000 (17:20 -0400)] 
objects: Doxygen: \i -> \em

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects: introduce enum bt_object_status
Philippe Proulx [Tue, 17 Mar 2015 21:19:56 +0000 (17:19 -0400)] 
objects: introduce enum bt_object_status

Those new statuses make it possible for
bt_object_map_foreach() to report if its loop was
cancelled by the user function or if a general error
occured.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoobjects tests: bt_object_array_set()
Philippe Proulx [Thu, 19 Mar 2015 18:12:04 +0000 (14:12 -0400)] 
objects tests: bt_object_array_set()

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.041106 seconds and 4 git commands to generate.