sessiond: Implement kernel event notifier error counter
[deliverable/lttng-tools.git] / src / bin / lttng-sessiond / event-notifier-error-accounting.h
1 /*
2 * Copyright (C) 2020 Francis Deslauriers <francis.deslauriers@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8 #ifndef _EVENT_NOTIFIER_ERROR_ACCOUNTING_H
9 #define _EVENT_NOTIFIER_ERROR_ACCOUNTING_H
10
11 #include <stdint.h>
12 #include <lttng/trigger/trigger.h>
13
14 enum event_notifier_error_accounting_status {
15 EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK,
16 EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_ERR,
17 EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NOT_FOUND,
18 EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NOMEM,
19 EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NO_INDEX_AVAILABLE,
20 };
21
22 enum event_notifier_error_accounting_status
23 event_notifier_error_accounting_init(uint64_t nb_bucket);
24
25 enum event_notifier_error_accounting_status
26 event_notifier_error_accounting_register_kernel(
27 int kernel_event_notifier_group_fd);
28
29 enum event_notifier_error_accounting_status
30 event_notifier_error_accounting_register_event_notifier(
31 const struct lttng_trigger *trigger,
32 uint64_t *error_counter_index);
33
34 enum event_notifier_error_accounting_status
35 event_notifier_error_accounting_get_count(
36 const struct lttng_trigger *trigger,
37 uint64_t *count);
38
39 void event_notifier_error_accounting_unregister_event_notifier(
40 const struct lttng_trigger *trigger);
41
42 void event_notifier_error_accounting_fini(void);
43
44 #endif /* _EVENT_NOTIFIER_ERROR_ACCOUNTING_H */
This page took 0.036957 seconds and 6 git commands to generate.