bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	dwarves@vger.kernel.org, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andriin@fb.com>, Yonghong Song <yhs@fb.com>,
	Hao Luo <haoluo@google.com>, "Frank Ch. Eigler" <fche@redhat.com>,
	Mark Wielaard <mjw@redhat.com>
Subject: Re: [PATCH 3/3] btf_encoder: Change functions check due to broken dwarf
Date: Wed, 11 Nov 2020 21:49:30 +0100	[thread overview]
Message-ID: <20201111204930.GD619201@krava> (raw)
In-Reply-To: <CAEf4BzZe1owmhqjGCjShYwf892hA0tzp0BEAZ2TR41aFx4eKUw@mail.gmail.com>

On Wed, Nov 11, 2020 at 12:26:23PM -0800, Andrii Nakryiko wrote:

SNIP

> > perhaps your gcc generates DWARF that breaks the way you described
> > above, but I'd expect to see function with argument without name,
> > not function without arguments at all
> >
> > what gcc version are you on?
> 
> 10.2.0, built from sources
> 
> >
> > when you dump debug information, do you see security_inode_getattr
> > record with no arguments?
> 
> Yeah, I think so:
> 
> 21158467- <1><2b7e168>: Abbrev Number: 93 (DW_TAG_subprogram)
> 21158468-    <2b7e169>   DW_AT_external    : 1
> 21158469-    <2b7e169>   DW_AT_declaration : 1
> 
>   ..  BTW, we should probably still ignore DW_AT_declaration: 1, if it's set.
> 
> 21158470:    <2b7e169>   DW_AT_linkage_name: (indirect string, offset:
> 0x120a0a): security_inode_getattr
> 21158471:    <2b7e16d>   DW_AT_name        : (indirect string, offset:
> 0x120a0a): security_inode_getattr
> 21158472-    <2b7e171>   DW_AT_decl_file   : 141
> 21158473-    <2b7e172>   DW_AT_decl_line   : 346
> 21158474-    <2b7e174>   DW_AT_decl_column : 5

nice.. so how about making extra loop through cu functions
and collect all distinct functions and for each collect
most detailed arguments and use this set for final func
generation

will try to think of some way without extra loop, but can't
think of any now

jirka


  reply	other threads:[~2020-11-11 20:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 22:25 [PATCHv4 0/3] pahole/kernel: Workaround dwarf bug for function encoding Jiri Olsa
2020-11-06 22:25 ` [PATCH 1/3] bpf: Move iterator functions into special init section Jiri Olsa
2020-11-09 18:05   ` Arnaldo Carvalho de Melo
2020-11-09 18:06     ` Arnaldo Carvalho de Melo
2020-11-09 18:10       ` Arnaldo Carvalho de Melo
2020-11-09 18:49       ` Jiri Olsa
2020-11-06 22:25 ` [PATCH 2/3] btf_encoder: Move find_all_percpu_vars in generic collect_symbols Jiri Olsa
2020-11-06 22:25 ` [PATCH 3/3] btf_encoder: Change functions check due to broken dwarf Jiri Olsa
2020-11-11 19:59   ` Andrii Nakryiko
2020-11-11 20:19     ` Jiri Olsa
2020-11-11 20:26       ` Andrii Nakryiko
2020-11-11 20:49         ` Jiri Olsa [this message]
2020-11-11 20:31       ` Jiri Olsa
2020-11-11 20:36         ` Andrii Nakryiko
2020-11-12  0:36           ` Arnaldo Carvalho de Melo
2020-11-06 22:56 ` [PATCHv4 0/3] pahole/kernel: Workaround dwarf bug for function encoding Andrii Nakryiko
2020-11-09 17:29   ` Arnaldo Carvalho de Melo
2020-11-09 19:11     ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2020-11-04 21:59 [PATCHv3 " Jiri Olsa
2020-11-04 21:59 ` [PATCH 3/3] btf_encoder: Change functions check due to broken dwarf Jiri Olsa
2020-11-05 19:52   ` Andrii Nakryiko
2020-11-05 22:56     ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201111204930.GD619201@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=fche@redhat.com \
    --cc=haoluo@google.com \
    --cc=jolsa@kernel.org \
    --cc=mjw@redhat.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).