X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fdefaults.h;h=818332f54f146adc52e812a51c2677cb2649647c;hp=f05030766a77be8dae7452e4fdaae94205378d79;hb=a58c490f0bff52a73717d31d04d1472629180de2;hpb=8d5841ea483139d3ab2f2b4dd39263dad63832b1 diff --git a/src/common/defaults.h b/src/common/defaults.h index f05030766..818332f54 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -20,6 +20,7 @@ #ifndef _DEFAULTS_H #define _DEFAULTS_H +#include #include /* Default unix group name for tracing. */ @@ -105,10 +106,12 @@ #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" @@ -309,6 +312,15 @@ /* Default LTTng MI XML namespace. */ #define DEFAULT_LTTNG_MI_NAMESPACE "http://lttng.org/xml/ns/lttng-mi" +/* 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 message notification channel message payloads. */ +#define DEFAULT_CLIENT_MAX_QUEUED_NOTIFICATIONS_COUNT 100 + /* * Returns the default subbuf size. * @@ -354,4 +366,16 @@ size_t default_get_ust_pid_channel_subbuf_size(void); 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 */