mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alan Kao <alankao@andestech.com>
Cc: Palmer Dabbelt <palmer@sifive.com>, Albert Ou <albert@sifive.com>,
	<sw-dev@groups.riscv.org>, <linux-kernel@vger.kernel.org>,
	<greentime@andestech.com>, <zong@andestech.com>
Subject: Re: ftrace: Proposal for an Alternative RecordMcount framework
Date: Tue, 27 Feb 2018 16:12:52 -0500	[thread overview]
Message-ID: <20180227161252.25162d81@vmware.local.home> (raw)
In-Reply-To: <20180227100425.GB20904@andestech.com>

On Tue, 27 Feb 2018 18:04:26 +0800
Alan Kao <alankao@andestech.com> wrote:
 
> 1. During the final linking stages, do "objdump vmlinux.o | grep ..." [2]

Note, doing it at that stage takes the longest time. It makes small
changes much longer to compile. That said...

> 2. Form the output as an ELF objecj
> 3. Link the object to __mcount_loc_start symbol
> 4. Done
> 
> With the similar reason as the patch [3], we should mark _mcount to be
> a weak symbol to prevent it from being relaxed later.
> 
> We would like to know your opinion and comments on this.
> Thanks!

What about just having your arch use recordmcount.c instead? It doesn't
do any grepping. It is an elf reader and modifier and modifies the .o
file directly.

Note, I will be rewriting that code in the near future too, to
consolidate it with objtool.

-- Steve

  reply	other threads:[~2018-02-27 21:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 10:04 Alan Kao
2018-02-27 21:12 ` Steven Rostedt [this message]
2018-03-01  2:05   ` Alan Kao
2018-03-07  1:47     ` Alan Kao
2018-03-07  2:00       ` 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=20180227161252.25162d81@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=alankao@andestech.com \
    --cc=albert@sifive.com \
    --cc=greentime@andestech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmer@sifive.com \
    --cc=sw-dev@groups.riscv.org \
    --cc=zong@andestech.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

Powered by JetHome