From: Godmar Back (gback@marker.cs.utah.edu)
Date: Sat Jan 23 1999 - 17:16:32 EST
Alexandre,
I did a quick analysis on how libtool's dumb table mechanism increases the
size and footprint of kaffe.
size kaffe/kaffe/.libs/KaffeS.o shows that the symbols and the table in
KaffeS.o takes ca. 25.7 KB, ca. 17.25 KB in text and ca. 8.48 KB in data. [1]
By comparison, we aim for a footprint of less than 500KB for text in the
OSKit, which includes a filesystem, TCP/IP stack, some device drivers etc.
The table in kaffeS.c includes 764 entries. However, only the 251 entries
that start with "java_" or "kaffe_" are actually needed.
If one considers the fact that the average length of the symbols that start
with "java_" or "kaffe_" is 31.7 characters, while the total average
is only 22.9 characters, it turns out that the amount of memory wasted is
ca. 9KB in text and ca. 5.5 KB in data.
It is safe to say that this is more than we're willing to tolerate in
the OSKit, where Kaffe is always statically linked and the tables do indeed
take physical memory. It is especially bad if you consider that there's
not even a space/time tradeoff involved, but that it is simply storing
garbage.
One possible, and I think straightforward solution would be to add an
optional argument to --with-export (or whatever it's called) that specifies
a regular expression that all symbols included in the preopen table must
match.
- Godmar
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:47 EDT