X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=src%2Fplugins%2Flttng-utils%2Fdebug-info%2Fdebug-info.c;h=545a4eee8c1c929ad6aef23a1d5605998c3fb6a2;hb=d9c39b0a4ad9517178899334c0ca89fd20901609;hp=75e1a6fe2b0381ebd5fb8c6903482ff9c58d6da4;hpb=26fc5aedf48df3f1654fe4d0b6ada1a10cd804f2;p=babeltrace.git diff --git a/src/plugins/lttng-utils/debug-info/debug-info.c b/src/plugins/lttng-utils/debug-info/debug-info.c index 75e1a6fe..545a4eee 100644 --- a/src/plugins/lttng-utils/debug-info/debug-info.c +++ b/src/plugins/lttng-utils/debug-info/debug-info.c @@ -29,7 +29,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include @@ -119,7 +119,7 @@ struct debug_info { bt_self_component *self_comp; struct debug_info_component *comp; const bt_trace *input_trace; - uint64_t destruction_listener_id; + bt_listener_id destruction_listener_id; /* * Hash table of VPIDs (pointer to int64_t) to @@ -363,7 +363,7 @@ static inline void event_get_common_context_signed_integer_field_value( const bt_event *event, const char *field_name, int64_t *value) { - *value = bt_field_signed_integer_get_value( + *value = bt_field_integer_signed_get_value( event_borrow_common_context_field(event, field_name)); } @@ -417,7 +417,7 @@ int event_get_payload_build_id_value(const bt_event *event, bt_field_array_borrow_element_field_by_index_const( build_id_field, i); - build_id[i] = bt_field_unsigned_integer_get_value(curr_field); + build_id[i] = bt_field_integer_unsigned_get_value(curr_field); } return ret; @@ -427,7 +427,7 @@ static void event_get_payload_unsigned_integer_field_value(const bt_event *event, const char *field_name, uint64_t *value) { - *value = bt_field_unsigned_integer_get_value( + *value = bt_field_integer_unsigned_get_value( event_borrow_payload_field(event, field_name)); } @@ -443,7 +443,7 @@ static inline bool event_has_payload_field(const bt_event *event, const char *field_name) { - return event_borrow_payload_field(event, field_name) != NULL; + return event_borrow_payload_field(event, field_name); } static @@ -1195,8 +1195,8 @@ void fill_debug_info_event_if_needed(struct debug_info_msg_iter *debug_it, ip_field = bt_field_structure_borrow_member_field_by_name_const( out_common_ctx_field, IP_FIELD_NAME); - vpid = bt_field_signed_integer_get_value(vpid_field); - ip = bt_field_unsigned_integer_get_value(ip_field); + vpid = bt_field_integer_signed_get_value(vpid_field); + ip = bt_field_integer_unsigned_get_value(ip_field); /* * Borrow the debug_info structure needed for the source @@ -1913,6 +1913,14 @@ handle_msg_error: bt_message_put_ref(msgs[i]); } + /* + * Drop references of all the input messages not dropped before the + * failure. + */ + for (i = curr_msg_idx; i < *count; i++) { + bt_message_put_ref(input_msgs[i]); + } + status = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR; end: @@ -1982,8 +1990,8 @@ bt_component_class_message_iterator_init_method_status debug_info_msg_iter_init( debug_info_msg_iter->self_comp = self_comp; /* Create an iterator on the upstream component. */ - upstream_iterator = bt_self_component_port_input_message_iterator_create( - input_port); + upstream_iterator = bt_self_component_port_input_message_iterator_create_from_message_iterator( + self_msg_iter, input_port); if (!upstream_iterator) { status = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_MEMORY_ERROR; goto error;