static const char* log_level_env_var_names[] = {
"BABELTRACE_COMMON_LOG_LEVEL",
"BABELTRACE_COMPAT_LOG_LEVEL",
- "BABELTRACE_PLUGIN_CTF_BTR_LOG_LEVEL",
- "BABELTRACE_SINK_CTF_FS_LOG_LEVEL",
- "BABELTRACE_SRC_CTF_FS_LOG_LEVEL",
- "BABELTRACE_SRC_CTF_LTTNG_LIVE_LOG_LEVEL",
- "BABELTRACE_PLUGIN_CTF_METADATA_LOG_LEVEL",
- "BABELTRACE_PLUGIN_CTF_MSG_ITER_LOG_LEVEL",
- "BABELTRACE_PLUGIN_CTFCOPYTRACE_LIB_LOG_LEVEL",
+ "BABELTRACE_CTFSER_LOG_LEVEL",
+ "BABELTRACE_FD_CACHE_LOG_LEVEL",
"BABELTRACE_FLT_LTTNG_UTILS_DEBUG_INFO_LOG_LEVEL",
- "BABELTRACE_SRC_TEXT_DMESG_LOG_LEVEL",
- "BABELTRACE_SINK_TEXT_PRETTY_LOG_LEVEL",
+ "BABELTRACE_FLT_UTILS_COUNTER_LOG_LEVEL",
"BABELTRACE_FLT_UTILS_MUXER_LOG_LEVEL",
"BABELTRACE_FLT_UTILS_TRIMMER_LOG_LEVEL",
+ "BABELTRACE_PLUGIN_CTF_BFCR_LOG_LEVEL",
+ "BABELTRACE_PLUGIN_CTF_METADATA_LOG_LEVEL",
+ "BABELTRACE_PLUGIN_CTF_MSG_ITER_LOG_LEVEL",
+ "BABELTRACE_PLUGIN_CTF_UTILS_LOG_LEVEL",
"BABELTRACE_PYTHON_BT2_LOG_LEVEL",
- "BABELTRACE_PYTHON_PLUGIN_PROVIDER_LOG_LEVEL",
+ "BABELTRACE_SINK_CTF_FS_LOG_LEVEL",
+ "BABELTRACE_SINK_TEXT_PRETTY_LOG_LEVEL",
+ "BABELTRACE_SRC_CTF_FS_LOG_LEVEL",
+ "BABELTRACE_SRC_CTF_LTTNG_LIVE_LOG_LEVEL",
+ "BABELTRACE_SRC_TEXT_DMESG_LOG_LEVEL",
NULL,
};
{
bt_bool bool_val;
int64_t int_val;
+ uint64_t uint_val;
double dbl_val;
const char *str_val;
int size;
bt_common_color_fg_cyan(), bool_val ? "yes" : "no",
bt_common_color_reset());
break;
- case BT_VALUE_TYPE_INTEGER:
- int_val = bt_value_integer_get(value);
+ case BT_VALUE_TYPE_UNSIGNED_INTEGER:
+ uint_val = bt_value_unsigned_integer_get(value);
+ fprintf(fp, "%s%s%" PRIu64 "%s\n", bt_common_color_bold(),
+ bt_common_color_fg_red(), uint_val,
+ bt_common_color_reset());
+ break;
+ case BT_VALUE_TYPE_SIGNED_INTEGER:
+ int_val = bt_value_signed_integer_get(value);
fprintf(fp, "%s%s%" PRId64 "%s\n", bt_common_color_bold(),
bt_common_color_fg_red(), int_val,
bt_common_color_reset());
uint64_t i;
if (count == 0) {
- printf(" %s%s component classes%s: (none)\n", cc_type_name,
+ printf(" %s%s component classes%s: (none)\n",
bt_common_color_bold(),
+ cc_type_name,
bt_common_color_reset());
goto end;
} else {
- printf(" %s%s component classes%s:\n", cc_type_name,
+ printf(" %s%s component classes%s:\n",
bt_common_color_bold(),
+ cc_type_name,
bt_common_color_reset());
}
BT_LOGE_STR("Unexpected empty array \"timer-us\" entry.");
goto error;
}
- timer_us = bt_value_integer_get(v);
+ timer_us = bt_value_signed_integer_get(v);
fprintf(out_stream, " (timer = %" PRIu64 ", ", timer_us);
v = bt_value_map_borrow_entry_value_const(map, "stream-count");
if (!v) {
BT_LOGE_STR("Unexpected empty array \"stream-count\" entry.");
goto error;
}
- streams = bt_value_integer_get(v);
+ streams = bt_value_signed_integer_get(v);
fprintf(out_stream, "%" PRIu64 " stream(s), ", streams);
v = bt_value_map_borrow_entry_value_const(map, "client-count");
if (!v) {
BT_LOGE_STR("Unexpected empty array \"client-count\" entry.");
goto error;
}
- clients = bt_value_integer_get(v);
+ clients = bt_value_signed_integer_get(v);
fprintf(out_stream, "%" PRIu64 " client(s) connected)\n", clients);
}
}
}
- return 0;
+ return ret;
}
static
}
}
- return 0;
+ return ret;
}
struct port_id {
}
downstream_port_count = port_count_fn(downstream_comp);
- BT_ASSERT(downstream_port_count >= 0);
for (i = 0; i < downstream_port_count; i++) {
const bt_port_input *in_downstream_port =
int ret = 0;
uint64_t trace_idx;
int64_t trace_count;
- bt_value_status value_status;
const char *path = NULL;
- const bt_value *component_path_value = NULL;
- bt_value *query_params = NULL;
const bt_value *query_result = NULL;
const bt_value *trace_info = NULL;
const bt_value *intersection_range = NULL;
const bt_component_class *comp_cls =
bt_component_class_source_as_component_class_const(src_comp_cls);
- component_path_value = bt_value_map_borrow_entry_value(cfg_comp->params,
- "path");
- if (component_path_value && !bt_value_is_string(component_path_value)) {
- BT_LOGD("Cannot get path parameter: component-name=%s",
- cfg_comp->instance_name->str);
- ret = -1;
- goto error;
- }
-
- path = bt_value_string_get(component_path_value);
- query_params = bt_value_map_create();
- if (!query_params) {
- BT_LOGE_STR("Cannot create query parameters.");
- ret = -1;
- goto error;
- }
-
- value_status = bt_value_map_insert_string_entry(query_params, "path",
- path);
- if (value_status != BT_VALUE_STATUS_OK) {
- BT_LOGE_STR("Cannot insert path parameter in query parameter map.");
- ret = -1;
- goto error;
- }
-
ret = query(comp_cls, "trace-info",
- query_params, &query_result,
+ cfg_comp->params, &query_result,
&fail_reason);
if (ret) {
BT_LOGD("Component class does not support the `trace-info` query: %s: "
goto error;
}
- begin = bt_value_integer_get(intersection_begin);
- end = bt_value_integer_get(intersection_end);
+ begin = bt_value_signed_integer_get(intersection_begin);
+ end = bt_value_signed_integer_get(intersection_end);
if (begin < 0 || end < 0 || end < begin) {
BT_LOGW("Invalid trace stream intersection values: "
path ? path : "(unknown)",
bt_common_color_reset());
end:
- bt_value_put_ref(query_params);
bt_value_put_ref(query_result);
g_free(port_id);
g_free(trace_range);
uint64_t i;
count = port_count_fn(comp);
- BT_ASSERT(count >= 0);
for (i = 0; i < count; i++) {
const bt_port_output *upstream_port = port_by_index_fn(comp, i);