From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Linux Kernel contains only C code?
Date: Thu, 1 Feb 2018 18:32:29 +0100 [thread overview]
Message-ID: <20180201173229.GA20726@kroah.com> (raw)
In-Reply-To: <CADFy_4EqsacNggq+C301w9kGY5j-8h_4=ugTSYtqP0yzFS5dPg@mail.gmail.com>
On Thu, Feb 01, 2018 at 05:49:13PM +0100, Augusto Mecking Caringi wrote:
> On Thu, Feb 1, 2018 at 5:37 PM, Aruna Hewapathirane
> <aruna.hewapathirane@gmail.com> wrote:
> >> On Fri, Jan 26, 2018 at 1:58 AM, inventsekar <inventsekar@gmail.com>
> >> wrote:
> >> Hi all, ...
> >
> >> 1. May i know, other than C language, is there any other programming
> >> language is/are used inside Linux Kernel?!?!
> >> is there any c++, Perl, python programs are used for peculiar tasks inside
> >> Linux Kernel?!?!
> >
> > Well, let's find out ? If you open up a shell/terminal and change into the
> > top level directory of your Linux kernel source and run the command below:
> >
> > find . -type f -and -printf "%f\n" | grep -io '\.[^.]*$' | sort | uniq -c |
> > sort -rn ( Breaking this down, find all files+get the filename+pull out the
> > file extension+sort+only keep unique ext+sort with a stats count)
>
> For that I recommend a tool called sloccount [1]...
>
> BTW, running it now against Linux Kernel source I got:
>
> Totals grouped by language (dominant language first):
> ansic: 16675070 (97.83%)
> asm: 294179 (1.73%)
> perl: 26346 (0.15%)
> sh: 18781 (0.11%)
> python: 15642 (0.09%)
> cpp: 6512 (0.04%)
> yacc: 4586 (0.03%)
> lex: 2479 (0.01%)
> awk: 1387 (0.01%)
> pascal: 231 (0.00%)
> sed: 5 (0.00%)
> Total Physical Source Lines of Code (SLOC) = 17,045,218
>
>
> [1] https://www.dwheeler.com/sloccount/
'tokei' is _much_ faster when dealing with large code bases than
sloccount. And gives a bit different view of the tree as well, I'd
recommend it over sloccount these days.
thanks,
greg k-h
next prev parent reply other threads:[~2018-02-01 17:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 6:58 Linux Kernel contains only C code? inventsekar
2018-01-26 7:16 ` Alice Ferrazzi
2018-01-26 7:19 ` valdis.kletnieks at vt.edu
2018-01-26 7:20 ` Larry Chen
2018-01-26 10:53 ` Ruben Safir
2018-01-26 13:12 ` valdis.kletnieks at vt.edu
2018-01-29 15:41 ` Augusto Mecking Caringi
2018-01-29 17:16 ` Jeffrey Walton
2018-01-29 17:33 ` Greg KH
2018-01-29 18:00 ` Jeffrey Walton
2018-01-29 19:59 ` Greg KH
2018-02-01 16:37 ` Aruna Hewapathirane
2018-02-01 16:49 ` Augusto Mecking Caringi
2018-02-01 17:32 ` Greg KH [this message]
2018-02-02 6:52 ` valdis.kletnieks at vt.edu
2018-02-02 10:11 ` Daniel.
2018-02-02 10:27 ` Augusto Mecking Caringi
2018-02-02 19:05 ` Daniel.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180201173229.GA20726@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.