babeltrace.git
9 years agoAllow unset tags on variant field types
Jérémie Galarneau [Wed, 4 Mar 2015 23:13:57 +0000 (18:13 -0500)] 
Allow unset tags on variant field types

This allows the creation of a variant while not specifying the variant's
tag's name and type which is needed to support untagged variants.

This will allow the support of constructs such as:
variant name {
    field_type sel1;
    field_type sel2;
    field_type sel3;
    /* ... */
};

struct {
    enum : integer_type { sel1, sel2, sel3, /* ... */ } tag_field;
    /* ... */
    variant name <tag_field> v;
}

The validation of variant fields thus becomes optional and will
be implemented as part of the freeze() of variants in a later commit.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoUpdate version to 1.3.0
Jérémie Galarneau [Fri, 13 Mar 2015 19:56:13 +0000 (15:56 -0400)] 
Update version to 1.3.0

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Ensure stream endianness is set when initializing event class
Jérémie Galarneau [Fri, 13 Mar 2015 05:09:20 +0000 (01:09 -0400)] 
Fix: Ensure stream endianness is set when initializing event class

This fixes a problem encountered by perf-to-ctf which would cause
an assert to hit whenever an event was instanciated before its
stream class was added to the trace.

This would cause the stream class to set its events' "native"
byte order with the "unknown endianness" value.

This modification ensures that an event's native endianness is
either set on addition to a stream class (when the stream is
already paired to a trace) or when the stream is added to a
trace.

Reported-by: Wang Nan <wangnan0@huawei.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Check stream fd value before closing
Jérémie Galarneau [Fri, 13 Mar 2015 05:07:43 +0000 (01:07 -0400)] 
Fix: Check stream fd value before closing

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: missing allocation error check
Jérémie Galarneau [Fri, 13 Mar 2015 05:07:11 +0000 (01:07 -0400)] 
Fix: missing allocation error check

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFreeze event classes as they are added to a stream class
Jérémie Galarneau [Fri, 13 Mar 2015 05:06:03 +0000 (01:06 -0400)] 
Freeze event classes as they are added to a stream class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: ensure that an event may be instanciated before its stream
Jérémie Galarneau [Fri, 13 Mar 2015 01:21:42 +0000 (21:21 -0400)] 
Tests: ensure that an event may be instanciated before its stream

This test covers a regression which breaks the perf-to-ctf tool.
See https://lkml.org/lkml/2015/3/12/256

Reported-by: Wang Nan <wangnan0@huawei.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: event class must have a stream class before events may be created
Jérémie Galarneau [Fri, 13 Mar 2015 01:20:53 +0000 (21:20 -0400)] 
Docs: event class must have a stream class before events may be created

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing stdint.h in trace.h
Jérémie Galarneau [Fri, 13 Mar 2015 00:04:59 +0000 (20:04 -0400)] 
Fix: Missing stdint.h in trace.h

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing stdint.h in stream.h
Jérémie Galarneau [Fri, 13 Mar 2015 00:04:13 +0000 (20:04 -0400)] 
Fix: Missing stdint.h in stream.h

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing stdint.h in stream-class.h
Jérémie Galarneau [Tue, 10 Mar 2015 14:40:17 +0000 (10:40 -0400)] 
Fix: Missing stdint.h in stream-class.h

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix out-of-tree build for Python bindings + doc
Philippe Proulx [Fri, 20 Feb 2015 00:31:53 +0000 (19:31 -0500)] 
Fix out-of-tree build for Python bindings + doc

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add tests for trace environment field accessors
Jérémie Galarneau [Mon, 2 Mar 2015 04:02:33 +0000 (23:02 -0500)] 
Tests: Add tests for trace environment field accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd trace environment field getters
Jérémie Galarneau [Mon, 2 Mar 2015 02:03:10 +0000 (21:03 -0500)] 
Add trace environment field getters

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoSupport the addition of integer trace environment fields
Jérémie Galarneau [Mon, 2 Mar 2015 01:47:33 +0000 (20:47 -0500)] 
Support the addition of integer trace environment fields

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCTF-IR: Support unnamed streams
Jérémie Galarneau [Fri, 27 Feb 2015 18:00:07 +0000 (13:00 -0500)] 
CTF-IR: Support unnamed streams

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: out-of-tree dist fails to find test traces
Jérémie Galarneau [Fri, 20 Feb 2015 20:29:56 +0000 (15:29 -0500)] 
Fix: out-of-tree dist fails to find test traces

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix running tests out of tree
Simon Marchi [Sat, 14 Feb 2015 18:49:38 +0000 (13:49 -0500)] 
Fix running tests out of tree

