[kaffe] CVS kaffe (guilhem): Big GC update + Fixed a few warnings.
Kaffe CVS
cvs-commits at kaffe.org
Mon Aug 2 03:57:12 PDT 2004
PatchSet 5035
Date: 2004/08/02 10:44:53
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Big GC update + Fixed a few warnings.
* kaffe/kaffevm/Makefile.am
(libkaffevm_la_SOURCES): Removed gcRefs.c, gcRefs.h.
* kaffe/kaffevm/boehm-gc/boehm/BCC_MAKEFILE,
kaffe/kaffevm/boehm-gc/boehm/aix_irix_threads.c,
kaffe/kaffevm/boehm-gc/boehm/allchblk.c,
kaffe/kaffevm/boehm-gc/boehm/alloc.c,
kaffe/kaffevm/boehm-gc/boehm/checksums.c,
kaffe/kaffevm/boehm-gc/boehm/cord/cordprnt.c,
kaffe/kaffevm/boehm-gc/boehm/cord/cordtest.c,
kaffe/kaffevm/boehm-gc/boehm/cord/cordxtra.c,
kaffe/kaffevm/boehm-gc/boehm/cord/de.c,
kaffe/kaffevm/boehm-gc/boehm/darwin_stop_world.c,
kaffe/kaffevm/boehm-gc/boehm/dbg_mlc.c,
kaffe/kaffevm/boehm-gc/boehm/doc/README,
kaffe/kaffevm/boehm-gc/boehm/doc/README.changes,
kaffe/kaffevm/boehm-gc/boehm/doc/README.darwin,
kaffe/kaffevm/boehm-gc/boehm/doc/README.environment,
kaffe/kaffevm/boehm-gc/boehm/doc/README.macros,
kaffe/kaffevm/boehm-gc/boehm/doc/README.win32,
kaffe/kaffevm/boehm-gc/boehm/doc/debugging.html,
kaffe/kaffevm/boehm-gc/boehm/doc/gcdescr.html,
kaffe/kaffevm/boehm-gc/boehm/doc/gcinterface.html,
kaffe/kaffevm/boehm-gc/boehm/doc/simple_example.html,
kaffe/kaffevm/boehm-gc/boehm/dyn_load.c,
kaffe/kaffevm/boehm-gc/boehm/finalize.c,
kaffe/kaffevm/boehm-gc/boehm/gcj_mlc.c,
kaffe/kaffevm/boehm-gc/boehm/headers.c,
kaffe/kaffevm/boehm-gc/boehm/if_not_there.c,
kaffe/kaffevm/boehm-gc/boehm/include/gc.h,
kaffe/kaffevm/boehm-gc/boehm/include/gc_allocator.h,
kaffe/kaffevm/boehm-gc/boehm/include/gc_config_macros.h,
kaffe/kaffevm/boehm-gc/boehm/include/gc_cpp.h,
kaffe/kaffevm/boehm-gc/boehm/include/gc_gcj.h,
kaffe/kaffevm/boehm-gc/boehm/include/gc_local_alloc.h,
kaffe/kaffevm/boehm-gc/boehm/include/gc_mark.h,
kaffe/kaffevm/boehm-gc/boehm/include/javaxfc.h,
kaffe/kaffevm/boehm-gc/boehm/include/new_gc_alloc.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/darwin_stop_world.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/dbg_mlc.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/gc_locks.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/gc_pmark.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/gc_priv.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/gcconfig.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/pthread_support.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/solaris_threads.h,
kaffe/kaffevm/boehm-gc/boehm/include/private/specific.h,
kaffe/kaffevm/boehm-gc/boehm/mach_dep.c,
kaffe/kaffevm/boehm-gc/boehm/malloc.c,
kaffe/kaffevm/boehm-gc/boehm/mallocx.c,
kaffe/kaffevm/boehm-gc/boehm/mark.c,
kaffe/kaffevm/boehm-gc/boehm/misc.c,
kaffe/kaffevm/boehm-gc/boehm/new_hblk.c,
kaffe/kaffevm/boehm-gc/boehm/os_dep.c,
kaffe/kaffevm/boehm-gc/boehm/pthread_stop_world.c,
kaffe/kaffevm/boehm-gc/boehm/pthread_support.c,
kaffe/kaffevm/boehm-gc/boehm/solaris_pthreads.c,
kaffe/kaffevm/boehm-gc/boehm/solaris_threads.c,
kaffe/kaffevm/boehm-gc/boehm/tests/middle.c,
kaffe/kaffevm/boehm-gc/boehm/tests/test.c,
kaffe/kaffevm/boehm-gc/boehm/tests/test_cpp.cc,
kaffe/kaffevm/boehm-gc/boehm/tests/trace_test.c,
kaffe/kaffevm/boehm-gc/boehm/threadlibs.c,
kaffe/kaffevm/boehm-gc/boehm/typd_mlc.c,
kaffe/kaffevm/boehm-gc/boehm/version.h,
kaffe/kaffevm/boehm-gc/boehm/win32_threads.c:
Upgraded to gc6.3.
* kaffe/kaffevm/boehm-gc/Makefile.am
(libkaffegc_la_SOURCES): Added gc-refs.[ch] and gc-kaffe.[ch].
* kaffe/kaffevm/boehm-gc/Makefile.frag:
Define GC_DEFS.
* kaffe/kaffevm/boehm-gc/gc-kaffe.c,
kaffe/kaffevm/boehm-gc/gc-kaffe.h: New allocation kind for boehm-gc.
* kaffe/kaffevm/boehm-gc/gc-refs.c,
kaffe/kaffevm/boehm-gc/gc-refs.h: New files to handle Java references
with the GC. Largely inspired from gcRefs.[ch]
* kaffe/kaffevm/boehm-gc/gc2.c:
Reimplemented.
* kaffe/kaffevm/classMethod.h,
kaffe/kaffevm/classPool.c
(walkClassEntries): New parameter.
* kaffe/kaffevm/debug.c:
(dprintf): If stderr has been closed we must
exit the main loop because it is a potential infinite
loop.
* kaffe/kaffevm/gc.h:
(walk_func_t): New parameter.
(KGC_OBJECT_NORMAL, KGC_OBJECT_FIXED): Reindented.
(GarbageCollectorInterface_Ops): New entries:
getCollectorName, addRef, rmRef.
(markAddress, markObject): New parameter.
(createGC): Removed parameter.
(KGC_getCollectorName, KGC_addRef, KGC_rmRef):
New GC call.
(KGC_markObject): New parameter.
* kaffe/kaffevm/gcFuncs.c:
(walkMethods, walkClass, walkRefArray,
walkObject, walkLoader): New parameter.
(walkMethods): Removed dead code.
(initCollector): createGC has no parameter now.
* kaffe/kaffevm/gcRefs.c,
kaffe/kaffevm/gcRefs.h: Removed.
* kaffe/kaffevm/kaffe-gc/Makefile.in,
kaffe/kaffevm/boehm-gc/Makefile.in,
kaffe/kaffevm/systems/unix-pthreads/Makefile.in,
kaffe/kaffevm/Makefile.in:
Regenerated.
* kaffe/kaffevm/kaffe-gc/Makefile.am:
(libkaffegc_la_SOURCES): Added gc-refs.c.
(noinst_HEADERS): Added gc-refs.h.
* kaffe/kaffevm/kaffe-gc/Makefile.frag:
Define GC_DEFS.
* kaffe/kaffevm/kaffe-gc/gc-incremental.c:
(walkRootSet): Removed.
(gcMarkAddress, gcMarkObject): New parameter.
(KaffeGC_walkConservative): Cleaned up.
(gcGetObjectBase): Fixed warnings.
(kaffeGC_WalkMemory): Updated to new API.
(gcMan): Renamed function call.
(startGC): Call KaffeGC_walkRefs directly now.
(gcMalloc): Cleaned up.
(createGC): Removed parameter.
* kaffe/kaffevm/kaffe-gc/gc-incremental.h: Fixed a few warnings.
* kaffe/kaffevm/kaffe-gc/gc-mem.h:
Fixed a few warnings.
* kaffe/kaffevm/kaffe-gc/gc-refs.c: New file. Moved from gcRefs.c.
* kaffe/kaffevm/kaffe-gc/gc-refs.h: New file. Moved from gcRefs.h.
* kaffe/kaffevm/ksem.c
(ksemGet, ksemPut): Marked sem as volatile to prevent deadlocks.
* kaffe/kaffevm/object.c
(newMultiArrayChecked): Transformed the recursive algorithm
in an iterative one.
* kaffe/kaffevm/string.c,
kaffe/kaffevm/string.h
(stringWalk): New parameter.
* kaffe/kaffevm/support.c: Removed dead code.
* kaffe/kaffevm/systems/unix-pthreads/Makefile.am:
(AM_CPPFLAGS): Use GC_DEFS from the GC makefile.frag.
* kaffe/kaffevm/systems/unix-pthreads/lock-impl.c:
Include "gc.h" if kaffe is compiled with the Boehm-GC.
* kaffe/kaffevm/systems/unix-pthreads/signal.c
(detectStackBoundaries): If kaffe is compiled with the Boehm-GC
use GC_stackbottom to get stack boundaries.
* kaffe/kaffevm/systems/unix-jthreads/jthread.c,
kaffe/kaffevm/systems/unix-jthreads/jthread.h,
kaffe/kaffevm/systems/unix-pthreads/thread-impl.c,
kaffe/kaffevm/systems/unix-pthreads/thread-internal.h
(jthread_walkLiveThreads) accept some user data for the
walk function.
* kaffe/kaffevm/systems/unix-jthreads/jthread.h
(jthread_attach_current_thread): Moved the UNUSED attribute before
bool.
* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
(tInitSignalHandlers): Do not enable SIG_SUSPEND and
SIG_RESUME if the boehm-gc is enabled.
(jthread_suspendall, jthread_unsuspendall):
If the boehm-gc is enabled, use GC_stop_world
and GC_start_world.
* kaffe/kaffevm/systems/unix-pthreads/thread-internal.h
(jthread_on_current_stack): Added some debug trace.
* kaffe/kaffevm/thread.c
(dumpJavaThread): jthread_walkLiveThreads has a new parameter.
Members:
ChangeLog:1.2593->1.2594
kaffe/kaffevm/Makefile.am:1.68->1.69
kaffe/kaffevm/Makefile.in:1.172->1.173
kaffe/kaffevm/classMethod.h:1.66->1.67
kaffe/kaffevm/classPool.c:1.27->1.28
kaffe/kaffevm/debug.c:1.54->1.55
kaffe/kaffevm/gc.h:1.25->1.26
kaffe/kaffevm/gcFuncs.c:1.54->1.55
kaffe/kaffevm/gcRefs.c:1.14->1.15(DEAD)
kaffe/kaffevm/gcRefs.h:1.2->1.3(DEAD)
kaffe/kaffevm/ksem.c:1.6->1.7
kaffe/kaffevm/object.c:1.26->1.27
kaffe/kaffevm/string.c:1.34->1.35
kaffe/kaffevm/stringSupport.h:1.12->1.13
kaffe/kaffevm/support.c:1.70->1.71
kaffe/kaffevm/thread.c:1.70->1.71
kaffe/kaffevm/boehm-gc/Makefile.am:1.4->1.5
kaffe/kaffevm/boehm-gc/Makefile.frag:1.1->1.2
kaffe/kaffevm/boehm-gc/Makefile.in:1.9->1.10
kaffe/kaffevm/boehm-gc/gc-kaffe.c:INITIAL->1.1
kaffe/kaffevm/boehm-gc/gc-kaffe.h:INITIAL->1.1
kaffe/kaffevm/boehm-gc/gc-refs.c:INITIAL->1.1
kaffe/kaffevm/boehm-gc/gc-refs.h:INITIAL->1.1
kaffe/kaffevm/boehm-gc/gc2.c:1.2->1.3
kaffe/kaffevm/boehm-gc/boehm/BCC_MAKEFILE:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/aix_irix_threads.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/allchblk.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/alloc.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/checksums.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/darwin_stop_world.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/dbg_mlc.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/dyn_load.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/finalize.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/gcj_mlc.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/headers.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/if_not_there.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/mach_dep.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/malloc.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/mallocx.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/mark.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/misc.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/new_hblk.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/os_dep.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/pthread_stop_world.c:1.2->1.3
kaffe/kaffevm/boehm-gc/boehm/pthread_support.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/solaris_pthreads.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/solaris_threads.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/threadlibs.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/typd_mlc.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/version.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/win32_threads.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/cord/cordprnt.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/cord/cordtest.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/cord/cordxtra.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/cord/de.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/README:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/README.changes:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/README.darwin:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/README.environment:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/README.macros:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/README.win32:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/debugging.html:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/gcdescr.html:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/gcinterface.html:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/doc/simple_example.html:INITIAL->1.1
kaffe/kaffevm/boehm-gc/boehm/include/gc.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/gc_allocator.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/gc_config_macros.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/gc_cpp.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/gc_gcj.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/gc_local_alloc.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/gc_mark.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/javaxfc.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/new_gc_alloc.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/darwin_stop_world.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/dbg_mlc.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/gc_locks.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/gc_pmark.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/gc_priv.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/gcconfig.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/pthread_support.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/solaris_threads.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/include/private/specific.h:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/tests/middle.c:INITIAL->1.1
kaffe/kaffevm/boehm-gc/boehm/tests/test.c:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/tests/test_cpp.cc:1.1->1.2
kaffe/kaffevm/boehm-gc/boehm/tests/trace_test.c:1.1->1.2
kaffe/kaffevm/kaffe-gc/Makefile.am:1.1->1.2
kaffe/kaffevm/kaffe-gc/Makefile.frag:1.1->1.2
kaffe/kaffevm/kaffe-gc/Makefile.in:1.7->1.8
kaffe/kaffevm/kaffe-gc/gc-incremental.c:1.1->1.2
kaffe/kaffevm/kaffe-gc/gc-incremental.h:1.1->1.2
kaffe/kaffevm/kaffe-gc/gc-mem.h:1.1->1.2
kaffe/kaffevm/kaffe-gc/gc-refs.c:INITIAL->1.1
kaffe/kaffevm/kaffe-gc/gc-refs.h:INITIAL->1.1
kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.116->1.117
kaffe/kaffevm/systems/unix-jthreads/jthread.h:1.61->1.62
kaffe/kaffevm/systems/unix-pthreads/Makefile.am:1.9->1.10
kaffe/kaffevm/systems/unix-pthreads/Makefile.in:1.87->1.88
kaffe/kaffevm/systems/unix-pthreads/lock-impl.c:1.8->1.9
kaffe/kaffevm/systems/unix-pthreads/signal.c:1.12->1.13
kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.34->1.35
kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.16->1.17
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2593 kaffe/ChangeLog:1.2594
--- kaffe/ChangeLog:1.2593 Sun Aug 1 21:34:08 2004
+++ kaffe/ChangeLog Mon Aug 2 10:44:53 2004
@@ -1,3 +1,198 @@
+2004-08-02 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * kaffe/kaffevm/Makefile.am
+ (libkaffevm_la_SOURCES): Removed gcRefs.c, gcRefs.h.
+
+ * kaffe/kaffevm/boehm-gc/boehm/BCC_MAKEFILE,
+ kaffe/kaffevm/boehm-gc/boehm/aix_irix_threads.c,
+ kaffe/kaffevm/boehm-gc/boehm/allchblk.c,
+ kaffe/kaffevm/boehm-gc/boehm/alloc.c,
+ kaffe/kaffevm/boehm-gc/boehm/checksums.c,
+ kaffe/kaffevm/boehm-gc/boehm/cord/cordprnt.c,
+ kaffe/kaffevm/boehm-gc/boehm/cord/cordtest.c,
+ kaffe/kaffevm/boehm-gc/boehm/cord/cordxtra.c,
+ kaffe/kaffevm/boehm-gc/boehm/cord/de.c,
+ kaffe/kaffevm/boehm-gc/boehm/darwin_stop_world.c,
+ kaffe/kaffevm/boehm-gc/boehm/dbg_mlc.c,
+ kaffe/kaffevm/boehm-gc/boehm/doc/README,
+ kaffe/kaffevm/boehm-gc/boehm/doc/README.changes,
+ kaffe/kaffevm/boehm-gc/boehm/doc/README.darwin,
+ kaffe/kaffevm/boehm-gc/boehm/doc/README.environment,
+ kaffe/kaffevm/boehm-gc/boehm/doc/README.macros,
+ kaffe/kaffevm/boehm-gc/boehm/doc/README.win32,
+ kaffe/kaffevm/boehm-gc/boehm/doc/debugging.html,
+ kaffe/kaffevm/boehm-gc/boehm/doc/gcdescr.html,
+ kaffe/kaffevm/boehm-gc/boehm/doc/gcinterface.html,
+ kaffe/kaffevm/boehm-gc/boehm/doc/simple_example.html,
+ kaffe/kaffevm/boehm-gc/boehm/dyn_load.c,
+ kaffe/kaffevm/boehm-gc/boehm/finalize.c,
+ kaffe/kaffevm/boehm-gc/boehm/gcj_mlc.c,
+ kaffe/kaffevm/boehm-gc/boehm/headers.c,
+ kaffe/kaffevm/boehm-gc/boehm/if_not_there.c,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc_allocator.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc_config_macros.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc_cpp.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc_gcj.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc_local_alloc.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/gc_mark.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/javaxfc.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/new_gc_alloc.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/darwin_stop_world.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/dbg_mlc.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/gc_locks.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/gc_pmark.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/gc_priv.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/gcconfig.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/pthread_support.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/solaris_threads.h,
+ kaffe/kaffevm/boehm-gc/boehm/include/private/specific.h,
+ kaffe/kaffevm/boehm-gc/boehm/mach_dep.c,
+ kaffe/kaffevm/boehm-gc/boehm/malloc.c,
+ kaffe/kaffevm/boehm-gc/boehm/mallocx.c,
+ kaffe/kaffevm/boehm-gc/boehm/mark.c,
+ kaffe/kaffevm/boehm-gc/boehm/misc.c,
+ kaffe/kaffevm/boehm-gc/boehm/new_hblk.c,
+ kaffe/kaffevm/boehm-gc/boehm/os_dep.c,
+ kaffe/kaffevm/boehm-gc/boehm/pthread_stop_world.c,
+ kaffe/kaffevm/boehm-gc/boehm/pthread_support.c,
+ kaffe/kaffevm/boehm-gc/boehm/solaris_pthreads.c,
+ kaffe/kaffevm/boehm-gc/boehm/solaris_threads.c,
+ kaffe/kaffevm/boehm-gc/boehm/tests/middle.c,
+ kaffe/kaffevm/boehm-gc/boehm/tests/test.c,
+ kaffe/kaffevm/boehm-gc/boehm/tests/test_cpp.cc,
+ kaffe/kaffevm/boehm-gc/boehm/tests/trace_test.c,
+ kaffe/kaffevm/boehm-gc/boehm/threadlibs.c,
+ kaffe/kaffevm/boehm-gc/boehm/typd_mlc.c,
+ kaffe/kaffevm/boehm-gc/boehm/version.h,
+ kaffe/kaffevm/boehm-gc/boehm/win32_threads.c:
+ Upgraded to gc6.3.
+
+ * kaffe/kaffevm/boehm-gc/Makefile.am
+ (libkaffegc_la_SOURCES): Added gc-refs.[ch] and gc-kaffe.[ch].
+
+ * kaffe/kaffevm/boehm-gc/Makefile.frag:
+ Define GC_DEFS.
+
+ * kaffe/kaffevm/boehm-gc/gc-kaffe.c,
+ kaffe/kaffevm/boehm-gc/gc-kaffe.h: New allocation kind for boehm-gc.
+
+ * kaffe/kaffevm/boehm-gc/gc-refs.c,
+ kaffe/kaffevm/boehm-gc/gc-refs.h: New files to handle Java references
+ with the GC. Largely inspired from gcRefs.[ch]
+
+ * kaffe/kaffevm/boehm-gc/gc2.c:
+ Reimplemented.
+
+ * kaffe/kaffevm/classMethod.h,
+ kaffe/kaffevm/classPool.c
+ (walkClassEntries): New parameter.
+
+ * kaffe/kaffevm/debug.c:
+ (dprintf): If stderr has been closed we must
+ exit the main loop because it is a potential infinite
+ loop.
+
+ * kaffe/kaffevm/gc.h:
+ (walk_func_t): New parameter.
+ (KGC_OBJECT_NORMAL, KGC_OBJECT_FIXED): Reindented.
+ (GarbageCollectorInterface_Ops): New entries:
+ getCollectorName, addRef, rmRef.
+ (markAddress, markObject): New parameter.
+ (createGC): Removed parameter.
+ (KGC_getCollectorName, KGC_addRef, KGC_rmRef):
+ New GC call.
+ (KGC_markObject): New parameter.
+
+ * kaffe/kaffevm/gcFuncs.c:
+ (walkMethods, walkClass, walkRefArray,
+ walkObject, walkLoader): New parameter.
+ (walkMethods): Removed dead code.
+ (initCollector): createGC has no parameter now.
+
+ * kaffe/kaffevm/gcRefs.c,
+ kaffe/kaffevm/gcRefs.h: Removed.
+
+ * kaffe/kaffevm/kaffe-gc/Makefile.in,
+ kaffe/kaffevm/boehm-gc/Makefile.in,
+ kaffe/kaffevm/systems/unix-pthreads/Makefile.in,
+ kaffe/kaffevm/Makefile.in:
+ Regenerated.
+
+ * kaffe/kaffevm/kaffe-gc/Makefile.am:
+ (libkaffegc_la_SOURCES): Added gc-refs.c.
+ (noinst_HEADERS): Added gc-refs.h.
+
+ * kaffe/kaffevm/kaffe-gc/Makefile.frag:
+ Define GC_DEFS.
+
+ * kaffe/kaffevm/kaffe-gc/gc-incremental.c:
+ (walkRootSet): Removed.
+ (gcMarkAddress, gcMarkObject): New parameter.
+ (KaffeGC_walkConservative): Cleaned up.
+ (gcGetObjectBase): Fixed warnings.
+ (kaffeGC_WalkMemory): Updated to new API.
+ (gcMan): Renamed function call.
+ (startGC): Call KaffeGC_walkRefs directly now.
+ (gcMalloc): Cleaned up.
+ (createGC): Removed parameter.
+
+ * kaffe/kaffevm/kaffe-gc/gc-incremental.h: Fixed a few warnings.
+
+ * kaffe/kaffevm/kaffe-gc/gc-mem.h:
+ Fixed a few warnings.
+
+ * kaffe/kaffevm/kaffe-gc/gc-refs.c: New file. Moved from gcRefs.c.
+
+ * kaffe/kaffevm/kaffe-gc/gc-refs.h: New file. Moved from gcRefs.h.
+
+ * kaffe/kaffevm/ksem.c
+ (ksemGet, ksemPut): Marked sem as volatile to prevent deadlocks.
+
+ * kaffe/kaffevm/object.c
+ (newMultiArrayChecked): Transformed the recursive algorithm
+ in an iterative one.
+
+ * kaffe/kaffevm/string.c,
+ kaffe/kaffevm/string.h
+ (stringWalk): New parameter.
+
+ * kaffe/kaffevm/support.c: Removed dead code.
+
+ * kaffe/kaffevm/systems/unix-pthreads/Makefile.am:
+ (AM_CPPFLAGS): Use GC_DEFS from the GC makefile.frag.
+
+ * kaffe/kaffevm/systems/unix-pthreads/lock-impl.c:
+ Include "gc.h" if kaffe is compiled with the Boehm-GC.
+
+ * kaffe/kaffevm/systems/unix-pthreads/signal.c
+ (detectStackBoundaries): If kaffe is compiled with the Boehm-GC
+ use GC_stackbottom to get stack boundaries.
+
+ * kaffe/kaffevm/systems/unix-jthreads/jthread.c,
+ kaffe/kaffevm/systems/unix-jthreads/jthread.h,
+ kaffe/kaffevm/systems/unix-pthreads/thread-impl.c,
+ kaffe/kaffevm/systems/unix-pthreads/thread-internal.h
+ (jthread_walkLiveThreads) accept some user data for the
+ walk function.
+
+ * kaffe/kaffevm/systems/unix-jthreads/jthread.h
+ (jthread_attach_current_thread): Moved the UNUSED attribute before
+ bool.
+
+ * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
+ (tInitSignalHandlers): Do not enable SIG_SUSPEND and
+ SIG_RESUME if the boehm-gc is enabled.
+ (jthread_suspendall, jthread_unsuspendall):
+ If the boehm-gc is enabled, use GC_stop_world
+ and GC_start_world.
+
+ * kaffe/kaffevm/systems/unix-pthreads/thread-internal.h
+ (jthread_on_current_stack): Added some debug trace.
+
+ * kaffe/kaffevm/thread.c
+ (dumpJavaThread): jthread_walkLiveThreads has a new parameter.
+
2004-08-01 Ito Kazumitsu <kaz at maczuka.gcd.org>
* configure.ac: Fixed warnings in tests.
Index: kaffe/kaffe/kaffevm/Makefile.am
diff -u kaffe/kaffe/kaffevm/Makefile.am:1.68 kaffe/kaffe/kaffevm/Makefile.am:1.69
--- kaffe/kaffe/kaffevm/Makefile.am:1.68 Fri Jul 30 11:06:21 2004
+++ kaffe/kaffe/kaffevm/Makefile.am Mon Aug 2 10:44:55 2004
@@ -111,7 +111,6 @@
thread.c \
utf8const.c \
gcFuncs.c \
- gcRefs.c \
reflect.c \
$(BINRELOC_SOURCES)
@@ -149,7 +148,6 @@
stringParsing.h \
stringSupport.h \
support.h \
- gcRefs.h \
thread.h \
threadData.h \
utf8const.h \
Index: kaffe/kaffe/kaffevm/Makefile.in
diff -u kaffe/kaffe/kaffevm/Makefile.in:1.172 kaffe/kaffe/kaffevm/Makefile.in:1.173
--- kaffe/kaffe/kaffevm/Makefile.in:1.172 Fri Jul 30 11:06:21 2004
+++ kaffe/kaffe/kaffevm/Makefile.in Mon Aug 2 10:44:55 2004
@@ -98,7 +98,7 @@
hashtab.c inflate.c itypes.c jar.c ksem.c locks.c lookup.c \
object.c readClass.c soft.c stackTrace.c stats.c string.c \
stringParsing.c support.c thread.c utf8const.c gcFuncs.c \
- gcRefs.c reflect.c ../../binreloc/prefix.c
+ reflect.c ../../binreloc/prefix.c
@ENABLE_BINRELOC_TRUE at am__objects_1 = libkaffevm_la-prefix.lo
am_libkaffevm_la_OBJECTS = libkaffevm_la-access.lo \
libkaffevm_la-baseClasses.lo libkaffevm_la-classMethod.lo \
@@ -117,8 +117,7 @@
libkaffevm_la-string.lo libkaffevm_la-stringParsing.lo \
libkaffevm_la-support.lo libkaffevm_la-thread.lo \
libkaffevm_la-utf8const.lo libkaffevm_la-gcFuncs.lo \
- libkaffevm_la-gcRefs.lo libkaffevm_la-reflect.lo \
- $(am__objects_1)
+ libkaffevm_la-reflect.lo $(am__objects_1)
am__objects_2 = libkaffevm_la-md.lo
nodist_libkaffevm_la_OBJECTS = $(am__objects_2)
libkaffevm_la_OBJECTS = $(am_libkaffevm_la_OBJECTS) \
@@ -489,7 +488,6 @@
thread.c \
utf8const.c \
gcFuncs.c \
- gcRefs.c \
reflect.c \
$(BINRELOC_SOURCES)
@@ -527,7 +525,6 @@
stringParsing.h \
stringSupport.h \
support.h \
- gcRefs.h \
thread.h \
threadData.h \
utf8const.h \
@@ -620,7 +617,6 @@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-fp.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-gc.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-gcFuncs.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-gcRefs.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-hashtab.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-inflate.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libkaffevm_la-itypes.Plo at am__quote@
@@ -894,13 +890,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gcFuncs.c' object='libkaffevm_la-gcFuncs.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libkaffevm_la_CFLAGS) $(CFLAGS) -c -o libkaffevm_la-gcFuncs.lo `test -f 'gcFuncs.c' || echo '$(srcdir)/'`gcFuncs.c
-
-libkaffevm_la-gcRefs.lo: gcRefs.c
- at am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libkaffevm_la_CFLAGS) $(CFLAGS) -MT libkaffevm_la-gcRefs.lo -MD -MP -MF "$(DEPDIR)/libkaffevm_la-gcRefs.Tpo" -c -o libkaffevm_la-gcRefs.lo `test -f 'gcRefs.c' || echo '$(srcdir)/'`gcRefs.c; \
- at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libkaffevm_la-gcRefs.Tpo" "$(DEPDIR)/libkaffevm_la-gcRefs.Plo"; else rm -f "$(DEPDIR)/libkaffevm_la-gcRefs.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gcRefs.c' object='libkaffevm_la-gcRefs.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libkaffevm_la_CFLAGS) $(CFLAGS) -c -o libkaffevm_la-gcRefs.lo `test -f 'gcRefs.c' || echo '$(srcdir)/'`gcRefs.c
libkaffevm_la-reflect.lo: reflect.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libkaffevm_la_CFLAGS) $(CFLAGS) -MT libkaffevm_la-reflect.lo -MD -MP -MF "$(DEPDIR)/libkaffevm_la-reflect.Tpo" -c -o libkaffevm_la-reflect.lo `test -f 'reflect.c' || echo '$(srcdir)/'`reflect.c; \
Index: kaffe/kaffe/kaffevm/classMethod.h
diff -u kaffe/kaffe/kaffevm/classMethod.h:1.66 kaffe/kaffe/kaffevm/classMethod.h:1.67
--- kaffe/kaffe/kaffevm/classMethod.h:1.66 Fri Jul 30 11:06:22 2004
+++ kaffe/kaffe/kaffevm/classMethod.h Mon Aug 2 10:44:56 2004
@@ -515,7 +515,7 @@
classEntry* lookupClassEntryInternal(Utf8Const*,
Hjava_lang_ClassLoader*);
int removeClassEntries(Hjava_lang_ClassLoader*);
-void walkClassEntries(Collector *collector, Hjava_lang_ClassLoader*);
+void walkClassEntries(Collector *collector, void *gc_info, Hjava_lang_ClassLoader*);
Collector* initCollector(void);
Index: kaffe/kaffe/kaffevm/classPool.c
diff -u kaffe/kaffe/kaffevm/classPool.c:1.27 kaffe/kaffe/kaffevm/classPool.c:1.28
--- kaffe/kaffe/kaffevm/classPool.c:1.27 Sat Jul 17 07:57:13 2004
+++ kaffe/kaffe/kaffevm/classPool.c Mon Aug 2 10:44:56 2004
@@ -166,7 +166,7 @@
#endif
void
-walkClassEntries(Collector *collector, Hjava_lang_ClassLoader* loader)
+walkClassEntries(Collector *collector, void *gc_info, Hjava_lang_ClassLoader* loader)
{
classEntry* entry;
int ipool;
@@ -176,7 +176,7 @@
entry = entry->next)
{
if (entry->loader == loader && entry->state >= NMS_LOADING) {
- KGC_markObject(collector, entry->data.cl);
+ KGC_markObject(collector, gc_info, entry->data.cl);
}
}
}
Index: kaffe/kaffe/kaffevm/debug.c
diff -u kaffe/kaffe/kaffevm/debug.c:1.54 kaffe/kaffe/kaffevm/debug.c:1.55
--- kaffe/kaffe/kaffevm/debug.c:1.54 Thu Jul 8 09:04:56 2004
+++ kaffe/kaffe/kaffevm/debug.c Mon Aug 2 10:44:56 2004
@@ -26,9 +26,12 @@
#include <stdio.h>
+#include <errno.h>
#include "config.h"
#include "config-std.h"
#include "config-mem.h"
+#include "config-io.h"
+#include "config-signal.h"
#include "kaffe/jni_md.h"
#include "gtypes.h"
#include "gc.h"
@@ -420,6 +423,14 @@
if (w >= 0)
/* ignore errors */
max += w;
+ else if (errno != SIGINT)
+ {
+ /* Stderr should have been closed by another thread.
+ * We may only exit without printing anything.
+ */
+ break;
+ }
+
}
bufferBegin = 0;
}
Index: kaffe/kaffe/kaffevm/gc.h
diff -u kaffe/kaffe/kaffevm/gc.h:1.25 kaffe/kaffe/kaffevm/gc.h:1.26
--- kaffe/kaffe/kaffevm/gc.h:1.25 Sat Jul 17 07:57:13 2004
+++ kaffe/kaffe/kaffevm/gc.h Mon Aug 2 10:44:56 2004
@@ -27,12 +27,12 @@
#undef KGC_INCREMENTAL
typedef struct _Collector Collector;
-typedef void (*walk_func_t)(struct _Collector*, void*, uint32);
-typedef void (*final_func_t)(struct _Collector*, void*);
-typedef void (*destroy_func_t)(struct _Collector*, void*);
+typedef void (*walk_func_t)(struct _Collector* collector, void* gc_info, void* obj, uint32 size);
+typedef void (*final_func_t)(struct _Collector* collector, void* obj);
+typedef void (*destroy_func_t)(struct _Collector* collector, void* obj);
-#define KGC_OBJECT_NORMAL ((final_func_t)0)
-#define KGC_OBJECT_FIXED ((final_func_t)1)
+#define KGC_OBJECT_NORMAL ((final_func_t)0)
+#define KGC_OBJECT_FIXED ((final_func_t)1)
/*
* Garbage collector interface.
@@ -99,7 +99,7 @@
struct GarbageCollectorInterface_Ops {
- void* reserved1;
+ const char * (*getCollectorName)(Collector *);
void* reserved2;
void* reserved3;
void* (*malloc)(Collector *, size_t size, gc_alloc_type_t type);
@@ -111,16 +111,12 @@
void (*init)(Collector *);
void (*enable)(Collector *);
- void (*markAddress)(Collector *, const void* addr);
- void (*markObject)(Collector *, const void* obj);
+ void (*markAddress)(Collector *, void *gc_info, const void* addr);
+ void (*markObject)(Collector *, void *gc_info, const void* obj);
uint32 (*getObjectSize)(Collector *, const void* obj);
const char* (*getObjectDescription)(Collector *, const void* obj);
int (*getObjectIndex)(Collector *, const void* obj);
- void* (*getObjectBase)(Collector *, const void* obj);
-
- void (*walkMemory)(Collector *, void *addr);
- void (*walkConservative)(Collector *,
- const void* addr, uint32 length);
+ void* (*getObjectBase)(Collector *, void* obj);
void (*registerFixedTypeByIndex)(Collector *,
gc_alloc_type_t gc_index, const char *description);
@@ -137,9 +133,12 @@
uintp (*getHeapLimit)(Collector *);
uintp (*getHeapTotal)(Collector *);
+
+ bool (*addRef)(Collector *, const void *mem);
+ bool (*rmRef)(Collector *, void *ref);
};
-Collector* createGC(void (*_walkRootSet)(Collector*));
+Collector* createGC(void);
/*
* Convenience macros
@@ -160,14 +159,18 @@
((G)->ops->enable)((Collector*)(G))
#define KGC_throwOOM(G) \
((G)->ops->throwOOM)((Collector*)(G))
-#define KGC_markAddress(G, addr) \
- ((G)->ops->markAddress)((Collector*)(G), (addr))
+#define KGC_markAddress(G, gc_info, addr) \
+ ((G)->ops->markAddress)((Collector*)(G), (gc_info), (addr))
+#define KGC_addRef(G, addr) \
+ ((G)->ops->addRef)((Collector*)(G), (addr))
+#define KGC_rmRef(G, addr) \
+ ((G)->ops->rmRef)((Collector*)(G), (addr))
#if !defined(KAFFEH)
-static inline void KGC_markObject(void *g, void *addr)
+static inline void KGC_markObject(void *g, void *gc_info, void *addr)
{
if (addr)
- ((Collector*) g)->ops->markObject((Collector*) g, addr);
+ ((Collector*) g)->ops->markObject((Collector*) g, gc_info, addr);
}
#endif
@@ -179,10 +182,6 @@
((G)->ops->getObjectIndex)((Collector*)(G), (obj))
#define KGC_getObjectBase(G, obj) \
((G)->ops->getObjectBase)((Collector*)(G), (obj))
-#define KGC_walkMemory(G, addr) \
- ((G)->ops->walkMemory)((Collector*)(G), (addr))
-#define KGC_walkConservative(G, addr, len) \
- ((G)->ops->walkConservative)((Collector*)(G), (addr), (len))
#define KGC_registerFixedTypeByIndex(G, idx, desc) \
((G)->ops->registerFixedTypeByIndex)((Collector*)(G), \
(idx), (desc))
@@ -198,6 +197,8 @@
((G)->ops->getHeapLimit)((Collector *)(G));
#define KGC_getHeapTotal(G) \
((G)->ops->getHeapTotal)((Collector *)(G));
+#define KGC_getCollectorName(G) \
+ ((G)->ops->getCollectorName)((Collector *)(G));
#define KGC_WRITE(a, b)
/*
@@ -209,6 +210,8 @@
#define gc_calloc(A,B,C) KGC_malloc(main_collector,(A)*(B),C)
#define gc_realloc(A,B,C) KGC_realloc(main_collector,(A),(B),C)
#define gc_free(A) KGC_free(main_collector,(A))
+#define gc_add_ref(A) KGC_addRef(main_collector, (A))
+#define gc_rm_ref(A) KGC_rmRef(main_collector, (A))
#define invokeGC() KGC_invoke(main_collector,1)
#define adviseGC() KGC_invoke(main_collector,0)
@@ -219,6 +222,5 @@
#define gc_enableGC() KGC_enableGC(main_collector)
#define gc_disableGC() KGC_disableGC(main_collector)
-#include "gcRefs.h"
extern char* describeObject(const void* mem);
#endif
Index: kaffe/kaffe/kaffevm/gcFuncs.c
diff -u kaffe/kaffe/kaffevm/gcFuncs.c:1.54 kaffe/kaffe/kaffevm/gcFuncs.c:1.55
--- kaffe/kaffe/kaffevm/gcFuncs.c:1.54 Sat Jul 17 07:57:13 2004
+++ kaffe/kaffe/kaffevm/gcFuncs.c Mon Aug 2 10:44:56 2004
@@ -42,7 +42,6 @@
#include "jni.h"
#include "soft.h"
#include "thread.h"
-#include "gcRefs.h"
#include "methodCache.h"
#include "jvmpi_kaffe.h"
@@ -241,22 +240,10 @@
*/
static
void
-walkMethods(Collector* collector, Method* m, int nm)
+walkMethods(Collector* collector, void *gc_info, Method* m, int nm)
{
while (nm-- > 0) {
-#if defined(TRANSLATOR) && 0
- /* walk the block of jitted code conservatively.
- * Is this really needed?
- */
- if (METHOD_TRANSLATED(m) && (m->accflags & ACC_NATIVE) == 0) {
- void *mem = m->c.ncode.ncode_start;
- if (mem != 0) {
- KGC_walkConservative(collector, mem,
- KGC_getObjectSize(collector, mem));
- }
- }
-#endif
- KGC_markObject(collector, m->class);
+ KGC_markObject(collector, gc_info, m->class);
/* walk exception table in order to keep resolved catch types
alive */
@@ -267,7 +254,7 @@
for (i = 0; i < m->exception_table->length; i++) {
Hjava_lang_Class* c = eptr[i].catch_type;
if (c != 0 && c != UNRESOLVABLE_CATCHTYPE) {
- KGC_markObject(collector, c);
+ KGC_markObject(collector, gc_info, c);
}
}
}
@@ -279,7 +266,7 @@
* Walk a class object.
*/
static void
-walkClass(Collector* collector, void* base, uint32 size UNUSED)
+walkClass(Collector* collector, void *gc_info, void* base, uint32 size UNUSED)
{
Hjava_lang_Class* class;
Field* fld;
@@ -294,7 +281,7 @@
)
if (class->state >= CSTATE_PREPARED) {
- KGC_markObject(collector, class->superclass);
+ KGC_markObject(collector, gc_info, class->superclass);
}
/* walk constant pool - only resolved classes and strings count */
@@ -303,10 +290,10 @@
switch (pool->tags[idx]) {
case CONSTANT_ResolvedClass:
assert(!CLASS_IS_PRIMITIVE(CLASS_CLASS(idx, pool)));
- KGC_markObject(collector, CLASS_CLASS(idx, pool));
+ KGC_markObject(collector, gc_info, CLASS_CLASS(idx, pool));
break;
case CONSTANT_ResolvedString:
- KGC_markObject(collector, (void*)pool->data[idx]);
+ KGC_markObject(collector, gc_info, (void*)pool->data[idx]);
break;
}
}
@@ -335,7 +322,7 @@
&& !CLASS_IS_PRIMITIVE(fld->type))
{
if (!CLASS_GCJ(fld->type)) {
- KGC_markObject(collector, fld->type);
+ KGC_markObject(collector, gc_info, fld->type);
}
} /* else it's an Utf8Const that is not subject to gc */
fld++;
@@ -358,10 +345,10 @@
if (FIELD_TYPE(fld) == StringClass) {
KGC_markAddress(collector, *faddr);
} else {
- KGC_markObject(collector, *faddr);
+ KGC_markObject(collector, gc_info, *faddr);
}
#else
- KGC_markObject(collector, *faddr);
+ KGC_markObject(collector, gc_info, *faddr);
#endif
}
fld++;
@@ -373,22 +360,22 @@
if (!CLASS_IS_ARRAY(class)) {
/* mark interfaces referenced by this class */
for (n = 0; n < class->total_interface_len; n++) {
- KGC_markObject(collector, class->interfaces[n]);
+ KGC_markObject(collector, gc_info, class->interfaces[n]);
}
} else {
/* array classes should keep their element type alive */
Hjava_lang_Class *etype = CLASS_ELEMENT_TYPE(class);
if (etype && !CLASS_IS_PRIMITIVE(etype)) {
- KGC_markObject(collector, etype);
+ KGC_markObject(collector, gc_info, etype);
}
}
/* CLASS_METHODS only points to the method array for non-array and
* non-primitive classes */
if (!CLASS_IS_PRIMITIVE(class) && !CLASS_IS_ARRAY(class) && CLASS_METHODS(class) != 0) {
- walkMethods(collector, CLASS_METHODS(class), CLASS_NMETHODS(class));
+ walkMethods(collector, gc_info, CLASS_METHODS(class), CLASS_NMETHODS(class));
}
- KGC_markObject(collector, class->loader);
+ KGC_markObject(collector, gc_info, class->loader);
}
/*****************************************************************************
@@ -399,7 +386,7 @@
*/
static
void
-walkRefArray(Collector* collector, void* base, uint32 size UNUSED)
+walkRefArray(Collector* collector, void *gc_info, void* base, uint32 size UNUSED)
{
Hjava_lang_Object* arr;
int i;
@@ -414,7 +401,7 @@
/* mark class only if not a system class (which would be anchored
* anyway.) */
if (arr->vtable->class->loader != 0) {
- KGC_markObject(collector, arr->vtable->class);
+ KGC_markObject(collector, gc_info, arr->vtable->class);
}
for (i = ARRAY_SIZE(arr); --i>= 0; ) {
@@ -423,7 +410,7 @@
* NB: This would break if some objects (i.e. class objects)
* are not gc-allocated.
*/
- KGC_markObject(collector, el);
+ KGC_markObject(collector, gc_info, el);
}
}
@@ -432,7 +419,7 @@
*/
static
void
-walkObject(Collector* collector, void* base, uint32 size)
+walkObject(Collector* collector, void *gc_info, void* base, uint32 size)
{
Hjava_lang_Object *obj = (Hjava_lang_Object*)base;
Hjava_lang_Class *clazz;
@@ -454,7 +441,7 @@
* bother marking them.
*/
if (clazz->loader != 0) {
- KGC_markObject(collector, clazz);
+ KGC_markObject(collector, gc_info, clazz);
}
layout = clazz->gc_layout;
@@ -490,7 +477,7 @@
* to a "real" Java object.
*/
void *p = *(void **)mem;
- KGC_markObject(collector, p);
+ KGC_markObject(collector, gc_info, p);
}
i++;
l <<= 1;
@@ -505,10 +492,10 @@
*/
static
void
-walkLoader(Collector* collector, void* base, uint32 size)
+walkLoader(Collector* collector, void *gc_info, void* base, uint32 size)
{
- walkObject(collector, base, size);
- walkClassEntries(collector, (Hjava_lang_ClassLoader*)base);
+ walkObject(collector, gc_info, base, size);
+ walkClassEntries(collector, gc_info, (Hjava_lang_ClassLoader*)base);
}
static
@@ -601,7 +588,7 @@
Collector*
initCollector(void)
{
- Collector *gc = createGC(gc_walk_refs);
+ Collector *gc = createGC();
DBG(INIT, dprintf("initCollector()\n"); )
===================================================================
Checking out kaffe/kaffe/kaffevm/gcRefs.c
RCS: /home/cvs/kaffe/kaffe/kaffe/kaffevm/Attic/gcRefs.c,v
VERS: 1.14
***************
--- kaffe/kaffe/kaffevm/gcRefs.c Mon Aug 2 10:57:11 2004
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,195 +0,0 @@
-/* gcRefs.c
- * Maintain set of references in the garbage collector root set.
- * This is independent of the actual collection mechanism
- *
- * Copyright (c) 1996, 1997, 1998, 1999
- * Transvirtual Technologies, Inc. All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
*** Patch too long, truncated ***
More information about the kaffe
mailing list