New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 772006 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Consider inlining empty functions in libchrome.so

Project Member Reported by lizeb@chromium.org, Oct 5 2017

Issue description

From https://chromium-review.googlesource.com/c/chromium/src/+/702301, we have out-of-line empty destructors, causing unnecessary code bloat.

Consider moving other such cases inline.
 
Labels: -Binary-Size Performance-Size
A couple ideas:
- clang plugin to detect empty out-of-line methods
- Build a tool to count calls to functions, and cross-reference with list of small symbols from supersize / nm.

Comment 2 by lizeb@chromium.org, Oct 5 2017

Thanks!

I already have a script that finds all these symbols, sorry, forgot to mention it:
https://chromium-review.googlesource.com/c/chromium/src/+/702383

It leverages ICF in the linker to get all the 2 byte symbols that are necessarily just an empty return.
Awesome! Any ideas on how to count the number of calls to each of these functions in order to see which would be good to inline?

Alternatively - maybe use clang's refactoring tool to convert all of these methods to being inlined?

Comment 4 by huangs@google.com, Oct 10 2017

Cc: hua...@chromium.org
Does this affect 'git cl lint'?

Comment 5 by agrieve@chromium.org, Jan 21 (2 days ago)

Cc: p...@chromium.org g...@chromium.org
I'd guess this is obsoleted by ThinLTO (it should inline empty functions so long as they are not virtual). Not sure how to validate this though.

Sign in to add a comment