]> 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>
Fri, 28 Feb 2025 14:47:24 +0000 (14:47 +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 486b0efa8c2380f22ada60a5873feb4e663ad320..1e876c8a9e0287333e6a992657409a60d58c90d0 100644 (file)
@@ -582,6 +582,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;