babeltrace.git
11 years agoFix: alignment of compound types containing array field
Mathieu Desnoyers [Thu, 17 Jan 2013 01:08:10 +0000 (20:08 -0500)] 
Fix: alignment of compound types containing array field

The "alignment" field of the array declaration is used by compound types
containing an array field to calculate the alignment needed for the
compound types.

Reported-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 1.0.2 v1.0.2
Mathieu Desnoyers [Fri, 11 Jan 2013 14:46:40 +0000 (09:46 -0500)] 
Version 1.0.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add tests/lib missing files to Makefile.am
Mathieu Desnoyers [Fri, 11 Jan 2013 14:42:12 +0000 (09:42 -0500)] 
Fix: add tests/lib missing files to Makefile.am

Fix make dist.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 1.0.1 v1.0.1
Mathieu Desnoyers [Fri, 11 Jan 2013 14:36:12 +0000 (09:36 -0500)] 
Version 1.0.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoProvides a basic pkg-config file for libbabeltrace
Yannick Brosseau [Fri, 14 Dec 2012 12:35:09 +0000 (07:35 -0500)] 
Provides a basic pkg-config file for libbabeltrace

This pkg-config file specify the usage of libbabeltrace and
libbabeltrace-ctf since ctf is the only format currently supported and
tested.

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix erroneous warning/error messages
Simon Marchi [Thu, 6 Dec 2012 16:21:10 +0000 (11:21 -0500)] 
Fix erroneous warning/error messages

This led to user confusion.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix comment in context.h
Mathieu Desnoyers [Wed, 5 Dec 2012 20:46:02 +0000 (15:46 -0500)] 
Fix comment in context.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: Remove whitespace at EOL from mit-license.txt
Mathieu Desnoyers [Wed, 5 Dec 2012 13:06:44 +0000 (08:06 -0500)] 
Cleanup: Remove whitespace at EOL from mit-license.txt

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd missing permission notice in each source file
Mathieu Desnoyers [Wed, 5 Dec 2012 12:50:56 +0000 (07:50 -0500)] 
Add missing permission notice in each source file

The permission notice was already present in the project mit-license.txt
file (refered to by the README file), but we should add it to each file.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdding a test which do a sequence of seek BEGIN, LAST, BEGIN, LAST
Yannick Brosseau [Sat, 17 Nov 2012 16:22:01 +0000 (11:22 -0500)] 
Adding a test which do a sequence of seek BEGIN, LAST, BEGIN, LAST

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRun seek tests on a second trace file
Yannick Brosseau [Sat, 17 Nov 2012 16:21:11 +0000 (11:21 -0500)] 
Run seek tests on a second trace file

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd #define _GNU_SOURCE to remove warning about asprintf
Yannick Brosseau [Fri, 16 Nov 2012 22:23:33 +0000 (17:23 -0500)] 
Add #define _GNU_SOURCE to remove warning about asprintf

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoInclude a test for SEEK_BEGIN and SEEK_LAST
Yannick Brosseau [Fri, 16 Nov 2012 15:27:21 +0000 (10:27 -0500)] 
Include a test for SEEK_BEGIN and SEEK_LAST

[ Edit by Mathieu Desnoyers: style fixes, add NR_TESTS define. ]

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Report success even if we find at least one valid stream in find_max_timestamp_c...
Yannick Brosseau [Thu, 15 Nov 2012 22:06:33 +0000 (17:06 -0500)] 
Fix: Report success even if we find at least one valid stream in find_max_timestamp_ctf_stream_class

Fix the case were the last stream is completely empty and return EOF.
This return value was returned even if other streams were valid

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix SEEK_BEGIN for streams that do not contain any event
Mathieu Desnoyers [Fri, 9 Nov 2012 18:02:59 +0000 (13:02 -0500)] 
Fix SEEK_BEGIN for streams that do not contain any event

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 1.0.0 v1.0.0
Mathieu Desnoyers [Sat, 27 Oct 2012 15:23:38 +0000 (11:23 -0400)] 
Version 1.0.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agotests: add test traces to distribution tarball
Mathieu Desnoyers [Sat, 27 Oct 2012 15:22:22 +0000 (11:22 -0400)] 
tests: add test traces to distribution tarball

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDocument bash requirement for make check in README
Mathieu Desnoyers [Sat, 27 Oct 2012 15:16:38 +0000 (11:16 -0400)] 
Document bash requirement for make check in README

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd tests to make check
Mathieu Desnoyers [Sat, 27 Oct 2012 15:09:36 +0000 (11:09 -0400)] 
Add tests to make check

