X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent-notifier-error-accounting.cpp;fp=src%2Fbin%2Flttng-sessiond%2Fevent-notifier-error-accounting.cpp;h=285cdbf5992376d9a975af2049f6ed9894876787;hp=d42f5802d4c677238ece78c7314fc110cf7e4e9b;hb=f149493493fbd8a3efa4748832c03278c96c38ca;hpb=2d7da3031c65c4569ff2428a7c2cad30007f3b50 diff --git a/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp b/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp index d42f5802d..285cdbf59 100644 --- 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 +namespace { 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; }; -static struct kernel_error_accounting_entry kernel_error_accounting_entry; +struct kernel_error_accounting_entry kernel_error_accounting_entry; /* Hashtable mapping uid to error_account_entry. */ -static struct lttng_ht *error_counter_uid_ht; +struct lttng_ht *error_counter_uid_ht; struct error_accounting_state { struct lttng_index_allocator *index_allocator; @@ -65,8 +66,9 @@ struct error_accounting_state { 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, @@ -113,12 +115,14 @@ const char *error_accounting_status_str( } #ifdef HAVE_LIBLTTNG_UST_CTL +namespace { 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) {