]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: dedup: describe 'citer'
authorNick Alcock <nick.alcock@oracle.com>
Tue, 1 Oct 2024 14:34:12 +0000 (15:34 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 30 Oct 2025 14:18:51 +0000 (14:18 +0000)
The distinction between the citer and citers variables in
ctf_dedup_rhash_type is somewhat opaque (it's a micro-optimization to avoid
having to allocate entire sets when we know in advance that we'll only have
to store one value).  Add a comment.

libctf/
* ctf-dedup.c (ctf_dedup_rhash_type): Comment on citers variables.

libctf/ctf-dedup.c

index 2767904c75fdf5f5cc15f0e732cfdcd23f6bbdb3..93a70d60f937cf70d67f3305e257a4714c5ad88b 100644 (file)
@@ -584,6 +584,8 @@ ctf_dedup_rhash_type (ctf_dict_t *fp, ctf_dict_t *input, ctf_dict_t **inputs,
   const char *whaterr;
   int err = 0;
 
+  /* "citer" is for types that reference only one other type: "citers" can store
+     many of them, but is more expensive to both populate and traverse.  */
   const char *citer = NULL;
   ctf_dynset_t *citers = NULL;