sessiond: enforce mmap output type for kernel metadata channel
[lttng-tools.git] / src / common / defaults.h
index 1beb516aa09980fd39c750cda2b70df2efef96e2..1e4b7fac7ab7d5d500ddd84985b76051dfefef49 100644 (file)
@@ -1,25 +1,17 @@
 /*
- * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
- *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifndef _DEFAULTS_H
 #define _DEFAULTS_H
 
-#include <config.h>
+#include <pthread.h>
+#include <common/macros.h>
 
 /* Default unix group name for tracing. */
 #define DEFAULT_TRACING_GROUP                   "tracing"
 /* Environment variable to set session daemon binary path. */
 #define DEFAULT_SESSIOND_PATH_ENV               "LTTNG_SESSIOND_PATH"
 
+/* Environment variable to set man pager binary path. */
+#define DEFAULT_MAN_BIN_PATH_ENV                "LTTNG_MAN_BIN_PATH"
+
+/* Default man pager binary path. */
+#define DEFAULT_MAN_BIN_PATH                    "/usr/bin/man"
+
 /* Default trace output directory name */
 #define DEFAULT_TRACE_DIR_NAME                  "lttng-traces"
 
 #define DEFAULT_TRACE_OUTPUT                    DEFAULT_HOME_DIR "/lttng"
 
 /* Default directory where the trace are written in per domain */
-#define DEFAULT_KERNEL_TRACE_DIR                "/kernel"
-#define DEFAULT_UST_TRACE_DIR                   "/ust"
+#define DEFAULT_KERNEL_TRACE_DIR                "kernel"
+#define DEFAULT_UST_TRACE_DIR                   "ust"
 
 /* Subpath for per PID or UID sessions. */
-#define DEFAULT_UST_TRACE_PID_PATH               "/pid"
-#define DEFAULT_UST_TRACE_UID_PATH               "/uid/%d/%u-bit"
+#define DEFAULT_UST_TRACE_PID_PATH               "pid"
+#define DEFAULT_UST_TRACE_UID_PATH               "uid/%d/%u-bit"
 
 /*
  * Default session name for the lttng command line. This default value will
@@ -60,6 +58,9 @@
  */
 #define DEFAULT_SESSION_NAME                    "auto"
 
+/* Default consumer paths */
+#define DEFAULT_CONSUMERD_FILE                  "lttng-consumerd"
+
 /* Default consumer paths */
 #define DEFAULT_CONSUMERD_RUNDIR                "%s"
 
 #define DEFAULT_RELAYD_RUNDIR                  "%s"
 #define DEFAULT_RELAYD_PATH                    DEFAULT_RELAYD_RUNDIR "/relayd"
 
+#define DEFAULT_RELAYD_MIN_FD_POOL_SIZE                100
+/*
+ * The file descriptor pool size needs a reserve buffer to accommodates the
+ * indirect use of short-lived file descriptors. For instance, glibc will
+ * create a socket (and thus, use an fd) during calls to gethostname() or
+ * when querying the user's group. Other calls also probably make use of
+ * short-lived FDs.
+ *
+ * The theoritical maximal reserve corresponds to the number of threads as,
+ * in the worst case, they could all be making such calls.
+ *
+ * This value must be less than DEFAULT_RELAYD_MIN_FD_POOL_SIZE.
+ */
+#define DEFAULT_RELAYD_FD_POOL_SIZE_RESERVE    10
+
 /* Default lttng run directory */
 #define DEFAULT_LTTNG_HOME_ENV_VAR              "LTTNG_HOME"
 #define DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR    "HOME"
 /* Default probes list */
 #define DEFAULT_LTTNG_KMOD_PROBES              "LTTNG_KMOD_PROBES"
 
+/* Default extra probes list */
+#define DEFAULT_LTTNG_EXTRA_KMOD_PROBES                "LTTNG_EXTRA_KMOD_PROBES"
+
 /* Default unix socket path */
