From: Mathieu Desnoyers Date: Tue, 16 Aug 2011 20:46:27 +0000 (-0400) Subject: Parametrize enable-channel help X-Git-Tag: v2.0-pre12~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cabd9892f83445ff6e23ee4f277d66d11ce616c7;p=lttng-tools.git Parametrize enable-channel help Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng/commands/enable_channels.c b/lttng/commands/enable_channels.c index bd732f22f..ba5b7b45a 100644 --- a/lttng/commands/enable_channels.c +++ b/lttng/commands/enable_channels.c @@ -84,12 +84,22 @@ static void usage(FILE *ofp) fprintf(ofp, " -p, --pid PID If -u, apply on a specific PID\n"); fprintf(ofp, "\n"); fprintf(ofp, "Channel options:\n"); - fprintf(ofp, " --discard Discard event when buffers are full (default)\n"); - fprintf(ofp, " --overwrite Flight recorder mode\n"); - fprintf(ofp, " --subbuf-size Subbuffer size in bytes (default: 4096)\n"); - fprintf(ofp, " --num-subbuf Number of subbufers (default: 2)\n"); - fprintf(ofp, " --switch-timer Switch timer interval in usec (default: 0)\n"); - fprintf(ofp, " --read-timer Read timer interval in usec (default: 200)\n"); + fprintf(ofp, " --discard Discard event when buffers are full%s\n", + DEFAULT_CHANNEL_OVERWRITE ? "" : " (default)"); + fprintf(ofp, " --overwrite Flight recorder mode%s\n", + DEFAULT_CHANNEL_OVERWRITE ? " (default)" : ""); + fprintf(ofp, " --subbuf-size Subbuffer size in bytes\n"); + fprintf(ofp, " (default: %u, kernel default: %u)\n", + DEFAULT_CHANNEL_SUBBUF_SIZE, + DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE); + fprintf(ofp, " --num-subbuf Number of subbufers\n"); + fprintf(ofp, " (default: %u, kernel default: %u)\n", + DEFAULT_CHANNEL_SUBBUF_NUM, + DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM); + fprintf(ofp, " --switch-timer Switch timer interval in usec (default: %u)\n", + DEFAULT_CHANNEL_SWITCH_TIMER); + fprintf(ofp, " --read-timer Read timer interval in usec (default: %u)\n", + DEFAULT_CHANNEL_READ_TIMER); fprintf(ofp, "\n"); }