TuxML / tuxml

The main repository of the TuxML project contains the scripts for building Linux kernel configurations in the large.
Apache License 2.0
4 stars 2 forks source link

Additional size metrics #5

Open FAMILIAR-project opened 5 years ago

FAMILIAR-project commented 5 years ago

Right now, we are computing different sizes, but all rely on the same procedure: https://github.com/TuxML/ProjetIrma/blob/dev/compilation/compiler.py#L256-L259 (the "raw" size of the file)

It's correct, but we miss an opportunity to gather much more information for free.

We should use size (UNIX command) https://elinux.org/Kernel_Size_Tuning_Guide#Measuring_the_kernel

in particular 'size vmlinux We can also use nm --size -r vmlinux

We can add two new columns size_vmlinux (it will be string) and nm_size_vmlinux (I suspect we have to store the information in a .log file)

It should be noted that we only have to do additional measures for vmlinux (not the compressed ones).

Some tests are needed (taking tinyconfig and some random configurations of 4.13.3 and 4.15)

psaffray commented 5 years ago

'size vmlinux' : does not need a log file 'nm --size -r vmlinux' : create a log file Add other command's result : 'size */built-in.o' : create log too

All 3 results will be in a new table 'sizes' with cid as primary key

psaffray commented 5 years ago

We should be careful about the results of nm, the associated file is quite enormous (it can go to more than 1Mio, and mean size is around 500Kio for EACH compilation) EDIT : I optionalized this feature with the --checksize option to not overload the database