Visibility hidden by default
[babeltrace.git] / src / ctf-writer / validation.c
index 6522f865c799f3805b80fde6ee74825bf1856170..13fd9eb80bf3c355568cbfd5392ce806b2f08920 100644 (file)
@@ -1,33 +1,15 @@
 /*
- * 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/macros.h"
 
@@ -60,7 +42,7 @@ int validate_event_class_types(struct bt_ctf_private_value *environment,
 {
        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, "
@@ -122,7 +104,7 @@ int validate_stream_class_types(struct bt_ctf_private_value *environment,
 {
        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, "
@@ -187,7 +169,7 @@ int validate_trace_types(struct bt_ctf_private_value *environment,
 {
        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 */
@@ -263,7 +245,6 @@ end:
        return ret;
 }
 
-BT_HIDDEN
 int bt_ctf_validate_class_types(struct bt_ctf_private_value *environment,
                struct bt_ctf_field_type_common *packet_header_type,
                struct bt_ctf_field_type_common *packet_context_type,
@@ -280,7 +261,7 @@ int bt_ctf_validate_class_types(struct bt_ctf_private_value *environment,
        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, "
@@ -337,7 +318,7 @@ int bt_ctf_validate_class_types(struct bt_ctf_private_value *environment,
                                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) {
@@ -388,7 +369,7 @@ skip_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) {
@@ -419,7 +400,7 @@ skip_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) {
@@ -451,7 +432,7 @@ skip_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) {
@@ -513,7 +494,7 @@ sc_validation_done:
                                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) {
@@ -544,7 +525,7 @@ skip_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) {
@@ -608,7 +589,6 @@ error:
        return ret;
 }
 
-BT_HIDDEN
 void bt_ctf_validation_replace_types(struct bt_ctf_trace_common *trace,
                struct bt_ctf_stream_class_common *stream_class,
                struct bt_ctf_event_class_common *event_class,
@@ -641,7 +621,6 @@ void bt_ctf_validation_replace_types(struct bt_ctf_trace_common *trace,
        }
 }
 
-BT_HIDDEN
 void bt_ctf_validation_output_put_types(
                struct bt_ctf_validation_output *output)
 {
This page took 0.025029 seconds and 4 git commands to generate.