This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: PATCH: Reduce allocation overhead, fix IA64 GC descriptors


I won't get a chance to test it until Monday, but this looks fine to me.
Thanks.

As far as I know, the only problem with checking in the runtime patch first
is that you'll probably see a slight performance decrease until you get the
compiler patch in, since the allocation sequence gets a bit longer without
the front-end changes.  This is probably OK for the trunk.

Hans

-----Original Message-----
From: Tom Tromey
To: Boehm, Hans

...

I'd prefer to have the ia64-specific vtable code isolated in
_Jv_VTable as much as possible.

How does the appended look?

As I understand it the different parts of your patch are separable.
Let's get the parts that don't require compiler changes in separately.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* include/jvm.h (_Jv_VTable::get_finalizer): Now conditional on
	__ia64__.

Index: include/jvm.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/jvm.h,v
retrieving revision 1.45
diff -u -r1.45 jvm.h
--- include/jvm.h 2001/10/23 05:42:03 1.45
+++ include/jvm.h 2001/11/22 20:42:33
@@ -48,12 +48,20 @@
 #ifdef __ia64__
   void *get_method(int i) { return &method[i]; }
   void set_method(int i, void *fptr) { method[i] = *(vtable_elt *)fptr;
}
+  void *get_finalizer()
+  {
+    // We know that get_finalizer is only used for checking whether
+    // this object needs to have a finalizer registered.  So it is
+    // safe to simply return just the PC component of the vtable
+    // slot.
+    return get_method(0)->pc;
+  }
 #else
   void *get_method(int i) { return method[i]; }
   void set_method(int i, void *fptr) { method[i] = fptr; }
+  void *get_finalizer() { return get_method(0); }
 #endif
 
-  void *get_finalizer() { return get_method(0); }
   static size_t vtable_elt_size() { return sizeof(vtable_elt); }
   static _Jv_VTable *new_vtable (int count);
 };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]