harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjwashb...@apache.org
Subject svn commit: r515776 - in /harmony/enhanced/drlvm/trunk/vm: gc_cc/src/init.cpp gc_gen/src/common/gc_for_vm.cpp gcv4/src/gc_for_vm.cpp include/open/gc.h vmcore/src/gc/dll_gc.cpp vmcore/src/init/vm_init.cpp
Date Wed, 07 Mar 2007 21:29:42 GMT
Author: wjwashburn
Date: Wed Mar  7 13:29:41 2007
New Revision: 515776

URL: http://svn.apache.org/viewvc?view=rev&rev=515776
Log:
harmony-3173, fixes GC initiaze API, now returns status
build, build test pass on winxp32 rhel4.0 32


Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/init.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
    harmony/enhanced/drlvm/trunk/vm/gcv4/src/gc_for_vm.cpp
    harmony/enhanced/drlvm/trunk/vm/include/open/gc.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/dll_gc.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/init.cpp?view=diff&rev=515776&r1=515775&r2=515776
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/init.cpp Wed Mar  7 13:29:41 2007
@@ -286,13 +286,14 @@
     assert(mark_bits != MEM_FAILURE);
 }
 
-void gc_init() {
+int gc_init() {
     INFO2("gc.init", "GC init called\n");
     init_mem();
     init_slots();
     init_select_gc();
     gc_end = apr_time_now();
     timer_init();
+    return JNI_OK;
 }
 
 void

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp?view=diff&rev=515776&r1=515775&r2=515776
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp Wed Mar  7 13:29:41 2007
@@ -34,7 +34,7 @@
 Boolean gc_requires_barriers() 
 {   return p_global_gc->generate_barrier; }
 
-void gc_init() 
+int gc_init() 
 {      
   assert(p_global_gc == NULL);
   GC* gc = (GC*)STD_MALLOC(sizeof(GC_Gen));
@@ -55,7 +55,7 @@
   collector_initialize(gc);
   gc_init_heap_verification(gc);
 
-  return;
+  return JNI_OK;
 }
 
 void gc_wrapup() 

Modified: harmony/enhanced/drlvm/trunk/vm/gcv4/src/gc_for_vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gcv4/src/gc_for_vm.cpp?view=diff&rev=515776&r1=515775&r2=515776
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gcv4/src/gc_for_vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gcv4/src/gc_for_vm.cpp Wed Mar  7 13:29:41 2007
@@ -51,7 +51,7 @@
 Boolean gc_supports_compressed_references ();
 void gc_next_command_line_argument (const char *name, const char *arg);
 void gc_class_loaded (VTable_Handle vth);
-void gc_init();
+int gc_init();
 void gc_vm_initialized();
 void gc_wrapup();
 Boolean gc_requires_barriers();
@@ -343,7 +343,7 @@
 //
 // This also needs to do the work of gc_thread_init for the main thread.
 //
-void gc_init()
+int gc_init()
 {
     INFO(GC_NAME " " GC_VERSION);
     TRACE2("gc.sizeof", "sizeof(block_info) = " << sizeof(block_info));
@@ -433,6 +433,7 @@
     assert (sizeof(block_info) <= 4096); 
     // If we hit this we should take a close look at our defines. While it is possible
     // to use more than one page that seems real expensive.
+    return JNI_OK;
 }
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/gc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/gc.h?view=diff&rev=515776&r1=515775&r2=515776
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/gc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/gc.h Wed Mar  7 13:29:41 2007
@@ -88,7 +88,7 @@
  * The GC assumes that the VM is ready to support a GC if it 
  * calls this function.
  */
-GCExport void gc_init();
+GCExport int gc_init();
 
 /**
  * May be called at various points the VM decides are GC-safe.
@@ -536,7 +536,7 @@
 extern void (*gc_class_prepared)(Class_Handle ch, VTable_Handle vth);
 VMEXPORT extern void (*gc_force_gc)();
 VMEXPORT extern int64 (*gc_free_memory)();
-extern void (*gc_init)();
+extern int (*gc_init)();
 extern Boolean (*gc_supports_frontier_allocation)(unsigned *offset_of_current, unsigned *offset_of_limit);
 extern Boolean (*gc_is_object_pinned)(Managed_Object_Handle obj);
 extern Managed_Object_Handle (*gc_alloc)(unsigned size, 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/dll_gc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/dll_gc.cpp?view=diff&rev=515776&r1=515775&r2=515776
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/dll_gc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/dll_gc.cpp Wed Mar  7 13:29:41 2007
@@ -93,7 +93,7 @@
                                  unsigned offset,
                                  Managed_Object_Handle value) = 0;
 void (*gc_heap_wrote_object)(Managed_Object_Handle p_base_of_object_just_written) = 0;
-void (*gc_init)() = 0;
+int (*gc_init)() = 0;
 Boolean (*gc_is_object_pinned)(Managed_Object_Handle obj) = 0;
 
 Managed_Object_Handle (*gc_alloc)(unsigned size, 
@@ -226,7 +226,7 @@
                             "gc_heap_wrote_object",
                             dllName,
                             (apr_dso_handle_sym_t)default_gc_heap_wrote_object);
-    gc_init = (void (*)()) getFunction(handle, "gc_init", dllName);
+    gc_init = (int (*)()) getFunction(handle, "gc_init", dllName);
     gc_is_object_pinned = (Boolean (*)(Managed_Object_Handle obj)) getFunction(handle, "gc_is_object_pinned",
dllName);
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp?view=diff&rev=515776&r1=515775&r2=515776
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Wed Mar  7 13:29:41 2007
@@ -676,7 +676,8 @@
     /*    END: Property processing.    */
 
     // Initialize memory allocation.
-    gc_init();
+    status = gc_init();
+    if (status != JNI_OK) return status;
 
     // TODO: change all uses of Class::heap_base to Slot::heap_base
     Slot::init(gc_heap_base_address(), gc_heap_ceiling_address());



Mime
View raw message