[lttng-dev] [RELEASE] Babeltrace 2.0.0-pre4

Jérémie Galarneau jeremie.galarneau at efficios.com
Mon Sep 18 22:22:49 UTC 2017


Hi everyone!

We are happy to announce the release of Babeltrace 2.0.0-pre4.


What's new since pre3?
----------------------

* Project-wide:
  * Lots of fixes in all the project's modules (Python bindings,
    library, CLI, plugins, tests, build system).

  * Continued efforts to port Babeltrace 2 to other platforms such
    as macOS and Windows.

  * Improve terminal color support.

    Only colorize both the standard output and error streams if _both_
    are connected to a color-supporting terminal.

    Introduce a new environment variable, `BABELTRACE_TERM_COLOR`, which
    can be set to `AUTO` (default), `NEVER`, or `ALWAYS` to force
    specific configurations. Remove the `BABELTRACE_FORCE_COLORS`
    environment variable support which is the equivalent of
    `BABELTRACE_TERM_COLOR=ALWAYS`.

  * Remove the `check` target in the subdirectories of tests/. Use a
    single `check` target in the tests/ directory like the project used
    to do to execute all tests even if one fails.

  * Add `CONTRIBUTING.adoc` which brings together all the development
    documentations. This guide is not complete yet, but it contains what
    used to be written in different files like the reference counting
    guide and the logging guide.


* Library:
  * bt_notification_event_create() and
    bt_notification_inactivity_create(): create an empty clock class
    priority map when the parameter is `NULL`.

  * For all functions which add a listener to an object: pass an
    optional remove listener when calling it. This is useful to keep
    per-listener resources and free them when it is guaranteed that the
    listener won't be called in the future (usually when the object is
    destroyed or finalized).

  * bt_ctf_clock_value_create(): freeze the clock class parameter on
    success.

  * Do not finalize a non-initialized user notification iterator.

  * Add the `bt_query_executor` object and its API. This is used to
    contain a query performed on a component class: both the user
    querying the class and the class have access to the same query
    executor object. Just like a graph, a query executor can be
    canceled, in which case the user query method should quit instead of
    retrying system calls.

  * CTF writer: do not truncate a stream file at each packet flush, but
    only when destroying it.

  * Disallow recursively consuming a graph object, that is, make it
    impossible for component methods and graph listeners to run the
    graph while it's running.

  * Add an _output port notification iterator_ object and API. When such
    a notification iterator is created on an output port with
    bt_output_port_notification_iterator_create(), the utility adds a
    special sink component to the graph and connects the chosen output
    port to its input port. This special sink component consumes
    notifications and transfers them to the output port notification
    iterator. This effectively allows the graph's user to get
    notification objects without creating a dedicated sink component.

    What used to be called a simple notification iterator is now called
    a _private connection notification iterator_, as this specific
    notification iterator is created from a private connection object.

    The common bt_notification_iterator_next() and
    bt_notification_iterator_get_notification() functions are used for
    all types of notification iterators.

  * Split the clock class and clock value APIs in different headers.

  * Rename bt_X_from_private_X() to bt_X_from_private(), where X is an
    object name which can be converted from its private representation
    to its public representation.

  * Make a returned enumeration field type mapping iterator at the
    "before the first element" position like it is the case for the
    notification iterator. This means you need to call the "next" and
    "get" functions in this order when you iterate.

  * Add bt_ctf_field_is_set() and bt_ctf_field_reset() to view and
    control the state of a CTF IR field's value. When a field is
    created, it is considered _not set_, until you set its value (or,
    for compound fields, until you set all its values, recursively).


* Python bindings:
  * Implement the `babeltrace` package using the new `bt2` package. Add
    tests for the `babeltrace` package. The LTTng analyses project
    <https://github.com/lttng/lttng-analyses> works as is with
    Babeltrace 2's reworked `babeltrace` package.

  * Remove the public `value` getter property of value and field
    objects. The public `value` setter property is still available to
    assign a raw value to a wrapped Babeltrace object. We don't need the
    getter because the objects act like native Python objects anyway
    (for example, a `bt2` integer field can be used where a Python
    integral number (`int`, for example) can be used).

  * Wrap the new C query executor object and API.

  * Wrap the new C output port notification iterator object and API.

  * Add the `bt2.TraceCollectionNotificationIterator` class.

    This class's constructor accepts a list of source component
    specifiers. It creates a graph, adds a filter.utils.muxer component,
    adds each of the specified source components using the specified
    parameters, and connects all of them to the muxer. A trace
    collection notification iterator is the equivalent of an output port
    notification iterator on its muxer's output port.

    The object also supports a stream intersection mode, and optional
    global beginning and end timestamps (trimming is done after the
    muxer).


* Plugins:
  * filter.lttng-utils.debug-info:
    * Add logging.

  * filter.utils.trimmer:
    * Add logging.

    * Allow the `begin` and `end` parameters to be integer values (ns
      since Epoch).

  * source.ctf.fs:
    * Accept negative clock offsets in the metadata stream.

    * Add logging in the query functions.

    * Perform automatic packet indexing when the LTTng-specific index
      files are missing or malformed. This is internal, but it makes the
      `trace-info` query work with non-LTTng traces, for example.

  * sink.ctf.fs:
    * Add logging.

  * sink.text.pretty:
    * Only print the negative timestamp warning once.


* CLI:
  * Do not use the --component option to specify the component class to
    query in the `babeltrace query` command because the component class
    is mandatory. The old usage:

        babeltrace [GEN OPTS] query [OPTS] OBJECT --component=TYPE.PLUGIN.CLS

    is replaced with this:

        babeltrace [GEN OPTS] query [OPTS] TYPE.PLUGIN.CLS OBJECT


Let us know of all problems/bugs you encounter with this release!
Jérémie

Project website: http://diamon.org/babeltrace/
Download link: https://www.efficios.com/files/babeltrace/babeltrace-2.0.0-pre4.tar.bz2

-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list