/*
- * validation.c
- *
- * Babeltrace - CTF writer: Validation of trace, stream class, and event class
+ * SPDX-License-Identifier: MIT
*
* Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Babeltrace - CTF writer: Validation of trace, stream class, and event class
*/
-#define BT_LOG_TAG "CTF-WRITER-VALIDATION"
+#define BT_LOG_TAG "CTF-WRITER/VALIDATION"
#include "logging.h"
-#include <babeltrace2/ctf-writer/object.h>
+#include <babeltrace2-ctf-writer/object.h>
-#include "common/babeltrace.h"
+#include "common/macros.h"
#include "assert-pre.h"
#include "event-class.h"
{
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) {