From 4fa4e3d92ac3940305b4521aef3e58555a4aa4b5 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 5 Jan 2024 11:09:01 +0000 Subject: libctf: delete LCTF_DIRTY This flag was meant as an optimization to avoid reserializing dicts unnecessarily. It was critically necessary back when serialization was done by ctf_update() and you had to call that every time you wanted any new modifications to the type table to be usable by other types, but that has been unnecessary for years now, and serialization is only done once when writing out, which one would naturally assume would always serialize the dict. Worse, it never really worked: it only tracked newly-added types, not things like added symbols which might equally well require reserialization, and it gets in the way of an upcoming change. Delete entirely. libctf/ * ctf-create.c (ctf_create): Drop LCTF_DIRTY. (ctf_discard): Likewise. (ctf_rollback): Likewise. (ctf_add_generic): Likewise. (ctf_set_array): Likewise. (ctf_add_enumerator): Likewise. (ctf_add_member_offset): Likewise. (ctf_add_variable_forced): Likewise. * ctf-link.c (ctf_link_intern_extern_string): Likewise. (ctf_link_add_strtab): Likewise. * ctf-serialize.c (ctf_serialize): Likewise. * ctf-impl.h (LCTF_DIRTY): Likewise. (LCTF_LINKING): Renumber. --- libctf/ctf-impl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libctf/ctf-impl.h') diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index f4fa323..dc57d6f 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -589,8 +589,7 @@ struct ctf_next ((fp)->ctf_dictops->ctfo_get_vbytes(fp, kind, size, vlen)) #define LCTF_CHILD 0x0001 /* CTF dict is a child. */ -#define LCTF_DIRTY 0x0002 /* CTF dict has been modified. */ -#define LCTF_LINKING 0x0004 /* CTF link is underway: respect ctf_link_flags. */ +#define LCTF_LINKING 0x0002 /* CTF link is underway: respect ctf_link_flags. */ extern ctf_dynhash_t *ctf_name_table (ctf_dict_t *, int); extern const ctf_type_t *ctf_lookup_by_id (ctf_dict_t **, ctf_id_t); -- cgit v1.1