Use the new functions for default subbuf sizes
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 13 Nov 2012 19:28:43 +0000 (14:28 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 13 Nov 2012 19:40:34 +0000 (14:40 -0500)
Use the functions added by the previous commit. All the occurences of
the previous defines were replaced.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/channel.c
src/bin/lttng-sessiond/trace-kernel.c
src/bin/lttng-sessiond/trace-ust.c
src/bin/lttng/commands/enable_channels.c
src/lib/lttng-ctl/lttng-ctl.c
tests/tools/Makefile.am
tests/tools/test_kernel_data_trace.c
tests/tools/test_ust_data_trace.c

index 8b9adfba8370894050c5fd214c64c5282682fed8..d07e1d901fa3ba10170cb259411c105689a6a4a4 100644 (file)
@@ -54,7 +54,8 @@ struct lttng_channel *channel_new_default_attr(int dom)
 
        switch (dom) {
        case LTTNG_DOMAIN_KERNEL:
-               chan->attr.subbuf_size = DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE;
+               chan->attr.subbuf_size =
+                       default_get_kernel_channel_subbuf_size();
                chan->attr.num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM;
                chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
                break;
@@ -64,7 +65,7 @@ struct lttng_channel *channel_new_default_attr(int dom)
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
        case LTTNG_DOMAIN_UST_EXEC_NAME:
 #endif
-               chan->attr.subbuf_size = DEFAULT_UST_CHANNEL_SUBBUF_SIZE;
+               chan->attr.subbuf_size = default_get_ust_channel_subbuf_size();
                chan->attr.num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;
                chan->attr.output = DEFAULT_UST_CHANNEL_OUTPUT;
                break;
index 7748b891faef7b35add6d9c6e8e2da2e52f24f96..4d2870addacbcb515e0fe1a8042752c2d5fb158f 100644 (file)
@@ -272,7 +272,7 @@ struct ltt_kernel_metadata *trace_kernel_create_metadata(void)
 
        /* Set default attributes */
        chan->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
-       chan->attr.subbuf_size = DEFAULT_METADATA_SUBBUF_SIZE;
+       chan->attr.subbuf_size = default_get_metadata_subbuf_size();
        chan->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
        chan->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
        chan->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
index 864a4b0d1bb0dcd25c2e2de54b16999f8d3d22cc..2dcc7c25d95f737c2da19f88e6406b6c23d591c7 100644 (file)
@@ -311,7 +311,7 @@ struct ltt_ust_metadata *trace_ust_create_metadata(char *path)
 
        /* Set default attributes */
        lum->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
-       lum->attr.subbuf_size = DEFAULT_METADATA_SUBBUF_SIZE;
+       lum->attr.subbuf_size = default_get_metadata_subbuf_size();
        lum->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
        lum->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
        lum->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
index 18574775b1c4843188530d885997424d415cc430..d9a3b022d58f5c9dcea878c230ff60680dd235fc 100644 (file)
@@ -101,9 +101,9 @@ static void usage(FILE *ofp)
        fprintf(ofp, "      --overwrite          Flight recorder mode%s\n",
                DEFAULT_CHANNEL_OVERWRITE ? " (default)" : "");
        fprintf(ofp, "      --subbuf-size 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, "                               (default: %zu, kernel default: %zu)\n",
+               default_get_channel_subbuf_size(),
+               default_get_kernel_channel_subbuf_size());
        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");
index 46338fb8520bb076737e79782048e0e9e8aa042f..20bb8c6fa0d358c966ebfd3a9cd2e0a836330f3e 100644 (file)
@@ -1344,7 +1344,7 @@ void lttng_channel_set_default_attr(struct lttng_domain *domain,
                attr->switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
                attr->read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
 
-               attr->subbuf_size = DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE;
+               attr->subbuf_size = default_get_kernel_channel_subbuf_size();
                attr->num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM;
                attr->output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
                break;
@@ -1358,7 +1358,7 @@ void lttng_channel_set_default_attr(struct lttng_domain *domain,
                attr->switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
                attr->read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
 
-               attr->subbuf_size = DEFAULT_UST_CHANNEL_SUBBUF_SIZE;
+               attr->subbuf_size = default_get_ust_channel_subbuf_size();
                attr->num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;
                attr->output = DEFAULT_UST_CHANNEL_OUTPUT;
                break;
index cd7ff3292101d817622216cde7af6ea2150e8e82..4fe494cec2c37df0cd72e1f1ff2e5d3f323eec0d 100644 (file)
@@ -27,7 +27,7 @@ test_sessions_LDADD = $(COMMON) $(HASHTABLE) $(SESSIOND_COMM)
 
 # Kernel trace data unit tests
 test_kernel_data_trace_SOURCES = test_kernel_data_trace.c $(UTILS) $(KERN_DATA_TRACE)
-test_kernel_data_trace_LDADD = $(SESSIOND_COMM) $(HASHTABLE)
+test_kernel_data_trace_LDADD = $(COMMON) $(SESSIOND_COMM) $(HASHTABLE)
 
 if HAVE_LIBLTTNG_UST_CTL
 noinst_PROGRAMS += test_ust_data_trace
index c49d7ce549795000753b029e3256b4aeaafd2f0d..1edd20d6e09864b126a13b40c91d462f8ad6ab8e 100644 (file)
@@ -99,7 +99,7 @@ static void create_kernel_metadata(void)
        assert(kern->metadata->conf->attr.overwrite
                        == DEFAULT_CHANNEL_OVERWRITE);
        assert(kern->metadata->conf->attr.subbuf_size
-                       == DEFAULT_METADATA_SUBBUF_SIZE);
+                       == default_get_metadata_subbuf_size());
        assert(kern->metadata->conf->attr.num_subbuf
                        == DEFAULT_METADATA_SUBBUF_NUM);
        assert(kern->metadata->conf->attr.switch_timer_interval
index 459520db1e547e12fe988b5b5c5dc85d053b27f0..69a73b2f235f8ff5bf5046aa2c5f1680428f6ff9 100644 (file)
@@ -107,7 +107,7 @@ static void create_ust_metadata(void)
        assert(metadata->attr.overwrite
                        == DEFAULT_CHANNEL_OVERWRITE);
        assert(metadata->attr.subbuf_size
-                       == DEFAULT_METADATA_SUBBUF_SIZE);
+                       == default_get_metadata_subbuf_size());
        assert(metadata->attr.num_subbuf
                        == DEFAULT_METADATA_SUBBUF_NUM);
        assert(metadata->attr.switch_timer_interval
This page took 0.039992 seconds and 4 git commands to generate.