-#define DEFAULT_GLOBAL_CLIENT_UNIX_SOCK         DEFAULT_LTTNG_RUNDIR "/client-lttng-sessiond"
-#define DEFAULT_HOME_CLIENT_UNIX_SOCK           DEFAULT_LTTNG_HOME_RUNDIR "/client-lttng-sessiond"
-#define DEFAULT_GLOBAL_HEALTH_UNIX_SOCK         DEFAULT_LTTNG_RUNDIR "/sessiond-health"
-#define DEFAULT_HOME_HEALTH_UNIX_SOCK          DEFAULT_LTTNG_HOME_RUNDIR "/sessiond-health"
+#define DEFAULT_GLOBAL_CLIENT_UNIX_SOCK                DEFAULT_LTTNG_RUNDIR "/client-lttng-sessiond"
+#define DEFAULT_HOME_CLIENT_UNIX_SOCK                  DEFAULT_LTTNG_HOME_RUNDIR "/client-lttng-sessiond"
+#define DEFAULT_GLOBAL_HEALTH_UNIX_SOCK                DEFAULT_LTTNG_RUNDIR "/sessiond-health"
+#define DEFAULT_HOME_HEALTH_UNIX_SOCK                  DEFAULT_LTTNG_HOME_RUNDIR "/sessiond-health"
+#define DEFAULT_GLOBAL_NOTIFICATION_CHANNEL_UNIX_SOCK   DEFAULT_LTTNG_RUNDIR "/sessiond-notification"
+#define DEFAULT_HOME_NOTIFICATION_CHANNEL_UNIX_SOCK    DEFAULT_LTTNG_HOME_RUNDIR "/sessiond-notification"
 
 /* Default consumer health unix socket path */
 #define DEFAULT_GLOBAL_USTCONSUMER32_HEALTH_UNIX_SOCK  DEFAULT_LTTNG_RUNDIR "/ustconsumerd32/health"
 /* Default JUL domain channel name. */
 #define DEFAULT_JUL_CHANNEL_NAME        "lttng_jul_channel"
 /* Default JUL tracepoint name. This is a wildcard for the JUL domain. */
-#define DEFAULT_SYS_JUL_EVENT_NAME      "lttng_jul:sys*"
-#define DEFAULT_USER_JUL_EVENT_NAME     "lttng_jul:user*"
-/* JUL default channel name. */
-#define DEFAULT_CHANNEL_OVERWRITE       0
-#define DEFAULT_CHANNEL_TRACEFILE_SIZE  0
-#define DEFAULT_CHANNEL_TRACEFILE_COUNT 0
-
-/* Must always be a power of 2 */
-#define _DEFAULT_CHANNEL_SUBBUF_SIZE   4096    /* bytes */
-/* Must always be a power of 2 */
-#define _DEFAULT_CHANNEL_SUBBUF_NUM            4
-#define _DEFAULT_CHANNEL_SWITCH_TIMER  0       /* usec */
-#define _DEFAULT_CHANNEL_LIVE_TIMER    0       /* usec */
-#define _DEFAULT_CHANNEL_READ_TIMER            200000  /* usec */
+#define DEFAULT_JUL_EVENT_COMPONENT     "lttng_jul"
+#define DEFAULT_JUL_EVENT_NAME          DEFAULT_JUL_EVENT_COMPONENT ":*"
+
+/* Default log4j domain channel name. */
+#define DEFAULT_LOG4J_CHANNEL_NAME        "lttng_log4j_channel"
+/* Default log4j tracepoint name. This is a wildcard for the log4j domain. */
+#define DEFAULT_LOG4J_EVENT_COMPONENT     "lttng_log4j"
+#define DEFAULT_LOG4J_EVENT_NAME          DEFAULT_LOG4J_EVENT_COMPONENT ":*"
+
+/* Default Python domain channel name. */
+#define DEFAULT_PYTHON_CHANNEL_NAME       "lttng_python_channel"
+/* Default Python tracepoint name. This is a wildcard for the python domain. */
+#define DEFAULT_PYTHON_EVENT_COMPONENT    "lttng_python"
+#define DEFAULT_PYTHON_EVENT_NAME         DEFAULT_PYTHON_EVENT_COMPONENT ":*"
+
+#define DEFAULT_CHANNEL_OVERWRITE       -1
+#define DEFAULT_CHANNEL_TRACEFILE_SIZE  CONFIG_DEFAULT_CHANNEL_TRACEFILE_SIZE
+#define DEFAULT_CHANNEL_TRACEFILE_COUNT CONFIG_DEFAULT_CHANNEL_TRACEFILE_COUNT
+
+#define _DEFAULT_CHANNEL_SUBBUF_SIZE   CONFIG_DEFAULT_CHANNEL_SUBBUF_SIZE
 #define _DEFAULT_CHANNEL_OUTPUT                        LTTNG_EVENT_MMAP
 
 /* Metadata channel defaults. */
