From 0f0c11f7fc9f0ab6bd63fc5f8a4cee7367a81849 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 5 Jun 2020 18:35:46 +0100 Subject: libctf, dedup: add deduplicator This adds the core deduplicator that the ctf_link machinery calls (possibly repeatedly) to link the CTF sections: it takes an array of input ctf_file_t's and another array that indicates which entries in the input array are parents of which other entries, and returns an array of outputs. The first output is always the ctf_file_t on which ctf_link/ctf_dedup/etc was called: the other outputs are child dicts that have the first output as their parent. include/ * ctf-api.h (CTF_LINK_SHARE_DUPLICATED): No longer unimplemented. libctf/ * ctf-impl.h (ctf_type_id_key): New, the key in the cd_id_to_file_t. (ctf_dedup): New, core deduplicator state. (ctf_file_t) : New. : New. : New. (ctf_hash_type_id_key): New prototype. (ctf_hash_eq_type_id_key): Likewise. (ctf_dedup_atoms_init): Likewise. * ctf-hash.c (ctf_hash_eq_type_id_key): New. (ctf_dedup_atoms_init): Likewise. * ctf-create.c (ctf_serialize): Adjusted. (ctf_add_encoded): No longer static. (ctf_add_reftype): Likewise. * ctf-open.c (ctf_file_close): Destroy the ctf_dedup_atoms_alloc. * ctf-dedup.c: New file. * ctf-decls.h [!HAVE_DECL_STPCPY]: Add prototype. * configure.ac: Check for stpcpy. * Makefile.am: Add it. * Makefile.in: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. --- libctf/ChangeLog | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'libctf/ChangeLog') diff --git a/libctf/ChangeLog b/libctf/ChangeLog index be00e92..58eb2f6 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,31 @@ 2020-07-22 Nick Alcock + * ctf-impl.h (ctf_type_id_key): New, the key in the + cd_id_to_file_t. + (ctf_dedup): New, core deduplicator state. + (ctf_file_t) : New. + : New. + : New. + (ctf_hash_type_id_key): New prototype. + (ctf_hash_eq_type_id_key): Likewise. + (ctf_dedup_atoms_init): Likewise. + * ctf-hash.c (ctf_hash_eq_type_id_key): New. + (ctf_dedup_atoms_init): Likewise. + * ctf-create.c (ctf_serialize): Adjusted. + (ctf_add_encoded): No longer static. + (ctf_add_reftype): Likewise. + * ctf-open.c (ctf_file_close): Destroy the + ctf_dedup_atoms_alloc. + * ctf-dedup.c: New file. + * ctf-decls.h [!HAVE_DECL_STPCPY]: Add prototype. + * configure.ac: Check for stpcpy. + * Makefile.am: Add it. + * Makefile.in: Regenerate. + * config.h.in: Regenerate. + * configure: Regenerate. + +2020-07-22 Nick Alcock + * configure.ac: Add --enable-libctf-hash-debugging. * aclocal.m4: Pull in enable.m4, for GCC_ENABLE. * Makefile.in: Regenerated. -- cgit v1.1