Table of Contents

GSoC 2007 - Codesize Reduction Project

Things done so far

This is a summary of the things I did so far (including those that didn't work), in roughly chronological order.

Status: Didn't seem as useful as I had hoped. Will revisit and investigate other options once I get to the full attribute makeover.

Status: (Re)discovered the extremly useful stack alignment option in the Linux Kernel. Has been the biggest win so far, already merged.

Status: useful options checked in to gccopt branch. separate branch for packed enums. (not merged yet) Not so useful options included -fno-inline (due to lots of always inline functions used - may still be a win for certain modules → keep in mind for the attributes) and -fpack-struct (potentially incompatible data structures, supposedly already used where possible). did some preliminary tests on inline limits and other inline options, too. will revisit later before actually using always-inline or noinline attributes.

Status: went through the code, located the functions that need standard calling conventions. committed to gccopt branch, not merged (or reviewed) yet. hope i got them all. alternative may be attributing individual functions, but as i can't imagine a case where it's not a win, just attributing those where it must not be used should be better.

Status: branch merged (think i got them all, had some false positives at first though → reverted)

Status: went through a lot of output, picked the ones that seem not too controversial, checked in to symcheck branch. (not merged yet). Further plan is addressing the problem at the root and reduce the symcheck output by eliminating false positives, then address the remaining unclear ones (i do not claim to understand all the code i have read ;) No real solution discovered (yet), hackish ideas (eliminate by suffix, eliminate by exporting another symbol that says false positive) set aside for now. did research if better tools than nm and objdump exist, haven't found any yet.

Status: unfortunately no difference at all. local branch exists, may be included in the attr changes for completeness.

Things done in the 2nd half of SoC

This took a bit longer than expected. OpenGROK required some serious Tomcat investigations to find out which variables come from where and still get overridden from where else. LXR is easier - once you figure out that the preliminary GIT support doesn't really work and set it up on a plain old source directory instead. Both don't seem to offer a way to easily see which functions are called most, but otherwise they're both pretty decent source code browsers. let me know if we want anything like that on rom.

Things to do now that we have "pencils down" for code