-#define DEFAULT_METADATA_SUBBUF_SIZE    4096
-#define DEFAULT_METADATA_SUBBUF_NUM     2
-#define DEFAULT_METADATA_CACHE_SIZE     4096
-#define DEFAULT_METADATA_SWITCH_TIMER  _DEFAULT_CHANNEL_SWITCH_TIMER
-#define DEFAULT_METADATA_READ_TIMER            0
-#define DEFAULT_METADATA_OUTPUT                        _DEFAULT_CHANNEL_OUTPUT
+#define DEFAULT_METADATA_SUBBUF_SIZE    CONFIG_DEFAULT_METADATA_SUBBUF_SIZE
+#define DEFAULT_METADATA_SUBBUF_NUM     CONFIG_DEFAULT_METADATA_SUBBUF_NUM
+#define DEFAULT_METADATA_CACHE_SIZE     CONFIG_DEFAULT_METADATA_CACHE_SIZE
+#define DEFAULT_METADATA_SWITCH_TIMER  0
+#define DEFAULT_METADATA_READ_TIMER    0
+#define DEFAULT_METADATA_OVERWRITE     0
+#define DEFAULT_METADATA_OUTPUT                LTTNG_EVENT_MMAP
 
 /* Kernel has different defaults */
 
 /* DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE must always be a power of 2 */
-#define DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE             262144    /* bytes */
+#define DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE     CONFIG_DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE
 /*
  * DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM must always be a power of 2.
  * Update help manually if override.
  */
-#define DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM              _DEFAULT_CHANNEL_SUBBUF_NUM
+#define DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM      CONFIG_DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM
 /* See lttng-kernel.h enum lttng_kernel_output for channel output */
 #define DEFAULT_KERNEL_CHANNEL_OUTPUT                  LTTNG_EVENT_SPLICE
-#define DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER            _DEFAULT_CHANNEL_SWITCH_TIMER
-#define DEFAULT_KERNEL_CHANNEL_READ_TIMER              _DEFAULT_CHANNEL_READ_TIMER
-#define DEFAULT_KERNEL_CHANNEL_LIVE_TIMER              _DEFAULT_CHANNEL_LIVE_TIMER
+#define DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER    CONFIG_DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER
+#define DEFAULT_KERNEL_CHANNEL_MONITOR_TIMER   CONFIG_DEFAULT_KERNEL_CHANNEL_MONITOR_TIMER
+#define DEFAULT_KERNEL_CHANNEL_READ_TIMER      CONFIG_DEFAULT_KERNEL_CHANNEL_READ_TIMER
+#define DEFAULT_KERNEL_CHANNEL_LIVE_TIMER      CONFIG_DEFAULT_KERNEL_CHANNEL_LIVE_TIMER
+#define DEFAULT_KERNEL_CHANNEL_BLOCKING_TIMEOUT        CONFIG_DEFAULT_KERNEL_CHANNEL_BLOCKING_TIMEOUT
 
 /* User space defaults */
 
 /* Must be a power of 2 */
-#define DEFAULT_UST_PID_CHANNEL_SUBBUF_SIZE            _DEFAULT_CHANNEL_SUBBUF_SIZE
-#define DEFAULT_UST_UID_CHANNEL_SUBBUF_SIZE            131072  /* bytes */
+#define DEFAULT_UST_PID_CHANNEL_SUBBUF_SIZE    CONFIG_DEFAULT_UST_PID_CHANNEL_SUBBUF_SIZE
+#define DEFAULT_UST_UID_CHANNEL_SUBBUF_SIZE    CONFIG_DEFAULT_UST_UID_CHANNEL_SUBBUF_SIZE
 /* Must be a power of 2. Update help manuall if override. */
-#define DEFAULT_UST_PID_CHANNEL_SUBBUF_NUM             _DEFAULT_CHANNEL_SUBBUF_NUM
-#define DEFAULT_UST_UID_CHANNEL_SUBBUF_NUM             _DEFAULT_CHANNEL_SUBBUF_NUM
+#define DEFAULT_UST_PID_CHANNEL_SUBBUF_NUM     CONFIG_DEFAULT_UST_PID_CHANNEL_SUBBUF_NUM
+#define DEFAULT_UST_UID_CHANNEL_SUBBUF_NUM     CONFIG_DEFAULT_UST_UID_CHANNEL_SUBBUF_NUM
 /* See lttng-ust.h enum lttng_ust_output */
 #define DEFAULT_UST_PID_CHANNEL_OUTPUT                 _DEFAULT_CHANNEL_OUTPUT
 #define DEFAULT_UST_UID_CHANNEL_OUTPUT                 _DEFAULT_CHANNEL_OUTPUT
 /* Timers in usec. */
