babeltrace:master

Last commit made on 2024-04-30
Get this branch:
git clone -b master https://git.launchpad.net/babeltrace

Branch merges

Branch information

Name:
master
Repository:
lp:babeltrace

Recent commits

e6a82b0... by Simon Marchi <email address hidden>

cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition

wise_enum uses `const char *` as the string type for C++11/14 and
`std::string_view` for C++ >= 17. Change `EnableIfIsWiseEnum` to use
`wise_enum::string_type` instead of a hard-coded `const char *`, to make
compilation in C++17 possible.

Change-Id: Ie179e1f5585128950ecdc095f7b136d93ea39e41
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12497
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4e24e7b... by .eepp

bt2c::Logger: remove unused cLevel() method

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I59fb2fd48bb2166b725d8236bbf113f2fe993f99
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12485
Tested-by: jenkins <email address hidden>

f79594f... by Simon Marchi <email address hidden>

.clang-tidy: add some checks

These checks seem reasonable, enable them.

Change-Id: I4ed416a9deee2385af38c305a125cd616ec94aa0
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12482
Reviewed-by: Philippe Proulx <email address hidden>

c0db1f1... by .eepp

bt2::CommonEnumerationFieldClass::addMapping(): add missing static assertion

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: Ie5a90126d0c25c92f00dce0af962f1e64048bdbc
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12481
CI-Build: Simon Marchi <email address hidden>

e27adb9... by .eepp

cpp-common/bt2c/logging.hpp: remove no-formatting ("str") alternatives

This patch removes everything named bt2c::Logger::log*Str*() and
BT_CPPLOG*STR*().

The no-formatting versions existed to avoid a call to fmt::format_to()
when you need to log a literal string as is, without any formatting. It
was also useful to pass a user string as is.

However, in the end, I don't think such an optimization is necessary:

• We don't use the no-formatting versions that much compared to messages
  with a format string.

• fmt::format_to() is pretty fast without any replacement field.

• We're talking about logging performance.

• This patch removes a lot of often redudant code from `logging.hpp`.

Adapt the current no-formatting logging calls accordingly.

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: Ie02ea492e220c7ce9b72aaf8728fb7d2211e0bc0
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12479
Reviewed-by: Simon Marchi <email address hidden>
Tested-by: jenkins <email address hidden>

e40ac8f... by .eepp

Fix: cpp-common/bt2c/logging.hpp: add missing `template` keyword

In very specific contexts, it's possible that a `bt2c::Logger` reference
is a dependent type, for example:

    template <typename T>
    struct X
    {
        const bt2c::Logger& logger() const noexcept
        {
            return /* some logger reference */;
        }

        void log()
        {
            BT_CPPLOGI_SPEC(this->logger(), "Hello!");
        }
    };

In that case, the BT_CPPLOGI_SPEC() macro eventually expands to
something like:

    this->logger().log<bt2c::Logger::Level::Info,
                       false>(__FILE__, __func__, __LINE__, "Hello!");

`this->logger()` is basically `X<T>::logger()`. Therefore, from the
log() method template point of view, the type of `this` depends on `T`,
that is, it's a dependent name. This example above won't build.

In that case, we need the `template` keyword to call the method:

    this->logger().template log<bt2c::Logger::Level::Info,
                                false>(__FILE__, __func__,
                                       __LINE__, "Hello!");

Using the `template` keyword or not would normally be a per-call
decision, but those BT_CPPLOG*() macros do the call themselves.

Knowing this, this patch adds the `template` keyword to all the logging
method calls from the BT_CPPLOG*() macros, just in case.

The current project builds because it doesn't have this specific
situation, but it could happen in the future.

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I2847105746825d94cf71ed3abbd56fac0f160a2d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12477
Reviewed-by: Simon Marchi <email address hidden>
Tested-by: jenkins <email address hidden>

eced29f... by .eepp

Keep a single `.gitignore` file

We have a few arbitrary directory-specific `.gitignore` files and I'd
like to keep things consistent here: either dedicated `.gitignore` files
or a single root `.gitignore` file.

Choose the latter as it's simpler to maintain.

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: Ib679a19cd20adb0034860073e04388d7d6e084f6
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12471

3b4f52a... by .eepp

.gitignore: categorize rules and sort them per category

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I4a80709271b189469ba6b3869410ff41196ae551
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12470

fed6371... by .eepp

.gitignore: ignore all `*.egg-info`

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I804bbb158ba2ccb5dbe326b4eb12d5e13d06c62a
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12469
Reviewed-by: Simon Marchi <email address hidden>

d97afa4... by .eepp

.gitignore: ignore all `/src/plugins/ctf/[...]/tsdl/parser.*pp`

Signed-off-by: Philippe Proulx <email address hidden>
Change-Id: I3d8e45d6a8482552d11c7292ddcdb21514e683b9
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12468
Reviewed-by: Simon Marchi <email address hidden>