Slashdot Mirror


Linux 2.4 Schematic Poster (Generated From Source!)

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!"

43 of 127 comments (clear)

  1. ThinkGeek/Copyleft? by abischof · · Score: 2

    So, how long will it take until I can order one of these posters from ThinkGeek or Copyleft? I want one!

    Alex Bischoff
    ---

    --

    Alex Bischoff
    HTML/CSS coder for hire

    1. Re:ThinkGeek/Copyleft? by abischof · · Score: 2

      To clarify, yes, I know that I can order one from Linuxcare ... But, I'm still looking for more of an automated e-commerce approach, instead of just having to email someone and such ;).

      Alex Bischoff
      ---

      --

      Alex Bischoff
      HTML/CSS coder for hire

  2. Equivalent program for C++ class structures by heroine · · Score: 2

    I'm looking for a program that instead of using the directory structure uses the class heirarchy to draw a map of a program.

    1. Re:Equivalent program for C++ class structures by drivers · · Score: 2

      It's called UML.

      Rational Rose will do this. It is used for planning a system at the class level (and then generating the class files) or reverse-engineering existing classes into a UML diagram.


      Yup, and you can have it all for the low-low price of $2394

  3. Re:What would be even cooler... by greg_barton · · Score: 2

    I wonder how difficult that would be to implement ?

    About as difficult as a debugger, I'd imagine...

  4. Re:What would be even cooler... by abulafia · · Score: 2

    I think you'd end up watching a dots move around the subsystems displaying the screen saver, for the most part.

    --
    I forget what 8 was for.
  5. Re:Poster's already available... by alhaz · · Score: 2

    that's the *text of the kernel, not a map of the kernel.

    --
    This is just like television, only you can see much further.
  6. Solution for RH 6.2 Problem... by yobtah · · Score: 2

    The Makefile uses /bin/sh, which is a symlink to bash on a RedHat 6.2 system. Bash doesn't understand shopt, but bash2 does. Assuming you have bash2 installed, login as root and change the /bin/sh symlink so it points to /bin/bash2. That should make things work under RH 6.2.

  7. version that works with redhat 6.2 by gimpboy · · Score: 2

    update that works for redhat 6.2 http://lgp.linuxcare.com.au/lgp-2.4.0a.tar.bz2

    use LaTeX? want an online reference manager that

    --
    -- john
  8. patch for rh 6.2 by gimpboy · · Score: 2

    the author sent me a patch to take care of the tempfile stuff in rh 6.2

    download patch here

    use LaTeX? want an online reference manager that

    --
    -- john
  9. and another by gimpboy · · Score: 2

    http://sage.che.pitt.edu/~harrold/mirrors/Final-0. 2-30pct-index_32.png

    use LaTeX? want an online reference manager that

    --
    -- john
  10. Is it live, or is it... by BrK · · Score: 2
    While this is a neat excercise from a coding perspective, would anyone be able to tell the difference between the chart, and a random bunch of lines/circles/squares/colors?

    I dunno, the image just strikes me as sort of...

    --
    -This sig intentionally left blank
  11. Re:We badly need this for GCC... by devphil · · Score: 2

    I usually never even see AC posts, but fortunately for you I fscked up my browsing settings. (They're fixed now, BTW.) No, I don't have a link, but it's been tossed around on the mailing lists several times. You can go to http://gcc.gnu.org/ and search the lists. I don't think it ever got formalized to one of the extensions listed on the Extensions page.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  12. We badly need this for GCC... by devphil · · Score: 2


    I've been looking at Doxygen to help document the guts of the new replacement libstdc++-v3 library. These scripts would also help, in a big way.

    I very much want to run the code for the compiler itself through these scripts and doxygen.

    Many people, over the last year-and-some-odd, have made good progress towards implementing a new back-end target in GCC: an XML generator for your code. Rather than creating assembly, GCC would create XML. (And you'd better damn well believe that the first thing we'd run through it would be the sources to the compiler itself! :-)

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  13. Re:Could you imagine... by underwhelm · · Score: 2
    Ever seen a picture of a really, REALLY pot of spaghetti?

    Are you suggesting that Win2k is not just spaghetti, but something like the platonic ideal of spaghetti?

    I can buy that.

    --

    I don't need large brains to have a good time.

  14. Re:What? by jovlinger · · Score: 2

    grin!

    Guido Van Rossum's brother apparently did some work (or worked for a company that ...) on active postscript fonts. These fonts would update their font metrics pseudorandomly after each character, thus retaining their general shape yet never printing the exact same way twice.

    Kinda neat.

    You can probably chase it down from python.org

  15. Re:Could you imagine... by treke · · Score: 2

    The kernel doesn't stop with out him. Most of the day to day development isnt done by Linus, it's don by the maintainers of the specific subsystems. Linus does organize final releases, but that isn't even soley his job. One of the late 2.2 kernels(17 I think) was actually released by Alan Cox before Linus gave it final blessing.

    The bug mentioned here was fixed by Linus, but he is certainly not the only one capable of fixing it. He probably fixed it because he was the contact for that part of the kernel and he was the one who found the solution first. If he wasn't reached RedHat would have brought it to someone else.

    If Linus was in a car accident, some slow down may occur in areas where Linus would normally be the standard contact, but other developers would take up the slack. It would be much like the head of the NT Executive team being in a car accident. A very valuable programmer(and human being) would be injured, but the project would go on without it. No one talks about the NT kernel team much though.
    treke

  16. Re:european availability by pigpogm · · Score: 2

    Wankers claiming that anti-MS stuff always gets modded up... or conversely that pro-MS stuff get modded down.
    Do you actually read /.? I've noticed a slight trend here.

    Stupid fuckers moaning about how they are about to get modded down.
    Learn to take a joke.

    Why don't you just fucking kill yourself, and save the world the pain of suffering your presence any longer.
    If i had to live life as you apparantly do, with no humor, and without the guts to even speak as myself (AC) then i probably would. Pitiful.

    How about another thing to expect on /.? Mindless humorless trolls overreacting, and spouting abuse at anyone who disagrees with them.

    --
    PigPog.
  17. Re:What would be even cooler... by Salsaman · · Score: 2
    I don't think it would kill the speed; what you could do is, every millisecond or so choose a process @ random (or cycle through a list) and query it as to what code it is running.

    Also, why would it not work for kernel threads ? You could use one of the debugging tools.

  18. Re:{ question } by f5426 · · Score: 2

    [self emitOpinion:
    [Opinion opinionAgreeingTo:
    [[Thread currentThread] previousPost]];

    --

    1 reply beneath your current threshold.

  19. 5 hours rendreing? Duh... by BluesBear · · Score: 2

    Doesn't it strike anyone else as ... well not really smart, to print this in PS ? For ze dUdes out there, large printers are called plotters, and they prefer languages like HPGL/2-RTL, CALS or even straight TIFF. Much better suited languages for that kind of work. 5 hours, Jesus H Christ !

  20. I saw this in New York... by manyoso · · Score: 2

    The poster was hanging up on the linuxcare booth. They had a spliced together version which was put together from a bunch of standard letter size printouts. They also had a glossy poster version but the print quality was not as detailed as the spliced version. The tech told me they had tried to print it off a computer with a quarter gig of ram and the thing just choked... This was one of the *coolest* things I saw from the expo and I am absolutely going to pick one up. I wonder if thinkgeek.com is going to put one out?

  21. I saw this at Linux Expo by smartin · · Score: 3

    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

    --
    The difference between Canada and the USA is that in Canada healthcare is a right and gun ownership is a privilege.
  22. Re:{ question } by Shoeboy · · Score: 3

    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

  23. reminds me of the redhat annual report by option8 · · Score: 3

    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.

  24. Re:{ question } by selectspec · · Score: 3

    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

    --

    Someone you trust is one of us.

  25. european availability by spiny · · Score: 3

    will the paosters be available in Europe anytime soon?

    --

    Fry: heh, Yakov Smirnoff said it
    Leela: No he didn't.
  26. Awesome! by CarrotLord · · Score: 3
    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 :)

    --
    Quidquid latine dictum sit, altum videtur.
  27. heres a mirror: by 7-Vodka · · Score: 3

    http://128.119.144.229/files/Final-0.2-30pct-index 32.png

    --

    Liberty.

  28. 100% totally offtopic by Shoeboy · · Score: 4

    Sorry for the offtopic post, but there is a PNG available 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

  29. tempfile by hernick · · Score: 4

    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.

  30. Posters are useful to check students' coding style by gallir · · Score: 4
    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.

    --
    sgis ddo ekil t'nod i
  31. What's next? Linus' DNA? by VSarkiss · · Score: 4

    "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?

    ;-)

  32. Could you imagine... by TheOutlawTorn · · Score: 4

    Someone trying to do this with Windows 2000? Ever seen a picture of a really, REALLY pot of spaghetti?

    --

    He who joyfully marches in rank and file has already earned my contempt. - "Big Al" Einstein
    1. Re:Could you imagine... by warpeightbot · · Score: 5
      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

  33. wow by 7-Vodka · · Score: 4

    so that's what a slashdotting is like. I didn't even link it.

    --

    Liberty.

  34. Is this useful for programmers? by JWhitlock · · Score: 4
    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.

  35. Detailed Explanation by rusty · · Score: 5

    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.

  36. Fast Mirror (SunSITE dk) by creinig · · Score: 5

    Just mirrored it at http://sunsite.dk/lgdc/tmp/Final-0.2-30pct-index_3 2.png
    It's hosted at SunSITE Denmark as you see, which should have enough bandwidth.
    And yes, it's very cool, and it's completely unreadable at that size & resolution :)

  37. What? by SpanishInquisition · · Score: 5
    Linus wants to reimplement Linux in Postscript? What kind of crack has he been smoking?
    Linux running on a LaserWriter, what a joke.

    --
    Je t'aime Stéphanie
  38. What would be even cooler... by Salsaman · · Score: 5
    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 ?

  39. Heh! That's nothing by BluedemonX · · Score: 5

    There's an open source PERL listing out there that generates the picture of the goatse.cx guy out of Slashdot troll posts.

    --

    --- Jump!! Fire!! Bullet time!! - Lego version of the Matrix
  40. Re:5 hours rendreing? Duh... by $pacemold · · Score: 5

    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?)