-#define DEFAULT_UST_PID_CHANNEL_SWITCH_TIMER   _DEFAULT_CHANNEL_SWITCH_TIMER
-#define DEFAULT_UST_UID_CHANNEL_SWITCH_TIMER   _DEFAULT_CHANNEL_SWITCH_TIMER
-#define DEFAULT_UST_PID_CHANNEL_LIVE_TIMER     _DEFAULT_CHANNEL_LIVE_TIMER
-#define DEFAULT_UST_UID_CHANNEL_LIVE_TIMER     _DEFAULT_CHANNEL_LIVE_TIMER
+#define DEFAULT_UST_PID_CHANNEL_SWITCH_TIMER   CONFIG_DEFAULT_UST_PID_CHANNEL_SWITCH_TIMER
+#define DEFAULT_UST_UID_CHANNEL_SWITCH_TIMER   CONFIG_DEFAULT_UST_UID_CHANNEL_SWITCH_TIMER
+#define DEFAULT_UST_PID_CHANNEL_LIVE_TIMER     CONFIG_DEFAULT_UST_PID_CHANNEL_LIVE_TIMER
+#define DEFAULT_UST_UID_CHANNEL_LIVE_TIMER     CONFIG_DEFAULT_UST_UID_CHANNEL_LIVE_TIMER
+#define DEFAULT_UST_PID_CHANNEL_MONITOR_TIMER  CONFIG_DEFAULT_UST_PID_CHANNEL_MONITOR_TIMER
+#define DEFAULT_UST_UID_CHANNEL_MONITOR_TIMER  CONFIG_DEFAULT_UST_UID_CHANNEL_MONITOR_TIMER
+
+#define DEFAULT_UST_PID_CHANNEL_READ_TIMER      CONFIG_DEFAULT_UST_PID_CHANNEL_READ_TIMER
+#define DEFAULT_UST_UID_CHANNEL_READ_TIMER      CONFIG_DEFAULT_UST_UID_CHANNEL_READ_TIMER
 
-#define DEFAULT_UST_PID_CHANNEL_READ_TIMER      0  /* usec */
-#define DEFAULT_UST_UID_CHANNEL_READ_TIMER      0  /* usec */
+#define DEFAULT_UST_PID_CHANNEL_BLOCKING_TIMEOUT       CONFIG_DEFAULT_UST_PID_CHANNEL_BLOCKING_TIMEOUT
+#define DEFAULT_UST_UID_CHANNEL_BLOCKING_TIMEOUT       CONFIG_DEFAULT_UST_UID_CHANNEL_BLOCKING_TIMEOUT
 
 /*
  * Default timeout value for the sem_timedwait() call. Blocking forever is not
 #define DEFAULT_SEM_WAIT_TIMEOUT            30    /* in seconds */
 
 /* Default bind addresses for network services. */
-#define DEFAULT_NETWORK_CONTROL_BIND_ADDRESS    "0.0.0.0"
-#define DEFAULT_NETWORK_DATA_BIND_ADDRESS       "0.0.0.0"
-#define DEFAULT_NETWORK_VIEWER_BIND_ADDRESS     "localhost"
-#define DEFAULT_AGENT_BIND_ADDRESS              "localhost"
+#define DEFAULT_NETWORK_CONTROL_BIND_ADDRESS    CONFIG_DEFAULT_NETWORK_CONTROL_BIND_ADDRESS
+#define DEFAULT_NETWORK_DATA_BIND_ADDRESS              CONFIG_DEFAULT_NETWORK_DATA_BIND_ADDRESS
+#define DEFAULT_NETWORK_VIEWER_BIND_ADDRESS     CONFIG_DEFAULT_NETWORK_VIEWER_BIND_ADDRESS
+#define DEFAULT_AGENT_BIND_ADDRESS              CONFIG_DEFAULT_AGENT_BIND_ADDRESS
 
 /* Default network ports for trace streaming support. */