When building out of tree, make check fails because the "tests" file is
not found.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: add Sphinx doc project
Philippe Proulx [Sat, 6 Dec 2014 01:53:34 +0000 (20:53 -0500)] 
Python: add Sphinx doc project

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: writer.IntegerBase: remove redundant prefixes
Philippe Proulx [Wed, 10 Dec 2014 22:39:01 +0000 (17:39 -0500)] 
Python: writer.IntegerBase: remove redundant prefixes

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: add reader.IntegerFieldDeclaration.size
Philippe Proulx [Wed, 10 Dec 2014 21:32:01 +0000 (16:32 -0500)] 
Python: add reader.IntegerFieldDeclaration.size

The CTF specifications use "size" rather than "length"
for an integer type, and on the Python side,
babeltrace.writer.IntegerFieldDeclaration.size is used.

babeltrace.reader.IntegerFieldDeclaration.length is
kept here for backward compatibility reasons.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.Writer
Philippe Proulx [Wed, 10 Dec 2014 18:42:21 +0000 (13:42 -0500)] 
Python: document writer.Writer

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.Stream
Philippe Proulx [Wed, 10 Dec 2014 18:34:51 +0000 (13:34 -0500)] 
Python: document writer.Stream

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.StreamClass
Philippe Proulx [Tue, 16 Dec 2014 23:12:52 +0000 (18:12 -0500)] 
Python: document writer.StreamClass

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.Event
Philippe Proulx [Wed, 10 Dec 2014 18:25:07 +0000 (13:25 -0500)] 
Python: document writer.Event

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.EventClass
Philippe Proulx [Tue, 16 Dec 2014 23:11:06 +0000 (18:11 -0500)] 
Python: document writer.EventClass

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.StringField
Philippe Proulx [Wed, 10 Dec 2014 18:16:10 +0000 (13:16 -0500)] 
Python: document writer.StringField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.SequenceField
Philippe Proulx [Wed, 10 Dec 2014 18:14:41 +0000 (13:14 -0500)] 
Python: document writer.SequenceField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.ArrayField
Philippe Proulx [Wed, 10 Dec 2014 17:16:14 +0000 (12:16 -0500)] 
Python: document writer.ArrayField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.VariantField
Philippe Proulx [Wed, 10 Dec 2014 17:18:14 +0000 (12:18 -0500)] 
Python: document writer.VariantField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.StructureField
Philippe Proulx [Wed, 10 Dec 2014 17:17:49 +0000 (12:17 -0500)] 
Python: document writer.StructureField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.FloatingPointField
Philippe Proulx [Wed, 10 Dec 2014 17:15:01 +0000 (12:15 -0500)] 
Python: document writer.FloatingPointField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.EnumerationField
Philippe Proulx [Wed, 10 Dec 2014 09:31:43 +0000 (04:31 -0500)] 
Python: document writer.EnumerationField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.IntegerField
Philippe Proulx [Wed, 10 Dec 2014 09:28:16 +0000 (04:28 -0500)] 
Python: document writer.IntegerField

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.Field
Philippe Proulx [Wed, 10 Dec 2014 09:24:45 +0000 (04:24 -0500)] 
Python: document writer.Field

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.StringFieldDeclaration
Philippe Proulx [Wed, 10 Dec 2014 09:17:40 +0000 (04:17 -0500)] 
Python: document writer.StringFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.SequenceFieldDeclaration
Philippe Proulx [Tue, 16 Dec 2014 23:08:46 +0000 (18:08 -0500)] 
Python: document writer.SequenceFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.ArrayFieldDeclaration
Philippe Proulx [Wed, 10 Dec 2014 03:09:47 +0000 (22:09 -0500)] 
Python: document writer.ArrayFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.VariantFieldDeclaration
Philippe Proulx [Wed, 10 Dec 2014 02:58:26 +0000 (21:58 -0500)] 
Python: document writer.VariantFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.StructureFieldDeclaration
Philippe Proulx [Wed, 10 Dec 2014 01:27:27 +0000 (20:27 -0500)] 
Python: document writer.StructureFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.FloatingPointFieldDeclaration
Philippe Proulx [Wed, 10 Dec 2014 01:20:43 +0000 (20:20 -0500)] 
Python: document writer.FloatingPointFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPytnon: document writer.EnumerationFieldDeclaration
Philippe Proulx [Tue, 16 Dec 2014 23:06:43 +0000 (18:06 -0500)] 
Pytnon: document writer.EnumerationFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.IntegerFieldDeclaration
Philippe Proulx [Tue, 16 Dec 2014 23:05:40 +0000 (18:05 -0500)] 
Python: document writer.IntegerFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: add top-level class writer.IntegerBase
Philippe Proulx [Wed, 10 Dec 2014 00:54:50 +0000 (19:54 -0500)] 
Python: add top-level class writer.IntegerBase

