{
struct bt_object *obj = ptr;
+#ifdef BT_LOGV
+ BT_LOGV("Releasing object: addr=%p, ref-count=%lu", ptr,
+ obj->ref_count.count);
+#endif
+
if (obj && obj->release && !bt_object_get_ref_count(obj)) {
obj->release(obj);
}
void generic_release(struct bt_object *obj)
{
if (obj->parent) {
- void *parent = obj->parent;
+ struct bt_object *parent = obj->parent;
+
+#ifdef BT_LOGV
+ BT_LOGV("Releasing parented object: addr=%p, ref-count=%lu, "
+ "parent-addr=%p, parent-ref-count=%lu",
+ obj, obj->ref_count.count,
+ parent, parent->ref_count.count);
+#endif
if (obj->parent_is_owner_listener) {
/*
return;
}
+#ifdef BT_LOGV
+ BT_LOGV("Setting object's parent: addr=%p, parent-addr=%p",
+ child_ptr, parent);
+#endif
+
/*
* It is assumed that a "child" being "parented" is publicly reachable.
* Therefore, a reference to its parent must be taken. The reference
* SOFTWARE.
*/
+#define BT_LOG_TAG "ATTRS"
+
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/values.h>
#include <inttypes.h>
-
-#define BT_LOG_TAG "ATTRS"
#include <babeltrace/lib-logging-internal.h>
#define BT_CTF_ATTR_NAME_INDEX 0
* SOFTWARE.
*/
+#define BT_LOG_TAG "CLOCK-CLASS"
+
#include <babeltrace/ctf-ir/clock-class-internal.h>
#include <babeltrace/ctf-ir/utils.h>
#include <babeltrace/ref.h>
-#include <babeltrace/object-internal.h>
#include <babeltrace/compiler-internal.h>
#include <babeltrace/types.h>
#include <inttypes.h>
-
-#define BT_LOG_TAG "CLOCK-CLASS"
#include <babeltrace/lib-logging-internal.h>
+#include <babeltrace/object-internal.h>
static
void bt_ctf_clock_class_destroy(struct bt_object *obj);
* 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)
{
* SOFTWARE.
*/
+#define BT_LOG_TAG "VALUES"
+
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <string.h>
#include <inttypes.h>
#include <babeltrace/compiler-internal.h>
-#include <babeltrace/object-internal.h>
#include <babeltrace/ref.h>
#include <babeltrace/values.h>
#include <babeltrace/compat/glib-internal.h>
#include <babeltrace/types.h>
-#define BT_LOG_TAG "VALUES"
#include <babeltrace/lib-logging-internal.h>
+#include <babeltrace/object-internal.h>
#define BT_VALUE_FROM_CONCRETE(_concrete) ((struct bt_value *) (_concrete))
#define BT_VALUE_TO_BOOL(_base) ((struct bt_value_bool *) (_base))
* SOFTWARE.
*/
+extern int bt_lttng_live_log_level;
+
#include <stdbool.h>
#include <babeltrace/babeltrace-internal.h>
#define U64_STR_MAX_LEN 20
#define STREAM_NAME_MAX_LEN (sizeof(STREAM_NAME_PREFIX) + U64_STR_MAX_LEN)
-extern int bt_lttng_live_log_level;
-
struct lttng_live_component;
struct lttng_live_session;
#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE"
-#include "lttng-live-internal.h"
#include "data-stream.h"
#include "metadata.h"
+#include "lttng-live-internal.h"
#define MAX_QUERY_SIZE (256*1024)
//TODO: this should not be used by plugins. Should copy code into plugin
//instead.
-#include "babeltrace/object-internal.h"
+#include <babeltrace/object-internal.h>
#define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344