Handle release of parent files (header)
[lttng-modules.git] / ltt-events.h
CommitLineData
4e3c1b9b
MD
1/*
2 * ltt-events.h
3 *
4 * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 *
6 * Holds LTTng per-session event registry.
7 */
8
9#include <linux/list.h>
10
11struct ltt_channel;
12struct ltt_session;
13
baf20995
MD
14enum instrum_type itype {
15 INSTRUM_TRACEPOINTS,
16};
17
4e3c1b9b
MD
18/*
19 * ltt_event structure is referred to by the tracing fast path. It must be
20 * kept small.
21 */
22struct ltt_event {
23 unsigned int id;
24 struct ltt_channel *chan;
baf20995 25 void *probe;
4e3c1b9b
MD
26 void *filter;
27 char *name;
baf20995 28 enum instrum_type itype;
4e3c1b9b
MD
29 struct list_head list; /* Event list */
30};
31
32struct ltt_channel {
33 struct channel *chan; /* Channel buffers */
34 /* Event ID management */
35 struct ltt_session *session;
d4e1a740 36 struct file *file; /* File associated to channel */
e5382b6d 37 unsigned int free_event_id; /* Next event ID to allocate */
4e3c1b9b 38 struct list_head list; /* Channel list */
653fe716 39 wait_queue_head_t notify_wait; /* Channel addition notif. waitqueue */
4e3c1b9b
MD
40};
41
42struct ltt_session {
e5382b6d 43 int active; /* Is trace session active ? */
d4e1a740 44 struct file *file; /* File associated to session */
4e3c1b9b
MD
45 struct list_head chan; /* Channel list head */
46 struct list_head events; /* Event list head */
47 struct list_head list; /* Session list */
4e3c1b9b
MD
48};
49
baf20995 50struct ltt_session *ltt_session_create(void);
4e3c1b9b
MD
51int ltt_session_destroy(struct ltt_session *session);
52
baf20995 53struct ltt_channel *ltt_channel_create(struct ltt_session *session,
4e3c1b9b
MD
54 int overwrite, void *buf_addr,
55 size_t subbuf_size, size_t num_subbuf,
56 unsigned int switch_timer_interval,
57 unsigned int read_timer_interval);
58int _ltt_channel_destroy(struct ltt_channel *chan);
59
653fe716
MD
60struct ltt_event *ltt_event_create(struct ltt_channel *chan,
61 enum instrum_type itype,
62 char *name,
4e3c1b9b
MD
63 void *filter);
64int _ltt_event_destroy(struct ltt_event *event);
This page took 0.02561 seconds and 4 git commands to generate.