ltt-events: initial addition
[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
14/*
15 * ltt_event structure is referred to by the tracing fast path. It must be
16 * kept small.
17 */
18struct ltt_event {
19 unsigned int id;
20 struct ltt_channel *chan;
21 void *filter;
22 char *name;
23 struct list_head list; /* Event list */
24};
25
26struct ltt_channel {
27 struct channel *chan; /* Channel buffers */
28 /* Event ID management */
29 struct ltt_session *session;
30 atomic_t free_event_id; /* Next event ID to allocate */
31 struct list_head list; /* Channel list */
32 char name[PATH_MAX];
33};
34
35struct ltt_session {
36 struct list_head chan; /* Channel list head */
37 struct list_head events; /* Event list head */
38 struct list_head list; /* Session list */
39 char name[PATH_MAX];
40};
41
42struct ltt_session *ltt_session_create(char *name);
43int ltt_session_destroy(struct ltt_session *session);
44
45struct ltt_channel *ltt_channel_create(struct ltt_session *session, char *name,
46 int overwrite, void *buf_addr,
47 size_t subbuf_size, size_t num_subbuf,
48 unsigned int switch_timer_interval,
49 unsigned int read_timer_interval);
50int _ltt_channel_destroy(struct ltt_channel *chan);
51
52struct ltt_event *ltt_event_create(struct ltt_channel *chan, char *name,
53 void *filter);
54int _ltt_event_destroy(struct ltt_event *event);
This page took 0.025358 seconds and 4 git commands to generate.