Fixes #361

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add missing header size validation
Mathieu Desnoyers [Sat, 27 Oct 2012 15:08:07 +0000 (11:08 -0400)] 
Fix: add missing header size validation

Was causing infinite loop for
tests/ctf-traces/fail/lttng-modules-2.0-pre1 failure test.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agocallbacks.c: handle extract_ctf_stream_event return value
Mathieu Desnoyers [Tue, 23 Oct 2012 19:46:31 +0000 (15:46 -0400)] 
callbacks.c: handle extract_ctf_stream_event return value

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: fix cppcheck warning
Mathieu Desnoyers [Mon, 22 Oct 2012 22:32:49 +0000 (18:32 -0400)] 
Cleanup: fix cppcheck warning

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: fix cppcheck warnings
Mathieu Desnoyers [Mon, 22 Oct 2012 22:31:11 +0000 (18:31 -0400)] 
Cleanup: fix cppcheck warnings

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agofix double-free on error path
Mathieu Desnoyers [Mon, 22 Oct 2012 22:23:09 +0000 (18:23 -0400)] 
fix double-free on error path

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoVersion 1.0.0-rc6 v1.0.0-rc6
Mathieu Desnoyers [Thu, 18 Oct 2012 20:45:24 +0000 (16:45 -0400)] 
Version 1.0.0-rc6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd valgrind suppression file for libpopt
Mathieu Desnoyers [Thu, 18 Oct 2012 20:41:20 +0000 (16:41 -0400)] 
Add valgrind suppression file for libpopt

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: unplug memory leak that causes popt-0.13 to segfault
Mathieu Desnoyers [Thu, 18 Oct 2012 12:54:10 +0000 (08:54 -0400)] 
Fix: unplug memory leak that causes popt-0.13 to segfault

popt-0.16 poptGetArg() causes a memory leak, but freeing that memory
goes against popt(3) documented use, and against the 0.13 behavior,
which triggers a segfault on free(). So leave this small,
one-time-per-execution, memory leak in place.

Fixes #380

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: test all close/fclose ret val, fix double close
Mathieu Desnoyers [Wed, 17 Oct 2012 18:23:02 +0000 (14:23 -0400)] 
Fix: test all close/fclose ret val, fix double close

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: add missing newline
Mathieu Desnoyers [Wed, 17 Oct 2012 15:54:07 +0000 (11:54 -0400)] 
Cleanup: add missing newline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: fd leak on trace close
Mathieu Desnoyers [Wed, 17 Oct 2012 15:53:52 +0000 (11:53 -0400)] 
Fix: fd leak on trace close

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix memory leaks induced by lack of libpopt documentation
Mathieu Desnoyers [Tue, 16 Oct 2012 22:58:11 +0000 (18:58 -0400)] 
Fix memory leaks induced by lack of libpopt documentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agobabeltrace: fix poptGetOptArg memleak
Mathieu Desnoyers [Tue, 16 Oct 2012 22:37:00 +0000 (18:37 -0400)] 
babeltrace: fix poptGetOptArg memleak

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoplugins: implement plugin unregister
Mathieu Desnoyers [Tue, 16 Oct 2012 22:04:39 +0000 (18:04 -0400)] 
plugins: implement plugin unregister

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDoc: valgrind with babeltrace (glib workaround)
Julien Desfossez [Tue, 16 Oct 2012 18:47:09 +0000 (14:47 -0400)] 
Doc: valgrind with babeltrace (glib workaround)

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agocallsites: fix memory leak
Mathieu Desnoyers [Tue, 16 Oct 2012 18:41:41 +0000 (14:41 -0400)] 
callsites: fix memory leak

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: free all the metadata-related memory
Julien Desfossez [Tue, 16 Oct 2012 18:25:33 +0000 (14:25 -0400)] 
Fix: free all the metadata-related memory

