projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: size-based rotation threshold exceeded in per-pid tracing (2/2)
[lttng-tools.git]
/
src
/
common
/
tracker.cpp
diff --git
a/src/common/tracker.cpp
b/src/common/tracker.cpp
index 6bb84d0cad8175c8a879de39b056e03546099db0..e988599bae9a27a0c4859e6a577b191a5ff57094 100644
(file)
--- a/
src/common/tracker.cpp
+++ b/
src/common/tracker.cpp
@@
-20,9
+20,10
@@
#include <type_traits>
#include <type_traits>
+namespace {
struct process_attr_tracker_values_comm_header {
uint32_t count;
struct process_attr_tracker_values_comm_header {
uint32_t count;
-};
+}
LTTNG_PACKED
;
struct process_attr_tracker_value_comm {
/* enum lttng_process_attr_value_type */
struct process_attr_tracker_value_comm {
/* enum lttng_process_attr_value_type */
@@
-32,7
+33,8
@@
struct process_attr_tracker_value_comm {
/* Includes the '\0' terminator. */
uint32_t name_len;
} value;
/* Includes the '\0' terminator. */
uint32_t name_len;
} value;
-};
+} LTTNG_PACKED;
+} /* namespace */
#define GET_INTEGRAL_COMM_VALUE(value_ptr, as_type) \
((as_type)(std::is_signed<as_type>::value ? (value_ptr)->u._signed : \
#define GET_INTEGRAL_COMM_VALUE(value_ptr, as_type) \
((as_type)(std::is_signed<as_type>::value ? (value_ptr)->u._signed : \
@@
-71,7
+73,7
@@
enum lttng_error_code process_attr_value_from_comm(
{
char *name = NULL;
enum lttng_error_code ret = LTTNG_OK;
{
char *name = NULL;
enum lttng_error_code ret = LTTNG_OK;
- struct process_attr_value *value =
(process_attr_value *) zmalloc(sizeof(*value)
);
+ struct process_attr_value *value =
zmalloc<process_attr_value>(
);
if (!value) {
ret = LTTNG_ERR_NOMEM;
if (!value) {
ret = LTTNG_ERR_NOMEM;
@@
-214,7
+216,7
@@
static void process_attr_tracker_value_destructor(void *ptr)
struct lttng_process_attr_values *lttng_process_attr_values_create(void)
{
struct lttng_process_attr_values *lttng_process_attr_values_create(void)
{
- struct lttng_process_attr_values *values =
(lttng_process_attr_values *) zmalloc(sizeof(*values)
);
+ struct lttng_process_attr_values *values =
zmalloc<lttng_process_attr_values>(
);
if (!values) {
goto end;
if (!values) {
goto end;
@@
-426,7
+428,7
@@
struct process_attr_value *process_attr_value_copy(
goto end;
}
goto end;
}
- new_value =
(process_attr_value *) zmalloc(sizeof(*new_value)
);
+ new_value =
zmalloc<process_attr_value>(
);
if (!new_value) {
goto end;
}
if (!new_value) {
goto end;
}
This page took
0.025015 seconds
and
4
git commands to generate.