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: ODR violation results in memory corruption
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
event-notifier-error-accounting.cpp
diff --git
a/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp
b/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp
index d42f5802d4c677238ece78c7314fc110cf7e4e9b..285cdbf5992376d9a975af2049f6ed9894876787 100644
(file)
--- a/
src/bin/lttng-sessiond/event-notifier-error-accounting.cpp
+++ b/
src/bin/lttng-sessiond/event-notifier-error-accounting.cpp
@@
-25,6
+25,7
@@
#define ERROR_COUNTER_INDEX_HT_INITIAL_SIZE 16
#define ERROR_COUNTER_INDEX_HT_INITIAL_SIZE 16
+namespace {
struct index_ht_entry {
struct lttng_ht_node_u64 node;
uint64_t error_counter_index;
struct index_ht_entry {
struct lttng_ht_node_u64 node;
uint64_t error_counter_index;
@@
-53,10
+54,10
@@
struct kernel_error_accounting_entry {
int error_counter_fd;
};
int error_counter_fd;
};
-st
atic st
ruct kernel_error_accounting_entry kernel_error_accounting_entry;
+struct kernel_error_accounting_entry kernel_error_accounting_entry;
/* Hashtable mapping uid to error_account_entry. */
/* Hashtable mapping uid to error_account_entry. */
-st
atic st
ruct lttng_ht *error_counter_uid_ht;
+struct lttng_ht *error_counter_uid_ht;
struct error_accounting_state {
struct lttng_index_allocator *index_allocator;
struct error_accounting_state {
struct lttng_index_allocator *index_allocator;
@@
-65,8
+66,9
@@
struct error_accounting_state {
uint64_t number_indices;
};
uint64_t number_indices;
};
-static struct error_accounting_state ust_state;
-static struct error_accounting_state kernel_state;
+struct error_accounting_state ust_state;
+struct error_accounting_state kernel_state;
+} /* namespace */
static inline void get_trigger_info_for_log(const struct lttng_trigger *trigger,
const char **trigger_name,
static inline void get_trigger_info_for_log(const struct lttng_trigger *trigger,
const char **trigger_name,
@@
-113,12
+115,14
@@
const char *error_accounting_status_str(
}
#ifdef HAVE_LIBLTTNG_UST_CTL
}
#ifdef HAVE_LIBLTTNG_UST_CTL
+namespace {
struct event_notifier_counter {
pthread_mutex_t lock;
long count;
};
struct event_notifier_counter {
pthread_mutex_t lock;
long count;
};
-static struct event_notifier_counter the_event_notifier_counter;
+struct event_notifier_counter the_event_notifier_counter;
+} /* namespace */
static void free_ust_error_accounting_entry(struct rcu_head *head)
{
static void free_ust_error_accounting_entry(struct rcu_head *head)
{
This page took
0.023927 seconds
and
4
git commands to generate.