Documenting, and using in general, top-level classes
is easier than nested classes in Python.
babeltrace.writer.FieldDeclaration.IntegerBase still
exists for backward compatibility.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.FieldDeclaration
Philippe Proulx [Tue, 16 Dec 2014 22:48:20 +0000 (17:48 -0500)] 
Python: document writer.FieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.Clock
Philippe Proulx [Wed, 10 Dec 2014 00:44:59 +0000 (19:44 -0500)] 
Python: document writer.Clock

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document writer.EnumerationMapping
Philippe Proulx [Wed, 10 Dec 2014 00:34:41 +0000 (19:34 -0500)] 
Python: document writer.EnumerationMapping

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: examples: import explicit BT modules
Philippe Proulx [Tue, 9 Dec 2014 23:51:25 +0000 (18:51 -0500)] 
Python: examples: import explicit BT modules

The best practice in Python is generally to import
explicit modules rather than importing all its exposed
members.

This also makes the examples hide the fact that
reader/writer members are exposed directly by the package,
whereas this is only a backward compatibility layer now.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: split API in reader/writer modules
Philippe Proulx [Tue, 9 Dec 2014 23:01:07 +0000 (18:01 -0500)] 
Python: split API in reader/writer modules

babeltrace package's modules are now:

  common:
    class CTFStringEncoding
    class ByteOrder
    class CTFTypeId
    class CTFScope
  reader: everything related to reading
  writer: CTF writer API

Backward compatibility is ensured by importing the
appropriate modules into the package itself.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document IntegerFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:33:03 +0000 (16:33 -0500)] 
Python: document IntegerFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document VariantFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:49:30 +0000 (16:49 -0500)] 
Python: document VariantFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document StringFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:49:12 +0000 (16:49 -0500)] 
Python: document StringFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document StructureFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:48:56 +0000 (16:48 -0500)] 
Python: document StructureFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document FloatFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:48:30 +0000 (16:48 -0500)] 
Python: document FloatFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document SequenceFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:39:13 +0000 (16:39 -0500)] 
Python: document SequenceFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document ArrayFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:37:57 +0000 (16:37 -0500)] 
Python: document ArrayFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document EnumerationFieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:37:43 +0000 (16:37 -0500)] 
Python: document EnumerationFieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document FieldDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:29:12 +0000 (16:29 -0500)] 
Python: document FieldDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document EventDeclaration
Philippe Proulx [Sat, 6 Dec 2014 21:18:27 +0000 (16:18 -0500)] 
Python: document EventDeclaration

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document FieldError
Philippe Proulx [Sat, 6 Dec 2014 19:48:54 +0000 (14:48 -0500)] 
Python: document FieldError

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document Event
Philippe Proulx [Sat, 6 Dec 2014 01:51:46 +0000 (20:51 -0500)] 
Python: document Event

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document CTFScope
Philippe Proulx [Sat, 6 Dec 2014 01:51:30 +0000 (20:51 -0500)] 
Python: document CTFScope

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document CTFTypeId
Philippe Proulx [Sat, 6 Dec 2014 01:10:01 +0000 (20:10 -0500)] 
Python: document CTFTypeId

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document ByteOrder
Philippe Proulx [Sat, 6 Dec 2014 01:03:40 +0000 (20:03 -0500)] 
Python: document ByteOrder

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document CTFStringEncoding
Philippe Proulx [Sat, 6 Dec 2014 01:03:20 +0000 (20:03 -0500)] 
Python: document CTFStringEncoding

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document TraceHandle
Philippe Proulx [Sat, 6 Dec 2014 00:51:10 +0000 (19:51 -0500)] 
Python: document TraceHandle

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoRemove print_format_list Python function
Jérémie Galarneau [Fri, 13 Feb 2015 21:16:18 +0000 (16:16 -0500)] 
Remove print_format_list Python function

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: document TraceCollection
Philippe Proulx [Sat, 6 Dec 2014 00:23:05 +0000 (19:23 -0500)] 
Python: document TraceCollection

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: CTFWriter: forbid Stream.__init__()
Philippe Proulx [Tue, 9 Dec 2014 00:02:13 +0000 (19:02 -0500)] 
Python: CTFWriter: forbid Stream.__init__()

