Re: [PATCH 2/2] btf_encoder: Detect kernel module ftrace addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux