Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Linux kernel takes ~60 seconds on TR hardware according to phoronix, SLoC is what ~15-18 million


A clean build of the Linux kernel can be very fast, but the config is very relevant. A custom build specific to your hardware will touch only a small fraction of the overall kernel tree, whereas a generic build including a large swath of hardware will take much longer.

(AFAICT there's no easy way to measure the LoC actually compiled - but one rough way to estimate it would be to take all the .o files listed in the build process and count the LoC in the corresponding .c files and the .h files they depend on).


Easy way is to grab the debuginfo files, run it through addr2line and count.


> AFAICT there's no easy way to measure the LoC actually compiled

I take it you can't just run it through the preprocessor then count the lines of code that are output from that?


The kernel is composed of a bunch of independent source files which share headers; thus, running them through a preprocessor would massively overcount the LoC. (In theory, this would get you the “actual compiled LoC” but that’s a useless metric because most header files are just declarations that are easy to parse and “compile”).


Most of those speed compile benchmarks are done with "make tinyconfig" -- where a small fraction of the kernel is being built (a few million SLoC at most). A kernel build using "make allyesconfig" takes significantly longer than a minute.


Eh, I was wrong on Epyc a make defconfig && make takes _16_ seconds but I don't really follow what is actually in defconfig so it might be bare bones.

https://www.phoronix.com/scan.php?page=news_item&px=Linux-16...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: