mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	christophe.leroy@csgroup.eu, naveen.n.rao@linux.vnet.ibm.com,
	mbenes@suse.cz
Subject: Re: [RFC][PATCH] ftrace,objtool: PC32 based __mcount_loc
Date: Mon, 20 Jun 2022 09:35:20 +0200	[thread overview]
Message-ID: <YrAjOHDrkXQPLv+6@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20220617201142.yea5ze7od43fat4o@treble>

On Fri, Jun 17, 2022 at 01:11:42PM -0700, Josh Poimboeuf wrote:
> On Fri, Jun 17, 2022 at 01:24:53PM +0200, Peter Zijlstra wrote:
> > 
> > Hi,
> > 
> > I recently noticed that __mcount_loc is 64bit wide, containing absolute
> > addresses. Since __mcount_loc is a permanent section (not one we drop
> > after boot), this bloats the kernel memory usage for no real purpose.
> > 
> > The below patch adds __mcount_loc_32 and objtool support to generate it.
> > This saves, on an x86_64-defconfig + FTRACE, 23975*4 ~= 94K of permanent
> > storage.
> > 
> > XXX hobbled sorttable for now
> > XXX compile tested only
> > 
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> 
> Nice!
> 
> Some nits:
> 
> - No need for renaming the section, it can still be called
>   '__mcount_loc' regardless?

I wanted to avoid mixing them by accidental build funnies, also, it
having a different name makes it easier to check what's what with a
simple readelf.

> - No need for a new FTRACE_MCOUNT32_USE_OBJTOOL config option or
>   '--mcount32' cmdline option, just change the old ones to be pc32?

Right, so I did that because of the pending --mcount patches for Power.
If Christophe is on board with that, sure, can do.

> - change "32" to "PC32": CC_USING_MCOUNT_LOC_PC32

Right.

  reply	other threads:[~2022-06-20  7:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 11:24 Peter Zijlstra
2022-06-17 11:40 ` Mark Rutland
2022-06-21 16:27   ` Ard Biesheuvel
2022-06-23 14:19     ` Mark Rutland
2022-06-22 14:54   ` Steven Rostedt
2022-06-23 14:21     ` Mark Rutland
2022-06-24  0:01       ` Steven Rostedt
2022-06-17 11:44 ` Christophe Leroy
2022-06-17 12:06   ` Peter Zijlstra
2022-06-17 20:11 ` Josh Poimboeuf
2022-06-20  7:35   ` Peter Zijlstra [this message]
2022-06-20  7:42     ` Christophe Leroy
2022-06-22 14:50 ` Steven Rostedt
2022-06-24  7:16   ` Peter Zijlstra

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=YrAjOHDrkXQPLv+6@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=jpoimboe@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®