From 3f7d4d90b0456de9d34fac337350818ef06163bd Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 14 Jun 2019 16:58:49 -0400 Subject: [PATCH] Standardize log levels used by logging statements across the project Let's use this approach now: INFO level: Any useful information which a non-developer user would possibly understand. Anything logged with this level must _not_ happen repetitively on the fast path, that is, nothing related to each message, for example. This level is used for sporadic and one-shot events. * CLI or component configuration report. * Successful plugin, component, or message iterator initialization. * In the library: anything related to plugins, graphs, component classes, components, message iterators, connections, and ports which is not on the fast path. * Successful connection to or disconnection from another system. * An _optional_ subsystem cannot be loaded. * An _optional_ field/datum cannot be found. DEBUG level: Something that only Babeltrace developers would be interested into, which can occur on the fast path, but not more often than once per message. * Object construction and destruction. * Object recycling (except fields). * Object copying (except fields and values). * Object freezing (whatever the type, as freezing only occurs in developer mode). * Object cancellation. * Calling user methods and logging the result. * Setting object properties (except fields and values). VERBOSE level: Low-level debugging context information (anything that does not fit the other log levels). More appropriate for tracing in general. * Reference count change. * Fast path, low level state machine's state change. * Get or set an object's property. * Object comparison's intermediate results. This will also be written in `CONTRIBUTING.adoc` by another patch. The goal here is to make the DEBUG level the default minimal, build-time log level, so that Babeltrace users have enough logging by default without impacting the performance too much. From what I measured once this patch is applied, the performance is very similar to an INFO build. Many DEBUG logging statements are upgraded to the INFO level because they only occur once, or very rarely, and consist of interesting information for someone who does not have deep knowledge of the Babeltrace source code. Many VERBOSE logging statements are upgraded to the DEBUG level so that, by default, we have more information in the log file of someone who needs support. Those statements are executed seldom enough (at most once per message) to be promoted as such. Signed-off-by: Philippe Proulx Change-Id: Icdd1ec8f1f54396eea5588968d85e446030f282d Reviewed-on: https://review.lttng.org/c/babeltrace/+/1439 Tested-by: jenkins Reviewed-by: Francis Deslauriers Reviewed-by: Simon Marchi --- src/cli/babeltrace2.c | 53 ++++++------ src/common/common.c | 4 +- src/common/common.h | 2 +- src/ctfser/ctfser.c | 12 +-- src/fd-cache/fd-cache.c | 6 +- src/lib/graph/component-class-sink-colander.c | 16 +--- src/lib/graph/component-class.c | 80 +++++++++--------- src/lib/graph/component.c | 18 ++-- src/lib/graph/connection.c | 10 +-- src/lib/graph/graph.c | 63 +++++++------- src/lib/graph/graph.h | 4 +- src/lib/graph/iterator.c | 24 +++--- .../message/message-iterator-inactivity.c | 6 +- src/lib/graph/message/stream-activity.c | 4 +- src/lib/graph/port.c | 8 +- src/lib/graph/query-executor.c | 2 +- src/lib/object-pool.h | 8 +- src/lib/plugin/plugin-so.c | 83 +++++++++---------- src/lib/plugin/plugin.c | 38 ++++----- src/lib/plugin/plugin.h | 16 ++-- src/lib/trace-ir/clock-class.c | 16 ++-- src/lib/trace-ir/event-class.c | 10 +-- src/lib/trace-ir/event.h | 2 +- src/lib/trace-ir/field-class.c | 8 +- src/lib/trace-ir/stream-class.c | 20 ++--- src/lib/trace-ir/stream.c | 2 +- src/lib/trace-ir/trace-class.c | 14 ++-- src/lib/trace-ir/trace.c | 8 +- src/plugins/ctf/common/bfcr/bfcr.c | 2 +- .../ctf/common/metadata/ctf-meta-resolve.c | 30 +++---- src/plugins/ctf/common/metadata/decoder.c | 14 ++-- src/plugins/ctf/common/msg-iter/msg-iter.c | 52 ++++++------ src/plugins/ctf/fs-sink/fs-sink-trace.c | 36 ++++---- src/plugins/ctf/fs-src/data-stream-file.c | 18 ++-- src/plugins/ctf/fs-src/file.c | 6 +- src/plugins/ctf/fs-src/fs.c | 12 +-- src/plugins/ctf/lttng-live/data-stream.c | 2 +- src/plugins/ctf/lttng-live/lttng-live.c | 8 +- .../ctf/lttng-live/viewer-connection.c | 20 ++--- src/plugins/lttng-utils/debug-info/bin-info.c | 12 +-- .../lttng-utils/debug-info/debug-info.c | 10 +-- .../debug-info/trace-ir-data-copy.c | 4 +- src/plugins/utils/muxer/muxer.c | 40 ++++----- .../python-plugin-provider.c | 7 +- 44 files changed, 398 insertions(+), 412 deletions(-) diff --git a/src/cli/babeltrace2.c b/src/cli/babeltrace2.c index 4f786c2e..b78eebe0 100644 --- a/src/cli/babeltrace2.c +++ b/src/cli/babeltrace2.c @@ -97,7 +97,7 @@ static void set_signal_handler(void) { if (!SetConsoleCtrlHandler(signal_handler, TRUE)) { - BT_LOGE("Failed to set the ctrl+c handler."); + BT_LOGE("Failed to set the Ctrl+C handler."); } } @@ -209,7 +209,7 @@ int query(const bt_component_class *comp_cls, const char *obj, const uint64_t sleep_time_us = 100000; /* Wait 100 ms and retry */ - BT_LOGV("Got BT_QUERY_EXECUTOR_STATUS_AGAIN: sleeping: " + BT_LOGD("Got BT_QUERY_EXECUTOR_STATUS_AGAIN: sleeping: " "time-us=%" PRIu64, sleep_time_us); if (usleep(sleep_time_us)) { @@ -270,7 +270,7 @@ const bt_plugin *find_plugin(const char *name) const bt_plugin *plugin = NULL; BT_ASSERT(name); - BT_LOGD("Finding plugin: name=\"%s\"", name); + BT_LOGI("Finding plugin: name=\"%s\"", name); for (i = 0; i < loaded_plugins->len; i++) { plugin = g_ptr_array_index(loaded_plugins, i); @@ -282,12 +282,11 @@ const bt_plugin *find_plugin(const char *name) plugin = NULL; } - if (BT_LOG_ON_DEBUG) { - if (plugin) { - BT_LOGD("Found plugin: plugin-addr=%p", plugin); - } else { - BT_LOGD("Cannot find plugin."); - } + if (plugin) { + BT_LOGI("Found plugin: name=\"%s\", plugin-addr=%p", + name, plugin); + } else { + BT_LOGI("Cannot find plugin: name=\"%s\"", name); } bt_plugin_get_ref(plugin); @@ -305,7 +304,7 @@ const void *find_component_class_from_plugin(const char *plugin_name, const void *comp_class = NULL; const bt_plugin *plugin; - BT_LOGD("Finding component class: plugin-name=\"%s\", " + BT_LOGI("Finding component class: plugin-name=\"%s\", " "comp-cls-name=\"%s\"", plugin_name, comp_class_name); plugin = find_plugin(plugin_name); @@ -318,13 +317,13 @@ const void *find_component_class_from_plugin(const char *plugin_name, BT_PLUGIN_PUT_REF_AND_RESET(plugin); end: - if (BT_LOG_ON_DEBUG) { - if (comp_class) { - BT_LOGD("Found component class: comp-cls-addr=%p", - comp_class); - } else { - BT_LOGD("Cannot find source component class."); - } + if (comp_class) { + BT_LOGI("Found component class: plugin-name=\"%s\", " + "comp-cls-name=\"%s\"", plugin_name, comp_class_name); + } else { + BT_LOGI("Cannot find source component class: " + "plugin-name=\"%s\", comp-cls-name=\"%s\"", + plugin_name, comp_class_name); } return comp_class; @@ -735,9 +734,9 @@ void print_cfg(struct bt_config *cfg) return; } - BT_LOGI_STR("Configuration:"); - fprintf(stderr, " Debug mode: %s\n", cfg->debug ? "yes" : "no"); - fprintf(stderr, " Verbose mode: %s\n", cfg->verbose ? "yes" : "no"); + BT_LOGI_STR("CLI configuration:"); + BT_LOGI(" Debug mode: %s\n", cfg->debug ? "yes" : "no"); + BT_LOGI(" Verbose mode: %s\n", cfg->verbose ? "yes" : "no"); switch (cfg->command) { case BT_CONFIG_COMMAND_RUN: @@ -810,7 +809,7 @@ int load_dynamic_plugins(const bt_value *plugin_paths) goto end; } - BT_LOGI("Loading dynamic plugins."); + BT_LOGI_STR("Loading dynamic plugins."); for (i = 0; i < nr_paths; i++) { const bt_value *plugin_path_value = NULL; @@ -828,15 +827,15 @@ int load_dynamic_plugins(const bt_value *plugin_paths) * directory. */ if (!g_file_test(plugin_path, G_FILE_TEST_IS_DIR)) { - BT_LOGV("Skipping nonexistent directory path: " + BT_LOGI("Skipping nonexistent directory path: " "path=\"%s\"", plugin_path); continue; } plugin_set = bt_plugin_find_all_from_dir(plugin_path, false); if (!plugin_set) { - BT_LOGD("Unable to load dynamic plugins: path=\"%s\"", - plugin_path); + BT_LOGI("Unable to load dynamic plugins from directory: " + "path=\"%s\"", plugin_path); continue; } @@ -1735,7 +1734,7 @@ int cmd_run_ctx_connect_upstream_port_to_downstream_component( /* Skip port if it's already connected. */ if (bt_port_is_connected(downstream_port)) { - BT_LOGD("Skipping downstream port: already connected: " + BT_LOGI("Skipping downstream port: already connected: " "port-addr=%p, port-name=\"%s\"", downstream_port, bt_port_get_name(downstream_port)); @@ -2297,14 +2296,14 @@ int set_stream_intersections(struct cmd_run_ctx *ctx, stream_infos, stream_idx); if (!stream_info || !bt_value_is_map(stream_info)) { ret = -1; - BT_LOGD_STR("Cannot retrieve stream informations from trace in query result."); + BT_LOGE_STR("Cannot retrieve stream informations from trace in query result."); goto error; } port_name = bt_value_map_borrow_entry_value_const(stream_info, "port-name"); if (!port_name || !bt_value_is_string(port_name)) { ret = -1; - BT_LOGD_STR("Cannot retrieve port name in query result."); + BT_LOGE_STR("Cannot retrieve port name in query result."); goto error; } diff --git a/src/common/common.c b/src/common/common.c index 4aa8fcd2..3c48e84f 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -169,8 +169,8 @@ char *bt_common_get_home_plugin_path(void) length = strlen(home_dir) + strlen(HOME_PLUGIN_SUBPATH) + 1; if (length >= PATH_MAX) { - BT_LOGW("Home directory path is too long: length=%zu", - length); + BT_LOGW("Home directory path is too long: " + "length=%zu, max-length=%u", length, PATH_MAX); goto end; } diff --git a/src/common/common.h b/src/common/common.h index ef9a715f..570eec67 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -348,7 +348,7 @@ ssize_t bt_common_read(int fd, void *buf, size_t count) if (ret < 0) { if (errno == EINTR) { #ifdef BT_LOGD_STR - BT_LOGD_STR("read() call interrupted. Retrying..."); + BT_LOGD_STR("read() call interrupted; retrying..."); #endif /* retry operation */ continue; diff --git a/src/ctfser/ctfser.c b/src/ctfser/ctfser.c index 9e970f19..6043db32 100644 --- a/src/ctfser/ctfser.c +++ b/src/ctfser/ctfser.c @@ -63,7 +63,7 @@ int _bt_ctfser_increase_cur_packet_size(struct bt_ctfser *ctfser) int ret; BT_ASSERT(ctfser); - BT_LOGV("Increasing stream file's current packet size: " + BT_LOGD("Increasing stream file's current packet size: " "path=\"%s\", fd=%d, " "offset-in-cur-packet-bits=%" PRIu64 ", " "cur-packet-size-bytes=%" PRIu64, @@ -97,7 +97,7 @@ int _bt_ctfser_increase_cur_packet_size(struct bt_ctfser *ctfser) goto end; } - BT_LOGV("Increased packet size: " + BT_LOGD("Increased packet size: " "path=\"%s\", fd=%d, " "offset-in-cur-packet-bits=%" PRIu64 ", " "new-packet-size-bytes=%" PRIu64, @@ -194,7 +194,7 @@ int bt_ctfser_open_packet(struct bt_ctfser *ctfser) { int ret = 0; - BT_LOGV("Opening packet: path=\"%s\", fd=%d, " + BT_LOGD("Opening packet: path=\"%s\", fd=%d, " "prev-packet-size-bytes=%" PRIu64, ctfser->path->str, ctfser->fd, ctfser->prev_packet_size_bytes); @@ -244,7 +244,7 @@ int bt_ctfser_open_packet(struct bt_ctfser *ctfser) goto end; } - BT_LOGV("Opened packet: path=\"%s\", fd=%d, " + BT_LOGD("Opened packet: path=\"%s\", fd=%d, " "cur-packet-size-bytes=%" PRIu64, ctfser->path->str, ctfser->fd, ctfser->cur_packet_size_bytes); @@ -257,7 +257,7 @@ BT_HIDDEN void bt_ctfser_close_current_packet(struct bt_ctfser *ctfser, uint64_t packet_size_bytes) { - BT_LOGV("Closing packet: path=\"%s\", fd=%d, " + BT_LOGD("Closing packet: path=\"%s\", fd=%d, " "offset-in-cur-packet-bits=%" PRIu64 "cur-packet-size-bytes=%" PRIu64, ctfser->path->str, ctfser->fd, @@ -273,7 +273,7 @@ void bt_ctfser_close_current_packet(struct bt_ctfser *ctfser, */ ctfser->prev_packet_size_bytes = packet_size_bytes; ctfser->stream_size_bytes += packet_size_bytes; - BT_LOGV("Closed packet: path=\"%s\", fd=%d, " + BT_LOGD("Closed packet: path=\"%s\", fd=%d, " "stream-file-size-bytes=%" PRIu64, ctfser->path->str, ctfser->fd, ctfser->stream_size_bytes); diff --git a/src/fd-cache/fd-cache.c b/src/fd-cache/fd-cache.c index 6d625189..cb1472b9 100644 --- a/src/fd-cache/fd-cache.c +++ b/src/fd-cache/fd-cache.c @@ -169,13 +169,13 @@ struct bt_fd_cache_handle *bt_fd_cache_get_handle(struct bt_fd_cache *fdc, fd_internal = g_new0(struct fd_handle_internal, 1); if (!fd_internal) { - BT_LOGE("Failed to allocate fd internal handle"); + BT_LOGE_STR("Failed to allocate internal FD handle."); goto error; } file_key = g_new0(struct file_key, 1); if (!fd_internal) { - BT_LOGE("Failed to allocate file key"); + BT_LOGE_STR("Failed to allocate file key."); goto error; } @@ -233,7 +233,7 @@ void bt_fd_cache_put_handle(struct bt_fd_cache *fdc, close_ret = close(fd_internal->fd_handle.fd); if (close_ret == -1) { - BT_LOGW_ERRNO("Failed to close file descriptor", + BT_LOGE_ERRNO("Failed to close file descriptor", ": fd=%d", fd_internal->fd_handle.fd); } ret = g_hash_table_remove(fdc->cache, fd_internal->key); diff --git a/src/lib/graph/component-class-sink-colander.c b/src/lib/graph/component-class-sink-colander.c index 667b997c..0084772e 100644 --- a/src/lib/graph/component-class-sink-colander.c +++ b/src/lib/graph/component-class-sink-colander.c @@ -48,12 +48,7 @@ enum bt_self_component_status colander_init( struct bt_component_class_sink_colander_data *user_provided_data = init_method_data; - if (!init_method_data) { - BT_LOGW_STR("Component initialization method data is NULL."); - status = BT_SELF_COMPONENT_STATUS_ERROR; - goto end; - } - + BT_ASSERT(init_method_data); colander_data = g_new0( struct bt_component_class_sink_colander_priv_data, 1); if (!colander_data) { @@ -136,14 +131,7 @@ enum bt_self_component_status colander_consume( bt_message_array_const msgs; BT_ASSERT(colander_data); - - if (!colander_data->msg_iter) { - BT_LIB_LOGW("Trying to consume without an " - "upstream message iterator: %![comp-]+c", - self_comp); - goto end; - } - + BT_ASSERT(colander_data->msg_iter); msg_iter_status = bt_self_component_port_input_message_iterator_next( colander_data->msg_iter, &msgs, diff --git a/src/lib/graph/component-class.c b/src/lib/graph/component-class.c index 87bdb936..13c20d05 100644 --- a/src/lib/graph/component-class.c +++ b/src/lib/graph/component-class.c @@ -53,7 +53,7 @@ void destroy_component_class(struct bt_object *obj) BT_ASSERT(obj); class = container_of(obj, struct bt_component_class, base); - BT_LIB_LOGD("Destroying component class: %!+C", class); + BT_LIB_LOGI("Destroying component class: %!+C", class); /* Call destroy listeners in reverse registration order */ for (i = class->destroy_listeners->len - 1; i >= 0; i--) { @@ -142,7 +142,7 @@ struct bt_component_class_source *bt_component_class_source_create( BT_ASSERT_PRE_NON_NULL(name, "Name"); BT_ASSERT_PRE_NON_NULL(method, "Message iterator next method"); - BT_LOGD("Creating source component class: " + BT_LOGI("Creating source component class: " "name=\"%s\", msg-iter-next-method-addr=%p", name, method); source_class = g_new0(struct bt_component_class_source, 1); @@ -165,7 +165,7 @@ struct bt_component_class_source *bt_component_class_source_create( } source_class->methods.msg_iter_next = method; - BT_LIB_LOGD("Created source component class: %!+C", source_class); + BT_LIB_LOGI("Created source component class: %!+C", source_class); end: return (void *) source_class; @@ -180,7 +180,7 @@ struct bt_component_class_filter *bt_component_class_filter_create( BT_ASSERT_PRE_NON_NULL(name, "Name"); BT_ASSERT_PRE_NON_NULL(method, "Message iterator next method"); - BT_LOGD("Creating filter component class: " + BT_LOGI("Creating filter component class: " "name=\"%s\", msg-iter-next-method-addr=%p", name, method); filter_class = g_new0(struct bt_component_class_filter, 1); @@ -203,7 +203,7 @@ struct bt_component_class_filter *bt_component_class_filter_create( } filter_class->methods.msg_iter_next = method; - BT_LIB_LOGD("Created filter component class: %!+C", filter_class); + BT_LIB_LOGI("Created filter component class: %!+C", filter_class); end: return (void *) filter_class; @@ -217,7 +217,7 @@ struct bt_component_class_sink *bt_component_class_sink_create( BT_ASSERT_PRE_NON_NULL(name, "Name"); BT_ASSERT_PRE_NON_NULL(method, "Consume next method"); - BT_LOGD("Creating sink component class: " + BT_LOGI("Creating sink component class: " "name=\"%s\", consume-method-addr=%p", name, method); sink_class = g_new0(struct bt_component_class_sink, 1); @@ -240,7 +240,7 @@ struct bt_component_class_sink *bt_component_class_sink_create( } sink_class->methods.consume = method; - BT_LIB_LOGD("Created sink component class: %!+C", sink_class); + BT_LIB_LOGI("Created sink component class: %!+C", sink_class); end: return (void *) sink_class; @@ -255,7 +255,7 @@ bt_component_class_source_set_init_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.init = method; - BT_LIB_LOGV("Set source component class's initialization method: " + BT_LIB_LOGD("Set source component class's initialization method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -269,7 +269,7 @@ bt_component_class_filter_set_init_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.init = method; - BT_LIB_LOGV("Set filter component class's initialization method: " + BT_LIB_LOGD("Set filter component class's initialization method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -283,7 +283,7 @@ bt_component_class_sink_set_init_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.init = method; - BT_LIB_LOGV("Set sink component class's initialization method: " + BT_LIB_LOGD("Set sink component class's initialization method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -297,7 +297,7 @@ bt_component_class_source_set_finalize_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.finalize = method; - BT_LIB_LOGV("Set source component class's finalization method: " + BT_LIB_LOGD("Set source component class's finalization method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -311,7 +311,7 @@ bt_component_class_filter_set_finalize_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.finalize = method; - BT_LIB_LOGV("Set filter component class's finalization method: " + BT_LIB_LOGD("Set filter component class's finalization method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -325,7 +325,7 @@ bt_component_class_sink_set_finalize_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.finalize = method; - BT_LIB_LOGV("Set sink component class's finalization method: " + BT_LIB_LOGD("Set sink component class's finalization method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -339,7 +339,7 @@ bt_component_class_source_set_query_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.query = method; - BT_LIB_LOGV("Set source component class's query method: " + BT_LIB_LOGD("Set source component class's query method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -353,7 +353,7 @@ bt_component_class_filter_set_query_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.query = method; - BT_LIB_LOGV("Set filter component class's query method: " + BT_LIB_LOGD("Set filter component class's query method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -367,7 +367,7 @@ bt_component_class_sink_set_query_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.query = method; - BT_LIB_LOGV("Set sink component class's query method: " + BT_LIB_LOGD("Set sink component class's query method: " "%!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -381,7 +381,7 @@ bt_component_class_filter_set_accept_input_port_connection_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.accept_input_port_connection = method; - BT_LIB_LOGV("Set filter component class's \"accept input port connection\" method" + BT_LIB_LOGD("Set filter component class's \"accept input port connection\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -395,7 +395,7 @@ bt_component_class_sink_set_accept_input_port_connection_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.accept_input_port_connection = method; - BT_LIB_LOGV("Set sink component class's \"accept input port connection\" method" + BT_LIB_LOGD("Set sink component class's \"accept input port connection\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -409,7 +409,7 @@ bt_component_class_source_set_accept_output_port_connection_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.accept_output_port_connection = method; - BT_LIB_LOGV("Set source component class's \"accept output port connection\" method" + BT_LIB_LOGD("Set source component class's \"accept output port connection\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -423,7 +423,7 @@ bt_component_class_filter_set_accept_output_port_connection_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.accept_output_port_connection = method; - BT_LIB_LOGV("Set filter component class's \"accept output port connection\" method" + BT_LIB_LOGD("Set filter component class's \"accept output port connection\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -437,7 +437,7 @@ bt_component_class_filter_set_input_port_connected_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.input_port_connected = method; - BT_LIB_LOGV("Set filter component class's \"input port connected\" method" + BT_LIB_LOGD("Set filter component class's \"input port connected\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -451,7 +451,7 @@ bt_component_class_sink_set_input_port_connected_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.input_port_connected = method; - BT_LIB_LOGV("Set sink component class's \"input port connected\" method" + BT_LIB_LOGD("Set sink component class's \"input port connected\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -465,7 +465,7 @@ bt_component_class_source_set_output_port_connected_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.output_port_connected = method; - BT_LIB_LOGV("Set source component class's \"output port connected\" method" + BT_LIB_LOGD("Set source component class's \"output port connected\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -479,7 +479,7 @@ bt_component_class_filter_set_output_port_connected_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.output_port_connected = method; - BT_LIB_LOGV("Set filter component class's \"output port connected\" method" + BT_LIB_LOGD("Set filter component class's \"output port connected\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -493,7 +493,7 @@ bt_component_class_sink_set_graph_is_configured_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.graph_is_configured = method; - BT_LIB_LOGV("Set sink component class's \"graph is configured\" method" + BT_LIB_LOGD("Set sink component class's \"graph is configured\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -506,7 +506,7 @@ int bt_component_class_source_set_message_iterator_init_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_init = method; - BT_LIB_LOGV("Set source component class's message iterator initialization method" + BT_LIB_LOGD("Set source component class's message iterator initialization method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -520,7 +520,7 @@ bt_component_class_filter_set_message_iterator_init_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_init = method; - BT_LIB_LOGV("Set filter component class's message iterator initialization method" + BT_LIB_LOGD("Set filter component class's message iterator initialization method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -534,7 +534,7 @@ bt_component_class_source_set_message_iterator_finalize_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_finalize = method; - BT_LIB_LOGV("Set source component class's message iterator finalization method" + BT_LIB_LOGD("Set source component class's message iterator finalization method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -548,7 +548,7 @@ bt_component_class_filter_set_message_iterator_finalize_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_finalize = method; - BT_LIB_LOGV("Set filter component class's message iterator finalization method" + BT_LIB_LOGD("Set filter component class's message iterator finalization method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -562,7 +562,7 @@ bt_component_class_filter_set_message_iterator_seek_ns_from_origin_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_seek_ns_from_origin = method; - BT_LIB_LOGV("Set filter component class's message iterator \"seek nanoseconds from origin\" method" + BT_LIB_LOGD("Set filter component class's message iterator \"seek nanoseconds from origin\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -576,7 +576,7 @@ bt_component_class_source_set_message_iterator_seek_ns_from_origin_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_seek_ns_from_origin = method; - BT_LIB_LOGV("Set source component class's message iterator \"seek nanoseconds from origin\" method" + BT_LIB_LOGD("Set source component class's message iterator \"seek nanoseconds from origin\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -590,7 +590,7 @@ bt_component_class_filter_set_message_iterator_seek_beginning_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_seek_beginning = method; - BT_LIB_LOGV("Set filter component class's message iterator \"seek beginning\" method" + BT_LIB_LOGD("Set filter component class's message iterator \"seek beginning\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -604,7 +604,7 @@ bt_component_class_source_set_message_iterator_seek_beginning_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_seek_beginning = method; - BT_LIB_LOGV("Set source component class's message iterator \"seek beginning\" method" + BT_LIB_LOGD("Set source component class's message iterator \"seek beginning\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -618,7 +618,7 @@ bt_component_class_filter_set_message_iterator_can_seek_beginning_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_can_seek_beginning = method; - BT_LIB_LOGV("Set filter component class's message iterator \"can seek beginning\" method" + BT_LIB_LOGD("Set filter component class's message iterator \"can seek beginning\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -632,7 +632,7 @@ bt_component_class_source_set_message_iterator_can_seek_beginning_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_can_seek_beginning = method; - BT_LIB_LOGV("Set source component class's message iterator \"can seek beginning\" method" + BT_LIB_LOGD("Set source component class's message iterator \"can seek beginning\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -646,7 +646,7 @@ bt_component_class_filter_set_message_iterator_can_seek_ns_from_origin_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_can_seek_ns_from_origin = method; - BT_LIB_LOGV("Set filter component class's message iterator \"can seek nanoseconds from origin\" method" + BT_LIB_LOGD("Set filter component class's message iterator \"can seek nanoseconds from origin\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -660,7 +660,7 @@ bt_component_class_source_set_message_iterator_can_seek_ns_from_origin_method( BT_ASSERT_PRE_NON_NULL(method, "Method"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); comp_cls->methods.msg_iter_can_seek_ns_from_origin = method; - BT_LIB_LOGV("Set source component class's message iterator \"can seek nanoseconds from origin\" method" + BT_LIB_LOGD("Set source component class's message iterator \"can seek nanoseconds from origin\" method" ": %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -673,7 +673,7 @@ bt_component_class_status bt_component_class_set_description( BT_ASSERT_PRE_NON_NULL(description, "Description"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); g_string_assign(comp_cls->description, description); - BT_LIB_LOGV("Set component class's description: " + BT_LIB_LOGD("Set component class's description: " "addr=%p, name=\"%s\", type=%s", comp_cls, bt_component_class_get_name(comp_cls), @@ -689,7 +689,7 @@ bt_component_class_status bt_component_class_set_help( BT_ASSERT_PRE_NON_NULL(help, "Help"); BT_ASSERT_PRE_COMP_CLS_HOT(comp_cls); g_string_assign(comp_cls->help, help); - BT_LIB_LOGV("Set component class's help text: %!+C", comp_cls); + BT_LIB_LOGD("Set component class's help text: %!+C", comp_cls); return BT_COMPONENT_CLASS_STATUS_OK; } @@ -735,7 +735,7 @@ void bt_component_class_add_destroy_listener( listener.func = func; listener.data = data; g_array_append_val(comp_cls->destroy_listeners, listener); - BT_LIB_LOGV("Added destroy listener to component class: " + BT_LIB_LOGD("Added destroy listener to component class: " "%![cc-]+C, listener-func-addr=%p", comp_cls, func); } diff --git a/src/lib/graph/component.c b/src/lib/graph/component.c index 5b202d73..6018a278 100644 --- a/src/lib/graph/component.c +++ b/src/lib/graph/component.c @@ -100,7 +100,7 @@ void finalize_component(struct bt_component *comp) } if (method) { - BT_LIB_LOGD("Calling user's finalization method: " + BT_LIB_LOGI("Calling user's component finalization method: " "%![comp-]+c", comp); method(comp); } @@ -128,7 +128,7 @@ void destroy_component(struct bt_object *obj) */ obj->ref_count++; component = container_of(obj, struct bt_component, base); - BT_LIB_LOGD("Destroying component: %![comp-]+c, %![graph-]+g", + BT_LIB_LOGI("Destroying component: %![comp-]+c, %![graph-]+g", component, bt_component_borrow_graph(component)); /* Call destroy listeners in reverse registration order */ @@ -214,7 +214,7 @@ enum bt_self_component_status add_port( // TODO: Validate that the name is not already used. - BT_LIB_LOGD("Adding port to component: %![comp-]+c, " + BT_LIB_LOGI("Adding port to component: %![comp-]+c, " "port-type=%s, port-name=\"%s\"", component, bt_port_type_string(port_type), name); @@ -248,7 +248,7 @@ enum bt_self_component_status add_port( } } - BT_LIB_LOGD("Created and added port to component: " + BT_LIB_LOGI("Created and added port to component: " "%![comp-]+c, %![port-]+p", component, new_port); *port = new_port; @@ -292,7 +292,7 @@ int bt_component_create(struct bt_component_class *component_class, BT_ASSERT(component_class); BT_ASSERT(name); type = bt_component_class_get_type(component_class); - BT_LIB_LOGD("Creating empty component from component class: %![cc-]+C, " + BT_LIB_LOGI("Creating empty component from component class: %![cc-]+C, " "comp-name=\"%s\"", component_class, name); component = component_create_funcs[type](component_class); if (!component) { @@ -336,7 +336,7 @@ int bt_component_create(struct bt_component_class *component_class, goto end; } - BT_LIB_LOGD("Created empty component from component class: " + BT_LIB_LOGI("Created empty component from component class: " "%![cc-]+C, %![comp-]+c", component_class, component); BT_OBJECT_MOVE_REF(*user_component, component); @@ -373,7 +373,7 @@ void bt_self_component_set_data(struct bt_self_component *self_comp, BT_ASSERT_PRE_NON_NULL(component, "Component"); component->user_data = data; - BT_LIB_LOGV("Set component's user data: %!+c", component); + BT_LIB_LOGD("Set component's user data: %!+c", component); } BT_HIDDEN @@ -645,7 +645,7 @@ void bt_component_add_destroy_listener(struct bt_component *component, listener.func = func; listener.data = data; g_array_append_val(component->destroy_listeners, listener); - BT_LIB_LOGV("Added destroy listener: %![comp-]+c, " + BT_LIB_LOGD("Added destroy listener: %![comp-]+c, " "func-addr=%p, data-addr=%p", component, func, data); } @@ -667,7 +667,7 @@ void bt_component_remove_destroy_listener(struct bt_component *component, if (listener->func == func && listener->data == data) { g_array_remove_index(component->destroy_listeners, i); i--; - BT_LIB_LOGV("Removed destroy listener: %![comp-]+c, " + BT_LIB_LOGD("Removed destroy listener: %![comp-]+c, " "func-addr=%p, data-addr=%p", component, func, data); } diff --git a/src/lib/graph/connection.c b/src/lib/graph/connection.c index f76d7158..d290e604 100644 --- a/src/lib/graph/connection.c +++ b/src/lib/graph/connection.c @@ -44,7 +44,7 @@ void destroy_connection(struct bt_object *obj) struct bt_connection *connection = container_of(obj, struct bt_connection, base); - BT_LIB_LOGD("Destroying connection: %!+x", connection); + BT_LIB_LOGI("Destroying connection: %!+x", connection); /* * Make sure that each message iterator which was created for @@ -120,7 +120,7 @@ struct bt_connection *bt_connection_create(struct bt_graph *graph, { struct bt_connection *connection = NULL; - BT_LIB_LOGD("Creating connection: " + BT_LIB_LOGI("Creating connection: " "%![graph-]+g, %![up-port-]+p, %![down-port-]+p", graph, upstream_port, downstream_port); connection = g_new0(struct bt_connection, 1); @@ -149,7 +149,7 @@ struct bt_connection *bt_connection_create(struct bt_graph *graph, downstream_port); bt_port_set_connection(downstream_port, connection); bt_object_set_parent(&connection->base, &graph->base); - BT_LIB_LOGD("Created connection: %!+x", connection); + BT_LIB_LOGI("Created connection: %!+x", connection); end: return connection; @@ -162,7 +162,7 @@ void bt_connection_end(struct bt_connection *conn, bool try_remove_from_graph) struct bt_port *upstream_port = conn->upstream_port; size_t i; - BT_LIB_LOGD("Ending connection: %!+x, try-remove-from-graph=%d", + BT_LIB_LOGI("Ending connection: %!+x, try-remove-from-graph=%d", conn, try_remove_from_graph); /* @@ -247,7 +247,7 @@ void bt_connection_remove_iterator(struct bt_connection *conn, struct bt_self_component_port_input_message_iterator *iterator) { g_ptr_array_remove(conn->iterators, iterator); - BT_LIB_LOGV("Removed message iterator from connection: " + BT_LIB_LOGD("Removed message iterator from connection: " "%![conn-]+x, %![iter-]+i", conn, iterator); try_remove_connection_from_graph(conn); } diff --git a/src/lib/graph/graph.c b/src/lib/graph/graph.c index 72e57553..244ecf30 100644 --- a/src/lib/graph/graph.c +++ b/src/lib/graph/graph.c @@ -128,7 +128,7 @@ void destroy_graph(struct bt_object *obj) * step 4 goes from 1 to 2, and from 2 to 1 at step 6. This * ensures that this function is not called two times. */ - BT_LIB_LOGD("Destroying graph: %!+g", graph); + BT_LIB_LOGI("Destroying graph: %!+g", graph); obj->ref_count++; /* @@ -259,7 +259,7 @@ struct bt_graph *bt_graph_create(void) struct bt_graph *graph; int ret; - BT_LOGD_STR("Creating graph object."); + BT_LOGI_STR("Creating graph object."); graph = g_new0(struct bt_graph, 1); if (!graph) { BT_LOGE_STR("Failed to allocate one graph."); @@ -382,7 +382,7 @@ struct bt_graph *bt_graph_create(void) graph->messages = g_ptr_array_new_with_free_func( (GDestroyNotify) notify_message_graph_is_destroyed); - BT_LIB_LOGD("Created graph object: %!+g", graph); + BT_LIB_LOGI("Created graph object: %!+g", graph); end: return (void *) graph; @@ -426,7 +426,7 @@ enum bt_graph_status bt_graph_connect_ports( "Downstream port does not belong to a component: %!+p", downstream_port); init_can_consume = graph->can_consume; - BT_LIB_LOGD("Connecting component ports within graph: " + BT_LIB_LOGI("Connecting component ports within graph: " "%![graph-]+g, %![up-port-]+p, %![down-port-]+p", graph, upstream_port, downstream_port); bt_graph_set_can_consume(graph, false); @@ -541,7 +541,7 @@ enum bt_graph_status bt_graph_connect_ports( } connection->notified_graph_ports_connected = true; - BT_LIB_LOGD("Connected component ports within graph: " + BT_LIB_LOGI("Connected component ports within graph: " "%![graph-]+g, %![up-comp-]+c, %![down-comp-]+c, " "%![up-port-]+p, %![down-port-]+p", graph, upstream_component, downstream_component, @@ -589,7 +589,7 @@ enum bt_graph_status consume_graph_sink(struct bt_component_sink *comp) goto end; } - BT_LIB_LOGV("Consumed from sink: %![comp-]+c, status=%s", + BT_LIB_LOGD("Consumed from sink: %![comp-]+c, status=%s", comp, bt_self_component_status_string(comp_status)); end: @@ -624,7 +624,7 @@ enum bt_graph_status consume_sink_node(struct bt_graph *graph, GList *node) } end: - BT_LIB_LOGV("Consumed sink node: %![comp-]+c, status=%s", + BT_LIB_LOGD("Consumed sink node: %![comp-]+c, status=%s", sink, bt_graph_status_string(status)); return status; } @@ -637,18 +637,19 @@ enum bt_graph_status bt_graph_consume_sink_no_check(struct bt_graph *graph, GList *sink_node; int index; - BT_LIB_LOGV("Making specific sink consume: %![comp-]+c", sink); + BT_LIB_LOGD("Making specific sink consume: %![comp-]+c", sink); BT_ASSERT(bt_component_borrow_graph((void *) sink) == graph); if (g_queue_is_empty(graph->sinks_to_consume)) { - BT_LOGV_STR("Graph's sink queue is empty: end of graph."); + BT_LOGD_STR("Graph's sink queue is empty: end of graph."); status = BT_GRAPH_STATUS_END; goto end; } index = g_queue_index(graph->sinks_to_consume, sink); if (index < 0) { - BT_LOGV_STR("Sink is not marked as consumable: sink is ended."); + BT_LIB_LOGD("Sink component is not marked as consumable: " + "component sink is ended: %![comp-]+c", sink); status = BT_GRAPH_STATUS_END; goto end; } @@ -670,17 +671,17 @@ enum bt_graph_status consume_no_check(struct bt_graph *graph) BT_ASSERT_PRE(graph->has_sink, "Graph has no sink component: %!+g", graph); - BT_LIB_LOGV("Making next sink consume: %![graph-]+g", graph); + BT_LIB_LOGD("Making next sink component consume: %![graph-]+g", graph); if (G_UNLIKELY(g_queue_is_empty(graph->sinks_to_consume))) { - BT_LOGV_STR("Graph's sink queue is empty: end of graph."); + BT_LOGD_STR("Graph's sink queue is empty: end of graph."); status = BT_GRAPH_STATUS_END; goto end; } current_node = g_queue_pop_head_link(graph->sinks_to_consume); sink = current_node->data; - BT_LIB_LOGV("Chose next sink to consume: %!+c", sink); + BT_LIB_LOGD("Chose next sink to consume: %!+c", sink); status = consume_sink_node(graph, current_node); end: @@ -728,7 +729,7 @@ enum bt_graph_status bt_graph_run(struct bt_graph *graph) goto end; } - BT_LIB_LOGV("Running graph: %!+g", graph); + BT_LIB_LOGI("Running graph: %!+g", graph); do { /* @@ -738,7 +739,7 @@ enum bt_graph_status bt_graph_run(struct bt_graph *graph) * it was intentional: log with a DEBUG level only. */ if (G_UNLIKELY(graph->canceled)) { - BT_LIB_LOGD("Stopping the graph: graph is canceled: " + BT_LIB_LOGI("Stopping the graph: graph is canceled: " "%!+g", graph); status = BT_GRAPH_STATUS_CANCELED; goto end; @@ -768,7 +769,7 @@ enum bt_graph_status bt_graph_run(struct bt_graph *graph) } end: - BT_LIB_LOGV("Graph ran: %![graph-]+g, status=%s", graph, + BT_LIB_LOGI("Graph ran: %![graph-]+g, status=%s", graph, bt_graph_status_string(status)); bt_graph_set_can_consume(graph, true); return status; @@ -798,7 +799,7 @@ bt_graph_add_source_component_output_port_added_listener( "%!+g", graph); g_array_append_val(graph->listeners.source_output_port_added, listener); listener_id = graph->listeners.source_output_port_added->len - 1; - BT_LIB_LOGV("Added \"source component output port added\" listener to graph: " + BT_LIB_LOGD("Added \"source component output port added\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -833,7 +834,7 @@ bt_graph_add_filter_component_output_port_added_listener( "%!+g", graph); g_array_append_val(graph->listeners.filter_output_port_added, listener); listener_id = graph->listeners.filter_output_port_added->len - 1; - BT_LIB_LOGV("Added \"filter component output port added\" listener to graph: " + BT_LIB_LOGD("Added \"filter component output port added\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -868,7 +869,7 @@ bt_graph_add_filter_component_input_port_added_listener( "%!+g", graph); g_array_append_val(graph->listeners.filter_input_port_added, listener); listener_id = graph->listeners.filter_input_port_added->len - 1; - BT_LIB_LOGV("Added \"filter component input port added\" listener to graph: " + BT_LIB_LOGD("Added \"filter component input port added\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -903,7 +904,7 @@ bt_graph_add_sink_component_input_port_added_listener( "%!+g", graph); g_array_append_val(graph->listeners.sink_input_port_added, listener); listener_id = graph->listeners.sink_input_port_added->len - 1; - BT_LIB_LOGV("Added \"sink component input port added\" listener to graph: " + BT_LIB_LOGD("Added \"sink component input port added\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -939,7 +940,7 @@ bt_graph_add_source_filter_component_ports_connected_listener( g_array_append_val(graph->listeners.source_filter_ports_connected, listener); listener_id = graph->listeners.source_filter_ports_connected->len - 1; - BT_LIB_LOGV("Added \"source to filter component ports connected\" listener to graph: " + BT_LIB_LOGD("Added \"source to filter component ports connected\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -975,7 +976,7 @@ bt_graph_add_source_sink_component_ports_connected_listener( g_array_append_val(graph->listeners.source_sink_ports_connected, listener); listener_id = graph->listeners.source_sink_ports_connected->len - 1; - BT_LIB_LOGV("Added \"source to sink component ports connected\" listener to graph: " + BT_LIB_LOGD("Added \"source to sink component ports connected\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -1011,7 +1012,7 @@ bt_graph_add_filter_filter_component_ports_connected_listener( g_array_append_val(graph->listeners.filter_filter_ports_connected, listener); listener_id = graph->listeners.filter_filter_ports_connected->len - 1; - BT_LIB_LOGV("Added \"filter to filter component ports connected\" listener to graph: " + BT_LIB_LOGD("Added \"filter to filter component ports connected\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -1047,7 +1048,7 @@ bt_graph_add_filter_sink_component_ports_connected_listener( g_array_append_val(graph->listeners.filter_sink_ports_connected, listener); listener_id = graph->listeners.filter_sink_ports_connected->len - 1; - BT_LIB_LOGV("Added \"filter to sink component ports connected\" listener to graph: " + BT_LIB_LOGD("Added \"filter to sink component ports connected\" listener to graph: " "%![graph-]+g, listener-addr=%p, id=%d", graph, listener, listener_id); @@ -1069,7 +1070,7 @@ enum bt_graph_listener_status bt_graph_notify_port_added( BT_ASSERT(graph); BT_ASSERT(port); - BT_LIB_LOGV("Notifying graph listeners that a port was added: " + BT_LIB_LOGD("Notifying graph listeners that a port was added: " "%![graph-]+g, %![port-]+p", graph, port); comp = bt_port_borrow_component_inline(port); BT_ASSERT(comp); @@ -1149,7 +1150,7 @@ enum bt_graph_listener_status bt_graph_notify_ports_connected( BT_ASSERT(graph); BT_ASSERT(upstream_port); BT_ASSERT(downstream_port); - BT_LIB_LOGV("Notifying graph listeners that ports were connected: " + BT_LIB_LOGD("Notifying graph listeners that ports were connected: " "%![graph-]+g, %![up-port-]+p, %![down-port-]+p", graph, upstream_port, downstream_port); upstream_comp = bt_port_borrow_component_inline(upstream_port); @@ -1218,7 +1219,7 @@ enum bt_graph_status bt_graph_cancel(struct bt_graph *graph) BT_ASSERT_PRE_NON_NULL(graph, "Graph"); graph->canceled = true; - BT_LIB_LOGV("Canceled graph: %!+i", graph); + BT_LIB_LOGI("Canceled graph: %!+i", graph); return BT_GRAPH_STATUS_OK; } @@ -1234,7 +1235,7 @@ void bt_graph_remove_connection(struct bt_graph *graph, { BT_ASSERT(graph); BT_ASSERT(connection); - BT_LIB_LOGV("Removing graph's connection: %![graph-]+g, %![conn-]+x", + BT_LIB_LOGD("Removing graph's connection: %![graph-]+g, %![conn-]+x", graph, connection); g_ptr_array_remove(graph->connections, connection); } @@ -1290,7 +1291,7 @@ enum bt_graph_status add_component_with_init_method_data( "Parameter value is not a map value: %!+v", params); init_can_consume = graph->can_consume; bt_graph_set_can_consume(graph, false); - BT_LIB_LOGD("Adding component to graph: " + BT_LIB_LOGI("Adding component to graph: " "%![graph-]+g, %![cc-]+C, name=\"%s\", %![params-]+v, " "init-method-data-addr=%p", graph, comp_cls, name, params, init_method_data); @@ -1298,7 +1299,7 @@ enum bt_graph_status add_component_with_init_method_data( if (!params) { new_params = bt_value_map_create(); if (!new_params) { - BT_LOGE_STR("Cannot create map value object."); + BT_LOGE_STR("Cannot create empty map value object."); graph_status = BT_GRAPH_STATUS_NOMEM; goto end; } @@ -1358,7 +1359,7 @@ enum bt_graph_status add_component_with_init_method_data( */ BT_LOGD_STR("Freezing component class."); bt_component_class_freeze(comp_cls); - BT_LIB_LOGD("Added component to graph: " + BT_LIB_LOGI("Added component to graph: " "%![graph-]+g, %![cc-]+C, name=\"%s\", %![params-]+v, " "init-method-data-addr=%p, %![comp-]+c", graph, comp_cls, name, params, init_method_data, component); diff --git a/src/lib/graph/graph.h b/src/lib/graph/graph.h index 71328fae..e108d508 100644 --- a/src/lib/graph/graph.h +++ b/src/lib/graph/graph.h @@ -292,8 +292,8 @@ static inline void bt_graph_make_faulty(struct bt_graph *graph) { graph->config_state = BT_GRAPH_CONFIGURATION_STATE_FAULTY; -#ifdef BT_LIB_LOGD - BT_LIB_LOGD("Set graph's state to faulty: %![graph-]+g", graph); +#ifdef BT_LIB_LOGI + BT_LIB_LOGI("Set graph's state to faulty: %![graph-]+g", graph); #endif } diff --git a/src/lib/graph/iterator.c b/src/lib/graph/iterator.c index 4b876998..42bc819a 100644 --- a/src/lib/graph/iterator.c +++ b/src/lib/graph/iterator.c @@ -130,7 +130,7 @@ void bt_self_component_port_input_message_iterator_destroy(struct bt_object *obj */ obj->ref_count++; iterator = (void *) obj; - BT_LIB_LOGD("Destroying self component input port message iterator object: " + BT_LIB_LOGI("Destroying self component input port message iterator object: " "%!+i", iterator); bt_self_component_port_input_message_iterator_try_finalize(iterator); @@ -240,7 +240,7 @@ void bt_self_component_port_input_message_iterator_set_connection( { BT_ASSERT(iterator); iterator->connection = connection; - BT_LIB_LOGV("Set message iterator's connection: " + BT_LIB_LOGI("Set message iterator's connection: " "%![iter-]+i, %![conn-]+x", iterator, connection); } @@ -293,7 +293,7 @@ bt_self_component_port_input_message_iterator_create_initial( BT_ASSERT(upstream_comp); BT_ASSERT(upstream_port); BT_ASSERT(bt_port_is_connected(upstream_port)); - BT_LIB_LOGD("Creating initial message iterator on self component input port: " + BT_LIB_LOGI("Creating initial message iterator on self component input port: " "%![up-comp-]+c, %![up-port-]+p", upstream_comp, upstream_port); BT_ASSERT(bt_component_get_class_type(upstream_comp) == BT_COMPONENT_CLASS_TYPE_SOURCE || @@ -393,7 +393,7 @@ bt_self_component_port_input_message_iterator_create_initial( can_seek_beginning_true; } - BT_LIB_LOGD("Created initial message iterator on self component input port: " + BT_LIB_LOGI("Created initial message iterator on self component input port: " "%![up-port-]+p, %![up-comp-]+c, %![iter-]+i", upstream_port, upstream_comp, iterator); @@ -491,7 +491,7 @@ bt_self_component_port_input_message_iterator_create( set_self_comp_port_input_msg_iterator_state(iterator, BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE); g_ptr_array_add(port->connection->iterators, iterator); - BT_LIB_LOGD("Created message iterator on self component input port: " + BT_LIB_LOGI("Created message iterator on self component input port: " "%![up-port-]+p, %![up-comp-]+c, %![iter-]+i", upstream_port, upstream_comp, iterator); @@ -517,7 +517,7 @@ void bt_self_message_iterator_set_data( BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator"); iterator->user_data = data; - BT_LIB_LOGV("Set message iterator's user data: " + BT_LIB_LOGD("Set message iterator's user data: " "%!+i, user-data-addr=%p", iterator, data); } @@ -543,7 +543,8 @@ bt_self_component_port_input_message_iterator_next( "Graph is not configured: %!+g", bt_component_borrow_graph(iterator->upstream_component)); BT_LIB_LOGD("Getting next self component input port " - "message iterator's messages: %!+i", iterator); + "message iterator's messages: %!+i, batch-size=%u", + iterator, MSG_BATCH_SIZE); /* * Call the user's "next" method to get the next messages @@ -551,11 +552,12 @@ bt_self_component_port_input_message_iterator_next( */ BT_ASSERT(iterator->methods.next); BT_LOGD_STR("Calling user's \"next\" method."); + *user_count = 0; status = iterator->methods.next(iterator, (void *) iterator->base.msgs->pdata, MSG_BATCH_SIZE, user_count); - BT_LOGD("User method returned: status=%s", - bt_message_iterator_status_string(status)); + BT_LOGD("User method returned: status=%s, msg-count=%" PRIu64, + bt_message_iterator_status_string(status), *user_count); if (status < 0) { BT_LOGW_STR("User method failed."); goto end; @@ -678,7 +680,7 @@ void bt_port_output_message_iterator_destroy(struct bt_object *obj) { struct bt_port_output_message_iterator *iterator = (void *) obj; - BT_LIB_LOGD("Destroying output port message iterator object: %!+i", + BT_LIB_LOGI("Destroying output port message iterator object: %!+i", iterator); BT_LOGD_STR("Putting graph."); BT_OBJECT_PUT_REF_AND_RESET(iterator->graph); @@ -714,7 +716,7 @@ bt_port_output_message_iterator_create(struct bt_graph *graph, "Graph already has a sink component: %![graph-]+g"); /* Create message iterator */ - BT_LIB_LOGD("Creating message iterator on output port: " + BT_LIB_LOGI("Creating message iterator on output port: " "%![port-]+p, %![comp-]+c", output_port, output_port_comp); iterator = g_new0(struct bt_port_output_message_iterator, 1); if (!iterator) { diff --git a/src/lib/graph/message/message-iterator-inactivity.c b/src/lib/graph/message/message-iterator-inactivity.c index cfec17ed..5e376381 100644 --- a/src/lib/graph/message/message-iterator-inactivity.c +++ b/src/lib/graph/message/message-iterator-inactivity.c @@ -41,7 +41,7 @@ void bt_message_message_iterator_inactivity_destroy(struct bt_object *obj) (struct bt_message_message_iterator_inactivity *) obj; BT_LIB_LOGD("Destroying message iterator inactivity message: %!+n", - message); + message); if (message->default_cs) { bt_clock_snapshot_recycle(message->default_cs); @@ -69,7 +69,7 @@ struct bt_message *bt_message_message_iterator_inactivity_create( message = g_new0(struct bt_message_message_iterator_inactivity, 1); if (!message) { BT_LOGE_STR("Failed to allocate one message iterator " - "inactivity message."); + "inactivity message."); goto error; } bt_message_init(&message->parent, @@ -84,7 +84,7 @@ struct bt_message *bt_message_message_iterator_inactivity_create( bt_clock_snapshot_set_raw_value(message->default_cs, value_cycles); BT_LIB_LOGD("Created message iterator inactivity message object: %!+n", - ret_msg); + ret_msg); goto end; error: diff --git a/src/lib/graph/message/stream-activity.c b/src/lib/graph/message/stream-activity.c index dc840bea..0058ccfb 100644 --- a/src/lib/graph/message/stream-activity.c +++ b/src/lib/graph/message/stream-activity.c @@ -176,7 +176,7 @@ void set_stream_activity_message_default_clock_snapshot( value_cycles); stream_act_msg->default_cs_state = BT_MESSAGE_STREAM_ACTIVITY_CLOCK_SNAPSHOT_STATE_KNOWN; - BT_LIB_LOGV("Set stream activity message's default clock snapshot: " + BT_LIB_LOGD("Set stream activity message's default clock snapshot: " "%![msg-]+n, value=%" PRIu64, msg, value_cycles); } @@ -246,7 +246,7 @@ void set_stream_activity_message_default_clock_snapshot_state( msg, bt_message_stream_activity_clock_snapshot_state_string(state)); stream_act_msg->default_cs_state = state; - BT_LIB_LOGV("Set stream activity message's default clock snapshot state: " + BT_LIB_LOGD("Set stream activity message's default clock snapshot state: " "%![msg-]+n, state=%s", msg, bt_message_stream_activity_clock_snapshot_state_string(state)); } diff --git a/src/lib/graph/port.c b/src/lib/graph/port.c index ff4e4430..f5a0d732 100644 --- a/src/lib/graph/port.c +++ b/src/lib/graph/port.c @@ -44,7 +44,7 @@ void destroy_port(struct bt_object *obj) { struct bt_port *port = (void *) obj; - BT_LIB_LOGD("Destroying port: %!+p", port); + BT_LIB_LOGI("Destroying port: %!+p", port); if (port->name) { g_string_free(port->name, TRUE); @@ -70,7 +70,7 @@ struct bt_port *bt_port_create(struct bt_component *parent_component, goto end; } - BT_LIB_LOGD("Creating port for component: %![comp-]+c, port-type=%s, " + BT_LIB_LOGI("Creating port for component: %![comp-]+c, port-type=%s, " "port-name=\"%s\"", parent_component, bt_port_type_string(type), name); bt_object_init_shared_with_parent(&port->base, destroy_port); @@ -84,7 +84,7 @@ struct bt_port *bt_port_create(struct bt_component *parent_component, port->type = type; port->user_data = user_data; bt_object_set_parent(&port->base, &parent_component->base); - BT_LIB_LOGD("Created port for component: " + BT_LIB_LOGI("Created port for component: " "%![comp-]+c, %![port-]+p", parent_component, port); end: @@ -134,7 +134,7 @@ void bt_port_set_connection(struct bt_port *port, * connection exists. */ port->connection = connection; - BT_LIB_LOGV("Set port's connection: %![port-]+p, %![conn-]+x", port, + BT_LIB_LOGI("Set port's connection: %![port-]+p, %![conn-]+x", port, connection); } diff --git a/src/lib/graph/query-executor.c b/src/lib/graph/query-executor.c index b26455d4..0a9798f2 100644 --- a/src/lib/graph/query-executor.c +++ b/src/lib/graph/query-executor.c @@ -148,7 +148,7 @@ enum bt_query_executor_status bt_query_executor_cancel( { BT_ASSERT_PRE_NON_NULL(query_exec, "Query executor"); query_exec->canceled = BT_TRUE; - BT_LOGV("Canceled query executor: addr=%p", query_exec); + BT_LOGI("Canceled query executor: addr=%p", query_exec); return BT_QUERY_EXECUTOR_STATUS_OK; } diff --git a/src/lib/object-pool.h b/src/lib/object-pool.h index eb7833fd..edfcf82c 100644 --- a/src/lib/object-pool.h +++ b/src/lib/object-pool.h @@ -122,8 +122,8 @@ void *bt_object_pool_create_object(struct bt_object_pool *pool) } /* Pool is empty: create a brand new object */ -#ifdef BT_LOGV - BT_LOGV("Pool is empty: allocating new object: pool-addr=%p", +#ifdef BT_LOGD + BT_LOGD("Pool is empty: allocating new object: pool-addr=%p", pool); #endif @@ -158,8 +158,8 @@ void bt_object_pool_recycle_object(struct bt_object_pool *pool, void *obj) if (pool->size == pool->objects->len) { /* Backing array is full: make place for recycled object */ -#ifdef BT_LOGV - BT_LOGV("Object pool is full: increasing object pool capacity: " +#ifdef BT_LOGD + BT_LOGD("Object pool is full: increasing object pool capacity: " "pool-addr=%p, old-pool-cap=%u, new-pool-cap=%u", pool, pool->objects->len, pool->objects->len + 1); #endif diff --git a/src/lib/plugin/plugin-so.c b/src/lib/plugin/plugin-so.c index 3b2be152..b7acd815 100644 --- a/src/lib/plugin/plugin-so.c +++ b/src/lib/plugin/plugin-so.c @@ -128,7 +128,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) const char *path = shared_lib_handle->path ? shared_lib_handle->path->str : NULL; - BT_LOGD("Destroying shared library handle: addr=%p, path=\"%s\"", + BT_LOGI("Destroying shared library handle: addr=%p, path=\"%s\"", shared_lib_handle, path); if (shared_lib_handle->init_called && shared_lib_handle->exit) { @@ -149,7 +149,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) if (!var || strcmp(var, "1") != 0) { #endif - BT_LOGD("Closing GModule: path=\"%s\"", path); + BT_LOGI("Closing GModule: path=\"%s\"", path); if (!g_module_close(shared_lib_handle->module)) { BT_LOGE("Cannot close GModule: %s: path=\"%s\"", @@ -159,7 +159,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) shared_lib_handle->module = NULL; #ifndef NDEBUG } else { - BT_LOGD("Not closing GModule because `BABELTRACE_NO_DLCLOSE=1`: " + BT_LOGI("Not closing GModule because `BABELTRACE_NO_DLCLOSE=1`: " "path=\"%s\"", path); } #endif @@ -179,7 +179,7 @@ struct bt_plugin_so_shared_lib_handle *bt_plugin_so_shared_lib_handle_create( { struct bt_plugin_so_shared_lib_handle *shared_lib_handle = NULL; - BT_LOGD("Creating shared library handle: path=\"%s\"", path); + BT_LOGI("Creating shared library handle: path=\"%s\"", path); shared_lib_handle = g_new0(struct bt_plugin_so_shared_lib_handle, 1); if (!shared_lib_handle) { BT_LOGE_STR("Failed to allocate one shared library handle."); @@ -202,13 +202,13 @@ struct bt_plugin_so_shared_lib_handle *bt_plugin_so_shared_lib_handle_create( shared_lib_handle->module = g_module_open(path, G_MODULE_BIND_LOCAL); if (!shared_lib_handle->module) { /* - * DEBUG-level logging because we're only _trying_ to + * INFO-level logging because we're only _trying_ to * open this file as a Babeltrace plugin: if it's not, * it's not an error. And because this can be tried - * during bt_plugin_find_all_from_dir(), it's not even - * a warning. + * during bt_plugin_find_all_from_dir(), it's not even a + * warning. */ - BT_LOGD("Cannot open GModule: %s: path=\"%s\"", + BT_LOGI("Cannot open GModule: %s: path=\"%s\"", g_module_error(), path); goto error; } @@ -220,7 +220,7 @@ error: end: if (shared_lib_handle) { - BT_LOGD("Created shared library handle: path=\"%s\", addr=%p", + BT_LOGI("Created shared library handle: path=\"%s\", addr=%p", path, shared_lib_handle); } @@ -341,7 +341,7 @@ enum bt_plugin_status bt_plugin_so_init( size_t i; int ret; - BT_LOGD("Initializing plugin object from descriptors found in sections: " + BT_LOGI("Initializing plugin object from descriptors found in sections: " "plugin-addr=%p, plugin-path=\"%s\", " "attrs-begin-addr=%p, attrs-end-addr=%p, " "cc-descr-begin-addr=%p, cc-descr-end-addr=%p, " @@ -749,7 +749,7 @@ enum bt_plugin_status bt_plugin_so_init( struct bt_component_class_filter *flt_comp_class = NULL; struct bt_component_class_sink *sink_comp_class = NULL; - BT_LOGD("Creating and setting properties of plugin's component class: " + BT_LOGI("Creating and setting properties of plugin's component class: " "plugin-path=\"%s\", plugin-name=\"%s\", " "comp-class-name=\"%s\", comp-class-type=%s", spec->shared_lib_handle->path ? @@ -1295,7 +1295,7 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_sections( cc_descriptors_count = count_non_null_items_in_section(cc_descriptors_begin, cc_descriptors_end); cc_descr_attrs_count = count_non_null_items_in_section(cc_descr_attrs_begin, cc_descr_attrs_end); - BT_LOGD("Creating all SO plugins from sections: " + BT_LOGI("Creating all SO plugins from sections: " "plugin-path=\"%s\", " "descr-begin-addr=%p, descr-end-addr=%p, " "attrs-begin-addr=%p, attrs-end-addr=%p, " @@ -1326,20 +1326,20 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_sections( continue; } - BT_LOGD("Creating plugin object for plugin: " + BT_LOGI("Creating plugin object for plugin: " "name=\"%s\", abi-major=%d, abi-minor=%d", descriptor->name, descriptor->major, descriptor->minor); if (descriptor->major > __BT_PLUGIN_VERSION_MAJOR) { /* - * DEBUG-level logging because we're only + * INFO-level logging because we're only * _trying_ to open this file as a compatible * Babeltrace plugin: if it's not, it's not an * error. And because this can be tried during - * bt_plugin_find_all_from_dir(), it's not - * even a warning. + * bt_plugin_find_all_from_dir(), it's not even + * a warning. */ - BT_LOGD("Unknown ABI major version: abi-major=%d", + BT_LOGI("Unknown ABI major version: abi-major=%d", descriptor->major); goto error; } @@ -1437,23 +1437,17 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) bt_bool is_libtool_wrapper = BT_FALSE, is_shared_object = BT_FALSE; struct bt_plugin_so_shared_lib_handle *shared_lib_handle = NULL; - if (!path) { - BT_LOGW_STR("Invalid parameter: path is NULL."); - goto end; - } - - BT_LOGD("Creating all SO plugins from file: path=\"%s\"", path); + BT_ASSERT(path); path_len = strlen(path); - if (path_len <= PLUGIN_SUFFIX_LEN) { - BT_LOGW("Invalid parameter: path length is too short: " - "path-length=%zu", path_len); - goto end; - } - + BT_ASSERT_PRE(path_len > PLUGIN_SUFFIX_LEN, + "Path length is too short: path-length=%zu, min-length=%zu", + path_len, PLUGIN_SUFFIX_LEN); + BT_LOGI("Trying to create all SO plugins from file: path=\"%s\"", path); path_len++; + /* - * Check if the file ends with a known plugin file type suffix (i.e. .so - * or .la on Linux). + * Check if the file ends with a known plugin file type suffix + * (i.e. .so or .la on Linux). */ is_libtool_wrapper = !strncmp(LIBTOOL_PLUGIN_SUFFIX, path + path_len - LIBTOOL_PLUGIN_SUFFIX_LEN, @@ -1463,12 +1457,13 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) NATIVE_PLUGIN_SUFFIX_LEN); if (!is_shared_object && !is_libtool_wrapper) { /* Name indicates this is not a plugin file; not an error */ - BT_LOGV("File is not a SO plugin file: path=\"%s\"", path); + BT_LOGI("File is not a SO plugin file: path=\"%s\"", path); goto end; } shared_lib_handle = bt_plugin_so_shared_lib_handle_create(path); if (!shared_lib_handle) { + /* bt_plugin_so_shared_lib_handle_create() logs more details */ BT_LOGD_STR("Cannot create shared library handle."); goto end; } @@ -1477,7 +1472,7 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_begin_section_plugin_descriptors)) { descriptors_begin = get_begin_section_plugin_descriptors(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_begin_section_plugin_descriptors"); goto end; @@ -1487,7 +1482,7 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_end_section_plugin_descriptors)) { descriptors_end = get_end_section_plugin_descriptors(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_end_section_plugin_descriptors"); goto end; @@ -1497,7 +1492,7 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_begin_section_plugin_descriptor_attributes)) { attrs_begin = get_begin_section_plugin_descriptor_attributes(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_begin_section_plugin_descriptor_attributes"); } @@ -1506,13 +1501,13 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_end_section_plugin_descriptor_attributes)) { attrs_end = get_end_section_plugin_descriptor_attributes(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_end_section_plugin_descriptor_attributes"); } if ((!!attrs_begin - !!attrs_end) != 0) { - BT_LOGD("Found section start or end symbol, but not both: " + BT_LOGI("Found section start or end symbol, but not both: " "path=\"%s\", symbol-start=\"%s\", " "symbol-end=\"%s\", symbol-start-addr=%p, " "symbol-end-addr=%p", @@ -1526,7 +1521,7 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_begin_section_component_class_descriptors)) { cc_descriptors_begin = get_begin_section_component_class_descriptors(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_begin_section_component_class_descriptors"); } @@ -1535,13 +1530,13 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_end_section_component_class_descriptors)) { cc_descriptors_end = get_end_section_component_class_descriptors(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_end_section_component_class_descriptors"); } if ((!!cc_descriptors_begin - !!cc_descriptors_end) != 0) { - BT_LOGD("Found section start or end symbol, but not both: " + BT_LOGI("Found section start or end symbol, but not both: " "path=\"%s\", symbol-start=\"%s\", " "symbol-end=\"%s\", symbol-start-addr=%p, " "symbol-end-addr=%p", @@ -1555,7 +1550,7 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_begin_section_component_class_descriptor_attributes)) { cc_descr_attrs_begin = get_begin_section_component_class_descriptor_attributes(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_begin_section_component_class_descriptor_attributes"); } @@ -1564,13 +1559,13 @@ struct bt_plugin_set *bt_plugin_so_create_all_from_file(const char *path) (gpointer *) &get_end_section_component_class_descriptor_attributes)) { cc_descr_attrs_end = get_end_section_component_class_descriptor_attributes(); } else { - BT_LOGD("Cannot resolve plugin symbol: path=\"%s\", " + BT_LOGI("Cannot resolve plugin symbol: path=\"%s\", " "symbol=\"%s\"", path, "__bt_get_end_section_component_class_descriptor_attributes"); } if ((!!cc_descr_attrs_begin - !!cc_descr_attrs_end) != 0) { - BT_LOGD("Found section start or end symbol, but not both: " + BT_LOGI("Found section start or end symbol, but not both: " "path=\"%s\", symbol-start=\"%s\", " "symbol-end=\"%s\", symbol-start-addr=%p, " "symbol-end-addr=%p", @@ -1598,7 +1593,7 @@ void plugin_comp_class_destroy_listener(struct bt_component_class *comp_class, { bt_list_del(&comp_class->node); BT_OBJECT_PUT_REF_AND_RESET(comp_class->so_handle); - BT_LOGV("Component class destroyed: removed entry from list: " + BT_LOGD("Component class destroyed: removed entry from list: " "comp-cls-addr=%p", comp_class); } diff --git a/src/lib/plugin/plugin.c b/src/lib/plugin/plugin.c index 31641df3..5bf1a151 100644 --- a/src/lib/plugin/plugin.c +++ b/src/lib/plugin/plugin.c @@ -73,7 +73,7 @@ void init_python_plugin_provider(void) { return; } - BT_LOGD_STR("Loading Python plugin provider module."); + BT_LOGI_STR("Loading Python plugin provider module."); python_plugin_provider_module = g_module_open(PYTHON_PLUGIN_PROVIDER_FILENAME, 0); if (!python_plugin_provider_module) { @@ -99,7 +99,7 @@ void init_python_plugin_provider(void) { __attribute__((destructor)) static void fini_python_plugin_provider(void) { if (python_plugin_provider_module) { - BT_LOGD("Unloading Python plugin provider module."); + BT_LOGI("Unloading Python plugin provider module."); if (!g_module_close(python_plugin_provider_module)) { BT_LOGE("Failed to close the Python plugin provider module: %s.", @@ -136,7 +136,7 @@ const struct bt_plugin_set *bt_plugin_find_all_from_file(const char *path) struct bt_plugin_set *plugin_set = NULL; BT_ASSERT_PRE_NON_NULL(path, "Path"); - BT_LOGD("Creating plugins from file: path=\"%s\"", path); + BT_LOGI("Creating plugins from file: path=\"%s\"", path); /* Try shared object plugins */ plugin_set = bt_plugin_so_create_all_from_file(path); @@ -155,12 +155,12 @@ const struct bt_plugin_set *bt_plugin_find_all_from_file(const char *path) end: if (plugin_set) { - BT_LOGD("Created %u plugins from file: " + BT_LOGI("Created %u plugins from file: " "path=\"%s\", count=%u, plugin-set-addr=%p", plugin_set->plugins->len, path, plugin_set->plugins->len, plugin_set); } else { - BT_LOGD("Found no plugins in file: path=\"%s\"", path); + BT_LOGI("Found no plugins in file: path=\"%s\"", path); } return plugin_set; @@ -183,7 +183,7 @@ const struct bt_plugin *bt_plugin_find(const char *plugin_name) size_t i, j; BT_ASSERT_PRE_NON_NULL(plugin_name, "Name"); - BT_LOGD("Finding named plugin in standard directories and built-in plugins: " + BT_LOGI("Finding named plugin in standard directories and built-in plugins: " "name=\"%s\"", plugin_name); dirs = g_ptr_array_new_with_free_func((GDestroyNotify) destroy_gstring); if (!dirs) { @@ -250,7 +250,7 @@ const struct bt_plugin *bt_plugin_find(const char *plugin_name) * bt_plugin_find_all_from_dir() would log a warning. */ if (!g_file_test(dir->str, G_FILE_TEST_IS_DIR)) { - BT_LOGV("Skipping nonexistent directory path: " + BT_LOGI("Skipping nonexistent directory path: " "path=\"%s\"", dir->str); continue; } @@ -258,7 +258,7 @@ const struct bt_plugin *bt_plugin_find(const char *plugin_name) /* bt_plugin_find_all_from_dir() logs details/errors */ plugin_set = bt_plugin_find_all_from_dir(dir->str, BT_FALSE); if (!plugin_set) { - BT_LOGD("No plugins found in directory: path=\"%s\"", + BT_LOGI("No plugins found in directory: path=\"%s\"", dir->str); continue; } @@ -269,7 +269,7 @@ const struct bt_plugin *bt_plugin_find(const char *plugin_name) if (strcmp(bt_plugin_get_name(candidate_plugin), plugin_name) == 0) { - BT_LOGD("Plugin found in directory: name=\"%s\", path=\"%s\"", + BT_LOGI("Plugin found in directory: name=\"%s\", path=\"%s\"", plugin_name, dir->str); plugin = candidate_plugin; bt_object_get_no_null_check(plugin); @@ -277,7 +277,7 @@ const struct bt_plugin *bt_plugin_find(const char *plugin_name) } } - BT_LOGD("Plugin not found in directory: name=\"%s\", path=\"%s\"", + BT_LOGI("Plugin not found in directory: name=\"%s\", path=\"%s\"", plugin_name, dir->str); } @@ -290,7 +290,7 @@ const struct bt_plugin *bt_plugin_find(const char *plugin_name) if (strcmp(bt_plugin_get_name(candidate_plugin), plugin_name) == 0) { - BT_LOGD("Plugin found in built-in plugins: " + BT_LOGI("Plugin found in built-in plugins: " "name=\"%s\"", plugin_name); plugin = candidate_plugin; bt_object_get_no_null_check(plugin); @@ -308,10 +308,10 @@ end: } if (plugin) { - BT_LIB_LOGD("Found plugin in standard directories and built-in plugins: " + BT_LIB_LOGI("Found plugin in standard directories and built-in plugins: " "%!+l", plugin); } else { - BT_LOGD("No plugin found in standard directories and built-in plugins: " + BT_LOGI("No plugin found in standard directories and built-in plugins: " "name=\"%s\"", plugin_name); } @@ -345,7 +345,7 @@ int nftw_append_all_from_dir(const char *file, const struct stat *sb, int flag, if (name[0] == '.') { /* Skip hidden files */ - BT_LOGV("Skipping hidden file: path=\"%s\"", file); + BT_LOGI("Skipping hidden file: path=\"%s\"", file); goto end; } @@ -358,7 +358,7 @@ int nftw_append_all_from_dir(const char *file, const struct stat *sb, int flag, struct bt_plugin *plugin = g_ptr_array_index(plugins_from_file->plugins, j); - BT_LIB_LOGD("Adding plugin to plugin set: " + BT_LIB_LOGI("Adding plugin to plugin set: " "plugin-path=\"%s\", %![plugin-]+l", file, plugin); bt_plugin_set_add_plugin( @@ -376,7 +376,7 @@ int nftw_append_all_from_dir(const char *file, const struct stat *sb, int flag, break; case FTW_NS: /* Continue to next file / directory. */ - BT_LOGD("Cannot get file information: continuing: path=\"%s\"", file); + BT_LOGI("Cannot get file information: continuing: path=\"%s\"", file); break; } @@ -415,7 +415,7 @@ const struct bt_plugin_set *bt_plugin_find_all_from_dir(const char *path, struct bt_plugin_set *plugin_set; enum bt_plugin_status status; - BT_LOGD("Creating all plugins in directory: path=\"%s\", recurse=%d", + BT_LOGI("Creating all plugins in directory: path=\"%s\", recurse=%d", path, recurse); plugin_set = bt_plugin_set_create(); if (!plugin_set) { @@ -433,7 +433,7 @@ const struct bt_plugin_set *bt_plugin_find_all_from_dir(const char *path, goto error; } - BT_LOGD("Created %u plugins from directory: count=%u, path=\"%s\"", + BT_LOGI("Created %u plugins from directory: count=%u, path=\"%s\"", plugin_set->plugins->len, plugin_set->plugins->len, path); goto end; @@ -485,7 +485,7 @@ enum bt_property_availability bt_plugin_get_version(const struct bt_plugin *plug BT_ASSERT_PRE_NON_NULL(plugin, "Plugin"); if (!plugin->info.version_set) { - BT_LIB_LOGV("Plugin's version is not set: %!+l", plugin); + BT_LIB_LOGD("Plugin's version is not set: %!+l", plugin); avail = BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE; goto end; } diff --git a/src/lib/plugin/plugin.h b/src/lib/plugin/plugin.h index d7f2d68f..d62bfb55 100644 --- a/src/lib/plugin/plugin.h +++ b/src/lib/plugin/plugin.h @@ -124,7 +124,7 @@ void bt_plugin_destroy(struct bt_object *obj) BT_ASSERT(obj); plugin = container_of(obj, struct bt_plugin, base); - BT_LIB_LOGD("Destroying plugin object: %!+l", plugin); + BT_LIB_LOGI("Destroying plugin object: %!+l", plugin); if (plugin->destroy_spec_data) { plugin->destroy_spec_data(plugin); @@ -277,7 +277,7 @@ void bt_plugin_set_path(struct bt_plugin *plugin, const char *path) BT_ASSERT(path); g_string_assign(plugin->info.path, path); plugin->info.path_set = BT_TRUE; - BT_LIB_LOGV("Set plugin's path: %![plugin-]+l, path=\"%s\"", + BT_LIB_LOGD("Set plugin's path: %![plugin-]+l, path=\"%s\"", plugin, path); } @@ -288,7 +288,7 @@ void bt_plugin_set_name(struct bt_plugin *plugin, const char *name) BT_ASSERT(name); g_string_assign(plugin->info.name, name); plugin->info.name_set = BT_TRUE; - BT_LIB_LOGV("Set plugin's name: %![plugin-]+l, name=\"%s\"", + BT_LIB_LOGD("Set plugin's name: %![plugin-]+l, name=\"%s\"", plugin, name); } @@ -300,7 +300,7 @@ void bt_plugin_set_description(struct bt_plugin *plugin, BT_ASSERT(description); g_string_assign(plugin->info.description, description); plugin->info.description_set = BT_TRUE; - BT_LIB_LOGV("Set plugin's description: %![plugin-]+l", plugin); + BT_LIB_LOGD("Set plugin's description: %![plugin-]+l", plugin); } static inline @@ -310,7 +310,7 @@ void bt_plugin_set_author(struct bt_plugin *plugin, const char *author) BT_ASSERT(author); g_string_assign(plugin->info.author, author); plugin->info.author_set = BT_TRUE; - BT_LIB_LOGV("Set plugin's author: %![plugin-]+l, author=\"%s\"", + BT_LIB_LOGD("Set plugin's author: %![plugin-]+l, author=\"%s\"", plugin, author); } @@ -321,7 +321,7 @@ void bt_plugin_set_license(struct bt_plugin *plugin, const char *license) BT_ASSERT(license); g_string_assign(plugin->info.license, license); plugin->info.license_set = BT_TRUE; - BT_LIB_LOGV("Set plugin's path: %![plugin-]+l, license=\"%s\"", + BT_LIB_LOGD("Set plugin's path: %![plugin-]+l, license=\"%s\"", plugin, license); } @@ -339,7 +339,7 @@ void bt_plugin_set_version(struct bt_plugin *plugin, unsigned int major, } plugin->info.version_set = BT_TRUE; - BT_LIB_LOGV("Set plugin's version: %![plugin-]+l, " + BT_LIB_LOGD("Set plugin's version: %![plugin-]+l, " "major=%u, minor=%u, patch=%u, extra=\"%s\"", plugin, major, minor, patch, extra); } @@ -435,7 +435,7 @@ void bt_plugin_set_add_plugin(struct bt_plugin_set *plugin_set, BT_ASSERT(plugin); bt_object_get_ref(plugin); g_ptr_array_add(plugin_set->plugins, plugin); - BT_LIB_LOGV("Added plugin to plugin set: " + BT_LIB_LOGD("Added plugin to plugin set: " "plugin-set-addr=%p, %![plugin-]+l", plugin_set, plugin); } diff --git a/src/lib/trace-ir/clock-class.c b/src/lib/trace-ir/clock-class.c index 46fa7332..7b8cce0e 100644 --- a/src/lib/trace-ir/clock-class.c +++ b/src/lib/trace-ir/clock-class.c @@ -144,7 +144,7 @@ enum bt_clock_class_status bt_clock_class_set_name( BT_ASSERT_PRE_CLOCK_CLASS_HOT(clock_class); g_string_assign(clock_class->name.str, name); clock_class->name.value = clock_class->name.str->str; - BT_LIB_LOGV("Set clock class's name: %!+K", clock_class); + BT_LIB_LOGD("Set clock class's name: %!+K", clock_class); return BT_CLOCK_CLASS_STATUS_OK; } @@ -163,7 +163,7 @@ enum bt_clock_class_status bt_clock_class_set_description( BT_ASSERT_PRE_CLOCK_CLASS_HOT(clock_class); g_string_assign(clock_class->description.str, descr); clock_class->description.value = clock_class->description.str->str; - BT_LIB_LOGV("Set clock class's description: %!+K", + BT_LIB_LOGD("Set clock class's description: %!+K", clock_class); return BT_CLOCK_CLASS_STATUS_OK; } @@ -187,7 +187,7 @@ void bt_clock_class_set_frequency(struct bt_clock_class *clock_class, "%![cc-]+K, new-freq=%" PRIu64, clock_class, frequency); clock_class->frequency = frequency; set_base_offset(clock_class); - BT_LIB_LOGV("Set clock class's frequency: %!+K", clock_class); + BT_LIB_LOGD("Set clock class's frequency: %!+K", clock_class); } uint64_t bt_clock_class_get_precision(const struct bt_clock_class *clock_class) @@ -205,7 +205,7 @@ void bt_clock_class_set_precision(struct bt_clock_class *clock_class, "Invalid precision: %![cc-]+K, new-precision=%" PRIu64, clock_class, precision); clock_class->precision = precision; - BT_LIB_LOGV("Set clock class's precision: %!+K", clock_class); + BT_LIB_LOGD("Set clock class's precision: %!+K", clock_class); } void bt_clock_class_get_offset(const struct bt_clock_class *clock_class, @@ -229,7 +229,7 @@ void bt_clock_class_set_offset(struct bt_clock_class *clock_class, clock_class->offset_seconds = seconds; clock_class->offset_cycles = cycles; set_base_offset(clock_class); - BT_LIB_LOGV("Set clock class's offset: %!+K", clock_class); + BT_LIB_LOGD("Set clock class's offset: %!+K", clock_class); } bt_bool bt_clock_class_origin_is_unix_epoch(const struct bt_clock_class *clock_class) @@ -244,7 +244,7 @@ void bt_clock_class_set_origin_is_unix_epoch(struct bt_clock_class *clock_class, BT_ASSERT_PRE_NON_NULL(clock_class, "Clock class"); BT_ASSERT_PRE_CLOCK_CLASS_HOT(clock_class); clock_class->origin_is_unix_epoch = (bool) origin_is_unix_epoch; - BT_LIB_LOGV("Set clock class's origin is Unix epoch property: %!+K", + BT_LIB_LOGD("Set clock class's origin is Unix epoch property: %!+K", clock_class); } @@ -262,7 +262,7 @@ void bt_clock_class_set_uuid(struct bt_clock_class *clock_class, BT_ASSERT_PRE_CLOCK_CLASS_HOT(clock_class); memcpy(clock_class->uuid.uuid, uuid, BABELTRACE_UUID_LEN); clock_class->uuid.value = clock_class->uuid.uuid; - BT_LIB_LOGV("Set clock class's UUID: %!+K", clock_class); + BT_LIB_LOGD("Set clock class's UUID: %!+K", clock_class); } BT_HIDDEN @@ -289,7 +289,7 @@ enum bt_clock_class_status bt_clock_class_cycles_to_ns_from_origin( ret = bt_util_ns_from_origin_clock_class(clock_class, cycles, ns); if (ret) { ret = BT_CLOCK_CLASS_STATUS_OVERFLOW; - BT_LIB_LOGW("Cannot convert cycles to nanoseconds " + BT_LIB_LOGD("Cannot convert cycles to nanoseconds " "from origin for given clock class: " "value overflows the signed 64-bit integer range: " "%![cc-]+K, cycles=%" PRIu64, diff --git a/src/lib/trace-ir/event-class.c b/src/lib/trace-ir/event-class.c index e4676638..1d12d95a 100644 --- a/src/lib/trace-ir/event-class.c +++ b/src/lib/trace-ir/event-class.c @@ -201,7 +201,7 @@ enum bt_event_class_status bt_event_class_set_name( BT_ASSERT_PRE_EVENT_CLASS_HOT(event_class); g_string_assign(event_class->name.str, name); event_class->name.value = event_class->name.str->str; - BT_LIB_LOGV("Set event class's name: %!+E", event_class); + BT_LIB_LOGD("Set event class's name: %!+E", event_class); return BT_EVENT_CLASS_STATUS_OK; } @@ -230,7 +230,7 @@ void bt_event_class_set_log_level( BT_ASSERT_PRE_EVENT_CLASS_HOT(event_class); bt_property_uint_set(&event_class->log_level, (uint64_t) log_level); - BT_LIB_LOGV("Set event class's log level: %!+E", event_class); + BT_LIB_LOGD("Set event class's log level: %!+E", event_class); } const char *bt_event_class_get_emf_uri(const struct bt_event_class *event_class) @@ -248,7 +248,7 @@ enum bt_event_class_status bt_event_class_set_emf_uri( BT_ASSERT_PRE_EVENT_CLASS_HOT(event_class); g_string_assign(event_class->emf_uri.str, emf_uri); event_class->emf_uri.value = event_class->emf_uri.str->str; - BT_LIB_LOGV("Set event class's EMF URI: %!+E", event_class); + BT_LIB_LOGD("Set event class's EMF URI: %!+E", event_class); return BT_EVENT_CLASS_STATUS_OK; } @@ -324,7 +324,7 @@ enum bt_event_class_status bt_event_class_set_specific_context_field_class( event_class->specific_context_fc = field_class; bt_object_get_no_null_check(event_class->specific_context_fc); bt_field_class_freeze(field_class); - BT_LIB_LOGV("Set event class's specific context field class: %!+E", + BT_LIB_LOGD("Set event class's specific context field class: %!+E", event_class); end: @@ -388,7 +388,7 @@ enum bt_event_class_status bt_event_class_set_payload_field_class( event_class->payload_fc = field_class; bt_object_get_no_null_check(event_class->payload_fc); bt_field_class_freeze(field_class); - BT_LIB_LOGV("Set event class's payload field class: %!+E", event_class); + BT_LIB_LOGD("Set event class's payload field class: %!+E", event_class); end: return ret; diff --git a/src/lib/trace-ir/event.h b/src/lib/trace-ir/event.h index 8cd6419c..7b5c2544 100644 --- a/src/lib/trace-ir/event.h +++ b/src/lib/trace-ir/event.h @@ -174,7 +174,7 @@ void bt_event_set_packet(struct bt_event *event, struct bt_packet *packet) BT_ASSERT(!event->packet); event->packet = packet; bt_object_get_no_null_check_no_parent_check(&event->packet->base); - BT_LIB_LOGV("Set event's packet: %![event-]+e, %![packet-]+a", + BT_LIB_LOGD("Set event's packet: %![event-]+e, %![packet-]+a", event, packet); } diff --git a/src/lib/trace-ir/field-class.c b/src/lib/trace-ir/field-class.c index 40fe2159..6b3a2e93 100644 --- a/src/lib/trace-ir/field-class.c +++ b/src/lib/trace-ir/field-class.c @@ -159,7 +159,7 @@ void bt_field_class_integer_set_field_value_range( "at least one of the current mapping ranges contains values " "which are outside this range: %!+F, size=%" PRIu64, fc, size); int_fc->range = size; - BT_LIB_LOGV("Set integer field class's field value range: %!+F", fc); + BT_LIB_LOGD("Set integer field class's field value range: %!+F", fc); } enum bt_field_class_integer_preferred_display_base @@ -182,7 +182,7 @@ void bt_field_class_integer_set_preferred_display_base( BT_ASSERT_PRE_FC_IS_INT(fc, "Field class"); BT_ASSERT_PRE_FC_HOT(fc, "Field class"); int_fc->base = base; - BT_LIB_LOGV("Set integer field class's preferred display base: %!+F", fc); + BT_LIB_LOGD("Set integer field class's preferred display base: %!+F", fc); } static @@ -502,7 +502,7 @@ enum bt_field_class_status add_mapping_to_enumeration_field_class( mapping->ranges->len - 1); range->lower.u = lower; range->upper.u = upper; - BT_LIB_LOGV("Added mapping to enumeration field class: " + BT_LIB_LOGD("Added mapping to enumeration field class: " "%![fc-]+F, label=\"%s\", lower-unsigned=%" PRIu64 ", " "upper-unsigned=%" PRIu64, fc, label, lower, upper); @@ -610,7 +610,7 @@ void bt_field_class_real_set_is_single_precision(struct bt_field_class *fc, BT_ASSERT_PRE_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_REAL, "Field class"); BT_ASSERT_PRE_FC_HOT(fc, "Field class"); real_fc->is_single_precision = (bool) is_single_precision; - BT_LIB_LOGV("Set real field class's \"is single precision\" property: " + BT_LIB_LOGD("Set real field class's \"is single precision\" property: " "%!+F", fc); } diff --git a/src/lib/trace-ir/stream-class.c b/src/lib/trace-ir/stream-class.c index 67b24aad..b77f46aa 100644 --- a/src/lib/trace-ir/stream-class.c +++ b/src/lib/trace-ir/stream-class.c @@ -214,7 +214,7 @@ enum bt_stream_class_status bt_stream_class_set_name( BT_ASSERT_PRE_STREAM_CLASS_HOT(stream_class); g_string_assign(stream_class->name.str, name); stream_class->name.value = stream_class->name.str->str; - BT_LIB_LOGV("Set stream class's name: %!+S", stream_class); + BT_LIB_LOGD("Set stream class's name: %!+S", stream_class); return BT_STREAM_CLASS_STATUS_OK; } @@ -328,7 +328,7 @@ enum bt_stream_class_status bt_stream_class_set_packet_context_field_class( stream_class->packet_context_fc = field_class; bt_object_get_no_null_check(stream_class->packet_context_fc); bt_field_class_freeze(field_class); - BT_LIB_LOGV("Set stream class's packet context field class: %!+S", + BT_LIB_LOGD("Set stream class's packet context field class: %!+S", stream_class); end: @@ -388,7 +388,7 @@ bt_stream_class_set_event_common_context_field_class( stream_class->event_common_context_fc = field_class; bt_object_get_no_null_check(stream_class->event_common_context_fc); bt_field_class_freeze(field_class); - BT_LIB_LOGV("Set stream class's event common context field class: %!+S", + BT_LIB_LOGD("Set stream class's event common context field class: %!+S", stream_class); end: @@ -415,7 +415,7 @@ enum bt_stream_class_status bt_stream_class_set_default_clock_class( stream_class->default_clock_class = clock_class; bt_object_get_no_null_check(stream_class->default_clock_class); bt_clock_class_freeze(clock_class); - BT_LIB_LOGV("Set stream class's default clock class: %!+S", + BT_LIB_LOGD("Set stream class's default clock class: %!+S", stream_class); return BT_STREAM_CLASS_STATUS_OK; } @@ -448,7 +448,7 @@ void bt_stream_class_set_assigns_automatic_event_class_id( BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class"); BT_ASSERT_PRE_STREAM_CLASS_HOT(stream_class); stream_class->assigns_automatic_event_class_id = (bool) value; - BT_LIB_LOGV("Set stream class's automatic event class ID " + BT_LIB_LOGD("Set stream class's automatic event class ID " "assignment property: %!+S", stream_class); } @@ -468,7 +468,7 @@ void bt_stream_class_set_packets_have_beginning_default_clock_snapshot( "Stream class has no default clock class: %!+S", stream_class); stream_class->packets_have_beginning_default_clock_snapshot = (bool) value; - BT_LIB_LOGV("Set stream class's \"packets have default beginning " + BT_LIB_LOGD("Set stream class's \"packets have default beginning " "clock snapshot\" property: %!+S", stream_class); } @@ -488,7 +488,7 @@ void bt_stream_class_set_packets_have_end_default_clock_snapshot( "Stream class has no default clock class: %!+S", stream_class); stream_class->packets_have_end_default_clock_snapshot = (bool) value; - BT_LIB_LOGV("Set stream class's \"packets have default end " + BT_LIB_LOGD("Set stream class's \"packets have default end " "clock snapshot\" property: %!+S", stream_class); } @@ -517,7 +517,7 @@ void bt_stream_class_set_supports_discarded_events( (bool) supports_discarded_events; stream_class->discarded_events_have_default_clock_snapshots = (bool) with_default_clock_snapshots; - BT_LIB_LOGV("Set stream class's discarded events support property: " + BT_LIB_LOGD("Set stream class's discarded events support property: " "%!+S", stream_class); } @@ -553,7 +553,7 @@ void bt_stream_class_set_supports_discarded_packets( (bool) supports_discarded_packets; stream_class->discarded_packets_have_default_clock_snapshots = (bool) with_default_clock_snapshots; - BT_LIB_LOGV("Set stream class's discarded packets support property: " + BT_LIB_LOGD("Set stream class's discarded packets support property: " "%!+S", stream_class); } @@ -578,7 +578,7 @@ void bt_stream_class_set_assigns_automatic_stream_id( BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class"); BT_ASSERT_PRE_STREAM_CLASS_HOT(stream_class); stream_class->assigns_automatic_stream_id = (bool) value; - BT_LIB_LOGV("Set stream class's automatic stream ID " + BT_LIB_LOGD("Set stream class's automatic stream ID " "assignment property: %!+S", stream_class); } diff --git a/src/lib/trace-ir/stream.c b/src/lib/trace-ir/stream.c index 4e017e4a..508866b1 100644 --- a/src/lib/trace-ir/stream.c +++ b/src/lib/trace-ir/stream.c @@ -214,7 +214,7 @@ enum bt_stream_status bt_stream_set_name(struct bt_stream *stream, BT_ASSERT_PRE_STREAM_HOT(stream); g_string_assign(stream->name.str, name); stream->name.value = stream->name.str->str; - BT_LIB_LOGV("Set stream's name: %!+s", stream); + BT_LIB_LOGD("Set stream's name: %!+s", stream); return BT_STREAM_STATUS_OK; } diff --git a/src/lib/trace-ir/trace-class.c b/src/lib/trace-ir/trace-class.c index f05c7711..42c5bfed 100644 --- a/src/lib/trace-ir/trace-class.c +++ b/src/lib/trace-ir/trace-class.c @@ -75,7 +75,7 @@ void destroy_trace_class(struct bt_object *obj) */ if (tc->destruction_listeners) { uint64_t i; - BT_LIB_LOGV("Calling trace class destruction listener(s): %!+T", tc); + BT_LIB_LOGD("Calling trace class destruction listener(s): %!+T", tc); /* * The trace class' reference count is 0 if we're here. Increment @@ -195,7 +195,7 @@ enum bt_trace_class_status bt_trace_class_set_name( BT_ASSERT_PRE_TRACE_CLASS_HOT(tc); g_string_assign(tc->name.str, name); tc->name.value = tc->name.str->str; - BT_LIB_LOGV("Set trace class's name: %!+T", tc); + BT_LIB_LOGD("Set trace class's name: %!+T", tc); return BT_TRACE_CLASS_STATUS_OK; } @@ -212,7 +212,7 @@ void bt_trace_class_set_uuid(struct bt_trace_class *tc, bt_uuid uuid) BT_ASSERT_PRE_TRACE_CLASS_HOT(tc); memcpy(tc->uuid.uuid, uuid, BABELTRACE_UUID_LEN); tc->uuid.value = tc->uuid.uuid; - BT_LIB_LOGV("Set trace class's UUID: %!+T", tc); + BT_LIB_LOGD("Set trace class's UUID: %!+T", tc); } enum bt_trace_class_status bt_trace_class_add_destruction_listener( @@ -251,7 +251,7 @@ enum bt_trace_class_status bt_trace_class_add_destruction_listener( *listener_id = i; } - BT_LIB_LOGV("Added trace class destruction listener: %![tc-]+T, " + BT_LIB_LOGD("Added trace class destruction listener: %![tc-]+T, " "listener-id=%" PRIu64, tc, i); return BT_TRACE_CLASS_STATUS_OK; } @@ -283,7 +283,7 @@ enum bt_trace_class_status bt_trace_class_remove_destruction_listener( elem->func = NULL; elem->data = NULL; - BT_LIB_LOGV("Removed trace class destruction listener: " + BT_LIB_LOGD("Removed trace class destruction listener: " "%![tc-]+T, listener-id=%" PRIu64, tc, listener_id); return BT_TRACE_CLASS_STATUS_OK; @@ -320,7 +320,7 @@ enum bt_trace_class_status set_environment_entry(struct bt_trace_class *tc, "%![tc-]+T, entry-name=\"%s\"", tc, name); } else { bt_value_freeze(value); - BT_LIB_LOGV("Set trace class's environment entry: " + BT_LIB_LOGD("Set trace class's environment entry: " "%![tc-]+T, entry-name=\"%s\"", tc, name); } @@ -477,7 +477,7 @@ void bt_trace_class_set_assigns_automatic_stream_class_id(struct bt_trace_class BT_ASSERT_PRE_NON_NULL(tc, "Trace class"); BT_ASSERT_PRE_TRACE_CLASS_HOT(tc); tc->assigns_automatic_stream_class_id = (bool) value; - BT_LIB_LOGV("Set trace class's automatic stream class ID " + BT_LIB_LOGD("Set trace class's automatic stream class ID " "assignment property: %!+T", tc); } diff --git a/src/lib/trace-ir/trace.c b/src/lib/trace-ir/trace.c index 6dadb10d..0776a7b2 100644 --- a/src/lib/trace-ir/trace.c +++ b/src/lib/trace-ir/trace.c @@ -77,7 +77,7 @@ void destroy_trace(struct bt_object *obj) */ if (trace->destruction_listeners) { uint64_t i; - BT_LIB_LOGV("Calling trace destruction listener(s): %!+t", trace); + BT_LIB_LOGD("Calling trace destruction listener(s): %!+t", trace); /* * The trace's reference count is 0 if we're here. Increment @@ -198,7 +198,7 @@ enum bt_trace_status bt_trace_set_name(struct bt_trace *trace, const char *name) BT_ASSERT_PRE_TRACE_HOT(trace); g_string_assign(trace->name.str, name); trace->name.value = trace->name.str->str; - BT_LIB_LOGV("Set trace's name: %!+t", trace); + BT_LIB_LOGD("Set trace's name: %!+t", trace); return BT_TRACE_STATUS_OK; } @@ -286,7 +286,7 @@ enum bt_trace_status bt_trace_add_destruction_listener( *listener_id = i; } - BT_LIB_LOGV("Added destruction listener: " "%![trace-]+t, " + BT_LIB_LOGD("Added destruction listener: " "%![trace-]+t, " "listener-id=%" PRIu64, trace, i); return BT_TRACE_STATUS_OK; } @@ -318,7 +318,7 @@ enum bt_trace_status bt_trace_remove_destruction_listener( elem->func = NULL; elem->data = NULL; - BT_LIB_LOGV("Removed \"trace destruction listener: " + BT_LIB_LOGD("Removed \"trace destruction listener: " "%![trace-]+t, listener-id=%" PRIu64, trace, listener_id); return BT_TRACE_STATUS_OK; diff --git a/src/plugins/ctf/common/bfcr/bfcr.c b/src/plugins/ctf/common/bfcr/bfcr.c index 2bdd961d..0d1ae577 100644 --- a/src/plugins/ctf/common/bfcr/bfcr.c +++ b/src/plugins/ctf/common/bfcr/bfcr.c @@ -1174,7 +1174,7 @@ struct bt_bfcr *bt_bfcr_create(struct bt_bfcr_cbs cbs, void *data) { struct bt_bfcr *bfcr; - BT_LOGD_STR("Creating binary class reader (BFCR)."); + BT_LOGD_STR("Creating binary field class reader (BFCR)."); bfcr = g_new0(struct bt_bfcr, 1); if (!bfcr) { BT_LOGE_STR("Failed to allocate one binary class reader."); diff --git a/src/plugins/ctf/common/metadata/ctf-meta-resolve.c b/src/plugins/ctf/common/metadata/ctf-meta-resolve.c index 478166de..5ea4d8f7 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-resolve.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-resolve.c @@ -142,7 +142,7 @@ int field_class_stack_push(field_class_stack *stack, struct ctf_field_class *fc) goto end; } - BT_LOGV("Pushing field class on context's stack: " + BT_LOGD("Pushing field class on context's stack: " "fc-addr=%p, stack-size-before=%u", fc, stack->len); frame->fc = fc; g_ptr_array_add(stack, frame); @@ -216,7 +216,7 @@ void field_class_stack_pop(field_class_stack *stack) * This will call the frame's destructor and free it, as * well as put its contained field class. */ - BT_LOGV("Popping context's stack: stack-size-before=%u", + BT_LOGD("Popping context's stack: stack-size-before=%u", stack->len); g_ptr_array_set_size(stack, stack->len - 1); } @@ -272,7 +272,7 @@ enum ctf_scope get_root_scope_from_absolute_pathstr(const char *pathstr) if (strncmp(pathstr, absolute_path_prefixes[scope], strlen(absolute_path_prefixes[scope]))) { /* Prefix does not match: try the next one */ - BT_LOGV("Prefix does not match: trying the next one: " + BT_LOGD("Prefix does not match: trying the next one: " "path=\"%s\", path-prefix=\"%s\", scope=%s", pathstr, absolute_path_prefixes[scope], ctf_scope_string(scope)); @@ -281,7 +281,7 @@ enum ctf_scope get_root_scope_from_absolute_pathstr(const char *pathstr) /* Found it! */ ret = scope; - BT_LOGV("Found root scope from absolute path: " + BT_LOGD("Found root scope from absolute path: " "path=\"%s\", scope=%s", pathstr, ctf_scope_string(scope)); goto end; @@ -391,7 +391,7 @@ int ptokens_to_field_path(GList *ptokens, struct ctf_field_path *field_path, struct ctf_field_class *child_fc; const char *ft_name = ptoken_get_string(cur_ptoken); - BT_LOGV("Current path token: token=\"%s\"", ft_name); + BT_LOGD("Current path token: token=\"%s\"", ft_name); /* Find to which index corresponds the current path token */ if (fc->type == CTF_FIELD_CLASS_TYPE_ARRAY || @@ -406,7 +406,7 @@ int ptokens_to_field_path(GList *ptokens, struct ctf_field_path *field_path, * Error: field name does not exist or * wrong current class. */ - BT_LOGV("Cannot get index of field class: " + BT_LOGD("Cannot get index of field class: " "field-name=\"%s\", " "src-index=%" PRId64 ", " "child-index=%" PRId64 ", " @@ -417,7 +417,7 @@ int ptokens_to_field_path(GList *ptokens, struct ctf_field_path *field_path, goto end; } else if (child_index > src_index && !first_level_done) { - BT_LOGV("Child field class is located after source field class: " + BT_LOGD("Child field class is located after source field class: " "field-name=\"%s\", " "src-index=%" PRId64 ", " "child-index=%" PRId64 ", " @@ -571,7 +571,7 @@ int relative_ptokens_to_field_path(GList *ptokens, int64_t cur_index = field_class_stack_at(ctx->field_class_stack, parent_pos_in_stack)->index; - BT_LOGV("Locating target field class from current parent field class: " + BT_LOGD("Locating target field class from current parent field class: " "parent-pos=%" PRId64 ", parent-fc-addr=%p, " "cur-index=%" PRId64, parent_pos_in_stack, parent_class, cur_index); @@ -581,7 +581,7 @@ int relative_ptokens_to_field_path(GList *ptokens, parent_class, cur_index); if (ret) { /* Not found... yet */ - BT_LOGV_STR("Not found at this point."); + BT_LOGD_STR("Not found at this point."); ctf_field_path_clear(&tail_field_path); } else { /* Found: stitch tail field path to head field path */ @@ -655,7 +655,7 @@ int pathstr_to_field_path(const char *pathstr, if (root_scope == -1) { /* Relative path: start with current root scope */ field_path->root = ctx->root_scope; - BT_LOGV("Detected relative path: starting with current root scope: " + BT_LOGD("Detected relative path: starting with current root scope: " "scope=%s", ctf_scope_string(field_path->root)); ret = relative_ptokens_to_field_path(ptokens, field_path, ctx); if (ret) { @@ -668,7 +668,7 @@ int pathstr_to_field_path(const char *pathstr, } else { /* Absolute path: use found root scope */ field_path->root = root_scope; - BT_LOGV("Detected absolute path: using root scope: " + BT_LOGD("Detected absolute path: using root scope: " "scope=%s", ctf_scope_string(field_path->root)); ret = absolute_ptokens_to_field_path(ptokens, field_path, ctx); if (ret) { @@ -684,7 +684,7 @@ int pathstr_to_field_path(const char *pathstr, const char *field_path_pretty_str = field_path_pretty ? field_path_pretty->str : NULL; - BT_LOGV("Found field path: path=\"%s\", field-path=\"%s\"", + BT_LOGD("Found field path: path=\"%s\", field-path=\"%s\"", pathstr, field_path_pretty_str); if (field_path_pretty) { @@ -777,7 +777,7 @@ int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1, const char *field_path2_pretty_str = field_path2_pretty ? field_path2_pretty->str : NULL; - BT_LOGV("Finding lowest common ancestor (LCA) between two field paths: " + BT_LOGD("Finding lowest common ancestor (LCA) between two field paths: " "field-path-1=\"%s\", field-path-2=\"%s\"", field_path1_pretty_str, field_path2_pretty_str); @@ -829,7 +829,7 @@ int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1, lca_index++; } - BT_LOGV("Found LCA: lca-index=%" PRId64, lca_index); + BT_LOGD("Found LCA: lca-index=%" PRId64, lca_index); return lca_index; } @@ -1123,7 +1123,7 @@ int resolve_field_class(struct ctf_field_class *fc, struct resolve_context *ctx) (int64_t) i; } - BT_LOGV("Resolving field class's child field class: " + BT_LOGD("Resolving field class's child field class: " "parent-fc-addr=%p, child-fc-addr=%p, " "index=%" PRIu64 ", count=%" PRIu64, fc, child_fc, i, field_count); diff --git a/src/plugins/ctf/common/metadata/decoder.c b/src/plugins/ctf/common/metadata/decoder.c index 53749a7f..08eb9abe 100644 --- a/src/plugins/ctf/common/metadata/decoder.c +++ b/src/plugins/ctf/common/metadata/decoder.c @@ -66,7 +66,7 @@ bool ctf_metadata_decoder_is_packetized(FILE *fp, int *byte_order) len = fread(&magic, sizeof(magic), 1, fp); if (len != 1) { - BT_LOGD_STR("Cannot reade first metadata packet header: assuming the stream is not packetized."); + BT_LOGI_STR("Cannot read first metadata packet header: assuming the stream is not packetized."); goto end; } @@ -108,15 +108,15 @@ int decode_packet(struct ctf_metadata_decoder *mdec, FILE *in_fp, FILE *out_fp, "."); goto error; } - BT_LOGV("Decoding metadata packet: mdec-addr=%p, offset=%ld", + BT_LOGD("Decoding metadata packet: mdec-addr=%p, offset=%ld", mdec, offset); readlen = fread(&header, sizeof(header), 1, in_fp); if (feof(in_fp) != 0) { - BT_LOGV("Reached end of file: offset=%ld", ftell(in_fp)); + BT_LOGI("Reached end of file: offset=%ld", ftell(in_fp)); goto end; } if (readlen < 1) { - BT_LOGV("Cannot decode metadata packet: offset=%ld", offset); + BT_LOGE("Cannot decode metadata packet: offset=%ld", offset); goto error; } @@ -418,7 +418,7 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_decode( BT_ASSERT(mdec); if (ctf_metadata_decoder_is_packetized(fp, &mdec->bo)) { - BT_LOGD("Metadata stream is packetized: mdec-addr=%p", mdec); + BT_LOGI("Metadata stream is packetized: mdec-addr=%p", mdec); ret = ctf_metadata_decoder_packetized_file_stream_to_buf_with_mdec( mdec, fp, &buf, mdec->bo); if (ret) { @@ -447,7 +447,7 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_decode( ssize_t nr_items; const long init_pos = ftell(fp); - BT_LOGD("Metadata stream is plain text: mdec-addr=%p", mdec); + BT_LOGI("Metadata stream is plain text: mdec-addr=%p", mdec); if (init_pos < 0) { BT_LOGE_ERRNO("Failed to get current file position", "."); @@ -462,7 +462,7 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_decode( "mdec-addr=%p", mdec); } - BT_LOGD("Found metadata stream version in signature: version=%u.%u", major, minor); + BT_LOGI("Found metadata stream version in signature: version=%u.%u", major, minor); if (!is_version_valid(major, minor)) { BT_LOGE("Invalid metadata version found in plain text signature: " diff --git a/src/plugins/ctf/common/msg-iter/msg-iter.c b/src/plugins/ctf/common/msg-iter/msg-iter.c index 377a4c5d..3713a278 100644 --- a/src/plugins/ctf/common/msg-iter/msg-iter.c +++ b/src/plugins/ctf/common/msg-iter/msg-iter.c @@ -458,12 +458,12 @@ enum bt_msg_iter_status request_medium_bytes( size_t buffer_sz = 0; enum bt_msg_iter_medium_status m_status; - BT_LOGV("Calling user function (request bytes): notit-addr=%p, " + BT_LOGD("Calling user function (request bytes): notit-addr=%p, " "request-size=%zu", notit, notit->medium.max_request_sz); m_status = notit->medium.medops.request_bytes( notit->medium.max_request_sz, &buffer_addr, &buffer_sz, notit->medium.data); - BT_LOGV("User function returned: status=%s, buf-addr=%p, buf-size=%zu", + BT_LOGD("User function returned: status=%s, buf-addr=%p, buf-size=%zu", bt_msg_iter_medium_status_string(m_status), buffer_addr, buffer_sz); if (m_status == BT_MSG_ITER_MEDIUM_STATUS_OK) { @@ -482,11 +482,11 @@ enum bt_msg_iter_status request_medium_bytes( /* New medium buffer address */ notit->buf.addr = buffer_addr; - BT_LOGV("User function returned new bytes: " + BT_LOGD("User function returned new bytes: " "packet-offset=%zu, cur=%zu, size=%zu, addr=%p", notit->buf.packet_offset, notit->buf.at, notit->buf.sz, notit->buf.addr); - BT_LOGV_MEM(buffer_addr, buffer_sz, "Returned bytes at %p:", + BT_LOGD_MEM(buffer_addr, buffer_sz, "Returned bytes at %p:", buffer_addr); } else if (m_status == BT_MSG_ITER_MEDIUM_STATUS_EOF) { /* @@ -705,7 +705,7 @@ enum bt_msg_iter_status read_packet_header_begin_state( notit->cur_stream_class_id = -1; notit->cur_event_class_id = -1; notit->cur_data_stream_id = -1; - BT_LOGV("Decoding packet header field:" + BT_LOGD("Decoding packet header field:" "notit-addr=%p, trace-class-addr=%p, fc-addr=%p", notit, notit->meta.tc, packet_header_fc); ret = read_dscope_begin_state(notit, packet_header_fc, @@ -784,7 +784,7 @@ enum bt_msg_iter_status set_current_stream_class(struct bt_msg_iter *notit) notit->meta.sc = new_stream_class; } - BT_LOGV("Set current stream class: " + BT_LOGD("Set current stream class: " "notit-addr=%p, stream-class-addr=%p, " "stream-class-id=%" PRId64, notit, notit->meta.sc, notit->meta.sc->id); @@ -799,7 +799,7 @@ enum bt_msg_iter_status set_current_stream(struct bt_msg_iter *notit) enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK; bt_stream *stream = NULL; - BT_LOGV("Calling user function (get stream): notit-addr=%p, " + BT_LOGD("Calling user function (get stream): notit-addr=%p, " "stream-class-addr=%p, stream-class-id=%" PRId64, notit, notit->meta.sc, notit->meta.sc->id); @@ -807,7 +807,7 @@ enum bt_msg_iter_status set_current_stream(struct bt_msg_iter *notit) notit->meta.sc->ir_sc, notit->cur_data_stream_id, notit->medium.data); bt_stream_get_ref(stream); - BT_LOGV("User function returned: stream-addr=%p", stream); + BT_LOGD("User function returned: stream-addr=%p", stream); if (!stream) { BT_LOGW_STR("User function failed to return a stream object " "for the given stream class."); @@ -835,9 +835,9 @@ enum bt_msg_iter_status set_current_packet(struct bt_msg_iter *notit) enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK; bt_packet *packet = NULL; - BT_LOGV("Creating packet for packet message: " + BT_LOGD("Creating packet for packet message: " "notit-addr=%p", notit); - BT_LOGV("Creating packet from stream: " + BT_LOGD("Creating packet from stream: " "notit-addr=%p, stream-addr=%p, " "stream-class-addr=%p, " "stream-class-id=%" PRId64, @@ -895,7 +895,7 @@ enum bt_msg_iter_status read_packet_context_begin_state( BT_ASSERT(notit->meta.sc); packet_context_fc = notit->meta.sc->packet_context_fc; if (!packet_context_fc) { - BT_LOGV("No packet packet context field class in stream class: continuing: " + BT_LOGD("No packet packet context field class in stream class: continuing: " "notit-addr=%p, stream-class-addr=%p, " "stream-class-id=%" PRId64, notit, notit->meta.sc, @@ -931,7 +931,7 @@ enum bt_msg_iter_status read_packet_context_begin_state( BT_ASSERT(notit->dscopes.stream_packet_context); } - BT_LOGV("Decoding packet context field: " + BT_LOGD("Decoding packet context field: " "notit-addr=%p, stream-class-addr=%p, " "stream-class-id=%" PRId64 ", fc-addr=%p", notit, notit->meta.sc, @@ -997,7 +997,7 @@ enum bt_msg_iter_status set_current_packet_content_sizes( goto end; } - BT_LOGV("Set current packet and content sizes: " + BT_LOGD("Set current packet and content sizes: " "notit-addr=%p, packet-size=%" PRIu64 ", content-size=%" PRIu64, notit, notit->cur_exp_packet_total_size, notit->cur_exp_packet_content_size); @@ -1046,14 +1046,14 @@ enum bt_msg_iter_status read_event_header_begin_state(struct bt_msg_iter *notit) if (G_UNLIKELY(packet_at(notit) == notit->cur_exp_packet_content_size)) { /* No more events! */ - BT_LOGV("Reached end of packet: notit-addr=%p, " + BT_LOGD("Reached end of packet: notit-addr=%p, " "cur=%zu", notit, packet_at(notit)); notit->state = STATE_EMIT_MSG_PACKET_END_MULTI; goto end; } else if (G_UNLIKELY(packet_at(notit) > notit->cur_exp_packet_content_size)) { /* That's not supposed to happen */ - BT_LOGV("Before decoding event header field: cursor is passed the packet's content: " + BT_LOGD("Before decoding event header field: cursor is passed the packet's content: " "notit-addr=%p, content-size=%" PRId64 ", " "cur=%zu", notit, notit->cur_exp_packet_content_size, @@ -1087,7 +1087,7 @@ enum bt_msg_iter_status read_event_header_begin_state(struct bt_msg_iter *notit) goto end; } - BT_LOGV("Decoding event header field: " + BT_LOGD("Decoding event header field: " "notit-addr=%p, stream-class-addr=%p, " "stream-class-id=%" PRId64 ", " "fc-addr=%p", @@ -1156,7 +1156,7 @@ enum bt_msg_iter_status set_current_event_class(struct bt_msg_iter *notit) } notit->meta.ec = new_event_class; - BT_LOGV("Set current event class: " + BT_LOGD("Set current event class: " "notit-addr=%p, event-class-addr=%p, " "event-class-id=%" PRId64 ", " "event-class-name=\"%s\"", @@ -1176,7 +1176,7 @@ enum bt_msg_iter_status set_current_event_message( BT_ASSERT(notit->meta.ec); BT_ASSERT(notit->packet); - BT_LOGV("Creating event message from event class and packet: " + BT_LOGD("Creating event message from event class and packet: " "notit-addr=%p, ec-addr=%p, ec-name=\"%s\", packet-addr=%p", notit, notit->meta.ec, notit->meta.ec->name->str, @@ -1417,7 +1417,7 @@ enum bt_msg_iter_status skip_packet_padding_state(struct bt_msg_iter *notit) } else { size_t bits_to_consume; - BT_LOGV("Trying to skip %zu bits of padding: notit-addr=%p, size=%zu", + BT_LOGD("Trying to skip %zu bits of padding: notit-addr=%p, size=%zu", bits_to_skip, notit, bits_to_skip); status = buf_ensure_available_bits(notit); if (status != BT_MSG_ITER_STATUS_OK) { @@ -1425,7 +1425,7 @@ enum bt_msg_iter_status skip_packet_padding_state(struct bt_msg_iter *notit) } bits_to_consume = MIN(buf_available_bits(notit), bits_to_skip); - BT_LOGV("Skipping %zu bits of padding: notit-addr=%p, size=%zu", + BT_LOGD("Skipping %zu bits of padding: notit-addr=%p, size=%zu", bits_to_consume, notit, bits_to_consume); buf_consume_bits(notit, bits_to_consume); bits_to_skip = notit->cur_exp_packet_total_size - @@ -1668,7 +1668,7 @@ enum bt_msg_iter_status handle_state(struct bt_msg_iter *notit) case STATE_DONE: break; default: - BT_LOGD("Unknown CTF plugin message iterator state: " + BT_LOGF("Unknown CTF plugin message iterator state: " "notit-addr=%p, state=%d", notit, notit->state); abort(); } @@ -1748,7 +1748,7 @@ int bt_msg_iter_switch_packet(struct bt_msg_iter *notit) notit->cur_packet_offset += notit->cur_exp_packet_total_size; } - BT_LOGV("Switching packet: notit-addr=%p, cur=%zu, " + BT_LOGD("Switching packet: notit-addr=%p, cur=%zu, " "packet-offset=%" PRId64, notit, notit->buf.at, notit->cur_packet_offset); stack_clear(notit->stack); @@ -1777,7 +1777,7 @@ int bt_msg_iter_switch_packet(struct bt_msg_iter *notit) notit->buf.sz -= consumed_bytes; notit->buf.at = 0; notit->buf.packet_offset = 0; - BT_LOGV("Adjusted buffer: addr=%p, size=%zu", + BT_LOGD("Adjusted buffer: addr=%p, size=%zu", notit->buf.addr, notit->buf.sz); } @@ -2784,12 +2784,12 @@ enum bt_msg_iter_status bt_msg_iter_get_next_message( BT_ASSERT(message); notit->msg_iter = msg_iter; notit->set_stream = true; - BT_LOGV("Getting next message: notit-addr=%p", notit); + BT_LOGD("Getting next message: notit-addr=%p", notit); while (true) { status = handle_state(notit); if (G_UNLIKELY(status == BT_MSG_ITER_STATUS_AGAIN)) { - BT_LOGV_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN."); + BT_LOGD_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN."); goto end; } else if (G_UNLIKELY(status != BT_MSG_ITER_STATUS_OK)) { BT_LOGW("Cannot handle state: notit-addr=%p, state=%s", @@ -2907,7 +2907,7 @@ enum bt_msg_iter_status read_packet_header_context_fields( while (true) { status = handle_state(notit); if (G_UNLIKELY(status == BT_MSG_ITER_STATUS_AGAIN)) { - BT_LOGV_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN."); + BT_LOGD_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN."); goto end; } else if (G_UNLIKELY(status != BT_MSG_ITER_STATUS_OK)) { BT_LOGW("Cannot handle state: notit-addr=%p, state=%s", diff --git a/src/plugins/ctf/fs-sink/fs-sink-trace.c b/src/plugins/ctf/fs-sink/fs-sink-trace.c index 7f5c83a7..4feb8245 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-trace.c +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.c @@ -149,7 +149,7 @@ int lttng_validate_datetime(const char *datetime) * the format. */ if (!g_time_val_from_iso8601(datetime, &tv)) { - BT_LOGD("Couldn't parse datetime as iso8601: date=\"%s\"", datetime); + BT_LOGI("Couldn't parse datetime as ISO 8601: date=\"%s\"", datetime); goto end; } @@ -167,7 +167,7 @@ int append_lttng_trace_path_ust_uid(GString *path, const bt_trace_class *tc) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "tracer_buffering_id"); if (!v || !bt_value_is_signed_integer(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"tracer_buffering_id\""); + BT_LOGI_STR("Couldn't get environment value: name=\"tracer_buffering_id\""); goto error; } @@ -176,7 +176,7 @@ int append_lttng_trace_path_ust_uid(GString *path, const bt_trace_class *tc) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "isa_length"); if (!v || !bt_value_is_signed_integer(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"isa_length\""); + BT_LOGI_STR("Couldn't get environment value: name=\"isa_length\""); goto error; } @@ -202,7 +202,7 @@ int append_lttng_trace_path_ust_pid(GString *path, const bt_trace_class *tc) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "procname"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"procname\""); + BT_LOGI_STR("Couldn't get environment value: name=\"procname\""); goto error; } @@ -210,7 +210,7 @@ int append_lttng_trace_path_ust_pid(GString *path, const bt_trace_class *tc) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "vpid"); if (!v || !bt_value_is_signed_integer(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"vpid\""); + BT_LOGI_STR("Couldn't get environment value: name=\"vpid\""); goto error; } @@ -218,7 +218,7 @@ int append_lttng_trace_path_ust_pid(GString *path, const bt_trace_class *tc) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "vpid_datetime"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"vpid_datetime\""); + BT_LOGI_STR("Couldn't get environment value: name=\"vpid_datetime\""); goto error; } @@ -262,7 +262,7 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "tracer_name"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"tracer_name\""); + BT_LOGI_STR("Couldn't get environment value: name=\"tracer_name\""); goto error; } @@ -270,13 +270,13 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) if (!g_str_equal(tracer_name, "lttng-ust") && !g_str_equal(tracer_name, "lttng-modules")) { - BT_LOGD("Unrecognized tracer name: name=\"%s\"", tracer_name); + BT_LOGI("Unrecognized tracer name: name=\"%s\"", tracer_name); goto error; } v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "tracer_major"); if (!v || !bt_value_is_signed_integer(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"tracer_major\""); + BT_LOGI_STR("Couldn't get environment value: name=\"tracer_major\""); goto error; } @@ -284,21 +284,21 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "tracer_minor"); if (!v || !bt_value_is_signed_integer(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"tracer_minor\""); + BT_LOGI_STR("Couldn't get environment value: name=\"tracer_minor\""); goto error; } tracer_minor = bt_value_signed_integer_get(v); if (!(tracer_major >= 3 || (tracer_major == 2 && tracer_minor >= 11))) { - BT_LOGD("Unsupported LTTng version for automatic trace path: major=%" PRId64 ", minor=%" PRId64, + BT_LOGI("Unsupported LTTng version for automatic trace path: major=%" PRId64 ", minor=%" PRId64, tracer_major, tracer_minor); goto error; } v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "hostname"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"tracer_hostname\""); + BT_LOGI_STR("Couldn't get environment value: name=\"tracer_hostname\""); goto error; } @@ -306,7 +306,7 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "trace_name"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"trace_name\""); + BT_LOGI_STR("Couldn't get environment value: name=\"trace_name\""); goto error; } @@ -314,7 +314,7 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "trace_creation_datetime"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"trace_creation_datetime\""); + BT_LOGI_STR("Couldn't get environment value: name=\"trace_creation_datetime\""); goto error; } @@ -328,7 +328,7 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "domain"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"domain\""); + BT_LOGI_STR("Couldn't get environment value: name=\"domain\""); goto error; } @@ -340,7 +340,7 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) v = bt_trace_class_borrow_environment_entry_value_by_name_const(tc, "tracer_buffering_scheme"); if (!v || !bt_value_is_string(v)) { - BT_LOGD_STR("Couldn't get environment value: name=\"tracer_buffering_scheme\""); + BT_LOGI_STR("Couldn't get environment value: name=\"tracer_buffering_scheme\""); goto error; } @@ -357,12 +357,12 @@ GString *make_lttng_trace_path_rel(const struct fs_sink_trace *trace) } } else { /* Unknown buffering scheme. */ - BT_LOGD("Unknown buffering scheme: tracer_buffering_scheme=\"%s\"", tracer_buffering_scheme); + BT_LOGI("Unknown buffering scheme: tracer_buffering_scheme=\"%s\"", tracer_buffering_scheme); goto error; } } else if (!g_str_equal(domain, "kernel")) { /* Unknown domain. */ - BT_LOGD("Unknown domain: domain=\"%s\"", domain); + BT_LOGI("Unknown domain: domain=\"%s\"", domain); goto error; } diff --git a/src/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c index 5b0086af..6abf64c3 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -287,11 +287,11 @@ struct ctf_fs_ds_index *build_index_from_idx_file( struct ctf_stream_class *sc; struct bt_msg_iter_packet_properties props; - BT_LOGD("Building index from .idx file of stream file %s", + BT_LOGI("Building index from .idx file of stream file %s", ds_file->file->path->str); ret = bt_msg_iter_get_packet_properties(ds_file->msg_iter, &props); if (ret) { - BT_LOGD_STR("Cannot read first packet's header and context fields."); + BT_LOGI_STR("Cannot read first packet's header and context fields."); goto error; } @@ -299,7 +299,7 @@ struct ctf_fs_ds_index *build_index_from_idx_file( props.stream_class_id); BT_ASSERT(sc); if (!sc->default_clock_class) { - BT_LOGD_STR("Cannot find stream class's default clock class."); + BT_LOGI_STR("Cannot find stream class's default clock class."); goto error; } @@ -413,14 +413,14 @@ struct ctf_fs_ds_index *build_index_from_idx_file( index_entry->timestamp_begin, &index_entry->timestamp_begin_ns); if (ret) { - BT_LOGD_STR("Failed to convert raw timestamp to nanoseconds since Epoch during index parsing"); + BT_LOGI_STR("Failed to convert raw timestamp to nanoseconds since Epoch during index parsing"); goto error; } ret = convert_cycles_to_ns(sc->default_clock_class, index_entry->timestamp_end, &index_entry->timestamp_end_ns); if (ret) { - BT_LOGD_STR("Failed to convert raw timestamp to nanoseconds since Epoch during LTTng trace index parsing"); + BT_LOGI_STR("Failed to convert raw timestamp to nanoseconds since Epoch during LTTng trace index parsing"); goto error; } @@ -478,7 +478,7 @@ int init_index_entry(struct ctf_fs_ds_index_entry *entry, props->snapshots.beginning_clock, &entry->timestamp_begin_ns); if (ret) { - BT_LOGD_STR("Failed to convert raw timestamp to nanoseconds since Epoch."); + BT_LOGI_STR("Failed to convert raw timestamp to nanoseconds since Epoch."); goto end; } } else { @@ -490,7 +490,7 @@ int init_index_entry(struct ctf_fs_ds_index_entry *entry, props->snapshots.end_clock, &entry->timestamp_end_ns); if (ret) { - BT_LOGD_STR("Failed to convert raw timestamp to nanoseconds since Epoch."); + BT_LOGI_STR("Failed to convert raw timestamp to nanoseconds since Epoch."); goto end; } } else { @@ -510,7 +510,7 @@ struct ctf_fs_ds_index *build_index_from_stream_file( enum bt_msg_iter_status iter_status = BT_MSG_ITER_STATUS_OK; off_t current_packet_offset_bytes = 0; - BT_LOGD("Indexing stream file %s", ds_file->file->path->str); + BT_LOGI("Indexing stream file %s", ds_file->file->path->str); index = ctf_fs_ds_index_create(); if (!index) { @@ -660,7 +660,7 @@ struct ctf_fs_ds_index *ctf_fs_ds_file_build_index( goto end; } - BT_LOGD("Failed to build index from .index file; " + BT_LOGI("Failed to build index from .index file; " "falling back to stream indexing."); index = build_index_from_stream_file(ds_file); end: diff --git a/src/plugins/ctf/fs-src/file.c b/src/plugins/ctf/fs-src/file.c index 585faef8..7aa15b27 100644 --- a/src/plugins/ctf/fs-src/file.c +++ b/src/plugins/ctf/fs-src/file.c @@ -85,7 +85,7 @@ int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode) int ret = 0; struct stat stat; - BT_LOGD("Opening file \"%s\" with mode \"%s\"", file->path->str, mode); + BT_LOGI("Opening file \"%s\" with mode \"%s\"", file->path->str, mode); file->fp = fopen(file->path->str, mode); if (!file->fp) { BT_LOGE("Cannot open file \"%s\" with mode \"%s\": %s", @@ -93,7 +93,7 @@ int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode) goto error; } - BT_LOGD("Opened file: %p", file->fp); + BT_LOGI("Opened file: %p", file->fp); if (fstat(fileno(file->fp), &stat)) { BT_LOGE("Cannot get file information: %s", strerror(errno)); @@ -101,7 +101,7 @@ int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode) } file->size = stat.st_size; - BT_LOGD("File is %jd bytes", (intmax_t) file->size); + BT_LOGI("File is %jd bytes", (intmax_t) file->size); goto end; error: diff --git a/src/plugins/ctf/fs-src/fs.c b/src/plugins/ctf/fs-src/fs.c index 0361018b..594c3551 100644 --- a/src/plugins/ctf/fs-src/fs.c +++ b/src/plugins/ctf/fs-src/fs.c @@ -456,7 +456,7 @@ int create_one_port_for_trace(struct ctf_fs_component *ctf_fs, goto error; } - BT_LOGD("Creating one port named `%s`", port_name); + BT_LOGI("Creating one port named `%s`", port_name); /* Create output port for this file */ port_data = g_new0(struct ctf_fs_port_data, 1); @@ -880,13 +880,13 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace) if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) { /* Ignore the metadata stream. */ - BT_LOGD("Ignoring metadata file `%s" G_DIR_SEPARATOR_S "%s`", + BT_LOGI("Ignoring metadata file `%s" G_DIR_SEPARATOR_S "%s`", ctf_fs_trace->path->str, basename); continue; } if (basename[0] == '.') { - BT_LOGD("Ignoring hidden file `%s" G_DIR_SEPARATOR_S "%s`", + BT_LOGI("Ignoring hidden file `%s" G_DIR_SEPARATOR_S "%s`", ctf_fs_trace->path->str, basename); continue; } @@ -903,7 +903,7 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace) g_string_append_printf(file->path, "%s" G_DIR_SEPARATOR_S "%s", ctf_fs_trace->path->str, basename); if (!g_file_test(file->path->str, G_FILE_TEST_IS_REGULAR)) { - BT_LOGD("Ignoring non-regular file `%s`", + BT_LOGI("Ignoring non-regular file `%s`", file->path->str); ctf_fs_file_destroy(file); file = NULL; @@ -918,7 +918,7 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace) if (file->size == 0) { /* Skip empty stream. */ - BT_LOGD("Ignoring empty file `%s`", file->path->str); + BT_LOGI("Ignoring empty file `%s`", file->path->str); ctf_fs_file_destroy(file); continue; } @@ -1159,7 +1159,7 @@ int ctf_fs_find_traces(GList **trace_paths, const char *start_path) dir = g_dir_open(start_path, 0, &error); if (!dir) { if (error->code == G_FILE_ERROR_ACCES) { - BT_LOGD("Cannot open directory `%s`: %s (code %d): continuing", + BT_LOGI("Cannot open directory `%s`: %s (code %d): continuing", start_path, error->message, error->code); goto end; } diff --git a/src/plugins/ctf/lttng-live/data-stream.c b/src/plugins/ctf/lttng-live/data-stream.c index 25a8e4cf..8ea914db 100644 --- a/src/plugins/ctf/lttng-live/data-stream.c +++ b/src/plugins/ctf/lttng-live/data-stream.c @@ -82,7 +82,7 @@ bt_stream *medop_borrow_stream(bt_stream_class *stream_class, if (!lttng_live_stream->stream) { uint64_t stream_class_id = bt_stream_class_get_id(stream_class); - BT_LOGD("Creating stream %s (ID: %" PRIu64 ") out of stream " + BT_LOGI("Creating stream %s (ID: %" PRIu64 ") out of stream " "class %" PRId64, lttng_live_stream->name->str, stream_id, stream_class_id); diff --git a/src/plugins/ctf/lttng-live/lttng-live.c b/src/plugins/ctf/lttng-live/lttng-live.c index b7df57b9..589472dc 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.c +++ b/src/plugins/ctf/lttng-live/lttng-live.c @@ -619,7 +619,7 @@ int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter, BT_ASSERT(msg); BT_ASSERT(ts_ns); - BT_LOGV("Getting message's timestamp: iter-data-addr=%p, msg-addr=%p, " + BT_LOGD("Getting message's timestamp: iter-data-addr=%p, msg-addr=%p, " "last-msg-ts=%" PRId64, lttng_live_msg_iter, msg, last_msg_ts_ns); @@ -702,7 +702,7 @@ int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter, break; default: /* All the other messages have a higher priority */ - BT_LOGV_STR("Message has no timestamp: using the last message timestamp."); + BT_LOGD_STR("Message has no timestamp: using the last message timestamp."); *ts_ns = last_msg_ts_ns; goto end; } @@ -720,7 +720,7 @@ int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter, goto end; no_clock_snapshot: - BT_LOGV_STR("Message's default clock snapshot is missing: " + BT_LOGD_STR("Message's default clock snapshot is missing: " "using the last message timestamp."); *ts_ns = last_msg_ts_ns; goto end; @@ -730,7 +730,7 @@ error: end: if (ret == 0) { - BT_LOGV("Found message's timestamp: " + BT_LOGD("Found message's timestamp: " "iter-data-addr=%p, msg-addr=%p, " "last-msg-ts=%" PRId64 ", ts=%" PRId64, lttng_live_msg_iter, msg, last_msg_ts_ns, *ts_ns); diff --git a/src/plugins/ctf/lttng-live/viewer-connection.c b/src/plugins/ctf/lttng-live/viewer-connection.c index 420f732b..3d172162 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.c +++ b/src/plugins/ctf/lttng-live/viewer-connection.c @@ -142,7 +142,7 @@ int parse_url(struct live_viewer_connection *viewer_connection) lttng_live_url_parts.session_name = NULL; } - BT_LOGD("Connecting to hostname : %s, port : %d, " + BT_LOGI("Connecting to hostname : %s, port : %d, " "target hostname : %s, session name : %s, " "proto : %s", viewer_connection->relay_hostname->str, @@ -204,9 +204,9 @@ int lttng_live_handshake(struct live_viewer_connection *viewer_connection) } BT_ASSERT(ret_len == sizeof(connect)); - BT_LOGD("Received viewer session ID : %" PRIu64, + BT_LOGI("Received viewer session ID : %" PRIu64, (uint64_t) be64toh(connect.viewer_session_id)); - BT_LOGD("Relayd version : %u.%u", be32toh(connect.major), + BT_LOGI("Relayd version : %u.%u", be32toh(connect.major), be32toh(connect.minor)); if (LTTNG_LIVE_MAJOR != be32toh(connect.major)) { @@ -690,7 +690,7 @@ int lttng_live_query_session_ids(struct lttng_live_msg_iter *lttng_live_msg_iter lsession.session_name[LTTNG_VIEWER_NAME_MAX - 1] = '\0'; session_id = be64toh(lsession.id); - BT_LOGD("Adding session %" PRIu64 " hostname: %s session_name: %s", + BT_LOGI("Adding session %" PRIu64 " hostname: %s session_name: %s", session_id, lsession.hostname, lsession.session_name); if ((strncmp(lsession.session_name, @@ -770,7 +770,7 @@ int receive_streams(struct lttng_live_session *session, struct live_viewer_connection *viewer_connection = lttng_live_msg_iter->viewer_connection; - BT_LOGD("Getting %" PRIu32 " new streams:", stream_count); + BT_LOGI("Getting %" PRIu32 " new streams:", stream_count); for (i = 0; i < stream_count; i++) { struct lttng_viewer_stream stream; struct lttng_live_stream_iterator *live_stream; @@ -793,7 +793,7 @@ int receive_streams(struct lttng_live_session *session, ctf_trace_id = be64toh(stream.ctf_trace_id); if (stream.metadata_flag) { - BT_LOGD(" metadata stream %" PRIu64 " : %s/%s", + BT_LOGI(" metadata stream %" PRIu64 " : %s/%s", stream_id, stream.path_name, stream.channel_name); if (lttng_live_metadata_create_stream(session, @@ -805,7 +805,7 @@ int receive_streams(struct lttng_live_session *session, } session->lazy_stream_msg_init = true; } else { - BT_LOGD(" stream %" PRIu64 " : %s/%s", + BT_LOGI(" stream %" PRIu64 " : %s/%s", stream_id, stream.path_name, stream.channel_name); live_stream = lttng_live_stream_iterator_create(session, @@ -1488,11 +1488,11 @@ struct live_viewer_connection *live_viewer_connection_create( goto error; } - BT_LOGD("Establishing connection to url \"%s\"...", url); + BT_LOGI("Establishing connection to url \"%s\"...", url); if (lttng_live_connect_viewer(viewer_connection)) { goto error_report; } - BT_LOGD("Connection to url \"%s\" is established", url); + BT_LOGI("Connection to url \"%s\" is established", url); return viewer_connection; error_report: @@ -1506,7 +1506,7 @@ BT_HIDDEN void live_viewer_connection_destroy( struct live_viewer_connection *viewer_connection) { - BT_LOGD("Closing connection to url \"%s\"", viewer_connection->url->str); + BT_LOGI("Closing connection to url \"%s\"", viewer_connection->url->str); lttng_live_disconnect_viewer(viewer_connection); g_string_free(viewer_connection->url, true); if (viewer_connection->relay_hostname) { diff --git a/src/plugins/lttng-utils/debug-info/bin-info.c b/src/plugins/lttng-utils/debug-info/bin-info.c index 2ecffdf8..2b3ae350 100644 --- a/src/plugins/lttng-utils/debug-info/bin-info.c +++ b/src/plugins/lttng-utils/debug-info/bin-info.c @@ -63,7 +63,7 @@ int bin_info_init(void) int ret = 0; if (elf_version(EV_CURRENT) == EV_NONE) { - BT_LOGD("ELF library initialization failed: %s.", + BT_LOGI("ELF library initialization failed: %s.", elf_errmsg(-1)); ret = -1; } @@ -163,7 +163,7 @@ int bin_info_set_elf_file(struct bin_info *bin) elf_handle = bt_fd_cache_get_handle(bin->fd_cache, bin->elf_path); if (!elf_handle) { - BT_LOGD("Failed to open %s", bin->elf_path); + BT_LOGI("Failed to open %s", bin->elf_path); goto error; } bin->elf_handle = elf_handle; @@ -378,7 +378,7 @@ int bin_info_set_build_id(struct bin_info *bin, uint8_t *build_id, */ bin->file_build_id_matches = is_build_id_matching(bin); if (!bin->file_build_id_matches) { - BT_LOGD_STR("Supplied Build ID does not match Build ID of the " + BT_LOGI_STR("Supplied Build ID does not match Build ID of the " "binary or library found on the file system."); goto error; } @@ -1115,7 +1115,7 @@ int bin_info_lookup_function_name(struct bin_info *bin, if (!bin->dwarf_info && !bin->is_elf_only) { ret = bin_info_set_dwarf_info(bin); if (ret) { - BT_LOGD_STR("Failed to set bin dwarf info, falling " + BT_LOGI_STR("Failed to set bin dwarf info, falling " "back to ELF lookup."); /* Failed to set DWARF info, fallback to ELF. */ bin->is_elf_only = true; @@ -1138,14 +1138,14 @@ int bin_info_lookup_function_name(struct bin_info *bin, ret = bin_info_lookup_elf_function_name(bin, addr, &_func_name); if (ret) { - BT_LOGD("Failed to lookup function name (ELF): " + BT_LOGI("Failed to lookup function name (ELF): " "ret=%d", ret); } } else { ret = bin_info_lookup_dwarf_function_name(bin, addr, &_func_name); if (ret) { - BT_LOGD("Failed to lookup function name (DWARF): " + BT_LOGI("Failed to lookup function name (DWARF): " "ret=%d", ret); } } diff --git a/src/plugins/lttng-utils/debug-info/debug-info.c b/src/plugins/lttng-utils/debug-info/debug-info.c index a2e0643a..1d5886b7 100644 --- a/src/plugins/lttng-utils/debug-info/debug-info.c +++ b/src/plugins/lttng-utils/debug-info/debug-info.c @@ -187,7 +187,7 @@ struct debug_info_source *debug_info_source_create_from_bin( /* Lookup source location */ ret = bin_info_lookup_source_location(bin, ip, &src_loc); if (ret) { - BT_LOGD("Failed to lookup source location: ret=%d", ret); + BT_LOGI("Failed to lookup source location: ret=%d", ret); } } @@ -195,7 +195,7 @@ struct debug_info_source *debug_info_source_create_from_bin( debug_info_src->line_no = g_strdup_printf("%"PRId64, src_loc->line_no); if (!debug_info_src->line_no) { - BT_LOGD("Error occured when setting line_no field."); + BT_LOGE("Error occured when setting line_no field."); goto error; } @@ -567,7 +567,7 @@ void debug_info_destroy(struct debug_info *debug_info) status = bt_trace_remove_destruction_listener(debug_info->input_trace, debug_info->destruction_listener_id); if (status != BT_TRACE_STATUS_OK) { - BT_LOGD("Trace destruction listener removal failed."); + BT_LOGE("Trace destruction listener removal failed."); } g_free(debug_info); @@ -1762,7 +1762,7 @@ bt_self_component_status debug_info_comp_init( struct debug_info_component *debug_info_comp; bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; - BT_LOGD("Initializing debug_info component: " + BT_LOGI("Initializing debug_info component: " "comp-addr=%p, params-addr=%p", self_comp, params); debug_info_comp = g_new0(struct debug_info_component, 1); @@ -1817,7 +1817,7 @@ void debug_info_comp_finalize(bt_self_component_filter *self_comp) bt_self_component_get_data( bt_self_component_filter_as_self_component( self_comp)); - BT_LOGD("Finalizing debug_info self_component: comp-addr=%p", + BT_LOGI("Finalizing debug_info self_component: comp-addr=%p", self_comp); destroy_debug_info_comp(debug_info); diff --git a/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c index c677770d..9d01d962 100644 --- a/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c @@ -157,7 +157,7 @@ void copy_field_content(const bt_field *in_field, bt_field *out_field) out_fc_type = bt_field_get_class_type(out_field); BT_ASSERT(in_fc_type == out_fc_type); - BT_LOGD("Copying content of field: in-f-addr=%p, out-f-addr=%p", + BT_LOGV("Copying content of field: in-f-addr=%p, out-f-addr=%p", in_field, out_field); switch (in_fc_type) { case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER: @@ -282,6 +282,6 @@ void copy_field_content(const bt_field *in_field, bt_field *out_field) default: abort(); } - BT_LOGD("Copied content of field: in-f-addr=%p, out-f-addr=%p", + BT_LOGV("Copied content of field: in-f-addr=%p, out-f-addr=%p", in_field, out_field); } diff --git a/src/plugins/utils/muxer/muxer.c b/src/plugins/utils/muxer/muxer.c index fc725272..a8dbe2a0 100644 --- a/src/plugins/utils/muxer/muxer.c +++ b/src/plugins/utils/muxer/muxer.c @@ -204,7 +204,7 @@ bt_self_component_status add_available_input_port( muxer_comp->available_input_ports++; muxer_comp->next_port_num++; - BT_LOGD("Added one input port to muxer component: " + BT_LOGI("Added one input port to muxer component: " "port-name=\"%s\", comp-addr=%p", port_name->str, self_comp); @@ -302,7 +302,7 @@ int configure_muxer_comp(struct muxer_comp *muxer_comp, bool_val = bt_value_bool_get(assume_absolute_clock_classes); muxer_comp->assume_absolute_clock_classes = (bool) bool_val; - BT_LOGD("Configured muxer component: muxer-comp-addr=%p, " + BT_LOGI("Configured muxer component: muxer-comp-addr=%p, " "assume-absolute-clock-classes=%d", muxer_comp, muxer_comp->assume_absolute_clock_classes); goto end; @@ -325,7 +325,7 @@ bt_self_component_status muxer_init( bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK; struct muxer_comp *muxer_comp = g_new0(struct muxer_comp, 1); - BT_LOGD("Initializing muxer component: " + BT_LOGI("Initializing muxer component: " "comp-addr=%p, params-addr=%p", self_comp, params); if (!muxer_comp) { @@ -363,7 +363,7 @@ bt_self_component_status muxer_init( goto error; } - BT_LOGD("Initialized muxer component: " + BT_LOGI("Initialized muxer component: " "comp-addr=%p, params-addr=%p, muxer-comp-addr=%p", self_comp, params, muxer_comp); @@ -389,7 +389,7 @@ void muxer_finalize(bt_self_component_filter *self_comp) struct muxer_comp *muxer_comp = bt_self_component_get_data( bt_self_component_filter_as_self_component(self_comp)); - BT_LOGD("Finalizing muxer component: comp-addr=%p", + BT_LOGI("Finalizing muxer component: comp-addr=%p", self_comp); destroy_muxer_comp(muxer_comp); } @@ -419,7 +419,7 @@ create_msg_iter_on_input_port(bt_self_component_port_input *self_port) goto end; } - BT_LOGD("Created upstream message iterator on input port: " + BT_LOGI("Created upstream message iterator on input port: " "port-addr=%p, port-name=\"%s\", msg-iter-addr=%p", port, bt_port_get_name(port), msg_iter); @@ -438,13 +438,13 @@ bt_self_message_iterator_status muxer_upstream_msg_iter_next( uint64_t i; uint64_t count; - BT_LOGV("Calling upstream message iterator's \"next\" method: " + BT_LOGD("Calling upstream message iterator's \"next\" method: " "muxer-upstream-msg-iter-wrap-addr=%p, msg-iter-addr=%p", muxer_upstream_msg_iter, muxer_upstream_msg_iter->msg_iter); input_port_iter_status = bt_self_component_port_input_message_iterator_next( muxer_upstream_msg_iter->msg_iter, &msgs, &count); - BT_LOGV("Upstream message iterator's \"next\" method returned: " + BT_LOGD("Upstream message iterator's \"next\" method returned: " "status=%s", bt_message_iterator_status_string(input_port_iter_status)); switch (input_port_iter_status) { @@ -453,7 +453,7 @@ bt_self_message_iterator_status muxer_upstream_msg_iter_next( * Message iterator's current message is * valid: it must be considered for muxing operations. */ - BT_LOGV_STR("Validated upstream message iterator wrapper."); + BT_LOGD_STR("Validated upstream message iterator wrapper."); BT_ASSERT(count > 0); /* Move messages to our queue */ @@ -510,7 +510,7 @@ int get_msg_ts_ns(struct muxer_comp *muxer_comp, BT_ASSERT(msg); BT_ASSERT(ts_ns); - BT_LOGV("Getting message's timestamp: " + BT_LOGD("Getting message's timestamp: " "muxer-msg-iter-addr=%p, msg-addr=%p, " "last-returned-ts=%" PRId64, muxer_msg_iter, msg, last_returned_ts_ns); @@ -614,7 +614,7 @@ int get_msg_ts_ns(struct muxer_comp *muxer_comp, break; default: /* All the other messages have a higher priority */ - BT_LOGV_STR("Message has no timestamp: using the last returned timestamp."); + BT_LOGD_STR("Message has no timestamp: using the last returned timestamp."); *ts_ns = last_returned_ts_ns; goto end; } @@ -629,7 +629,7 @@ int get_msg_ts_ns(struct muxer_comp *muxer_comp, goto end; no_clock_snapshot: - BT_LOGV_STR("Message's default clock snapshot is missing: " + BT_LOGD_STR("Message's default clock snapshot is missing: " "using the last returned timestamp."); *ts_ns = last_returned_ts_ns; goto end; @@ -639,7 +639,7 @@ error: end: if (ret == 0) { - BT_LOGV("Found message's timestamp: " + BT_LOGD("Found message's timestamp: " "muxer-msg-iter-addr=%p, msg-addr=%p, " "last-returned-ts=%" PRId64 ", ts=%" PRId64, muxer_msg_iter, msg, last_returned_ts_ns, @@ -977,13 +977,13 @@ bt_self_message_iterator_status validate_muxer_upstream_msg_iter( bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK; - BT_LOGV("Validating muxer's upstream message iterator wrapper: " + BT_LOGD("Validating muxer's upstream message iterator wrapper: " "muxer-upstream-msg-iter-wrap-addr=%p", muxer_upstream_msg_iter); if (muxer_upstream_msg_iter->msgs->length > 0 || !muxer_upstream_msg_iter->msg_iter) { - BT_LOGV("Already valid or not considered: " + BT_LOGD("Already valid or not considered: " "queue-len=%u, upstream-msg-iter-addr=%p", muxer_upstream_msg_iter->msgs->length, muxer_upstream_msg_iter->msg_iter); @@ -1006,7 +1006,7 @@ bt_self_message_iterator_status validate_muxer_upstream_msg_iters( BT_SELF_MESSAGE_ITERATOR_STATUS_OK; size_t i; - BT_LOGV("Validating muxer's upstream message iterator wrappers: " + BT_LOGD("Validating muxer's upstream message iterator wrappers: " "muxer-msg-iter-addr=%p", muxer_msg_iter); for (i = 0; i < muxer_msg_iter->active_muxer_upstream_msg_iters->len; @@ -1027,7 +1027,7 @@ bt_self_message_iterator_status validate_muxer_upstream_msg_iters( muxer_msg_iter, muxer_upstream_msg_iter); } else { - BT_LOGV("Cannot validate muxer's upstream message iterator wrapper: " + BT_LOGD("Cannot validate muxer's upstream message iterator wrapper: " "muxer-msg-iter-addr=%p, " "muxer-upstream-msg-iter-wrap-addr=%p", muxer_msg_iter, @@ -1042,7 +1042,7 @@ bt_self_message_iterator_status validate_muxer_upstream_msg_iters( * array of ended iterators if it's ended. */ if (G_UNLIKELY(is_ended)) { - BT_LOGV("Muxer's upstream message iterator wrapper: ended or canceled: " + BT_LOGD("Muxer's upstream message iterator wrapper: ended or canceled: " "muxer-msg-iter-addr=%p, " "muxer-upstream-msg-iter-wrap-addr=%p", muxer_msg_iter, muxer_upstream_msg_iter); @@ -1097,7 +1097,7 @@ bt_self_message_iterator_status muxer_msg_iter_do_next_one( "status=%s", bt_common_self_message_iterator_status_string(status)); } else { - BT_LOGV("Cannot find the youngest upstream message iterator wrapper: " + BT_LOGD("Cannot find the youngest upstream message iterator wrapper: " "status=%s", bt_common_self_message_iterator_status_string(status)); } @@ -1115,7 +1115,7 @@ bt_self_message_iterator_status muxer_msg_iter_do_next_one( goto end; } - BT_LOGV("Found youngest upstream message iterator wrapper: " + BT_LOGD("Found youngest upstream message iterator wrapper: " "muxer-msg-iter-addr=%p, " "muxer-upstream-msg-iter-wrap-addr=%p, " "ts=%" PRId64, diff --git a/src/python-plugin-provider/python-plugin-provider.c b/src/python-plugin-provider/python-plugin-provider.c index eb59f8ca..b4bbff47 100644 --- a/src/python-plugin-provider/python-plugin-provider.c +++ b/src/python-plugin-provider/python-plugin-provider.c @@ -402,14 +402,15 @@ bt_plugin_set *bt_plugin_python_create_all_from_file(const char *path) goto error; } - BT_LOGD("Creating all Python plugins from file: path=\"%s\"", path); + BT_LOGI("Trying to create all Python plugins from file: path=\"%s\"", + path); path_len = strlen(path); /* File name ends with `.py` */ if (strncmp(path + path_len - PYTHON_PLUGIN_FILE_EXT_LEN, PYTHON_PLUGIN_FILE_EXT, PYTHON_PLUGIN_FILE_EXT_LEN) != 0) { - BT_LOGD("Skipping non-Python file: path=\"%s\"", path); + BT_LOGI("Skipping non-Python file: path=\"%s\"", path); goto error; } @@ -422,7 +423,7 @@ bt_plugin_set *bt_plugin_python_create_all_from_file(const char *path) if (strncmp(basename, PYTHON_PLUGIN_FILE_PREFIX, PYTHON_PLUGIN_FILE_PREFIX_LEN) != 0) { - BT_LOGD("Skipping Python file not starting with `%s`: " + BT_LOGI("Skipping Python file not starting with `%s`: " "path=\"%s\"", PYTHON_PLUGIN_FILE_PREFIX, path); goto error; } -- 2.34.1