lib/ctf-ir/field-types.c: logging: log only specific functions
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 16 May 2017 00:57:45 +0000 (20:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:43 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/field-types.c

index 3e41cd69e3185d31ba523b0c0ac9f140aaa937dc..4b2f37cf9c3a3ced70955dddae0e68ab85da5dd0 100644 (file)
@@ -450,15 +450,10 @@ void bt_ctf_field_type_destroy(struct bt_object *obj)
        struct bt_ctf_field_type *type;
        enum bt_ctf_field_type_id type_id;
 
-       BT_LOGD("Destroying field type object: addr=%p", obj);
        type = container_of(obj, struct bt_ctf_field_type, base);
        type_id = type->id;
-       if (type_id <= BT_CTF_FIELD_TYPE_ID_UNKNOWN ||
-                       type_id >= BT_CTF_NR_TYPE_IDS) {
-               BT_LOGW("Unknown field type ID: addr=%p, id=%d", obj, type_id);
-               return;
-       }
-
+       assert(type_id > BT_CTF_FIELD_TYPE_ID_UNKNOWN &&
+               type_id < BT_CTF_NR_TYPE_IDS);
        type_destroy_funcs[type_id](type);
 }
 
@@ -3251,7 +3246,6 @@ void bt_ctf_field_type_freeze(struct bt_ctf_field_type *type)
                return;
        }
 
-       BT_LOGD("Freezing field type: addr=%p", type);
        type->freeze(type);
 }
 
@@ -3333,13 +3327,11 @@ int bt_ctf_field_type_serialize(struct bt_ctf_field_type *type,
        assert(type);
        assert(context);
 
-       BT_LOGD("Serializing field type's metadata: "
-               "ft-addr=%p, metadata-context-addr=%p", type, context);
-
        /* Make sure field type is valid before serializing it */
        ret = bt_ctf_field_type_validate(type);
        if (ret) {
-               BT_LOGW_STR("Cannot serialize field type's metadata: field type is invalid.");
+               BT_LOGW("Cannot serialize field type's metadata: field type is invalid: "
+                       "addr=%p", type);
                goto end;
        }
 
@@ -3352,8 +3344,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_copy(struct bt_ctf_field_type *type)
 {
        struct bt_ctf_field_type *copy = NULL;
 
-       BT_LOGD("Copying field type object: addr=%p", type);
-
        if (!type) {
                BT_LOGW_STR("Invalid parameter: field type is NULL.");
                goto end;
@@ -3366,7 +3356,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_copy(struct bt_ctf_field_type *type)
        }
 
        copy->alignment = type->alignment;
-       BT_LOGD("Copied field type object: copy-ft-addr=%p", copy);
 end:
        return copy;
 }
This page took 0.026651 seconds and 4 git commands to generate.