In the CTF writer API, a Stream object may only
be created using Writer.create_stream(), therefore
rendering Stream.__init__() useless for the user,
since the resulting object is not, and cannot, be
associated with a Writer object.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: CTFWriter: add FloatingPointFieldDeclaration
Philippe Proulx [Tue, 9 Dec 2014 00:28:10 +0000 (19:28 -0500)] 
Python: CTFWriter: add FloatingPointFieldDeclaration

This class is added in order to keep the API
consistent, as there is a FloatingPointField class.
It inherits FloatFieldDeclaration so that the API is
not broken.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: CTFWriter: FloatFieldingPoint -> FloatingPointField
Philippe Proulx [Mon, 8 Dec 2014 22:27:20 +0000 (17:27 -0500)] 
Python: CTFWriter: FloatFieldingPoint -> FloatingPointField

Human error. Since CTFWriter.FloatFieldingPoint is
publicly exposed, we keep it there, making it inherit from
CTFWriter.FloatingPointField.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: bt: do not expose ClockType
Philippe Proulx [Sat, 6 Dec 2014 00:42:06 +0000 (19:42 -0500)] 
Python: bt: do not expose ClockType

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: remove useless 'return None'
Philippe Proulx [Fri, 5 Dec 2014 02:35:31 +0000 (21:35 -0500)] 
Python: remove useless 'return None'

A Python function's default return value is None already.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: bt.py: PEP 8 + improve readability
Philippe Proulx [Fri, 5 Dec 2014 02:32:44 +0000 (21:32 -0500)] 
Python: bt.py: PEP 8 + improve readability

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: remove explicit inheritance from object
Philippe Proulx [Fri, 5 Dec 2014 01:34:25 +0000 (20:34 -0500)] 
Python: remove explicit inheritance from object

This is a Python 3 binding, and all classes are new-style
classes in Python 3, so there is no need to inherit from object
explicitly.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPython: decouple Python iface from native binding
Philippe Proulx [Thu, 12 Feb 2015 19:56:52 +0000 (14:56 -0500)] 
Python: decouple Python iface from native binding

With this patch, all the SWIG stuff is isolated into
nativebt.i, whereas the real Babeltrace Python interface
is plain Python in bt.py.

The Babeltrace Python binding is now a Python package, but
backward compatibility with the original module is ensured
by importing all public symbols from the bt module in the
package itself (__init__.py), which is named like the
original module, babeltrace.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoPopulate event header from mapped timestamp clock
Jérémie Galarneau [Fri, 13 Feb 2015 01:53:51 +0000 (20:53 -0500)] 
Populate event header from mapped timestamp clock

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoMap default event header timestamp field to the stream class' clock
Jérémie Galarneau [Fri, 13 Feb 2015 01:12:44 +0000 (20:12 -0500)] 
Map default event header timestamp field to the stream class' clock

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: erroneous use of semicolon instead of comma in TSDL serialization
Jérémie Galarneau [Fri, 13 Feb 2015 01:12:12 +0000 (20:12 -0500)] 
Fix: erroneous use of semicolon instead of comma in TSDL serialization

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Don't freeze field type on addition to structure
Jérémie Galarneau [Fri, 13 Feb 2015 01:11:37 +0000 (20:11 -0500)] 
Fix: Don't freeze field type on addition to structure

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: fix misleading comment
Jérémie Galarneau [Thu, 12 Feb 2015 20:51:49 +0000 (15:51 -0500)] 
Tests: fix misleading comment

The test only validates that the event header's default field are
as documented in the API's documentation.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCTF-Writer tests: Delete trace after test
Jérémie Galarneau [Thu, 12 Feb 2015 20:50:42 +0000 (15:50 -0500)] 
CTF-Writer tests: Delete trace after test

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd support for clock mapping on integer field type
Jérémie Galarneau [Thu, 12 Feb 2015 20:39:24 +0000 (15:39 -0500)] 
Add support for clock mapping on integer field type

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: fix bt_ctf_clock_get_offset function header
Jérémie Galarneau [Thu, 12 Feb 2015 20:34:10 +0000 (15:34 -0500)] 
Docs: fix bt_ctf_clock_get_offset function header

