Implement tracef test application "gen-ust-tracef"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Implement test_event_tracef

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add gen-ust-tracef binary to gitignore

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: alignment problems on targets not supporting unaligned access.

Accessing floats, doubles and 64 bit int at unaligned addresses is not
supported on all configurations of arm processors and if it is it's
emulated and slow. This patch replaces direct assignments with memcpy.

Signed-off-by: Fredrik Markström <fredrik.markstrom@gmail.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add the load session API call

Introduce lttng_load_session(attr) and some setter/getter for the
attribute object.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add hidden attribute to some common functions

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add missing test files to EXTRA_DIST

Signed-off-by: David Goulet <dgoulet@efficios.com>
Update version to v2.5.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: remove the default GIT_VERSION

This is to allow different version control other than git.

Tested-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: add dependency to libcommon for python binding

This patch adds the missing dependency to libcommon that contains the
definition of log_add_time.

Signed-off-by: Paul Woegerer <paul_woegerer@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: wrong casting of return value

The function uri_parse_str_urls return a ssize_t and the return was
casted to a size_t. This caused the following error checking to fail as
-1 was interpreted as 18446744073709551615.

Fixes #803

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: missing context type string in save for ust context

Return string for LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER was missing and
caused an error on save when a context of PERF_THREAD_COUNTER type was
present (Error: Invalid parameter).

Fixes #804

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mi: mi backend + mi for command version

The machine interface option is now available for version. Other
commands will shortly follow. Mi backend is expected to grow with
addition of mi support to other commands.

How to use:
	lttng --mi <mi_output_type> <command>

This syntax will be the same for all commands. Currently *only xml is
supported as machine interface output.*

As for errors handling, if an error/warning occurs while using mi it
will be reported on stderr as normal. The integrity of the mi output
cannot be guaranteed if an error/warning occurs. The error output format
is consistent and easy for a machine client to parse. Thus no mi output
format is required for error output.

Example:
	lttng --mi xml version
Output:
<?xml version="1.0" encoding="UTF-8"?>
  <command>
    <name>version</name>
    <output>
      <string>2.4.0-rc2</string>
      <major>2</major>
      <minor>4</minor>
      <patchLevel>0</patchLevel>
      <name>Époque Opaque</name>
      <description>The Époque Opaque is a black IPA from Trou du Diable
      brewery. The nose is eerily reminiscent of the coffee crisp candy from
      of our childhood. These strong mocha accents are present on the palate,
      which are quickly subdued by Japanese and Australian hops leading to a
      final state of satisfaction enjoyable for any fan of bitter
      beer.</description>
      <url>http://lttng.org</url>
      <license>lttng is free software and under the GPL license and part
      LGPL</license>
  </output>
</command>

Signed-off-by: Olivier Cotte <olivier.cotte@polymtl.ca>
Signed-off-by: Jonathan Rajotte <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mi: add mi support for lttng struct

Add mi-lttng support to the following struct:
    lttng_domain
    lttng_channel
    lttng_channel_attr
    lttng_event
        +multiple mi utility format:
            common attribute
            tracepoint_loglevel
            tracepoint_no_loglevel
            function probe
            function entry
    lttng_event_field

mi-lttng other element
    pid element
Mi: support for command list
Mi: mi xsd validation

Command list and version supported
Mi version command: add commit version to mi version
Fix: remove extra linking due to add of mi-lttng to libcommon