×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Linux 2.4 Schematic Poster (Generated From Source!)

Hemos posted more than 13 years ago | from the pretty-damn-cool dept.

Linux 127

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

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

127 comments

Re:What would be even cooler... (1)

Anonymous Coward | more than 13 years ago | (#449493)

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.

Re:What would be even cooler... (1)

tamyrlin (51) | more than 13 years ago | (#449494)

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.

Re:5 hours rendreing? Duh... (1)

Mongr (238) | more than 13 years ago | (#449495)

Actually, alot of the new plotters being made by HP >do use PS....like the 2000 and 3000 series designjets.

Re:wow (1)

Alan (347) | more than 13 years ago | (#449496)

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!

Re:Could you imagine... (1)

Evangelion (2145) | more than 13 years ago | (#449497)


a really, REALLY pot of spaghetti?

I was wondering what all that green pasta was at the supermarket....
--

Re:Detailed Explanation (1)

rusty (3244) | more than 13 years ago | (#449499)

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

Re:Problems with the Makefile (1)

Daeron (4056) | more than 13 years ago | (#449500)

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 knew this rung a bell... (1)

leoc (4746) | more than 13 years ago | (#449501)

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

Re:tempfile (1)

geoffeg (15786) | more than 13 years ago | (#449504)

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

GPL and printed Posters? (1)

adrien (26080) | more than 13 years ago | (#449507)

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]

Re:Equivalent program for C++ class structures (1)

JimMcCusker (27543) | more than 13 years ago | (#449509)

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.

Re:Could you imagine... (1)

WSSA (27914) | more than 13 years ago | (#449510)

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

Re:5 hours rendreing? Duh... (1)

corporateSlave (28902) | more than 13 years ago | (#449511)

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.

Re:You can make the poster faster if... (1)

corporateSlave (28902) | more than 13 years ago | (#449512)

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

Re:Problems with the Makefile (1)

gimpboy (34912) | more than 13 years ago | (#449513)

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

seems to be working on mandrake 7.2 (1)

gimpboy (34912) | more than 13 years ago | (#449514)

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

crapped out on mandrake 7.2 (1)

gimpboy (34912) | more than 13 years ago | (#449515)

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

Quarter gig? (1)

p3d0 (42270) | more than 13 years ago | (#449516)

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

Re:Awesome! (1)

p3d0 (42270) | more than 13 years ago | (#449517)

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

Re:Could you imagine... (1)

throx (42621) | more than 13 years ago | (#449518)

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

Re:What's next? Linus' DNA? (1)

jovlinger (55075) | more than 13 years ago | (#449522)

hrm. 'till the end of the world?

(re: the sig, in case you're wondering)

Re:european availability (1)

pigpogm (70382) | more than 13 years ago | (#449523)

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)

Re:What's next? Linus' DNA? (1)

Spankophile (78098) | more than 13 years ago | (#449524)

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

Re:Is this useful for programmers? (1)

Fnordulicious (85996) | more than 13 years ago | (#449526)

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.

Re:european availability (1)

spiny (87740) | more than 13 years ago | (#449527)

err, flamebait? did i miss something, admittedly i spelt 'posters' wrong, but come on ...

Killing a Server 101 (1)

nwetters (93281) | more than 13 years ago | (#449529)

Ha! This is the funniest post I've read all day. Must have taken all of 5 minutes for this server to die.

Re:Poster's **NOT** already available... (1)

magnified_plaid (98212) | more than 13 years ago | (#449530)

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.

Mr. Gates (1)

masoolsa (100288) | more than 13 years ago | (#449531)

We better clone Mr. Gates so that the cloned Linus would keep up motivated (in the reverse direction).

Re:Poster's already available... (1)

11thangel (103409) | more than 13 years ago | (#449532)

Yes, it is. It's called the tux kernel poster. Big penguin thing, top left corner.

Re:Could you imagine... (1)

RestiffBard (110729) | more than 13 years ago | (#449534)

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.

Re:Equivalent program for C++ class structures (1)

Nimey (114278) | more than 13 years ago | (#449538)

Or you could use Ximian's Dia, which is FREE FREE FREE.
--

Re:Is this useful for programmers? (1)

januschr (118746) | more than 13 years ago | (#449539)

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]

Re:What's next? Linus' DNA? (1)

ayden (126539) | more than 13 years ago | (#449540)

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?

You can make the poster faster if... (1)

zaius (147422) | more than 13 years ago | (#449541)

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

Re:cool use for this! (1)

brad3378 (155304) | more than 13 years ago | (#449544)

oops..... Maybe I'd better consider making my wallpaper out of a dictionary instead!

Printing time (1)

TeknoHog (164938) | more than 13 years ago | (#449545)

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

--

Re:Killing a Server 101 (1)

SquadBoy (167263) | more than 13 years ago | (#449546)

In truth no it is still up. I just grabbed it. Not as cool as you would think really hard to read. :(

Wow, good thing work has really big printers. (1)

brystar (171956) | more than 13 years ago | (#449547)

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

Re:What's next? Linus' DNA? (1)

flikx (191915) | more than 13 years ago | (#449549)

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


--

PostScript Application Server (1)

leighklotz (192300) | more than 13 years ago | (#449550)

Actually, we once wrote an application server entirely in PostScript, including an object-oriented database, an object system with multiple inheritance, mod-loadable signed applications, an image processing library, and other goodies. It was in PostScript because it was designed to run inside devices that already ran PostScript.

We wrote some of the code directly in PostScript, but we wrote other parts of it in a language called PdB, which was a C++-like syntax to PostScript compiler. We worked with the guy who wrote the compiler, but eventually he quit the project and went to work for Sun on the Oak project and wrote their compiler -- startlingly similar syntax. The guy who wrote the compiler was named Arthur van Hoff... Eventually when Java came out we re-wrote the whole thing in Java.

Re:Could you imagine... (1)

TheOutlawTorn (192318) | more than 13 years ago | (#449551)

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

40 million lines of code. It may be flamebait, but it's TRUE flamebait.

Get another SB (1)

Quila (201335) | more than 13 years ago | (#449552)

BTW, it took us about 5 hours to get that file to print at a print shop down at LWE

Exactly how old is their equipment? Modern wide format printers can print several square meters per hour, and I've ripped 250+MB combined CMYK bitmap and vector files (with meshed CMYK gradients and other complicated goodies) on a Fiery ZX in under 10 minutes.

In any case, compress that thing before sending since vector PS files compress quite well.

Re:Get another SB (1)

BluesBear (203512) | more than 13 years ago | (#449558)

Bitmaps, CMYK or other are actually no-brainers for wide format printers. They render vector formats into bitmaps anyway.
So converting one linear bitmap format to another is nothing.
Rasterizing a large vector file is what take time. And memory, lots of it.
What baffles me is the choice of vector. PS is good at page-setting, not at drawing. It's no wonder it took so long for a printer to render that from PS.

Re:5 hours rendreing? Duh... (1)

BluesBear (203512) | more than 13 years ago | (#449559)

O they do, I didn't say that. It's just not as efficient a language for vector drawing. Very good at page setting, and vector text.

Why exactly was this moderated to Flamebait? (1)

rxmd (205533) | more than 13 years ago | (#449560)

I fail to see the flamebait in this; practically anyone in Europe who has ever ordered something from across the ocean is used to either unavailability or age-long delays.

Why does this only work on kernel source? (1)

somerandomchars (239417) | more than 13 years ago | (#449566)

Pardon my ingratitude towards Rusty ( I realize this must have been a herculean effort ), but I fail to see why this script should work exclusively on kernel source. This script would be of infinite use to coders everywhere if it could be rewritten to handle any source. Maybe it'll be my next project.

Re:Posters are useful to check students' coding st (1)

spood (256582) | more than 13 years ago | (#449569)

Ah hah! Now I know why I got bad grades in all my programming classes!

That was really some work (1)

ooze (307871) | more than 13 years ago | (#449570)

I really have to get the source, as I really want to know how he tracked function pointers.

Problems with the Makefile (1)

frob2600 (309047) | more than 13 years ago | (#449571)

Is anyone else having problems getting the Makefile to work? It might just be me. Well, that is one thing I need to learn anyway. Where is that man page?

Hmm. I think I am going to modify this and see how it works on the FreeBSD kernel. If I have some free time. I usually get about 5 hours of sleep a day as it is, usually less. I don't know if I could survive another pet project that will produce something I will never use.
{Then again, I could make the file and print them on the school's printers. I will just have to run when the admin bursts out of the office wondering wtf is going on. Why is some one printing a 100+MB file?!?!?!}

---
"Do not meddle in the affairs of sysadmins,

Re:Detailed Explanation (1)

urgusabic (310259) | more than 13 years ago | (#449572)

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

I found that this didn't work on my Slackware 7.0 box, as it couldn't find the mktemp command. However, as an earlier post suggested, TMPFILE=tmp$$ seems to have done the job.

Now I just have to wait another few hours for it to render...

Hang on... (1)

Ubi_NL (313657) | more than 13 years ago | (#449574)

Are they now going to email these 180MB vector postscript files to everyone?
...
O dear
...
Does anyone know where I can get a new Hard Drive like Really fast? =/

Re:{ question } -- and answer. (1)

wishyfish (313742) | more than 13 years ago | (#449575)

For the Windows world, you might try Understand for C++ from Scitools (www.scitools.com), or CC-Rider from Western Wares (www.westernwares.com). Both allow you to generate function call graphs for a body of C or C++ source code. Understand for C++ seems a little less picky than CC-Rider in terms of dealing with missing include files, whereas CC-Rider seems to be a little more stable overall, but both are pretty cool tools.

Re:Awesome! (1)

sed-httpd (313761) | more than 13 years ago | (#449576)

Well. I think that is a really nice thing. I would really like to have this tool for C,fortran,perl, etc.. and there should be an option for output in ascii and there should be smart settings for recursive functions etc... A really nice thing. And you should NOT complain about postscript. There is a postscript webbserver! And there is a ... well look at my nick to find out what language it is written in.

ThinkGeek/Copyleft? (2)

abischof (255) | more than 13 years ago | (#449577)

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

Re:ThinkGeek/Copyleft? (2)

abischof (255) | more than 13 years ago | (#449578)

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

Equivalent program for C++ class structures (2)

heroine (1220) | more than 13 years ago | (#449579)

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

Re:What would be even cooler... (2)

greg_barton (5551) | more than 13 years ago | (#449580)

I wonder how difficult that would be to implement ?

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

Re:What would be even cooler... (2)

abulafia (7826) | more than 13 years ago | (#449581)

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

Re:Poster's already available... (2)

alhaz (11039) | more than 13 years ago | (#449582)

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

Solution for RH 6.2 Problem... (2)

yobtah (16795) | more than 13 years ago | (#449583)

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.

Is it live, or is it... (2)

BrK (39585) | more than 13 years ago | (#449587)

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

Re:Equivalent program for C++ class structures (2)

drivers (45076) | more than 13 years ago | (#449588)

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]

Re:We badly need this for GCC... (2)

devphil (51341) | more than 13 years ago | (#449589)

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.

We badly need this for GCC... (2)

devphil (51341) | more than 13 years ago | (#449590)


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

Re:Could you imagine... (2)

underwhelm (53409) | more than 13 years ago | (#449591)

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.

Re:What? (2)

jovlinger (55075) | more than 13 years ago | (#449592)

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

Re:Could you imagine... (2)

treke (62626) | more than 13 years ago | (#449593)

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

Re:What would be even cooler... (2)

Salsaman (141471) | more than 13 years ago | (#449595)

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.

Re:{ question } (2)

f5426 (144654) | more than 13 years ago | (#449596)

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

5 hours rendreing? Duh... (2)

BluesBear (203512) | more than 13 years ago | (#449597)

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 !

I saw this in New York... (2)

manyoso (260664) | more than 13 years ago | (#449598)

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?

I saw this at Linux Expo (3)

smartin (942) | more than 13 years ago | (#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 } (3)

Shoeboy (16224) | more than 13 years ago | (#449600)

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

reminds me of the redhat annual report (3)

option8 (16509) | more than 13 years ago | (#449601)

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.

Awesome! (3)

CarrotLord (161788) | more than 13 years ago | (#449604)

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

100% totally offtopic (4)

Shoeboy (16224) | more than 13 years ago | (#449606)

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 (4)

hernick (63550) | more than 13 years ago | (#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.

Posters are useful to check students' coding style (4)

gallir (171727) | more than 13 years ago | (#449608)

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.

What's next? Linus' DNA? (4)

VSarkiss (173815) | more than 13 years ago | (#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?

;-)

Could you imagine... (4)

TheOutlawTorn (192318) | more than 13 years ago | (#449610)

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

Is this useful for programmers? (4)

JWhitlock (201845) | more than 13 years ago | (#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.

Detailed Explanation (5)

rusty (3244) | more than 13 years ago | (#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.

Re:Could you imagine... (5)

warpeightbot (19472) | more than 13 years ago | (#449615)

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

SpanishInquisition (127269) | more than 13 years ago | (#449616)

Linus wants to reimplement Linux in Postscript? What kind of crack has he been smoking?
Linux running on a LaserWriter, what a joke.

What would be even cooler... (5)

Salsaman (141471) | more than 13 years ago | (#449617)

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 ?

Heh! That's nothing (5)

BluedemonX (198949) | more than 13 years ago | (#449618)

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

Re:5 hours rendreing? Duh... (5)

$pacemold (248347) | more than 13 years ago | (#449619)

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?)
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...