From d8866baa7f1ae173ac9d9fac0ad55cb28f883cbf Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 5 May 2017 13:54:23 -0400 Subject: [PATCH] Rename writer.writer -> ctf.fs (sink) and standardize plugin descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- configure.ac | 4 +- plugins/Makefile.am | 2 +- plugins/ctf/Makefile.am | 7 +- plugins/ctf/fs-sink/Makefile.am | 8 + plugins/{writer => ctf/fs-sink}/write.c | 0 plugins/{writer => ctf/fs-sink}/writer.c | 24 +-- plugins/{writer => ctf/fs-sink}/writer.h | 17 ++ plugins/ctf/{fs => fs-src}/Makefile.am | 0 plugins/ctf/{fs => fs-src}/data-stream.c | 0 plugins/ctf/{fs => fs-src}/data-stream.h | 0 plugins/ctf/{fs => fs-src}/file.c | 0 plugins/ctf/{fs => fs-src}/file.h | 0 plugins/ctf/{fs => fs-src}/fs.c | 0 plugins/ctf/{fs => fs-src}/fs.h | 3 - plugins/ctf/{fs => fs-src}/lttng-index.h | 0 plugins/ctf/{fs => fs-src}/metadata.c | 0 plugins/ctf/{fs => fs-src}/metadata.h | 0 plugins/ctf/{fs => fs-src}/print.h | 0 plugins/ctf/lttng-live/lttng-live-internal.h | 2 - plugins/ctf/plugin.c | 23 ++- plugins/text/dmesg/Makefile.am | 7 + plugins/text/dmesg/dmesg.c | 190 +++++++++++++++++++ plugins/text/dmesg/dmesg.h | 51 +++++ plugins/text/plugin.c | 2 +- plugins/utils/plugin.c | 6 +- plugins/writer/Makefile.am | 22 --- 26 files changed, 307 insertions(+), 61 deletions(-) create mode 100644 plugins/ctf/fs-sink/Makefile.am rename plugins/{writer => ctf/fs-sink}/write.c (100%) rename plugins/{writer => ctf/fs-sink}/writer.c (91%) rename plugins/{writer => ctf/fs-sink}/writer.h (83%) rename plugins/ctf/{fs => fs-src}/Makefile.am (100%) rename plugins/ctf/{fs => fs-src}/data-stream.c (100%) rename plugins/ctf/{fs => fs-src}/data-stream.h (100%) rename plugins/ctf/{fs => fs-src}/file.c (100%) rename plugins/ctf/{fs => fs-src}/file.h (100%) rename plugins/ctf/{fs => fs-src}/fs.c (100%) rename plugins/ctf/{fs => fs-src}/fs.h (97%) rename plugins/ctf/{fs => fs-src}/lttng-index.h (100%) rename plugins/ctf/{fs => fs-src}/metadata.c (100%) rename plugins/ctf/{fs => fs-src}/metadata.h (100%) rename plugins/ctf/{fs => fs-src}/print.h (100%) create mode 100644 plugins/text/dmesg/Makefile.am create mode 100644 plugins/text/dmesg/dmesg.c create mode 100644 plugins/text/dmesg/dmesg.h delete mode 100644 plugins/writer/Makefile.am diff --git a/configure.ac b/configure.ac index 8890f4ab..0ca41afb 100644 --- a/configure.ac +++ b/configure.ac @@ -496,11 +496,11 @@ AC_CONFIG_FILES([ plugins/ctf/common/btr/Makefile plugins/ctf/common/metadata/Makefile plugins/ctf/common/notif-iter/Makefile - plugins/ctf/fs/Makefile + plugins/ctf/fs-src/Makefile + plugins/ctf/fs-sink/Makefile plugins/ctf/lttng-live/Makefile plugins/text/Makefile plugins/text/pretty/Makefile - plugins/writer/Makefile plugins/utils/Makefile plugins/utils/dummy/Makefile plugins/utils/trimmer/Makefile diff --git a/plugins/Makefile.am b/plugins/Makefile.am index c6249c4d..be2de4e7 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = libctfcopytrace ctf text utils writer +SUBDIRS = libctfcopytrace ctf text utils if ENABLE_DEBUG_INFO SUBDIRS += lttng-utils diff --git a/plugins/ctf/Makefile.am b/plugins/ctf/Makefile.am index f53a6ab3..566577ae 100644 --- a/plugins/ctf/Makefile.am +++ b/plugins/ctf/Makefile.am @@ -1,6 +1,6 @@ AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -SUBDIRS = common fs lttng-live +SUBDIRS = common fs-src fs-sink lttng-live plugindir = "$(PLUGINSDIR)" plugin_LTLIBRARIES = libbabeltrace-plugin-ctf.la @@ -13,5 +13,6 @@ libbabeltrace_plugin_ctf_la_LDFLAGS = \ libbabeltrace_plugin_ctf_la_LIBADD = \ $(top_builddir)/lib/libbabeltrace.la \ - fs/libbabeltrace-plugin-ctf-fs.la \ - lttng-live/libbabeltrace-plugin-ctf-lttng-live.la + fs-src/libbabeltrace-plugin-ctf-fs.la \ + lttng-live/libbabeltrace-plugin-ctf-lttng-live.la \ + fs-sink/libbabeltrace-plugin-ctf-writer.la diff --git a/plugins/ctf/fs-sink/Makefile.am b/plugins/ctf/fs-sink/Makefile.am new file mode 100644 index 00000000..62f77112 --- /dev/null +++ b/plugins/ctf/fs-sink/Makefile.am @@ -0,0 +1,8 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins \ + -I$(top_srcdir)/plugins/libctfcopytrace + +noinst_LTLIBRARIES = libbabeltrace-plugin-ctf-writer.la + +libbabeltrace_plugin_ctf_writer_la_LIBADD = \ + $(top_builddir)/plugins/libctfcopytrace/libctfcopytrace.la +libbabeltrace_plugin_ctf_writer_la_SOURCES = writer.c writer.h write.c diff --git a/plugins/writer/write.c b/plugins/ctf/fs-sink/write.c similarity index 100% rename from plugins/writer/write.c rename to plugins/ctf/fs-sink/write.c diff --git a/plugins/writer/writer.c b/plugins/ctf/fs-sink/writer.c similarity index 91% rename from plugins/writer/writer.c rename to plugins/ctf/fs-sink/writer.c index 3bca09b6..211a6a9c 100644 --- a/plugins/writer/writer.c +++ b/plugins/ctf/fs-sink/writer.c @@ -56,8 +56,8 @@ void destroy_writer_component_data(struct writer_component *writer_component) g_string_free(writer_component->trace_name_base, true); } -static -void finalize_writer_component(struct bt_private_component *component) +BT_HIDDEN +void writer_component_finalize(struct bt_private_component *component) { struct writer_component *writer_component = (struct writer_component *) bt_private_component_get_user_data(component); @@ -184,7 +184,7 @@ end: return ret; } -static +BT_HIDDEN void writer_component_port_connected( struct bt_private_component *component, struct bt_private_port *self_port, @@ -209,8 +209,8 @@ void writer_component_port_connected( bt_put(connection); } -static -enum bt_component_status run(struct bt_private_component *component) +BT_HIDDEN +enum bt_component_status writer_run(struct bt_private_component *component) { enum bt_component_status ret; struct bt_notification *notification = NULL; @@ -256,7 +256,7 @@ end: return ret; } -static +BT_HIDDEN enum bt_component_status writer_component_init( struct bt_private_component *component, struct bt_value *params, UNUSED_VAR void *init_method_data) @@ -315,15 +315,3 @@ error: g_free(writer_component); return ret; } - -/* Initialize plug-in entry points. */ -BT_PLUGIN(writer); -BT_PLUGIN_DESCRIPTION("Babeltrace CTF-Writer output plug-in."); -BT_PLUGIN_AUTHOR("Jérémie Galarneau"); -BT_PLUGIN_LICENSE("MIT"); -BT_PLUGIN_SINK_COMPONENT_CLASS(writer, run); -BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(writer, writer_component_init); -BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(writer, - writer_component_port_connected); -BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(writer, finalize_writer_component); -BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(writer, "Formats CTF-IR to CTF."); diff --git a/plugins/writer/writer.h b/plugins/ctf/fs-sink/writer.h similarity index 83% rename from plugins/writer/writer.h rename to plugins/ctf/fs-sink/writer.h index 6f6b8a49..1765a961 100644 --- a/plugins/writer/writer.h +++ b/plugins/ctf/fs-sink/writer.h @@ -59,4 +59,21 @@ BT_HIDDEN enum bt_component_status writer_close_packet(struct writer_component *writer, struct bt_ctf_packet *packet); +BT_HIDDEN +enum bt_component_status writer_component_init( + struct bt_private_component *component, struct bt_value *params, + void *init_method_data); + +BT_HIDDEN +enum bt_component_status writer_run(struct bt_private_component *component); + +BT_HIDDEN +void writer_component_port_connected( + struct bt_private_component *component, + struct bt_private_port *self_port, + struct bt_port *other_port); + +BT_HIDDEN +void writer_component_finalize(struct bt_private_component *component); + #endif /* BABELTRACE_PLUGIN_WRITER_H */ diff --git a/plugins/ctf/fs/Makefile.am b/plugins/ctf/fs-src/Makefile.am similarity index 100% rename from plugins/ctf/fs/Makefile.am rename to plugins/ctf/fs-src/Makefile.am diff --git a/plugins/ctf/fs/data-stream.c b/plugins/ctf/fs-src/data-stream.c similarity index 100% rename from plugins/ctf/fs/data-stream.c rename to plugins/ctf/fs-src/data-stream.c diff --git a/plugins/ctf/fs/data-stream.h b/plugins/ctf/fs-src/data-stream.h similarity index 100% rename from plugins/ctf/fs/data-stream.h rename to plugins/ctf/fs-src/data-stream.h diff --git a/plugins/ctf/fs/file.c b/plugins/ctf/fs-src/file.c similarity index 100% rename from plugins/ctf/fs/file.c rename to plugins/ctf/fs-src/file.c diff --git a/plugins/ctf/fs/file.h b/plugins/ctf/fs-src/file.h similarity index 100% rename from plugins/ctf/fs/file.h rename to plugins/ctf/fs-src/file.h diff --git a/plugins/ctf/fs/fs.c b/plugins/ctf/fs-src/fs.c similarity index 100% rename from plugins/ctf/fs/fs.c rename to plugins/ctf/fs-src/fs.c diff --git a/plugins/ctf/fs/fs.h b/plugins/ctf/fs-src/fs.h similarity index 97% rename from plugins/ctf/fs/fs.h rename to plugins/ctf/fs-src/fs.h index 836c106c..4619e79b 100644 --- a/plugins/ctf/fs/fs.h +++ b/plugins/ctf/fs-src/fs.h @@ -33,9 +33,6 @@ #include #include "data-stream.h" -#define CTF_FS_COMPONENT_DESCRIPTION \ - "Component used to read a CTF trace located on a file system." - BT_HIDDEN extern bool ctf_fs_debug; diff --git a/plugins/ctf/fs/lttng-index.h b/plugins/ctf/fs-src/lttng-index.h similarity index 100% rename from plugins/ctf/fs/lttng-index.h rename to plugins/ctf/fs-src/lttng-index.h diff --git a/plugins/ctf/fs/metadata.c b/plugins/ctf/fs-src/metadata.c similarity index 100% rename from plugins/ctf/fs/metadata.c rename to plugins/ctf/fs-src/metadata.c diff --git a/plugins/ctf/fs/metadata.h b/plugins/ctf/fs-src/metadata.h similarity index 100% rename from plugins/ctf/fs/metadata.h rename to plugins/ctf/fs-src/metadata.h diff --git a/plugins/ctf/fs/print.h b/plugins/ctf/fs-src/print.h similarity index 100% rename from plugins/ctf/fs/print.h rename to plugins/ctf/fs-src/print.h diff --git a/plugins/ctf/lttng-live/lttng-live-internal.h b/plugins/ctf/lttng-live/lttng-live-internal.h index e2f99b47..51556274 100644 --- a/plugins/ctf/lttng-live/lttng-live-internal.h +++ b/plugins/ctf/lttng-live/lttng-live-internal.h @@ -30,8 +30,6 @@ #include #include -#define LTTNG_LIVE_COMPONENT_DESCRIPTION "Component implementing an LTTng-live client." - BT_HIDDEN enum bt_component_status lttng_live_init(struct bt_private_component *source, struct bt_value *params, void *init_method_data); diff --git a/plugins/ctf/plugin.c b/plugins/ctf/plugin.c index 6d483b1d..7b18bd10 100644 --- a/plugins/ctf/plugin.c +++ b/plugins/ctf/plugin.c @@ -27,18 +27,20 @@ */ #include -#include "fs/fs.h" +#include "fs-src/fs.h" +#include "fs-sink/writer.h" #include "lttng-live/lttng-live-internal.h" /* Initialize plug-in description. */ BT_PLUGIN(ctf); -BT_PLUGIN_DESCRIPTION("Built-in Babeltrace plug-in providing CTF read support."); -BT_PLUGIN_AUTHOR("Jérémie Galarneau"); +BT_PLUGIN_DESCRIPTION("CTF source and sink support"); +BT_PLUGIN_AUTHOR("Julien Desfossez, Mathieu Desnoyers, Jérémie Galarneau, Philippe Proulx"); BT_PLUGIN_LICENSE("MIT"); -/* Declare component classes implemented by this plug-in. */ +/* ctf.fs soource */ BT_PLUGIN_SOURCE_COMPONENT_CLASS(fs, ctf_fs_iterator_next); -BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(fs, CTF_FS_COMPONENT_DESCRIPTION); +BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(fs, + "Read CTF traces from the file system."); BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(fs, ctf_fs_init); BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(fs, ctf_fs_query); BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(fs, ctf_fs_finalize); @@ -47,9 +49,18 @@ BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(fs, BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(fs, ctf_fs_iterator_finalize); +/* ctf.lttng-live source */ BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, lttng_live, "lttng-live", lttng_live_iterator_next); BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, lttng_live, lttng_live_init); BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, lttng_live, - LTTNG_LIVE_COMPONENT_DESCRIPTION); + "Connect to an LTTng relay daemon and receive CTF streams."); + +/* ctf.fs sink */ +BT_PLUGIN_SINK_COMPONENT_CLASS(fs, writer_run); +BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(fs, writer_component_init); +BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(fs, + writer_component_port_connected); +BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(fs, writer_component_finalize); +BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(fs, "Write CTF traces to the file system."); diff --git a/plugins/text/dmesg/Makefile.am b/plugins/text/dmesg/Makefile.am new file mode 100644 index 00000000..04df5eb7 --- /dev/null +++ b/plugins/text/dmesg/Makefile.am @@ -0,0 +1,7 @@ +AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins + +noinst_LTLIBRARIES = libbabeltrace-plugin-text-dmesg-cc.la + +libbabeltrace_plugin_text_dmesg_cc_la_SOURCES = dmesg.c dmesg.h +libbabeltrace_plugin_text_dmesg_cc_la_LIBADD = \ + $(top_builddir)/common/libbabeltrace-common.la diff --git a/plugins/text/dmesg/dmesg.c b/plugins/text/dmesg/dmesg.c new file mode 100644 index 00000000..0f8a6e76 --- /dev/null +++ b/plugins/text/dmesg/dmesg.c @@ -0,0 +1,190 @@ +/* + * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation + * Copyright 2017 Philippe Proulx + * + * 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 +#include +#include +#include +#include +#include +#include + +struct dmesg_component; + +struct dmesg_notif_iter { + struct dmesg_component *dmesg_comp; + FILE *fp; +}; + +struct dmesg_component { + struct { + GString *path; + bool read_from_stdin; + } params; + + struct bt_ctf_packet *packet; + struct bt_ctf_event_class *event_class; + struct bt_ctf_stream *stream; + struct bt_clock_class_priority_map *cc_prio_map; +}; + +static +int check_params(struct dmesg_component *dmesg_comp, struct bt_value *params) +{ + struct bt_value *read_from_stdin; + struct bt_value *path; + const char *path_str; + int ret = 0; + + if (!params || !bt_value_is_map(params)) { + fprintf(stderr, "Expecting a map value as parameters.\n"); + goto error; + } + + read_from_stdin = bt_value_map_get(params, "read-from-stdin"); + if (read_from_stdin) { + if (!bt_value_is_bool(read_from_stdin)) { + fprintf(stderr, "Expecting a boolean value for `read-from-stdin` parameter.\n"); + goto error; + } + + ret = bt_value_bool_get(read_from_stdin, + &dmesg_comp->params.read_from_stdin); + assert(ret == 0); + } + + path = bt_value_map_get(params, "path"); + if (path) { + if (dmesg_comp->params.read_from_stdin) { + fprintf(stderr, "Cannot specify both `read-from-stdin` and `path` parameters.\n"); + goto error; + } + + if (!bt_value_is_string(path)) { + fprintf(stderr, "Expecting a string value for `path` parameter.\n"); + goto error; + } + + ret = bt_value_bool_get(path, &path_str); + assert(ret == 0); + g_string_assign(dmesg_comp->params.path, path_str); + } else { + if (!dmesg_comp->params.read_from_stdin) { + fprintf(stderr, "Expecting `path` parameter or `read-from-stdin` parameter set to true.\n"); + goto error; + } + } + + goto end; + +error: + ret = -1; + +end: + bt_put(read_from_stdin); + bt_put(path); + return ret; +} + +static +int create_stream() + +static +void destroy_dmesg_component(struct dmesg_component *dmesg_comp) +{ + if (!dmesg_comp) { + return; + } + + if (dmesg_comp->params.path) { + g_string_free(dmesg_comp->params.path, TRUE); + } + + bt_put(dmesg_comp->packet); + bt_put(dmesg_comp->event_class); + bt_put(dmesg_comp->stream); + bt_put(dmesg_comp->cc_prio_map); + g_free(dmesg_comp); +} + +BT_HIDDEN +enum bt_component_status dmesg_init(struct bt_private_component *priv_comp, + struct bt_value *params, void *init_method_data) +{ + int ret = 0; + struct dmesg_component *dmesg_comp = g_new0(struct dmesg_component, 1); + enum bt_component_status status = BT_COMPONENT_STATUS_OK; + + if (!dmesg_comp) { + goto error; + } + + dmesg_comp->params.path = g_string_new(NULL); + if (!dmesg_comp->params.path) { + goto error; + } + + ret = check_params(dmesg_comp, params); + if (ret) { + goto error; + } + + + + goto end; + +error: + destroy_dmesg_component(dmesg_comp); + status = BT_COMPONENT_STATUS_ERROR; + +end: + return status; +} + +BT_HIDDEN +void dmesg_finalize(struct bt_private_component *priv_comp) +{ + +} + +BT_HIDDEN +enum bt_notification_iterator_status dmesg_notif_iter_init( + struct bt_private_notification_iterator *priv_notif_iter, + struct bt_private_port *priv_port) +{ + +} + +BT_HIDDEN +void dmesg_iterator_finalize( + struct bt_private_notification_iterator *priv_notif_iter) +{ + +} + +BT_HIDDEN +struct bt_notification_iterator_next_return dmesg_notif_iter_next( + struct bt_private_notification_iterator *priv_notif_iter) +{ + +} diff --git a/plugins/text/dmesg/dmesg.h b/plugins/text/dmesg/dmesg.h new file mode 100644 index 00000000..1108cb1a --- /dev/null +++ b/plugins/text/dmesg/dmesg.h @@ -0,0 +1,51 @@ +#ifndef BABELTRACE_PLUGIN_TEXT_DMESG_DMESG_H +#define BABELTRACE_PLUGIN_TEXT_DMESG_DMESG_H + +/* + * Copyright 2017 Philippe Proulx + * + * 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 +#include +#include +#include + +BT_HIDDEN +enum bt_component_status dmesg_init(struct bt_private_component *priv_comp, + struct bt_value *params, void *init_method_data); + +BT_HIDDEN +void dmesg_finalize(struct bt_private_component *priv_comp); + +BT_HIDDEN +enum bt_notification_iterator_status dmesg_notif_iter_init( + struct bt_private_notification_iterator *priv_notif_iter, + struct bt_private_port *priv_port); + +BT_HIDDEN +void dmesg_iterator_finalize( + struct bt_private_notification_iterator *priv_notif_iter); + +BT_HIDDEN +struct bt_notification_iterator_next_return dmesg_notif_iter_next( + struct bt_private_notification_iterator *priv_notif_iter); + +#endif /* BABELTRACE_PLUGIN_TEXT_DMESG_DMESG_H */ diff --git a/plugins/text/plugin.c b/plugins/text/plugin.c index 1449e757..ff982630 100644 --- a/plugins/text/plugin.c +++ b/plugins/text/plugin.c @@ -35,4 +35,4 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(pretty, pretty_finalize); BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(pretty, pretty_port_connected); BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(pretty, - "Pretty-printing text output (`text` format of Babeltrace 1)"); + "Pretty-printing text output (`text` format of Babeltrace 1)."); diff --git a/plugins/utils/plugin.c b/plugins/utils/plugin.c index 3f596299..c155d771 100644 --- a/plugins/utils/plugin.c +++ b/plugins/utils/plugin.c @@ -38,12 +38,12 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(dummy, dummy_finalize); BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(dummy, dummy_port_connected); BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(dummy, - "Dummy sink component class: does absolutely nothing!"); + "Consume notifications and discard them."); /* trimmer filter */ BT_PLUGIN_FILTER_COMPONENT_CLASS(trimmer, trimmer_iterator_next); BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(trimmer, - "Ensure that trace notifications outside of a given range are filtered-out."); + "Keep notifications that occur within a specific time range."); BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(trimmer, trimmer_component_init); BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(trimmer, finalize_trimmer); BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(trimmer, @@ -56,7 +56,7 @@ BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(trimmer, /* muxer filter */ BT_PLUGIN_FILTER_COMPONENT_CLASS(muxer, muxer_notif_iter_next); BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(muxer, - "Notification multiplexer"); + "Sort notifications from multiple input ports to a single output port by time."); BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(muxer, muxer_init); BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(muxer, muxer_finalize); BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(muxer, diff --git a/plugins/writer/Makefile.am b/plugins/writer/Makefile.am deleted file mode 100644 index 5b219e33..00000000 --- a/plugins/writer/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins \ - -I$(top_srcdir)/plugins/libctfcopytrace - -SUBDIRS = . - -plugindir = "$(PLUGINSDIR)" -plugin_LTLIBRARIES = libbabeltrace-plugin-ctf-writer.la - -# ctf-writer plugin -libbabeltrace_plugin_ctf_writer_la_SOURCES = \ - writer.c \ - write.c \ - writer.h - -libbabeltrace_plugin_ctf_writer_la_LDFLAGS = \ - -version-info $(BABELTRACE_LIBRARY_VERSION) - -libbabeltrace_plugin_ctf_writer_la_LIBADD = \ - $(top_builddir)/lib/libbabeltrace.la \ - $(top_builddir)/plugins/libctfcopytrace/libctfcopytrace.la - -noinst_HEADERS = writer.h -- 2.34.1