diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2024-01-05 11:09:01 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2024-04-19 16:14:46 +0100 |
commit | 4fa4e3d92ac3940305b4521aef3e58555a4aa4b5 (patch) | |
tree | fba1ec4c5d2c39161a6099f221d77fd78029763f /libctf/ctf-link.c | |
parent | b4b77b26e220c065123c455c8ed81086c8481c10 (diff) | |
download | gdb-4fa4e3d92ac3940305b4521aef3e58555a4aa4b5.zip gdb-4fa4e3d92ac3940305b4521aef3e58555a4aa4b5.tar.gz gdb-4fa4e3d92ac3940305b4521aef3e58555a4aa4b5.tar.bz2 |
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.
Diffstat (limited to 'libctf/ctf-link.c')
-rw-r--r-- | libctf/ctf-link.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c index 9d2d294..44d4e49 100644 --- a/libctf/ctf-link.c +++ b/libctf/ctf-link.c @@ -1568,7 +1568,6 @@ ctf_link_intern_extern_string (void *key _libctf_unused_, void *value, ctf_dict_t *fp = (ctf_dict_t *) value; ctf_link_out_string_cb_arg_t *arg = (ctf_link_out_string_cb_arg_t *) arg_; - fp->ctf_flags |= LCTF_DIRTY; if (!ctf_str_add_external (fp, arg->str, arg->offset)) arg->err = ENOMEM; } @@ -1596,7 +1595,6 @@ ctf_link_add_strtab (ctf_dict_t *fp, ctf_link_strtab_string_f *add_string, { ctf_link_out_string_cb_arg_t iter_arg = { str, offset, 0 }; - fp->ctf_flags |= LCTF_DIRTY; if (!ctf_str_add_external (fp, str, offset)) err = ENOMEM; |