X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent.cpp;h=797219dff8cf893be2c5055b6026aea15e3a2b3a;hb=f370852feddd5554281c3ce60d7fa3dfeb8869a1;hp=284a8c472b44012ab7fb4b5948c1aac5b665f710;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/event.cpp b/src/bin/lttng-sessiond/event.cpp index 284a8c472..797219dff 100644 --- a/src/bin/lttng-sessiond/event.cpp +++ b/src/bin/lttng-sessiond/event.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2016 Jérémie Galarneau * * SPDX-License-Identifier: GPL-2.0-only @@ -10,29 +10,29 @@ #include #include -#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include - -#include "channel.h" -#include "event.h" -#include "kernel.h" -#include "lttng-sessiond.h" -#include "lttng-ust-ctl.h" -#include "lttng-ust-error.h" -#include "ust-app.h" -#include "trace-kernel.h" -#include "trace-ust.h" -#include "agent.h" -#include "utils.h" +#include +#include +#include +#include +#include +#include + +#include "channel.hpp" +#include "event.hpp" +#include "kernel.hpp" +#include "lttng-sessiond.hpp" +#include "lttng-ust-ctl.hpp" +#include "lttng-ust-error.hpp" +#include "ust-app.hpp" +#include "trace-kernel.hpp" +#include "trace-ust.hpp" +#include "agent.hpp" +#include "utils.hpp" /* * Add unique UST event based on the event name, filter bytecode and loglevel. @@ -471,6 +471,7 @@ static int agent_enable(struct agent *agt, LTTNG_ASSERT(event); LTTNG_ASSERT(agt); + rcu_read_lock(); aevent = agent_find_event(event->name, event->loglevel_type, event->loglevel, filter_expression, agt); if (!aevent) { @@ -519,6 +520,7 @@ error: agent_destroy_event(aevent); } end: + rcu_read_unlock(); free(filter); free(filter_expression); return ret;