The function header refers to the function as bt_ctf_clocl_get_offset_s.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoctf-ir: allow 1-bit signed integer types
Philippe Proulx [Wed, 11 Feb 2015 16:36:18 +0000 (11:36 -0500)] 
ctf-ir: allow 1-bit signed integer types

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoctf-ir: disallow creating a 0-bit integer type
Philippe Proulx [Wed, 11 Feb 2015 16:35:59 +0000 (11:35 -0500)] 
ctf-ir: disallow creating a 0-bit integer type

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: missing paragraph in python bindings license (MIT)
Julien Desfossez [Tue, 3 Feb 2015 17:05:41 +0000 (12:05 -0500)] 
Fix: missing paragraph in python bindings license (MIT)

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add event packet header accessors test
Jérémie Galarneau [Wed, 4 Feb 2015 20:56:26 +0000 (15:56 -0500)] 
Tests: Add event packet header accessors test

9 years agoTests: Don't use diag() to output errors from child processes
Jérémie Galarneau [Wed, 4 Feb 2015 20:55:07 +0000 (15:55 -0500)] 
Tests: Don't use diag() to output errors from child processes

diag() appends a newline character to the child processes' output
which causes the test's output to have extra blank lines.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: line over 80 chars
Jérémie Galarneau [Wed, 4 Feb 2015 20:53:22 +0000 (15:53 -0500)] 
Cleanup: line over 80 chars

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd support for custom event headers
Jérémie Galarneau [Wed, 4 Feb 2015 20:52:39 +0000 (15:52 -0500)] 
Add support for custom event headers

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Use a switch case instead of conditionals
Jérémie Galarneau [Wed, 4 Feb 2015 20:43:39 +0000 (15:43 -0500)] 
Cleanup: Use a switch case instead of conditionals

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Field types native byte order refers to the trace
Jérémie Galarneau [Wed, 4 Feb 2015 20:38:06 +0000 (15:38 -0500)] 
Fix: Field types native byte order refers to the trace

Following a misunderstanding of the CTF specification, the native
byte order was implemented as meaning the host's endianness. It should
refer to the Trace's endianness.

This modification ensures that stream classes, event classes and field
types correctly inherit the trace's endianness when "native" is used.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: duplicate function declaration in stream.h
Jérémie Galarneau [Fri, 16 Jan 2015 17:49:06 +0000 (12:49 -0500)] 
Fix: duplicate function declaration in stream.h

bt_ctf_stream_set_event_context() should be
bt_ctf_stream_set_event_header().

Fixes #874

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTest: Add a test that validates that empty streams are valid
Jérémie Galarneau [Wed, 28 Jan 2015 22:31:38 +0000 (17:31 -0500)] 
Test: Add a test that validates that empty streams are valid

Empty streams should be backed by a file of size 0 and be readable
by a CTF reader. This test validates that the problem described in
28362f2b is fixed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: lazy-mmap() streams when flushing
Jérémie Galarneau [Wed, 28 Jan 2015 22:07:35 +0000 (17:07 -0500)] 
Fix: lazy-mmap() streams when flushing

This fixes an issue when empty streams are created as the stream
creation will mmap() the file in preparation for the first event.

This results in "empty" stream files ending up with a non-zero size
which is invalid since no packet headers are found by the reader.

This change ensures that stream files are only mmap'ed on the first
stream flush and that empty streams are stored as size-0 files.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: lock stream class after assigning stream id
Jérémie Galarneau [Wed, 28 Jan 2015 21:52:28 +0000 (16:52 -0500)] 
Fix: lock stream class after assigning stream id

Fixes a bug that was introduced by 2f100782 which made it possible
to set custom stream class IDs.

The stream class is frozen when a stream of its type is instanciated.
However, the trace or writer must still assign a unique ID to the stream
class if none were set prior. This modification moves the stream class
locking (freeze) after the ID assignment check.

Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: handle 64-bit trace IDs on 32-bit systems
Mathieu Desnoyers [Mon, 26 Jan 2015 22:29:26 +0000 (17:29 -0500)] 
Fix: handle 64-bit trace IDs on 32-bit systems

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoFix: print format type mismatch warnings on 32-bit
Mathieu Desnoyers [Mon, 26 Jan 2015 22:08:08 +0000 (17:08 -0500)] 
Fix: print format type mismatch warnings on 32-bit

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoAdd utility function to validate CTF identifiers
Jérémie Galarneau [Fri, 23 Jan 2015 21:24:52 +0000 (16:24 -0500)] 
Add utility function to validate CTF identifiers

Introduces bt_ctf_validate_identifier() which validates a given
identifier against the list of CTF reserved keywords.

This function may evolve to perform additional validity checks in
the future as the CTF specification moves forward.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.041076 seconds and 4 git commands to generate.