Fix: freeze field type unconditionally
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 11 Jun 2018 20:00:21 +0000 (16:00 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:05:45 +0000 (00:05 -0400)
commit5ea30b28acfde37adf65e73964b81896e2cc75fd
tree429d0efa8b1f72fdd9f4fd550a45058f7517ec90
parent4d4b475dfb526d016e8162c3079320f4bfe741e7
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.025399 seconds and 4 git commands to generate.