babeltrace.git
12 years agoRename ctf_stream to ctf_stream_definition
Julien Desfossez [Fri, 30 Mar 2012 19:48:00 +0000 (15:48 -0400)] 
Rename ctf_stream to ctf_stream_definition

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRename ctf_stream_event to ctf_event_definition
Julien Desfossez [Fri, 30 Mar 2012 19:47:37 +0000 (15:47 -0400)] 
Rename ctf_stream_event to ctf_event_definition

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRename ctf_stream_class to ctf_stream_declaration
Julien Desfossez [Fri, 30 Mar 2012 19:47:13 +0000 (15:47 -0400)] 
Rename ctf_stream_class to ctf_stream_declaration

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup: Remove unneeded local variables from function
Mathieu Desnoyers [Wed, 28 Mar 2012 00:20:35 +0000 (20:20 -0400)] 
Cleanup: Remove unneeded local variables from function

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI Fix : give access to trace_handle and context
Julien Desfossez [Tue, 27 Mar 2012 13:12:46 +0000 (09:12 -0400)] 
API Fix : give access to trace_handle and context

When reading multiple traces, we need to know to which context or
trace_handle an event belongs to. Setting the context and trace_handle
is format agnostic, but reading it is not, so the reading part is only
implemented for CTF.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI Fix : handle id to use the public functions
Julien Desfossez [Mon, 26 Mar 2012 20:41:56 +0000 (16:41 -0400)] 
API Fix : handle id to use the public functions

The API functions were designed to be used with struct trace_handle as
parameters, but no public function returns such a struct.
This patch fixes that by allowing the user to pass the context and the
handle_id.

Acked-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix : add the missing seek begin
Julien Desfossez [Mon, 19 Mar 2012 16:25:11 +0000 (12:25 -0400)] 
Fix : add the missing seek begin

bt_iter_set_pos can now seek to the beginning of the trace.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 1.0.0-pre4 v1.0.0-pre4
Mathieu Desnoyers [Fri, 16 Mar 2012 19:41:21 +0000 (15:41 -0400)] 
Update version to 1.0.0-pre4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix : bt_ctf_iter_create defaults to BEGIN pos
Julien Desfossez [Wed, 14 Mar 2012 18:58:08 +0000 (14:58 -0400)] 
fix : bt_ctf_iter_create defaults to BEGIN pos

With the context notion it does not make sense to start the iterator at
the current position, so we default to BT_SEEK_BEGIN if begin_pos is
NULL.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix : only one iterator per context
Julien Desfossez [Tue, 13 Mar 2012 19:50:34 +0000 (15:50 -0400)] 
Fix : only one iterator per context

As of now, the API let the user create multiple iterators on the same
context but the underlying code was not ready. This patch restrict to
only one iterator per context. Supporting multiple iterators is
targetted for the next release.

Fixes #166

[ Edit by Mathieu Desnoyers: update API comment ]

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix error checking in bt_context_add_traces_recursive
Julien Desfossez [Mon, 12 Mar 2012 18:59:44 +0000 (14:59 -0400)] 
Fix error checking in bt_context_add_traces_recursive

If a trace directory is inexistant or if the user doesn't have the
permission to open the parent directory, bt_context_add_traces_recursive
returned 0, now it returns -1. This function is not part of the API, so
the programs who copied this function into their code should apply this
fix as well.

Fixes #103

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agobt_context_add_trace, bt_iter_pos and bt_iter needed some more comments.
Julien Desfossez [Mon, 12 Mar 2012 16:00:00 +0000 (12:00 -0400)] 
bt_context_add_trace, bt_iter_pos and bt_iter needed some more comments.

Fixes #75

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix API: add const qualifiers, privatize struct bt_ctf_event
Mathieu Desnoyers [Mon, 12 Mar 2012 15:12:12 +0000 (11:12 -0400)] 
Fix API: add const qualifiers, privatize struct bt_ctf_event

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: split ctf/event.c
Mathieu Desnoyers [Mon, 12 Mar 2012 14:21:26 +0000 (10:21 -0400)] 
Fix: split ctf/event.c

Ensure the implementation follows the API event.h/iterator.h split.

closes #161

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: seek by timestamp
Mathieu Desnoyers [Fri, 9 Mar 2012 23:26:09 +0000 (18:26 -0500)] 
Fix: seek by timestamp

