From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>,
Nick Desaulniers <ndesaulniers@google.com>,
Sami Tolvanen <samitolvanen@google.com>
Cc: Kees Cook <keescook@chromium.org>,
LKML <linux-kernel@vger.kernel.org>,
llvm@lists.linux.dev, Ingo Molnar <mingo@redhat.com>,
Nathan Chancellor <nathan@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sathvika Vasireddy <sv@linux.ibm.com>
Subject: Re: [RFC PATCH kernel] trace: Make FTRACE_MCOUNT_USE_RECORDMCOUNT configurable
Date: Wed, 16 Feb 2022 15:21:17 +0530 [thread overview]
Message-ID: <1645004616.cxeynmpwuy.naveen@linux.ibm.com> (raw)
In-Reply-To: <5b021d73-51c1-164f-6136-483eeebef6fb@ozlabs.ru>
Alexey Kardashevskiy wrote:
>
>
> On 2/15/22 03:10, Sami Tolvanen wrote:
>> On Fri, Feb 11, 2022 at 4:11 PM Nick Desaulniers
>> <ndesaulniers@google.com> wrote:
>>>
>>> + Sami, Kees
>>>
>>> Do you guys remember why we don't support
>>> FTRACE_MCOUNT_USE_RECORDMCOUNT with LTO?
>>
>> It's because recordmcount cannot distinguish between calls and other
>> references to mcount/fentry, which is a problem with LTO where we have
>> to process the entire vmlinux.o and cannot ignore individual
>> translation units. Instead of resorting to workarounds, Peter was kind
>> enough to implement a smarter mcount pass in objtool, which we now use
>> on x86_64 with LTO.
I had responded on a different thread about this:
http://lkml.kernel.org/r/1644579444.bal9kji6uc.naveen@linux.ibm.com
We are working on enabling 'objtool check --mcount' on powerpc.
>
>
> So can x86_64 have both FTRACE_MCOUNT_USE_RECORDMCOUNT and LTO?
No. x86_64 now supports HAVE_OBJTOOL_MCOUNT, which enables
FTRACE_MCOUNT_USE_OBJTOOL. That allows LTO to be used.
- Naveen
next prev parent reply other threads:[~2022-02-16 9:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 1:43 [RFC PATCH kernel] trace: Make FTRACE_MCOUNT_USE_RECORDMCOUNT configurable Alexey Kardashevskiy
2022-02-12 0:10 ` Nick Desaulniers
2022-02-14 16:10 ` Sami Tolvanen
2022-02-16 4:51 ` Alexey Kardashevskiy
2022-02-16 9:51 ` Naveen N. Rao [this message]
2022-02-12 2:47 ` Steven Rostedt
2022-02-16 1:19 ` Alexey Kardashevskiy
2022-02-16 1:46 ` Steven Rostedt
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=1645004616.cxeynmpwuy.naveen@linux.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--cc=sv@linux.ibm.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