deliverable/babeltrace.git
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>
9 years agoRevert "Add event header accessors and support for custom event headers"
Jérémie Galarneau [Fri, 23 Jan 2015 19:33:01 +0000 (14:33 -0500)] 
Revert "Add event header accessors and support for custom event headers"

This reverts commit 9f476966aa40bd0de2cd0654623ea03f8a3254eb.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: missing parenthesis in offset_align_floor
Mathieu Desnoyers [Fri, 16 Jan 2015 16:30:44 +0000 (11:30 -0500)] 
Fix: missing parenthesis in offset_align_floor

Is currently unused. Triggers a compile error when used.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoAdd event header accessors and support for custom event headers
Jérémie Galarneau [Fri, 9 Jan 2015 16:00:44 +0000 (11:00 -0500)] 
Add event header accessors and support for custom event headers

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add tests for stream class accessor
Jérémie Galarneau [Tue, 6 Jan 2015 22:43:52 +0000 (17:43 -0500)] 
Tests: Add tests for stream class accessor

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd missing stream class accessor
Jérémie Galarneau [Tue, 6 Jan 2015 22:38:58 +0000 (17:38 -0500)] 
Add missing stream class accessor

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Typo in bt_ctf_field_type_integer_create's documentation
Jérémie Galarneau [Tue, 6 Jan 2015 21:39:37 +0000 (16:39 -0500)] 
Cleanup: Typo in bt_ctf_field_type_integer_create's documentation

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add tests for trace packet header accessors
Jérémie Galarneau [Tue, 6 Jan 2015 21:45:34 +0000 (16:45 -0500)] 
Tests: Add tests for trace packet header accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd stream packet header accessors
Jérémie Galarneau [Tue, 6 Jan 2015 22:17:57 +0000 (17:17 -0500)] 
Add stream packet header accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd trace packet header accessors and support custom headers
Jérémie Galarneau [Thu, 18 Dec 2014 18:01:23 +0000 (13:01 -0500)] 
Add trace packet header accessors and support custom headers

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Only allow setting a stream class when not frozen
Jérémie Galarneau [Thu, 18 Dec 2014 18:01:03 +0000 (13:01 -0500)] 
Fix: Only allow setting a stream class when not frozen

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: allow empty CTF files
Mathieu Desnoyers [Mon, 5 Jan 2015 02:17:30 +0000 (21:17 -0500)] 
Fix: allow empty CTF files

There are expected situtations in which CTF producers (like LTTng) can
generate empty CTF trace files. The current babeltrace behavior is to
trigger an error when an empty file is encountered. Change this to allow
reading the rest of the trace anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 years agoRevert test fix: uncomment trace unlink
Jérémie Galarneau [Wed, 17 Dec 2014 20:37:21 +0000 (15:37 -0500)] 
Revert test fix: uncomment trace unlink

8c627304e5adb715ef3d359ac24febab2bb279b3 introduced changes that
were unintended, namely commenting the trace unlinking in the
CTFWriter test suite.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests fix: Unchecked return value
Jérémie Galarneau [Wed, 17 Dec 2014 20:26:08 +0000 (15:26 -0500)] 
Tests fix: Unchecked return value