When opening a trace, the parser allocates various data structures to
represent internally the metadata.
This patch frees all this memory when a trace is closed.

When babeltrace was originally developed, it was meant to be mainly a
trace converter, so relying on the operating system to free memory was
"acceptable", although a bad practice. Now that libbabeltrace allows
reading the CTF format from an external application, it becomes clear
that fixing those memory leaks is required.

As of this commit, valgrind invoked in the following way on babeltrace
does not report any memory leak:
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full

Let's keep it that way :-) !

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix : Free the iterator callback arrays
Julien Desfossez [Tue, 16 Oct 2012 18:24:15 +0000 (14:24 -0400)] 
Fix : Free the iterator callback arrays

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix : cleanup teardown of context
Julien Desfossez [Tue, 16 Oct 2012 18:23:12 +0000 (14:23 -0400)] 
Fix : cleanup teardown of context

Fix the error path when a trace is opened but errors occur when we index
it, and close all traces when the context is destroyed.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix : protect static float and double declarations
Julien Desfossez [Tue, 16 Oct 2012 18:20:58 +0000 (14:20 -0400)] 
Fix : protect static float and double declarations

Add a mutex in the constructor of float.c to protect the static
temporary float and double declared in case we add multi-threading
support some day.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agocallsite: support instruction pointer field
Mathieu Desnoyers [Tue, 16 Oct 2012 02:04:42 +0000 (22:04 -0400)] 
callsite: support instruction pointer field

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDocument that list.h is LGPLv2.1, but entirely trivial
Mathieu Desnoyers [Tue, 2 Oct 2012 22:06:35 +0000 (18:06 -0400)] 
Document that list.h is LGPLv2.1, but entirely trivial

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: callsite support: list multiple callsites
Mathieu Desnoyers [Tue, 2 Oct 2012 21:33:11 +0000 (17:33 -0400)] 
Fix: callsite support: list multiple callsites

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd callsite support
Mathieu Desnoyers [Tue, 2 Oct 2012 18:47:18 +0000 (14:47 -0400)] 
Add callsite support

Callsite support has been added to the spec.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Allow 64-bit packet offset
Mathieu Desnoyers [Fri, 28 Sep 2012 00:56:53 +0000 (20:56 -0400)] 
Fix: Allow 64-bit packet offset

Offset within a packet is calculated in bits. Therefore, if, for an
unforeseen reason, a 32-bit system would happen to build babeltrace
without large file support, the maximum packet size would have been
limited to 256MB (4GB / 8 bits per byte), because we were using size_t.

Use 64-bit type to hold the offset within a packet from now on.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: emf uri: surround by " "
Mathieu Desnoyers [Thu, 20 Sep 2012 16:50:26 +0000 (12:50 -0400)] 
Fix: emf uri: surround by " "

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoHandle model.emf.uri event info
Mathieu Desnoyers [Thu, 20 Sep 2012 16:37:09 +0000 (12:37 -0400)] 
Handle model.emf.uri event info

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Documentation cleanup
Julien Desfossez [Thu, 13 Sep 2012 22:47:34 +0000 (18:47 -0400)] 
Fix: Documentation cleanup

Add high-level information about declarations, definitions and scopes in
the API documentation.
Add some missing API function documentation in the API doc.
Clarify the usage of the declaration listing functions.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: misplaced C++ ifdef
Julien Desfossez [Thu, 13 Sep 2012 20:27:43 +0000 (16:27 -0400)] 
Fix: misplaced C++ ifdef

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix babeltrace-log get big line when the input file last line don't have enter
Hui Zhu [Tue, 11 Sep 2012 13:28:59 +0000 (09:28 -0400)] 
Fix babeltrace-log get big line when the input file last line don't have enter

I got:
[Error] Line too large for packet size (32kB) (discarded)
When I input a file to babeltrace-log.
That is because the last line of the input file doesn't have enter and
"babeltrace-log" have bug with the line that doesn't have enter.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAPI Fix: bt_ctf_iter_read_event_flags
Julien Desfossez [Tue, 11 Sep 2012 02:04:09 +0000 (22:04 -0400)] 
API Fix: bt_ctf_iter_read_event_flags

