projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Always evaluate BT_ASSERT(); add BT_ASSERT_DBG() for debug mode only
[babeltrace.git]
/
src
/
plugins
/
utils
/
trimmer
/
trimmer.c
diff --git
a/src/plugins/utils/trimmer/trimmer.c
b/src/plugins/utils/trimmer/trimmer.c
index dc707008235e5f51cf1c352c8ed239ce1e654d51..889845a1d6fdde2ccb7cb1f53151625fe138cc57 100644
(file)
--- a/
src/plugins/utils/trimmer/trimmer.c
+++ b/
src/plugins/utils/trimmer/trimmer.c
@@
-776,9
+776,9
@@
int get_msg_ns_from_origin(const bt_message *msg, int64_t *ns_from_origin,
const bt_clock_snapshot *clock_snapshot = NULL;
int ret = 0;
const bt_clock_snapshot *clock_snapshot = NULL;
int ret = 0;
- BT_ASSERT(msg);
- BT_ASSERT(ns_from_origin);
- BT_ASSERT(has_clock_snapshot);
+ BT_ASSERT
_DBG
(msg);
+ BT_ASSERT
_DBG
(ns_from_origin);
+ BT_ASSERT
_DBG
(has_clock_snapshot);
switch (bt_message_get_type(msg)) {
case BT_MESSAGE_TYPE_EVENT:
switch (bt_message_get_type(msg)) {
case BT_MESSAGE_TYPE_EVENT:
@@
-986,7
+986,7
@@
state_set_trimmer_iterator_bounds(
continue;
}
continue;
}
- BT_ASSERT(ns_from_origin != INT64_MIN &&
+ BT_ASSERT
_DBG
(ns_from_origin != INT64_MIN &&
ns_from_origin != INT64_MAX);
put_messages(msgs, count);
goto found;
ns_from_origin != INT64_MAX);
put_messages(msgs, count);
goto found;
@@
-1377,9
+1377,9
@@
struct trimmer_iterator_stream_state *get_stream_state_entry(
{
struct trimmer_iterator_stream_state *sstate;
{
struct trimmer_iterator_stream_state *sstate;
- BT_ASSERT(stream);
+ BT_ASSERT
_DBG
(stream);
sstate = g_hash_table_lookup(trimmer_it->stream_states, stream);
sstate = g_hash_table_lookup(trimmer_it->stream_states, stream);
- BT_ASSERT(sstate);
+ BT_ASSERT
_DBG
(sstate);
return sstate;
}
return sstate;
}
@@
-1428,7
+1428,7
@@
handle_message_with_stream(
* class has a clock class. And we know it has, otherwise we
* couldn't be using the trimmer component.
*/
* class has a clock class. And we know it has, otherwise we
* couldn't be using the trimmer component.
*/
- BT_ASSERT(ns_from_origin);
+ BT_ASSERT
_DBG
(ns_from_origin);
if (G_UNLIKELY(!trimmer_it->end.is_infinite &&
*ns_from_origin > trimmer_it->end.ns_from_origin)) {
if (G_UNLIKELY(!trimmer_it->end.is_infinite &&
*ns_from_origin > trimmer_it->end.ns_from_origin)) {
@@
-1766,7
+1766,7
@@
void fill_message_array_from_output_messages(
(*count)++;
}
(*count)++;
}
- BT_ASSERT(*count > 0);
+ BT_ASSERT
_DBG
(*count > 0);
}
static inline
}
static inline
@@
-1823,7
+1823,7
@@
state_trim(struct trimmer_iterator *trimmer_it,
goto end;
}
goto end;
}
- BT_ASSERT(my_count > 0);
+ BT_ASSERT
_DBG
(my_count > 0);
for (i = 0; i < my_count; i++) {
status = handle_message(trimmer_it, my_msgs[i],
for (i = 0; i < my_count; i++) {
status = handle_message(trimmer_it, my_msgs[i],
@@
-1866,7
+1866,7
@@
state_trim(struct trimmer_iterator *trimmer_it,
* There's at least one message in the output message queue:
* move the messages to the output message array.
*/
* There's at least one message in the output message queue:
* move the messages to the output message array.
*/
- BT_ASSERT(!g_queue_is_empty(trimmer_it->output_messages));
+ BT_ASSERT
_DBG
(!g_queue_is_empty(trimmer_it->output_messages));
fill_message_array_from_output_messages(trimmer_it, msgs,
capacity, count);
fill_message_array_from_output_messages(trimmer_it, msgs,
capacity, count);
@@
-1885,7
+1885,7
@@
bt_component_class_message_iterator_next_method_status trimmer_msg_iter_next(
bt_component_class_message_iterator_next_method_status status =
BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK;
bt_component_class_message_iterator_next_method_status status =
BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK;
- BT_ASSERT(trimmer_it);
+ BT_ASSERT
_DBG
(trimmer_it);
if (G_LIKELY(trimmer_it->state == TRIMMER_ITERATOR_STATE_TRIM)) {
status = state_trim(trimmer_it, msgs, capacity, count);
if (G_LIKELY(trimmer_it->state == TRIMMER_ITERATOR_STATE_TRIM)) {
status = state_trim(trimmer_it, msgs, capacity, count);
This page took
0.02674 seconds
and
4
git commands to generate.