#include "component-sink.h"
#include "connection.h"
+/* Protection: this file uses BT_LIB_LOG*() macros directly */
+#ifndef BT_LIB_LOG_SUPPORTED
+# error Please include "lib/logging.h" before including this file.
+#endif
+
+/* Protection: this file uses BT_ASSERT_PRE*() macros directly */
+#ifndef BT_ASSERT_PRE_SUPPORTED
+# error Please include "lib/assert-pre.h" before including this file.
+#endif
+
+/* Protection: this file uses BT_ASSERT_POST*() macros directly */
+#ifndef BT_ASSERT_POST_SUPPORTED
+# error Please include "lib/assert-post.h" before including this file.
+#endif
+
struct bt_component;
struct bt_port;
goto end;
}
-#ifdef BT_ASSERT_PRE
BT_ASSERT_PRE(graph->has_sink, "Graph has no sink component: %!+g", graph);
-#endif
-
graph->config_state = BT_GRAPH_CONFIGURATION_STATE_PARTIALLY_CONFIGURED;
for (i = 0; i < graph->components->len; i++) {
if (comp_cls_sink->methods.graph_is_configured) {
enum bt_self_component_status comp_status;
-#ifdef BT_LIB_LOGD
BT_LIB_LOGD("Calling user's \"graph is configured\" method: "
"%![graph-]+g, %![comp-]+c",
graph, comp);
-#endif
-
comp_status = comp_cls_sink->methods.graph_is_configured(
(void *) comp_sink);
-
-#ifdef BT_LIB_LOGD
BT_LIB_LOGD("User method returned: status=%s",
bt_self_component_status_string(comp_status));
-#endif
-
-#ifdef BT_ASSERT_POST
BT_ASSERT_POST(comp_status == BT_SELF_COMPONENT_STATUS_OK ||
comp_status == BT_SELF_COMPONENT_STATUS_ERROR ||
comp_status == BT_SELF_COMPONENT_STATUS_NOMEM,
"Unexpected returned status: status=%s",
bt_self_component_status_string(comp_status));
-#endif
if (comp_status != BT_SELF_COMPONENT_STATUS_OK) {
status = BT_GRAPH_STATUS_ERROR;
-#ifdef BT_LIB_LOGW
BT_LIB_LOGW("User's \"graph is configured\" method failed: "
"%![comp-]+c, status=%s",
comp,
bt_self_component_status_string(
comp_status));
-#endif
-
goto end;
}
}
void bt_graph_make_faulty(struct bt_graph *graph)
{
graph->config_state = BT_GRAPH_CONFIGURATION_STATE_FAULTY;
-#ifdef BT_LIB_LOGI
BT_LIB_LOGI("Set graph's state to faulty: %![graph-]+g", graph);
-#endif
}
#endif /* BABELTRACE_GRAPH_GRAPH_INTERNAL_H */
#define BT_LOG_TAG "LIB/MSG-PACKET"
#include "lib/logging.h"
+#include "lib/assert-pre.h"
+#include "lib/assert-post.h"
#include "compat/compiler.h"
#include <babeltrace2/trace-ir/packet.h>
#include "lib/trace-ir/packet.h"
#include <babeltrace2/graph/message-packet-beginning.h>
#include <babeltrace2/graph/message-packet-end.h>
#include "common/assert.h"
-#include "lib/assert-pre.h"
#include "lib/object.h"
#include <inttypes.h>
#include <wchar.h>
#include <glib.h>
#include "common/common.h"
-#include "lib/value.h"
-#include "lib/value.h"
-#include "lib/object-pool.h"
#include <babeltrace2/trace-ir/event-const.h>
#include <babeltrace2/trace-ir/packet-const.h>
#include <babeltrace2/trace-ir/stream-const.h>
+#include "logging.h"
+#include "assert-pre.h"
+#include "assert-post.h"
+#include "value.h"
+#include "object-pool.h"
#include "graph/component-class.h"
#include "graph/component-class-sink-colander.h"
#include "graph/component-filter.h"
#include "graph/message/stream-activity.h"
#include "graph/message/stream.h"
#include "graph/port.h"
-#include "logging.h"
#include "plugin/plugin.h"
#include "plugin/plugin-so.h"
#include "trace-ir/clock-class.h"
#include "trace-ir/trace-class.h"
#include "trace-ir/trace.h"
#include "trace-ir/utils.h"
-#include "assert-pre.h"
#define LIB_LOGGING_BUF_SIZE (4096 * 4)