The new bt_ctf_iter_read_event_flags function behaves like
bt_ctf_iter_read_event but takes a flag pointer.
This flag is used by the trace reading code to inform the user if some
events were discarded by the tracer in the current packet.

The new bt_ctf_get_lost_events_count function allows the user to get the
the number of events discarded immediately prior to the last event read.

[ Edit by Mathieu Desnoyers: use enum instead of define for
  BT_ITER_FLAG_LOST_EVENTS. ]

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: get encoding for char arrays and sequences
Julien Desfossez [Tue, 11 Sep 2012 02:01:58 +0000 (22:01 -0400)] 
Fix: get encoding for char arrays and sequences

The bt_ctf_get_encoding works for strings and integer, but not for char
arrays or sequences. For these compound types, we need to return the
encoding of the integer contained inside. This patch adds the support of
char arrays and sequences.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: access to declaration from declaration_field
Julien Desfossez [Tue, 11 Sep 2012 02:01:05 +0000 (22:01 -0400)] 
Fix: access to declaration from declaration_field

Rename the bt_ctf_get_decl_fields into bt_ctf_get_decl_from_def and
introduce the new bt_ctf_get_decl_from_field_decl to allow the user to
access the declaration from a field_declaration.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: get_declaration_* should not cast to field
Mathieu Desnoyers [Sat, 8 Sep 2012 23:37:46 +0000 (19:37 -0400)] 
Fix: get_declaration_* should not cast to field

Also add const typing.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix babeltrace-log uninitialized memory (v2)
Hui Zhu [Fri, 7 Sep 2012 13:16:55 +0000 (09:16 -0400)] 
Fix babeltrace-log uninitialized memory (v2)

Got a crash with babeltrace-log.

../../../babeltrace/include/babeltrace/mmap-align.h:78 index=0, whence=0)
  at ../../../babeltrace/formats/ctf/ctf.c:623
  at ../../../babeltrace/formats/ctf/ctf.c:576 _IO_2_1_stdin_
  at ../../babeltrace/converter/babeltrace-log.c:233
../../babeltrace/converter/babeltrace-log.c:342

This issue because pos is used before it init.  This patch init it in
function ctf_init_pos.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Fix babeltrace-log uninitialized memory"
Mathieu Desnoyers [Fri, 7 Sep 2012 13:16:19 +0000 (09:16 -0400)] 
Revert "Fix babeltrace-log uninitialized memory"

This reverts commit 36741bea2b53007c29ac0391ee9086722e00653a.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix babeltrace-log uninitialized memory
Hui Zhu [Fri, 7 Sep 2012 12:36:28 +0000 (08:36 -0400)] 
Fix babeltrace-log uninitialized memory

Got a crash with babeltrace-log.

../../../babeltrace/include/babeltrace/mmap-align.h:78
index=0, whence=0)
    at ../../../babeltrace/formats/ctf/ctf.c:623
    at ../../../babeltrace/formats/ctf/ctf.c:576
<_IO_2_1_stdin_>)
    at ../../babeltrace/converter/babeltrace-log.c:233
../../babeltrace/converter/babeltrace-log.c:342

This issue because pos is used before it init.  This patch init it in
function ctf_init_pos.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: access field properties by declaration
Julien Desfossez [Thu, 6 Sep 2012 21:42:26 +0000 (17:42 -0400)] 
Fix: access field properties by declaration

The functions that give access to the properties of the fields (int
signedness, base, char len, etc), were only working with definition
struct which prevented their use before actually reading the events.

This patch changes the prototypes of these functions to use
declarations instead of definitions and provides a converter
function to access the declaration from a definition.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: check return value of get_char_array
Julien Desfossez [Tue, 28 Aug 2012 04:01:39 +0000 (00:01 -0400)] 
Fix: check return value of get_char_array

Arrays that are not char arrays will cause a segfault if we don't check
the return value of get_char_array before accessing the str pointer.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: C++ support to API header files
Julien Desfossez [Mon, 27 Aug 2012 17:27:32 +0000 (13:27 -0400)] 
Fix: C++ support to API header files

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoUpdate version to 1.0.0-rc5 v1.0.0-rc5
Mathieu Desnoyers [Mon, 27 Aug 2012 12:38:15 +0000 (08:38 -0400)] 
Update version to 1.0.0-rc5

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoChange default printout to add host, process names and vpid
Mathieu Desnoyers [Mon, 27 Aug 2012 01:15:32 +0000 (21:15 -0400)] 
Change default printout to add host, process names and vpid

