projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: remove unused _trace_abi field from the CTF2 trace class visitor
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
lttng-syscall.cpp
diff --git
a/src/bin/lttng-sessiond/lttng-syscall.cpp
b/src/bin/lttng-sessiond/lttng-syscall.cpp
index f14563457aeff498f1815d83c5725ce316febf76..8a4ce39ea8e6bcd6b9fbf71d9cd39f02d2f99ad1 100644
(file)
--- a/
src/bin/lttng-sessiond/lttng-syscall.cpp
+++ b/
src/bin/lttng-sessiond/lttng-syscall.cpp
@@
-8,13
+8,13
@@
#define _LGPL_SOURCE
#include <stdbool.h>
#define _LGPL_SOURCE
#include <stdbool.h>
-#include <common/common.h>
-#include <common/kernel-ctl/kernel-ctl.h>
+#include <common/common.h
pp
>
+#include <common/kernel-ctl/kernel-ctl.h
pp
>
-#include "lttng-sessiond.h"
-#include "kernel.h"
-#include "lttng-syscall.h"
-#include "utils.h"
+#include "lttng-sessiond.h
pp
"
+#include "kernel.h
pp
"
+#include "lttng-syscall.h
pp
"
+#include "utils.h
pp
"
/* Global syscall table. */
struct syscall *syscall_table;
/* Global syscall table. */
struct syscall *syscall_table;
@@
-60,7
+60,7
@@
int syscall_init_table(int tracer_fd)
}
nbmem = SYSCALL_TABLE_INIT_SIZE;
}
nbmem = SYSCALL_TABLE_INIT_SIZE;
- syscall_table =
(struct syscall *) zmalloc(sizeof(struct syscall) *
nbmem);
+ syscall_table =
calloc<struct syscall>(
nbmem);
if (!syscall_table) {
ret = -errno;
PERROR("syscall list zmalloc");
if (!syscall_table) {
ret = -errno;
PERROR("syscall list zmalloc");
@@
-156,6
+156,8
@@
static void destroy_syscall_ht(struct lttng_ht *ht)
struct lttng_ht_iter iter;
struct syscall *ksyscall;
struct lttng_ht_iter iter;
struct syscall *ksyscall;
+ ASSERT_RCU_READ_LOCKED();
+
DBG3("Destroying syscall hash table.");
if (!ht) {
DBG3("Destroying syscall hash table.");
if (!ht) {
@@
-169,7
+171,7
@@
static void destroy_syscall_ht(struct lttng_ht *ht)
LTTNG_ASSERT(!ret);
free(ksyscall);
}
LTTNG_ASSERT(!ret);
free(ksyscall);
}
-
ht_cleanup_push
(ht);
+
lttng_ht_destroy
(ht);
}
/*
}
/*
@@
-208,7
+210,7
@@
static struct syscall *lookup_syscall(struct lttng_ht *ht, const char *name)
lttng_ht_lookup(ht, (void *) name, &iter);
node = lttng_ht_iter_get_node_str(&iter);
if (node) {
lttng_ht_lookup(ht, (void *) name, &iter);
node = lttng_ht_iter_get_node_str(&iter);
if (node) {
- ksyscall =
caa_container_of(node, struct syscall,
node);
+ ksyscall =
lttng::utils::container_of(node, &syscall::
node);
}
return ksyscall;
}
return ksyscall;
@@
-243,7
+245,7
@@
static int add_syscall_to_ht(struct lttng_ht *ht, unsigned int index,
LTTNG_ASSERT(ht);
LTTNG_ASSERT(ht);
- ksyscall =
(struct syscall *) zmalloc(sizeof(*ksyscall)
);
+ ksyscall =
zmalloc<struct syscall>(
);
if (!ksyscall) {
ret = -LTTNG_ERR_NOMEM;
goto error;
if (!ksyscall) {
ret = -LTTNG_ERR_NOMEM;
goto error;
@@
-286,7
+288,7
@@
ssize_t syscall_table_list(struct lttng_event **_events)
* them might not be valid. The count below will make sure to return the
* right size of the events array.
*/
* them might not be valid. The count below will make sure to return the
* right size of the events array.
*/
- events =
(lttng_event *) zmalloc(syscall_table_nb_entry * sizeof(*events)
);
+ events =
calloc<lttng_event>(syscall_table_nb_entry
);
if (!events) {
PERROR("syscall table list zmalloc");
ret = -LTTNG_ERR_NOMEM;
if (!events) {
PERROR("syscall table list zmalloc");
ret = -LTTNG_ERR_NOMEM;
This page took
0.025827 seconds
and
4
git commands to generate.