Seeking debug tips for Kaffe on NSPR

Robert S. Thau rst at ai.mit.edu
Tue May 26 13:00:50 PDT 1998


Godmar Back writes:
 > I just glanced at the NSPR specification, and it would be really nice if
 > you could discuss the port some time on this list, if you have the time.

I haven't got time to post a detailed review right now; I was going to
write something up a bit later in the week, in part for the NSPR guys.

 > For instance, I read that they provide a malloc/free, but it didn't become
 > immediately clear how that will tie in with the gc.

I just plain hacked pagealloc() in mem/gc-mem.c to call PR_Malloc(),
if that's what you're asking.  If not, you may be asking about the
undocumented PR_SuspendAll/ResumeAll/ScanStackPointers hooks which are
declared in .../private/pprthred.h.  (I'm using the Kaffe GC at the
moment, as you've probably guessed).  Note that ScanStackPointers does
several scans per thread besides the stack (including registers and
per-thread data), despite the name.

 > Also, how does thread stopping work?  Do threads have to check periodically?

Yes, and I don't have checks in all the right places yet.  What's
more, I'm not sure I can --- the most likely place for a trap check is
in memory allocation, but that won't allow you to stop a thread which
is doing "while (true) continue;", or even something more plausible
like a large FFT among preallocated arrays which could go for a while
without consing.

I've already gone one round with the NSPR folks about this; I didn't
want to go another until I had code running, since it's in nobody's
interest to waste time arguing about code that doesn't exist.

 > As for the licensing issue:  what prevents Transvirtual from distributing
 > Kaffe under the Mozilla Public License?  Would that protect Transvirtual's
 > interests?  Would that solve the dilemma?

So long as Transvirtual has title to the code, they can release it
under any license they choose, including LGPL, Artistic, Berkeley,
MPL, NPL with themselves as Initial Developer, or some other license
they found in a box of Crackerjacks purchased at Fry's.  All of those
would eliminate the licensing conflict (with the probable exception of
the candy-coated popcorn), but whether any of them would protect
Transvirtual's interests is a question only they can answer, in part
because it depends on what they're trying to protect.

rst



More information about the kaffe mailing list