Fix: freeze field type unconditionally
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 11 Jun 2018 20:00:21 +0000 (16:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:34 +0000 (18:19 -0400)
commit9326ab68df0a671f63be085cf39d21208f19a20a
treee0d30488c74e1ffa6c956b1ede3856f58daef63b
parente42dd7635b97096f123104cfd8a26fe5d095b46c
Fix: freeze field type unconditionally

Issue
=====
Field types should always be frozen (in both developer or production
modes) because they are metadata objects. Currently, they are only
frozen in developer mode.

Solution
========
Make the bt_field_type_common_freeze() and bt_field_type_freeze()
functions always called, not through a macro which is only enabled in
developer mode.

Known drawbacks
===============
Very small performance impact because we're trying to freeze a field
type every time bt_field_create() is called, but bt_field_create() is
not called often anyway due to field object pooling. The impact could
become noticeable eventually if we limit the sizes of object pools.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
include/babeltrace/ctf-ir/field-types-internal.h
lib/ctf-ir/field-types.c
This page took 0.024794 seconds and 4 git commands to generate.