No announcement yet.

AMD Graphics Driver Surpassing 4 Million Lines Of Code In Linux 5.19, NVIDIA Opens Up At 1 Million

  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by DanT View Post
    It would be more informative to present the number of C lines not counting the headers.
    Not sure I am reading it correctly, but it is 476k for AMD and 742k for NVidia?
    If you break it down by subfolders you get a better picture:

    include (register headers) - 2730 KSLOC
    amdgpu - 175 KSLOC
    amdkfd - 26 KSLOC
    display - 248 KSLOC
    pm - 114 KSLOC

    Breaking down this way counts function prototypes as code, but register headers as "headers". I'm on the fence re: whether function prototypes should be counted as code, since they don't really add to complexity or influence maintainability. Anyways, counting them as code (ie worst case) we get 563K lines of code and 2730K lines of headers.

    This ignores blank and comment lines, since hopefully they improve rather than reduce maintainability

    This is based on the tips of Linus's kernel tree, ie not including latest additions, with a total of around 3827 KSLOC including blanks and comments (doing the math in my head).
    Test signature