X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.hpp;h=d0cbd217ce857aa48c0e7164e2143de66e2f7986;hb=4bcf2294f0701b731d620c38216e1922e919e1b9;hp=f9238edc35c0830c28b6e6e9702358b3f9fed801;hpb=d7bfb9b0fa35679d3e728b9165699d9faf905539;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.hpp b/src/bin/lttng-sessiond/ust-app.hpp index f9238edc3..d0cbd217c 100644 --- a/src/bin/lttng-sessiond/ust-app.hpp +++ b/src/bin/lttng-sessiond/ust-app.hpp @@ -17,7 +17,9 @@ #include "trace-ust.hpp" #include "ust-registry.hpp" +#include "ust-registry-session.hpp" #include "session.hpp" +#include "ust-field-convert.hpp" #define UST_APP_EVENT_LIST_SIZE 32 @@ -323,21 +325,28 @@ struct ust_app { * (ust_app_event_notifier_rule) by their token's value. */ struct lttng_ht *token_to_event_notifier_rule_ht; + + lttng::sessiond::ust::ctl_field_quirks ctl_field_quirks() const; }; +/* + * Due to a bug in g++ < 7.1, this specialization must be enclosed in the fmt namespace, + * see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480. + */ +namespace fmt { template <> -struct fmt::formatter : fmt::formatter { +struct formatter : formatter { template typename FormatCtx::iterator format(const ust_app& app, FormatCtx& ctx) { - return fmt::format_to(ctx.out(), + return format_to(ctx.out(), "{{ procname = `{}`, ppid = {}, pid = {}, uid = {}, gid = {}, version = {}.{}, registration time = {} }}", app.name, app.ppid, app.pid, app.uid, app.gid, app.v_major, app.v_minor, lttng::utils::time_to_iso8601_str(app.registration_time)); } }; - +} /* namespace fmt */ #ifdef HAVE_LIBLTTNG_UST_CTL @@ -376,7 +385,7 @@ int ust_app_recv_notify(int sock); void ust_app_add(struct ust_app *app); struct ust_app *ust_app_create(struct ust_register_msg *msg, int sock); void ust_app_notify_sock_unregister(int sock); -ssize_t ust_app_push_metadata(const ust_registry_session::locked_ptr& registry, +ssize_t ust_app_push_metadata(const lttng::sessiond::ust::registry_session::locked_ptr& registry, struct consumer_socket *socket, int send_zero_data); void ust_app_destroy(struct ust_app *app); @@ -626,7 +635,7 @@ void ust_app_notify_sock_unregister(int sock __attribute__((unused))) static inline ssize_t ust_app_push_metadata( - ust_registry_session *registry __attribute__((unused)), + lttng::sessiond::ust::registry_session *registry __attribute__((unused)), struct consumer_socket *socket __attribute__((unused)), int send_zero_data __attribute__((unused))) {