Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Linux 2.4 Schematic Poster (Generated From Source!)

Posted by Hemos on Wed Feb 07, 2001 10:27 AM
from the pretty-damn-cool dept.
Dave Sifry writes: "Rusty Russell has posted the scripts that render a function call graph of all of the .c files in the Linux kernel. Each file is graphically represented and named, and function calls are graphically represented inside of each source file. The end result is a 180MB vector PostScript file. You can get the source code and then render it yourself, or if you just want to get the big finished poster, send an e-mail to Linuxcare or contact EverythingLinux if you live down under. BTW, it took us about 5 hours to get that file to print at a print shop down at LWE - that much vector PostScript really tested the limits of their big printers!"
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2
  • Re:What would be even cooler... by Anonymous Coward (Score:1) Wednesday February 07 2001, @07:01AM
  • Re:What would be even cooler... by tamyrlin (Score:1) Wednesday February 07 2001, @07:31AM
  • Re:5 hours rendreing? Duh... by Mongr (Score:1) Wednesday February 07 2001, @07:25AM
  • Re:wow by Alan (Score:1) Wednesday February 07 2001, @06:55AM
  • Re:Could you imagine... by Evangelion (Score:1) Wednesday February 07 2001, @05:47AM
  • Re:Detailed Explanation by rusty (Score:1) Thursday February 08 2001, @09:10PM
  • Re:Detailed Explanation by rusty (Score:1) Wednesday February 07 2001, @06:57PM
  • Re:Problems with the Makefile by Daeron (Score:1) Wednesday February 07 2001, @12:25PM
  • I knew this rung a bell... by leoc (Score:1) Wednesday February 07 2001, @07:50AM
  • Re:What? by h2odragon (Score:1) Wednesday February 07 2001, @05:47AM
  • Re:Equivalent program for C++ class structures by Cederic (Score:1) Wednesday February 07 2001, @11:22PM
  • Re:tempfile by geoffeg (Score:1) Wednesday February 07 2001, @11:03AM
  • A Hack to the LGP Scripts to Print Any Program by Jason Scott (Score:1) Saturday February 10 2001, @10:18PM
  • Re:tempfile by Rocky Mudbutt (Score:1) Wednesday February 07 2001, @11:54AM
  • GPL and printed Posters? by adrien (Score:1) Wednesday February 07 2001, @07:55AM
  • Re:GPL and printed Posters? by adrien (Score:1) Wednesday February 07 2001, @11:36AM
  • Re:Equivalent program for C++ class structures by JimMcCusker (Score:1) Wednesday February 07 2001, @09:36AM
  • Re:Could you imagine... by WSSA (Score:1) Wednesday February 07 2001, @05:17PM
  • Re:5 hours rendreing? Duh... by corporateSlave (Score:1) Wednesday February 07 2001, @04:20PM
  • Re:You can make the poster faster if... by corporateSlave (Score:1) Wednesday February 07 2001, @04:40PM
  • Re:Problems with the Makefile by gimpboy (Score:1) Wednesday February 07 2001, @09:07AM
  • seems to be working on mandrake 7.2 by gimpboy (Score:1) Wednesday February 07 2001, @09:45AM
  • crapped out on mandrake 7.2 by gimpboy (Score:1) Wednesday February 07 2001, @10:58AM
  • Quarter gig? by p3d0 (Score:1) Wednesday February 07 2001, @07:38AM
  • Re:Awesome! by p3d0 (Score:1) Wednesday February 07 2001, @07:35AM
  • Re:Could you imagine... by throx (Score:1) Wednesday February 07 2001, @01:52PM
  • Re:Could you imagine... by throx (Score:1) Wednesday February 07 2001, @07:22PM
  • Re:Could you imagine... by throx (Score:1) Wednesday February 07 2001, @07:24PM
  • I did by bludragoon (Score:1) Thursday February 08 2001, @07:22AM
  • Re:What's next? Linus' DNA? by jovlinger (Score:1) Wednesday February 07 2001, @08:22AM
  • Re:european availability by pigpogm (Score:1) Wednesday February 07 2001, @07:21AM
  • Re:What's next? Linus' DNA? by Spankophile (Score:1) Wednesday February 07 2001, @06:36AM
  • Re:Could you imagine... by Darby (Score:1) Thursday February 08 2001, @06:41AM
  • Re:Is this useful for programmers? by Fnordulicious (Score:1) Wednesday February 07 2001, @12:38PM
  • Re:european availability by spiny (Score:1) Wednesday February 07 2001, @05:45AM
  • Re:What's next? Linus' DNA? by jmp100 (Score:1) Thursday February 08 2001, @09:03PM
  • Killing a Server 101 by nwetters (Score:1) Wednesday February 07 2001, @05:46AM
  • Re:Poster's **NOT** already available... by magnified_plaid (Score:1) Wednesday February 07 2001, @06:05AM
  • Mr. Gates by masoolsa (Score:1) Wednesday February 07 2001, @07:36AM
  • Re:Poster's already available... by 11thangel (Score:1) Wednesday February 07 2001, @05:57AM
  • Re:Could you imagine... by RestiffBard (Score:1) Thursday February 08 2001, @11:30AM
  • Re:Could you imagine... by RestiffBard (Score:1) Wednesday February 07 2001, @04:09PM
  • Re:Poster's already available... by Doppelgaenger (Score:1) Wednesday February 07 2001, @05:52AM
  • Re:Detailed Explanation by HalfWalker (Score:1) Thursday February 08 2001, @10:39AM
  • Re:Detailed Explanation - Cut marks by HalfWalker (Score:1) Tuesday February 13 2001, @11:11AM
  • Re:Equivalent program for C++ class structures by Nimey (Score:1) Wednesday February 07 2001, @12:57PM
  • Re:Is this useful for programmers? by januschr (Score:1) Wednesday February 07 2001, @07:10AM
  • Re:What's next? Linus' DNA? by ayden (Score:1) Wednesday February 07 2001, @07:55AM
  • You can make the poster faster if... by zaius (Score:1) Wednesday February 07 2001, @01:34PM
  • Re:{ question } by Lizard_King (Score:1) Wednesday February 07 2001, @05:55AM
  • cool use for this! by brad3378 (Score:1) Wednesday February 07 2001, @05:26PM
  • Re:cool use for this! by brad3378 (Score:1) Wednesday February 07 2001, @05:28PM
  • Printing time by TeknoHog (Score:1) Wednesday February 07 2001, @06:24AM
  • Re:Killing a Server 101 by SquadBoy (Score:1) Wednesday February 07 2001, @06:15AM
  • Wow, good thing work has really big printers. by brystar (Score:1) Wednesday February 07 2001, @05:52AM
  • Re:5 hours rendreing? Duh... by AgentOBorg (Score:1) Thursday February 08 2001, @02:38AM
  • Re:What's next? Linus' DNA? by flikx (Score:1) Wednesday February 07 2001, @08:06AM
  • PostScript Application Server by leighklotz (Score:1) Wednesday February 07 2001, @08:53AM
  • Re:Could you imagine... by TheOutlawTorn (Score:1) Wednesday February 07 2001, @05:34AM
  • Get another SB by Quila (Score:1) Wednesday February 07 2001, @07:05AM
  • Re:5 hours rendreing? Duh... by Quila (Score:1) Friday February 09 2001, @12:13AM
  • Re:Get another SB by Quila (Score:1) Wednesday February 07 2001, @11:57PM
  • Re:5 hours rendreing? Duh... by Quila (Score:1) Thursday February 08 2001, @12:03AM
  • Re:5 hours rendreing? Duh... by Quila (Score:1) Thursday February 08 2001, @12:23AM
  • Re:5 hours rendreing? Duh... by BluesBear (Score:1) Thursday February 08 2001, @01:41AM
  • Re:Get another SB by BluesBear (Score:1) Wednesday February 07 2001, @07:28AM
  • Re:5 hours rendreing? Duh... by BluesBear (Score:1) Wednesday February 07 2001, @07:34AM
  • Why exactly was this moderated to Flamebait? by rxmd (Score:1) Wednesday February 07 2001, @05:59AM
  • Re:Problems with the Makefile by P.Student (Score:1) Thursday February 08 2001, @05:58PM
  • Re:Problems with the Makefile by Sir_Dill (Score:1) Thursday February 08 2001, @11:53AM
  • Re:Problems with the Makefile by unperson (Score:1) Thursday February 08 2001, @04:20AM
  • Re:What? by John Sullivan (Score:1) Wednesday February 14 2001, @09:37AM
  • Re:Equivalent program for C++ class structures by marquise2000 (Score:1) Thursday February 08 2001, @01:55AM
  • Why does this only work on kernel source? by somerandomchars (Score:1) Wednesday February 07 2001, @12:01PM
  • Re:Problems with the Makefile by rsimmons (Score:1) Thursday February 08 2001, @05:18PM
  • Re:5 hours rendreing? Duh... by $pacemold (Score:1) Thursday February 08 2001, @08:05AM
  • Re:Posters are useful to check students' coding st by spood (Score:1) Wednesday February 07 2001, @09:42AM
  • That was really some work by ooze (Score:1) Wednesday February 07 2001, @05:59AM
  • Problems with the Makefile by frob2600 (Score:1) Wednesday February 07 2001, @06:24AM
  • Re:Detailed Explanation by urgusabic (Score:1) Wednesday February 07 2001, @03:24PM
  • Re:Could you imagine... by mazor (Score:1) Sunday February 11 2001, @09:21AM
  • Hang on... by Ubi_NL (Score:1) Wednesday February 07 2001, @05:44AM
  • Re:{ question } -- and answer. by wishyfish (Score:1) Wednesday February 07 2001, @06:21AM
  • Re:Awesome! by sed-httpd (Score:1) Wednesday February 07 2001, @07:12AM
  • ThinkGeek/Copyleft? by abischof (Score:2) Wednesday February 07 2001, @05:32AM
  • Re:ThinkGeek/Copyleft? by abischof (Score:2) Wednesday February 07 2001, @05:38AM
  • Equivalent program for C++ class structures by heroine (Score:2) Wednesday February 07 2001, @08:48AM
  • Re:What would be even cooler... by greg_barton (Score:2) Wednesday February 07 2001, @01:52PM
  • Re:What would be even cooler... by abulafia (Score:2) Wednesday February 07 2001, @02:59PM
  • Re:Poster's already available... by alhaz (Score:2) Wednesday February 07 2001, @06:04AM
  • Solution for RH 6.2 Problem... by yobtah (Score:2) Wednesday February 07 2001, @10:56AM
  • version that works with redhat 6.2 by gimpboy (Score:2) Thursday February 08 2001, @01:16AM
  • patch for rh 6.2 by gimpboy (Score:2) Wednesday February 07 2001, @03:06PM
  • and another by gimpboy (Score:2) Wednesday February 07 2001, @06:27AM
  • Is it live, or is it... by BrK (Score:2) Wednesday February 07 2001, @06:56AM
  • Re:Equivalent program for C++ class structures by drivers (Score:2) Wednesday February 07 2001, @10:44AM
  • Re:We badly need this for GCC... by devphil (Score:2) Wednesday February 07 2001, @08:20AM
  • We badly need this for GCC... by devphil (Score:2) Wednesday February 07 2001, @07:29AM
  • Re:Could you imagine... by underwhelm (Score:2) Wednesday February 07 2001, @07:34AM
  • Re:What? by jovlinger (Score:2) Wednesday February 07 2001, @08:32AM
  • Re:Could you imagine... by treke (Score:2) Wednesday February 07 2001, @05:32PM
  • Re:european availability by pigpogm (Score:2) Wednesday February 07 2001, @11:25PM
  • Re:What would be even cooler... by Salsaman (Score:2) Wednesday February 07 2001, @07:31AM
  • Re:{ question } by f5426 (Score:2) Wednesday February 07 2001, @06:19AM
  • 5 hours rendreing? Duh... by BluesBear (Score:2) Wednesday February 07 2001, @06:43AM
  • I saw this in New York... by manyoso (Score:2) Wednesday February 07 2001, @06:24AM
  • by smartin (942) on Wednesday February 07 2001, @05:33AM (#449599)
    They had this at the LinuxCare booth at Linux expo, it looks really cool, like a set of conentric circle. The best part of course was that Linus wandered over to look at it while I was there!

    Could some one please mirror the .ps file so that the poor guy doesn't get slashdotted. with Email
  • Re:{ question } (Score:3)

    by Shoeboy (16224) on Wednesday February 07 2001, @06:00AM (#449600) Homepage
    Hey! I can do annoying pseudocode posts too. I'll do mine in SQL:

    SELECT nickname + ' is a complete moron.'
    FROM users
    WHERE posting_style = 'half-assed pseudocode'

    --Shoeboy
  • by option8 (16509) on Wednesday February 07 2001, @05:52AM (#449601) Homepage
    this reminds me of the back of the redhat FY1999 Annual Report. the letter to shareholders was on the front, and on the back was the source code to the original v0.1 kernel by Linus.

    if i could find the link on corporate-ir.net, i'd link to the web version of the report, but it looks like they've dropped it and are only distributing the 10K.

    pity. a lot of people really dug that poster, and have it hanging in their offices. i know a lot of people at redhat have them in their cubes.
  • Re:{ question } (Score:3)

    by selectspec (74651) on Wednesday February 07 2001, @06:11AM (#449602)
    Actualy, I work for Microsoft, and have access to the win2k source code. I ran the tool over the code and code this killer source ring [toiletmuseum.com]
  • by spiny (87740) on Wednesday February 07 2001, @05:29AM (#449603) Homepage Journal
    will the paosters be available in Europe anytime soon?

  • Awesome! (Score:3)

    by CarrotLord (161788) <don@richarde.gmail@com> on Wednesday February 07 2001, @05:44AM (#449604) Journal
    so could this set of scripts be used on other C code? Perhaps XFree86, Mozilla, or even smaller things like grep and a2ps. To me, it seems like a great way to visualise what really is going on in a program...

    Congrats to Rusty for this, it couldn't have been easy...

    rr (No relation :)

  • heres a mirror: (Score:3)

    by 7-Vodka (195504) on Wednesday February 07 2001, @06:24AM (#449605)
    http://128.119.144.229/files/Final-0.2-30pct-index 32.png
  • by Shoeboy (16224) on Wednesday February 07 2001, @05:36AM (#449606) Homepage
    Sorry for the offtopic post, but there is a PNG available [kernelnotes.org] of the 2.3.18 version he did originally. It's 1.5 mb, and I don't know how much bandwidth the server has, so you may want to mirror it.
    Anyway, sorry about that, feel free to mod me down.
    --Shoeboy
  • tempfile (Score:4)

    by hernick (63550) on Wednesday February 07 2001, @10:14AM (#449607)
    This program is dependent on a program called tempfile. I've tried running it.. But it complained of not finding that program.

    Well. My guess is that tempfile just gives a temporary filename ready for use. So, the (not politically correct) fix would be a perl script called tempfile.

    #!/usr/local/bin/perl
    print "/tmp/",rand(100000);

    Worked for me ! My poster is on the way.
  • by gallir (171727) on Wednesday February 07 2001, @09:01AM (#449608) Homepage
    I was using the program to check and mark to my students practices. I put the mark according to the complexity and style of the poster:

    Fo example:

    • Miró: Simple programs, almost naive. Few calls, it needs more work.
    • Klee: Asshole!!!, he wrote four functions and want me to approve him. Draw it again Sam.
    • Picasso: He doesn't know in deep about structured programming. Better improve the code, it's a mess.
    • Dalí: This guys knows about object oriented programming.
    • Impressionist: It's a master in programming, but may be the code has too many functions and it's hard to understand. Better to crisp it slightly.
    As you see, the program is useful too.

    --ricardo Estilo Dalí: muy bien estructurada u orientada a objetos. Impresionista: el hombre es un monstruo de la programación.

  • by VSarkiss (173815) on Wednesday February 07 2001, @05:39AM (#449609)

    "Send $24.95 to the human genome project for a printed copy of Linus Torvalds' complete genome! Straight from the sources! Only takes 2000 hours to render on an average Postscript printer."

    Come to think of it, a clone of Linus would really speed up development, wouldn't it? Or would we have to clone Alan Cox too?

    ;-)

  • by TheOutlawTorn (192318) on Wednesday February 07 2001, @05:30AM (#449610)
    Someone trying to do this with Windows 2000? Ever seen a picture of a really, REALLY pot of spaghetti?
  • wow (Score:4)

    by 7-Vodka (195504) on Wednesday February 07 2001, @06:27AM (#449611)
    so that's what a slashdotting is like. I didn't even link it.
  • by JWhitlock (201845) <John-Whitlock@NOSpAM.ieee.org> on Wednesday February 07 2001, @06:22AM (#449612)
    When disecting someone else's code, I often have to print it out, write notes, flip pages, and generally become the World's Slowest Debugger. At first glance, a general technology like this would help the process of learning new code. You could run the Analyzer on pre-exisiting code, send the file to a print shop, and hang it prominently on the common area wall. Soon, all programming environments will be competing for the best on-screen version...

    Of course, unless this actually helps you understand the code, and is better than pre-existing methods, why bother? Sure, it looks cool, but a similar representation of paths to local chinese restraunts may look as cool (you can take 5th st, or 15th st, represented as spikes off an oval, etc...)

    If it really is an aid for comprehension, or even better, exposes structural flaws, then this is great! Let's make the FPS version, with a profiler coloring or texturizing (is that a word?) the environment, to show time taken in different subroutines (rooms?)

    Anyway, cool idea, but lets give it a few months to see if it is just cool, or cool and useful.

  • by rusty (3244) on Wednesday February 07 2001, @12:57PM (#449613)
    Hi all,

    1) This does not generate a call graph. It is a static rendering of all the functions in the .c files of the kernel.

    2) Yes, the images correspond to the code: forks represent if and switch() statements, circles cover the code within them. Also, code with asm statements, inline, etc are `hairier' (look in the architectures). So, a big star is either a big switch or an if...else if...else if..... If it's inside a circle, there's a loop around it. Two circles inside each other: nested loops. etc.

    3) Why PostScript? For the 2.3.18 one I wanted to learn about PNG, so I did it in PNG. But I wanted people to be able to print out copies at home on small printers, so I wanted something scalable: 1GB PNG was not the answer. So I learnt PostScript and changed over to that; the `posterize' shell script lets you make an NxN poster for printing (I recommend >= 6x6).

    4) cannot find -lfl
    You need flex installed (or use lex and change the Makefile).

    5) shopt: command not found
    Run bash2, or remove the line:
    shopt -s nullglob; for f in $(KERNEL_DIR)/$$d/*.c; do \
    And replace it with these two (don't miss the trailing \'s!):
    for f in $(KERNEL_DIR)/$$d/*.c; do \
    if [ "$f" = "$(KERNEL_DIR)/$$d/*.c" ]; then continue; fi \

    6) tempfile: command not found
    Change the two occurrances of this (classify_nonstatics.sh and conglomerate_functions.sh) to:
    TMPFILE=`mktemp ${TMPDIR:-/tmp}/$$.XXXXXX`

    Please give feedback for these, and any other bug reports to rusty at my linuxcare.com.au address, and I'll release 2.4.0a soon...

    Thanks!
    Rusty.
  • by creinig (18837) <{creinig} {at} {dotsrc.org}> on Wednesday February 07 2001, @07:07AM (#449614) Homepage
    Just mirrored it at http://sunsite.dk/lgdc/tmp/Final-0.2-30pct-index_3 2.png [sunsite.dk]
    It's hosted at SunSITE Denmark [sunsite.dk] as you see, which should have enough bandwidth.
    And yes, it's very cool, and it's completely unreadable at that size & resolution :)
  • by warpeightbot (19472) on Wednesday February 07 2001, @09:02AM (#449615) Homepage
    Actually, if the stability of the running code is any indication (and I know my priestess is going to make me do a thousand Hail Venuses for this blasphemy) Win2K can't be that bad. It's just BIG.

    I thought the most telling thing, though, was what Linus said two years ago at a documents show in Atlanta. He was in a panel discussion with a Microsoft Marketroid (and maddog and a Wall Street analyst) and the 'droid was going on about Microsoft's huge labs where they could replicate any problem known to man. Then Linus in a quiet voice told the story of how the U.S. Post Office (that's right, boys and girls, Uncle Sam runs LINUX) had a problem with the computers that run the bar code sprayers. They called Red Hat, Red Hat emailed Linus, who thought about it, vi'ed the appropriate source file, discovered the race condition, fixed it, sent it back, USPS recompiled, and it worked. Total time, 48 hours. Then he said something which caused complete silence in the room:

    We didn't have to replicate it, we understood it.
    No one understands NT.
    This poster is proof of the easy understandability of Linux.

    --
    Software is like SEX: it's better when it's free.
    -- Linus Torvalds

  • What? (Score:5)

    by SpanishInquisition (127269) on Wednesday February 07 2001, @05:42AM (#449616) Homepage Journal
    Linus wants to reimplement Linux in Postscript? What kind of crack has he been smoking?
    Linux running on a LaserWriter, what a joke.

  • by Salsaman (141471) on Wednesday February 07 2001, @06:43AM (#449617) Homepage
    would be to have this diagram as a screen saver, and then to show small moving dots on the diagram showing exactly where each process was within the kernel.

    I wonder how difficult that would be to implement ?

  • by BluedemonX (198949) on Wednesday February 07 2001, @12:56PM (#449618)
    There's an open source PERL listing out there that generates the picture of the goatse.cx guy out of Slashdot troll posts.
  • by $pacemold (248347) on Wednesday February 07 2001, @07:45AM (#449619) Homepage
    5 hours does not surprise me at all. PostScript printers are optimized for text rendering, not vector rendering. 180MB of vector image at about 15 bytes per vector will be 12M vectors; the RIP is running at 700 vectors/sec. Not bad for (probably) MIPS running at 200 MHz without floating point - considering that PostScript vectors are rendered as rectangles with end caps and transitions, one-pixel accurate.

    Size of the file doesn't matter - each sequence of vectors is rendered separately, slapped on the bit map of the page, and on to the next one.

    HPGL/2 will not help - the complexity of the primitives is the same. HP/GL and PostScript share the same rendering backend on some printers.

    Most plotters nowdays are wide-format inkjets with the same raster backend as other printers. Old pen plotters can't physically do 700 vectors/sec. No way. More like 25. How about drawing the same thing for five days, switching depleted pens on the fly? (reminds me of the old days... where's the old trusty 7225?)
(1) | 2