yet more ongoing ABI implementation
[lttng-modules.git] / ltt-events.h
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
11 struct ltt_channel;
12 struct ltt_session;
13
14 enum instrum_type itype {
15 INSTRUM_TRACEPOINTS,
16 };
17
18 /*
19 * ltt_event structure is referred to by the tracing fast path. It must be
20 * kept small.
21 */
22 struct ltt_event {
23 unsigned int id;
24 struct ltt_channel *chan;
25 void *probe;
26 void *filter;
27 char *name;
28 enum instrum_type itype;
29 struct list_head list; /* Event list */
30 };
31
32 struct ltt_channel {
33 struct channel *chan; /* Channel buffers */
34 /* Event ID management */
35 struct ltt_session *session;
36 unsigned int free_event_id; /* Next event ID to allocate */
37 struct list_head list; /* Channel list */
38 wait_queue_head_t notify_wait; /* Channel addition notif. waitqueue */
39 };
40
41 struct ltt_session {
42 int active; /* Is trace session active ? */
43 struct list_head chan; /* Channel list head */
44 struct list_head events; /* Event list head */
45 struct list_head list; /* Session list */
46 };
47
48 struct ltt_session *ltt_session_create(void);
49 int ltt_session_destroy(struct ltt_session *session);
50
51 struct ltt_channel *ltt_channel_create(struct ltt_session *session,
52 int overwrite, void *buf_addr,
53 size_t subbuf_size, size_t num_subbuf,
54 unsigned int switch_timer_interval,
55 unsigned int read_timer_interval);
56 int _ltt_channel_destroy(struct ltt_channel *chan);
57
58 struct ltt_event *ltt_event_create(struct ltt_channel *chan,
59 enum instrum_type itype,
60 char *name,
61 void *filter);
62 int _ltt_event_destroy(struct ltt_event *event);
This page took 0.030929 seconds and 5 git commands to generate.