linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Clang-Built-Linux ML <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH 0/3] Fix CONFIG_FUNCTION_TRACER with clang
Date: Fri, 26 Mar 2021 06:07:02 -0700	[thread overview]
Message-ID: <20210326130702.3yaz2vqwejnfnlq4@MSI.localdomain> (raw)
In-Reply-To: <CA+icZUWgxmrtM=oj-aJi1KXxZx0YUZDiUPK42MjHvqS96aazYQ@mail.gmail.com>

On Fri, Mar 26, 2021 at 09:37:55AM +0100, Sedat Dilek wrote:
> On Thu, Mar 25, 2021 at 11:38 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > Hi all,
> >
> > This series fixes function tracing with clang.
> >
> > Patch 1 adjusts the mcount regex in scripts/recordmcount.pl to handle
> > the presence of PLT relocations, which happen with clang. Without this,
> > the mcount_loc section will not be created properly.
> >
> > Patch 2 adds a workaround for clang less than 13.0.0 in relation to the
> > mcount symbol name, which was "mcount" rather than "_mcount". This was
> > written as a separate patch so that it can be reverted when the minimum
> > clang version is bumped to clang 13.0.0.
> >
> > Patch 3 avoids a build error when -fpatchable-function-entry is not
> > available, which is the case with clang less than 13.0.0. This will make
> > dynamic ftrace unavailable but all of the other function tracing should
> > work due to the prescence of the previous patch.
> >
> > I am hoping this series can go in as fixes for 5.12, due to patch 3, but
> > if not, they can always be backported (patches 1 and 2 are already
> > marked for stable).
> >
> > This series has been build tested with gcc-8 through gcc-10 and clang-11
> > through clang-13 with defconfig and nommu_virt_defconfig plus
> > CONFIG_FTRACE=y and CONFIG_FUNCTION_TRACER=y then boot tested under
> > QEMU.
> >
> > Cheers,
> > Nathan
> >
> > Nathan Chancellor (3):
> >   scripts/recordmcount.pl: Fix RISC-V regex for clang
> >   riscv: Workaround mcount name prior to clang-13
> >   riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is
> >     available
> >
> 
> Does this only fixes stuff for clang + riscv?

Yes.

> If so, please put a label "riscv" also in the cover-letter.

Sure, my apologies for not doing that in the first place, I must have
been in a rush with the cover letter.

In my defense, I think the titles of my commit messages and the diffstat
below make that obvious without the tag :)

Cheers,
Nathan

> - Sedat -
> 
> >  arch/riscv/Kconfig              |  2 +-
> >  arch/riscv/include/asm/ftrace.h | 14 ++++++++++++--
> >  arch/riscv/kernel/mcount.S      | 10 +++++-----
> >  scripts/recordmcount.pl         |  2 +-
> >  4 files changed, 19 insertions(+), 9 deletions(-)
> >
> > --
> > 2.31.0
> >

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2021-03-26 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 22:38 [PATCH 0/3] Fix CONFIG_FUNCTION_TRACER with clang Nathan Chancellor
2021-03-25 22:38 ` [PATCH 1/3] scripts/recordmcount.pl: Fix RISC-V regex for clang Nathan Chancellor
2021-03-25 23:36   ` Fangrui Song
2021-03-25 22:38 ` [PATCH 2/3] riscv: Workaround mcount name prior to clang-13 Nathan Chancellor
2021-03-29 18:32   ` Nick Desaulniers
2021-03-25 22:38 ` [PATCH 3/3] riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available Nathan Chancellor
2021-03-25 23:38   ` Fangrui Song
2021-03-26  8:37 ` [PATCH 0/3] Fix CONFIG_FUNCTION_TRACER with clang Sedat Dilek
2021-03-26 13:07   ` Nathan Chancellor [this message]
2021-03-27 12:16     ` Sedat Dilek
2021-04-11 21:27 ` Palmer Dabbelt

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=20210326130702.3yaz2vqwejnfnlq4@MSI.localdomain \
    --to=nathan@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=sedat.dilek@gmail.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).