Reported by Coverity
** CID 1258705:  Unchecked return value  (CHECKED_RETURN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add event context accessors unit tests
Jérémie Galarneau [Tue, 16 Dec 2014 23:18:25 +0000 (18:18 -0500)] 
Tests: Add event context accessors unit tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Indicate that stream event context is sampled on event append
Jérémie Galarneau [Tue, 16 Dec 2014 22:47:15 +0000 (17:47 -0500)] 
Docs: Indicate that stream event context is sampled on event append

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd event context accessors
Jérémie Galarneau [Tue, 16 Dec 2014 22:27:05 +0000 (17:27 -0500)] 
Add event context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Remove extra underscore from function header
Jérémie Galarneau [Tue, 16 Dec 2014 20:47:06 +0000 (15:47 -0500)] 
Docs: Remove extra underscore from function header

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Check integer signedness in packet header when auto-populating
Jérémie Galarneau [Mon, 15 Dec 2014 20:15:41 +0000 (15:15 -0500)] 
Fix: Check integer signedness in packet header when auto-populating

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoDocs: Add a comment about event validation in bt_ctf_stream_append_event
Jérémie Galarneau [Mon, 15 Dec 2014 00:29:17 +0000 (19:29 -0500)] 
Docs: Add a comment about event validation in bt_ctf_stream_append_event

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Misplaced end label in bt_ctf_stream_get_packet_context
Jérémie Galarneau [Sun, 14 Dec 2014 23:34:47 +0000 (18:34 -0500)] 
Cleanup: Misplaced end label in bt_ctf_stream_get_packet_context

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add unit tests for stream event context accessors
Jérémie Galarneau [Thu, 11 Dec 2014 23:57:36 +0000 (18:57 -0500)] 
Tests: Add unit tests for stream event context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd stream_event_context accessors
Jérémie Galarneau [Wed, 10 Dec 2014 00:05:47 +0000 (19:05 -0500)] 
Add stream_event_context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoCleanup: Remove unnecessary argument name
Jérémie Galarneau [Fri, 12 Dec 2014 14:35:46 +0000 (09:35 -0500)] 
Cleanup: Remove unnecessary argument name

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoTests: Add unit tests for stream event context accessors
Jérémie Galarneau [Thu, 11 Dec 2014 23:57:36 +0000 (18:57 -0500)] 
Tests: Add unit tests for stream event context accessors

9 years agoCleanup: Missing whitespace in comment
Jérémie Galarneau [Wed, 10 Dec 2014 20:33:01 +0000 (15:33 -0500)] 
Cleanup: Missing whitespace in comment

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Only allow setting a packet context on a non-frozen stream class
Jérémie Galarneau [Wed, 10 Dec 2014 20:32:29 +0000 (15:32 -0500)] 
Fix: Only allow setting a packet context on a non-frozen stream class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd stream_event_context accessors
Jérémie Galarneau [Wed, 10 Dec 2014 00:05:47 +0000 (19:05 -0500)] 
Add stream_event_context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoImplement bt_ctf_field deep copy
Jérémie Galarneau [Sat, 13 Dec 2014 03:25:10 +0000 (22:25 -0500)] 
Implement bt_ctf_field deep copy

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Incorrect variant tag validation
Jérémie Galarneau [Fri, 12 Dec 2014 04:01:30 +0000 (23:01 -0500)] 
Fix: Incorrect variant tag validation

An erroneous tag validation causes bt_ctf_field_variant_get_field() to
fail when called a second time on a given variant field.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Missing description NULL check in bt_ctf_clock when serializing
Jérémie Galarneau [Wed, 10 Dec 2014 22:10:11 +0000 (17:10 -0500)] 
Fix: Missing description NULL check in bt_ctf_clock when serializing

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: Ensure a packet context is a structure
Jérémie Galarneau [Wed, 10 Dec 2014 00:03:28 +0000 (19:03 -0500)] 
Fix: Ensure a packet context is a structure

bt_ctf_stream_class_set_packet_context_type was checking the current
stream packet context's type instead of the one being passed.

Added a test to validate that the check is done appropriately.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoAdd comment indicating the type of ctf_traces' elements
Jérémie Galarneau [Sun, 23 Nov 2014 18:13:31 +0000 (13:13 -0500)] 
Add comment indicating the type of ctf_traces' elements

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: sanity check in iterator creation
Julien Desfossez [Tue, 18 Nov 2014 17:52:32 +0000 (12:52 -0500)] 
Fix: sanity check in iterator creation

This function is part of the public API; we need more
sanity checks before using the structures provided by the caller.

Refs: #827

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 years agoFix: iterate manually over each live trace to add to catch errors
Julien Desfossez [Tue, 18 Nov 2014 17:52:31 +0000 (12:52 -0500)] 
Fix: iterate manually over each live trace to add to catch errors

Instead of using g_hash_table_foreach, we now control the iteration over
the hash table, so we can handle properly the errors.
For now, if there is an error for any trace, we consider this a fatal
issue and exit.

We could allow the process to continue and only skip the problematic
traces, but we will wait until this becomes a real use-case.

Fixes: #827
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoRemove duplicate include of unistd in test_ctf_writer
Christian Babeux [Fri, 7 Nov 2014 15:20:28 +0000 (10:20 -0500)] 
Remove duplicate include of unistd in test_ctf_writer

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
10 years agoFix: make sure we can exit the get_new_metadata loop
Julien Desfossez [Fri, 31 Oct 2014 19:18:00 +0000 (15:18 -0400)] 
Fix: make sure we can exit the get_new_metadata loop

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
10 years agoFix: respect signed integers' length when printing in hex base
Jérémie Galarneau [Tue, 28 Oct 2014 16:33:15 +0000 (12:33 -0400)] 
Fix: respect signed integers' length when printing in hex base

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

Fixes #848

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoEnsure types used for index and count in CTF IR API match
Jérémie Galarneau [Mon, 20 Oct 2014 20:03:31 +0000 (16:03 -0400)] 
Ensure types used for index and count in CTF IR API match

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

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoCleanup: Missing space after cast operator
Jérémie Galarneau [Mon, 20 Oct 2014 20:00:34 +0000 (16:00 -0400)] 
Cleanup: Missing space after cast operator

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoTests: add tests for the new trace and trace clock accessors
Jérémie Galarneau [Mon, 20 Oct 2014 19:01:01 +0000 (15:01 -0400)] 
Tests: add tests for the new trace and trace clock accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd trace accessor to CTF Writer
Jérémie Galarneau [Mon, 20 Oct 2014 18:36:45 +0000 (14:36 -0400)] 
Add trace accessor to CTF Writer

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd clock accessor to CTF IR Trace
Jérémie Galarneau [Mon, 20 Oct 2014 17:39:46 +0000 (13:39 -0400)] 
Add clock accessor to CTF IR Trace

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoReuse existing g_string instance when setting a clock name
Jérémie Galarneau [Mon, 20 Oct 2014 17:41:51 +0000 (13:41 -0400)] 
Reuse existing g_string instance when setting a clock name

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoDon't automatically generate a clock UUID in _bt_ctf_clock_create
Jérémie Galarneau [Mon, 20 Oct 2014 16:11:58 +0000 (12:11 -0400)] 
Don't automatically generate a clock UUID in _bt_ctf_clock_create

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

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

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd missing trace-internal.h header file
Jérémie Galarneau [Mon, 20 Oct 2014 13:36:44 +0000 (09:36 -0400)] 
Add missing trace-internal.h header file

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd an alias name attribute and accessor to CTF IR field type
Jérémie Galarneau [Sun, 19 Oct 2014 18:45:16 +0000 (14:45 -0400)] 
Add an alias name attribute and accessor to CTF IR field type

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd internal nameless clock creation API
Jérémie Galarneau [Sun, 19 Oct 2014 17:39:58 +0000 (13:39 -0400)] 
Add internal nameless clock creation API

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd Trace CTF IR type
Jérémie Galarneau [Thu, 16 Oct 2014 21:45:35 +0000 (17:45 -0400)] 
Add Trace CTF IR type

Refactored the Writer interface to expose a Trace object which
will be exposed by the CTF reader.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings clean-up: missing file headers style fixes
Jérémie Galarneau [Fri, 17 Oct 2014 12:25:26 +0000 (08:25 -0400)] 
Python bindings clean-up: missing file headers style fixes

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoDocs fix: Change bt_ctf_writer_create_stream return description
Jérémie Galarneau [Thu, 16 Oct 2014 21:46:53 +0000 (17:46 -0400)] 
Docs fix: Change bt_ctf_writer_create_stream return description

writer -> stream

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings clean-up: file headers style fix
Jérémie Galarneau [Thu, 16 Oct 2014 21:31:22 +0000 (17:31 -0400)] 
Python bindings clean-up: file headers style fix

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoChange CTF IR header descriptions from CTF Writer to CTF IR
Jérémie Galarneau [Thu, 16 Oct 2014 21:21:40 +0000 (17:21 -0400)] 
Change CTF IR header descriptions from CTF Writer to CTF IR

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoDetect Python packages directory on configure
Jérémie Galarneau [Thu, 16 Oct 2014 20:36:10 +0000 (16:36 -0400)] 
Detect Python packages directory on configure

The Python interpreter on Debian is configurated to use
...lib/python.../dist-packages instead of
.../lib/python.../site-packages to look for extra modules.

python_modules.m4 performs a runtime python check of the
sys.path variable to check wether the selected interpreter is
configurated to use site-packages vs dist-packages.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: fail configure if python version < 3.0
Jérémie Galarneau [Mon, 13 Oct 2014 13:17:36 +0000 (09:17 -0400)] 
Python bindings: fail configure if python version < 3.0

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd PEP8 style guide requirement to the CodingStyle
Jérémie Galarneau [Sun, 12 Oct 2014 10:16:31 +0000 (06:16 -0400)] 
Add PEP8 style guide requirement to the CodingStyle

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: Make bindings PEP8 compliant
Jérémie Galarneau [Sun, 12 Oct 2014 10:15:55 +0000 (06:15 -0400)] 
Python bindings: Make bindings PEP8 compliant

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: Make examples PEP8 compliant
Jérémie Galarneau [Sun, 12 Oct 2014 09:16:14 +0000 (05:16 -0400)] 
Python bindings: Make examples PEP8 compliant

10 years agoPython bindings: clarify invalid argument type exception
Jérémie Galarneau [Sat, 11 Oct 2014 19:39:11 +0000 (15:39 -0400)] 
Python bindings: clarify invalid argument type exception

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings docs: clarify add_event_class comments
Jérémie Galarneau [Sat, 11 Oct 2014 19:37:33 +0000 (15:37 -0400)] 
Python bindings docs: clarify add_event_class comments

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: Add packet context accessors
Jérémie Galarneau [Sat, 11 Oct 2014 03:37:23 +0000 (23:37 -0400)] 
Python bindings: Add packet context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoDocumentation fix: add expected types to packet context accessors
Jérémie Galarneau [Sat, 11 Oct 2014 01:49:38 +0000 (21:49 -0400)] 
Documentation fix: add expected types to packet context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: Add UUID accessors to the Clock class
Jérémie Galarneau [Sat, 11 Oct 2014 01:45:49 +0000 (21:45 -0400)] 
Python bindings: Add UUID accessors to the Clock class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoClean-up: remove extra whitespace in ctf-ir/clock.h
Jérémie Galarneau [Sat, 11 Oct 2014 00:36:14 +0000 (20:36 -0400)] 
Clean-up: remove extra whitespace in ctf-ir/clock.h

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: cleanup whitespace
Jérémie Galarneau [Mon, 6 Oct 2014 19:08:19 +0000 (15:08 -0400)] 
Python bindings: cleanup whitespace

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoPython bindings: add "datetime" property to the Event class
Jérémie Galarneau [Mon, 6 Oct 2014 19:04:26 +0000 (15:04 -0400)] 
Python bindings: add "datetime" property to the Event class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoTests: check for < 0 rather than -1 specifically
Jérémie Galarneau [Mon, 6 Oct 2014 03:48:01 +0000 (23:48 -0400)] 
Tests: check for < 0 rather than -1 specifically

Change test conditions for functions whose documentation
states that "a negative value" is returned on error.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoTests: cleanup extra whitespace
Jérémie Galarneau [Mon, 6 Oct 2014 03:47:41 +0000 (23:47 -0400)] 
Tests: cleanup extra whitespace

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoTests: Add tests for new clock UUID accessors
Jérémie Galarneau [Mon, 6 Oct 2014 02:04:26 +0000 (22:04 -0400)] 
Tests: Add tests for new clock UUID accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd UUID accessors to CTF-IR clock
Jérémie Galarneau [Mon, 6 Oct 2014 01:20:25 +0000 (21:20 -0400)] 
Add UUID accessors to CTF-IR clock

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: scan-build warnings in CTF Writer/IR tests
Jérémie Galarneau [Mon, 6 Oct 2014 01:17:01 +0000 (21:17 -0400)] 
Fix: scan-build warnings in CTF Writer/IR tests

scan-build reported that strcmp could be called on a NULL string
when some tests fail.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: offset_s and CTF clocks with frequency != 1GHz
Mathieu Desnoyers [Thu, 2 Oct 2014 19:23:46 +0000 (15:23 -0400)] 
Fix: offset_s and CTF clocks with frequency != 1GHz

Take into account offset_s from the clock description when calculating
the tc_offset in ctf_get_real_timestamp().

Do not assume that the single_clock->offset field is at a frequency of
1GHz. Take into account the its clock frequency.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: incorrect compiler warning
Mathieu Desnoyers [Tue, 23 Sep 2014 16:24:07 +0000 (12:24 -0400)] 
Fix: incorrect compiler warning

The compiler does not see that *target will necessarily set the values.
Initialize the variables to 0 to silence uninitialized variable warning.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Don't assume that PROT_WRITE grants read permissions
Jérémie Galarneau [Mon, 22 Sep 2014 16:59:11 +0000 (12:59 -0400)] 
Fix: Don't assume that PROT_WRITE grants read permissions

The prot flag passed to mmap() is set to PROT_WRITE when the O_RDWR
access flags is used. This assumes that PROT_WRITE grants read
permissions on the mmap'ed region. While this is true on x86, this
causes a segmentation fault on SPARC and, presumably, other
architectures implementing strict access permissions.

CTF Writer needs read permissions since the unaligned integer writes
may use load instructions as the value is read back to perform the
required shifting/masking is performed in the _bt_bitfield_write_*
macros.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: align objstack on 8 bytes
Mathieu Desnoyers [Wed, 17 Sep 2014 18:56:04 +0000 (14:56 -0400)] 
Fix: align objstack on 8 bytes

Architectures such as sparc32 have 32-bit pointers, but require
alignment on 8 bytes multiples for 64-bit integers.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix Python: Add a comment warning about an API limitation
Jérémie Galarneau [Mon, 18 Aug 2014 22:33:33 +0000 (18:33 -0400)] 
Fix Python: Add a comment warning about an API limitation

Add a comment warning about a possible misuse of the events()
API. The objects returned by this function shall not be copied
as they become invalid as soon as the next event is accessed.

It is also invalid to access an event after its generator has
gone out of scope.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoReplace usages of limits.h with the compatibility header
Jérémie Galarneau [Thu, 7 Aug 2014 19:58:21 +0000 (15:58 -0400)] 
Replace usages of limits.h with the compatibility header

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoTests: Return from main instead of calling exit()
Jérémie Galarneau [Thu, 7 Aug 2014 16:28:46 +0000 (12:28 -0400)] 
Tests: Return from main instead of calling exit()

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoUse BABELTRACE_HOST_NAME_MAX in test_ctf_writer.c
Jérémie Galarneau [Thu, 7 Aug 2014 16:25:35 +0000 (12:25 -0400)] 
Use BABELTRACE_HOST_NAME_MAX in test_ctf_writer.c

This fixes the build on FreeBSD.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoAdd limits compatibility header
Jérémie Galarneau [Thu, 7 Aug 2014 16:24:45 +0000 (12:24 -0400)] 
Add limits compatibility header

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: don't perform unaligned integer read/writes
Mathieu Desnoyers [Wed, 16 Jul 2014 14:58:48 +0000 (10:58 -0400)] 
Fix: don't perform unaligned integer read/writes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd stream packet header accessors
Jérémie Galarneau [Tue, 29 Jul 2014 20:51:51 +0000 (16:51 -0400)] 
Add stream packet header accessors

Stream packet contexts may now be modified to contain custom
fields. The events_discarded field is now handled like a generic
packet context field.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoReuse previously allocated string when setting value
Jérémie Galarneau [Tue, 29 Jul 2014 20:57:21 +0000 (16:57 -0400)] 
Reuse previously allocated string when setting value

bt_ctf_field_string_set_value() frees and reallocates a new
g_string object if the value is changed. This change ensures
that the previous string is used if possible.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: bt_ctf_field_type_structure_add_field argument validation
Jérémie Galarneau [Tue, 29 Jul 2014 20:55:36 +0000 (16:55 -0400)] 
Fix: bt_ctf_field_type_structure_add_field argument validation

bt_ctf_field_type_structure_add_field is not setting the return
value to a negative value if the parameter validation fails. The
function would abort while appearing to have succeeded.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 years agoFix: mmap trace read the stream_id from the first packet
Julien Desfossez [Mon, 14 Jul 2014 21:11:31 +0000 (17:11 -0400)] 
Fix: mmap trace read the stream_id from the first packet

We were hardcoding the stream_id as 0 for mmap traces, causing a
problem for live traces with multiple channels.
A fix enters in lttng-tools v2.4.2 to send the CTF stream id in the beacon
packets, but until then, we cannot support traces with multiple CTF
streams (LTTng channels).

Fixes: #811
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: check the lttng-relayd protocol version
Julien Desfossez [Mon, 14 Jul 2014 21:11:30 +0000 (17:11 -0400)] 
Fix: check the lttng-relayd protocol version

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: don't update the trace collection if no new streams were received
Julien Desfossez [Mon, 14 Jul 2014 21:11:29 +0000 (17:11 -0400)] 
Fix: don't update the trace collection if no new streams were received

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRemove logically dead code
Jérémie Galarneau [Wed, 2 Jul 2014 17:30:01 +0000 (13:30 -0400)] 
Remove logically dead code

Fixes Coverity warning
** CID 1224341:  Logically dead code  (DEADCODE)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.0408539999999999 seconds and 5 git commands to generate.