When seeking a stream by timestamp, we need to match the first packet in
the stream that is at (or after) the timestamp to seek to. Failure to do
so is a bug: if we have many streams, and seek all streams to a
timestamp that is after the start time of some of the streams, those
late comers will show no events.

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: remove leftover code from seek begin (unimplemented for now)
Mathieu Desnoyers [Fri, 9 Mar 2012 23:16:45 +0000 (18:16 -0500)] 
Fix: remove leftover code from seek begin (unimplemented for now)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: seek error handling
Mathieu Desnoyers [Fri, 9 Mar 2012 21:06:34 +0000 (16:06 -0500)] 
Fix: seek error handling

- EINVAL should not teardown context.
- SEEK_TIME 0 should be allowed.

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: callbacks.c: more explicit error msg
Mathieu Desnoyers [Fri, 9 Mar 2012 20:41:03 +0000 (15:41 -0500)] 
Fix: callbacks.c: more explicit error msg

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: ctf/iterator.h bt_ctf_iter_read_event() comment
Mathieu Desnoyers [Fri, 9 Mar 2012 19:37:08 +0000 (14:37 -0500)] 
Fix: ctf/iterator.h bt_ctf_iter_read_event() comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd missing iterator.h into the git repo
Mathieu Desnoyers [Thu, 8 Mar 2012 22:26:13 +0000 (17:26 -0500)] 
Add missing iterator.h into the git repo

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI fix: Move ctf iterator API members to new babeltrace/ctf/iterator.h
Mathieu Desnoyers [Thu, 8 Mar 2012 21:41:32 +0000 (16:41 -0500)] 
API fix: Move ctf iterator API members to new babeltrace/ctf/iterator.h

They did not belong in babeltrace/ctf/event.h.