Showing the hostname:procname:vpid is a very useful default behavior.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: David Goulet <david.goulet@efficios.com>
Acked-by: Julien Desfossez <jdesfossez@efficios.com>
11 years agoAdd support for trace:hostname field
Mathieu Desnoyers [Mon, 27 Aug 2012 00:22:27 +0000 (20:22 -0400)] 
Add support for trace:hostname field

Very, very, incredibly useful for multi-node traces.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: allow specifying more than one input trace path
Mathieu Desnoyers [Sun, 26 Aug 2012 23:58:47 +0000 (19:58 -0400)] 
Fix: allow specifying more than one input trace path

We need to fix this right away: leaving the OUTPUT cmd line argument
take away the possibility to specify multiple input trace paths, with is
a very common use-case when merging traces from various nodes.

Now, output can be changed by specifying -w, --output OUTPUT. This is a
rare use-case anyway, to allowing multiple input paths outweight the
need for cmd line arg compatibility, even at this stage.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
11 years agoFix: make warnings (partial errors) visible
Mathieu Desnoyers [Sun, 26 Aug 2012 23:11:24 +0000 (19:11 -0400)] 
Fix: make warnings (partial errors) visible

If a partial error happens (some traces cannot be opened), wait for 3
seconds before showing the conversion output, to ensure users can see
the warnings.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: --clock-force-correlate to handle trace collections gathered from various nodes
Mathieu Desnoyers [Sun, 26 Aug 2012 19:08:06 +0000 (15:08 -0400)] 
Fix: --clock-force-correlate to handle trace collections gathered from various nodes

Currently, traces generated by lttng have the "absolute" flag set to 0,
because they are based on the monotonic clock, which is not perfectly
correlated across nodes.

Fix a couple of minor issue in the handling of --clock-force-correlate
that now allow to use it to force correlation of traces taken with the
monotonic clock source, with "offset" approximation populated using NTP
time.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDocumentation: update API doc with enum functions
Julien Desfossez [Fri, 24 Aug 2012 02:04:04 +0000 (22:04 -0400)] 
Documentation: update API doc with enum functions

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: API: remove unsupported BT_SEEK_END from API
Mathieu Desnoyers [Fri, 24 Aug 2012 01:19:47 +0000 (21:19 -0400)] 
Fix: API: remove unsupported BT_SEEK_END from API

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAPI documentation
Danny Serres [Fri, 24 Aug 2012 01:08:51 +0000 (21:08 -0400)] 
API documentation

Signed-off-by: Danny Serres <danny.serres@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: shut up gcc uninitialized var warning
Mathieu Desnoyers [Fri, 24 Aug 2012 01:00:23 +0000 (21:00 -0400)] 
Cleanup: shut up gcc uninitialized var warning

Even though it should never be used unset (due to return value), let's
be extra careful and check if indeed not set, and return an error in
that case.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: support large files on 32-bit systems
Mathieu Desnoyers [Fri, 24 Aug 2012 00:56:15 +0000 (20:56 -0400)] 
Fix: support large files on 32-bit systems

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: remove unused fts.h include
Mathieu Desnoyers [Fri, 24 Aug 2012 00:45:21 +0000 (20:45 -0400)] 
Fix: remove unused fts.h include

Will allow us to enable LFS support on 32-bit.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add missing enum support to API
Mathieu Desnoyers [Fri, 24 Aug 2012 00:39:04 +0000 (20:39 -0400)] 
Fix: add missing enum support to API

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: handle clock offset with frequency different from 1GHz
Mathieu Desnoyers [Fri, 24 Aug 2012 00:07:00 +0000 (20:07 -0400)] 
Fix: handle clock offset with frequency different from 1GHz

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: update ifdef wrapper name
Mathieu Desnoyers [Fri, 24 Aug 2012 00:04:19 +0000 (20:04 -0400)] 
Cleanup: update ifdef wrapper name

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: clarify bt_ctf_get_field_list
Mathieu Desnoyers [Thu, 23 Aug 2012 21:59:20 +0000 (17:59 -0400)] 
Fix: clarify bt_ctf_get_field_list

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix trace-collection.h: No such file or directory that build code with libbabeltrace
Hui Zhu [Thu, 23 Aug 2012 12:07:32 +0000 (08:07 -0400)] 
Fix trace-collection.h: No such file or directory that build code with libbabeltrace

