lkml.org 
[lkml]   [2023]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kbuild: Add inline-account tool
On Sat, Oct 21, 2023 at 1:12 AM Andi Kleen <ak@linux.intel.com> wrote:
>
> A common cause of binary code bloat is excessive inlining. Traditional
> tools (like nm --size-sort -t d) don't address that directly because
> they only see the final functions, but don't know about inlines.
>
> This patch adds inline-account that makes it easy to track that down
> by accounting code bytes to all functions visible in the debug information,
> as well as code lines.
>
> Here are some examples:
>
> Show all inlines that increase code size by >1K in the core scheduler:
>
> $ inline-account.py --min-bytes=1000 kernel/sched/core.o



How to use this tool?

I did not get any output.




masahiro@zoe:~/workspace/linux-kbuild(a)$ ./scripts/inline-account.py
--min-bytes=1000 kernel/sched/core.o
Total code bytes seen 0

Code bytes by functions:
Function Total Avg Num

Code bytes by nearby source line blocks:
prefix
Line Total
masahiro@zoe:~/workspace/linux-kbuild(a)$ ./scripts/inline-account.py
kernel/sched/core.o
Total code bytes seen 0

Code bytes by functions:
Function Total Avg Num

Code bytes by nearby source line blocks:
prefix
Line Total
masahiro@zoe:~/workspace/linux-kbuild(a)$ ./scripts/inline-account.py
lib/maple_tree.o
Total code bytes seen 0

Code bytes by functions:
Function Total Avg Num

Code bytes by nearby source line blocks:
prefix
Line Total







I do not think this patch is mature enough
regarding the coding style.

Please polish the code.







--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2023-10-22 19:55    [W:0.086 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site