2 * Copyright (C) 2020 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef _EVENT_NOTIFIER_ERROR_ACCOUNTING_H
9 #define _EVENT_NOTIFIER_ERROR_ACCOUNTING_H
12 #include <lttng/trigger/trigger.h>
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
,
22 enum event_notifier_error_accounting_status
23 event_notifier_error_accounting_init(uint64_t nb_bucket
);
25 enum event_notifier_error_accounting_status
26 event_notifier_error_accounting_register_kernel(
27 int kernel_event_notifier_group_fd
);
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
);
34 enum event_notifier_error_accounting_status
35 event_notifier_error_accounting_get_count(
36 const struct lttng_trigger
*trigger
,
39 void event_notifier_error_accounting_unregister_event_notifier(
40 const struct lttng_trigger
*trigger
);
42 void event_notifier_error_accounting_fini(void);
44 #endif /* _EVENT_NOTIFIER_ERROR_ACCOUNTING_H */