Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 May 2000 11:57:58 +0900
From:      Fuyuhiko Maruyama <fuyuhik8@is.titech.ac.jp>
To:        glewis@trc.adelaide.edu.au
Cc:        freebsd-java@freebsd.org
Subject:   Re: Alpha JDK 1.2.2 patchset 7
Message-ID:  <551z3gqtah.wl@is.titech.ac.jp>
In-Reply-To: In your message of "Fri, 28 Apr 2000 15:45:58 %2B0930 (CST)" <200004280615.PAA97858@ares.trc.adelaide.edu.au>
References:  <200004280615.PAA97858@ares.trc.adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Sat_May__6_11:57:52_2000-1
Content-Type: text/plain; charset=US-ASCII

Hi all.

I've tried to run FreeBSD's JDK 1.2.2 with patchset 7, found some
problems and made fixes (patches are following this mail).  Here is
four different topics.

1. The _sigprocmask function (src/freebsd/hpi/green_threads/src/signals.c)
   has never been called.
   I think the _sigprocmask function is existing for wrapping syscall
   by way of management the consistency of signal masks between each
   green_threads, so it should be called for all unsafe (not well
   handled or considered by VM's self) sigprocmask call, safe calls
   may be written to call green_sigprocmask.  Since patchset 7 and
   older's are named _sigprocmask (with underscore!), it has never
   called.  It may be better to be renamed.

2. A part of awt's internationalization doesn't work with non-Sun's
   Motif.
   src/freebsd/native/sun/awt/awt_util.c's awt_util_getIMStatusHeight
   function may be used to calculates the Status Lines' height of
   given Widget using *VENDOR PRIVATE AREAS*, and I feel the private
   structure of Sun's Motif is completely different from others
   including Software2Go's, Lesstif and (may be Metroworks's).
   At this time, our best solution is always returning 0.  In fact, I
   think this is not so bad, because it may only needed for Solaris's
   Motif integrated IM supports which doesn't exist in another Motif.
   This is just the same solution of Blackdown's 1.2-pre-v2.

   It helps to run demo/applet/DitherTest.

3. JIT compilers cannot handle NullPointerExceptions in JIT compiled
   codes.
   The function InitializeSignals() in
   src/freebsd/javavm/runtime/signals_md.c installs some signal
   handlers for JIT.  In FreeBSD version, the handler for SIGSEGV is
   commented out.  It is needed not only for sunwjit but also OpenJIT
   and shuJIT, FreeBSD version of tya seems to not use SIGSEGV but it
   checks whether the pointer is null everytime (this costs too high!).

4. Incompatible type between int32_t(int, FreeBSD defined) and
   jint(long, JDK defined) for x86.
   This is not so serious problem, but javah outputs prototypes using
   int32_t for Java's int when it works for old Native Method
   Interface.  In Solaris there is same problem and its solution is
   defining int32_t long in src/solaris/javavm/include/typedefs_md.h.

There seems to be another problem for me, but at this time, I cannot
fix it.  The probrem is Java2D demo's lockup after running several
minutes.  It may be JIT compiler related one but not clear.

--
Fuyuhiko MARUYAMA <fuyuhik8@is.titech.ac.jp>
Matsuoka laboratory,
Department of Mathematical and Computing Sciences,
Graduate School of Tokyo Institute of Technology.


--Multipart_Sat_May__6_11:57:52_2000-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="fromPatcheset7.diffs"
Content-Transfer-Encoding: 7bit

Index: src/freebsd/hpi/green_threads/src/signals.c
===================================================================
RCS file: /usr/vinum/cvsroot/jdk1.2.2/src/freebsd/hpi/green_threads/src/signals.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.2.1
diff -u -r1.1.1.2 -r1.1.1.2.2.1
--- src/freebsd/hpi/green_threads/src/signals.c	2000/05/04 03:08:40	1.1.1.2
+++ src/freebsd/hpi/green_threads/src/signals.c	2000/05/04 11:20:09	1.1.1.2.2.1
@@ -632,10 +632,10 @@
 }
 
 /* Prototype not available in standard .h files that keeps gcc happy. */
-int _sigprocmask(int how, const sigset_t *set, sigset_t *oset);
+/* int _sigprocmask(int how, const sigset_t *set, sigset_t *oset); */
 
 int
-_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
+sigprocmask(int how, const sigset_t *set, sigset_t *oset)
 {
     int ret;
     sys_thread_t *self = greenThreadSelf();
Index: src/freebsd/javavm/include/typedefs_md.h
===================================================================
RCS file: /usr/vinum/cvsroot/jdk1.2.2/src/freebsd/javavm/include/typedefs_md.h,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.2.1
diff -u -r1.1.1.3 -r1.1.1.3.2.1
--- src/freebsd/javavm/include/typedefs_md.h	2000/05/04 03:26:40	1.1.1.3
+++ src/freebsd/javavm/include/typedefs_md.h	2000/05/04 14:25:43	1.1.1.3.2.1
@@ -22,8 +22,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifndef __FreeBSD__
-
 #define int8_t char
  
 /* temporary scaffolding, to allow for back and forth testing */
@@ -32,6 +30,7 @@
 #define uint32_t unsigned long
 #endif
 
+#ifndef __FreeBSD__
 
 #if defined(__alpha__)
 #define PTR_IS_64 1
Index: src/freebsd/javavm/runtime/signals_md.c
===================================================================
RCS file: /usr/vinum/cvsroot/jdk1.2.2/src/freebsd/javavm/runtime/signals_md.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.2.1
diff -u -r1.1.1.3 -r1.1.1.3.2.1
--- src/freebsd/javavm/runtime/signals_md.c	2000/05/04 03:26:40	1.1.1.3
+++ src/freebsd/javavm/runtime/signals_md.c	2000/05/04 11:25:34	1.1.1.3.2.1
@@ -449,9 +449,7 @@
      * to be delivered.
      */
     sysSignal(SIGFPE, panicHandler);
-#ifndef __FreeBSD__
     sysSignal(SIGSEGV, panicHandler);
-#endif
     sysSignal(SIGILL, panicHandler);
 
     createSystemThread("Signal dispatcher", MaximumPriority, 0, 
Index: src/freebsd/native/sun/awt/awt_util.c
===================================================================
RCS file: /usr/vinum/cvsroot/jdk1.2.2/src/freebsd/native/sun/awt/awt_util.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1 -r1.1.1.1.2.1
--- src/freebsd/native/sun/awt/awt_util.c	2000/05/04 02:18:55	1.1.1.1
+++ src/freebsd/native/sun/awt/awt_util.c	2000/05/04 11:36:52	1.1.1.1.2.1
@@ -537,6 +537,10 @@
     extData = _XmGetWidgetExtData((Widget) vw, XmSHELL_EXTENSION);
     ve = (XmVendorShellExtObject) extData->widget;
 
+#ifndef __solaris__
+    ve->vendor.im_height = 0;
+    return 0;
+#else
     if ((icp = get_iclist(vw)) == NULL) {
 	ve->vendor.im_height = 0;
 	return 0;
@@ -655,6 +659,7 @@
     XtSetValues(vw, args, 1);
 
     return height;
+#endif
 }
 
 Widget

--Multipart_Sat_May__6_11:57:52_2000-1--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?551z3gqtah.wl>