4 ms·
Linux kernel takes ~60 seconds on TR hardware according to phoronix, SLoC is what ~15-18 million
by nwmcsween 7y ago
Linux kernel takes ~60 seconds on TR hardware according to phoronix, SLoC is what ~15-18 million
- cyphar 7y agoMost 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.
- nneonneo 7y agoA 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).
- Sean1708 7y ago> 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?
- nneonneo 7y agoThe 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”).
- ungamed 7y agoEasy way is to grab the debuginfo files, run it through addr2line and count.
- nwmcsween 7y agoEh, 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-Seconds-AMD-EPYC-2P https://www.phoronix.com/scan.php?page=news_item&px=Linux-16...