X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fevents.h;h=5fb7a7804a1807ba8d5f22e960c2b31ccae2d5e0;hb=b01155bac7199bfef02b9bc06e85421c28859626;hp=e32480a98791286c5ad7f46d59f0b646746e8941;hpb=dffef45d53ab388fd08c19e8865b245b40ca9dff;p=lttng-modules.git diff --git a/include/lttng/events.h b/include/lttng/events.h index e32480a9..5fb7a780 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -10,6 +10,7 @@ #ifndef _LTTNG_EVENTS_H #define _LTTNG_EVENTS_H +#include #include #include #include @@ -169,6 +170,7 @@ struct lttng_perf_counter_field { struct lttng_probe_ctx { struct lttng_event *event; + struct lttng_event_notifier *event_notifier; // Not sure if we will ever need it. uint8_t interruptible; }; @@ -211,6 +213,7 @@ struct lttng_event_desc { const struct lttng_event_field *fields; /* event payload */ unsigned int nr_fields; struct module *owner; + void *event_notifier_callback; }; struct lttng_probe_desc { @@ -348,6 +351,7 @@ struct lttng_event_notifier { struct list_head bytecode_runtime_head; int has_enablers_without_bytecode; + void (*send_notification)(struct lttng_event_notifier *event_notifier); struct lttng_event_notifier_group *group; /* Weak ref */ }; @@ -604,6 +608,7 @@ struct lttng_session { struct lttng_event_notifier_group { struct file *file; /* File associated to event notifier group */ + struct file *notif_file; /* File used to expose notifications to userspace. */ struct list_head node; /* event notifier group list */ struct list_head enablers_head; /* List of enablers */ struct list_head event_notifiers_head; /* List of event notifier */ @@ -613,6 +618,8 @@ struct lttng_event_notifier_group { struct lttng_transport *transport; struct channel *chan; /* Ring buffer channel for event notifier group. */ struct lib_ring_buffer *buf; /* Ring buffer for event notifier group. */ + wait_queue_head_t read_wait; + struct irq_work wakeup_pending; /* Pending wakeup irq work. */ }; struct lttng_metadata_cache { @@ -649,7 +656,9 @@ int lttng_event_notifier_enabler_enable( int lttng_event_notifier_enabler_disable( struct lttng_event_notifier_enabler *event_notifier_enabler); int lttng_fix_pending_events(void); +int lttng_fix_pending_event_notifiers(void); int lttng_session_active(void); +bool lttng_event_notifier_active(void); struct lttng_session *lttng_session_create(void); int lttng_session_enable(struct lttng_session *session);