-#define DEFAULT_NETWORK_CONTROL_PORT        5342
-#define DEFAULT_NETWORK_DATA_PORT           5343
-#define DEFAULT_NETWORK_VIEWER_PORT         5344
+#define DEFAULT_NETWORK_CONTROL_PORT        CONFIG_DEFAULT_NETWORK_CONTROL_PORT
+#define DEFAULT_NETWORK_DATA_PORT           CONFIG_DEFAULT_NETWORK_DATA_PORT
+#define DEFAULT_NETWORK_VIEWER_PORT         CONFIG_DEFAULT_NETWORK_VIEWER_PORT
 
-/* Agent registration TCP port. */
-#define DEFAULT_AGENT_TCP_PORT              5345
+/* Agent registration TCP port range. */
+#define DEFAULT_AGENT_TCP_PORT_RANGE_BEGIN  CONFIG_DEFAULT_AGENT_TCP_PORT_RANGE_BEGIN
+#define DEFAULT_AGENT_TCP_PORT_RANGE_END    CONFIG_DEFAULT_AGENT_TCP_PORT_RANGE_END
 
 /*
  * If a thread stalls for this amount of time, it will be considered bogus (bad
  * Wait period before retrying the lttng_data_pending command in the lttng
  * stop command of liblttng-ctl.
  */
-#define DEFAULT_DATA_AVAILABILITY_WAIT_TIME 200000  /* usec */
+#define DEFAULT_DATA_AVAILABILITY_WAIT_TIME_US 200000  /* usec */
 
 /*
  * Wait period before retrying the lttng_consumer_flushed_cache when
  */
 #define DEFAULT_INET_TCP_TIMEOUT                       180     /* sec */
 
+/* Maximum payload size for a control connection */
+
+#define DEFAULT_NETWORK_RELAYD_CTRL_MAX_PAYLOAD_SIZE CONFIG_DEFAULT_NETWORK_RELAYD_CTRL_MAX_PAYLOAD_SIZE
+
 /*
  * Default receiving and sending timeout for an application socket.
  */
-#define DEFAULT_APP_SOCKET_RW_TIMEOUT       5  /* sec */
+#define DEFAULT_APP_SOCKET_RW_TIMEOUT       CONFIG_DEFAULT_APP_SOCKET_RW_TIMEOUT
 #define DEFAULT_APP_SOCKET_TIMEOUT_ENV      "LTTNG_APP_SOCKET_TIMEOUT"
 
 #define DEFAULT_UST_STREAM_FD_NUM                      2 /* Number of fd per UST stream. */
 #define DEFAULT_INDEX_DIR                                      "index"
 
 /* Default lttng command live timer value in usec. */
-#define DEFAULT_LTTNG_LIVE_TIMER                       1000000
+#define DEFAULT_LTTNG_LIVE_TIMER                       CONFIG_DEFAULT_LTTNG_LIVE_TIMER
+
+/* Default runas worker name */
+#define DEFAULT_RUN_AS_WORKER_NAME                     "lttng-runas"
+
+/* Default LTTng MI XML namespace. */
+#define DEFAULT_LTTNG_MI_NAMESPACE             "https://lttng.org/xml/ns/lttng-mi"
 
