Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.15 KB

README.md

File metadata and controls

24 lines (19 loc) · 1.15 KB

kernel-ncdu

A hacky way to visualize compile times of each section of the Linux kernel.

Usage:

  • Get the script
  • Compile a kernel with the following command to generate a log file with timestamps for each compiled file:
    • This script will only produce accurate results when you compile with -j1! Anything else will produce only gibberish.
make clean; make -j1 | kernel-ncdu.sh | tee times.log
  • Once it's done, run kernel-ncdu.sh times.log
  • After a few seconds you should be greeted with a fully interactive time analyzer

Note: You can skip logging to file by running the command like so:

make clean; make -j1 | kernel-ncdu.sh | kernel-ncdu.sh /dev/stdin

However, considering how long it takes to compile a kernel with -j1, it is recommended to log it to a file first, so you don't have to wait too long if you accidentally close the program.

Animation showing how the tool works

Please be aware that this script is a big, inefficient hack, and by no means meant to be a stable product. It should do the job, but don't expect too much.