UST consumer: perform buffer flush on hang up
[lttng-tools.git] / include / lttng-share.h
index 5154b90a559c33e1c07dbecc90c0e02041ba4bf2..708a1f009cf3727d54c42ccf2da62557de1d7db2 100644 (file)
 
 #include <stdlib.h>
 
+#include <lttng/lttng.h>
+
+/* Default size of a hash table */
+#define DEFAULT_HT_SIZE                 32
+
 /* Default channel attributes */
 #define DEFAULT_CHANNEL_NAME            "channel0"
 #define DEFAULT_CHANNEL_OVERWRITE       0       /* usec */
 /* See lttng-kernel.h enum lttng_kernel_output for channel output */
 #define DEFAULT_KERNEL_CHANNEL_OUTPUT       LTTNG_EVENT_SPLICE
 
+/* User space defaults */
+
+/* Must be a power of 2 */
+#define DEFAULT_UST_CHANNEL_SUBBUF_SIZE     4096    /* bytes */
+/* Must be a power of 2 */
+#define DEFAULT_UST_CHANNEL_SUBBUF_NUM      4
+/* See lttng-ust.h enum lttng_ust_output */
+#define DEFAULT_UST_CHANNEL_OUTPUT          LTTNG_EVENT_MMAP
+
+/*
+ * Default timeout value for the sem_timedwait() call. Blocking forever is not
+ * wanted so a timeout is used to control the data flow and not freeze the
+ * session daemon.
+ */
+#define DEFAULT_SEM_WAIT_TIMEOUT            30    /* in seconds */
+
 /*
  * Takes a pointer x and transform it so we can use it to access members
  * without a function call. Here an example:
This page took 0.022843 seconds and 4 git commands to generate.