Forgot your password?
typodupeerror
Linux Software

Linux 2.4 Schematic Poster (Generated From Source!) 127

Posted by Hemos
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.

Linux 2.4 Schematic Poster (Generated From Source!)

Comments Filter:
  • by Anonymous Coward
    Well, you'd probably have to export a whole lot more of the kernel to userland than is done now. Also, the task switching would kill your speed.
  • Exactly where each process was within the kernel is pretty ambigious. On the other hand you
    might be able to use the kernel profiling support for this.
  • Actually, alot of the new plotters being made by HP >do use PS....like the 2000 and 3000 series designjets.
  • by Alan (347)
    Thanks for the mirror BTW, now I can change my background :)

    I'm not sure what you're running off of, but try being /.ed on a P133, 32mb ram, on a DSL link (40k upstream cap). Especially when the page has lots of non-mod_perl'ed cgis :)

    Ooops. And wow, did that hurt!

  • a really, REALLY pot of spaghetti?

    I was wondering what all that green pasta was at the supermarket....
    --
  • > Does the length of the line/spiral represent the length of the function ?

    Hi!

    Well, look at analyze_function.lex, which does this breakdown; it's basically a line of length 1 per "statement" (the output of this is sent to data2ps, which randomly jitters the angle).

    Hope that helps,
    Rusty.
  • > Can we please have an assembly version so it takes 1/2 hour and not 1/2 day? :(

    That would be wrong. It could be done in a 1/2 hour by using a much less naive system, and allowing it to be parallelized better.

    I was optimizing for *my* time, not yours 8)
    Rusty.
  • shopt is a bash BUILTIN command.

    The PROPER solution to this problem ... is to add almost entirely at the top this line:

    SHELL=/usr/local/bin/bash

    (or wherever your bash resides)
    that will make make use the shell provided.
  • I once met a professor of compsci at the university of waterloo who wrote some Java software for doing this kind of thing. We discussed using his software to analyze a very large software system I was working on at the time (IBM DB2 UDB). He has a web page [uwaterloo.ca] with some code. Although they appear dated, you may also want to check out his student reports on the architecture of Linux (done using his tool, I would imagine).
  • oh, no; don't mention the idea to Don Lancaster [tinaja.com] or it could happen.

    ...the horrors...


  • Try Together. www.togethersoft.com

    I don't use their product, but it does what you want.

    Oh, and they charge for it. That's business for you.
  • What distribution are you using? I'm getting TONS of errors when I try to compile this thing.. First problem was to fix the "shopts" line in Makefile to "set -o noglob" then I had to make some changes to gen_makefile.sh and comment a sed line out of Makefile, etc..

    Now I'm stuck on "Runtime error (func=(main), adr=23): Divide by zero"

    If you would like to take this discussion to email, remove "nispam." from my email address..

    Geoff
  • I took Rusty's LGP source code and hacked it up (and hacked is definitely the dominant verb) so that it could work with any collection of *.c files. I named this hack "codewheel [cow.net]", although I promise I won't be passing the thing off like I wrote it or anything.

    Basically, it works just like LGP except that it 1. Works with a single directory instead of many, 2. Doesn't put in Tux, the key, the title, or anything, and 3. Includes a slight more documentation than the original, though not that much more.

    Everyone wanted it, it's now something you can check out and download and play with. Anybody who programs for a living will sneer and snicker at my efforts, but that's life, right? At least I put my efforts up for others. Enjoy.

    - Jason Scott
    Amateur Code Guy

  • It would be less overhead to use the /bin/sh
    $$ facility.



    TEMPFILE=/yourfastdisk/tmp$$

  • They say they want to print posters. I like the idea. But won't they have to include the source code for the PS file on the back of the poster??? Otherwise it would violate the GPL no?


    adrien cater
    boring.ch [boring.ch]
  • i know. i was trying to be funny.
    adrien cater
    boring.ch [boring.ch]
  • 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.

  • Note that Linus said "we" understood it - a group of people can understand Linux. No group of people, however large, however clever, can understand W2K :)
  • It renders in a few minutes or less using Ghostscript on a P3-750. I used:
    gs -sDEVICE=dnj650c -sPAPERSIZE=archE -sOUTPUTFILE=filename.rtl filename.ps
    and sent the result raw (check those lpr/lp options!) to a designjet 650C, which printed it as fast as the network and mechanism allowed. The 650C is pretty slow -- it probably took 15-20 minutes.
  • Most of the analysis time (hours on my dual p3/750) is in the "Classifying nonstatic functions" aka classify_nonstatics.sh which as Rusty implied, is a slow n-squared algorithm.

    I'm pretty sure this part can be done in 5-20 minutes on my machine by recoding the algorithm to use a join (using the join(1) command) and am testing that now, but don't unfortunately have a bunch of time to spend on it.

    I'll put a patch, not guaranteed to work, at http://puffin.external.hp.com/~bame/ [hp.com], if anyone's interested, hopefully tomorrow. Or e-mail me if there's a better place to send this possibly broken patch (besides sending it to Rusty when it seems to be working well).

  • when i run make it gives me this error
    Copying ring1 functions from kernel directory...
    /bin/sh: shopt: command not found
    make: *** [image/ring1] Error 1


    any ideas? looks like it is hanging on line 81 of the Makefile.

    use LaTeX? want an online reference manager that
  • previously it was failing on rh 6.2. the make file has made it to the ring3 functions on mandrake 7.2.

    use LaTeX? want an online reference manager that
  • it finally crapped out on mandrake 7.2 after it finished classifying the rings. i'm trying it on redhat 7.0 now. so far it has made it past the point where redhat 6.2 died.

    use LaTeX? want an online reference manager that
  • You say that like it's a lot of ram. That's 256MB dude. I have that in my home PC.

    Now if you're talking about a printer with 256MB, then that's something...
    --
    Patrick Doyle

  • I'm not sure it's such a great way to visualize anything. There is no design information presented in the diagram; just the entire call graph of the program, which you can tell almost as easily from looking at the code.

    Any more information in the diagram--its arrangement into concentric circles and radial slices, for instance--was likely added manually (although I'm just guessing here).

    Surely there are diagrams which capture the design abstractions of a system better than a call graph?
    --
    Patrick Doyle
  • Linus is actually guilty of a fairly major logic error here. Just because he can fix a bug once in Linux doesn't instantly mean the whole source is understood by him, much less actually understood by anyone. You only have to look on Kernel Traffic to see there are still bugs in the 2.4.x kernel (has anyone actually found all the filesystem corruption bugs yet?) that no one is quite sure of the solution to - just none of them are showstoppers.

    Nothing in Linus' speech takes anything from Win2k either - it is entirely possible that a similar bug could be found in Win2k and fixed in just as fast a time (ping of death was fixed in under 24 hours for example). That doesn't instantly mean the Win2k source is completely simple - it just means that one bug was fixed quickly.

    If you read "Inside Windows 2000 - 3rd edition" you'll start to see that the guts of Win2k actually are fairly well separated, possibly even better than the current Linux kernel. There is a clean separation between most components of the executive and the kernel and if there was a plot printed, my guess would be that it would look more like meatballs than spaghetti - lots of tightly coupled chunks of code with well defined interfaces between them. On a project as large as Win2k there is simply no other way you can effectively work.

    Kudos to Linus for fixing a bug in the 2.0 kernel so quickly, but I'm afraid there is just no logical step you can make to the statement that "No one understands NT".

  • Actually, they aren't the ones I was talking about. They are the strawmen generally set up when people don't want to admit bugs that are actually there. Look at these links:

    http://kt.linuxcare.com/kernel-traffic/kt20010202_ 105.epl#5 [linuxcare.com]

    http://www.uwsg.indiana.edu/hypermail/linux/kernel /0102.0/0220.html [indiana.edu]

    Maybe your 'summary' was really a strawman and the fact is that Linux is getting complex enough that no one person can fully understand it?

  • Your comment is incorrect by the simple fact that Win2k exists. If the collective knowledge of how it works does not exist then it is impossible that it was ever written.

    The other fact is that it is relatively easy to get a high level view of how Win2k works (despite your unfounded rhetoric to the contrary). Read the book I mentioned in my original post.
  • NOOBODY expects the spanish inquisition. I did why do you think I don't live in spain. ;P
  • hrm. 'till the end of the world?

    (re: the sig, in case you're wondering)
  • There's two ways to avoid being modded down around here.

    Either make sure the main point of your message is how great Linux is or that Micro$oft (MUST use the dollar sign) really suck...

    ...or mention somewhere in your post that 'I know i'm going to get modded down for this but...'

    Still, i'll probably get modded down for saying it...

    (and never, never, try to be funny)
  • 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?

    You may also want to clone Andy Tannenbaum. Now that's either funny or trolling... not sure which...
  • (ping of death was fixed in under 24 hours for example).

    Ummmmm... You misspelled "2 years" as "under 24 hours".
    Ordinarily I don't bother with spelling corrections,
    but this does totally change your post.

    ---CONFLICT!!---
  • My Lisp Machine has a database that it keeps for the *entire operating system*, not just the kernel, which is called WHO-CALLS. It's just that -- a db of what function calls what.

    The object investigator uses this db to provide an in-depth view of every single random thing within the operating system. It's quite useful when hacking on something that has a lot of interconnections to other parts of the system.

    Of course, the debugger is fantastically sophisticated as well. It provides a similar level of functionality. Too bad the Unix people never paid attention to their betters. Maybe someday they'll learn, or someone will write an easily portable Lisp-based OS.
  • err, flamebait? did i miss something, admittedly i spelt 'posters' wrong, but come on ...

  • Maybe we should concentrate on "cloning" a bathtub for the Cox who's already here...
  • Ha! This is the funniest post I've read all day. Must have taken all of 5 minutes for this server to die.

  • Did you read the linked page before you posted to the topic? The poster at ThinkGeek has the actual contents of ~(1/2) the linux source (acct.c thru module.c). The schematic poster contains all the functions found within the linux source with some designation of how they all call each other.
  • We better clone Mr. Gates so that the cloned Linus would keep up motivated (in the reverse direction).
  • Yes, it is. It's called the tux kernel poster. Big penguin thing, top left corner.
  • counterpoint taken. :)
  • the story is an interesting one and I'm fascinated by it, but, on a side note i think this anecdote is an exqample of why we need to start thinking about an open group that could take up the mantle of responsibility for kernel development. I'm not saying this should reponsibility should be taken FROM Linus but for Linus. I can imagine that eventually he will grow weary of it. I'm not making predictions but even i got tired of my childhood toys. (no I'm not calling Linux a Linus' toy, my analogy is just poor but i think you get the point) I'm thinking along the lines of some kind of board or committee with Linus at the head that would oversee kernel dev. the idea has two benefits.

    1. Linus doesn't have to exhaust himself doing two jobs or feel obligated to the community as I'm certain he feels now. He would be free to loosen the reins a bit and relax.

    2.I think companies would be more ready to move to Linux (isn't that our goal, world domination :)) if they knew there would be someone to go to even if Linus is unavailable.

    I know that anyone could look at the kernel and make the appropriate adjustments but, Linus was bale to do it in under 48 hours. how long would the USPS have to wait if Linus was unavailable and they were forced to hunt down a competent coder to do the work that he could do in a short time. with a board available they would have multiple options and a list of names that they could be certain could fulfill their needs.

    just imagine if linus had been unavailable. what if during the time he had taken a vaction to a deserted island with no net connection for a month in an effort to unwind. you may thin kthe USPS is slow but look at the volume they deal in. a week or a month of not being able to properly use my software and I start thinking "this is not the reliable easy to fix software i had heard it was. lets switch to solaris or *bsd."

    do you understand what i mean? Linus if you're reading do you or are you so full of yourself that you don't care and think that there's nothing that could happen you couldn't fix in no time flat. if he's in a car crash and ends up in traction for a year kernel dev stops. If I'm a fortune 500 company that depends on kernel updates and new advances being implemented quickly i worry that there is no one to go to.

    i think I've more than made my point. let the flamage begin.
  • Where? I don't see it on ThinkGeek. You'd think they'd have it on their Posters page [thinkgeek.com], but they don't. So where is it?

    dopp

  • Rusty

    Very cool work - thanks ! Very Nasty Code - thanks !

    Can you give us more of a description of *why* the code is doing, as opposed to *what* ? What are the deciding factors for the layout of the function blocks ? What about the colored lines within ? I know that forks represent code forks, but the curves ?

    For example, I took a look at drivers/net/tokenring/olympic.c and it shows one function sprintf_info as a large block with a simple green spiral in it. No if/switch statements, so no forks in the line. Does the length of the line/spiral represent the length of the function ? I thought that was the size of the box ...

    Need Input !

    Possible enhancement - show partial call graphs, just within .c files. Perhaps thin faint arrows showing which functions call which funtions within the file. No external functions, or maybe just thinner/fainter arrows pointing in the direction of the called external function.
  • Gotcha. I started poking through the code some more, but missed that :( Ah well.

    Different issue now - the cut marks. I'm assuming you're supposed to cut at the lines pointed to by the arrows, right ? If you cut off the left and bottom margins, the bottom of the page still has the upper arrow of the cut-mark pointing down, and the right arrow pointing left at the left margin. These are within the viewable area.

    Shouldn't the cut marks only have arrows in the discardable part of the image ?

  • Or you could use Ximian's Dia, which is FREE FREE FREE.
    --
  • Actually, there is a tool that does something like this. "Application Mining Suite" by a french outfit called CAST. Sadly, they are very Microsoft focused in their endeavours.

    CAST website: http://www.castsoftware.com/ [castsoftware.com]
  • 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?

    I don't think SMP would work with Linuses or Alans.

    Could you imagine the power of a Beowulf cluster of Linus Clones?
  • If you use 'make KERNEL_DIR=whatever -jX' where X is a number larger than 1 (I used 6 on my SMP machine), you can make the poster generation process go much faster (mine took 3.5 hours instead of 12).

  • If we had an obfuscated post contest --> you would be in the top ten ;-)
  • Wallpaper for the computer room anywone?
    ;-)

  • oops..... Maybe I'd better consider making my wallpaper out of a dictionary instead!
  • BTW, it took us about 5 hours to get that file to print

    Reminds me of the Mandelbrot set and raytracing images I've seen written in .ps. As it takes a while to render those on my K6, I wonder what the old printers at our college would think of them..

    --

  • In truth no it is still up. I just grabbed it. Not as cool as you would think really hard to read. :(
  • This is cool and I just started working for a company that sells really big printers. I print 100 meg files all the time. ;-). Does anyone have a fast connection they can offer the postscript file for download? ~Bryan Starbuck
  • A program change PS to a graphics format (like a virtual printer, substitutes *.bmp or *.xpm pixels for printer dots) would be handy -- does one exist?

    (Does anyone want to make one?)

    Changing any other (graphics) format would then be simple as [load] and [save-as] with any graphics editor.

  • Cloning Alan Cox would be a bad idea; though not as bad as cloning RMS .


    * shudder *


    You know they don't call it GNU/Linux for no reason..


    --
  • So, how long will it take until I can order one of these posters from ThinkGeek [thinkgeek.com] or Copyleft [copyleft.net]? I want one!

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

    Alex Bischoff
    ---
  • I'm looking for a program that instead of using the directory structure uses the class heirarchy to draw a map of a program.
  • I wonder how difficult that would be to implement ?

    About as difficult as a debugger, I'd imagine...
  • I think you'd end up watching a dots move around the subsystems displaying the screen saver, for the most part.
  • that's the *text of the kernel, not a map of the kernel.
  • 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.
  • update that works for redhat 6.2 http://lgp.linuxcare.com.au/lgp-2.4.0a.tar.bz2 [linuxcare.com.au]

    use LaTeX? want an online reference manager that
  • the author sent me a patch to take care of the tempfile stuff in rh 6.2

    download patch here [pitt.edu]

    use LaTeX? want an online reference manager that
  • http://sage.che.pitt.edu/~harrold/mirrors/Final-0. 2-30pct-index_32.png [pitt.edu]

    use LaTeX? want an online reference manager that
  • 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...

  • 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 [rational.com]
  • 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.

  • 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! :-)

  • 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.

  • 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
  • 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

  • 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.
  • 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.

  • [self emitOpinion:
    [Opinion opinionAgreeingTo:
    [[Thread currentThread] previousPost]];
  • 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 !
  • 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 [thinkgeek.com] is going to put one out?
  • by smartin (942) on Wednesday February 07, 2001 @06: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
  • by Shoeboy (16224) on Wednesday February 07, 2001 @07: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 @06: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.
  • by selectspec (74651) on Wednesday February 07, 2001 @07: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 @06:29AM (#449603) Homepage Journal
    will the paosters be available in Europe anytime soon?

  • by CarrotLord (161788) <don@richarde.gmail@com> on Wednesday February 07, 2001 @06: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 :)

  • by 7-Vodka (195504) on Wednesday February 07, 2001 @07:24AM (#449605) Journal
    http://128.119.144.229/files/Final-0.2-30pct-index 32.png
  • by Shoeboy (16224) on Wednesday February 07, 2001 @06: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
  • by hernick (63550) on Wednesday February 07, 2001 @11: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 @10: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 @06: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 @06:30AM (#449610)
    Someone trying to do this with Windows 2000? Ever seen a picture of a really, REALLY pot of spaghetti?
  • by 7-Vodka (195504) on Wednesday February 07, 2001 @07:27AM (#449611) Journal
    so that's what a slashdotting is like. I didn't even link it.
  • by JWhitlock (201845) <John-Whitlock AT ieee DOT org> on Wednesday February 07, 2001 @07: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 @01: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@@@dotsrc...org> on Wednesday February 07, 2001 @08: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 @10: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

  • by SpanishInquisition (127269) on Wednesday February 07, 2001 @06: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 @07: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 @01: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 @08: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?)

You are in a maze of UUCP connections, all alike.

Working...