This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to understand gcc source code?

Here are some answers from a PS3 prosective.

On Sat, Mar 22, 2008 at 12:15 PM, Basile STARYNKEVITCH
<> wrote:
>   * about X thousands developers run GCC at least once in the last
> month (I would imagine X is more than 100, ie more 100K developers are
> using GCC)

Right now all of the PS3 games are produced using GCC (this is going
to change but that is a different story).  I think all of the Wii
games are done the same way.

>   * what host system is used? I would guess that linux x86, linux
> AMD64, mingw x86 (i.e. some gcc used on some Windows machines) are
> perhaps the favorite ones.

All of the PS3 game development is done on ia32-linux-gnu or
ia32-win32, though some folks want to work on Mac OS X soon or build
using GNU/Linux on a PS3.

>   * what is the proportion of cross-compilation? I have no real clue. I
> would suppose that during all the GCC runs in the last month, only a
> minority was cross-compilation (for some embedded systems).

See above about my answer to this question.  Basically all PS3
development is cross compiling.  In fact the windows compilers are
done using a cross compiler too.

>   * what is the distribution of compilation unit sizes? What is the
> mean size of a compilation unit (I would imagine a few thousand lines of
> C or C++)? What is the median size? The first and last decile?

The mean code size is around 200 million lines or so.  The final
binary results anywhere between 20 Megs to 40 Megs.

>   * what is the distribution of object code size (for a given
> compilation unit)?

See above.

>   * what is the distribution of whole (GCC compiled) binary program size?

See above.

>   * what is the distribution of function sizes?

Don't know off hand but the sizes of functions can be small (1/2
instructions) to large 100k (or more) instructions.

>   * what are the frequently used optimization flags?

-O0 -g is used for debugging builds (though the linker has issues with
that large amount of debugging info).
-O2 is normally used for release builds.
Sometimes -Os is used.

Andrew Pinski

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]