-extern size_t default_channel_subbuf_size;
-extern size_t default_metadata_subbuf_size;
-extern size_t default_ust_pid_channel_subbuf_size;
-extern size_t default_ust_uid_channel_subbuf_size;
-extern size_t default_kernel_channel_subbuf_size;
+/* Default thread stack size; the default mandated by pthread_create(3) */
+#define DEFAULT_LTTNG_THREAD_STACK_SIZE                2097152
+
+/* Default maximal size of message notification channel message payloads. */
+#define DEFAULT_MAX_NOTIFICATION_CLIENT_MESSAGE_PAYLOAD_SIZE   65536
+
+/* Default maximal size of trace archive location. */
+#define DEFAULT_MAX_TRACE_ARCHIVE_LOCATION_PAYLOAD_SIZE                65536
+
+/* Default maximal size of message notification channel message payloads. */
+#define DEFAULT_CLIENT_MAX_QUEUED_NOTIFICATIONS_COUNT          100
+
+
+#define DEFAULT_LTTNG_RELAYD_TCP_KEEP_ALIVE_ENV "LTTNG_RELAYD_TCP_KEEP_ALIVE"
+#define DEFAULT_LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME_ENV "LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME"
+#define DEFAULT_LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT_ENV "LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT"
+#define DEFAULT_LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL_ENV "LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL"
+#define DEFAULT_LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD_ENV "LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD"
+#define DEFAULT_LTTNG_RELAYD_DISALLOW_CLEAR_ENV "LTTNG_RELAYD_DISALLOW_CLEAR"
+
+#define DEFAULT_LTTNG_RELAYD_WORKING_DIRECTORY_ENV "LTTNG_RELAYD_WORKING_DIRECTORY"
+
+/*
+ * Name of the intermediate directory used to rename the trace chunk of a
+ * session's first rotation.
+ */
+#define DEFAULT_CHUNK_TMP_OLD_DIRECTORY                        ".tmp_old_chunk"
+#define DEFAULT_CHUNK_TMP_NEW_DIRECTORY                        ".tmp_new_chunk"
+#define DEFAULT_ARCHIVED_TRACE_CHUNKS_DIRECTORY                "archives"
+#define DEFAULT_UNLINKED_FILES_DIRECTORY               ".unlinked"
+
+/*
+ * Default timer value in usec for the rotate pending polling check on the
+ * relay when a rotation has completed on the consumer.
+ */
+#define DEFAULT_ROTATE_PENDING_TIMER   CONFIG_DEFAULT_ROTATE_PENDING_TIMER
 
 /*
  * Returns the default subbuf size.
@@ -299,11 +376,8 @@ extern size_t default_kernel_channel_subbuf_size;
  * This function depends on a value that is set at constructor time, so it is
  * unsafe to call it from another constructor.
  */
-static inline
-size_t default_get_channel_subbuf_size(void)
-{
-       return default_channel_subbuf_size;
-}
+LTTNG_HIDDEN
+size_t default_get_channel_subbuf_size(void);
 
 /*
  * Returns the default metadata subbuf size.
@@ -311,11 +385,8 @@ size_t default_get_channel_subbuf_size(void)
  * This function depends on a value that is set at constructor time, so it is
  * unsafe to call it from another constructor.
  */
-static inline
-size_t default_get_metadata_subbuf_size(void)
-{
-       return default_metadata_subbuf_size;
-}
+LTTNG_HIDDEN
+size_t default_get_metadata_subbuf_size(void);
 
 /*
  * Returns the default subbuf size for the kernel domain.
@@ -323,11 +394,8 @@ size_t default_get_metadata_subbuf_size(void)
  * This function depends on a value that is set at constructor time, so it is
  * unsafe to call it from another constructor.
  */
-static inline
-size_t default_get_kernel_channel_subbuf_size(void)
-{
-       return default_kernel_channel_subbuf_size;
-}
+LTTNG_HIDDEN
+size_t default_get_kernel_channel_subbuf_size(void);
 
 /*
  * Returns the default subbuf size for the UST domain per PID.
@@ -335,11 +403,8 @@ size_t default_get_kernel_channel_subbuf_size(void)
  * This function depends on a value that is set at constructor time, so it is
  * unsafe to call it from another constructor.
  */
-static inline
-size_t default_get_ust_pid_channel_subbuf_size(void)
-{
-       return default_ust_pid_channel_subbuf_size;
-}
+LTTNG_HIDDEN
+size_t default_get_ust_pid_channel_subbuf_size(void);
 
 /*
  * Returns the default subbuf size for the UST domain per UID.
@@ -347,10 +412,19 @@ size_t default_get_ust_pid_channel_subbuf_size(void)
  * This function depends on a value that is set at constructor time, so it is
  * unsafe to call it from another constructor.
  */
-static inline
-size_t default_get_ust_uid_channel_subbuf_size(void)
-{
-       return default_ust_uid_channel_subbuf_size;
-}
+LTTNG_HIDDEN
+size_t default_get_ust_uid_channel_subbuf_size(void);
+
+/*
+ * Get the default pthread_attr to use on thread creation.
+ *
+ * Some libc, such as musl, don't honor the limit set for the stack size and use
+ * their own empirically chosen static value. This function checks if the
+ * current stack size is smaller than the stack size limit and if so returns a
+ * pthread_attr_t pointer where the thread stack size is set to the soft stack
+ * size limit.
+ */
+LTTNG_HIDDEN
+pthread_attr_t *default_pthread_attr(void);
 
 #endif /* _DEFAULTS_H */
This page took 0.029142 seconds and 4 git commands to generate.