(Closes #161)

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI cleanup: Move bt_iter_create/destroy to internal header
Mathieu Desnoyers [Thu, 8 Mar 2012 21:10:26 +0000 (16:10 -0500)] 
API cleanup: Move bt_iter_create/destroy to internal header

bt_iter is an abstract class, so its constructor/destructor should not
be public.

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: update missing copyrights and ifdef protection mismatch
Mathieu Desnoyers [Thu, 8 Mar 2012 17:35:43 +0000 (12:35 -0500)] 
Fix: update missing copyrights and ifdef protection mismatch

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoClarify clock correlation error message
Mathieu Desnoyers [Tue, 6 Mar 2012 23:04:47 +0000 (18:04 -0500)] 
Clarify clock correlation error message

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix build warning: set -lpopt as LDFLAGS rather than CFLAGS
Mathieu Desnoyers [Tue, 6 Mar 2012 23:00:02 +0000 (18:00 -0500)] 
Fix build warning: set -lpopt as LDFLAGS rather than CFLAGS

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add missing _GNU_SOURCE define to babeltrace-log.c
Mathieu Desnoyers [Tue, 6 Mar 2012 22:55:28 +0000 (17:55 -0500)] 
Fix: add missing _GNU_SOURCE define to babeltrace-log.c

Since it is using getline.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Add memstream.h dependency to Makefile.am
Mathieu Desnoyers [Tue, 6 Mar 2012 22:51:06 +0000 (17:51 -0500)] 
Fix: Add memstream.h dependency to Makefile.am

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoImplement fallback for systems lacking open_memstream and fopenmem
Mathieu Desnoyers [Tue, 6 Mar 2012 22:47:56 +0000 (17:47 -0500)] 
Implement fallback for systems lacking open_memstream and fopenmem

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: try to include endian.h by default
Mathieu Desnoyers [Mon, 5 Mar 2012 17:38:39 +0000 (12:38 -0500)] 
Fix: try to include endian.h by default

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 1.0.0-pre3 v1.0.0-pre3
Mathieu Desnoyers [Fri, 2 Mar 2012 22:46:57 +0000 (17:46 -0500)] 
Update version to 1.0.0-pre3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix uuid in metadata
Mathieu Desnoyers [Thu, 1 Mar 2012 23:50:32 +0000 (18:50 -0500)] 
Fix uuid in metadata

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoBabeltrace wrapper update
Mathieu Desnoyers [Thu, 1 Mar 2012 23:36:07 +0000 (18:36 -0500)] 
Babeltrace wrapper update

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agouuid wrapper: fix use in visitor
Mathieu Desnoyers [Thu, 1 Mar 2012 23:27:24 +0000 (18:27 -0500)] 
uuid wrapper: fix use in visitor

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoEndian wrapper use fix
Mathieu Desnoyers [Thu, 1 Mar 2012 23:18:00 +0000 (18:18 -0500)] 
Endian wrapper use fix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFreeBSD uuid wrapper fixes
Mathieu Desnoyers [Thu, 1 Mar 2012 23:15:38 +0000 (18:15 -0500)] 
FreeBSD uuid wrapper fixes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix missing uuid wrapper change
Mathieu Desnoyers [Thu, 1 Mar 2012 23:06:14 +0000 (18:06 -0500)] 
Fix missing uuid wrapper change

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd endian.h wrapper
Mathieu Desnoyers [Thu, 1 Mar 2012 23:04:47 +0000 (18:04 -0500)] 
Add endian.h wrapper

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUse standard __LONG_MAX__ instead of __WORDSIZE
Mathieu Desnoyers [Thu, 1 Mar 2012 23:01:01 +0000 (18:01 -0500)] 
Use standard __LONG_MAX__ instead of __WORDSIZE

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCreate BSD wrapper for uuid
Mathieu Desnoyers [Thu, 1 Mar 2012 22:49:30 +0000 (17:49 -0500)] 
Create BSD wrapper for uuid

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix API : deal with the optional underscore
Julien Desfossez [Thu, 1 Mar 2012 16:14:44 +0000 (11:14 -0500)] 
fix API : deal with the optional underscore

A field can be prefixed by an underscore internally by the tracer.
This provides the abilility for the user to specify the underscore or
not (depending if he read the metadata or the tracepoint event
definition).
This is a fallback mechanism, so if the request fails, we prefix an
underscore to the field name and request it again.

Also, the bt_ctf_field_name function now removes the optional
underscore.

A quick benchmark shows that calling the bt_ctf_get_field without the
underscore on a field that requires an underscore adds around 151
nanoseconds to the call on a core 2 duo (tested in a loop of 1000000
iterations).

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix API : functions to access fields properties
Julien Desfossez [Thu, 1 Mar 2012 14:10:50 +0000 (09:10 -0500)] 
Fix API : functions to access fields properties

Add the ability to know :
- the signedness of an int
- the base of an int
- the encoding of an int
- the len of an array
- the encoding of a string

refs #139

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 1.0.0-pre2 v1.0.0-pre2
Mathieu Desnoyers [Thu, 23 Feb 2012 18:59:51 +0000 (13:59 -0500)] 
Update version to 1.0.0-pre2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolinker: privatize prio_heap and babeltrace_types
Mathieu Desnoyers [Thu, 23 Feb 2012 18:53:28 +0000 (13:53 -0500)] 
linker: privatize prio_heap and babeltrace_types

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoLinker: privatize libbabeltrace_types
Mathieu Desnoyers [Thu, 23 Feb 2012 18:39:16 +0000 (13:39 -0500)] 
Linker: privatize libbabeltrace_types

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoLink statically to internal libraries
Mathieu Desnoyers [Thu, 23 Feb 2012 18:25:05 +0000 (13:25 -0500)] 
Link statically to internal libraries

Previously, we installed all "internal" libs as .so, because static
linking a static lib into a dynamic lib did remove the unused objects.
Use the -Wl,--no-as-needed linker flag to fix this issue, allowing us to
entirely privatize private libs.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCombine duplicated API/pretty-print timestamp code
Mathieu Desnoyers [Thu, 23 Feb 2012 12:54:23 +0000 (07:54 -0500)] 
Combine duplicated API/pretty-print timestamp code

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI : export the offsetted timestamp
Signed-off-by: Julien Desfossez [Thu, 23 Feb 2012 12:37:06 +0000 (07:37 -0500)] 
API : export the offsetted timestamp

We export now the offsetted view of the timestamp as well as the raw
timestamp to the users.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix : segfault when printing timestamp on index
Julien Desfossez [Tue, 21 Feb 2012 21:47:15 +0000 (16:47 -0500)] 
Fix : segfault when printing timestamp on index

If we detect we lost events in a packet, we print an error message
containing the begin and end timestamps of the packet.  If we detect
this packet loss while generating the index (during the open_trace), the
trace_collection is not yet referenced and so the clock information is
not available. This fix prevents the printing at this stage.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix : coherency in const parameters
Julien Desfossez [Tue, 21 Feb 2012 15:45:14 +0000 (10:45 -0500)] 
Fix : coherency in const parameters

This patchs adds the const attribute to the field access functions
(get_int64 and others) in order to keep the coherency with the get_field
and get_field_list function which return a const pointer.

fixes #84

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 1.0.0-pre1 v1.0.0-pre1
Mathieu Desnoyers [Mon, 20 Feb 2012 20:47:52 +0000 (15:47 -0500)] 
Update version to 1.0.0-pre1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoGenerically print tracer version (and env) in verbose mode
Mathieu Desnoyers [Mon, 20 Feb 2012 20:27:51 +0000 (15:27 -0500)] 
Generically print tracer version (and env) in verbose mode

closes #82

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix open_mmap_trace missing support
Mathieu Desnoyers [Fri, 17 Feb 2012 20:03:59 +0000 (15:03 -0500)] 
Fix open_mmap_trace missing support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix: context.h add missing documentation for packet_seek parameter
Mathieu Desnoyers [Fri, 17 Feb 2012 19:53:16 +0000 (14:53 -0500)] 
fix: context.h add missing documentation for packet_seek parameter

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup iterator.h
Mathieu Desnoyers [Fri, 17 Feb 2012 19:53:07 +0000 (14:53 -0500)] 
Cleanup iterator.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix callback.h documentation
Mathieu Desnoyers [Fri, 17 Feb 2012 19:43:31 +0000 (14:43 -0500)] 
Fix callback.h documentation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoCleanup: babeltrace.h does not need to include ctf/events.h
Mathieu Desnoyers [Fri, 17 Feb 2012 19:42:28 +0000 (14:42 -0500)] 
Cleanup: babeltrace.h does not need to include ctf/events.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI fix: Move callbacks to CTF plugin
Mathieu Desnoyers [Fri, 17 Feb 2012 19:39:27 +0000 (14:39 -0500)] 
API fix: Move callbacks to CTF plugin

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemoved unneeded ctf_* forward declarations from babeltrace.h
Mathieu Desnoyers [Fri, 17 Feb 2012 19:26:51 +0000 (14:26 -0500)] 
Removed unneeded ctf_* forward declarations from babeltrace.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoRemove unneeded forward declarations (ctf-specific) from iterator.h
Mathieu Desnoyers [Fri, 17 Feb 2012 19:24:04 +0000 (14:24 -0500)] 
Remove unneeded forward declarations (ctf-specific) from iterator.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix: move read event from iterator to event.h
Mathieu Desnoyers [Fri, 17 Feb 2012 19:21:41 +0000 (14:21 -0500)] 
fix: move read event from iterator to event.h

because it is CTF-specific.

Need to move the format registry to libbabeltrace due to
cross-dependencies between libbabeltrace and formats.

Now, the format libs depend on libbabeltrace, never the opposite.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: ctf specific events.c needs to be within CTF plugin
Mathieu Desnoyers [Fri, 17 Feb 2012 18:06:22 +0000 (13:06 -0500)] 
Fix: ctf specific events.c needs to be within CTF plugin

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI fix: packet_seek should take an index rather than offset
Mathieu Desnoyers [Fri, 17 Feb 2012 18:01:29 +0000 (13:01 -0500)] 
API fix: packet_seek should take an index rather than offset

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix API: allow packet_seek override
Mathieu Desnoyers [Fri, 17 Feb 2012 17:49:42 +0000 (12:49 -0500)] 
Fix API: allow packet_seek override

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add lib missing includes
Mathieu Desnoyers [Fri, 17 Feb 2012 17:35:56 +0000 (12:35 -0500)] 
Fix: add lib missing includes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: packet_seek is local to plugins, but can be overridden
Mathieu Desnoyers [Fri, 17 Feb 2012 17:32:55 +0000 (12:32 -0500)] 
Fix: packet_seek is local to plugins, but can be overridden

libbabeltrace should not know about them.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix API: rename unclear move_pos_slow to packet_seek
Mathieu Desnoyers [Fri, 17 Feb 2012 17:27:56 +0000 (12:27 -0500)] 
Fix API: rename unclear move_pos_slow to packet_seek

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Check for unknown format
Mathieu Desnoyers [Fri, 17 Feb 2012 17:19:39 +0000 (12:19 -0500)] 
Fix: Check for unknown format

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: do not use ctf-specific struct in format.h
Mathieu Desnoyers [Fri, 17 Feb 2012 17:15:49 +0000 (12:15 -0500)] 
Fix: do not use ctf-specific struct in format.h

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix : callback type, doc and links to libbabeltrace
Julien Desfossez [Fri, 17 Feb 2012 17:00:01 +0000 (12:00 -0500)] 
fix : callback type, doc and links to libbabeltrace

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix : callback chain len
Julien Desfossez [Fri, 17 Feb 2012 16:40:47 +0000 (11:40 -0500)] 
Fix : callback chain len

Wrong check caused a segmentation fault when checking for a callback at
the end of the callback chain.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 0.12 v0.12
Mathieu Desnoyers [Thu, 16 Feb 2012 19:36:05 +0000 (14:36 -0500)] 
Update version to 0.12

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoTypedef bt_intern_str
Julien Desfossez [Thu, 16 Feb 2012 19:34:21 +0000 (14:34 -0500)] 
Typedef bt_intern_str

Remove external dependency to glib

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoExport the list header with a new namespace
Julien Desfossez [Thu, 16 Feb 2012 19:13:19 +0000 (14:13 -0500)] 
Export the list header with a new namespace

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI : add_trace return the trace_handle id
Julien Desfossez [Thu, 16 Feb 2012 18:13:50 +0000 (13:13 -0500)] 
API : add_trace return the trace_handle id

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agofix manpage: refer to lttng(1)
Mathieu Desnoyers [Thu, 16 Feb 2012 18:07:50 +0000 (13:07 -0500)] 
fix manpage: refer to lttng(1)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI : cleanup includes
Julien Desfossez [Thu, 16 Feb 2012 17:33:25 +0000 (12:33 -0500)] 
API : cleanup includes

The user just need to include babeltrace/babeltrace.h to use the API.
Also, create a babeltrace/ctf directory to store CTF-related code.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI : Access CTF events fields
Julien Desfossez [Thu, 16 Feb 2012 16:53:44 +0000 (11:53 -0500)] 
API : Access CTF events fields

Update the iterator code to return a bt_ctf_event.
Access to field list within a scope.
Access to field values depending on type.

[ Edit by Mathieu Desnoyers: minor updates: uint64_t for timestamp, and
  style fixes. ]

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agomanpage: Add babeltrace-log.1
Mathieu Desnoyers [Thu, 16 Feb 2012 12:01:28 +0000 (07:01 -0500)] 
manpage: Add babeltrace-log.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI : seek by timestamp
Julien Desfossez [Wed, 15 Feb 2012 02:37:34 +0000 (21:37 -0500)] 
API : seek by timestamp

Add a new function to create a timestamp-based position and the support
in bt_iter_set_pos to seek to certain timestamp.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMove the add_traces_recursive out of the library
Yannick Brosseau [Tue, 14 Feb 2012 19:11:45 +0000 (14:11 -0500)] 
Move the add_traces_recursive out of the library

The exact API for this function is hard to define, so we move back
the function directly to the converter code where it can serve
as an example for applications who want to use this functionnality.

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agomanpage: use pp instead of PP
Mathieu Desnoyers [Tue, 14 Feb 2012 05:48:38 +0000 (00:48 -0500)] 
manpage: use pp instead of PP

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 0.11.1
Mathieu Desnoyers [Mon, 13 Feb 2012 23:30:39 +0000 (18:30 -0500)] 
Update version to 0.11.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd trace-collection.h to the installed headers
Alexandre Montplaisir [Mon, 13 Feb 2012 23:29:09 +0000 (18:29 -0500)] 
Add trace-collection.h to the installed headers

Or else the tarball generated by 'make dist' fails to compile with

context.c:27:41: fatal error: babeltrace/trace-collection.h: No
                 such file or directory

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 0.11 v0.11
Mathieu Desnoyers [Mon, 13 Feb 2012 15:43:20 +0000 (10:43 -0500)] 
Update version to 0.11

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd --clock-force-correlate option
Mathieu Desnoyers [Mon, 13 Feb 2012 14:26:53 +0000 (09:26 -0500)] 
Add --clock-force-correlate option

For support of older 2.0-pre traces.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolib: open trace error handling fix
Mathieu Desnoyers [Mon, 13 Feb 2012 14:03:55 +0000 (09:03 -0500)] 
lib: open trace error handling fix

When a trace from a trace collection path fails, consider this as a hard
error. Print errors to stderr rather than stdout.

The end goal is to never show an output if any of the trace specified
(or trace within a trace collection) fails to open.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUse default if there is no clock declaration
Juha Niskanen [Mon, 13 Feb 2012 13:55:20 +0000 (08:55 -0500)] 
Use default if there is no clock declaration

In absence of clock description in metadata, use a default clock
source which increments once per nanosecond.

Without this patch, the converter crashes when given old traces
that are lacking clock description block.

[ Edit by Mathieu Desnoyers: style cleanup, added clock description,
  added comments. ]

Signed-off-by: Juha Niskanen <juniskane@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoiterator: fix type warning on 32-bit build
Mathieu Desnoyers [Mon, 13 Feb 2012 13:35:12 +0000 (08:35 -0500)] 
iterator: fix type warning on 32-bit build

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUse 64-bit type for packet and content size
Juha Niskanen [Mon, 13 Feb 2012 13:33:58 +0000 (08:33 -0500)] 
Use 64-bit type for packet and content size

Expression filestats.st_size * CHAR_BIT wraps around very easily
when stored to 32-bit size_t. Currently BabelTrace cannot handle
input larger than 256Mb because of this and diagnostic messages
from this function can be incorrect because of overflow.

This patch fixes my immediate problem, but further work is needed
for proper large file support i.e. handling files bigger than 2Gb.

Signed-off-by: Juha Niskanen <juniskane@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix context API
Mathieu Desnoyers [Fri, 10 Feb 2012 19:26:16 +0000 (14:26 -0500)] 
Fix context API

- bt_context_add_traces_recursive ->
  don't have 2 symbols that just differ from a "s".
- bt_context_add_trace return values:
  - Now, nonzero is error, zero is OK.
  - Streamline with bt_context_add_traces_recursive, so none return
    trace handle IDs.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAdd missing context-internal.h
Mathieu Desnoyers [Fri, 10 Feb 2012 19:18:47 +0000 (14:18 -0500)] 
Add missing context-internal.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agostruct bt_context is opaque
Mathieu Desnoyers [Fri, 10 Feb 2012 19:18:26 +0000 (14:18 -0500)] 
struct bt_context is opaque

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate comment to match context API code
Mathieu Desnoyers [Fri, 10 Feb 2012 19:14:16 +0000 (14:14 -0500)] 
Update comment to match context API code

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoPrint loglevel names
Mathieu Desnoyers [Fri, 10 Feb 2012 18:22:47 +0000 (13:22 -0500)] 
Print loglevel names

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agobabeltrace lib cleanup, folded with open/remove trace functions
Mathieu Desnoyers [Fri, 10 Feb 2012 17:01:01 +0000 (12:01 -0500)] 
babeltrace lib cleanup, folded with open/remove trace functions

Folded patch from Yannick Brosseau <yannick.brosseau@gmail.com>, along
with various updates and cleanups, related to babeltrace lib.

Original changelog from Yannick Brosseau:
Move the trace_collection into its own file.
Port the converter to uses the new functions

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoAPI : iterator get and set position
Julien Desfossez [Fri, 10 Feb 2012 02:32:52 +0000 (21:32 -0500)] 
API : iterator get and set position

This patch implements the save and restore position on a iterator.

Passed successfully these tests :
- test 1:
save the position
read n events (tested with multiple values of n)
restore
compare the outputs

- test 2:
in loop until the end of the trace :
        save the position
        read 5 events
        restore the position
        read 5 events
compare each block of 5 events

- test 3:
save the position before printing the first event
parse the trace entirely
restore to the beginning
parse the trace entirely
compare the 2 outputs

- test 4:
seek in the future (manually tweaked the values to restore to)
compare with a normal trace starting from the restore point

[ edit: use g_new/g_new0/g_free instead of malloc/calloc/free.
  Use g_new0 anytime a structure is not explicitly initialized by
  a helper, so if it grows in the future with new fields, they will be
  zeroed. ]

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to 0.10 v0.10
Mathieu Desnoyers [Fri, 10 Feb 2012 00:44:34 +0000 (19:44 -0500)] 
Update version to 0.10

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix clock freq
Mathieu Desnoyers [Thu, 9 Feb 2012 21:05:15 +0000 (16:05 -0500)] 
Fix clock freq

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoclock: use freq field
Mathieu Desnoyers [Thu, 9 Feb 2012 13:44:48 +0000 (08:44 -0500)] 
clock: use freq field

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoShow env. in verbose mode
Mathieu Desnoyers [Tue, 7 Feb 2012 14:47:25 +0000 (09:47 -0500)] 
Show env. in verbose mode

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.042209 seconds and 4 git commands to generate.