| 1 | /* |
| 2 | * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-only |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef _LTT_EVENT_H |
| 9 | #define _LTT_EVENT_H |
| 10 | |
| 11 | #include "trace-kernel.h" |
| 12 | #include "trace-ust.h" |
| 13 | |
| 14 | struct agent; |
| 15 | |
| 16 | int event_kernel_disable_event(struct ltt_kernel_channel *kchan, |
| 17 | const char *event_name, enum lttng_event_type event_type); |
| 18 | |
| 19 | int event_kernel_enable_event(struct ltt_kernel_channel *kchan, |
| 20 | struct lttng_event *event, char *filter_expression, |
| 21 | struct lttng_bytecode *filter); |
| 22 | |
| 23 | int map_event_kernel_disable_event(struct ltt_kernel_map *kmap, |
| 24 | uint64_t action_tracer_token); |
| 25 | |
| 26 | int map_event_kernel_enable_event(struct ltt_kernel_map *kmap, |
| 27 | const struct lttng_credentials *creds, |
| 28 | uint64_t tracer_token, |
| 29 | const struct lttng_event_rule *event_rule, |
| 30 | struct lttng_map_key *key); |
| 31 | |
| 32 | int event_ust_enable_tracepoint(struct ltt_ust_session *usess, |
| 33 | struct ltt_ust_channel *uchan, struct lttng_event *event, |
| 34 | char *filter_expression, |
| 35 | struct lttng_bytecode *filter, |
| 36 | struct lttng_event_exclusion *exclusion, |
| 37 | bool internal_event); |
| 38 | |
| 39 | enum lttng_error_code map_event_ust_enable_tracepoint( |
| 40 | struct ltt_ust_session *usess, |
| 41 | struct ltt_ust_map *umap, |
| 42 | uint64_t tracer_token, |
| 43 | char *ev_name, |
| 44 | struct lttng_map_key *key, |
| 45 | enum lttng_event_type ev_type, |
| 46 | enum lttng_loglevel_type ev_loglevel_type, |
| 47 | int ev_loglevel_value, |
| 48 | char *filter_expression, |
| 49 | struct lttng_bytecode *filter, |
| 50 | struct lttng_event_exclusion *exclusion, |
| 51 | bool internal_event); |
| 52 | |
| 53 | int event_ust_disable_tracepoint(struct ltt_ust_session *usess, |
| 54 | struct ltt_ust_channel *uchan, const char *event_name); |
| 55 | |
| 56 | enum lttng_error_code map_event_ust_disable_tracepoint( |
| 57 | struct ltt_ust_session *usess, |
| 58 | struct ltt_ust_map *umap, |
| 59 | uint64_t tracer_token, |
| 60 | char *ev_name, |
| 61 | struct lttng_map_key *key, |
| 62 | enum lttng_event_type ev_type, |
| 63 | enum lttng_loglevel_type ev_loglevel_type, |
| 64 | int ev_loglevel_value, |
| 65 | char *filter_expression, |
| 66 | struct lttng_bytecode *filter, |
| 67 | struct lttng_event_exclusion *exclusion, |
| 68 | bool internal_event); |
| 69 | |
| 70 | int event_ust_disable_all_tracepoints(struct ltt_ust_session *usess, |
| 71 | struct ltt_ust_channel *uchan); |
| 72 | |
| 73 | int map_event_ust_disable_all_tracepoints(struct ltt_ust_session *usess, |
| 74 | struct ltt_ust_map *umap); |
| 75 | |
| 76 | int event_agent_enable(struct ltt_ust_session *usess, struct agent *agt, |
| 77 | struct lttng_event *event, struct lttng_bytecode *filter, |
| 78 | char *filter_expression); |
| 79 | int event_agent_enable_all(struct ltt_ust_session *usess, struct agent *agt, |
| 80 | struct lttng_event *event, struct lttng_bytecode *filter, |
| 81 | char *filter_expression); |
| 82 | |
| 83 | int event_agent_disable(struct ltt_ust_session *usess, struct agent *agt, |
| 84 | const char *event_name); |
| 85 | int event_agent_disable_all(struct ltt_ust_session *usess, struct agent *agt); |
| 86 | |
| 87 | int trigger_agent_enable( |
| 88 | const struct lttng_trigger *trigger, struct agent *agt); |
| 89 | int trigger_agent_disable( |
| 90 | const struct lttng_trigger *trigger, struct agent *agt); |
| 91 | |
| 92 | const char *event_get_default_agent_ust_name(enum lttng_domain_type domain); |
| 93 | |
| 94 | #endif /* _LTT_EVENT_H */ |