Message ID | 1675896868-26339-1-git-send-email-alan.maguire@oracle.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | BPF |
Headers | show |
Series | [dwarves] btf_encoder: ensure elf function representation is fully initialized | expand |
On Wed, Feb 08, 2023 at 10:54:28PM +0000, Alan Maguire wrote: > new fields in BTF encoder state (used to support save and later > addition of function) of ELF function representation need to > be initialized. No need to set parameter names to NULL as > got_parameter_names guards their use. > > A follow-on patch intended to be applied after the series [1]. > > [1] https://lore.kernel.org/bpf/1675790102-23037-1-git-send-email-alan.maguire@oracle.com/ > > Suggested-by: Jiri Olsa <jolsa@kernel.org> > Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Acked-by: Jiri Olsa <jolsa@kernel.org> thanks, jirka > --- > btf_encoder.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/btf_encoder.c b/btf_encoder.c > index 35fb60a..ea5b47b 100644 > --- a/btf_encoder.c > +++ b/btf_encoder.c > @@ -1020,6 +1020,8 @@ static int btf_encoder__collect_function(struct btf_encoder *encoder, GElf_Sym * > } > encoder->functions.entries[encoder->functions.cnt].generated = false; > encoder->functions.entries[encoder->functions.cnt].function = NULL; > + encoder->functions.entries[encoder->functions.cnt].state.got_parameter_names = false; > + encoder->functions.entries[encoder->functions.cnt].state.type_id_off = 0; > encoder->functions.cnt++; > return 0; > } > -- > 1.8.3.1 >
Em Thu, Feb 09, 2023 at 10:36:39AM +0100, Jiri Olsa escreveu: > On Wed, Feb 08, 2023 at 10:54:28PM +0000, Alan Maguire wrote: > > new fields in BTF encoder state (used to support save and later > > addition of function) of ELF function representation need to > > be initialized. No need to set parameter names to NULL as > > got_parameter_names guards their use. > > > > A follow-on patch intended to be applied after the series [1]. > > > > [1] https://lore.kernel.org/bpf/1675790102-23037-1-git-send-email-alan.maguire@oracle.com/ > > > > Suggested-by: Jiri Olsa <jolsa@kernel.org> > > Signed-off-by: Alan Maguire <alan.maguire@oracle.com> > > Acked-by: Jiri Olsa <jolsa@kernel.org> Thanks, applied. - Arnaldo > thanks, > jirka > > > --- > > btf_encoder.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/btf_encoder.c b/btf_encoder.c > > index 35fb60a..ea5b47b 100644 > > --- a/btf_encoder.c > > +++ b/btf_encoder.c > > @@ -1020,6 +1020,8 @@ static int btf_encoder__collect_function(struct btf_encoder *encoder, GElf_Sym * > > } > > encoder->functions.entries[encoder->functions.cnt].generated = false; > > encoder->functions.entries[encoder->functions.cnt].function = NULL; > > + encoder->functions.entries[encoder->functions.cnt].state.got_parameter_names = false; > > + encoder->functions.entries[encoder->functions.cnt].state.type_id_off = 0; > > encoder->functions.cnt++; > > return 0; > > } > > -- > > 1.8.3.1 > >
diff --git a/btf_encoder.c b/btf_encoder.c index 35fb60a..ea5b47b 100644 --- a/btf_encoder.c +++ b/btf_encoder.c @@ -1020,6 +1020,8 @@ static int btf_encoder__collect_function(struct btf_encoder *encoder, GElf_Sym * } encoder->functions.entries[encoder->functions.cnt].generated = false; encoder->functions.entries[encoder->functions.cnt].function = NULL; + encoder->functions.entries[encoder->functions.cnt].state.got_parameter_names = false; + encoder->functions.entries[encoder->functions.cnt].state.type_id_off = 0; encoder->functions.cnt++; return 0; }
new fields in BTF encoder state (used to support save and later addition of function) of ELF function representation need to be initialized. No need to set parameter names to NULL as got_parameter_names guards their use. A follow-on patch intended to be applied after the series [1]. [1] https://lore.kernel.org/bpf/1675790102-23037-1-git-send-email-alan.maguire@oracle.com/ Suggested-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alan Maguire <alan.maguire@oracle.com> --- btf_encoder.c | 2 ++ 1 file changed, 2 insertions(+)