projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sessiond: add tracer-agnostic trace hierarchy classes
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
trace-ust.cpp
diff --git
a/src/bin/lttng-sessiond/trace-ust.cpp
b/src/bin/lttng-sessiond/trace-ust.cpp
index 4be27f89716aed38223e4242dab603345bc093bd..de368a3baa054a25616f342017b0d1fdc3ecf1f4 100644
(file)
--- a/
src/bin/lttng-sessiond/trace-ust.cpp
+++ b/
src/bin/lttng-sessiond/trace-ust.cpp
@@
-13,16
+13,16
@@
#include <unistd.h>
#include <inttypes.h>
#include <unistd.h>
#include <inttypes.h>
-#include <common/common.h>
-#include <common/defaults.h>
-#include <common/trace-chunk.h>
-#include <common/utils.h>
+#include <common/common.h
pp
>
+#include <common/defaults.h
pp
>
+#include <common/trace-chunk.h
pp
>
+#include <common/utils.h
pp
>
-#include "buffer-registry.h"
-#include "trace-ust.h"
-#include "utils.h"
-#include "ust-app.h"
-#include "agent.h"
+#include "buffer-registry.h
pp
"
+#include "trace-ust.h
pp
"
+#include "utils.h
pp
"
+#include "ust-app.h
pp
"
+#include "agent.h
pp
"
/*
* Match function for the events hash table lookup.
/*
* Match function for the events hash table lookup.
@@
-167,6
+167,7
@@
struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
+ ASSERT_RCU_READ_LOCKED();
/*
* If we receive an empty string for channel name, it means the
* default channel name is requested.
/*
* If we receive an empty string for channel name, it means the
* default channel name is requested.
@@
-204,6
+205,7
@@
struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
LTTNG_ASSERT(name);
LTTNG_ASSERT(ht);
LTTNG_ASSERT(name);
LTTNG_ASSERT(ht);
+ ASSERT_RCU_READ_LOCKED();
key.name = name;
key.filter = filter;
key.name = name;
key.filter = filter;
@@
-269,7
+271,7
@@
struct ltt_ust_session *trace_ust_create_session(uint64_t session_id)
struct ltt_ust_session *lus;
/* Allocate a new ltt ust session */
struct ltt_ust_session *lus;
/* Allocate a new ltt ust session */
- lus =
(ltt_ust_session *) zmalloc(sizeof(struct ltt_ust_session)
);
+ lus =
zmalloc<ltt_ust_session>(
);
if (lus == NULL) {
PERROR("create ust session zmalloc");
goto error_alloc;
if (lus == NULL) {
PERROR("create ust session zmalloc");
goto error_alloc;
@@
-348,7
+350,7
@@
struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan,
LTTNG_ASSERT(chan);
LTTNG_ASSERT(chan);
- luc =
(ltt_ust_channel *) zmalloc(sizeof(struct ltt_ust_channel)
);
+ luc =
zmalloc<ltt_ust_channel>(
);
if (luc == NULL) {
PERROR("ltt_ust_channel zmalloc");
goto error;
if (luc == NULL) {
PERROR("ltt_ust_channel zmalloc");
goto error;
@@
-461,7
+463,7
@@
enum lttng_error_code trace_ust_create_event(struct lttng_event *ev,
goto error;
}
goto error;
}
- local_ust_event =
(ltt_ust_event *) zmalloc(sizeof(struct ltt_ust_event)
);
+ local_ust_event =
zmalloc<ltt_ust_event>(
);
if (local_ust_event == NULL) {
PERROR("ust event zmalloc");
ret = LTTNG_ERR_NOMEM;
if (local_ust_event == NULL) {
PERROR("ust event zmalloc");
ret = LTTNG_ERR_NOMEM;
@@
-685,7
+687,7
@@
struct ltt_ust_context *trace_ust_create_context(
goto end;
}
goto end;
}
- uctx =
(ltt_ust_context *) zmalloc(sizeof(struct ltt_ust_context)
);
+ uctx =
zmalloc<ltt_ust_context>(
);
if (!uctx) {
PERROR("zmalloc ltt_ust_context");
goto end;
if (!uctx) {
PERROR("zmalloc ltt_ust_context");
goto end;
@@
-811,7
+813,7
@@
static int id_tracker_add_id(struct ust_id_tracker *id_tracker, int id)
retval = LTTNG_ERR_PROCESS_ATTR_EXISTS;
goto end;
}
retval = LTTNG_ERR_PROCESS_ATTR_EXISTS;
goto end;
}
- tracker_node =
(ust_id_tracker_node *) zmalloc(sizeof(*tracker_node)
);
+ tracker_node =
zmalloc<ust_id_tracker_node>(
);
if (!tracker_node) {
retval = LTTNG_ERR_NOMEM;
goto end;
if (!tracker_node) {
retval = LTTNG_ERR_NOMEM;
goto end;
This page took
0.025858 seconds
and
4
git commands to generate.