[ENH] B3D Acceleration for X
Greg A. Woods
woods at weird.com
Mon May 21 08:01:22 UTC 2001
[ On Sunday, May 20, 2001 at 14:22:37 (+0200), Bert Freudenberg wrote: ]
> Subject: Re: [ENH] B3D Acceleration for X
>
> I figured it might be better to not have the VM itself depend on OpenGL.
Well, linking statically avoids that issue completely....
> Also, for debugging it's way easier with an external module - I don't need
> to restart the VM but just compile the external module, do
> Smalltalk unloadModule: 'B3DAcceleratorPlugin'
> and it gets reloaded on next use. Very handy.
Hmmm, yes, I suppose so -- so long as the module is always extremely
well behaved though... :-)
> I don't think it is a noticable slow-down: after all, the VM loads a
> couple of shared libs anyway (libc, libm, libX11, libXext, libdl, libnsl).
> That said, I, too, like a single executable better than one that needs a
> bunch of shared libraries.
I can now confirm that a statically linked squeak VM appears to start up
somewhat faster than a dynamically linked one (at least on my NetBSD
system), though attempts to measure this with a script that just does
"Smalltalk quitPrimitive" (and is started using -headless) doesn't show
very much difference (one tenth of a second less 'system' time on
average). I'll have to try again when my machine is more quiescent....
One issue I forgot to mention: On NetBSD it is currently (and IMHO
hopefully forever) impossible to load dynamic modules from a statically
linked binary, which further necessitates my desire to directly link all
plugins into squeak.
Note that for normal Unix tasks with a good mix of many short run
processes and with not too much I/O (eg. compiling) static linking
(eg. of the compiler) can offer very significant savings. IIRC there
were reports of up to 15% savings in run-time when building a system
kernel.
> To compile it internally, the only thing needed should be to include the
> B3DAcceleratorPlugin into the list of internal modules when generating a
> new VM. It might be necessary to put all the files from the
> B3DAcceleratorPlugin directory into the src/unix or src/generated
> directory. And you have to dynamically link libGL into the VM - put
> something like "AC_CHECK_LIB(GL, glBegin)" into configure.in.
hmmm... yes, a quick hack to the generated makefile to test with
Profiler and System and that seems to work, at least in the sense of
generating a usable binary. I'll try B3DAccelerator tomorrow....
Proper support will require hacking configure.in and util/mkfrags.
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods at acm.org> <woods at robohack.ca>
Planix, Inc. <woods at planix.com>; Secrets of the Weird <woods at weird.com>
More information about the Squeak-dev
mailing list
|