Handle release of parent files
[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;
e5382b6d 36 unsigned int free_event_id; /* Next event ID to allocate */
4e3c1b9b 37 struct list_head list; /* Channel list */
653fe716 38 wait_queue_head_t notify_wait; /* Channel addition notif. waitqueue */
4e3c1b9b
MD
39};
40
41struct ltt_session {
e5382b6d 42 int active; /* Is trace session active ? */
4e3c1b9b
MD
43 struct list_head chan; /* Channel list head */
44 struct list_head events; /* Event list head */
45 struct list_head list; /* Session list */
4e3c1b9b
MD
46};
47
baf20995 48struct ltt_session *ltt_session_create(void);
4e3c1b9b
MD
49int ltt_session_destroy(struct ltt_session *session);
50
baf20995 51struct ltt_channel *ltt_channel_create(struct ltt_session *session,
4e3c1b9b
MD
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);
56int _ltt_channel_destroy(struct ltt_channel *chan);
57
653fe716
MD
58struct ltt_event *ltt_event_create(struct ltt_channel *chan,
59 enum instrum_type itype,
60 char *name,
4e3c1b9b
MD
61 void *filter);
62int _ltt_event_destroy(struct ltt_event *event);
This page took 0.025418 seconds and 4 git commands to generate.