align.h: Implement ALIGN_FLOOR macro
[lttng-tools.git] / include / lttng / domain.h
CommitLineData
1239a312
DG
1/*
2 * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18#ifndef LTTNG_DOMAIN_H
19#define LTTNG_DOMAIN_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <lttng/constant.h>
26
27/*
28 * Domain types: the different possible tracers.
29 */
30enum lttng_domain_type {
95681498 31 LTTNG_DOMAIN_NONE = 0, /* No associated domain. */
1239a312
DG
32 LTTNG_DOMAIN_KERNEL = 1, /* Linux Kernel tracer. */
33 LTTNG_DOMAIN_UST = 2, /* Global Userspace tracer. */
34 LTTNG_DOMAIN_JUL = 3, /* Java Util Logging. */
5cdb6027 35 LTTNG_DOMAIN_LOG4J = 4, /* Java Log4j Framework. */
0e115563 36 LTTNG_DOMAIN_PYTHON = 5, /* Python logging Framework. */
1239a312
DG
37};
38
39/* Buffer type for a specific domain. */
40enum lttng_buffer_type {
41 LTTNG_BUFFER_PER_PID, /* Only supported by UST being the default. */
42 LTTNG_BUFFER_PER_UID, /* Only supported by UST. */
43 LTTNG_BUFFER_GLOBAL, /* Only supported by the Kernel. */
44};
45
46/*
47 * The structures should be initialized to zero before use.
48 */
49#define LTTNG_DOMAIN_PADDING1 12
50#define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
51struct lttng_domain {
52 enum lttng_domain_type type;
53 enum lttng_buffer_type buf_type;
54 char padding[LTTNG_DOMAIN_PADDING1];
55
56 union {
57 pid_t pid;
36d2e35d 58 char exec_name[LTTNG_NAME_MAX];
1239a312
DG
59 char padding[LTTNG_DOMAIN_PADDING2];
60 } attr;
61};
62
63/*
64 * List the registered domain(s) of a session.
65 *
66 * Session name CAN NOT be NULL.
67 *
68 * Return the size (number of entries) of the "lttng_domain" array. Caller
69 * must free domains. On error, a negative LTTng error code is returned.
70 */
71extern int lttng_list_domains(const char *session_name,
72 struct lttng_domain **domains);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* LTTNG_DOMAIN_H */
This page took 0.048338 seconds and 5 git commands to generate.