From 7a13cfe1e9f597187034d6bce4a6f99255850a81 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Sun, 16 Mar 2025 15:09:16 +0000 Subject: libctf: remove is-BTF dead-reckoning Before now we've been trying to remember whether a CTF dict is representable as BTF via tracking when changes are made that make it non-BTF. This is a lot of work for nothing: the existence of write-time type suppression means that even if you add non-BTF type kinds, you might well decide to suppress them at writeout time, making the resulting dict pure BTF after all. Rip this whole thing out. (Also use some of the new macros we just added.) --- libctf/ctf-open.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'libctf/ctf-open.c') diff --git a/libctf/ctf-open.c b/libctf/ctf-open.c index 802e258..d6e8bae 100644 --- a/libctf/ctf-open.c +++ b/libctf/ctf-open.c @@ -659,14 +659,6 @@ init_static_types (ctf_dict_t *fp, ctf_header_t *cth) pop[kind]++; } - /* CTF-only kinds: this dict cannot be written as BTF. (There may be further - reasons why this dict cannot be written as BTF that we haven't discovered - yet.) */ - - if (pop[CTF_K_FLOAT] > 0 || pop[CTF_K_SLICE] > 0 || pop[CTF_K_BIG] > 0 - || pop[CTF_K_CONFLICTING] > 0) - fp->ctf_is_btf = 0; - if (child) { ctf_dprintf ("CTF dict %p is a child\n", (void *) fp); @@ -2062,7 +2054,6 @@ ctf_bufopen (const ctf_sect_t *ctfsect, const ctf_sect_t *symsect, if (version == IS_BTF) hp->cth_version = CTF_VERSION_4; - fp->ctf_is_btf = 1; fp->ctf_version = hp->cth_version; fp->ctf_dictops = &ctf_dictops[ctf_version]; -- cgit v1.1