Rename correlator to muxer
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 10 Oct 2016 02:46:35 +0000 (22:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:06 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
plugins/Makefile.am
plugins/correlator/Makefile.am [deleted file]
plugins/correlator/correlator.c [deleted file]
plugins/muxer/Makefile.am [new file with mode: 0644]
plugins/muxer/muxer.c [new file with mode: 0644]
plugins/muxer/muxer.h [new file with mode: 0644]

index ac7e43934a6b8a1c749c89198a2f4e0df432f637..afc696d910d479d0f85b2a13cf313982af23b484 100644 (file)
@@ -383,7 +383,7 @@ AC_CONFIG_FILES([
        plugins/ctf/common/notif-iter/Makefile
        plugins/ctf/fs/Makefile
        plugins/ctf/lttng-live/Makefile
-       plugins/correlator/Makefile
+       plugins/muxer/Makefile
        plugins/text/Makefile
        babeltrace.pc
        babeltrace-ctf.pc
index eee1349797b78f60841daff86586616b7d8be5f0..6575b0be24b59c0ccbaf7e0bb65df0fcfdb41f9c 100644 (file)
@@ -1 +1 @@
-SUBDIRS = ctf text correlator
+SUBDIRS = ctf text muxer
diff --git a/plugins/correlator/Makefile.am b/plugins/correlator/Makefile.am
deleted file mode 100644 (file)
index 43e2616..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
-
-SUBDIRS = .
-
-plugindir = "$(PLUGINSDIR)"
-plugin_LTLIBRARIES = libbabeltrace-plugin-correlator.la
-
-libbabeltrace_plugin_correlator_la_SOURCES = \
-       correlator.h correlator.c
-
-libbabeltrace_plugin_correlator_la_LDFLAGS = \
-       -version-info $(BABELTRACE_LIBRARY_VERSION)
-
-libbabeltrace_plugin_ctf_text_la_LIBADD = \
-       $(top_builddir)/lib/libbabeltrace.la \
-       $(top_builddir)/formats/ctf/libbabeltrace-ctf.la
diff --git a/plugins/correlator/correlator.c b/plugins/correlator/correlator.c
deleted file mode 100644 (file)
index c0c9dc7..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * correlator.c
- *
- * Babeltrace Trace Correlator
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <babeltrace/plugin/plugin-macros.h>
-#include <babeltrace/plugin/component.h>
-#include <babeltrace/plugin/filter.h>
-#include <babeltrace/plugin/notification/notification.h>
-#include <babeltrace/plugin/notification/iterator.h>
-#include <babeltrace/plugin/notification/event.h>
-#include "correlator.h"
-
-static
-void destroy_correlator_data(struct correlator *correlator)
-{
-       g_free(correlator);
-}
-
-static
-struct correlator *create_correlator(void)
-{
-       struct correlator *correlator;
-
-       correlator = g_new0(struct correlator, 1);
-       if (!correlator) {
-               goto end;
-       }
-end:
-       return correlator;
-}
-
-static
-void destroy_correlator(struct bt_component *component)
-{
-       void *data = bt_component_get_private_data(component);
-
-       destroy_correlator_data(data);
-}
-
-enum bt_component_status correlator_component_init(
-       struct bt_component *component, struct bt_value *params)
-{
-       enum bt_component_status ret;
-       struct correlator *correlator = create_correlator();
-
-       if (!correlator) {
-               ret = BT_COMPONENT_STATUS_NOMEM;
-               goto end;
-       }
-
-       ret = bt_component_set_destroy_cb(component,
-                       destroy_correlator);
-       if (ret != BT_COMPONENT_STATUS_OK) {
-               goto error;
-       }
-
-       ret = bt_component_set_private_data(component, correlator);
-       if (ret != BT_COMPONENT_STATUS_OK) {
-               goto error;
-       }
-end:
-       return ret;
-error:
-       destroy_correlator_data(correlator);
-       return ret;
-}
-
-/* Initialize plug-in entry points. */
-BT_PLUGIN_NAME("correlator");
-BT_PLUGIN_DESCRIPTION("Babeltrace Trace Correlator Plug-In.");
-BT_PLUGIN_AUTHOR("Jérémie Galarneau");
-BT_PLUGIN_LICENSE("MIT");
-
-BT_PLUGIN_COMPONENT_CLASSES_BEGIN
-BT_PLUGIN_FILTER_COMPONENT_CLASS_ENTRY("correlator",
-               "Time-correlate multiple traces.",
-               correlator_component_init)
-BT_PLUGIN_COMPONENT_CLASSES_END
diff --git a/plugins/muxer/Makefile.am b/plugins/muxer/Makefile.am
new file mode 100644 (file)
index 0000000..84fce07
--- /dev/null
@@ -0,0 +1,16 @@
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+
+SUBDIRS = .
+
+plugindir = "$(PLUGINSDIR)"
+plugin_LTLIBRARIES = libbabeltrace-plugin-muxer.la
+
+libbabeltrace_plugin_muxer_la_SOURCES = \
+       muxer.h muxer.c
+
+libbabeltrace_plugin_muxer_la_LDFLAGS = \
+       -version-info $(BABELTRACE_LIBRARY_VERSION)
+
+libbabeltrace_plugin_ctf_text_la_LIBADD = \
+       $(top_builddir)/lib/libbabeltrace.la \
+       $(top_builddir)/formats/ctf/libbabeltrace-ctf.la
diff --git a/plugins/muxer/muxer.c b/plugins/muxer/muxer.c
new file mode 100644 (file)
index 0000000..ba78cfb
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * muxer.c
+ *
+ * Babeltrace Trace Muxer
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <babeltrace/plugin/plugin-macros.h>
+#include <babeltrace/plugin/component.h>
+#include <babeltrace/plugin/filter.h>
+#include <babeltrace/plugin/notification/notification.h>
+#include <babeltrace/plugin/notification/iterator.h>
+#include <babeltrace/plugin/notification/event.h>
+#include "muxer.h"
+
+static
+void destroy_muxer_data(struct muxer *muxer)
+{
+       g_free(muxer);
+}
+
+static
+struct muxer *create_muxer(void)
+{
+       struct muxer *muxer;
+
+       muxer = g_new0(struct muxer, 1);
+       if (!muxer) {
+               goto end;
+       }
+end:
+       return muxer;
+}
+
+static
+void destroy_muxer(struct bt_component *component)
+{
+       void *data = bt_component_get_private_data(component);
+
+       destroy_muxer_data(data);
+}
+
+enum bt_component_status muxer_component_init(
+       struct bt_component *component, struct bt_value *params)
+{
+       enum bt_component_status ret;
+       struct muxer *muxer = create_muxer();
+
+       if (!muxer) {
+               ret = BT_COMPONENT_STATUS_NOMEM;
+               goto end;
+       }
+
+       ret = bt_component_set_destroy_cb(component,
+                       destroy_muxer);
+       if (ret != BT_COMPONENT_STATUS_OK) {
+               goto error;
+       }
+
+       ret = bt_component_set_private_data(component, muxer);
+       if (ret != BT_COMPONENT_STATUS_OK) {
+               goto error;
+       }
+end:
+       return ret;
+error:
+       destroy_muxer_data(muxer);
+       return ret;
+}
+
+/* Initialize plug-in entry points. */
+BT_PLUGIN_NAME("muxer");
+BT_PLUGIN_DESCRIPTION("Babeltrace Trace Muxer Plug-In.");
+BT_PLUGIN_AUTHOR("Jérémie Galarneau");
+BT_PLUGIN_LICENSE("MIT");
+
+BT_PLUGIN_COMPONENT_CLASSES_BEGIN
+BT_PLUGIN_FILTER_COMPONENT_CLASS_ENTRY("muxer",
+               "Time-correlate multiple traces.",
+               muxer_component_init)
+BT_PLUGIN_COMPONENT_CLASSES_END
diff --git a/plugins/muxer/muxer.h b/plugins/muxer/muxer.h
new file mode 100644 (file)
index 0000000..7793752
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef BABELTRACE_PLUGIN_MUXER_H
+#define BABELTRACE_PLUGIN_MUXER_H
+
+/*
+ * BabelTrace - Trace Muxer Plug-in
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <stdbool.h>
+#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/plugin/component.h>
+
+struct muxer {
+       GHashTable *trace_clocks;
+};
+
+#endif /* BABELTRACE_PLUGIN_MUXER_H */
This page took 0.029822 seconds and 4 git commands to generate.