bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Jiri Olsa <jolsa@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>
Subject: Re: [PATCH 2/2] btf_encoder: Detect kernel module ftrace addresses
Date: Fri, 27 Nov 2020 17:39:12 -0300	[thread overview]
Message-ID: <20201127203912.GQ70905@kernel.org> (raw)
In-Reply-To: <20201127174037.GB2767982@krava>

Em Fri, Nov 27, 2020 at 06:40:37PM +0100, Jiri Olsa escreveu:
> On Thu, Nov 26, 2020 at 08:18:58PM -0800, Andrii Nakryiko wrote:
> > On Tue, Nov 24, 2020 at 8:22 AM Jiri Olsa <jolsa@kernel.org> wrote:
> > >
> > > Add support to detect kernel module dtrace addresses and use
> > > it as filter for functions.
> > 
> > typo: dtrace -> ftrace?
> 
> heh, honest typo I swear ;-)

f comes after d ;-)

> SNIP
> > > +       /* get __mcount_loc */
> > > +       sec = elf_section_by_name(btfe->elf, &btfe->ehdr, &shdr_mcount,
> > > +                                 "__mcount_loc", NULL);
> > > +       if (!sec) {
> > > +               if (btf_elf__verbose) {
> > > +                       printf("%s: '%s' doesn't have __mcount_loc section\n", __func__,
> > > +                              btfe->filename);
> > > +               }

> > nit: unnecessary {} for single-statement if
 
> ah ok, I put it because kernel guys scream with multiline
> conditions without {}

You can keep it like that, or get free from 80 column constraints and
make it:

	if (btf_elf__verbose)
		printf("%s: '%s' doesn't have __mcount_loc section\n", __func__, btfe->filename);
 
- Arnaldo

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 16:19 [RFC 0/2] btf_encoder: Detect kernel modules Jiri Olsa
2020-11-24 16:19 ` [PATCH 1/2] btf_encoder: Factor filter_functions function Jiri Olsa
2020-11-27  4:05   ` Andrii Nakryiko
2020-11-27 17:21     ` Jiri Olsa
2020-11-24 16:19 ` [PATCH 2/2] btf_encoder: Detect kernel module ftrace addresses Jiri Olsa
2020-11-27  4:18   ` Andrii Nakryiko
2020-11-27 17:40     ` Jiri Olsa
2020-11-27 20:39       ` Arnaldo Carvalho de Melo [this message]

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=20201127203912.GQ70905@kernel.org \
    --to=acme@kernel.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=haoluo@google.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@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).