I let in a small change to natObject.cc that changed spin() to call Thread::sleep instead of usleep(). I think this was a mistake (to be honest I don't recall seeing that code in a patch, double oops on me). spin() is used in the implementation of _Jv_MonitorEnter; the point as I understand it is to sleep a bit to avoid creating a heavyweight mutex. However, Thread::sleep() acquires just such a mutex -- defeating the purpose of spin(). (See java list for more info.) Release: unknown
Responsible-Changed-From-To: unassigned->tromey Responsible-Changed-Why: I'm handling this.
State-Changed-From-To: open->analyzed State-Changed-Why: I've submitted a partial patch. It is waiting for a follow-up patch from Ranjit or Adam.
State-Changed-From-To: analyzed->closed State-Changed-Why: I've checked in the fix.
From: tromey@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libgcj/8997 Date: 31 Dec 2002 17:43:47 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: tromey@gcc.gnu.org 2002-12-31 09:43:47 Modified files: libjava : ChangeLog libjava/include: posix.h win32.h libjava/java/lang: natObject.cc Log message: 2002-12-31 Tom Tromey <tromey@redhat.com> Ranjit Mathew <rmathew@hotmail.com> Fix for PR libgcj/8997: * java/lang/natObject.cc (spin): Use _Jv_platform_usleep. Include platform.h. * include/posix.h (_Jv_platform_usleep): New function. * include/win32.h (_Jv_platform_usleep): New function. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.1607&r2=1.1608 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/posix.h.diff?cvsroot=gcc&r1=1.13&r2=1.14 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/win32.h.diff?cvsroot=gcc&r1=1.16&r2=1.17 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/natObject.cc.diff?cvsroot=gcc&r1=1.23&r2=1.24
From: tromey@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libgcj/8997 Date: 31 Dec 2002 17:44:43 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: tromey@gcc.gnu.org 2002-12-31 09:44:43 Modified files: libjava : ChangeLog libjava/include: posix.h win32.h libjava/java/lang: natObject.cc Log message: 2002-12-31 Tom Tromey <tromey@redhat.com> Ranjit Mathew <rmathew@hotmail.com> Fix for PR libgcj/8997: * java/lang/natObject.cc (spin): Use _Jv_platform_usleep. Include platform.h. * include/posix.h (_Jv_platform_usleep): New function. * include/win32.h (_Jv_platform_usleep): New function. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1594.2.10&r2=1.1594.2.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/posix.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.13&r2=1.13.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/win32.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16&r2=1.16.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/natObject.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.23&r2=1.23.4.1