* SOFTWARE.
*/
-#include <babeltrace/ref-internal.h>
-#include <babeltrace/object-internal.h>
-
#define BT_LOG_TAG "REF"
#include <babeltrace/lib-logging-internal.h>
+#include <babeltrace/ref-internal.h>
+#include <babeltrace/object-internal.h>
+
void *bt_get(void *ptr)
{
struct bt_object *obj = ptr;
"addr=%p, parent-addr=%p", ptr, obj->parent);
bt_get(obj->parent);
}
+ BT_LOGV("Incrementing object's reference count: %lu -> %lu: "
+ "addr=%p, cur-count=%lu, new-count=%lu",
+ obj->ref_count.count, obj->ref_count.count + 1,
+ ptr,
+ obj->ref_count.count, obj->ref_count.count + 1);
bt_ref_get(&obj->ref_count);
- BT_LOGV("Incremented object's reference count: %lu -> %lu: "
- "addr=%p, new-count=%lu", obj->ref_count.count - 1,
- obj->ref_count.count, ptr, obj->ref_count.count);
end:
return obj;
}
}
BT_LOGV("Decrementing object's reference count: %lu -> %lu: "
- "addr=%p, cur-count=%lu", obj->ref_count.count,
- obj->ref_count.count - 1, ptr, obj->ref_count.count);
+ "addr=%p, cur-count=%lu, new-count=%lu",
+ obj->ref_count.count, obj->ref_count.count - 1,
+ ptr,
+ obj->ref_count.count, obj->ref_count.count - 1);
bt_ref_put(&obj->ref_count);
}