lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAR4Z3O+qZwhc6w7MGEbJsd6B8QZtz1p4_F7OO3jK+aigA@mail.gmail.com>
Date:   Mon, 23 Oct 2023 02:54:27 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] kbuild: Add inline-account tool

On Sat, Oct 21, 2023 at 1:12 AM Andi Kleen <ak@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