Use the new functions for default subbuf sizes
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 29 Nov 2012 17:57:10 +0000 (12:57 -0500)
committerChristian Babeux <christian.babeux@efficios.com>
Fri, 7 Dec 2012 20:17:55 +0000 (15:17 -0500)
commit 3e230f922d67f7a47b66631f7a8cf458002b3727 upstream.

Use the functions added by the previous commit. All the occurences of
the previous defines were replaced.

[ Edit by Christian Babeux: Changes to tests/tools/Makefile.am were
  not applied because this file is not present in the stable 2.0 branch.
  Also added the relevant *_LDADD = $(top_builddir)/src/common/libcommon.la
  to the differents Makefile.am where the new functions are used. ]

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@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/Makefile.am
src/bin/lttng/commands/enable_channels.c
src/lib/lttng-ctl/Makefile.am
src/lib/lttng-ctl/lttng-ctl.c
tests/Makefile.am
tests/test_kernel_data_trace.c
tests/test_ust_data_trace.c

index 4ec12302b027e83ea3f63b5da862ce04737ecab0..f45f9ccd5bf9852fbea54941de4ce2b839681a32 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 293ca381b6bf3a24f88907acf6cb9f32f60fd698..3df39ecab24c5931a3274991bb03966758d584cc 100644 (file)
@@ -253,7 +253,7 @@ struct ltt_kernel_metadata *trace_kernel_create_metadata(char *path)
 
        /* 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 ed635f960501b672b047ffd245436cbf46b2c533..97ef1708d45c40c51ebc7243def77a583e277f35 100644 (file)
@@ -285,7 +285,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 e2040d8c39ef102151f8f6f6b46a351b6139a9ca..c80fe5160f2b80e2e713f153127d2c2075341282 100644 (file)
@@ -11,4 +11,5 @@ lttng_SOURCES = command.h conf.c conf.h commands/start.c \
                                commands/calibrate.c commands/view.c \
                                utils.c utils.h lttng.c
 
-lttng_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
+lttng_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
+               $(top_builddir)/src/common/libcommon.la
index 9b5f8d64d302b276f3faee598c30e43dfcde28a2..3ad2baff76a1b40c3df1a82134eca1c4ee47ad19 100644 (file)
@@ -102,9 +102,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 6bc5432aa78802f62412c3e2edd6b83ac3ff05e6..f8f520373adf3e89ffedc8cc806061f9c52105a9 100644 (file)
@@ -3,4 +3,6 @@ lib_LTLIBRARIES = liblttng-ctl.la
 liblttng_ctl_la_SOURCES = lttng-ctl.c
 
 liblttng_ctl_la_LIBADD = \
-               $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
+               $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
+               $(top_builddir)/src/common/libcommon.la \
+               $(top_builddir)/src/common/hashtable/libhashtable.la
index 356fb34c416097d553c05ed727a92691b169eef3..cfb0f43b33913fc85e54e7bd6c3d16b5a67d117e 100644 (file)
@@ -898,7 +898,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;
@@ -912,7 +912,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 cc6d9ff272d6de6b9cc6d239a1cf233cb86bf075..af51dc88a12e9d6ff6b45b3e106d7061950dfbed 100644 (file)
@@ -19,10 +19,13 @@ test_sessions_LDADD = $(top_builddir)/src/common/libcommon.la \
                                          $(top_builddir)/src/common/hashtable/libhashtable.la
 
 test_kernel_data_trace_SOURCES = test_kernel_data_trace.c $(UTILS) $(KERN_DATA_TRACE)
+test_kernel_data_trace_LDADD = $(top_builddir)/src/common/libcommon.la
 
 kernel_all_events_basic_SOURCES = lttng/kernel_all_events_basic.c $(UTILS) $(LIBLTTNG)
+kernel_all_events_basic_LDADD = $(top_builddir)/src/common/libcommon.la
 
 kernel_event_basic_SOURCES = lttng/kernel_event_basic.c $(UTILS) $(LIBLTTNG)
+kernel_event_basic_LDADD = $(top_builddir)/src/common/libcommon.la
 
 if HAVE_LIBLTTNG_UST_CTL
 SUBDIRS += ust-nevents ust-nprocesses
@@ -36,8 +39,10 @@ test_ust_data_trace_LDADD = $(top_builddir)/src/common/libcommon.la \
                                                        $(top_builddir)/src/common/hashtable/libhashtable.la
 
 ust_global_all_events_basic_SOURCES = lttng/ust_global_all_events_basic.c $(UTILS) $(LIBLTTNG)
+ust_global_all_events_basic_LDADD = $(top_builddir)/src/common/libcommon.la
 
 ust_global_event_basic_SOURCES = lttng/ust_global_event_basic.c $(UTILS) $(LIBLTTNG)
+ust_global_event_basic_LDADD = $(top_builddir)/src/common/libcommon.la
 endif # HAVE_LIBLTTNG_UST_CTL
 
 check-am:
index 6d7f291beefbf56217ce36bbed30fdc6ec195f54..045f2a5ccc1308ccc17bbb2b5772b90f71b7f8d1 100644 (file)
@@ -101,7 +101,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.031481 seconds and 4 git commands to generate.