[kaffe] CVS kaffe (guilhem): GC fixlets.

Kaffe CVS cvs-commits at kaffe.org
Sun Dec 18 10:06:20 PST 2005


PatchSet 7011 
Date: 2005/12/18 17:54:28
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
GC fixlets.

        * kaffe/kaffevm/gcFuncs.c
        (destroyClass): Only send a JVMPI event if a CLASS_LOAD event has
        been send.

        * kaffe/kaffevm/gc-mem.c
        (gc_is_heap_unlimited): Do the right check.
        (gcMalloc): Fixed the debug message.

Members: 
	ChangeLog:1.4531->1.4532 
	kaffe/kaffevm/gcFuncs.c:1.80->1.81 
	kaffe/kaffevm/kaffe-gc/gc-incremental.c:1.34->1.35 
	kaffe/kaffevm/kaffe-gc/gc-mem.c:1.34->1.35 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4531 kaffe/ChangeLog:1.4532
--- kaffe/ChangeLog:1.4531	Sun Dec 18 17:35:27 2005
+++ kaffe/ChangeLog	Sun Dec 18 17:54:28 2005
@@ -1,3 +1,13 @@
+2005-12-18  Guilhem Lavaux  <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/gcFuncs.c
+	(destroyClass): Only send a JVMPI event if a CLASS_LOAD event has
+	been send.
+
+	* kaffe/kaffevm/gc-mem.c
+	(gc_is_heap_unlimited): Do the right check.
+	(gcMalloc): Fixed the debug message.
+	
 2005-12-16  Dalibor Topic  <robilad at kaffe.org>
 
 	Fix for make distcheck and ENABLE_BINRELOC compiler warnings.
Index: kaffe/kaffe/kaffevm/gcFuncs.c
diff -u kaffe/kaffe/kaffevm/gcFuncs.c:1.80 kaffe/kaffe/kaffevm/gcFuncs.c:1.81
--- kaffe/kaffe/kaffevm/gcFuncs.c:1.80	Sun Aug 21 00:18:50 2005
+++ kaffe/kaffe/kaffevm/gcFuncs.c	Sun Dec 18 17:54:31 2005
@@ -82,7 +82,7 @@
 	assert(clazz->state != CSTATE_COMPLETE || clazz->loader != 0);
 
 #if defined(ENABLE_JVMPI)
-	if( JVMPI_EVENT_ISENABLED(JVMPI_EVENT_CLASS_UNLOAD) )
+	if( JVMPI_EVENT_ISENABLED(JVMPI_EVENT_CLASS_UNLOAD) && clazz->state >= CSTATE_PREPARED)
 	{
 		JVMPI_Event ev;
 
Index: kaffe/kaffe/kaffevm/kaffe-gc/gc-incremental.c
diff -u kaffe/kaffe/kaffevm/kaffe-gc/gc-incremental.c:1.34 kaffe/kaffe/kaffevm/kaffe-gc/gc-incremental.c:1.35
--- kaffe/kaffe/kaffevm/kaffe-gc/gc-incremental.c:1.34	Sun Oct  2 14:20:08 2005
+++ kaffe/kaffe/kaffevm/kaffe-gc/gc-incremental.c	Sun Dec 18 17:54:31 2005
@@ -1094,7 +1094,7 @@
 				/* Grow the heap */
 				DBG (GCSYSALLOC, dprintf ("growing heap by %u bytes of type %s (%2.1f%% free)\n", 
 							  (unsigned int)size, gcFunctions[fidx].description,
-							  (1.0 - (gcStats.totalmem / gc_get_heap_total())) * 100.0); );
+							  (1.0 - ((double)gcStats.totalmem / gc_get_heap_total())) * 100.0); );
 				
 				gc_heap_grow(size);
 				break;
Index: kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c
diff -u kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.34 kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.35
--- kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c:1.34	Sat Sep 24 19:00:45 2005
+++ kaffe/kaffe/kaffevm/kaffe-gc/gc-mem.c	Sun Dec 18 17:54:32 2005
@@ -238,7 +238,7 @@
 static inline bool
 gc_heap_is_unlimited(void)
 {
-  return gc_heap_limit != UNLIMITED_HEAP;
+  return gc_heap_limit == UNLIMITED_HEAP;
 }
 
 /*




More information about the kaffe mailing list