[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pickles: Update btf.pk
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] pickles: Update btf.pk |
Date: |
Thu, 16 Dec 2021 07:35:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi David.
> Update BTF pickle with recent additions/changes to the format:
> - BTF_KIND_DATASEC uses 'size' not 'type'
> - Add BTF_KIND_FLOAT
> - Add BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG
>
> 2021-12-15 David Faust <david.faust@oracle.com>
>
> * pickles/btf.pk (BTF_KIND_FLOAT): New kind.
> (BTF_KIND_DECL_TAG): Likewise.
> (BTF_KIND_TYPE_TAG): Likewise.
> (BTF_Decl_Tag): New type.
> (BTF_Type): Update `info` bits usage to accomodate new type kinds.
> BTF_KIND_DATASEC uses `size` variant of `attrs`.
> Add `decl_tag` variant to `data`.
> ---
> ChangeLog | 10 ++++++++++
> pickles/btf.pk | 24 +++++++++++++++++++-----
> 2 files changed, 29 insertions(+), 5 deletions(-)
>
> diff --git a/pickles/btf.pk b/pickles/btf.pk
> index 4832ada6..a23944db 100644
> --- a/pickles/btf.pk
> +++ b/pickles/btf.pk
> @@ -35,12 +35,15 @@ var BTF_KIND_UNKNOWN = 0,
> BTF_KIND_FUNC = 12,
> BTF_KIND_FUNC_PROTO = 13,
> BTF_KIND_VAR = 14,
> - BTF_KIND_DATASEC = 15;
> + BTF_KIND_DATASEC = 15,
> + BTF_KIND_FLOAT = 16,
> + BTF_KIND_DECL_TAG = 17,
> + BTF_KIND_TYPE_TAG = 18;
>
> var btf_kind_names =
> ["unkn", "int", "ptr", "array", "struct", "union", "enum",
> "fwd", "typedef", "volatile", "const", "restrict", "func",
> - "func_proto", "var", "datasec"];
> + "func_proto", "var", "datasec", "float", "decl_tag", "type_tag"];
>
> type BTF_Type_Id = uint<32>;
>
> @@ -100,6 +103,14 @@ type BTF_Var_SecInfo =
> offset<uint<32>,B> size;
> };
>
> +type BTF_Decl_Tag =
> + struct
> + {
> + /* -1 if the tag is applied to the type itself,
> + else the index of the tagged field/parameter/etc. */
> + uint<32> component_idx;
> + };
Wouldn't that be 0xffff_ffff instead of -1? In any case, it may be
useful for the user to have a variable like BTF_DECL_TAG_SELF defined to
this special value.
Other than that, the patch is OK for master.
Thanks.