While <<choose-a-log-level,care must be taken>> when placing _DEBUG_ to
_FATAL_ logging statements, you should liberally instrument your
-Babeltrace module with _VERBOSE_ logging statements to help future you
+Babeltrace module with _TRACE_ logging statements to help future you
and other developers understand what's happening at run time.
|Internal API enumerator
|Public API enumerator
-|_VERBOSE_
-|`V`
-|`BT_LOG_VERBOSE`
-|`BT_LOGGING_LEVEL_VERBOSE`
+|_TRACE_
+|`T`
+|`BT_LOG_TRACE`
+|`BT_LOGGING_LEVEL_TRACE`
|_DEBUG_
|`D`
(generic)>> and <<logging-instrument-h-file-gen,Instrument a C header
file (generic)>> to learn how to be able to use the following macros.
-`+BT_LOGV("format string", ...)+`::
- Generic verbose logging statement.
+`+BT_LOGT("format string", ...)+`::
+ Generic trace logging statement.
`+BT_LOGD("format string", ...)+`::
Generic debug logging statement.
`+BT_LOGF("format string", ...)+`::
Generic fatal logging statement.
-`+BT_LOGV_STR("preformatted string")+`::
- Generic preformatted string verbose logging statement.
+`+BT_LOGT_STR("preformatted string")+`::
+ Generic preformatted string trace logging statement.
`+BT_LOGD_STR("preformatted string")+`::
Generic preformatted string debug logging statement.
`+BT_LOGF_STR("preformatted string")+`::
Generic preformatted string fatal logging statement.
-`+BT_LOGV_MEM(data_ptr, data_size, "format string", ...)+`::
- Generic memory verbose logging statement.
+`+BT_LOGT_MEM(data_ptr, data_size, "format string", ...)+`::
+ Generic memory trace logging statement.
`+BT_LOGD_MEM(data_ptr, data_size, "format string", ...)+`::
Generic memory debug logging statement.
`+BT_LOGF_MEM(data_ptr, data_size, "format string", ...)+`::
Generic memory fatal logging statement.
-`+BT_LOGV_ERRNO("initial message", "format string", ...)+`::
- Generic `errno` string verbose logging statement.
+`+BT_LOGT_ERRNO("initial message", "format string", ...)+`::
+ Generic `errno` string trace logging statement.
`+BT_LOGD_ERRNO("initial message", "format string", ...)+`::
Generic `errno` string debug logging statement.
The library logging statement macros are named `+BT_LIB_LOG*()+` instead
of `+BT_LOG*()+`:
-`+BT_LIB_LOGV("format string", ...)+`::
- Library verbose logging statement.
+`+BT_LIB_LOGT("format string", ...)+`::
+ Library trace logging statement.
`+BT_LIB_LOGD("format string", ...)+`::
Library debug logging statement.
The component logging statement macros are named `+BT_COMP_LOG*()+`
instead of `+BT_LOG*()+`:
-`+BT_COMP_LOGV("format string", ...)+`::
- Component verbose logging statement.
+`+BT_COMP_LOGT("format string", ...)+`::
+ Component trace logging statement.
`+BT_COMP_LOGD("format string", ...)+`::
Component debug logging statement.
`+BT_COMP_LOGF("format string", ...)+`::
Component fatal logging statement.
-`+BT_COMP_LOGV_STR("preformatted string")+`::
- Component preformatted string verbose logging statement.
+`+BT_COMP_LOGT_STR("preformatted string")+`::
+ Component preformatted string trace logging statement.
`+BT_COMP_LOGD_STR("preformatted string")+`::
Component preformatted string debug logging statement.
`+BT_COMP_LOGF_STR("preformatted string")+`::
Component preformatted string fatal logging statement.
-`+BT_COMP_LOGV_ERRNO("initial message", "format string", ...)+`::
- Component `errno` string verbose logging statement.
+`+BT_COMP_LOGT_ERRNO("initial message", "format string", ...)+`::
+ Component `errno` string trace logging statement.
`+BT_COMP_LOGD_ERRNO("initial message", "format string", ...)+`::
Component `errno` string debug logging statement.
`+BT_COMP_LOGF_ERRNO("initial message", "format string", ...)+`::
Component `errno` string fatal logging statement.
-`+BT_COMP_LOGV_MEM(data_ptr, data_size, "format string", ...)+`::
- Component memory verbose logging statement.
+`+BT_COMP_LOGT_MEM(data_ptr, data_size, "format string", ...)+`::
+ Component memory trace logging statement.
`+BT_COMP_LOGD_MEM(data_ptr, data_size, "format string", ...)+`::
Component memory debug logging statement.
The available definitions for build-time conditions are:
-* `BT_LOG_ENABLED_VERBOSE`
+* `BT_LOG_ENABLED_TRACE`
* `BT_LOG_ENABLED_DEBUG`
* `BT_LOG_ENABLED_INFO`
* `BT_LOG_ENABLED_WARN`
The available definitions for run-time conditions are:
-* `BT_LOG_ON_VERBOSE`
+* `BT_LOG_ON_TRACE`
* `BT_LOG_ON_DEBUG`
* `BT_LOG_ON_INFO`
* `BT_LOG_ON_WARN`
{
/* ... */
-#ifdef BT_LOGV
- BT_LOGV(...);
+#ifdef BT_LOGT
+ BT_LOGT(...);
#endif
/* ... */
* Calling user methods and logging the result.
* Setting object properties (except fields and values).
|
-Noticeable, but not as much as the _VERBOSE_ level: could be executed
+Noticeable, but not as much as the _TRACE_ level: could be executed
in production if you're going to need a thorough log for support
tickets without having to rebuild the project.
-|_VERBOSE_
+|_TRACE_
|
Low-level debugging context information (anything that does not fit the
other log levels). More appropriate for tracing in general.
property from an object by name or key that fails to find the value is
not a warning scenario: the user could legitimately use this function to
check if the name/key exists in the object. In this case, use the
-_VERBOSE_ level (or do not log at all).
+_TRACE_ level (or do not log at all).
--
AS_IF([test "x$PLUGINSDIR" = x], [PLUGINSDIR='$(libdir)/babeltrace2/plugins'])
# BABELTRACE_MINIMAL_LOG_LEVEL:
-AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (VERBOSE, DEBUG (default), INFO, WARN, ERROR, FATAL, or NONE)])
+AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (TRACE, DEBUG (default), INFO, WARN, ERROR, FATAL, or NONE)])
AS_IF([test "x$BABELTRACE_MINIMAL_LOG_LEVEL" = x], [BABELTRACE_MINIMAL_LOG_LEVEL="DEBUG"])
-AS_IF([test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "VERBOSE" && \
+AS_IF([test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "TRACE" && \
test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "DEBUG" && \
test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "INFO" && \
test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "WARN" && \
test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "ERROR" && \
test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "FATAL" && \
test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "NONE"],
- [AC_MSG_ERROR([Invalid BABELTRACE_MINIMAL_LOG_LEVEL value ($BABELTRACE_MINIMAL_LOG_LEVEL): use VERBOSE, DEBUG, INFO, WARN, ERROR, FATAL, or NONE.])]
+ [AC_MSG_ERROR([Invalid BABELTRACE_MINIMAL_LOG_LEVEL value ($BABELTRACE_MINIMAL_LOG_LEVEL): use TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or NONE.])]
)
AC_DEFINE_UNQUOTED([BT_LOG_LEVEL], [BT_LOG_$BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level])
opt:-d, opt:--debug::
Turn the debugging mode on.
+
-This is equivalent to opt:--log-level=`VERBOSE`.
+This is equivalent to opt:--log-level=`TRACE`.
opt:-l 'LVL', opt:--log-level='LVL'::
Set the log level of all known Babeltrace loggers to 'LVL'. You
`DEBUG`::
`D`::
Debugging information, with a higher level of details than the
- `VERBOSE` level. This level should :not: be enabled in production.
+ `TRACE` level. This level should :not: be enabled in production.
-`VERBOSE`::
-`V`::
+`TRACE`::
+`T`::
Low-level debugging context information. This level should :not: be
enabled in production.
--
*/
typedef enum bt_logging_level {
/// Additional, low-level debugging context information.
- BT_LOGGING_LEVEL_VERBOSE = 1,
+ BT_LOGGING_LEVEL_TRACE = 1,
/**
Debugging information, only useful when searching for the
class LoggingLevel:
- VERBOSE = native_bt.LOGGING_LEVEL_VERBOSE
+ TRACE = native_bt.LOGGING_LEVEL_TRACE
DEBUG = native_bt.LOGGING_LEVEL_DEBUG
INFO = native_bt.LOGGING_LEVEL_INFO
WARN = native_bt.LOGGING_LEVEL_WARN
def set_global_logging_level(level):
levels = (
- LoggingLevel.VERBOSE,
+ LoggingLevel.TRACE,
LoggingLevel.DEBUG,
LoggingLevel.INFO,
LoggingLevel.WARN,
/* Log levels */
enum bt_logging_level {
- BT_LOGGING_LEVEL_VERBOSE = 1,
+ BT_LOGGING_LEVEL_TRACE = 1,
BT_LOGGING_LEVEL_DEBUG = 2,
BT_LOGGING_LEVEL_INFO = 3,
BT_LOGGING_LEVEL_WARN = 4,
_check_int(log_level)
log_levels = (
- bt2.logging.LoggingLevel.VERBOSE,
+ bt2.logging.LoggingLevel.TRACE,
bt2.logging.LoggingLevel.DEBUG,
bt2.logging.LoggingLevel.INFO,
bt2.logging.LoggingLevel.WARN,
stream_intersection_mode = true;
break;
case OPT_VERBOSE:
- if (*default_log_level != BT_LOG_VERBOSE &&
+ if (*default_log_level != BT_LOG_TRACE &&
*default_log_level != BT_LOG_DEBUG) {
*default_log_level = BT_LOG_INFO;
}
break;
case OPT_DEBUG:
- *default_log_level = BT_LOG_VERBOSE;
+ *default_log_level = BT_LOG_TRACE;
break;
default:
break;
if (strcmp(cur_arg, "-d") == 0 ||
strcmp(cur_arg, "--debug") == 0) {
- default_log_level = BT_LOG_VERBOSE;
+ default_log_level = BT_LOG_TRACE;
} else if (strcmp(cur_arg, "-v") == 0 ||
strcmp(cur_arg, "--verbose") == 0) {
- if (default_log_level != BT_LOG_VERBOSE &&
+ if (default_log_level != BT_LOG_TRACE &&
default_log_level != BT_LOG_DEBUG) {
/*
* Legacy: do not override a previous
* --debug because --verbose and --debug
* can be specified together (in this
* case we want the lowest log level to
- * apply, VERBOSE).
+ * apply, TRACE).
*/
default_log_level = BT_LOG_INFO;
}
}
if (config) {
- BT_ASSERT(default_log_level >= BT_LOG_VERBOSE);
+ BT_ASSERT(default_log_level >= BT_LOG_TRACE);
config->log_level = default_log_level;
config->command_name = command_name;
}
goto error;
}
- BT_ASSERT(cfg_comp->log_level >= BT_LOG_VERBOSE);
+ BT_ASSERT(cfg_comp->log_level >= BT_LOG_TRACE);
switch (cfg_comp->type) {
case BT_COMPONENT_CLASS_TYPE_SOURCE:
printf("%s", bt_common_color_reset());
fflush(stdout);
fprintf(stderr, "%s", bt_common_color_reset());
- BT_LOGV("bt_graph_run() returned: status=%s",
+ BT_LOGT("bt_graph_run() returned: status=%s",
bt_graph_status_str(graph_status));
switch (graph_status) {
}
if (cfg->cmd_data.run.retry_duration_us > 0) {
- BT_LOGV("Got BT_GRAPH_STATUS_AGAIN: sleeping: "
+ BT_LOGT("Got BT_GRAPH_STATUS_AGAIN: sleeping: "
"time-us=%" PRIu64,
cfg->cmd_data.run.retry_duration_us);
*/
if (getenv("BABELTRACE_DEBUG") &&
strcmp(getenv("BABELTRACE_DEBUG"), "1") == 0) {
- cfg->log_level = BT_LOG_VERBOSE;
+ cfg->log_level = BT_LOG_TRACE;
} else if (getenv("BABELTRACE_VERBOSE") &&
strcmp(getenv("BABELTRACE_VERBOSE"), "1") == 0) {
cfg->log_level = BT_LOG_INFO;
* --verbose. So:
*
* --verbose: INFO log level
- * --debug: VERBOSE log level (includes DEBUG, which is
- * is less verbose than VERBOSE in the internal
+ * --debug: TRACE log level (includes DEBUG, which is
+ * is less verbose than TRACE in the internal
* logging framework)
*/
if (!getenv("LIBBABELTRACE2_INIT_LOG_LEVEL")) {
if (cfg->verbose) {
bt_logging_set_global_level(BT_LOG_INFO);
} else if (cfg->debug) {
- bt_logging_set_global_level(BT_LOG_VERBOSE);
+ bt_logging_set_global_level(BT_LOG_TRACE);
} else {
/*
* Set library's default log level if not
if (cfg->verbose) {
bt_cli_log_level = BT_LOG_INFO;
} else if (cfg->debug) {
- bt_cli_log_level = BT_LOG_VERBOSE;
+ bt_cli_log_level = BT_LOG_TRACE;
} else {
/*
* Set CLI's default log level if not explicitly
while (*env_var_name) {
if (!getenv(*env_var_name)) {
if (cfg->verbose) {
- g_setenv(*env_var_name, "I", 1);
+ g_setenv(*env_var_name, "INFO", 1);
} else if (cfg->debug) {
- g_setenv(*env_var_name, "V", 1);
+ g_setenv(*env_var_name, "TRACE", 1);
} else {
char val[2] = { 0 };
enum bt_logging_level level)
{
switch (level) {
- case BT_LOGGING_LEVEL_VERBOSE:
- return "BT_LOGGING_LEVEL_VERBOSE";
+ case BT_LOGGING_LEVEL_TRACE:
+ return "BT_LOGGING_LEVEL_TRACE";
case BT_LOGGING_LEVEL_DEBUG:
return "BT_LOGGING_LEVEL_DEBUG";
case BT_LOGGING_LEVEL_INFO:
}
}
- BT_LOGV("Set clock class's name: addr=%p, name=\"%s\"",
+ BT_LOGT("Set clock class's name: addr=%p, name=\"%s\"",
clock_class, name);
end:
clock_class->description = g_string_new(desc);
ret = clock_class->description ? 0 : -1;
- BT_LOGV("Set clock class's description: addr=%p, "
+ BT_LOGT("Set clock class's description: addr=%p, "
"name=\"%s\", desc=\"%s\"",
clock_class, bt_ctf_clock_class_get_name(clock_class), desc);
end:
}
clock_class->frequency = freq;
- BT_LOGV("Set clock class's frequency: addr=%p, name=\"%s\", freq=%" PRIu64,
+ BT_LOGT("Set clock class's frequency: addr=%p, name=\"%s\", freq=%" PRIu64,
clock_class, bt_ctf_clock_class_get_name(clock_class), freq);
end:
return ret;
}
clock_class->precision = precision;
- BT_LOGV("Set clock class's precision: addr=%p, name=\"%s\", precision=%" PRIu64,
+ BT_LOGT("Set clock class's precision: addr=%p, name=\"%s\", precision=%" PRIu64,
clock_class, bt_ctf_clock_class_get_name(clock_class),
precision);
end:
}
clock_class->offset_s = offset_s;
- BT_LOGV("Set clock class's offset (seconds): "
+ BT_LOGT("Set clock class's offset (seconds): "
"addr=%p, name=\"%s\", offset-s=%" PRId64,
clock_class, bt_ctf_clock_class_get_name(clock_class),
offset_s);
}
clock_class->offset = offset;
- BT_LOGV("Set clock class's offset (cycles): addr=%p, name=\"%s\", offset-cycles=%" PRId64,
+ BT_LOGT("Set clock class's offset (cycles): addr=%p, name=\"%s\", offset-cycles=%" PRId64,
clock_class, bt_ctf_clock_class_get_name(clock_class), offset);
end:
return ret;
}
clock_class->absolute = !!is_absolute;
- BT_LOGV("Set clock class's absolute flag: addr=%p, name=\"%s\", is-absolute=%d",
+ BT_LOGT("Set clock class's absolute flag: addr=%p, name=\"%s\", is-absolute=%d",
clock_class, bt_ctf_clock_class_get_name(clock_class),
is_absolute);
end:
}
if (!clock_class->uuid_set) {
- BT_LOGV("Clock class's UUID is not set: addr=%p, name=\"%s\"",
+ BT_LOGT("Clock class's UUID is not set: addr=%p, name=\"%s\"",
clock_class, bt_ctf_clock_class_get_name(clock_class));
ret = NULL;
goto end;
memcpy(clock_class->uuid, uuid, BABELTRACE_UUID_LEN);
clock_class->uuid_set = 1;
- BT_LOGV("Set clock class's UUID: addr=%p, name=\"%s\", "
+ BT_LOGT("Set clock class's UUID: addr=%p, name=\"%s\", "
"uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\"",
clock_class, bt_ctf_clock_class_get_name(clock_class),
(unsigned int) uuid[0],
/* Name */
if (strcmp(clock_class_a->name->str, clock_class_b->name->str) != 0) {
- BT_LOGV("Clock classes differ: different names: "
+ BT_LOGT("Clock classes differ: different names: "
"cc-a-name=\"%s\", cc-b-name=\"%s\"",
clock_class_a->name->str,
clock_class_b->name->str);
/* Description */
if (clock_class_a->description) {
if (!clock_class_b->description) {
- BT_LOGV_STR("Clock classes differ: clock class A has a "
+ BT_LOGT_STR("Clock classes differ: clock class A has a "
"description, but clock class B does not.");
goto end;
}
if (strcmp(clock_class_a->name->str, clock_class_b->name->str)
!= 0) {
- BT_LOGV("Clock classes differ: different descriptions: "
+ BT_LOGT("Clock classes differ: different descriptions: "
"cc-a-descr=\"%s\", cc-b-descr=\"%s\"",
clock_class_a->description->str,
clock_class_b->description->str);
}
} else {
if (clock_class_b->description) {
- BT_LOGV_STR("Clock classes differ: clock class A has "
+ BT_LOGT_STR("Clock classes differ: clock class A has "
"no description, but clock class B has one.");
goto end;
}
/* Frequency */
if (clock_class_a->frequency != clock_class_b->frequency) {
- BT_LOGV("Clock classes differ: different frequencies: "
+ BT_LOGT("Clock classes differ: different frequencies: "
"cc-a-freq=%" PRIu64 ", cc-b-freq=%" PRIu64,
clock_class_a->frequency,
clock_class_b->frequency);
/* Precision */
if (clock_class_a->precision != clock_class_b->precision) {
- BT_LOGV("Clock classes differ: different precisions: "
+ BT_LOGT("Clock classes differ: different precisions: "
"cc-a-freq=%" PRIu64 ", cc-b-freq=%" PRIu64,
clock_class_a->precision,
clock_class_b->precision);
/* Offset (seconds) */
if (clock_class_a->offset_s != clock_class_b->offset_s) {
- BT_LOGV("Clock classes differ: different offsets (seconds): "
+ BT_LOGT("Clock classes differ: different offsets (seconds): "
"cc-a-offset-s=%" PRId64 ", cc-b-offset-s=%" PRId64,
clock_class_a->offset_s,
clock_class_b->offset_s);
/* Offset (cycles) */
if (clock_class_a->offset != clock_class_b->offset) {
- BT_LOGV("Clock classes differ: different offsets (cycles): "
+ BT_LOGT("Clock classes differ: different offsets (cycles): "
"cc-a-offset-s=%" PRId64 ", cc-b-offset-s=%" PRId64,
clock_class_a->offset,
clock_class_b->offset);
/* UUIDs */
if (clock_class_a->uuid_set) {
if (!clock_class_b->uuid_set) {
- BT_LOGV_STR("Clock classes differ: clock class A has a "
+ BT_LOGT_STR("Clock classes differ: clock class A has a "
"UUID, but clock class B does not.");
goto end;
}
if (memcmp(clock_class_a->uuid, clock_class_b->uuid,
BABELTRACE_UUID_LEN) != 0) {
- BT_LOGV("Clock classes differ: different UUIDs: "
+ BT_LOGT("Clock classes differ: different UUIDs: "
"cc-a-uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\", "
"cc-b-uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\"",
(unsigned int) clock_class_a->uuid[0],
}
} else {
if (clock_class_b->uuid_set) {
- BT_LOGV_STR("Clock classes differ: clock class A has "
+ BT_LOGT_STR("Clock classes differ: clock class A has "
"no UUID, but clock class B has one.");
goto end;
}
/* Absolute */
if (!!clock_class_a->absolute != !!clock_class_b->absolute) {
- BT_LOGV("Clock classes differ: one is absolute, the other "
+ BT_LOGT("Clock classes differ: one is absolute, the other "
"is not: cc-a-is-absolute=%d, cc-b-is-absolute=%d",
!!clock_class_a->absolute,
!!clock_class_b->absolute);
ret = bt_ctf_field_type_structure_add_field(
(void *) event_class->common.payload_field_type,
(void *) type, name);
- BT_LOGV("Added field to event class's payload field type: "
+ BT_LOGT("Added field to event class's payload field type: "
"event-class-addr=%p, event-class-name=\"%s\", "
"event-class-id=%" PRId64 ", field-name=\"%s\", ft-addr=%p",
event_class, bt_ctf_event_class_get_name(event_class),
}
if (!event_class->common.payload_field_type) {
- BT_LOGV("Event class has no payload field type: "
+ BT_LOGT("Event class has no payload field type: "
"addr=%p, name=\"%s\", id=%" PRId64,
event_class, bt_ctf_event_class_get_name(event_class),
bt_ctf_event_class_get_id(event_class));
}
if (!event_class->common.payload_field_type) {
- BT_LOGV("Event class has no payload field type: "
+ BT_LOGT("Event class has no payload field type: "
"addr=%p, name=\"%s\", id=%" PRId64 ", index=%" PRIu64,
event_class, bt_ctf_event_class_get_name(event_class),
bt_ctf_event_class_get_id(event_class), index);
}
if (!event_class->common.payload_field_type) {
- BT_LOGV("Event class has no payload field type: "
+ BT_LOGT("Event class has no payload field type: "
"addr=%p, name=\"%s\", id=%" PRId64,
event_class, bt_ctf_event_class_get_name(event_class),
bt_ctf_event_class_get_id(event_class));
}
if (!event_class->common.payload_field_type) {
- BT_LOGV("Event class has no payload field type: "
+ BT_LOGT("Event class has no payload field type: "
"addr=%p, name=\"%s\", id=%" PRId64,
event_class,
bt_ctf_event_class_get_name(event_class),
}
event_class->id = id;
- BT_LOGV("Set event class's ID: "
+ BT_LOGT("Set event class's ID: "
"addr=%p, name=\"%s\", id=%" PRId64,
event_class, bt_ctf_event_class_common_get_name(event_class), id);
}
event_class->log_level = log_level;
- BT_LOGV("Set event class's log level: "
+ BT_LOGT("Set event class's log level: "
"addr=%p, name=\"%s\", id=%" PRId64 ", log-level=%s",
event_class, bt_ctf_event_class_common_get_name(event_class),
bt_ctf_event_class_common_get_id(event_class),
if (emf_uri) {
g_string_assign(event_class->emf_uri, emf_uri);
- BT_LOGV("Set event class's EMF URI: "
+ BT_LOGT("Set event class's EMF URI: "
"addr=%p, name=\"%s\", id=%" PRId64 ", emf-uri=\"%s\"",
event_class, bt_ctf_event_class_common_get_name(event_class),
bt_ctf_event_class_common_get_id(event_class), emf_uri);
} else {
g_string_assign(event_class->emf_uri, "");
- BT_LOGV("Reset event class's EMF URI: "
+ BT_LOGT("Reset event class's EMF URI: "
"addr=%p, name=\"%s\", id=%" PRId64,
event_class, bt_ctf_event_class_common_get_name(event_class),
bt_ctf_event_class_common_get_id(event_class));
BT_CTF_ASSERT_PRE_NON_NULL(event_class, "Event class");
if (!event_class->context_field_type) {
- BT_LOGV("Event class has no context field type: "
+ BT_LOGT("Event class has no context field type: "
"addr=%p, name=\"%s\", id=%" PRId64,
event_class, bt_ctf_event_class_common_get_name(event_class),
bt_ctf_event_class_common_get_id(event_class));
bt_ctf_object_put_ref(event_class->context_field_type);
event_class->context_field_type = context_ft;
bt_ctf_object_get_ref(event_class->context_field_type);
- BT_LOGV("Set event class's context field type: "
+ BT_LOGT("Set event class's context field type: "
"event-class-addr=%p, event-class-name=\"%s\", "
"event-class-id=%" PRId64 ", context-ft-addr=%p",
event_class, bt_ctf_event_class_common_get_name(event_class),
bt_ctf_object_put_ref(event_class->payload_field_type);
event_class->payload_field_type = payload_ft;
bt_ctf_object_get_ref(event_class->payload_field_type);
- BT_LOGV("Set event class's payload field type: "
+ BT_LOGT("Set event class's payload field type: "
"event-class-addr=%p, event-class-name=\"%s\", "
"event-class-id=%" PRId64 ", payload-ft-addr=%p",
event_class, bt_ctf_event_class_common_get_name(event_class),
BT_ASSERT(event);
BT_ASSERT(ctfser);
- BT_LOGV_STR("Serializing event's context field.");
+ BT_LOGT_STR("Serializing event's context field.");
if (event->common.context_field) {
ret = bt_ctf_field_serialize_recursive(
(void *) event->common.context_field, ctfser,
}
}
- BT_LOGV_STR("Serializing event's payload field.");
+ BT_LOGT_STR("Serializing event's payload field.");
if (event->common.payload_field) {
ret = bt_ctf_field_serialize_recursive(
(void *) event->common.payload_field, ctfser,
bt_ctf_object_put_ref(event->common.header_field->field);
event->common.header_field->field = bt_ctf_object_get_ref(header);
- BT_LOGV("Set event's header field: event-addr=%p, "
+ BT_LOGT("Set event's header field: event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"header-field-addr=%p",
event, bt_ctf_event_class_common_get_name(event->common.class),
bt_ctf_object_put_ref(event->common.payload_field);
event->common.payload_field = bt_ctf_object_get_ref(payload);
- BT_LOGV("Set event's payload field: event-addr=%p, "
+ BT_LOGT("Set event's payload field: event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"payload-field-addr=%p",
event, bt_ctf_event_class_common_get_name(event->common.class),
bt_ctf_object_put_ref(event->common.context_field);
event->common.context_field = bt_ctf_object_get_ref(context);
- BT_LOGV("Set event's context field: event-addr=%p, "
+ BT_LOGT("Set event's context field: event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"context-field-addr=%p",
event, bt_ctf_event_class_common_get_name(event->common.class),
bt_ctf_object_put_ref(event->common.stream_event_context_field);
event->common.stream_event_context_field = bt_ctf_object_get_ref(stream_event_context);
- BT_LOGV("Set event's stream event context field: event-addr=%p, "
+ BT_LOGT("Set event's stream event context field: event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"stream-event-context-field-addr=%p",
event, bt_ctf_event_class_common_get_name(event->common.class),
BT_CTF_ASSERT_PRE_NON_NULL(event, "Event");
if (!event->payload_field) {
- BT_LOGV("Event has no current payload field: addr=%p, "
+ BT_LOGT("Event has no current payload field: addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64,
event, bt_ctf_event_class_common_get_name(event->class),
bt_ctf_event_class_common_get_id(event->class));
BT_CTF_ASSERT_PRE_NON_NULL(event, "Event");
if (!event->header_field) {
- BT_LOGV("Event has no current header field: addr=%p, "
+ BT_LOGT("Event has no current header field: addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64,
event, bt_ctf_event_class_common_get_name(event->class),
bt_ctf_event_class_common_get_id(event->class));
BT_CTF_ASSERT_PRE_NON_NULL(event, "Event");
if (!event->context_field) {
- BT_LOGV("Event has no current context field: addr=%p, "
+ BT_LOGT("Event has no current context field: addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64,
event, bt_ctf_event_class_common_get_name(event->class),
bt_ctf_event_class_common_get_id(event->class));
BT_CTF_ASSERT_PRE_NON_NULL(event, "Event");
if (!event->stream_event_context_field) {
- BT_LOGV("Event has no current stream event context field: addr=%p, "
+ BT_LOGT("Event has no current stream event context field: addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64,
event, bt_ctf_event_class_common_get_name(event->class),
bt_ctf_event_class_common_get_id(event->class));
mapping->string == overlap_query->mapping_name;
if (overlap_query->overlaps) {
- BT_LOGV("Overlapping enumeration field type mappings: "
+ BT_LOGT("Overlapping enumeration field type mappings: "
"mapping-name=\"%s\", "
"mapping-a-range-start=%" PRId64 ", "
"mapping-a-range-end=%" PRId64 ", "
g_hash_table_insert(field_name_to_index,
GUINT_TO_POINTER(name_quark),
GUINT_TO_POINTER(members->len - 1));
- BT_LOGV("Added structure/variant field type member: member-ft-addr=%p, "
+ BT_LOGT("Added structure/variant field type member: member-ft-addr=%p, "
"member-name=\"%s\"", field_type, field_name);
end:
int64_t i, j, len;
int is_signed;
- BT_LOGV("Setting enumeration field type's overlap flag: addr=%p",
+ BT_LOGT("Setting enumeration field type's overlap flag: addr=%p",
ft);
len = ft->entries->len;
is_signed = bt_ctf_field_type_common_integer_is_signed(
end:
if (ft->has_overlapping_ranges) {
- BT_LOGV_STR("Enumeration field type has overlapping ranges.");
+ BT_LOGT_STR("Enumeration field type has overlapping ranges.");
} else {
- BT_LOGV_STR("Enumeration field type has no overlapping ranges.");
+ BT_LOGT_STR("Enumeration field type has no overlapping ranges.");
}
}
if (ret == 0 && ft->frozen) {
/* Field type is valid */
- BT_LOGV("Marking field type as valid: addr=%p", ft);
+ BT_LOGT("Marking field type as valid: addr=%p", ft);
ft->valid = 1;
}
}
int_ft->is_signed = !!is_signed;
- BT_LOGV("Set integer field type's signedness: addr=%p, is-signed=%d",
+ BT_LOGT("Set integer field type's signedness: addr=%p, is-signed=%d",
ft, is_signed);
end:
}
int_ft->size = size;
- BT_LOGV("Set integer field type's size: addr=%p, size=%u",
+ BT_LOGT("Set integer field type's size: addr=%p, size=%u",
ft, size);
end:
ret = -1;
}
- BT_LOGV("Set integer field type's base: addr=%p, base=%s",
+ BT_LOGT("Set integer field type's base: addr=%p, base=%s",
ft, bt_ctf_integer_base_string(base));
end:
}
int_ft->encoding = encoding;
- BT_LOGV("Set integer field type's encoding: addr=%p, encoding=%s",
+ BT_LOGT("Set integer field type's encoding: addr=%p, encoding=%s",
ft, bt_ctf_string_encoding_string(encoding));
end:
bt_ctf_object_put_ref(int_ft->mapped_clock_class);
int_ft->mapped_clock_class = bt_ctf_object_get_ref(clock_class);
- BT_LOGV("Set integer field type's mapped clock class: ft-addr=%p, "
+ BT_LOGT("Set integer field type's mapped clock class: ft-addr=%p, "
"clock-class-addr=%p, clock-class-name=\"%s\"",
ft, clock_class, bt_ctf_clock_class_get_name(clock_class));
g_ptr_array_add(enum_ft->entries, mapping);
g_ptr_array_sort(enum_ft->entries,
(GCompareFunc) compare_enumeration_mappings_signed);
- BT_LOGV("Added mapping to signed enumeration field type: addr=%p, "
+ BT_LOGT("Added mapping to signed enumeration field type: addr=%p, "
"name=\"%s\", range-start=%" PRId64 ", "
"range-end=%" PRId64,
ft, string, range_start, range_end);
g_ptr_array_add(enum_ft->entries, mapping);
g_ptr_array_sort(enum_ft->entries,
(GCompareFunc) compare_enumeration_mappings_unsigned);
- BT_LOGV("Added mapping to unsigned enumeration field type: addr=%p, "
+ BT_LOGT("Added mapping to unsigned enumeration field type: addr=%p, "
"name=\"%s\", range-start=%" PRIu64 ", "
"range-end=%" PRIu64,
ft, string, range_start, range_end);
}
flt_ft->exp_dig = exponent_digits;
- BT_LOGV("Set floating point number field type's exponent size: addr=%p, "
+ BT_LOGT("Set floating point number field type's exponent size: addr=%p, "
"exp-size=%u", ft, exponent_digits);
end:
}
flt_ft->mant_dig = mantissa_digits;
- BT_LOGV("Set floating point number field type's mantissa size: addr=%p, "
+ BT_LOGT("Set floating point number field type's mantissa size: addr=%p, "
"mant-size=%u", ft, mantissa_digits);
end:
goto end;
}
- BT_LOGV("Added structure field type field: struct-ft-addr=%p, "
+ BT_LOGT("Added structure field type field: struct-ft-addr=%p, "
"field-ft-addr=%p, field-name=\"%s\"", ft,
field_type, field_name);
"Field type");
name_quark = g_quark_try_string(name);
if (!name_quark) {
- BT_LOGV("No such structure field type field name: "
+ BT_LOGT("No such structure field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, name);
goto end;
if (!g_hash_table_lookup_extended(struct_ft->field_name_to_index,
GUINT_TO_POINTER(name_quark), NULL, (gpointer *) &index)) {
- BT_LOGV("No such structure field type field name: "
+ BT_LOGT("No such structure field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, name);
goto end;
"Field type");
if (!var_ft->tag_ft) {
- BT_LOGV("Variant field type has no tag field type: "
+ BT_LOGT("Variant field type has no tag field type: "
"addr=%p", ft);
goto end;
}
"Field type");
if (var_ft->tag_name->len == 0) {
- BT_LOGV("Variant field type has no tag field name: "
+ BT_LOGT("Variant field type has no tag field name: "
"addr=%p", ft);
goto end;
}
}
g_string_assign(var_ft->tag_name, name);
- BT_LOGV("Set variant field type's tag field name: addr=%p, "
+ BT_LOGT("Set variant field type's tag field name: addr=%p, "
"tag-field-name=\"%s\"", ft, name);
end:
goto end;
}
- BT_LOGV("Added variant field type field: variant-ft-addr=%p, "
+ BT_LOGT("Added variant field type field: variant-ft-addr=%p, "
"field-ft-addr=%p, field-name=\"%s\"", ft,
field_type, field_name);
"Field type");
name_quark = g_quark_try_string(field_name);
if (!name_quark) {
- BT_LOGV("No such variant field type field name: "
+ BT_LOGT("No such variant field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, field_name);
goto end;
if (!g_hash_table_lookup_extended(var_ft->choice_name_to_index,
GUINT_TO_POINTER(name_quark), NULL, (gpointer *) &index)) {
- BT_LOGV("No such variant field type field name: "
+ BT_LOGT("No such variant field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, field_name);
goto end;
}
array_ft->element_ft = bt_ctf_object_get_ref(element_ft);
- BT_LOGV("Set array field type's element field type: array-ft-addr=%p, "
+ BT_LOGT("Set array field type's element field type: array-ft-addr=%p, "
"element-ft-addr=%p", ft, element_ft);
end:
seq_ft->element_ft = element_ft;
bt_ctf_object_get_ref(seq_ft->element_ft);
- BT_LOGV("Set sequence field type's element field type: sequence-ft-addr=%p, "
+ BT_LOGT("Set sequence field type's element field type: sequence-ft-addr=%p, "
"element-ft-addr=%p", ft, element_ft);
end:
}
string_ft->encoding = encoding;
- BT_LOGV("Set string field type's encoding: addr=%p, encoding=%s",
+ BT_LOGT("Set string field type's encoding: addr=%p, encoding=%s",
ft, bt_ctf_string_encoding_string(encoding));
end:
ft->alignment = alignment;
ret = 0;
- BT_LOGV("Set field type's alignment: addr=%p, align=%u",
+ BT_LOGT("Set field type's alignment: addr=%p, align=%u",
ft, alignment);
end:
ft->methods->set_byte_order(ft, byte_order);
}
- BT_LOGV("Set field type's byte order: addr=%p, bo=%s",
+ BT_LOGT("Set field type's byte order: addr=%p, bo=%s",
ft, bt_ctf_byte_order_string(byte_order));
end:
name_quark = g_quark_try_string(name);
if (!name_quark) {
- BT_LOGV("No such structure field type field name: "
+ BT_LOGT("No such structure field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, name);
ret = -1;
if (!g_hash_table_lookup_extended(struct_ft->field_name_to_index,
GUINT_TO_POINTER(name_quark),
NULL, (gpointer *) &index)) {
- BT_LOGV("No such structure field type field name: "
+ BT_LOGT("No such structure field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, name);
ret = -1;
"Field type");
name_quark = g_quark_try_string(name);
if (!name_quark) {
- BT_LOGV("No such variant field type field name: "
+ BT_LOGT("No such variant field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, name);
ret = -1;
if (!g_hash_table_lookup_extended(var_ft->choice_name_to_index,
GUINT_TO_POINTER(name_quark),
NULL, (gpointer *) &index)) {
- BT_LOGV("No such variant field type field name: "
+ BT_LOGT("No such variant field type field name: "
"ft-addr=%p, field-name=\"%s\"",
ft, name);
ret = -1;
bt_ctf_object_get_ref(path);
BT_CTF_OBJECT_MOVE_REF(seq_ft->length_field_path, path);
- BT_LOGV("Set sequence field type's length field path: ft-addr=%p, "
+ BT_LOGT("Set sequence field type's length field path: ft-addr=%p, "
"field-path-addr=%p", ft, path);
end:
bt_ctf_object_get_ref(path);
BT_CTF_OBJECT_MOVE_REF(var_ft->tag_field_path, path);
- BT_LOGV("Set variant field type's tag field path: ft-addr=%p, "
+ BT_LOGT("Set variant field type's tag field path: ft-addr=%p, "
"field-path-addr=%p", ft, path);
end:
bt_ctf_object_put_ref(var_ft->tag_ft);
var_ft->tag_ft = bt_ctf_object_get_ref(tag_ft);
- BT_LOGV("Set variant field type's tag field type: variant-ft-addr=%p, "
+ BT_LOGT("Set variant field type's tag field type: variant-ft-addr=%p, "
"tag-ft-addr=%p", ft, tag_ft);
end:
/* Length */
if (int_ft_a->size != int_ft_b->size) {
- BT_LOGV("Integer field types differ: different sizes: "
+ BT_LOGT("Integer field types differ: different sizes: "
"ft-a-size=%u, ft-b-size=%u",
int_ft_a->size, int_ft_b->size);
goto end;
/* Byte order */
if (int_ft_a->user_byte_order != int_ft_b->user_byte_order) {
- BT_LOGV("Integer field types differ: different byte orders: "
+ BT_LOGT("Integer field types differ: different byte orders: "
"ft-a-bo=%s, ft-b-bo=%s",
bt_ctf_byte_order_string(int_ft_a->user_byte_order),
bt_ctf_byte_order_string(int_ft_b->user_byte_order));
/* Signedness */
if (int_ft_a->is_signed != int_ft_b->is_signed) {
- BT_LOGV("Integer field types differ: different signedness: "
+ BT_LOGT("Integer field types differ: different signedness: "
"ft-a-is-signed=%d, ft-b-is-signed=%d",
int_ft_a->is_signed,
int_ft_b->is_signed);
/* Base */
if (int_ft_a->base != int_ft_b->base) {
- BT_LOGV("Integer field types differ: different bases: "
+ BT_LOGT("Integer field types differ: different bases: "
"ft-a-base=%s, ft-b-base=%s",
bt_ctf_integer_base_string(int_ft_a->base),
bt_ctf_integer_base_string(int_ft_b->base));
/* Encoding */
if (int_ft_a->encoding != int_ft_b->encoding) {
- BT_LOGV("Integer field types differ: different encodings: "
+ BT_LOGT("Integer field types differ: different encodings: "
"ft-a-encoding=%s, ft-b-encoding=%s",
bt_ctf_string_encoding_string(int_ft_a->encoding),
bt_ctf_string_encoding_string(int_ft_b->encoding));
/* Mapped clock class */
if (int_ft_a->mapped_clock_class) {
if (!int_ft_b->mapped_clock_class) {
- BT_LOGV_STR("Integer field types differ: field type A "
+ BT_LOGT_STR("Integer field types differ: field type A "
"has a mapped clock class, but field type B "
"does not.");
goto end;
if (bt_ctf_clock_class_compare(int_ft_a->mapped_clock_class,
int_ft_b->mapped_clock_class) != 0) {
- BT_LOGV_STR("Integer field types differ: different "
+ BT_LOGT_STR("Integer field types differ: different "
"mapped clock classes.");
}
} else {
if (int_ft_b->mapped_clock_class) {
- BT_LOGV_STR("Integer field types differ: field type A "
+ BT_LOGT_STR("Integer field types differ: field type A "
"has no description, but field type B has one.");
goto end;
}
/* Byte order */
if (flt_ft_a->user_byte_order != flt_ft_b->user_byte_order) {
- BT_LOGV("Floating point number field types differ: different byte orders: "
+ BT_LOGT("Floating point number field types differ: different byte orders: "
"ft-a-bo=%s, ft-b-bo=%s",
bt_ctf_byte_order_string(flt_ft_a->user_byte_order),
bt_ctf_byte_order_string(flt_ft_b->user_byte_order));
/* Exponent length */
if (flt_ft_a->exp_dig != flt_ft_b->exp_dig) {
- BT_LOGV("Floating point number field types differ: different exponent sizes: "
+ BT_LOGT("Floating point number field types differ: different exponent sizes: "
"ft-a-exp-size=%u, ft-b-exp-size=%u",
flt_ft_a->exp_dig, flt_ft_b->exp_dig);
goto end;
/* Mantissa length */
if (flt_ft_a->mant_dig != flt_ft_b->mant_dig) {
- BT_LOGV("Floating point number field types differ: different mantissa sizes: "
+ BT_LOGT("Floating point number field types differ: different mantissa sizes: "
"ft-a-mant-size=%u, ft-b-mant-size=%u",
flt_ft_a->mant_dig, flt_ft_b->mant_dig);
goto end;
/* Label */
if (mapping_a->string != mapping_b->string) {
- BT_LOGV("Enumeration field type mappings differ: different names: "
+ BT_LOGT("Enumeration field type mappings differ: different names: "
"mapping-a-name=\"%s\", mapping-b-name=\"%s\"",
g_quark_to_string(mapping_a->string),
g_quark_to_string(mapping_b->string));
/* Range start */
if (mapping_a->range_start._unsigned !=
mapping_b->range_start._unsigned) {
- BT_LOGV("Enumeration field type mappings differ: different starts of range: "
+ BT_LOGT("Enumeration field type mappings differ: different starts of range: "
"mapping-a-range-start-unsigned=%" PRIu64 ", "
"mapping-b-range-start-unsigned=%" PRIu64,
mapping_a->range_start._unsigned,
/* Range end */
if (mapping_a->range_end._unsigned !=
mapping_b->range_end._unsigned) {
- BT_LOGV("Enumeration field type mappings differ: different ends of range: "
+ BT_LOGT("Enumeration field type mappings differ: different ends of range: "
"mapping-a-range-end-unsigned=%" PRIu64 ", "
"mapping-b-range-end-unsigned=%" PRIu64,
mapping_a->range_end._unsigned,
BT_CTF_TO_COMMON(enum_ft_a->container_ft),
BT_CTF_TO_COMMON(enum_ft_b->container_ft));
if (ret) {
- BT_LOGV("Enumeration field types differ: different container field types: "
+ BT_LOGT("Enumeration field types differ: different container field types: "
"ft-a-container-ft-addr=%p, ft-b-container-ft-addr=%p",
enum_ft_a->container_ft, enum_ft_b->container_ft);
goto end;
g_ptr_array_index(enum_ft_b->entries, i);
if (compare_enumeration_mappings(mapping_a, mapping_b)) {
- BT_LOGV("Enumeration field types differ: different mappings: "
+ BT_LOGT("Enumeration field types differ: different mappings: "
"ft-a-mapping-addr=%p, ft-b-mapping-addr=%p, "
"ft-a-mapping-name=\"%s\", ft-b-mapping-name=\"%s\"",
mapping_a, mapping_b,
/* Encoding */
if (string_ft_a->encoding != string_ft_b->encoding) {
- BT_LOGV("String field types differ: different encodings: "
+ BT_LOGT("String field types differ: different encodings: "
"ft-a-encoding=%s, ft-b-encoding=%s",
bt_ctf_string_encoding_string(string_ft_a->encoding),
bt_ctf_string_encoding_string(string_ft_b->encoding));
/* Label */
if (member_a_name != member_b_name) {
- BT_LOGV("Structure/variant field type fields differ: different names: "
+ BT_LOGT("Structure/variant field type fields differ: different names: "
"field-a-name=%s, field-b-name=%s",
g_quark_to_string(member_a_name),
g_quark_to_string(member_b_name));
/* Type */
ret = bt_ctf_field_type_common_compare(member_a_ft, member_b_ft);
if (ret == 1) {
- BT_LOGV("Structure/variant field type fields differ: different field types: "
+ BT_LOGT("Structure/variant field type fields differ: different field types: "
"field-name=\"%s\", field-a-ft-addr=%p, field-b-ft-addr=%p",
g_quark_to_string(member_a_name),
member_a_ft, member_b_ft);
/* Alignment */
if (bt_ctf_field_type_common_get_alignment(ft_a) !=
bt_ctf_field_type_common_get_alignment(ft_b)) {
- BT_LOGV("Structure field types differ: different alignments: "
+ BT_LOGT("Structure field types differ: different alignments: "
"ft-a-align=%u, ft-b-align=%u",
bt_ctf_field_type_common_get_alignment(ft_a),
bt_ctf_field_type_common_get_alignment(ft_b));
/* Fields */
if (struct_ft_a->fields->len != struct_ft_b->fields->len) {
- BT_LOGV("Structure field types differ: different field counts: "
+ BT_LOGT("Structure field types differ: different field counts: "
"ft-a-field-count=%u, ft-b-field-count=%u",
struct_ft_a->fields->len, struct_ft_b->fields->len);
goto end;
field_b->type, field_a->name, field_b->name);
if (ret) {
/* compare_structure_variant_members() logs what differs */
- BT_LOGV_STR("Structure field types differ: different fields.");
+ BT_LOGT_STR("Structure field types differ: different fields.");
goto end;
}
}
/* Tag name */
if (strcmp(var_ft_a->tag_name->str, var_ft_b->tag_name->str)) {
- BT_LOGV("Variant field types differ: different tag field names: "
+ BT_LOGT("Variant field types differ: different tag field names: "
"ft-a-tag-field-name=\"%s\", ft-b-tag-field-name=\"%s\"",
var_ft_a->tag_name->str, var_ft_b->tag_name->str);
goto end;
ret = bt_ctf_field_type_common_compare(BT_CTF_TO_COMMON(var_ft_a->tag_ft),
BT_CTF_TO_COMMON(var_ft_b->tag_ft));
if (ret) {
- BT_LOGV("Variant field types differ: different tag field types: "
+ BT_LOGT("Variant field types differ: different tag field types: "
"ft-a-tag-ft-addr=%p, ft-b-tag-ft-addr=%p",
var_ft_a->tag_ft, var_ft_b->tag_ft);
goto end;
/* Fields */
if (var_ft_a->choices->len != var_ft_b->choices->len) {
- BT_LOGV("Variant field types differ: different field counts: "
+ BT_LOGT("Variant field types differ: different field counts: "
"ft-a-field-count=%u, ft-b-field-count=%u",
var_ft_a->choices->len, var_ft_b->choices->len);
goto end;
choice_b->type, choice_a->name, choice_b->name);
if (ret) {
/* compare_structure_variant_members() logs what differs */
- BT_LOGV_STR("Variant field types differ: different fields.");
+ BT_LOGT_STR("Variant field types differ: different fields.");
goto end;
}
}
/* Length */
if (array_ft_a->length != array_ft_b->length) {
- BT_LOGV("Structure field types differ: different lengths: "
+ BT_LOGT("Structure field types differ: different lengths: "
"ft-a-length=%u, ft-b-length=%u",
array_ft_a->length, array_ft_b->length);
goto end;
ret = bt_ctf_field_type_common_compare(array_ft_a->element_ft,
array_ft_b->element_ft);
if (ret == 1) {
- BT_LOGV("Array field types differ: different element field types: "
+ BT_LOGT("Array field types differ: different element field types: "
"ft-a-element-ft-addr=%p, ft-b-element-ft-addr=%p",
array_ft_a->element_ft, array_ft_b->element_ft);
}
/* Length name */
if (strcmp(seq_ft_a->length_field_name->str,
seq_ft_b->length_field_name->str)) {
- BT_LOGV("Sequence field types differ: different length field names: "
+ BT_LOGT("Sequence field types differ: different length field names: "
"ft-a-length-field-name=\"%s\", "
"ft-b-length-field-name=\"%s\"",
seq_ft_a->length_field_name->str,
ret = bt_ctf_field_type_common_compare(seq_ft_a->element_ft,
seq_ft_b->element_ft);
if (ret == 1) {
- BT_LOGV("Sequence field types differ: different element field types: "
+ BT_LOGT("Sequence field types differ: different element field types: "
"ft-a-element-ft-addr=%p, ft-b-element-ft-addr=%p",
seq_ft_a->element_ft, seq_ft_b->element_ft);
}
if (ft_a->id != ft_b->id) {
/* Different type IDs */
- BT_LOGV("Field types differ: different IDs: "
+ BT_LOGT("Field types differ: different IDs: "
"ft-a-addr=%p, ft-b-addr=%p, "
"ft-a-id=%s, ft-b-id=%s",
ft_a, ft_b,
BT_ASSERT(ft_a->methods->compare);
ret = ft_a->methods->compare(ft_a, ft_b);
if (ret == 1) {
- BT_LOGV("Field types differ: ft-a-addr=%p, ft-b-addr=%p",
+ BT_LOGT("Field types differ: ft-a-addr=%p, ft-b-addr=%p",
ft_a, ft_b);
}
/* Move reference to output parameter */
*expected_clock_class = bt_ctf_object_get_ref(mapped_clock_class);
mapped_clock_class = NULL;
- BT_LOGV("Setting expected clock class: "
+ BT_LOGT("Setting expected clock class: "
"expected-clock-class-addr=%p",
*expected_clock_class);
} else {
enum bt_ctf_byte_order byte_order;
BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_IS_SET(field, "Integer field");
- BT_LOGV("Serializing CTF writer integer field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing CTF writer integer field: addr=%p, native-bo=%s",
field,
bt_ctf_byte_order_string(native_byte_order));
byte_order = int_type->user_byte_order;
{
struct bt_ctf_field_enumeration *enumeration = (void *) field;
- BT_LOGV("Serializing enumeration field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing enumeration field: addr=%p, native-bo=%s",
field, bt_ctf_byte_order_string(native_byte_order));
- BT_LOGV_STR("Serializing enumeration field's payload field.");
+ BT_LOGT_STR("Serializing enumeration field's payload field.");
return bt_ctf_field_serialize_recursive(
(void *) enumeration->container, ctfser, native_byte_order);
}
enum bt_ctf_byte_order byte_order;
BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_IS_SET(field, "Floating point number field");
- BT_LOGV("Serializing floating point number field: "
+ BT_LOGT("Serializing floating point number field: "
"addr=%p, native-bo=%s", field,
bt_ctf_byte_order_string(native_byte_order));
int ret;
struct bt_ctf_field_common_structure *structure = BT_CTF_FROM_COMMON(field);
- BT_LOGV("Serializing structure field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing structure field: addr=%p, native-bo=%s",
field, bt_ctf_byte_order_string(native_byte_order));
ret = bt_ctfser_align_offset_in_current_packet(ctfser,
field->type->alignment);
structure->fields, i);
const char *field_name = NULL;
- BT_LOGV("Serializing structure field's field: ser-offset=%" PRIu64 ", "
+ BT_LOGT("Serializing structure field's field: ser-offset=%" PRIu64 ", "
"field-addr=%p, index=%" PRIu64,
bt_ctfser_get_offset_in_current_packet_bits(ctfser),
member, i);
{
struct bt_ctf_field_common_variant *variant = BT_CTF_FROM_COMMON(field);
- BT_LOGV("Serializing variant field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing variant field: addr=%p, native-bo=%s",
field, bt_ctf_byte_order_string(native_byte_order));
- BT_LOGV_STR("Serializing variant field's payload field.");
+ BT_LOGT_STR("Serializing variant field's payload field.");
return bt_ctf_field_serialize_recursive(
(void *) variant->current_field, ctfser, native_byte_order);
}
int ret = 0;
struct bt_ctf_field_common_array *array = BT_CTF_FROM_COMMON(field);
- BT_LOGV("Serializing array field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing array field: addr=%p, native-bo=%s",
field, bt_ctf_byte_order_string(native_byte_order));
for (i = 0; i < array->elements->len; i++) {
struct bt_ctf_field_common *elem_field =
g_ptr_array_index(array->elements, i);
- BT_LOGV("Serializing array field's element field: "
+ BT_LOGT("Serializing array field's element field: "
"ser-offset=%" PRIu64 ", field-addr=%p, index=%" PRId64,
bt_ctfser_get_offset_in_current_packet_bits(ctfser),
elem_field, i);
int ret = 0;
struct bt_ctf_field_common_sequence *sequence = BT_CTF_FROM_COMMON(field);
- BT_LOGV("Serializing sequence field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing sequence field: addr=%p, native-bo=%s",
field, bt_ctf_byte_order_string(native_byte_order));
for (i = 0; i < sequence->elements->len; i++) {
struct bt_ctf_field_common *elem_field =
g_ptr_array_index(sequence->elements, i);
- BT_LOGV("Serializing sequence field's element field: "
+ BT_LOGT("Serializing sequence field's element field: "
"ser-offset=%" PRIu64 ", field-addr=%p, index=%" PRId64,
bt_ctfser_get_offset_in_current_packet_bits(ctfser),
elem_field, i);
struct bt_ctf_field_common_string *string = BT_CTF_FROM_COMMON(field);
BT_CTF_ASSERT_PRE_CTF_FIELD_COMMON_IS_SET(field, "String field");
- BT_LOGV("Serializing string field: addr=%p, native-bo=%s",
+ BT_LOGT("Serializing string field: addr=%p, native-bo=%s",
field, bt_ctf_byte_order_string((int) native_byte_order));
ret = bt_ctfser_write_string(ctfser, (const char *) string->buf->data);
if (G_UNLIKELY(ret)) {
if (!g_hash_table_lookup_extended(field_name_to_index,
GUINT_TO_POINTER(field_quark), NULL,
(gpointer *) &index)) {
- BT_LOGV("Invalid parameter: no such field in structure field's type: "
+ BT_LOGT("Invalid parameter: no such field in structure field's type: "
"struct-field-addr=%p, struct-ft-addr=%p, "
"field-ft-addr=%p, name=\"%s\"",
field, common_field->type, common_value->type, name);
if (!g_hash_table_lookup_extended(field_name_to_index,
GUINT_TO_POINTER(field_quark),
NULL, (gpointer *) &index)) {
- BT_LOGV("Invalid parameter: no such field in structure field's type: "
+ BT_LOGT("Invalid parameter: no such field in structure field's type: "
"struct-field-addr=%p, struct-ft-addr=%p, name=\"%s\"",
field, field->type, name);
goto error;
BT_ASSERT(pool);
-#ifdef BT_LOGV
- BT_LOGV("Creating object from pool: pool-addr=%p, pool-size=%zu, pool-cap=%u",
+#ifdef BT_LOGT
+ BT_LOGT("Creating object from pool: pool-addr=%p, pool-size=%zu, pool-cap=%u",
pool, pool->size, pool->objects->len);
#endif
}
/* Pool is empty: create a brand new object */
-#ifdef BT_LOGV
- BT_LOGV("Pool is empty: allocating new object: pool-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Pool is empty: allocating new object: pool-addr=%p",
pool);
#endif
obj = pool->funcs.new_object(pool->data);
end:
-#ifdef BT_LOGV
- BT_LOGV("Created one object from pool: pool-addr=%p, obj-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Created one object from pool: pool-addr=%p, obj-addr=%p",
pool, obj);
#endif
BT_ASSERT(pool);
BT_ASSERT(obj);
-#ifdef BT_LOGV
- BT_LOGV("Recycling object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Recycling object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
pool, pool->size, pool->objects->len, obj);
#endif
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_LOGT
+ BT_LOGT("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
pool->objects->pdata[pool->size] = obj;
pool->size++;
-#ifdef BT_LOGV
- BT_LOGV("Recycled object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Recycled object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
pool, pool->size, pool->objects->len, obj);
#endif
}
BT_ASSERT(child);
BT_ASSERT(child->is_shared);
-#ifdef BT_LOGV
- BT_LOGV("Setting object's parent: addr=%p, parent-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Setting object's parent: addr=%p, parent-addr=%p",
child, parent);
#endif
*/
struct bt_ctf_object *parent = obj->parent;
-#ifdef BT_LOGV
- BT_LOGV("Releasing parented object: addr=%p, ref-count=%llu, "
+#ifdef BT_LOGT
+ BT_LOGT("Releasing parented object: addr=%p, ref-count=%llu, "
"parent-addr=%p, parent-ref-count=%llu",
obj, obj->ref_count,
parent, parent->ref_count);
BT_ASSERT(obj);
BT_ASSERT(obj->is_shared);
-#ifdef BT_LOGV
- BT_LOGV("Incrementing object's reference count: %llu -> %llu: "
+#ifdef BT_LOGT
+ BT_LOGT("Incrementing object's reference count: %llu -> %llu: "
"addr=%p, cur-count=%llu, new-count=%llu",
obj->ref_count, obj->ref_count + 1,
obj, obj->ref_count, obj->ref_count + 1);
BT_ASSERT(obj->is_shared);
if (G_UNLIKELY(obj->parent && bt_ctf_object_get_ref_count(obj) == 0)) {
-#ifdef BT_LOGV
- BT_LOGV("Incrementing object's parent's reference count: "
+#ifdef BT_LOGT
+ BT_LOGT("Incrementing object's parent's reference count: "
"addr=%p, parent-addr=%p", obj, obj->parent);
#endif
bt_ctf_object_get_no_null_check(obj->parent);
}
-#ifdef BT_LOGV
- BT_LOGV("Incrementing object's reference count: %llu -> %llu: "
+#ifdef BT_LOGT
+ BT_LOGT("Incrementing object's reference count: %llu -> %llu: "
"addr=%p, cur-count=%llu, new-count=%llu",
obj->ref_count, obj->ref_count + 1,
obj, obj->ref_count, obj->ref_count + 1);
BT_ASSERT(obj->is_shared);
BT_ASSERT(obj->ref_count > 0);
-#ifdef BT_LOGV
- BT_LOGV("Decrementing object's reference count: %llu -> %llu: "
+#ifdef BT_LOGT
+ BT_LOGT("Decrementing object's reference count: %llu -> %llu: "
"addr=%p, cur-count=%llu, new-count=%llu",
obj->ref_count, obj->ref_count - 1,
obj, obj->ref_count, obj->ref_count - 1);
goto end;
}
- BT_LOGV("Pushing field type on context's stack: "
+ BT_LOGT("Pushing field type on context's stack: "
"ft-addr=%p, stack-size-before=%u", type, stack->len);
frame->type = bt_ctf_object_get_ref(type);
g_ptr_array_add(stack, frame);
* This will call the frame's destructor and free it, as
* well as put its contained field type.
*/
- BT_LOGV("Popping context's stack: stack-size-before=%u",
+ BT_LOGT("Popping context's stack: stack-size-before=%u",
stack->len);
g_ptr_array_set_size(stack, stack->len - 1);
}
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_LOGT("Prefix does not match: trying the next one: "
"path=\"%s\", path-prefix=\"%s\", scope=%s",
pathstr, absolute_path_prefixes[scope],
bt_ctf_scope_string(scope));
/* Found it! */
ret = scope;
- BT_LOGV("Found root scope from absolute path: "
+ BT_LOGT("Found root scope from absolute path: "
"path=\"%s\", scope=%s", pathstr,
bt_ctf_scope_string(scope));
goto end;
enum bt_ctf_field_type_id type_id =
bt_ctf_field_type_common_get_type_id(type);
- BT_LOGV("Current path token: token=\"%s\"", field_name);
+ BT_LOGT("Current path token: token=\"%s\"", field_name);
/* Find to which index corresponds the current path token */
if (type_id == BT_CTF_FIELD_TYPE_ID_ARRAY ||
int cur_index = type_stack_at(ctx->type_stack,
parent_pos_in_stack)->index;
- BT_LOGV("Locating target field type from current parent field type: "
+ BT_LOGT("Locating target field type from current parent field type: "
"parent-pos=%d, parent-ft-addr=%p, cur-index=%d",
parent_pos_in_stack, parent_type, cur_index);
parent_type, cur_index);
if (ret) {
/* Not found... yet */
- BT_LOGV_STR("Not found at this point.");
+ BT_LOGT_STR("Not found at this point.");
bt_ctf_field_path_clear(tail_field_path);
} else {
/* Found: stitch tail field path to head field path */
struct bt_ctf_field_type_common *root_type;
bt_ctf_field_path_clear(field_path);
- BT_LOGV("Looking into potential root scope: scope=%s",
+ BT_LOGT("Looking into potential root scope: scope=%s",
bt_ctf_scope_string(field_path->root));
root_type = get_type_from_ctx(ctx, field_path->root);
if (!root_type) {
root_type, INT_MAX);
if (ret) {
/* Not found yet */
- BT_LOGV_STR("Not found in this scope.");
+ BT_LOGT_STR("Not found in this scope.");
field_path->root--;
continue;
}
/* Found */
- BT_LOGV_STR("Found in this scope.");
+ BT_LOGT_STR("Found in this scope.");
break;
}
}
if (root_scope == BT_CTF_SCOPE_UNKNOWN) {
/* Relative path: start with current root scope */
field_path->root = ctx->root_scope;
- BT_LOGV("Detected relative path: starting with current root scope: "
+ BT_LOGT("Detected relative path: starting with current root scope: "
"scope=%s", bt_ctf_scope_string(field_path->root));
ret = relative_ptokens_to_field_path(ptokens, field_path, ctx);
if (ret) {
} else {
/* Absolute path: use found root scope */
field_path->root = root_scope;
- BT_LOGV("Detected absolute path: using root scope: "
+ BT_LOGT("Detected absolute path: using root scope: "
"scope=%s", bt_ctf_scope_string(field_path->root));
ret = absolute_ptokens_to_field_path(ptokens, field_path, ctx);
if (ret) {
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_LOGT("Found field path: path=\"%s\", field-path=\"%s\"",
pathstr, field_path_pretty_str);
if (field_path_pretty) {
int lca_index = 0;
int field_path1_len, field_path2_len;
- if (BT_LOG_ON_VERBOSE) {
+ if (BT_LOG_ON_TRACE) {
GString *field_path1_pretty =
bt_ctf_field_path_string(field_path1);
GString *field_path2_pretty =
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_LOGT("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);
lca_index++;
}
- BT_LOGV("Found LCA: lca-index=%d", lca_index);
+ BT_LOGT("Found LCA: lca-index=%d", lca_index);
return lca_index;
}
f_index;
}
- BT_LOGV("Resolving field type's child field type: "
+ BT_LOGT("Resolving field type's child field type: "
"parent-ft-addr=%p, child-ft-addr=%p, "
"index=%" PRId64 ", count=%" PRId64,
type, child_type, f_index, field_count);
.root_scope = BT_CTF_SCOPE_UNKNOWN,
};
- BT_LOGV("Resolving field types: "
+ BT_LOGT("Resolving field types: "
"packet-header-ft-addr=%p, "
"packet-context-ft-addr=%p, "
"event-header-ft-addr=%p, "
}
}
- BT_LOGV_STR("Resolved field types.");
+ BT_LOGT_STR("Resolved field types.");
end:
type_stack_destroy(ctx.type_stack);
/* Only set an event ID if none was explicitly set before */
*event_id = bt_ctf_event_class_common_get_id(event_class);
if (*event_id < 0) {
- BT_LOGV("Event class has no ID: automatically setting it: "
+ BT_LOGT("Event class has no ID: automatically setting it: "
"id=%" PRId64, stream_class->next_event_id);
if (bt_ctf_event_class_common_set_id(event_class,
ret = bt_ctf_visitor_helper(&obj, get_event_class_count,
get_event_class,
visit_event_class, visitor, data);
- BT_LOGV("bt_ctf_visitor_helper() returned: ret=%d", ret);
+ BT_LOGT("bt_ctf_visitor_helper() returned: ret=%d", ret);
end:
return ret;
ret = bt_ctf_field_type_common_structure_replace_field(
(void *) parent_ft, field_name, (void *) ft_copy);
bt_ctf_object_put_ref(ft_copy);
- BT_LOGV("Automatically mapped field type to stream class's clock class: "
+ BT_LOGT("Automatically mapped field type to stream class's clock class: "
"stream-class-addr=%p, stream-class-name=\"%s\", "
"stream-class-id=%" PRId64 ", ft-addr=%p, "
"ft-copy-addr=%p",
}
if (!stream_class->clock) {
- BT_LOGV("Stream class has no clock: "
+ BT_LOGT("Stream class has no clock: "
"addr=%p, name=\"%s\", id=%" PRId64,
stream_class,
bt_ctf_stream_class_get_name(stream_class),
/* Replace the current clock of this stream class. */
bt_ctf_object_put_ref(stream_class->clock);
stream_class->clock = bt_ctf_object_get_ref(clock);
- BT_LOGV("Set stream class's clock: "
+ BT_LOGT("Set stream class's clock: "
"addr=%p, name=\"%s\", id=%" PRId64 ", "
"clock-addr=%p, clock-name=\"%s\"",
stream_class,
BT_CTF_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
if (!stream_class->id_set) {
- BT_LOGV("Stream class's ID is not set: addr=%p, name=\"%s\"",
+ BT_LOGT("Stream class's ID is not set: addr=%p, name=\"%s\"",
stream_class,
bt_ctf_stream_class_common_get_name(stream_class));
ret = (int64_t) -1;
g_string_assign(stream_class->name, name);
}
- BT_LOGV("Set stream class's name: "
+ BT_LOGT("Set stream class's name: "
"addr=%p, name=\"%s\", id=%" PRId64,
stream_class, bt_ctf_stream_class_common_get_name(stream_class),
bt_ctf_stream_class_common_get_id(stream_class));
BT_ASSERT(stream_class);
stream_class->id = id;
stream_class->id_set = 1;
- BT_LOGV("Set stream class's ID (internal): "
+ BT_LOGT("Set stream class's ID (internal): "
"addr=%p, name=\"%s\", id=%" PRId64,
stream_class, bt_ctf_stream_class_common_get_name(stream_class),
bt_ctf_stream_class_common_get_id(stream_class));
ret = bt_ctf_stream_class_common_set_id_no_check(stream_class, id);
if (ret == 0) {
- BT_LOGV("Set stream class's ID: "
+ BT_LOGT("Set stream class's ID: "
"addr=%p, name=\"%s\", id=%" PRId64,
stream_class,
bt_ctf_stream_class_common_get_name(stream_class),
bt_ctf_object_put_ref(stream_class->packet_context_field_type);
stream_class->packet_context_field_type = packet_context_type;
bt_ctf_object_get_ref(stream_class->packet_context_field_type);
- BT_LOGV("Set stream class's packet context field type: "
+ BT_LOGT("Set stream class's packet context field type: "
"addr=%p, name=\"%s\", id=%" PRId64 ", "
"packet-context-ft-addr=%p",
stream_class, bt_ctf_stream_class_common_get_name(stream_class),
BT_CTF_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
if (!stream_class->event_header_field_type) {
- BT_LOGV("Stream class has no event header field type: "
+ BT_LOGT("Stream class has no event header field type: "
"addr=%p, name=\"%s\", id=%" PRId64,
stream_class,
bt_ctf_stream_class_common_get_name(stream_class),
bt_ctf_object_put_ref(stream_class->event_header_field_type);
stream_class->event_header_field_type = event_header_type;
bt_ctf_object_get_ref(stream_class->event_header_field_type);
- BT_LOGV("Set stream class's event header field type: "
+ BT_LOGT("Set stream class's event header field type: "
"addr=%p, name=\"%s\", id=%" PRId64 ", "
"event-header-ft-addr=%p",
stream_class, bt_ctf_stream_class_common_get_name(stream_class),
bt_ctf_object_put_ref(stream_class->event_context_field_type);
stream_class->event_context_field_type = event_context_type;
bt_ctf_object_get_ref(stream_class->event_context_field_type);
- BT_LOGV("Set stream class's event context field type: "
+ BT_LOGT("Set stream class's event context field type: "
"addr=%p, name=\"%s\", id=%" PRId64 ", "
"event-context-ft-addr=%p",
stream_class, bt_ctf_stream_class_common_get_name(stream_class),
if (!magic_field) {
/* No magic field found. Not an error, skip. */
- BT_LOGV("No field named `magic` in packet header: skipping: "
+ BT_LOGT("No field named `magic` in packet header: skipping: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
goto end;
stream, bt_ctf_stream_get_name(stream),
magic_field, (uint64_t) magic_value);
} else {
- BT_LOGV("Set packet header field's `magic` field's value: "
+ BT_LOGT("Set packet header field's `magic` field's value: "
"stream-addr=%p, stream-name=\"%s\", field-addr=%p, value=%" PRIu64,
stream, bt_ctf_stream_get_name(stream),
magic_field, (uint64_t) magic_value);
if (!uuid_field) {
/* No uuid field found. Not an error, skip. */
- BT_LOGV("No field named `uuid` in packet header: skipping: "
+ BT_LOGT("No field named `uuid` in packet header: skipping: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
goto end;
}
}
- BT_LOGV("Set packet header field's `uuid` field's value: "
+ BT_LOGT("Set packet header field's `uuid` field's value: "
"stream-addr=%p, stream-name=\"%s\", field-addr=%p",
stream, bt_ctf_stream_get_name(stream), uuid_field);
if (!stream_id_field) {
/* No stream_id field found. Not an error, skip. */
- BT_LOGV("No field named `stream_id` in packet header: skipping: "
+ BT_LOGT("No field named `stream_id` in packet header: skipping: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
goto end;
stream, bt_ctf_stream_get_name(stream),
stream_id_field, (uint64_t) stream_id);
} else {
- BT_LOGV("Set packet header field's `stream_id` field's value: "
+ BT_LOGT("Set packet header field's `stream_id` field's value: "
"stream-addr=%p, stream-name=\"%s\", field-addr=%p, value=%" PRIu64,
stream, bt_ctf_stream_get_name(stream),
stream_id_field, (uint64_t) stream_id);
goto end;
}
- BT_LOGV("Automatically populated stream's packet header's known fields: "
+ BT_LOGT("Automatically populated stream's packet header's known fields: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
stream, bt_ctf_stream_get_name(stream),
field, packet_size_bits);
} else {
- BT_LOGV("Set packet context field's `packet_size` field's value: "
+ BT_LOGT("Set packet context field's `packet_size` field's value: "
"stream-addr=%p, stream-name=\"%s\", field-addr=%p, value=%" PRIu64,
stream, bt_ctf_stream_get_name(stream),
field, packet_size_bits);
if (!field) {
/* No content size field found. Not an error, skip. */
- BT_LOGV("No field named `content_size` in packet context: skipping: "
+ BT_LOGT("No field named `content_size` in packet context: skipping: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
goto end;
stream, bt_ctf_stream_get_name(stream),
field, content_size_bits);
} else {
- BT_LOGV("Set packet context field's `content_size` field's value: "
+ BT_LOGT("Set packet context field's `content_size` field's value: "
"stream-addr=%p, stream-name=\"%s\", field-addr=%p, value=%" PRIu64,
stream, bt_ctf_stream_get_name(stream),
field, content_size_bits);
if (!field) {
/* No discarded events count field found. Not an error, skip. */
- BT_LOGV("No field named `events_discarded` in packet context: skipping: "
+ BT_LOGT("No field named `events_discarded` in packet context: skipping: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
goto end;
stream, bt_ctf_stream_get_name(stream),
field, stream->discarded_events);
} else {
- BT_LOGV("Set packet context field's `events_discarded` field's value: "
+ BT_LOGT("Set packet context field's `events_discarded` field's value: "
"stream-addr=%p, stream-name=\"%s\", field-addr=%p, value=%" PRIu64,
stream, bt_ctf_stream_get_name(stream),
field, stream->discarded_events);
const uint64_t mask = pow2 - 1;
uint64_t val_masked;
-#ifdef BT_LOG_ENABLED_VERBOSE
+#ifdef BT_LOG_ENABLED_TRACE
uint64_t old_val = *val;
#endif
*val |= new_val;
end:
- BT_LOGV("Updated clock value: old-val=%" PRIu64 ", new-val=%" PRIu64,
+ BT_LOGT("Updated clock value: old-val=%" PRIu64 ", new-val=%" PRIu64,
old_val, *val);
return;
}
goto end;
}
- BT_LOGV("Automatically populated stream's packet context's known fields: "
+ BT_LOGT("Automatically populated stream's packet context's known fields: "
"stream-addr=%p, stream-name=\"%s\"",
stream, bt_ctf_stream_get_name(stream));
goto end;
}
- BT_LOGV("Appending discarded events to stream: "
+ BT_LOGT("Appending discarded events to stream: "
"stream-addr=%p, stream-name=\"%s\", append-count=%" PRIu64,
stream, bt_ctf_stream_get_name(stream), event_count);
}
stream->discarded_events = new_count;
- BT_LOGV("Appended discarded events to stream: "
+ BT_LOGT("Appended discarded events to stream: "
"stream-addr=%p, stream-name=\"%s\", append-count=%" PRIu64,
stream, bt_ctf_stream_get_name(stream), event_count);
goto end;
}
- BT_LOGV("Automatically populating event's header field: "
+ BT_LOGT("Automatically populating event's header field: "
"stream-addr=%p, stream-name=\"%s\", event-addr=%p",
stream, bt_ctf_stream_get_name(stream), event);
}
}
- BT_LOGV("Automatically populated event's header field: "
+ BT_LOGT("Automatically populated event's header field: "
"stream-addr=%p, stream-name=\"%s\", event-addr=%p",
stream, bt_ctf_stream_get_name(stream), event);
goto end;
}
- BT_LOGV("Appending event to stream: "
+ BT_LOGT("Appending event to stream: "
"stream-addr=%p, stream-name=\"%s\", event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64,
stream, bt_ctf_stream_get_name(stream), event,
}
bt_ctf_object_set_parent(&event->common.base, &stream->common.base);
- BT_LOGV_STR("Automatically populating the header of the event to append.");
+ BT_LOGT_STR("Automatically populating the header of the event to append.");
ret = auto_populate_event_header(stream, event);
if (ret) {
/* auto_populate_event_header() reports errors */
}
/* Make sure the various scopes of the event are set */
- BT_LOGV_STR("Validating event to append.");
+ BT_LOGT_STR("Validating event to append.");
BT_CTF_ASSERT_PRE(bt_ctf_event_common_validate(BT_CTF_TO_COMMON(event)) == 0,
"Invalid event: event-addr=%p", event);
/* Save the new event and freeze it */
- BT_LOGV_STR("Freezing the event to append.");
+ BT_LOGT_STR("Freezing the event to append.");
bt_ctf_event_common_set_is_frozen(BT_CTF_TO_COMMON(event), true);
g_ptr_array_add(stream->events, event);
* class share the same lifetime guarantees and the reference is no
* longer needed.
*/
- BT_LOGV_STR("Putting the event's class.");
+ BT_LOGT_STR("Putting the event's class.");
bt_ctf_object_put_ref(event->common.class);
- BT_LOGV("Appended event to stream: "
+ BT_LOGT("Appended event to stream: "
"stream-addr=%p, stream-name=\"%s\", event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64,
stream, bt_ctf_stream_get_name(stream), event,
bt_ctf_object_put_ref(field_type);
bt_ctf_object_put_ref(stream->packet_context);
stream->packet_context = bt_ctf_object_get_ref(field);
- BT_LOGV("Set stream's packet context field: "
+ BT_LOGT("Set stream's packet context field: "
"stream-addr=%p, stream-name=\"%s\", "
"packet-context-field-addr=%p",
stream, bt_ctf_stream_get_name(stream), field);
skip_validation:
bt_ctf_object_put_ref(stream->packet_header);
stream->packet_header = bt_ctf_object_get_ref(field);
- BT_LOGV("Set stream's packet header field: "
+ BT_LOGT("Set stream's packet header field: "
"stream-addr=%p, stream-name=\"%s\", "
"packet-header-field-addr=%p",
stream, bt_ctf_stream_get_name(stream), field);
}
}
- BT_LOGV("Flushing stream's current packet: stream-addr=%p, "
+ BT_LOGT("Flushing stream's current packet: stream-addr=%p, "
"stream-name=\"%s\", packet-index=%u", stream,
bt_ctf_stream_get_name(stream), stream->flushed_packet_count);
trace = BT_CTF_FROM_COMMON(bt_ctf_stream_class_common_borrow_trace(
}
if (stream->packet_header) {
- BT_LOGV_STR("Serializing packet header field (initial).");
+ BT_LOGT_STR("Serializing packet header field (initial).");
ret = bt_ctf_field_serialize_recursive(stream->packet_header,
&stream->ctfser, native_byte_order);
if (ret) {
&stream->ctfser);
/* Write packet context */
- BT_LOGV_STR("Serializing packet context field (initial).");
+ BT_LOGT_STR("Serializing packet context field (initial).");
ret = bt_ctf_field_serialize_recursive(stream->packet_context,
&stream->ctfser, native_byte_order);
if (ret) {
}
}
- BT_LOGV("Serializing events: count=%u", stream->events->len);
+ BT_LOGT("Serializing events: count=%u", stream->events->len);
for (i = 0; i < stream->events->len; i++) {
struct bt_ctf_event *event = g_ptr_array_index(
BT_CTF_FROM_COMMON(bt_ctf_event_common_borrow_class(
BT_CTF_TO_COMMON(event)));
- BT_LOGV("Serializing event: index=%zu, event-addr=%p, "
+ BT_LOGT("Serializing event: index=%zu, event-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"ser-offset=%" PRIu64,
i, event, bt_ctf_event_class_get_name(event_class),
/* Write event header */
if (event->common.header_field) {
- BT_LOGV_STR("Serializing event's header field.");
+ BT_LOGT_STR("Serializing event's header field.");
ret = bt_ctf_field_serialize_recursive(
(void *) event->common.header_field->field,
&stream->ctfser, native_byte_order);
/* Write stream event context */
if (event->common.stream_event_context_field) {
- BT_LOGV_STR("Serializing event's stream event context field.");
+ BT_LOGT_STR("Serializing event's stream event context field.");
ret = bt_ctf_field_serialize_recursive(
(void *) event->common.stream_event_context_field,
&stream->ctfser, native_byte_order);
goto end;
}
- BT_LOGV("Rewriting (serializing) packet context field.");
+ BT_LOGT("Rewriting (serializing) packet context field.");
ret = bt_ctf_field_serialize_recursive(stream->packet_context,
&stream->ctfser, native_byte_order);
if (ret) {
}
if (ret == 0) {
- BT_LOGV("Flushed stream's current packet: "
+ BT_LOGT("Flushed stream's current packet: "
"content-size=%" PRIu64 ", packet-size=%" PRIu64,
content_size_bits, packet_size_bits);
}
integer = bt_ctf_field_structure_get_field_by_name(structure, name);
if (!integer) {
/* Field not found, not an error. */
- BT_LOGV("Field not found: struct-field-addr=%p, "
+ BT_LOGT("Field not found: struct-field-addr=%p, "
"name=\"%s\", force=%d", structure, name, force);
goto end;
}
/* Make sure the payload has not already been set. */
if (!force && bt_ctf_field_is_set_recursive(integer)) {
/* Payload already set, not an error */
- BT_LOGV("Field's payload is already set: struct-field-addr=%p, "
+ BT_LOGT("Field's payload is already set: struct-field-addr=%p, "
"name=\"%s\", force=%d", structure, name, force);
goto end;
}
BT_CTF_ASSERT_PRE_NON_NULL(stream, "Stream");
ret = stream->id;
if (ret < 0) {
- BT_LOGV("Stream's ID is not set: addr=%p, name=\"%s\"",
+ BT_LOGT("Stream's ID is not set: addr=%p, name=\"%s\"",
stream, bt_ctf_stream_common_get_name(stream));
}
goto end;
}
- BT_LOGV("Set trace's name: addr=%p, name=\"%s\"", trace, name);
+ BT_LOGT("Set trace's name: addr=%p, name=\"%s\"", trace, name);
end:
return ret;
memcpy(trace->uuid, uuid, BABELTRACE_UUID_LEN);
trace->uuid_set = BT_TRUE;
- BT_LOGV("Set trace's UUID: addr=%p, name=\"%s\", "
+ BT_LOGT("Set trace's UUID: addr=%p, name=\"%s\", "
"uuid=\"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\"",
trace, bt_ctf_trace_common_get_name(trace),
(unsigned int) uuid[0],
"env-name=\"%s\"",
trace, bt_ctf_trace_common_get_name(trace), name);
} else {
- BT_LOGV("Set environment field's value: "
+ BT_LOGT("Set environment field's value: "
"trace-addr=%p, trace-name=\"%s\", "
"env-name=\"%s\", value-addr=%p",
trace, bt_ctf_trace_common_get_name(trace), name, value);
g_ptr_array_add(trace->clock_classes, clock_class);
if (trace->frozen) {
- BT_LOGV_STR("Freezing added clock class because trace is frozen.");
+ BT_LOGT_STR("Freezing added clock class because trace is frozen.");
bt_ctf_clock_class_freeze(clock_class);
}
- BT_LOGV("Added clock class to trace: "
+ BT_LOGT("Added clock class to trace: "
"trace-addr=%p, trace-name=\"%s\", "
"clock-class-addr=%p, clock-class-name=\"%s\"",
trace, bt_ctf_trace_common_get_name(trace),
}
trace->native_byte_order = byte_order;
- BT_LOGV("Set trace's native byte order: "
+ BT_LOGT("Set trace's native byte order: "
"addr=%p, name=\"%s\", bo=%s",
trace, bt_ctf_trace_common_get_name(trace),
bt_ctf_byte_order_string(byte_order));
bt_ctf_object_put_ref(trace->packet_header_field_type);
trace->packet_header_field_type = bt_ctf_object_get_ref(packet_header_type);
- BT_LOGV("Set trace's packet header field type: "
+ BT_LOGT("Set trace's packet header field type: "
"addr=%p, name=\"%s\", packet-context-ft-addr=%p",
trace, bt_ctf_trace_common_get_name(trace), packet_header_type);
end:
goto end;
}
- BT_LOGV("Visiting trace: addr=%p, name=\"%s\"",
+ BT_LOGT("Visiting trace: addr=%p, name=\"%s\"",
trace, bt_ctf_trace_get_name(trace));
ret = bt_ctf_visitor_helper(&obj, get_stream_class_count,
get_stream_class, visit_stream_class, visitor, data);
char *save_ptr, *token;
if (!identifier) {
- BT_LOGV_STR("Invalid parameter: input string is NULL.");
+ BT_LOGT_STR("Invalid parameter: input string is NULL.");
is_valid = BT_FALSE;
goto end;
}
{
int ret = 0;
- BT_LOGV("Validating event class field types: "
+ BT_LOGT("Validating event class field types: "
"packet-header-ft-addr=%p, "
"packet-context-ft-addr=%p, "
"event-header-ft-addr=%p, "
{
int ret = 0;
- BT_LOGV("Validating stream class field types: "
+ BT_LOGT("Validating stream class field types: "
"packet-header-ft-addr=%p, "
"packet-context-ft-addr=%p, "
"event-header-ft-addr=%p, "
{
int ret = 0;
- BT_LOGV("Validating event class field types: "
+ BT_LOGT("Validating event class field types: "
"packet-header-ft-addr=%p", packet_header_type);
/* Resolve sequence type lengths and variant type tags first */
int contains_seq_var;
int valid_ret;
- BT_LOGV("Validating field types: "
+ BT_LOGT("Validating field types: "
"packet-header-ft-addr=%p, "
"packet-context-ft-addr=%p, "
"event-header-ft-addr=%p, "
goto skip_packet_header_type_copy;
}
- BT_LOGV_STR("Copying packet header field type because it contains at least one sequence or variant field type.");
+ BT_LOGT_STR("Copying packet header field type because it contains at least one sequence or variant field type.");
packet_header_type_copy =
copy_field_type_func(packet_header_type);
if (!packet_header_type_copy) {
goto skip_packet_context_type_copy;
}
- BT_LOGV_STR("Copying packet context field type because it contains at least one sequence or variant field type.");
+ BT_LOGT_STR("Copying packet context field type because it contains at least one sequence or variant field type.");
packet_context_type_copy =
copy_field_type_func(packet_context_type);
if (!packet_context_type_copy) {
goto skip_event_header_type_copy;
}
- BT_LOGV_STR("Copying event header field type because it contains at least one sequence or variant field type.");
+ BT_LOGT_STR("Copying event header field type because it contains at least one sequence or variant field type.");
event_header_type_copy =
copy_field_type_func(event_header_type);
if (!event_header_type_copy) {
goto skip_stream_event_ctx_type_copy;
}
- BT_LOGV_STR("Copying stream event context field type because it contains at least one sequence or variant field type.");
+ BT_LOGT_STR("Copying stream event context field type because it contains at least one sequence or variant field type.");
stream_event_ctx_type_copy =
copy_field_type_func(stream_event_ctx_type);
if (!stream_event_ctx_type_copy) {
goto skip_event_context_type_copy;
}
- BT_LOGV_STR("Copying event context field type because it contains at least one sequence or variant field type.");
+ BT_LOGT_STR("Copying event context field type because it contains at least one sequence or variant field type.");
event_context_type_copy =
copy_field_type_func(event_context_type);
if (!event_context_type_copy) {
goto skip_event_payload_type_copy;
}
- BT_LOGV_STR("Copying event payload field type because it contains at least one sequence or variant field type.");
+ BT_LOGT_STR("Copying event payload field type because it contains at least one sequence or variant field type.");
event_payload_type_copy =
copy_field_type_func(event_payload_type);
if (!event_payload_type_copy) {
{
if (BT_CTF_VALUE_TO_BOOL(object_a)->value !=
BT_CTF_VALUE_TO_BOOL(object_b)->value) {
- BT_LOGV("Boolean value objects are different: "
+ BT_LOGT("Boolean value objects are different: "
"bool-a-val=%d, bool-b-val=%d",
BT_CTF_VALUE_TO_BOOL(object_a)->value,
BT_CTF_VALUE_TO_BOOL(object_b)->value);
{
if (BT_CTF_VALUE_TO_INTEGER(object_a)->value !=
BT_CTF_VALUE_TO_INTEGER(object_b)->value) {
- BT_LOGV("Integer value objects are different: "
+ BT_LOGT("Integer value objects are different: "
"int-a-val=%" PRId64 ", int-b-val=%" PRId64,
BT_CTF_VALUE_TO_INTEGER(object_a)->value,
BT_CTF_VALUE_TO_INTEGER(object_b)->value);
{
if (BT_CTF_VALUE_TO_REAL(object_a)->value !=
BT_CTF_VALUE_TO_REAL(object_b)->value) {
- BT_LOGV("Real number value objects are different: "
+ BT_LOGT("Real number value objects are different: "
"real-a-val=%f, real-b-val=%f",
BT_CTF_VALUE_TO_REAL(object_a)->value,
BT_CTF_VALUE_TO_REAL(object_b)->value);
{
if (strcmp(BT_CTF_VALUE_TO_STRING(object_a)->gstr->str,
BT_CTF_VALUE_TO_STRING(object_b)->gstr->str) != 0) {
- BT_LOGV("String value objects are different: "
+ BT_LOGT("String value objects are different: "
"string-a-val=\"%s\", string-b-val=\"%s\"",
BT_CTF_VALUE_TO_STRING(object_a)->gstr->str,
BT_CTF_VALUE_TO_STRING(object_b)->gstr->str);
if (bt_ctf_value_array_get_size(object_a) !=
bt_ctf_value_array_get_size(object_b)) {
- BT_LOGV("Array values are different: size mismatch "
+ BT_LOGT("Array values are different: size mismatch "
"value-a-addr=%p, value-b-addr=%p, "
"value-a-size=%" PRId64 ", value-b-size=%" PRId64,
object_a, object_b,
object_b, i);
if (!bt_ctf_value_compare(element_obj_a, element_obj_b)) {
- BT_LOGV("Array values's elements are different: "
+ BT_LOGT("Array values's elements are different: "
"value-a-addr=%p, value-b-addr=%p, index=%d",
element_obj_a, element_obj_b, i);
ret = BT_FALSE;
if (bt_ctf_value_map_get_size(object_a) !=
bt_ctf_value_map_get_size(object_b)) {
- BT_LOGV("Map values are different: size mismatch "
+ BT_LOGT("Map values are different: size mismatch "
"value-a-addr=%p, value-b-addr=%p, "
"value-a-size=%" PRId64 ", value-b-size=%" PRId64,
object_a, object_b,
key_str);
if (!bt_ctf_value_compare(element_obj_a, element_obj_b)) {
- BT_LOGV("Map values's elements are different: "
+ BT_LOGT("Map values's elements are different: "
"value-a-addr=%p, value-b-addr=%p, key=\"%s\"",
element_obj_a, element_obj_b, key_str);
ret = BT_FALSE;
BT_CTF_ASSERT_PRE_VALUE_IS_TYPE(bool_obj, BT_CTF_VALUE_TYPE_BOOL);
BT_CTF_ASSERT_PRE_VALUE_HOT(bool_obj, "Value object");
BT_CTF_VALUE_TO_BOOL(bool_obj)->value = val;
- BT_LOGV("Set boolean value's raw value: value-addr=%p, value=%d",
+ BT_LOGT("Set boolean value's raw value: value-addr=%p, value=%d",
bool_obj, val);
}
BT_CTF_ASSERT_PRE_VALUE_IS_TYPE(integer_obj, BT_CTF_VALUE_TYPE_INTEGER);
BT_CTF_ASSERT_PRE_VALUE_HOT(integer_obj, "Value object");
BT_CTF_VALUE_TO_INTEGER(integer_obj)->value = val;
- BT_LOGV("Set integer value's raw value: value-addr=%p, value=%" PRId64,
+ BT_LOGT("Set integer value's raw value: value-addr=%p, value=%" PRId64,
integer_obj, val);
}
BT_CTF_ASSERT_PRE_VALUE_IS_TYPE(real_obj, BT_CTF_VALUE_TYPE_REAL);
BT_CTF_ASSERT_PRE_VALUE_HOT(real_obj, "Value object");
BT_CTF_VALUE_TO_REAL(real_obj)->value = val;
- BT_LOGV("Set real number value's raw value: value-addr=%p, value=%f",
+ BT_LOGT("Set real number value's raw value: value-addr=%p, value=%f",
real_obj, val);
}
BT_CTF_ASSERT_PRE_VALUE_IS_TYPE(string_obj, BT_CTF_VALUE_TYPE_STRING);
BT_CTF_ASSERT_PRE_VALUE_HOT(string_obj, "Value object");
g_string_assign(BT_CTF_VALUE_TO_STRING(string_obj)->gstr, val);
- BT_LOGV("Set string value's raw value: value-addr=%p, raw-value-addr=%p",
+ BT_LOGT("Set string value's raw value: value-addr=%p, raw-value-addr=%p",
string_obj, val);
return BT_CTF_VALUE_STATUS_OK;
}
BT_CTF_ASSERT_PRE_VALUE_HOT(array_obj, "Array value object");
g_ptr_array_add(typed_array_obj->garray, element_obj);
bt_ctf_object_get_ref(element_obj);
- BT_LOGV("Appended element to array value: array-value-addr=%p, "
+ BT_LOGT("Appended element to array value: array-value-addr=%p, "
"element-value-addr=%p, new-size=%u",
array_obj, element_obj, typed_array_obj->garray->len);
return BT_CTF_VALUE_STATUS_OK;
bt_ctf_object_put_ref(g_ptr_array_index(typed_array_obj->garray, index));
g_ptr_array_index(typed_array_obj->garray, index) = element_obj;
bt_ctf_object_get_ref(element_obj);
- BT_LOGV("Set array value's element: array-value-addr=%p, "
+ BT_LOGT("Set array value's element: array-value-addr=%p, "
"index=%" PRIu64 ", element-value-addr=%p",
array_obj, index, element_obj);
return BT_CTF_VALUE_STATUS_OK;
g_hash_table_insert(BT_CTF_VALUE_TO_MAP(map_obj)->ght,
GUINT_TO_POINTER(g_quark_from_string(key)), element_obj);
bt_ctf_object_get_ref(element_obj);
- BT_LOGV("Inserted value into map value: map-value-addr=%p, "
+ BT_LOGT("Inserted value into map value: map-value-addr=%p, "
"key=\"%s\", element-value-addr=%p",
map_obj, key, element_obj);
return BT_CTF_VALUE_STATUS_OK;
const char *key_str = g_quark_to_string(GPOINTER_TO_UINT(key));
if (!cb(key_str, element_obj, data)) {
- BT_LOGV("User canceled the loop: key=\"%s\", "
+ BT_LOGT("User canceled the loop: key=\"%s\", "
"value-addr=%p, data=%p",
key_str, element_obj, data);
ret = BT_CTF_VALUE_STATUS_CANCELED;
BT_CTF_ASSERT_PRE_NON_NULL(object_b, "Value object B");
if (object_a->type != object_b->type) {
- BT_LOGV("Values are different: type mismatch: "
+ BT_LOGT("Values are different: type mismatch: "
"value-a-addr=%p, value-b-addr=%p, "
"value-a-type=%d, value-b-type=%d",
object_a, object_b, object_a->type, object_b->type);
#define BT_LIB_LOGW(_fmt, ...) BT_LIB_LOG(BT_LOG_WARN, _fmt, ##__VA_ARGS__)
#define BT_LIB_LOGI(_fmt, ...) BT_LIB_LOG(BT_LOG_INFO, _fmt, ##__VA_ARGS__)
#define BT_LIB_LOGD(_fmt, ...) BT_LIB_LOG(BT_LOG_DEBUG, _fmt, ##__VA_ARGS__)
-#define BT_LIB_LOGV(_fmt, ...) BT_LIB_LOG(BT_LOG_VERBOSE, _fmt, ##__VA_ARGS__)
+#define BT_LIB_LOGT(_fmt, ...) BT_LIB_LOG(BT_LOG_TRACE, _fmt, ##__VA_ARGS__)
/*
* Log statement, specialized for the Babeltrace library.
BT_ASSERT(pool);
-#ifdef BT_LOGV
- BT_LOGV("Creating object from pool: pool-addr=%p, pool-size=%zu, pool-cap=%u",
+#ifdef BT_LOGT
+ BT_LOGT("Creating object from pool: pool-addr=%p, pool-size=%zu, pool-cap=%u",
pool, pool->size, pool->objects->len);
#endif
obj = pool->funcs.new_object(pool->data);
end:
-#ifdef BT_LOGV
- BT_LOGV("Created one object from pool: pool-addr=%p, obj-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Created one object from pool: pool-addr=%p, obj-addr=%p",
pool, obj);
#endif
BT_ASSERT(pool);
BT_ASSERT(obj);
-#ifdef BT_LOGV
- BT_LOGV("Recycling object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Recycling object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
pool, pool->size, pool->objects->len, obj);
#endif
pool->objects->pdata[pool->size] = obj;
pool->size++;
-#ifdef BT_LOGV
- BT_LOGV("Recycled object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
+#ifdef BT_LOGT
+ BT_LOGT("Recycled object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",
pool, pool->size, pool->objects->len, obj);
#endif
}
* for internal reference counting. Until we make this header generic
* for the whole project, make it possible to disable logging in this
* file by defining `BT_OBJECT_DONT_LOG` because it's possible that the
- * BT_LOGV() statements here won't find the log level
+ * BT_LOGT() statements here won't find the log level
* (`BT_LOG_OUTPUT_LEVEL`).
*/
-#if defined(BT_LOGV) && !defined(BT_OBJECT_DONT_LOG)
+#if defined(BT_LOGT) && !defined(BT_OBJECT_DONT_LOG)
# define _BT_OBJECT_LOGGING_ENABLED
#endif
BT_ASSERT(child->is_shared);
#ifdef _BT_OBJECT_LOGGING_ENABLED
- BT_LOGV("Setting object's parent: addr=%p, parent-addr=%p",
+ BT_LOGT("Setting object's parent: addr=%p, parent-addr=%p",
child, parent);
#endif
struct bt_object *parent = obj->parent;
#ifdef _BT_OBJECT_LOGGING_ENABLED
- BT_LOGV("Releasing parented object: addr=%p, ref-count=%llu, "
+ BT_LOGT("Releasing parented object: addr=%p, ref-count=%llu, "
"parent-addr=%p, parent-ref-count=%llu",
obj, obj->ref_count,
parent, parent->ref_count);
BT_ASSERT(obj->is_shared);
#ifdef _BT_OBJECT_LOGGING_ENABLED
- BT_LOGV("Incrementing object's reference count: %llu -> %llu: "
+ BT_LOGT("Incrementing object's reference count: %llu -> %llu: "
"addr=%p, cur-count=%llu, new-count=%llu",
obj->ref_count, obj->ref_count + 1,
obj, obj->ref_count, obj->ref_count + 1);
if (G_UNLIKELY(obj->parent && bt_object_get_ref_count(obj) == 0)) {
#ifdef _BT_OBJECT_LOGGING_ENABLED
- BT_LOGV("Incrementing object's parent's reference count: "
+ BT_LOGT("Incrementing object's parent's reference count: "
"addr=%p, parent-addr=%p", obj, obj->parent);
#endif
}
#ifdef _BT_OBJECT_LOGGING_ENABLED
- BT_LOGV("Incrementing object's reference count: %llu -> %llu: "
+ BT_LOGT("Incrementing object's reference count: %llu -> %llu: "
"addr=%p, cur-count=%llu, new-count=%llu",
obj->ref_count, obj->ref_count + 1,
obj, obj->ref_count, obj->ref_count + 1);
BT_ASSERT(obj->ref_count > 0);
#ifdef _BT_OBJECT_LOGGING_ENABLED
- BT_LOGV("Decrementing object's reference count: %llu -> %llu: "
+ BT_LOGT("Decrementing object's reference count: %llu -> %llu: "
"addr=%p, cur-count=%llu, new-count=%llu",
obj->ref_count, obj->ref_count - 1,
obj, obj->ref_count, obj->ref_count - 1);
{
if (BT_VALUE_TO_BOOL(object_a)->value !=
BT_VALUE_TO_BOOL(object_b)->value) {
- BT_LOGV("Boolean value objects are different: "
+ BT_LOGT("Boolean value objects are different: "
"bool-a-val=%d, bool-b-val=%d",
BT_VALUE_TO_BOOL(object_a)->value,
BT_VALUE_TO_BOOL(object_b)->value);
if (BT_VALUE_TO_INTEGER(object_a)->value.u !=
BT_VALUE_TO_INTEGER(object_b)->value.u) {
if (object_a->type == BT_VALUE_TYPE_UNSIGNED_INTEGER) {
- BT_LOGV("Unsigned integer value objects are different: "
+ BT_LOGT("Unsigned integer value objects are different: "
"int-a-val=%" PRIu64 ", int-b-val=%" PRIu64,
BT_VALUE_TO_INTEGER(object_a)->value.u,
BT_VALUE_TO_INTEGER(object_b)->value.u);
} else {
- BT_LOGV("Signed integer value objects are different: "
+ BT_LOGT("Signed integer value objects are different: "
"int-a-val=%" PRId64 ", int-b-val=%" PRId64,
BT_VALUE_TO_INTEGER(object_a)->value.i,
BT_VALUE_TO_INTEGER(object_b)->value.i);
{
if (BT_VALUE_TO_REAL(object_a)->value !=
BT_VALUE_TO_REAL(object_b)->value) {
- BT_LOGV("Real number value objects are different: "
+ BT_LOGT("Real number value objects are different: "
"real-a-val=%f, real-b-val=%f",
BT_VALUE_TO_REAL(object_a)->value,
BT_VALUE_TO_REAL(object_b)->value);
{
if (strcmp(BT_VALUE_TO_STRING(object_a)->gstr->str,
BT_VALUE_TO_STRING(object_b)->gstr->str) != 0) {
- BT_LOGV("String value objects are different: "
+ BT_LOGT("String value objects are different: "
"string-a-val=\"%s\", string-b-val=\"%s\"",
BT_VALUE_TO_STRING(object_a)->gstr->str,
BT_VALUE_TO_STRING(object_b)->gstr->str);
if (bt_value_array_get_size(object_a) !=
bt_value_array_get_size(object_b)) {
- BT_LOGV("Array values are different: size mismatch "
+ BT_LOGT("Array values are different: size mismatch "
"value-a-addr=%p, value-b-addr=%p, "
"value-a-size=%" PRId64 ", value-b-size=%" PRId64,
object_a, object_b,
object_b, i);
if (!bt_value_compare(element_obj_a, element_obj_b)) {
- BT_LOGV("Array values's elements are different: "
+ BT_LOGT("Array values's elements are different: "
"value-a-addr=%p, value-b-addr=%p, index=%d",
element_obj_a, element_obj_b, i);
ret = BT_FALSE;
if (bt_value_map_get_size(object_a) !=
bt_value_map_get_size(object_b)) {
- BT_LOGV("Map values are different: size mismatch "
+ BT_LOGT("Map values are different: size mismatch "
"value-a-addr=%p, value-b-addr=%p, "
"value-a-size=%" PRId64 ", value-b-size=%" PRId64,
object_a, object_b,
key_str);
if (!bt_value_compare(element_obj_a, element_obj_b)) {
- BT_LOGV("Map values's elements are different: "
+ BT_LOGT("Map values's elements are different: "
"value-a-addr=%p, value-b-addr=%p, key=\"%s\"",
element_obj_a, element_obj_b, key_str);
ret = BT_FALSE;
BT_ASSERT_PRE_VALUE_IS_TYPE(bool_obj, BT_VALUE_TYPE_BOOL);
BT_ASSERT_PRE_VALUE_HOT(bool_obj, "Value object");
BT_VALUE_TO_BOOL(bool_obj)->value = val;
- BT_LOGV("Set boolean value's raw value: value-addr=%p, value=%d",
+ BT_LOGT("Set boolean value's raw value: value-addr=%p, value=%d",
bool_obj, val);
}
uint64_t val)
{
bt_value_integer_set(integer_obj, BT_VALUE_TYPE_UNSIGNED_INTEGER, val);
- BT_LOGV("Set unsigned integer value's raw value: "
+ BT_LOGT("Set unsigned integer value's raw value: "
"value-addr=%p, value=%" PRIu64, integer_obj, val);
}
{
bt_value_integer_set(integer_obj, BT_VALUE_TYPE_SIGNED_INTEGER,
(uint64_t) val);
- BT_LOGV("Set signed integer value's raw value: "
+ BT_LOGT("Set signed integer value's raw value: "
"value-addr=%p, value=%" PRId64, integer_obj, val);
}
BT_ASSERT_PRE_VALUE_IS_TYPE(real_obj, BT_VALUE_TYPE_REAL);
BT_ASSERT_PRE_VALUE_HOT(real_obj, "Value object");
BT_VALUE_TO_REAL(real_obj)->value = val;
- BT_LOGV("Set real number value's raw value: value-addr=%p, value=%f",
+ BT_LOGT("Set real number value's raw value: value-addr=%p, value=%f",
real_obj, val);
}
BT_ASSERT_PRE_VALUE_IS_TYPE(string_obj, BT_VALUE_TYPE_STRING);
BT_ASSERT_PRE_VALUE_HOT(string_obj, "Value object");
g_string_assign(BT_VALUE_TO_STRING(string_obj)->gstr, val);
- BT_LOGV("Set string value's raw value: value-addr=%p, raw-value-addr=%p",
+ BT_LOGT("Set string value's raw value: value-addr=%p, raw-value-addr=%p",
string_obj, val);
return BT_VALUE_STATUS_OK;
}
BT_ASSERT_PRE_VALUE_HOT(array_obj, "Array value object");
g_ptr_array_add(typed_array_obj->garray, element_obj);
bt_object_get_ref(element_obj);
- BT_LOGV("Appended element to array value: array-value-addr=%p, "
+ BT_LOGT("Appended element to array value: array-value-addr=%p, "
"element-value-addr=%p, new-size=%u",
array_obj, element_obj, typed_array_obj->garray->len);
return BT_VALUE_STATUS_OK;
bt_object_put_ref(g_ptr_array_index(typed_array_obj->garray, index));
g_ptr_array_index(typed_array_obj->garray, index) = element_obj;
bt_object_get_ref(element_obj);
- BT_LOGV("Set array value's element: array-value-addr=%p, "
+ BT_LOGT("Set array value's element: array-value-addr=%p, "
"index=%" PRIu64 ", element-value-addr=%p",
array_obj, index, element_obj);
return BT_VALUE_STATUS_OK;
g_hash_table_insert(BT_VALUE_TO_MAP(map_obj)->ght,
GUINT_TO_POINTER(g_quark_from_string(key)), element_obj);
bt_object_get_ref(element_obj);
- BT_LOGV("Inserted value into map value: map-value-addr=%p, "
+ BT_LOGT("Inserted value into map value: map-value-addr=%p, "
"key=\"%s\", element-value-addr=%p",
map_obj, key, element_obj);
return BT_VALUE_STATUS_OK;
const char *key_str = g_quark_to_string(GPOINTER_TO_UINT(key));
if (!func(key_str, element_obj, data)) {
- BT_LOGV("User canceled the loop: key=\"%s\", "
+ BT_LOGT("User canceled the loop: key=\"%s\", "
"value-addr=%p, data=%p",
key_str, element_obj, data);
ret = BT_VALUE_STATUS_CANCELED;
BT_ASSERT_PRE_NON_NULL(object_b, "Value object B");
if (object_a->type != object_b->type) {
- BT_LOGV("Values are different: type mismatch: "
+ BT_LOGT("Values are different: type mismatch: "
"value-a-addr=%p, value-b-addr=%p, "
"value-a-type=%s, value-b-type=%s",
object_a, object_b,
{
switch (lvl)
{
- case BT_LOG_VERBOSE:
+ case BT_LOG_TRACE:
return ANDROID_LOG_VERBOSE;
case BT_LOG_DEBUG:
return ANDROID_LOG_DEBUG;
{
switch (lvl)
{
- case BT_LOG_VERBOSE:
+ case BT_LOG_TRACE:
return 7; /* ASL_LEVEL_DEBUG / kCFLogLevelDebug */;
case BT_LOG_DEBUG:
return 7; /* ASL_LEVEL_DEBUG / kCFLogLevelDebug */;
{
switch (lvl)
{
- case BT_LOG_VERBOSE:
- return 'V';
+ case BT_LOG_TRACE:
+ return 'T';
case BT_LOG_DEBUG:
return 'D';
case BT_LOG_INFO:
* Example: app started, user logged in.
* - BT_LOG_DEBUG - minimal set of events that could help to reconstruct the
* execution path. Usually disabled in release builds.
- * - BT_LOG_VERBOSE - all other events. Usually disabled in release builds.
+ * - BT_LOG_TRACE - all other events. Usually disabled in release builds.
*
* *Ideally*, log file of debugged, well tested, production ready application
* should be empty or very small. Choosing a right log level is as important as
* providing short and self descriptive log message.
*/
-#define BT_LOG_VERBOSE BT_LOGGING_LEVEL_VERBOSE
+#define BT_LOG_TRACE BT_LOGGING_LEVEL_TRACE
#define BT_LOG_DEBUG BT_LOGGING_LEVEL_DEBUG
#define BT_LOG_INFO BT_LOGGING_LEVEL_INFO
#define BT_LOG_WARN BT_LOGGING_LEVEL_WARN
* And when necessary to override it with BT_LOG_LEVEL in .c/.cpp/.m files
* before including bt_log.h:
*
- * #define BT_LOG_LEVEL BT_LOG_VERBOSE
+ * #define BT_LOG_LEVEL BT_LOG_TRACE
* #include "logging.h"
*
* If both BT_LOG_DEF_LEVEL and BT_LOG_LEVEL are undefined, then
* See BT_LOG_LEVEL for details.
*/
#define BT_LOG_ENABLED(lvl) ((lvl) >= _BT_LOG_LEVEL)
-#define BT_LOG_ENABLED_VERBOSE BT_LOG_ENABLED(BT_LOG_VERBOSE)
+#define BT_LOG_ENABLED_TRACE BT_LOG_ENABLED(BT_LOG_TRACE)
#define BT_LOG_ENABLED_DEBUG BT_LOG_ENABLED(BT_LOG_DEBUG)
#define BT_LOG_ENABLED_INFO BT_LOG_ENABLED(BT_LOG_INFO)
#define BT_LOG_ENABLED_WARN BT_LOG_ENABLED(BT_LOG_WARN)
(BT_LOG_ENABLED((lvl)) && (lvl) >= (cur_lvl))
#define BT_LOG_ON(lvl) \
(BT_LOG_ENABLED((lvl)) && (lvl) >= _BT_LOG_OUTPUT_LEVEL)
-#define BT_LOG_ON_VERBOSE BT_LOG_ON(BT_LOG_VERBOSE)
+#define BT_LOG_ON_TRACE BT_LOG_ON(BT_LOG_TRACE)
#define BT_LOG_ON_DEBUG BT_LOG_ON(BT_LOG_DEBUG)
#define BT_LOG_ON_INFO BT_LOG_ON(BT_LOG_INFO)
#define BT_LOG_ON_WARN BT_LOG_ON(BT_LOG_WARN)
#endif
/* Message logging macros:
- * - BT_LOGV("format string", args, ...)
+ * - BT_LOGT("format string", args, ...)
* - BT_LOGD("format string", args, ...)
* - BT_LOGI("format string", args, ...)
* - BT_LOGW("format string", args, ...)
* - BT_LOGF("format string", args, ...)
*
* Message and error string (errno) logging macros:
- * - BT_LOGV_ERRNO("initial message", "format string", args, ...)
+ * - BT_LOGT_ERRNO("initial message", "format string", args, ...)
* - BT_LOGD_ERRNO("initial message", "format string", args, ...)
* - BT_LOGI_ERRNO("initial message", "format string", args, ...)
* - BT_LOGW_ERRNO("initial message", "format string", args, ...)
* - BT_LOGF_ERRNO("initial message", "format string", args, ...)
*
* Memory logging macros:
- * - BT_LOGV_MEM(data_ptr, data_sz, "format string", args, ...)
+ * - BT_LOGT_MEM(data_ptr, data_sz, "format string", args, ...)
* - BT_LOGD_MEM(data_ptr, data_sz, "format string", args, ...)
* - BT_LOGI_MEM(data_ptr, data_sz, "format string", args, ...)
* - BT_LOGW_MEM(data_ptr, data_sz, "format string", args, ...)
* - BT_LOGF_MEM(data_ptr, data_sz, "format string", args, ...)
*
* Auxiliary logging macros:
- * - BT_LOGV_AUX(&log_instance, "format string", args, ...)
+ * - BT_LOGT_AUX(&log_instance, "format string", args, ...)
* - BT_LOGD_AUX(&log_instance, "format string", args, ...)
* - BT_LOGI_AUX(&log_instance, "format string", args, ...)
* - BT_LOGW_AUX(&log_instance, "format string", args, ...)
* - BT_LOGF_AUX(&log_instance, "format string", args, ...)
*
* Auxiliary memory logging macros:
- * - BT_LOGV_MEM_AUX(&log_instance, data_ptr, data_sz, "format string", args, ...)
+ * - BT_LOGT_MEM_AUX(&log_instance, data_ptr, data_sz, "format string", args, ...)
* - BT_LOGD_MEM_AUX(&log_instance, data_ptr, data_sz, "format string", args, ...)
* - BT_LOGI_MEM_AUX(&log_instance, data_ptr, data_sz, "format string", args, ...)
* - BT_LOGW_MEM_AUX(&log_instance, data_ptr, data_sz, "format string", args, ...)
* - BT_LOGF_MEM_AUX(&log_instance, data_ptr, data_sz, "format string", args, ...)
*
* Preformatted string logging macros:
- * - BT_LOGV_STR("preformatted string");
+ * - BT_LOGT_STR("preformatted string");
* - BT_LOGD_STR("preformatted string");
* - BT_LOGI_STR("preformatted string");
* - BT_LOGW_STR("preformatted string");
#define _BT_LOG_UNUSED(...) \
do { _BT_LOG_NEVER _bt_log_unused(0, __VA_ARGS__); } _BT_LOG_ONCE
-#if BT_LOG_ENABLED_VERBOSE
- #define BT_LOGV(...) \
- BT_LOG_WRITE(BT_LOG_VERBOSE, _BT_LOG_TAG, __VA_ARGS__)
- #define BT_LOGV_ERRNO(...) \
- BT_LOG_WRITE_ERRNO(BT_LOG_VERBOSE, _BT_LOG_TAG, __VA_ARGS__)
- #define BT_LOGV_AUX(log, ...) \
- BT_LOG_WRITE_AUX(log, BT_LOG_VERBOSE, _BT_LOG_TAG, __VA_ARGS__)
- #define BT_LOGV_MEM(d, d_sz, ...) \
- BT_LOG_WRITE_MEM(BT_LOG_VERBOSE, _BT_LOG_TAG, d, d_sz, __VA_ARGS__)
- #define BT_LOGV_MEM_AUX(log, d, d_sz, ...) \
- BT_LOG_WRITE_MEM(log, BT_LOG_VERBOSE, _BT_LOG_TAG, d, d_sz, __VA_ARGS__)
+#if BT_LOG_ENABLED_TRACE
+ #define BT_LOGT(...) \
+ BT_LOG_WRITE(BT_LOG_TRACE, _BT_LOG_TAG, __VA_ARGS__)
+ #define BT_LOGT_ERRNO(...) \
+ BT_LOG_WRITE_ERRNO(BT_LOG_TRACE, _BT_LOG_TAG, __VA_ARGS__)
+ #define BT_LOGT_AUX(log, ...) \
+ BT_LOG_WRITE_AUX(log, BT_LOG_TRACE, _BT_LOG_TAG, __VA_ARGS__)
+ #define BT_LOGT_MEM(d, d_sz, ...) \
+ BT_LOG_WRITE_MEM(BT_LOG_TRACE, _BT_LOG_TAG, d, d_sz, __VA_ARGS__)
+ #define BT_LOGT_MEM_AUX(log, d, d_sz, ...) \
+ BT_LOG_WRITE_MEM(log, BT_LOG_TRACE, _BT_LOG_TAG, d, d_sz, __VA_ARGS__)
#else
- #define BT_LOGV(...) _BT_LOG_UNUSED(__VA_ARGS__)
- #define BT_LOGV_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__)
- #define BT_LOGV_MEM(...) _BT_LOG_UNUSED(__VA_ARGS__)
- #define BT_LOGV_MEM_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__)
+ #define BT_LOGT(...) _BT_LOG_UNUSED(__VA_ARGS__)
+ #define BT_LOGT_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__)
+ #define BT_LOGT_MEM(...) _BT_LOG_UNUSED(__VA_ARGS__)
+ #define BT_LOGT_MEM_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__)
#endif
#if BT_LOG_ENABLED_DEBUG
#define BT_LOGF_MEM_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__)
#endif
-#define BT_LOGV_STR(s) BT_LOGV("%s", (s))
+#define BT_LOGT_STR(s) BT_LOGT("%s", (s))
#define BT_LOGD_STR(s) BT_LOGD("%s", (s))
#define BT_LOGI_STR(s) BT_LOGI("%s", (s))
#define BT_LOGW_STR(s) BT_LOGW("%s", (s))
char letter;
switch (level) {
- case BT_LOG_VERBOSE:
- letter = 'V';
+ case BT_LOG_TRACE:
+ letter = 'T';
break;
case BT_LOG_DEBUG:
letter = 'D';
BT_ASSERT(str);
- if (strcmp(str, "VERBOSE") == 0 ||
- strcmp(str, "V") == 0) {
- level = BT_LOG_VERBOSE;
+ if (strcmp(str, "TRACE") == 0 ||
+ strcmp(str, "T") == 0) {
+ level = BT_LOG_TRACE;
} else if (strcmp(str, "DEBUG") == 0 ||
strcmp(str, "D") == 0) {
level = BT_LOG_DEBUG;
BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGD(_fmt, ...) \
BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__)
-#define BT_COMP_LOGV(_fmt, ...) \
- BT_COMP_LOG(BT_LOG_VERBOSE, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__)
+#define BT_COMP_LOGT(_fmt, ...) \
+ BT_COMP_LOG(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGF_STR(_str) \
BT_COMP_LOG(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), "%s", (_str))
#define BT_COMP_LOGE_STR(_str) \
BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), "%s", (_str))
#define BT_COMP_LOGD_STR(_str) \
BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), "%s", (_str))
-#define BT_COMP_LOGV_STR(_str) \
- BT_COMP_LOG(BT_LOG_VERBOSE, (BT_COMP_LOG_SELF_COMP), "%s", (_str))
+#define BT_COMP_LOGT_STR(_str) \
+ BT_COMP_LOG(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), "%s", (_str))
#define BT_COMP_LOGF_ERRNO(_msg, _fmt, ...) \
BT_COMP_LOG_ERRNO(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGE_ERRNO(_msg, _fmt, ...) \
BT_COMP_LOG_ERRNO(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGD_ERRNO(_msg, _fmt, ...) \
BT_COMP_LOG_ERRNO(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__)
-#define BT_COMP_LOGV_ERRNO(_msg, _fmt, ...) \
- BT_COMP_LOG_ERRNO(BT_LOG_VERBOSE, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__)
+#define BT_COMP_LOGT_ERRNO(_msg, _fmt, ...) \
+ BT_COMP_LOG_ERRNO(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGF_MEM(_data_ptr, _data_sz, _fmt, ...) \
BT_COMP_LOG_MEM(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGE_MEM(_data_ptr, _data_sz, _fmt, ...) \
BT_COMP_LOG_MEM(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__)
#define BT_COMP_LOGD_MEM(_data_ptr, _data_sz, _fmt, ...) \
BT_COMP_LOG_MEM(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__)
-#define BT_COMP_LOGV_MEM(_data_ptr, _data_sz, _fmt, ...) \
- BT_COMP_LOG_MEM(BT_LOG_VERBOSE, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__)
+#define BT_COMP_LOGT_MEM(_data_ptr, _data_sz, _fmt, ...) \
+ BT_COMP_LOG_MEM(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__)
#define BT_COMP_LOG_SUPPORTED
BT_ASSERT(stack);
BT_ASSERT(base_class);
bfcr = stack->bfcr;
- BT_COMP_LOGV("Pushing field class on stack: stack-addr=%p, "
+ BT_COMP_LOGT("Pushing field class on stack: stack-addr=%p, "
"fc-addr=%p, fc-type=%d, base-length=%zu, "
"stack-size-before=%zu, stack-size-after=%zu",
stack, base_class, base_class->type,
BT_ASSERT(stack);
BT_ASSERT(stack_size(stack));
bfcr = stack->bfcr;
- BT_COMP_LOGV("Popping from stack: "
+ BT_COMP_LOGT("Popping from stack: "
"stack-addr=%p, stack-size-before=%u, stack-size-after=%u",
stack, stack->entries->len, stack->entries->len - 1);
stack->size--;
static inline
void consume_bits(struct bt_bfcr *bfcr, size_t incr)
{
- BT_COMP_LOGV("Advancing cursor: bfcr-addr=%p, cur-before=%zu, cur-after=%zu",
+ BT_COMP_LOGT("Advancing cursor: bfcr-addr=%p, cur-before=%zu, cur-after=%zu",
bfcr, bfcr->buf.at, bfcr->buf.at + incr);
bfcr->buf.at += incr;
}
abort();
}
- BT_COMP_LOGV("Read unsigned bit array: cur=%zu, size=%u, "
+ BT_COMP_LOGT("Read unsigned bit array: cur=%zu, size=%u, "
"bo=%d, val=%" PRIu64, at, field_size, bo, *v);
}
abort();
}
- BT_COMP_LOGV("Read signed bit array: cur=%zu, size=%u, "
+ BT_COMP_LOGT("Read signed bit array: cur=%zu, size=%u, "
"bo=%d, val=%" PRId64, at, field_size, bo, *v);
}
abort();
}
- BT_COMP_LOGV("Read floating point number value: bfcr=%p, cur=%zu, val=%f",
+ BT_COMP_LOGT("Read floating point number value: bfcr=%p, cur=%zu, val=%f",
bfcr, at, dblval);
if (bfcr->user.cbs.classes.floating_point) {
- BT_COMP_LOGV("Calling user function (floating point number).");
+ BT_COMP_LOGT("Calling user function (floating point number).");
status = bfcr->user.cbs.classes.floating_point(dblval,
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
read_signed_bitfield(bfcr, buf, at, field_size, bo, &v);
if (bfcr->user.cbs.classes.signed_int) {
- BT_COMP_LOGV("Calling user function (signed integer).");
+ BT_COMP_LOGT("Calling user function (signed integer).");
status = bfcr->user.cbs.classes.signed_int(v,
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
read_unsigned_bitfield(bfcr, buf, at, field_size, bo, &v);
if (bfcr->user.cbs.classes.unsigned_int) {
- BT_COMP_LOGV("Calling user function (unsigned integer).");
+ BT_COMP_LOGT("Calling user function (unsigned integer).");
status = bfcr->user.cbs.classes.unsigned_int(v,
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
(void *) bfcr->cur_basic_field_class;
if (!at_least_one_bit_left(bfcr)) {
- BT_COMP_LOGV("Reached end of data: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
goto end;
}
available = available_bits(bfcr);
needed_bits = fc->size - bfcr->stitch.at;
- BT_COMP_LOGV("Continuing basic field decoding: "
+ BT_COMP_LOGT("Continuing basic field decoding: "
"bfcr-addr=%p, field-size=%u, needed-size=%zu, "
"available-size=%zu",
bfcr, fc->size, needed_bits, available);
}
/* We are here; it means we don't have enough data to decode this */
- BT_COMP_LOGV_STR("Not enough data to read the next basic field: appending to stitch buffer.");
+ BT_COMP_LOGT_STR("Not enough data to read the next basic field: appending to stitch buffer.");
stitch_append_from_remaining_buf(bfcr);
status = BT_BFCR_STATUS_EOF;
(void *) bfcr->cur_basic_field_class;
if (!at_least_one_bit_left(bfcr)) {
- BT_COMP_LOGV("Reached end of data: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
goto end;
}
}
/* We are here; it means we don't have enough data to decode this */
- BT_COMP_LOGV_STR("Not enough data to read the next basic field: setting stitch buffer.");
+ BT_COMP_LOGT_STR("Not enough data to read the next basic field: setting stitch buffer.");
stitch_set_from_remaining_buf(bfcr);
bfcr->state = BFCR_STATE_READ_BASIC_CONTINUE;
status = BT_BFCR_STATUS_EOF;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
if (!at_least_one_bit_left(bfcr)) {
- BT_COMP_LOGV("Reached end of data: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
goto end;
}
result = memchr(first_chr, '\0', available_bytes);
if (begin && bfcr->user.cbs.classes.string_begin) {
- BT_COMP_LOGV("Calling user function (string, beginning).");
+ BT_COMP_LOGT("Calling user function (string, beginning).");
status = bfcr->user.cbs.classes.string_begin(
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
if (!result) {
/* No null character yet */
if (bfcr->user.cbs.classes.string) {
- BT_COMP_LOGV("Calling user function (substring).");
+ BT_COMP_LOGT("Calling user function (substring).");
status = bfcr->user.cbs.classes.string(
(const char *) first_chr,
available_bytes, bfcr->cur_basic_field_class,
bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
size_t result_len = (size_t) (result - first_chr);
if (bfcr->user.cbs.classes.string && result_len) {
- BT_COMP_LOGV("Calling user function (substring).");
+ BT_COMP_LOGT("Calling user function (substring).");
status = bfcr->user.cbs.classes.string(
(const char *) first_chr,
result_len, bfcr->cur_basic_field_class,
bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
}
if (bfcr->user.cbs.classes.string_end) {
- BT_COMP_LOGV("Calling user function (string, end).");
+ BT_COMP_LOGT("Calling user function (string, end).");
status = bfcr->user.cbs.classes.string_end(
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
goto end;
} else {
/* No: need more data */
- BT_COMP_LOGV("Reached end of data when aligning: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data when aligning: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
}
/* Are we done with this base class? */
while (top->index == top->base_len) {
if (bfcr->user.cbs.classes.compound_end) {
- BT_COMP_LOGV("Calling user function (compound, end).");
+ BT_COMP_LOGT("Calling user function (compound, end).");
status = bfcr->user.cbs.classes.compound_end(
top->base_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
if (next_field_class->is_compound) {
if (bfcr->user.cbs.classes.compound_begin) {
- BT_COMP_LOGV("Calling user function (compound, begin).");
+ BT_COMP_LOGT("Calling user function (compound, begin).");
status = bfcr->user.cbs.classes.compound_begin(
next_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
bfcr->state = BFCR_STATE_ALIGN_COMPOUND;
} else {
/* Replace current basic field class */
- BT_COMP_LOGV("Replacing current basic field class: "
+ BT_COMP_LOGT("Replacing current basic field class: "
"bfcr-addr=%p, cur-basic-fc-addr=%p, "
"next-basic-fc-addr=%p",
bfcr, bfcr->cur_basic_field_class, next_field_class);
{
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- BT_COMP_LOGV("Handling state: bfcr-addr=%p, state=%s",
+ BT_COMP_LOGT("Handling state: bfcr-addr=%p, state=%s",
bfcr, bfcr_state_string(bfcr->state));
switch (bfcr->state) {
break;
}
- BT_COMP_LOGV("Handled state: bfcr-addr=%p, status=%s",
+ BT_COMP_LOGT("Handled state: bfcr-addr=%p, status=%s",
bfcr, bt_bfcr_status_string(status));
return status;
}
static
void update_packet_offset(struct bt_bfcr *bfcr)
{
- BT_COMP_LOGV("Updating packet offset for next call: "
+ BT_COMP_LOGT("Updating packet offset for next call: "
"bfcr-addr=%p, cur-packet-offset=%zu, next-packet-offset=%zu",
bfcr, bfcr->buf.packet_offset,
bfcr->buf.packet_offset + bfcr->buf.at);
bfcr->buf.sz = BYTES_TO_BITS(sz) - offset;
*status = BT_BFCR_STATUS_OK;
- BT_COMP_LOGV("Starting decoding: bfcr-addr=%p, fc-addr=%p, "
+ BT_COMP_LOGT("Starting decoding: bfcr-addr=%p, fc-addr=%p, "
"buf-addr=%p, buf-size=%zu, offset=%zu, "
"packet-offset=%zu",
bfcr, cls, buf, sz, offset, packet_offset);
int stack_ret;
if (bfcr->user.cbs.classes.compound_begin) {
- BT_COMP_LOGV("Calling user function (compound, begin).");
+ BT_COMP_LOGT("Calling user function (compound, begin).");
*status = bfcr->user.cbs.classes.compound_begin(
cls, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(*status));
if (*status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
}
/* Run the machine! */
- BT_COMP_LOGV_STR("Running the state machine.");
+ BT_COMP_LOGT_STR("Running the state machine.");
while (true) {
*status = handle_state(bfcr);
bfcr->buf.sz = BYTES_TO_BITS(sz);
*status = BT_BFCR_STATUS_OK;
- BT_COMP_LOGV("Continuing decoding: bfcr-addr=%p, buf-addr=%p, buf-size=%zu",
+ BT_COMP_LOGT("Continuing decoding: bfcr-addr=%p, buf-addr=%p, buf-size=%zu",
bfcr, buf, sz);
/* Continue running the machine */
- BT_COMP_LOGV_STR("Running the state machine.");
+ BT_COMP_LOGT_STR("Running the state machine.");
while (true) {
*status = handle_state(bfcr);
}
}
- if (BT_LOG_ON_VERBOSE && ret == 0) {
+ if (BT_LOG_ON_TRACE && ret == 0) {
GString *field_path_pretty = ctf_field_path_string(field_path);
const char *field_path_pretty_str =
field_path_pretty ? field_path_pretty->str : NULL;
int64_t lca_index = 0;
uint64_t field_path1_len, field_path2_len;
- if (BT_LOG_ON_VERBOSE) {
+ if (BT_LOG_ON_TRACE) {
GString *field_path1_pretty =
ctf_field_path_string(field_path1);
GString *field_path2_pretty =
}
}
- if (BT_LOG_ON_VERBOSE) {
+ if (BT_LOG_ON_TRACE) {
yydebug = 1;
}
0{OCTALDIGIT}*{INTEGER_SUFFIX}? PARSE_INTEGER_LITERAL(8); return CTF_INTEGER_LITERAL;
0[xX]{HEXDIGIT}+{INTEGER_SUFFIX}? PARSE_INTEGER_LITERAL(16); return CTF_INTEGER_LITERAL;
-{IDENTIFIER} BT_LOGV("Got identifier: id=\"%s\"", yytext); setstring(yyextra, yylval, yytext); if (is_type(yyextra, yytext)) return ID_TYPE; else return IDENTIFIER;
+{IDENTIFIER} BT_LOGT("Got identifier: id=\"%s\"", yytext); setstring(yyextra, yylval, yytext); if (is_type(yyextra, yytext)) return ID_TYPE; else return IDENTIFIER;
[ \t\r\n] ; /* ignore */
. _BT_LOGE_LINENO(yylineno, "Invalid character: char=\"%c\", val=0x%02x", isprint(yytext[0]) ? yytext[0] : '\0', yytext[0]); return CTF_ERROR;
%%
bt_self_component *self_comp;
};
-#define _BT_LOGV_LINENO(_lineno, _msg, args...) \
- BT_LOGV("At line %u in metadata stream: " _msg, _lineno, ## args)
+#define _BT_LOGT_LINENO(_lineno, _msg, args...) \
+ BT_LOGT("At line %u in metadata stream: " _msg, _lineno, ## args)
#define _BT_LOGW_LINENO(_lineno, _msg, args...) \
BT_LOGW("At line %u in metadata stream: " _msg, _lineno, ## args)
#define _BT_LOGE_LINENO(_lineno, _msg, args...) \
BT_LOGE("At line %u in metadata stream: " _msg, _lineno, ## args)
-#define _BT_COMP_LOGV_LINENO(_lineno, _msg, args...) \
- BT_COMP_LOGV("At line %u in metadata stream: " _msg, _lineno, ## args)
+#define _BT_COMP_LOGT_LINENO(_lineno, _msg, args...) \
+ BT_COMP_LOGT("At line %u in metadata stream: " _msg, _lineno, ## args)
#define _BT_COMP_LOGW_LINENO(_lineno, _msg, args...) \
BT_COMP_LOGW("At line %u in metadata stream: " _msg, _lineno, ## args)
#include "ast.h"
#include "objstack.h"
-#if BT_LOG_ENABLED_VERBOSE
+#if BT_LOG_ENABLED_TRACE
# define YYDEBUG 1
-# define YYFPRINTF(_stream, _fmt, args...) BT_LOGV(_fmt, ## args)
+# define YYFPRINTF(_stream, _fmt, args...) BT_LOGT(_fmt, ## args)
#else
# define YYDEBUG 0
#endif
{
struct ctf_scanner_scope *ns;
- BT_LOGV("Pushing scope: scanner-addr=%p", scanner);
+ BT_LOGT("Pushing scope: scanner-addr=%p", scanner);
ns = malloc(sizeof(struct ctf_scanner_scope));
init_scope(ns, scanner->cs);
scanner->cs = ns;
{
struct ctf_scanner_scope *os;
- BT_LOGV("Popping scope: scanner-addr=%p", scanner);
+ BT_LOGT("Popping scope: scanner-addr=%p", scanner);
os = scanner->cs;
scanner->cs = os->parent;
finalize_scope(os);
int ret;
ret = GPOINTER_TO_INT(g_hash_table_lookup(s->classes, id));
- BT_LOGV("Looked up type: scanner-addr=%p, id=\"%s\", ret=%d",
+ BT_LOGT("Looked up type: scanner-addr=%p, id=\"%s\", ret=%d",
s, id, ret);
return ret;
}
break;
}
}
- BT_LOGV("Found if ID is type: scanner-addr=%p, id=\"%s\", ret=%d",
+ BT_LOGT("Found if ID is type: scanner-addr=%p, id=\"%s\", ret=%d",
scanner, id, ret);
return ret;
}
static void add_type(struct ctf_scanner *scanner, char *id)
{
- BT_LOGV("Adding type: scanner-addr=%p, id=\"%s\"",
+ BT_LOGT("Adding type: scanner-addr=%p, id=\"%s\"",
scanner, id);
if (lookup_type(scanner->cs, id))
return;
#define _BT_COMP_LOGW_NODE(_node, _msg, args...) \
_BT_COMP_LOGW_LINENO((_node)->lineno, _msg, ## args)
-#define _BT_COMP_LOGV_NODE(_node, _msg, args...) \
- _BT_COMP_LOGV_LINENO((_node)->lineno, _msg, ## args)
+#define _BT_COMP_LOGT_NODE(_node, _msg, args...) \
+ _BT_COMP_LOGT_LINENO((_node)->lineno, _msg, ## args)
/*
* Declaration scope of a visitor context. This represents a TSDL
BT_ASSERT(stack);
notit = stack->notit;
BT_ASSERT(base);
- BT_COMP_LOGV("Pushing base field on stack: stack-addr=%p, "
+ BT_COMP_LOGT("Pushing base field on stack: stack-addr=%p, "
"stack-size-before=%zu, stack-size-after=%zu",
stack, stack->size, stack->size + 1);
BT_ASSERT(stack);
BT_ASSERT(stack_size(stack));
notit = stack->notit;
- BT_COMP_LOGV("Popping from stack: "
+ BT_COMP_LOGT("Popping from stack: "
"stack-addr=%p, stack-size-before=%zu, stack-size-after=%zu",
stack, stack->size, stack->size - 1);
stack->size--;
static inline
void buf_consume_bits(struct bt_msg_iter *notit, size_t incr)
{
- BT_COMP_LOGV("Advancing cursor: notit-addr=%p, cur-before=%zu, cur-after=%zu",
+ BT_COMP_LOGT("Advancing cursor: notit-addr=%p, cur-before=%zu, cur-after=%zu",
notit, notit->buf.at, notit->buf.at + incr);
notit->buf.at += incr;
}
size_t consumed_bits;
notit->cur_dscope_field = dscope_field;
- BT_COMP_LOGV("Starting BFCR: notit-addr=%p, bfcr-addr=%p, fc-addr=%p",
+ BT_COMP_LOGT("Starting BFCR: notit-addr=%p, bfcr-addr=%p, fc-addr=%p",
notit, notit->bfcr, dscope_fc);
consumed_bits = bt_bfcr_start(notit->bfcr, dscope_fc,
notit->buf.addr, notit->buf.at, packet_at(notit),
notit->buf.sz, &bfcr_status);
- BT_COMP_LOGV("BFCR consumed bits: size=%zu", consumed_bits);
+ BT_COMP_LOGT("BFCR consumed bits: size=%zu", consumed_bits);
switch (bfcr_status) {
case BT_BFCR_STATUS_OK:
/* Field class was read completely */
- BT_COMP_LOGV_STR("Field was completely decoded.");
+ BT_COMP_LOGT_STR("Field was completely decoded.");
notit->state = done_state;
break;
case BT_BFCR_STATUS_EOF:
- BT_COMP_LOGV_STR("BFCR needs more data to decode field completely.");
+ BT_COMP_LOGT_STR("BFCR needs more data to decode field completely.");
notit->state = continue_state;
break;
default:
enum bt_bfcr_status bfcr_status;
size_t consumed_bits;
- BT_COMP_LOGV("Continuing BFCR: notit-addr=%p, bfcr-addr=%p",
+ BT_COMP_LOGT("Continuing BFCR: notit-addr=%p, bfcr-addr=%p",
notit, notit->bfcr);
status = buf_ensure_available_bits(notit);
"msg-addr=%p, status=%s",
notit, bt_msg_iter_status_string(status));
} else {
- BT_COMP_LOGV("Cannot ensure that buffer has at least one byte: "
+ BT_COMP_LOGT("Cannot ensure that buffer has at least one byte: "
"msg-addr=%p, status=%s",
notit, bt_msg_iter_status_string(status));
}
consumed_bits = bt_bfcr_continue(notit->bfcr, notit->buf.addr,
notit->buf.sz, &bfcr_status);
- BT_COMP_LOGV("BFCR consumed bits: size=%zu", consumed_bits);
+ BT_COMP_LOGT("BFCR consumed bits: size=%zu", consumed_bits);
switch (bfcr_status) {
case BT_BFCR_STATUS_OK:
/* Type was read completely. */
- BT_COMP_LOGV_STR("Field was completely decoded.");
+ BT_COMP_LOGT_STR("Field was completely decoded.");
notit->state = done_state;
break;
case BT_BFCR_STATUS_EOF:
/* Stay in this continue state. */
- BT_COMP_LOGV_STR("BFCR needs more data to decode field completely.");
+ BT_COMP_LOGT_STR("BFCR needs more data to decode field completely.");
break;
default:
BT_COMP_LOGW("BFCR failed to continue: notit-addr=%p, bfcr-addr=%p, "
BT_ASSERT(notit->dscopes.event_common_context);
}
- BT_COMP_LOGV("Decoding event common context field: "
+ BT_COMP_LOGT("Decoding event common context field: "
"notit-addr=%p, stream-class-addr=%p, "
"stream-class-id=%" PRId64 ", "
"fc-addr=%p",
BT_ASSERT(notit->dscopes.event_spec_context);
}
- BT_COMP_LOGV("Decoding event specific context field: "
+ BT_COMP_LOGT("Decoding event specific context field: "
"notit-addr=%p, event-class-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"fc-addr=%p",
BT_ASSERT(notit->dscopes.event_payload);
}
- BT_COMP_LOGV("Decoding event payload field: "
+ BT_COMP_LOGT("Decoding event payload field: "
"notit-addr=%p, event-class-addr=%p, "
"event-class-name=\"%s\", event-class-id=%" PRId64 ", "
"fc-addr=%p",
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
const enum state state = notit->state;
- BT_COMP_LOGV("Handling state: notit-addr=%p, state=%s",
+ BT_COMP_LOGT("Handling state: notit-addr=%p, state=%s",
notit, state_string(state));
// TODO: optimalize!
abort();
}
- BT_COMP_LOGV("Handled state: notit-addr=%p, status=%s, "
+ BT_COMP_LOGT("Handled state: notit-addr=%p, status=%s, "
"prev-state=%s, cur-state=%s",
notit, bt_msg_iter_status_string(status),
state_string(state), state_string(notit->state));
notit->default_clock_snapshot |= new_val;
end:
- BT_COMP_LOGV("Updated default clock's value from integer field's value: "
+ BT_COMP_LOGT("Updated default clock's value from integer field's value: "
"value=%" PRIu64, notit->default_clock_snapshot);
}
bt_field *field = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
- BT_COMP_LOGV("Unsigned integer function called from BFCR: "
+ BT_COMP_LOGT("Unsigned integer function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d, value=%" PRIu64,
notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
struct ctf_field_class_int *int_fc = (void *) fc;
char str[2] = {'\0', '\0'};
- BT_COMP_LOGV("Unsigned integer character function called from BFCR: "
+ BT_COMP_LOGT("Unsigned integer character function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d, value=%" PRIu64,
notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
struct bt_msg_iter *notit = data;
struct ctf_field_class_int *int_fc = (void *) fc;
- BT_COMP_LOGV("Signed integer function called from BFCR: "
+ BT_COMP_LOGT("Signed integer function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d, value=%" PRId64,
notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
bt_field *field = NULL;
struct bt_msg_iter *notit = data;
- BT_COMP_LOGV("Floating point number function called from BFCR: "
+ BT_COMP_LOGT("Floating point number function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d, value=%f",
notit, notit->bfcr, fc, fc->type, fc->in_ir, value);
struct bt_msg_iter *notit = data;
int ret;
- BT_COMP_LOGV("String (beginning) function called from BFCR: "
+ BT_COMP_LOGT("String (beginning) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d",
notit, notit->bfcr, fc, fc->type, fc->in_ir);
struct bt_msg_iter *notit = data;
int ret;
- BT_COMP_LOGV("String (substring) function called from BFCR: "
+ BT_COMP_LOGT("String (substring) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d, string-length=%zu",
notit, notit->bfcr, fc, fc->type, fc->in_ir,
{
struct bt_msg_iter *notit = data;
- BT_COMP_LOGV("String (end) function called from BFCR: "
+ BT_COMP_LOGT("String (end) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d",
notit, notit->bfcr, fc, fc->type, fc->in_ir);
struct bt_msg_iter *notit = data;
bt_field *field;
- BT_COMP_LOGV("Compound (beginning) function called from BFCR: "
+ BT_COMP_LOGT("Compound (beginning) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d",
notit, notit->bfcr, fc, fc->type, fc->in_ir);
{
struct bt_msg_iter *notit = data;
- BT_COMP_LOGV("Compound (end) function called from BFCR: "
+ BT_COMP_LOGT("Compound (end) function called from BFCR: "
"notit-addr=%p, bfcr-addr=%p, fc-addr=%p, "
"fc-type=%d, fc-in-ir=%d",
notit, notit->bfcr, fc, fc->type, fc->in_ir);
out_fc_type = bt_field_get_class_type(out_field);
BT_ASSERT(in_fc_type == out_fc_type);
- BT_COMP_LOGV("Copying content of field: in-f-addr=%p, out-f-addr=%p",
+ BT_COMP_LOGT("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:
default:
abort();
}
- BT_COMP_LOGV("Copied content of field: in-f-addr=%p, out-f-addr=%p",
+ BT_COMP_LOGT("Copied content of field: in-f-addr=%p, out-f-addr=%p",
in_field, out_field);
}
if (!cur_muxer_upstream_msg_iter->msg_iter) {
/* This upstream message iterator is ended */
- BT_COMP_LOGV("Skipping ended upstream message iterator: "
+ BT_COMP_LOGT("Skipping ended upstream message iterator: "
"muxer-upstream-msg-iter-wrap-addr=%p",
cur_muxer_upstream_msg_iter);
continue;
BT_ASSERT(self_comp);
muxer_comp = bt_self_component_get_data(self_comp);
BT_ASSERT(muxer_comp);
- BT_COMP_LOGV("Muxer component's message iterator's \"next\" method called: "
+ BT_COMP_LOGT("Muxer component's message iterator's \"next\" method called: "
"comp-addr=%p, muxer-comp-addr=%p, muxer-msg-iter-addr=%p, "
"msg-iter-addr=%p",
self_comp, muxer_comp, muxer_msg_iter, self_msg_iter);
self_comp, muxer_comp, muxer_msg_iter, self_msg_iter,
bt_common_self_message_iterator_status_string(status));
} else {
- BT_COMP_LOGV("Returning from muxer component's message iterator's \"next\" method: "
+ BT_COMP_LOGT("Returning from muxer component's message iterator's \"next\" method: "
"status=%s",
bt_common_self_message_iterator_status_string(status));
}