From: Mathieu Desnoyers Date: Wed, 22 Feb 2012 01:18:33 +0000 (-0500) Subject: Fix: documented number of subbuffers is incorrect X-Git-Tag: v2.0.0-rc2~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9f778c9a8f1d65f5bfdde7cfd7294492d6fdd34c;p=lttng-tools.git Fix: documented number of subbuffers is incorrect Reported-by: Tan Dung Le Tran Acked-by: David Goulet Signed-off-by: Mathieu Desnoyers --- diff --git a/doc/man/lttng.1 b/doc/man/lttng.1 index 2445b05ac..34b2f90a9 100644 --- a/doc/man/lttng.1 +++ b/doc/man/lttng.1 @@ -273,7 +273,7 @@ file. \-\-subbuf-size Subbuffer size in bytes (default: 4096, kernel default: 262144) \-\-num-subbuf - Number of subbufers (default: 8, kernel default: 4) + Number of subbufers (default: 4) Needs to be a power of 2 for kernel and ust tracers \-\-switch-timer Switch subbuffer timer interval in usec (default: 0) diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 4e56b3ca5..4a737d28d 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -107,9 +107,8 @@ static void usage(FILE *ofp) fprintf(ofp, " Needs to be a power of 2 for\n"); fprintf(ofp, " kernel and ust tracers\n"); fprintf(ofp, " --num-subbuf NUM Number of subbufers\n"); - fprintf(ofp, " (default: %u, kernel default: %u)\n", - DEFAULT_CHANNEL_SUBBUF_NUM, - DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM); + fprintf(ofp, " (default: %u)\n", + DEFAULT_CHANNEL_SUBBUF_NUM); fprintf(ofp, " Needs to be a power of 2 for\n"); fprintf(ofp, " kernel and ust tracers\n"); fprintf(ofp, " --switch-timer USEC Switch timer interval in usec (default: %u)\n", diff --git a/src/common/defaults.h b/src/common/defaults.h index aa383b326..238989421 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -81,7 +81,7 @@ /* DEFAULT_CHANNEL_SUBBUF_SIZE must always be a power of 2 */ #define DEFAULT_CHANNEL_SUBBUF_SIZE 4096 /* bytes */ /* DEFAULT_CHANNEL_SUBBUF_NUM must always be a power of 2 */ -#define DEFAULT_CHANNEL_SUBBUF_NUM 8 +#define DEFAULT_CHANNEL_SUBBUF_NUM 4 #define DEFAULT_CHANNEL_SWITCH_TIMER 0 /* usec */ #define DEFAULT_CHANNEL_READ_TIMER 200 /* usec */ #define DEFAULT_CHANNEL_OUTPUT LTTNG_EVENT_MMAP @@ -93,8 +93,11 @@ /* DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE must always be a power of 2 */ #define DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE 262144 /* bytes */ -/* DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM must always be a power of 2 */ -#define DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM 4 +/* + * 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 /* See lttng-kernel.h enum lttng_kernel_output for channel output */ #define DEFAULT_KERNEL_CHANNEL_OUTPUT LTTNG_EVENT_SPLICE @@ -102,8 +105,8 @@ /* 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 +/* Must be a power of 2. Update help manuall if override. */ +#define DEFAULT_UST_CHANNEL_SUBBUF_NUM DEFAULT_CHANNEL_SUBBUF_NUM /* See lttng-ust.h enum lttng_ust_output */ #define DEFAULT_UST_CHANNEL_OUTPUT LTTNG_EVENT_MMAP