Experiences using GCJ as an embedded compiler

Jon Olson olson@mmsi.com
Tue Mar 30 08:05:00 GMT 1999


> Jon> 2) Write barriers

> Ditto here.

> Jon> Fortunately, write-barriers were relatively simple to add to
> Jon> GCC. The following code, added to `gcc/expr.c', invokes a
> Jon> new `write_barrier' RTL pattern whenever it writes a pointer
> Jon> to memory.

> Does this include register spills and other writes to the stack?

Nope, it doesn't, but it doesn't need to.... In general, stacks get
modified in a variety of ad-hoc ways by the compiler. With store_multiples,
function prologues code written in C, etc. Not only would it be
difficult but inefficient to write barrier all the stack writes.
Instead, I just make the scheduler record whenever it schedules a
thread; the collector clears this flag whenever it scans a stack.
At the end of the mark phase, I just need to rescan any thread
stacks that got scheduled during marking.
-- 
Jon Olson, Modular Mining Systems
	 3289 E. Hemisphere Loop
	 Tucson, AZ 85706
INTERNET: olson@mmsi.com
PHONE: (520)746-9127
FAX: (520)889-5790


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /