debugfs ABI in progress
[deliverable/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
MD
37 struct list_head list; /* Channel list */
38 char name[PATH_MAX];
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 */
46 char name[PATH_MAX];
47};
48
baf20995 49struct ltt_session *ltt_session_create(void);
4e3c1b9b
MD
50int ltt_session_destroy(struct ltt_session *session);
51
baf20995 52struct ltt_channel *ltt_channel_create(struct ltt_session *session,
4e3c1b9b
MD
53 int overwrite, void *buf_addr,
54 size_t subbuf_size, size_t num_subbuf,
55 unsigned int switch_timer_interval,
56 unsigned int read_timer_interval);
57int _ltt_channel_destroy(struct ltt_channel *chan);
58
59struct ltt_event *ltt_event_create(struct ltt_channel *chan, char *name,
60 void *filter);
61int _ltt_event_destroy(struct ltt_event *event);
This page took 0.029299 seconds and 5 git commands to generate.