Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the influence of compilers on binary kernel size? #34

Open
FAMILIAR-project opened this issue Jan 21, 2021 · 0 comments
Open

What's the influence of compilers on binary kernel size? #34

FAMILIAR-project opened this issue Jan 21, 2021 · 0 comments
Assignees

Comments

@FAMILIAR-project
Copy link
Collaborator

FAMILIAR-project commented Jan 21, 2021

Prior works have been done on gcc 6.4 for several versions of the kernel (4.13.3, 4.15, 4.20, 5.0, 5.4, 5.7, 5.8), over 20K+ configurations (or more) per version.
We have pretty good results for predicting binary kernel size.
A threat is that the gathered data has only been computed with gcc 6.4, because this compiler was the "one" for 4.13.3.
We can wonder to what extent a change in compiler version can change our results and prediction.
For instance, given the same configuration and the same kernel version 5.8, is the binary size the same with gcc 6.4 and gcc 10?
Formally, given the same (random) configuration (says c) and the same kernel version (says kv), is the binary kernel size the same using different compiler versions (says cc1 and cc2)?
We can think of a function like this:
ksize (c, kv, cc) = bz with c a configuration, kv a kernel version, cc a compiler, bz the binary size
Right now, we can envision to operate over: kv in {4.13.3, 4.15, 4.20, 5.0, 5.4, 5.7, 5.8}, cc in {gcc 6.4, gcc 8.0, gcc 10, clang}
Examples are:

  • c=tinyconfig, kv=5.8, cc1=6.4, cc2=8.0
  • c=defconfig, kv=5.8, cc1=6.4, cc2=8.0
  • c (obtained with randconfig), kv=5.8, cc1=6.4, cc2=8.0
    For the sake of comparison among compilers, the configuration and the kernel version should be the same.
    The last case (randconfig) is the most interesting, since we can compare on a large set of data.
    In fact, we have already a bunch of configurations for which we know the binary size with gcc 6.4.
    So an obvious experiment is as follows:
  • select a kernel version (says kv=5.8)
  • select a new compiler version (cc2=gcc 10)
  • take a configuration c_i of the database that has already been compiled with cc1=gcc 6.4 (bzi is known!)
  • compile it
  • repeat N times
    The outcome would be new binary sizes {bz'1, bz'2, ..., bz'N}.
    Then we can compare this set of measurements with {bz1, bz2, ..., bzN}.
    There are various ways of comparing distributions (eg Pearson).

Another, perhaps simpler, and similar experiment is as follows:

  • consider tinyconfig/defconfig
  • compute binary size for all kernel versions (4.13.3, 4.15, 4.20, 5.0, 5.4, 5.7, 5.8) and for all compiler versions
  • compare!
@FAMILIAR-project FAMILIAR-project created this issue from a note in TuxML roadmap 2021 (experiments with compilers ) Jan 21, 2021
@FAMILIAR-project FAMILIAR-project changed the title What's the influence of compiler (version) on binary kernel size? What's the influence of compilers on binary kernel size? Jan 21, 2021
@FabienZa FabienZa self-assigned this Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
TuxML roadmap 2021
experiments with compilers
Development

No branches or pull requests

2 participants