[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250102204804.GG7274@noisy.programming.kicks-ass.net>
Date: Thu, 2 Jan 2025 21:48:04 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org, bpf <bpf@...r.kernel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>,
Zheng Yejian <zhengyejian1@...wei.com>,
Martin Kelly <martin.kelly@...wdstrike.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH 14/14] scripts/sorttable: ftrace: Do not add weak
functions to available_filter_functions
On Thu, Jan 02, 2025 at 03:41:46PM -0500, Steven Rostedt wrote:
> On Thu, 2 Jan 2025 21:32:00 +0100
> Peter Zijlstra <peterz@...radead.org> wrote:
>
> > This is quite the insane interface -- but whatever. I still feel
> > strongly you should fix kallsyms so that we can all deal more sanely
> > with the weak crap.
>
> Question about fixing kallsyms, which I would like done too. I guess an
> invisible place holder for weak functions may be best. Saving the size of
> all functions could be memory wasteful. As there are a lot of functions:
>
> # wc -l /proc/kallsyms
> 207126 /proc/kallsyms
IIRC the vast majority of space is taken up by the actual symbol names
-- and rust is only making that *way* worse.
> What would be best? To add a placeholder where weak functions are, but they
> would not be printed in /proc/kallsyms? If a lookup occurs, and it lands
> on one of theses functions, to return "not found"?
Placeholder yes -- ideally the toolchain itself would not erase the
symbol, but instead mangle it in a well defined way (eg.
<symname>.weak.# or somesuch)
Not printing in kallsyms, I'm not sure, by not printing them it becomes
impossible for userspace consumers of kallsyms to do the same, eg. they
will trip over these same 'holes'.
Default lookup might indeed be best served by returning as if not found.
There's patches out there doing much of the above IIRC.
Powered by blists - more mailing lists