After I install the babeltrace and try to build a code, I got this:
gcc -Wall  -g 1.c -lbabeltrace -lbabeltrace-ctf
In file included from 1.c:11:0:
/usr/local/include/babeltrace/babeltrace.h:23:41: fatal error:
babeltrace/trace-collection.h: No such file or directory
compilation terminated.

I check the code, looks most of function of trace-collection.h is
covered by context.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: check return value of bt_context_create
Julien Desfossez [Tue, 21 Aug 2012 14:45:07 +0000 (10:45 -0400)] 
Fix: check return value of bt_context_create

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: ensure mmap_base_offset is zeroed on initialization
Mathieu Desnoyers [Mon, 20 Aug 2012 20:09:25 +0000 (16:09 -0400)] 
Fix: ensure mmap_base_offset is zeroed on initialization

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Reswitch to FTW for add_traces_recursive
Yannick Brosseau [Mon, 20 Aug 2012 19:57:18 +0000 (15:57 -0400)] 
Fix: Reswitch to FTW for add_traces_recursive

FTS does not support Large Files

(refs #315)

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: don't free unallocated index
Julien Desfossez [Sat, 18 Aug 2012 13:16:42 +0000 (09:16 -0400)] 
Fix: don't free unallocated index

When opening a mmap trace, the index is not created so does not need to
be freed, just add a check before freeing it.
For clarity, this patch also allocates the packet_real_index just after
the packet_cycles_index instead of waiting for the convert timestamp
function.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: don't close the metadata FD if a FP is passed
Julien Desfossez [Fri, 17 Aug 2012 11:57:53 +0000 (07:57 -0400)] 
Fix: don't close the metadata FD if a FP is passed

In ctf_open_trace_metadata_read if the metadata_fp is passed we must
not close the metadata_stream->pos.fd which is zero in this case.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAdd BT_SEEK_LAST type to bt_iter_pos
Mathieu Desnoyers [Fri, 17 Aug 2012 04:01:54 +0000 (00:01 -0400)] 
Add BT_SEEK_LAST type to bt_iter_pos

Inspired from patch by Francis Deslauriers and Julien Desfossez.

Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: iterator.c BT_SEEK_RESTORE: check return value
Mathieu Desnoyers [Fri, 17 Aug 2012 01:09:33 +0000 (21:09 -0400)] 
Fix: iterator.c BT_SEEK_RESTORE: check return value

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: complete error handling of babeltrace API
Mathieu Desnoyers [Thu, 16 Aug 2012 16:12:46 +0000 (12:12 -0400)] 
Fix: complete error handling of babeltrace API

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agocleanup: protected -> hidden: cleanup symbol table
Mathieu Desnoyers [Thu, 16 Aug 2012 14:49:38 +0000 (10:49 -0400)] 
cleanup: protected -> hidden: cleanup symbol table

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: add mmap_base_offset to ctf_stream_pos
Julien Desfossez [Wed, 15 Aug 2012 21:32:01 +0000 (17:32 -0400)] 
Fix: add mmap_base_offset to ctf_stream_pos

When dealing with mmap traces, the whole trace buffer is mmapped in
babeltrace and we may need to read it one subbuffer at a time.
In order to do that, we need to keep a reference of the base of the
current subbuffer inside the mmap region.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: assign the current clock for mmap traces
Julien Desfossez [Tue, 14 Aug 2012 15:22:41 +0000 (11:22 -0400)] 
Fix: assign the current clock for mmap traces

This assignation was missing in the code path for opening mmap traces.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: libbabeltrace add missing static declaration
Mathieu Desnoyers [Fri, 10 Aug 2012 22:00:45 +0000 (18:00 -0400)] 
Fix: libbabeltrace add missing static declaration

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: safety checks for opening mmap traces
Julien Desfossez [Fri, 10 Aug 2012 21:36:48 +0000 (17:36 -0400)] 
Fix: safety checks for opening mmap traces

When adding a mmap trace in the context, we don't have any tracefile and
index, some safety checks were missing in the path handling and
timestamp manipulation.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRemove trace-collection.h from include_headers
Danny Serres [Fri, 10 Aug 2012 21:33:17 +0000 (17:33 -0400)] 
Remove trace-collection.h from include_headers

Signed-off-by: Danny Serres <danny.serres@efficios.com>
Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: protect visibility of ctf-parser functions
Mathieu Desnoyers [Fri, 10 Aug 2012 21:12:21 +0000 (17:12 -0400)] 
Fix: protect visibility of ctf-parser functions

Some functions share the same name between ctf-parser/lexer and
filter-parser/lexer.

This patch protects the visibility of the functions with the same name
to avoid linkage confusions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
11 years agoFix: correct name of bt_ctf_field_get_error in comments and typo in man page
Danny Serres [Thu, 9 Aug 2012 16:34:59 +0000 (12:34 -0400)] 
Fix: correct name of bt_ctf_field_get_error in comments and typo in man page

Signed-off-by: Danny Serres <danny.serres@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: wrong type in bt_ctf_get_uint64/int64
Julien Desfossez [Tue, 7 Aug 2012 19:42:15 +0000 (15:42 -0400)] 
Fix: wrong type in bt_ctf_get_uint64/int64

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoRevert "Cleanup: YYPARSE_PARAM and YYLEX_PARAM are deprecated in bison 2.6"
Mathieu Desnoyers [Tue, 7 Aug 2012 17:39:47 +0000 (13:39 -0400)] 
Revert "Cleanup: YYPARSE_PARAM and YYLEX_PARAM are deprecated in bison 2.6"

This reverts commit 51f4bb7a60d9f073553691dd0f4a52a88592c727.

Still needed for bison 2.5.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoAPI cleanup name get_timestamp and get_cycles
Julien Desfossez [Tue, 7 Aug 2012 15:49:47 +0000 (11:49 -0400)] 
API cleanup name get_timestamp and get_cycles

Rename bt_ctf_get_cycles_timestamp to bt_ctf_get_cycles,
and bt_ctf_get_real_timestamp to bt_ctf_get_timestamp.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup: YYPARSE_PARAM and YYLEX_PARAM are deprecated in bison 2.6
Mathieu Desnoyers [Tue, 7 Aug 2012 15:23:43 +0000 (11:23 -0400)] 
Cleanup: YYPARSE_PARAM and YYLEX_PARAM are deprecated in bison 2.6

See https://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html

Reported-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agofix comment struct bt_saved_pos
Julien Desfossez [Sun, 5 Aug 2012 17:48:57 +0000 (13:48 -0400)] 
fix comment struct bt_saved_pos

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoFix: Add missing clock-types.h
Julien Desfossez [Fri, 3 Aug 2012 19:03:07 +0000 (15:03 -0400)] 
Fix: Add missing clock-types.h

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoGet rid of clock-raw and use real clock
Julien Desfossez [Fri, 3 Aug 2012 18:55:00 +0000 (14:55 -0400)] 
Get rid of clock-raw and use real clock

The clock-raw does not make much sense except internally, using this
clock for seeks and with the public API is more complicated than
necessary.

This patch replaces the clock-raw by a clock-cycles (does not scale the
timestamp with the frequency) and make sure all the calls that
manipulate timestamps use the timestamp in nanoseconds with the offset
applied.
That way the user of the API don't need to bother with the "raw"
timestamp which won't be convenient when dealing with multiple traces
taken in different timezones.

Traces output before and after this patch are exactly the same
and multiple API calls have been tested with real timestamps and
everything seems to work fine.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoCleanup (messages): Make the wording of the signedness warning clearer
Yannick Brosseau [Fri, 3 Aug 2012 18:47:52 +0000 (14:47 -0400)] 
Cleanup (messages): Make the wording of the signedness warning clearer

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.040365 seconds and 4 git commands to generate.