From bugzilla-daemon at icedtea.classpath.org Fri Aug 1 08:24:54 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 01 Aug 2008 15:24:54 +0000 Subject: [Bug 178] New: Icedtea7 configure error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=178 Summary: Icedtea7 configure error Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: eric225125 at yahoo.com I get the following error when I try to compile Icedtea7 from the Mercurial: configure: error: conditional "GCC_OLD" was never defined. Usually this means the macro was only invoked conditionally. !!! ERROR in dev-java/icedtea-9999: !!! In econf at line 2040 !!! econf failed -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Aug 1 08:26:44 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 01 Aug 2008 15:26:44 +0000 Subject: [Bug 178] Icedtea7 configure error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=178 ------- Comment #1 from eric225125 at yahoo.com 2008-08-01 15:26 ------- Created an attachment (id=85) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=85&action=view) config.log -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From robermann at gmail.com Sat Aug 2 04:39:37 2008 From: robermann at gmail.com (Roberto Mannai) Date: Sat, 2 Aug 2008 13:39:37 +0200 Subject: openjdk/icedtea: com.sun.image.codec.jpeg package In-Reply-To: <414e44f70808020428k4baf27dei77237ce115d40eaa@mail.gmail.com> References: <414e44f70808020428k4baf27dei77237ce115d40eaa@mail.gmail.com> Message-ID: <414e44f70808020439w6a45e057y3090d48a955e421f@mail.gmail.com> Hi all Does anyone know what is the "com.sun.image.codec.jpeg." package destiny? As far I understand, in openjdk 6 it is handled with a patch: http://icedtea.classpath.org/hg/icedtea/file/0fd2fbf0dfd0/patches/icedtea-jpegclasses.patch (but fails in not adding the setJPEGEncodeParam method) [javac] /root/.eclipse/CodeSounding/java2Demo/srcRewritten/java2d/demos/Images/JPEGFlip.java:113: cannot find symbol [javac] symbol : method setJPEGEncodeParam(com.sun.image.codec.jpeg.JPEGEncodeParam) [javac] location: class com.sun.image.codec.jpeg.JPEGImageEncoder [javac] encoder.setJPEGEncodeParam(param); [javac] ^ In icedtea 7 it is totally missing: [javac] /root/.eclipse/CodeSounding/java2Demo/srcRewritten/java2d/demos/Images/JPEGFlip.java:44: package com.sun.image.codec.jpeg does not exist [javac] import com.sun.image.codec.jpeg.*; [javac] ^ Best regards Roberto Mannai From robermann at gmail.com Sat Aug 2 04:42:04 2008 From: robermann at gmail.com (Roberto Mannai) Date: Sat, 2 Aug 2008 13:42:04 +0200 Subject: openjdk,icedtea - Xmx option mandatory Message-ID: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> Hi all For a test I've just installed: java-1_7_0-icedtea on my opensuse11 box. "java -version" command crashes with an error. In order to work, I must use the -Xmx option, also with 1m: java -Xmx1m -version Any reason for it? Is it a bug? Ciao Roberto Mannai From doko at ubuntu.com Sun Aug 3 10:34:14 2008 From: doko at ubuntu.com (Matthias Klose) Date: Sun, 03 Aug 2008 19:34:14 +0200 Subject: [patch] fix build on architectures with a signed size_t Message-ID: <4895EC16.6030406@ubuntu.com> attached are three patches to build on architectures with a signed size_t (s390-linux-gnu). - jdk-signed-size_t.diff, there's already a compat SSIZE_T macro in the code, just use it. - hotspot-idx_t-signed-size_t.diff, the BitMap code assumes a unsigned size_t. - hotspot-params-signed-size_t.diff, command line parameters of type size_t currently are not supported. As a workaround, add casts. This may be better addressed. Matthias -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jdk-signed-size_t.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080803/7513da86/jdk-signed-size_t.diff -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hotspot-idx_t-signed-size_t.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080803/7513da86/hotspot-idx_t-signed-size_t.diff -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hotspot-params-signed-size_t.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080803/7513da86/hotspot-params-signed-size_t.diff From fw at deneb.enyo.de Sun Aug 3 15:55:04 2008 From: fw at deneb.enyo.de (Florian Weimer) Date: Mon, 04 Aug 2008 00:55:04 +0200 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <4895EC16.6030406@ubuntu.com> (Matthias Klose's message of "Sun, 03 Aug 2008 19:34:14 +0200") References: <4895EC16.6030406@ubuntu.com> Message-ID: <87ej55k8tz.fsf@mid.deneb.enyo.de> * Matthias Klose: > attached are three patches to build on architectures with a signed size_t > (s390-linux-gnu). Yuck. Is this really true? Seems so. C99 requires size_t to be unsigned (section 6.5.3.4), and so does POSIX. I suspsect this was also the case in C90, it's not listed as a change in C99. And if it's unsigned in C90, it's unsigned in C++ (and the The C++ Programming Language, 3rd edition, confirms this). In fact, the GNU C++ standard library assumes that std::size_t is unsigned. IIRC, there is code out there which performs security checks (against integer overflows, for instance) and which assumes that size_t is unsigned. Call me insane, but it's the architecture that needs fixing, not OpenJDK. From fw at deneb.enyo.de Sun Aug 3 16:01:04 2008 From: fw at deneb.enyo.de (Florian Weimer) Date: Mon, 04 Aug 2008 01:01:04 +0200 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <87ej55k8tz.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Mon, 04 Aug 2008 00:55:04 +0200") References: <4895EC16.6030406@ubuntu.com> <87ej55k8tz.fsf@mid.deneb.enyo.de> Message-ID: <877iaxk8jz.fsf@mid.deneb.enyo.de> * Florian Weimer: > * Matthias Klose: > >> attached are three patches to build on architectures with a signed size_t >> (s390-linux-gnu). > > Yuck. Is this really true? Seems so. No, it's not. At least not in the sid chroot on raptor.debian.org. FWIW, my corrected test case is: #include volatile size_t x; main() { x = -1; if (x < 0) puts("broken"); } From gnu_andrew at member.fsf.org Sun Aug 3 18:24:46 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 4 Aug 2008 02:24:46 +0100 Subject: Re-enable --with-openjdk-src-dir support for IcedTea7 Message-ID: <20080804012446.GA1509@rivendell.middle-earth.co.uk> This patch re-enables the ability to use --with-openjdk-src-dir to point to an OpenJDK tree in the filesystem. A copy is taken so that the original tree is not affected by the IcedTea build patches. ChangeLog: 2008-08-04 Andrew John Hughes * Makefile.am: Don't download and extract when an external source dir is specified. Instead, obtain a local copy of the tree. * acinclude.m4: Use a more meaningful name for the OpenJDK srcdir conditional. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 -------------- next part -------------- diff -r 1af9afe21773 Makefile.am --- a/Makefile.am Sun Jul 27 22:30:04 2008 +0100 +++ b/Makefile.am Mon Aug 04 02:21:27 2008 +0100 @@ -280,6 +280,7 @@ stamps/download.stamp: +if !OPENJDK_SRC_DIR_FOUND if USE_ALT_OPENJDK_SRC_ZIP else if USE_HG @@ -308,6 +309,7 @@ fi ; \ $(WGET) $(OPENJDK_URL)$(OPENJDK_SRC_ZIP) -O $(OPENJDK_SRC_ZIP); \ fi +endif endif endif if WITH_CACAO @@ -464,6 +466,9 @@ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp +if OPENJDK_SRC_DIR_FOUND + cp -a $(OPENJDK_SRC_DIR) openjdk +else if ! test -d openjdk ; then \ if [ ! -z $(OPENJDK_SRC_ZIP) ] ; then \ $(UNZIP) -q $(OPENJDK_SRC_ZIP) ; \ @@ -472,6 +477,7 @@ false; \ fi; \ fi; +endif chmod -R ug+w openjdk sh $(srcdir)/fsg.sh ; mkdir -p stamps diff -r 1af9afe21773 acinclude.m4 --- a/acinclude.m4 Sun Jul 27 22:30:04 2008 +0100 +++ b/acinclude.m4 Mon Aug 04 02:21:27 2008 +0100 @@ -174,7 +174,7 @@ AC_MSG_RESULT(${OPENJDK_SRC_DIR}) ]) AC_SUBST(OPENJDK_SRC_DIR) - AM_CONDITIONAL(GNU_CLASSLIB_FOUND, test "x${conditional_with_openjdk_sources}" = xtrue) + AM_CONDITIONAL(OPENJDK_SRC_DIR_FOUND, test "x${conditional_with_openjdk_sources}" = xtrue) ]) AC_DEFUN([FIND_ECJ_JAR], From Dalibor.Topic at Sun.COM Sun Aug 3 23:03:58 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Mon, 04 Aug 2008 08:03:58 +0200 Subject: VisualVM in IcedTea6 In-Reply-To: <48906FC1.8040303@redhat.com> References: <488F718E.6020309@redhat.com> <4890413F.3010403@ubuntu.com> <17c6771e0807300457j6524cd20ga38c8917e9d3c054@mail.gmail.com> <48906A2E.3060805@redhat.com> <17c6771e0807300638h15304ccdgc90166222205821a@mail.gmail.com> <48906FC1.8040303@redhat.com> Message-ID: <48969BCE.1030306@Sun.COM> Joshua Sumali wrote: > No, it would only build netbeans7, platform2, and visualvm. The actual > "dropping-in" of visualvm occurs right after IcedTea is built. It > happens at the same time as the dropping in of > gcjwebplugin/icedteaplugin (stamps/icedtea.stamp target in Makefile.am). Hi Joshua, On a somewhat related sidenote, I should point out that the NetBeans team is working on GNU/Linux packages out in the open at http://wiki.netbeans.org/NativeLinuxPackages and on the http://installer.netbeans.org/servlets/SummarizeList?listName=linux-packaging mailing list. There has been quite some talk about Fedora on the list recently, you may want to check it out, and see if that wouldn't make the VisualVM inclusion in Fedora simpler. cheers, dalibor topic -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From aph at redhat.com Mon Aug 4 04:19:21 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 04 Aug 2008 12:19:21 +0100 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> Message-ID: <4896E5B9.7020603@redhat.com> Roberto Mannai wrote: > For a test I've just installed: > java-1_7_0-icedtea > on my opensuse11 box. > > "java -version" command crashes with an error. In order to work, I > must use the -Xmx option, also with 1m: > > java -Xmx1m -version > > Any reason for it? Is it a bug? It must be. How much memory have you got? Andrew. From aph at redhat.com Mon Aug 4 04:24:02 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 04 Aug 2008 12:24:02 +0100 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <877iaxk8jz.fsf@mid.deneb.enyo.de> References: <4895EC16.6030406@ubuntu.com> <87ej55k8tz.fsf@mid.deneb.enyo.de> <877iaxk8jz.fsf@mid.deneb.enyo.de> Message-ID: <4896E6D2.9030109@redhat.com> Florian Weimer wrote: > * Florian Weimer: > >> * Matthias Klose: >> >>> attached are three patches to build on architectures with a signed size_t >>> (s390-linux-gnu). >> Yuck. Is this really true? Seems so. > > No, it's not. It's not. 7.17 Common definitions 1 The following types and macros are defined in the standard header . Some are also defined in other headers, as noted in their respective subclauses. 2 The types are ptrdiff_t which is the signed integer type of the result of subtracting two pointers; size_t which is the unsigned integer type of the result of the sizeof operator; Andrew. From fw at deneb.enyo.de Mon Aug 4 04:27:41 2008 From: fw at deneb.enyo.de (Florian Weimer) Date: Mon, 04 Aug 2008 13:27:41 +0200 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <4896E6D2.9030109@redhat.com> (Andrew Haley's message of "Mon, 04 Aug 2008 12:24:02 +0100") References: <4895EC16.6030406@ubuntu.com> <87ej55k8tz.fsf@mid.deneb.enyo.de> <877iaxk8jz.fsf@mid.deneb.enyo.de> <4896E6D2.9030109@redhat.com> Message-ID: <873allf2aa.fsf@mid.deneb.enyo.de> * Andrew Haley: > Florian Weimer wrote: >> * Florian Weimer: >> >>> * Matthias Klose: >>> >>>> attached are three patches to build on architectures with a signed size_t >>>> (s390-linux-gnu). >>> Yuck. Is this really true? Seems so. >> >> No, it's not. > > It's not. I was more concerned with the reality on s390, not what's in the standard. Unfortunately, my first test case was wrong. From aph at redhat.com Mon Aug 4 04:36:42 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 04 Aug 2008 12:36:42 +0100 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <873allf2aa.fsf@mid.deneb.enyo.de> References: <4895EC16.6030406@ubuntu.com> <87ej55k8tz.fsf@mid.deneb.enyo.de> <877iaxk8jz.fsf@mid.deneb.enyo.de> <4896E6D2.9030109@redhat.com> <873allf2aa.fsf@mid.deneb.enyo.de> Message-ID: <4896E9CA.60008@redhat.com> Florian Weimer wrote: > * Andrew Haley: > >> Florian Weimer wrote: >>> * Florian Weimer: >>> >>>> * Matthias Klose: >>>> >>>>> attached are three patches to build on architectures with a signed size_t >>>>> (s390-linux-gnu). >>>> Yuck. Is this really true? Seems so. >>> No, it's not. >> It's not. > > I was more concerned with the reality on s390, not what's in the > standard. Unfortunately, my first test case was wrong. Is the reality then that GNU C on s/390 is not ISO C compliant? I didn't know that. It must break a ton of code. Andrew. From aph at redhat.com Mon Aug 4 04:43:21 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 04 Aug 2008 12:43:21 +0100 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <4896E9CA.60008@redhat.com> References: <4895EC16.6030406@ubuntu.com> <87ej55k8tz.fsf@mid.deneb.enyo.de> <877iaxk8jz.fsf@mid.deneb.enyo.de> <4896E6D2.9030109@redhat.com> <873allf2aa.fsf@mid.deneb.enyo.de> <4896E9CA.60008@redhat.com> Message-ID: <4896EB59.5010802@redhat.com> Andrew Haley wrote: > Florian Weimer wrote: >> * Andrew Haley: >> >>> Florian Weimer wrote: >>>> * Florian Weimer: >>>> >>>>> * Matthias Klose: >>>>> >>>>>> attached are three patches to build on architectures with a signed size_t >>>>>> (s390-linux-gnu). >>>>> Yuck. Is this really true? Seems so. >>>> No, it's not. >>> It's not. >> I was more concerned with the reality on s390, not what's in the >> standard. Unfortunately, my first test case was wrong. > > Is the reality then that GNU C on s/390 is not ISO C compliant? > I didn't know that. It must break a ton of code. I don't believe it. Here's s390/linux.h: #undef SIZE_TYPE #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int") #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") Andrew. From robermann at gmail.com Mon Aug 4 05:23:24 2008 From: robermann at gmail.com (Roberto Mannai) Date: Mon, 4 Aug 2008 14:23:24 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <4896E5B9.7020603@redhat.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> Message-ID: <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> My system has 512 mb of RAM, on a 32 bit processor. If I try to set the Xms option, java complains it is larger than max size, so in my opinion the jvm does not allocate any default xmx parameter. The error is: "Could not reserve enough space for object heap'' The same message occurs also with java-1_6_0-openjdk. Best regards Roberto Mannai On 8/4/08, Andrew Haley wrote: > Roberto Mannai wrote: > > > For a test I've just installed: > > java-1_7_0-icedtea > > on my opensuse11 box. > > > > "java -version" command crashes with an error. In order to work, I > > must use the -Xmx option, also with 1m: > > > > java -Xmx1m -version > > > > Any reason for it? Is it a bug? > > It must be. How much memory have you got? > > Andrew. > From aph at redhat.com Mon Aug 4 05:26:24 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 04 Aug 2008 13:26:24 +0100 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> Message-ID: <4896F570.3080300@redhat.com> Roberto Mannai wrote: > My system has 512 mb of RAM, on a 32 bit processor. > > If I try to set the Xms option, java complains it is larger than max > size, so in my opinion the jvm does not allocate any default xmx > parameter. > > The error is: > "Could not reserve enough space for object heap'' > > The same message occurs also with java-1_6_0-openjdk. Maybe a limits problem? What does ulimit -a say? > On 8/4/08, Andrew Haley wrote: >> Roberto Mannai wrote: >> >>> For a test I've just installed: >>> java-1_7_0-icedtea >>> on my opensuse11 box. >>> >>> "java -version" command crashes with an error. In order to work, I >>> must use the -Xmx option, also with 1m: >>> >>> java -Xmx1m -version >>> >>> Any reason for it? Is it a bug? >> It must be. How much memory have you got? >> >> Andrew. >> From mark at klomp.org Mon Aug 4 05:35:19 2008 From: mark at klomp.org (Mark Wielaard) Date: Mon, 04 Aug 2008 14:35:19 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> Message-ID: <1217853319.3061.11.camel@dijkstra.wildebeest.org> Hi Roberto, On Mon, 2008-08-04 at 14:23 +0200, Roberto Mannai wrote: > On 8/4/08, Andrew Haley wrote: > > Roberto Mannai wrote: > > > > > For a test I've just installed: > > > java-1_7_0-icedtea > > > on my opensuse11 box. > > > > > > "java -version" command crashes with an error. In order to work, I > > > must use the -Xmx option, also with 1m: > > > > > > java -Xmx1m -version > > > > > > Any reason for it? Is it a bug? > > > > It must be. How much memory have you got? > > My system has 512 mb of RAM, on a 32 bit processor. > > If I try to set the Xms option, java complains it is larger than max > size, so in my opinion the jvm does not allocate any default xmx > parameter. > > The error is: > "Could not reserve enough space for object heap'' > > The same message occurs also with java-1_6_0-openjdk. That is strange. Can you give us some more information? How exactly did you install icedtea/openjdk? Was is it a precompiled package, if so from where? If not, how did you configure and compile from source? Do other opensuse users have the same issue? What is the exact command given and output? Both for the failing and the working -Xmx1m -version case? (Best to copy/paste the command line completely, any output, including errors, stacktraces and the output of -version is interesting.) Thanks, Mark From fw at deneb.enyo.de Mon Aug 4 07:55:41 2008 From: fw at deneb.enyo.de (Florian Weimer) Date: Mon, 04 Aug 2008 16:55:41 +0200 Subject: [patch] fix build on architectures with a signed size_t In-Reply-To: <4896E9CA.60008@redhat.com> (Andrew Haley's message of "Mon, 04 Aug 2008 12:36:42 +0100") References: <4895EC16.6030406@ubuntu.com> <87ej55k8tz.fsf@mid.deneb.enyo.de> <877iaxk8jz.fsf@mid.deneb.enyo.de> <4896E6D2.9030109@redhat.com> <873allf2aa.fsf@mid.deneb.enyo.de> <4896E9CA.60008@redhat.com> Message-ID: <8763qgakya.fsf@mid.deneb.enyo.de> * Andrew Haley: >> I was more concerned with the reality on s390, not what's in the >> standard. Unfortunately, my first test case was wrong. > > Is the reality then that GNU C on s/390 is not ISO C compliant? > I didn't know that. It must break a ton of code. Let me repeat: My initial test case was wrong. It reported size_t as signed, when it wasn't. Sorry about that. At least on raptor.debian.org, in the sid chroot, size_t is unsigned. From robermann at gmail.com Mon Aug 4 12:47:27 2008 From: robermann at gmail.com (Roberto Mannai) Date: Mon, 4 Aug 2008 21:47:27 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <1217853319.3061.11.camel@dijkstra.wildebeest.org> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> Message-ID: <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> In order to get some feedback, I wrote to the opensuse-java at opensuse.org mailing list. At least one user was successful running the command, it seems, on a 64bit processor. In order to get more feedback, I open the following bug: https://bugzilla.novell.com/show_bug.cgi?id=414462 Coping below for your convenience: When running the java process, I get the following error: linux:~/.eclipse # java -version Error occurred during initialization of VM Could not reserve enough space for object heap *** glibc detected *** java: free(): invalid pointer: 0xb7737254 *** ======= Backtrace: ========= /lib/libc.so.6[0xb7f86fc4] /lib/libc.so.6(cfree+0x9c)[0xb7f8895c] /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a94fb1] /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a580a2] /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a59860] /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a5dc85] /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so(JNI_CreateJavaVM+0x5c)[0xb78faccc] java(JavaMain+0x9e)[0x804a4de] /lib/libpthread.so.0[0xb806e175] /lib/libc.so.6(clone+0x5e)[0xb7fe8dce] ======= Memory map: ======== 08048000-08050000 r-xp 00000000 08:01 1379425 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java 08050000-08051000 r--p 00008000 08:01 1379425 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java 08051000-08052000 rw-p 00009000 08:01 1379425 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java 08052000-08073000 rw-p 08052000 00:00 0 [heap] b5400000-b5421000 rw-p b5400000 00:00 0 b5421000-b5500000 ---p b5421000 00:00 0 b55ca000-b55cb000 rwxp b55ca000 00:00 0 b55cb000-b564a000 rwxp b55cb000 00:00 0 b564a000-b5672000 rwxp b564a000 00:00 0 b5672000-b764a000 rwxp b5672000 00:00 0 b764a000-b766e000 r-xp 00000000 08:01 3915 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so b766e000-b766f000 r--p 00023000 08:01 3915 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so b766f000-b7671000 rw-p 00024000 08:01 3915 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so b7671000-b76a6000 r--s 00000000 08:01 4401 /var/run/nscd/passwd b76a6000-b76b9000 r-xp 00000000 08:01 1100751 /lib/libnsl-2.8.so b76b9000-b76ba000 r--p 00012000 08:01 1100751 /lib/libnsl-2.8.so b76ba000-b76bb000 rw-p 00013000 08:01 1100751 /lib/libnsl-2.8.so b76bb000-b76bd000 rw-p b76bb000 00:00 0 b76c7000-b76d3000 r-xp 00000000 08:01 24423 /lib/libgcc_s.so.1 b76d3000-b76d4000 r--p 0000b000 08:01 24423 /lib/libgcc_s.so.1 b76d4000-b76d5000 rw-p 0000c000 08:01 24423 /lib/libgcc_s.so.1 b76d5000-b76dc000 r-xp 00000000 08:01 3938 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so b76dc000-b76dd000 r--p 00006000 08:01 3938 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so b76dd000-b76de000 rw-p 00007000 08:01 3938 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so b76de000-b76e5000 r-xp 00000000 08:01 1218520 /lib/librt-2.8.so b76e5000-b76e6000 r--p 00006000 08:01 1218520 /lib/librt-2.8.so b76e6000-b76e7000 rw-p 00007000 08:01 1218520 /lib/librt-2.8.so b76e7000-b76ea000 ---p b76e7000 00:00 0 b76ea000-b7738000 rw-p b76ea000 00:00 0 b7738000-b775c000 r-xp 00000000 08:01 1034658 /lib/libm-2.8.so b775c000-b775d000 r--p 00023000 08:01 1034658 /lib/libm-2.8.so b775d000-b775e000 rw-p 00024000 08:01 1034658 /lib/libm-2.8.so b775e000-b7adc000 r-xp 00000000 08:01 3898 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so b7adc000-b7aef000 r--p 0037e000 08:01 3898 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so b7aef000-b7afb000 rw-p 00391000 08:01 3898 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so b7afb000-b7f1b000 rw-p b7afb000 00:00 0 b7f1b000-b8058000 r-xp 00000000 08:01 145156 /lib/libc-2.8.so b8058000-b805a000 r--p 0013d000 08:01 145156 /lib/libc-2.8.so b805a000-b805b000 rw-p 0013f000 08:01 145156 /lib/libc-2.8.so b805b000-b805e000 rw-p b805b000 00:00 0 b805e000-b8060000 r-xp 00000000 08:01 996292 /lib/libdl-2.8.so b8060000-b8061000 r--p 00001000 08:01 996292 /lib/libdl-2.8.so b8061000-b8062000 rw-p 00002000 08:01 996292 /lib/libdl-2.8.so b8062000-b8066000 r-xp 00000000 08:01 3903 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so b8066000-b8067000 r--p 00003000 08:01 3903 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so b8067000-b8068000 rw-p 00004000 08:01 3903 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so b8068000-b807c000 r-xp 00000000 08:01 1100778 /lib/libpthread-2.8.so b807c000-b807d000 r--p 00013000 08:01 1100778 /lib/libpthread-2.8.so b807d000-b807e000 rw-p 00014000 08:01 1100778 /lib/libpthread-2.8.so b807e000-b8080000 rw-p b807e000 00:00 0 b8080000-b8092000 r-xp 00000000 08:01 146523 /lib/libz.so.1.2.3 b8092000-b8093000 r--p 00011000 08:01 146523 /lib/libz.so.1.2.3 b8093000-b8094000 rw-p 00012000 08:01 146523 /lib/libz.so.1.2.3 b8094000-b80a0000 r-xp 00000000 08:01 3937 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so b80a0000-b80a1000 r--p 0000c000 08:01 3937 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so b80a1000-b80a2000 rw-p 0000d000 08:01 3937 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so b80a2000-b80aa000 rw-s 00000000 08:01 4291 /tmp/hsperfdata_root/5298 (deleted) b80aa000-b80b1000 r-xp 00000000 08:01 3940 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so b80b1000-b80b2000 r--p 00006000 08:01 3940 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so b80b2000-b80b3000 rw-p 00007000 08:01 3940 /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so b80b3000-b80b4000 rw-p b80b3000 00:00 0 b80b4000-b80b5000 r--p b80b4000 00:00 0 b80b5000-b80b6000 rw-p b80b5000 00:00 0 b80b6000-b80d1000 r-xp 00000000 08:01 115121 /lib/ld-2.8.so b80d1000-b80d2000 r--p 0001a000 08:01 115121 /lib/ld-2.8.so b80d2000-b80d3000 rw-p 0001b000 08:01 115121 /lib/ld-2.8.so bfebe000-bfed3000 rw-p bffeb000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] Aborted In order to work, I must set the Xmx option, for example: linux:~/.eclipse # java -Xmx1m -version java version "1.6.0" IcedTea Runtime Environment (build 1.6.0-b09) OpenJDK Client VM (build 1.6.0-b09, mixed mode) RPM version: linux:~/.eclipse # rpm -q java-1_6_0-openjdk java-1_6_0-openjdk-1.2_b09-9.1 Opensuse version: 11.0 Kernel version: linux:~/.eclipse # uname -r 2.6.25.11-0.1-pae Ciao Roberto On Mon, Aug 4, 2008 at 2:35 PM, Mark Wielaard wrote: > Hi Roberto, > > On Mon, 2008-08-04 at 14:23 +0200, Roberto Mannai wrote: >> On 8/4/08, Andrew Haley wrote: >> > Roberto Mannai wrote: >> > >> > > For a test I've just installed: >> > > java-1_7_0-icedtea >> > > on my opensuse11 box. >> > > >> > > "java -version" command crashes with an error. In order to work, I >> > > must use the -Xmx option, also with 1m: >> > > >> > > java -Xmx1m -version >> > > >> > > Any reason for it? Is it a bug? >> > >> > It must be. How much memory have you got? >> >> My system has 512 mb of RAM, on a 32 bit processor. >> >> If I try to set the Xms option, java complains it is larger than max >> size, so in my opinion the jvm does not allocate any default xmx >> parameter. >> >> The error is: >> "Could not reserve enough space for object heap'' >> >> The same message occurs also with java-1_6_0-openjdk. > > That is strange. Can you give us some more information? > > How exactly did you install icedtea/openjdk? > > Was is it a precompiled package, if so from where? > If not, how did you configure and compile from source? > > Do other opensuse users have the same issue? > > What is the exact command given and output? > Both for the failing and the working -Xmx1m -version case? > (Best to copy/paste the command line completely, any output, including > errors, stacktraces and the output of -version is interesting.) > > Thanks, > > Mark > > From twisti at complang.tuwien.ac.at Tue Aug 5 08:05:32 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Tue, 05 Aug 2008 15:05:32 +0000 Subject: changeset in /hg/icedtea6: 2008-08-05 Christian Thalinger changeset 59665e494100 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=59665e494100 description: 2008-08-05 Christian Thalinger * autogen.sh: New file. diffstat: 2 files changed, 130 insertions(+) ChangeLog | 4 + autogen.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diffs (141 lines): diff -r 63c7ccd8da7f -r 59665e494100 ChangeLog --- a/ChangeLog Fri Aug 01 01:25:21 2008 +0200 +++ b/ChangeLog Tue Aug 05 17:05:24 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-01 Matthias Klose + + * autogen.sh: New file. + 2008-08-01 Matthias Klose * patches/icedtea-zero.patch (os::dll_load): Fix typo for mipsel. diff -r 63c7ccd8da7f -r 59665e494100 autogen.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autogen.sh Tue Aug 05 17:05:24 2008 +0200 @@ -0,0 +1,126 @@ +#!/bin/sh + +# Test for autoconf commands. + +# Test for autoconf. + +HAVE_AUTOCONF=false + +for AUTOCONF in autoconf autoconf259; do + if ${AUTOCONF} --version > /dev/null 2>&1; then + AUTOCONF_VERSION=`${AUTOCONF} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` +# echo ${AUTOCONF_VERSION} + case ${AUTOCONF_VERSION} in + 2.59* | 2.6[0-9]* ) + HAVE_AUTOCONF=true + break; + ;; + esac + fi +done + +# Test for autoheader. + +HAVE_AUTOHEADER=false + +for AUTOHEADER in autoheader autoheader259; do + if ${AUTOHEADER} --version > /dev/null 2>&1; then + AUTOHEADER_VERSION=`${AUTOHEADER} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` +# echo ${AUTOHEADER_VERSION} + case ${AUTOHEADER_VERSION} in + 2.59* | 2.6[0-9]* ) + HAVE_AUTOHEADER=true + break; + ;; + esac + fi +done + +# Test for autoreconf. + +HAVE_AUTORECONF=false + +for AUTORECONF in autoreconf; do + if ${AUTORECONF} --version > /dev/null 2>&1; then + AUTORECONF_VERSION=`${AUTORECONF} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` +# echo ${AUTORECONF_VERSION} + case ${AUTORECONF_VERSION} in + 2.59* | 2.6[0-9]* ) + HAVE_AUTORECONF=true + break; + ;; + esac + fi +done + +if test ${HAVE_AUTOCONF} = false; then + echo "No proper autoconf was found." + echo "You must have autoconf 2.59 or later installed." + exit 1 +fi + +if test ${HAVE_AUTOHEADER} = false; then + echo "No proper autoheader was found." + echo "You must have autoconf 2.59 or later installed." + exit 1 +fi + +if test ${HAVE_AUTORECONF} = false; then + echo "No proper autoreconf was found." + echo "You must have autoconf 2.59 or later installed." + exit 1 +fi + + +# Test for automake commands. + +# Test for aclocal. + +HAVE_ACLOCAL=false + +for ACLOCAL in aclocal aclocal-1.10; do + if ${ACLOCAL} --version > /dev/null 2>&1; then + ACLOCAL_VERSION=`${ACLOCAL} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` +# echo ${ACLOCAL_VERSION} + case ${ACLOCAL_VERSION} in + 1.1[0-9]* ) + HAVE_ACLOCAL=true + break; + ;; + esac + fi +done + +# Test for automake. + +HAVE_AUTOMAKE=false + +for AUTOMAKE in automake automake-1.10; do + if ${AUTOMAKE} --version > /dev/null 2>&1; then + AUTOMAKE_VERSION=`${AUTOMAKE} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` +# echo ${AUTOMAKE_VERSION} + case ${AUTOMAKE_VERSION} in + 1.1[0-9]* ) + HAVE_AUTOMAKE=true + break; + ;; + esac + fi +done + +if test ${HAVE_ACLOCAL} = false; then + echo "No proper aclocal was found." + echo "You must have automake 1.10 or later installed." + exit 1 +fi + +if test ${HAVE_AUTOMAKE} = false; then + echo "No proper automake was found." + echo "You must have automake 1.10 or later installed." + exit 1 +fi + + +export ACLOCAL AUTOCONF AUTOHEADER AUTOMAKE + +${AUTORECONF} --force --install From Svante.Schubert at Sun.COM Tue Aug 5 08:13:55 2008 From: Svante.Schubert at Sun.COM (Svante Schubert) Date: Tue, 05 Aug 2008 17:13:55 +0200 Subject: OpenOffice.org build fails due to Rhino integration in OpenJDK Message-ID: <48986E33.8090107@sun.com> Hi, We have an issue with building OpenOffice.org with openjdk-6-jdk 6b11-5, which most likely will effect the OpenOffice.org Fedora build as well. http://www.openoffice.org/issues/show_bug.cgi?id=91641 It was most likely introduced by http://icedtea.classpath.org/hg/icedtea6/file/63c7ccd8da7f/patches/icedtea-rhino.patch which adds Rhino with original package names to the OpenJDK. Since than we are unable to compile a previous version of Rhino using the above JDK, as always the Rhino interfaces from the JDK are found. JDK 1.4 had once the same problem, when adding Xalan using the Apache packages, but was fixed in JDK 5. In believe that in our case it is not even possible to use the none-standard -Xbootclasspath parameter as a workaround as the we can not add the classes that we are going to compile into our classpath. I suggest to rename the Rhino packages part of OpenJDK to allow to use different versions of Rhino. PS: Please reply all as most of the ppl on CC are not subscribed to the list. Kind regards, Svante -- Sun Microsystems GmbH Svante Schubert Nagelsweg 55 Software Engineer 20097 Hamburg StarOffice / OpenOffice.org Development Germany Phone: +49(0)40 236 46 500 http://www.sun.com Svante.Schubert at sun.com Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 08:33:20 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 15:33:20 +0000 Subject: [Bug 179] New: javascript script support through rhino should not be on bootclasspath Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179 Summary: javascript script support through rhino should not be on bootclasspath Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: mark at klomp.org The current setup of the javax.scripting engine that handles javascript through rhino depends on having all the rhino classes on the bootclasspath. See: http://mail.openjdk.java.net/pipermail/build-dev/2008-June/001176.html The problem is that the current javax.scripting javascript engine relies on all of the rhino classes being on the bootclasspath. This interferes badly when someone tries to compile their own rhino with possible different signatures (because the version on the bootclasspath is picked up first). See: http://www.openoffice.org/issues/show_bug.cgi?id=91641 To work around this the javascript engine needs to refactored to use a separate classloader to load the rhino classes. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Tue Aug 5 08:36:02 2008 From: langel at redhat.com (Lillian Angel) Date: Tue, 05 Aug 2008 11:36:02 -0400 Subject: VisualVM in IcedTea6 In-Reply-To: <48969BCE.1030306@Sun.COM> References: <488F718E.6020309@redhat.com> <4890413F.3010403@ubuntu.com> <17c6771e0807300457j6524cd20ga38c8917e9d3c054@mail.gmail.com> <48906A2E.3060805@redhat.com> <17c6771e0807300638h15304ccdgc90166222205821a@mail.gmail.com> <48906FC1.8040303@redhat.com> <48969BCE.1030306@Sun.COM> Message-ID: <48987362.5040706@redhat.com> Hi, Dalibor Topic wrote: > Joshua Sumali wrote: >> No, it would only build netbeans7, platform2, and visualvm. The actual >> "dropping-in" of visualvm occurs right after IcedTea is built. It >> happens at the same time as the dropping in of >> gcjwebplugin/icedteaplugin (stamps/icedtea.stamp target in Makefile.am). > Hi Joshua, > > On a somewhat related sidenote, I should point out that the NetBeans > team is working on GNU/Linux packages out in the open at > http://wiki.netbeans.org/NativeLinuxPackages and on the > http://installer.netbeans.org/servlets/SummarizeList?listName=linux-packaging > > mailing list. There has been quite some talk about Fedora on the list > recently, you may want to check it out, and see if that wouldn't make > the VisualVM inclusion in Fedora simpler. > I believe we are waiting on more info from someone responsible at Sun. https://bugzilla.redhat.com/show_bug.cgi?id=439265 Thanks, Lillian From mark at klomp.org Tue Aug 5 08:36:24 2008 From: mark at klomp.org (Mark Wielaard) Date: Tue, 05 Aug 2008 17:36:24 +0200 Subject: OpenOffice.org build fails due to Rhino integration in OpenJDK In-Reply-To: <48986E33.8090107@sun.com> References: <48986E33.8090107@sun.com> Message-ID: <1217950584.3051.18.camel@dijkstra.wildebeest.org> Hi Svante, On Tue, 2008-08-05 at 17:13 +0200, Svante Schubert wrote: > We have an issue with building OpenOffice.org with openjdk-6-jdk 6b11-5, > which most likely will effect the OpenOffice.org Fedora build as well. > http://www.openoffice.org/issues/show_bug.cgi?id=91641 > > It was most likely introduced by > > http://icedtea.classpath.org/hg/icedtea6/file/63c7ccd8da7f/patches/icedtea-rhino.patch > which adds Rhino with original package names to the OpenJDK. Yes, that is most likely the patch indeed. See also: http://mail.openjdk.java.net/pipermail/build-dev/2008-June/001176.html I have added Caolan to the CC in the hope that he knows how the OpenOffice package on Fedora handles this. (Maybe it hasn't been build against a newer icedtea/openjdk yet?) > Since than we are unable to compile a previous version of Rhino using > the above JDK, as always the Rhino interfaces from the JDK are found. Yes, that would be a problem indeed. Do you need to compile your own version of Rhino? I believe almost all distros come with a recent rhino these days that you could depend on (just like icedtea/openjdk does now). > In believe that in our case it is not even possible to use the > none-standard -Xbootclasspath parameter as a workaround as the we can > not add the classes that we are going to compile into our classpath. I think you can use -Xbootclasspath for javac to explicitly exclude the rhino.jar (and only use the other standard bootclasses). But I haven't tried myself yet. > I suggest to rename the Rhino packages part of OpenJDK to allow to use > different versions of Rhino. Renaming isn't a very good solution. As was earlier discussed: http://mail.openjdk.java.net/pipermail/build-dev/2008-June/001180.html We don't actually want to bundle extra copies of classes that a distribution already packages separately. That would create a lot of extra work when such a package needs to be rebuild or updated. And embedding libraries also risks missing security updates. But you are right that the problem is that that the javax.scripting support for javascript currently relies on all the rhino classes being on the bootclasspath. This is obviously wrong. I have opened a bug report: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179 I'll try to see if I can make some time for it. But no guarantees. So if someone else wants to take a stab on making the rhino classes loaded through a separate classloader that would be really nice. Cheers, Mark From Dalibor.Topic at Sun.COM Tue Aug 5 10:29:25 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Tue, 05 Aug 2008 19:29:25 +0200 Subject: VisualVM in IcedTea6 In-Reply-To: <48987362.5040706@redhat.com> References: <488F718E.6020309@redhat.com> <4890413F.3010403@ubuntu.com> <17c6771e0807300457j6524cd20ga38c8917e9d3c054@mail.gmail.com> <48906A2E.3060805@redhat.com> <17c6771e0807300638h15304ccdgc90166222205821a@mail.gmail.com> <48906FC1.8040303@redhat.com> <48969BCE.1030306@Sun.COM> <48987362.5040706@redhat.com> Message-ID: <48988DF5.8010709@sun.com> Lillian Angel wrote: > I believe we are waiting on more info from someone responsible at Sun. > https://bugzilla.redhat.com/show_bug.cgi?id=439265 That one seems to be closed. ;) cheers, dalibor topic -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From mark at klomp.org Tue Aug 5 10:43:03 2008 From: mark at klomp.org (Mark Wielaard) Date: Tue, 05 Aug 2008 19:43:03 +0200 Subject: VisualVM in IcedTea6 In-Reply-To: <48988DF5.8010709@sun.com> References: <488F718E.6020309@redhat.com> <4890413F.3010403@ubuntu.com> <17c6771e0807300457j6524cd20ga38c8917e9d3c054@mail.gmail.com> <48906A2E.3060805@redhat.com> <17c6771e0807300638h15304ccdgc90166222205821a@mail.gmail.com> <48906FC1.8040303@redhat.com> <48969BCE.1030306@Sun.COM> <48987362.5040706@redhat.com> <48988DF5.8010709@sun.com> Message-ID: <1217958184.3051.22.camel@dijkstra.wildebeest.org> On Tue, 2008-08-05 at 19:29 +0200, Dalibor Topic wrote: > Lillian Angel wrote: > > I believe we are waiting on more info from someone responsible at Sun. > > https://bugzilla.redhat.com/show_bug.cgi?id=439265 > That one seems to be closed. ;) There are different people having different packaging requests for different versions of netbeans it seems. The above is for 6.0. There is also https://bugzilla.redhat.com/show_bug.cgi?id=456337 (for 6.1) and https://bugzilla.redhat.com/show_bug.cgi?id=456341 (for "platform 8"). It is probably a good idea if the various packagers collaborated around one version/package. Cheers, Mark From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 10:46:05 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 17:46:05 +0000 Subject: [Bug 178] Icedtea7 configure error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=178 ------- Comment #2 from jsumali at redhat.com 2008-08-05 17:46 ------- I'm assuming you're getting that error from ./configure. Can you try to `hg pull; hg update`, then try to ./configure again? There was a change made in repo on Jul 22 that removes GCC_OLD from configure.ac (see ChangeLog). I'm unable to reproduce this error. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From jsumali at redhat.com Tue Aug 5 10:53:42 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Tue, 05 Aug 2008 13:53:42 -0400 Subject: VisualVM in IcedTea6 In-Reply-To: <1217958184.3051.22.camel@dijkstra.wildebeest.org> References: <488F718E.6020309@redhat.com> <4890413F.3010403@ubuntu.com> <17c6771e0807300457j6524cd20ga38c8917e9d3c054@mail.gmail.com> <48906A2E.3060805@redhat.com> <17c6771e0807300638h15304ccdgc90166222205821a@mail.gmail.com> <48906FC1.8040303@redhat.com> <48969BCE.1030306@Sun.COM> <48987362.5040706@redhat.com> <48988DF5.8010709@sun.com> <1217958184.3051.22.camel@dijkstra.wildebeest.org> Message-ID: <489893A6.6020609@redhat.com> Mark Wielaard wrote: > On Tue, 2008-08-05 at 19:29 +0200, Dalibor Topic wrote: > >> Lillian Angel wrote: >> >>> I believe we are waiting on more info from someone responsible at Sun. >>> https://bugzilla.redhat.com/show_bug.cgi?id=439265 >>> >> That one seems to be closed. ;) >> > > There are different people having different packaging requests for > different versions of netbeans it seems. The above is for 6.0. > There is also https://bugzilla.redhat.com/show_bug.cgi?id=456337 (for > 6.1) and https://bugzilla.redhat.com/show_bug.cgi?id=456341 (for > "platform 8"). It is probably a good idea if the various packagers > collaborated around one version/package. > > Cheers, > > Mark > > That would be a good idea, collaborating around one version/package to begin with, but I have a good feeling that we might end up needing multiple versions of netbeans platform depending on which apps are going to depend on it. I know for one that VisualVM will only run on platform7 (in netbeans 6.0.1). Josh From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 11:11:08 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 18:11:08 +0000 Subject: [Bug 180] New: JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 Summary: JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: veguilla at gmail.com Crash when changing JDK settings on Eclipse. Generic error message reports: # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) # Problematic frame: # V [libjvm.so+0x1ffafa] # # The crash happened outside the Java Virtual Machine in native code. # -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Tue Aug 5 11:11:14 2008 From: langel at redhat.com (Lillian Angel) Date: Tue, 05 Aug 2008 14:11:14 -0400 Subject: VisualVM in IcedTea6 In-Reply-To: <489893A6.6020609@redhat.com> References: <488F718E.6020309@redhat.com> <4890413F.3010403@ubuntu.com> <17c6771e0807300457j6524cd20ga38c8917e9d3c054@mail.gmail.com> <48906A2E.3060805@redhat.com> <17c6771e0807300638h15304ccdgc90166222205821a@mail.gmail.com> <48906FC1.8040303@redhat.com> <48969BCE.1030306@Sun.COM> <48987362.5040706@redhat.com> <48988DF5.8010709@sun.com> <1217958184.3051.22.camel@dijkstra.wildebeest.org> <489893A6.6020609@redhat.com> Message-ID: <489897C2.6090109@redhat.com> Joshua Sumali wrote: > Mark Wielaard wrote: >> On Tue, 2008-08-05 at 19:29 +0200, Dalibor Topic wrote: >> >>> Lillian Angel wrote: >>> >>>> I believe we are waiting on more info from someone responsible at Sun. >>>> https://bugzilla.redhat.com/show_bug.cgi?id=439265 >>>> >>> That one seems to be closed. ;) >>> >> >> There are different people having different packaging requests for >> different versions of netbeans it seems. The above is for 6.0. >> There is also https://bugzilla.redhat.com/show_bug.cgi?id=456337 (for >> 6.1) and https://bugzilla.redhat.com/show_bug.cgi?id=456341 (for >> "platform 8"). It is probably a good idea if the various packagers >> collaborated around one version/package. >> >> Cheers, >> >> Mark >> >> > That would be a good idea, collaborating around one version/package to > begin with, but I have a good feeling that we might end up needing > multiple versions of netbeans platform depending on which apps are going > to depend on it. I know for one that VisualVM will only run on platform7 > (in netbeans 6.0.1). Against Fedora policy to ship more than one version for a package. Lillian From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 11:12:34 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 18:12:34 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 ------- Comment #1 from veguilla at gmail.com 2008-08-05 18:12 ------- Created an attachment (id=86) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=86&action=view) Error log #1 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 11:12:51 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 18:12:51 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 ------- Comment #2 from veguilla at gmail.com 2008-08-05 18:12 ------- Created an attachment (id=87) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=87&action=view) Error log #2 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 11:32:33 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 18:32:33 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 mlists at juma.me.uk changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mlists at juma.me.uk ------- Comment #3 from mlists at juma.me.uk 2008-08-05 18:32 ------- This seems like: http://bugs.sun.com/view_bug.do?bug_id=6614100 It was fixed in 6-open(b11) and I believe that IcedTea included a patch before that. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 12:13:07 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 19:13:07 +0000 Subject: [Bug 176] openjdk 6b11-2 crashes while starting eclipse 3.4 j2ee Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=176 ------- Comment #2 from jsumali at redhat.com 2008-08-05 19:13 ------- Are you using OpenJDK or IcedTea? I just did a new b11 build with IcedTea6 from repository, and I'm unable to reproduce this crash with Eclipse Classic 3.4 or Eclipse IDE for Java EE Developers (downloaded from eclipse.org). Both versions seem to run fine. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 12:28:32 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 19:28:32 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #4 from mark at klomp.org 2008-08-05 19:28 ------- Yes it does look like this was fixed some time ago. 1.6.0-b09 is pretty old by now. The fix was in http://article.gmane.org/gmane.comp.java.openjdk.distro-packaging.devel/2390 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 13:03:50 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 20:03:50 +0000 Subject: [Bug 176] openjdk 6b11-2 crashes while starting eclipse 3.4 j2ee Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=176 mlists at juma.me.uk changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mlists at juma.me.uk ------- Comment #3 from mlists at juma.me.uk 2008-08-05 20:03 ------- This looks like an eclipse bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=236724 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 14:20:06 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 05 Aug 2008 21:20:06 +0000 Subject: [Bug 176] openjdk 6b11-2 crashes while starting eclipse 3.4 j2ee Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=176 ------- Comment #4 from michele at pupazzo.org 2008-08-05 21:20 ------- Hi Joshua, I'm using the OpenJDK package from debian unstable. I believe it contains both. I've updated now to package revision 6b11-5 and the problem is gone. Here's the relevant changelog for the package: openjdk-6 (6b11-5) unstable; urgency=low * debian/rules (stamps/mauve-build): Configure with --host and --build. * openjdk-6-jdk: Recommend libxt-dev (jawt_md.h header includes). * Fix build issues on s390 (signed size_t). -- Matthias Klose Sun, 03 Aug 2008 20:05:44 +0200 openjdk-6 (6b11-4) unstable; urgency=low * Update IcedTea build infrastructure (20080801). - Fix typo, causing build failure on mipsel. -- Matthias Klose Fri, 01 Aug 2008 01:25:51 +0200 openjdk-6 (6b11-3) unstable; urgency=low * Include the name of the VM used in the package description. * Update IcedTea build infrastructure (20080731). * Build for alpha, arm, mips and mipsel. * Switch from libcupsys2(-dev) to libcups2(-dev) for newer releases. (Closes: #492384) * Add symlinks for header files found in JAVA_HOME/include/linux in JAVA_HOME/include. * openjdk-6-jre: Don' recommend lesstif2 anymore. Should I just close this bug? Or do you guys prefer closing them yourselves? regards, Michele -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 19:55:01 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 02:55:01 +0000 Subject: [Bug 178] Icedtea7 configure error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=178 ------- Comment #3 from eric225125 at yahoo.com 2008-08-06 02:55 ------- I am using Andrew's ebuild to install icedtea. Here's the complete configure output from the latest update: ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-icedtea --with-icedtea-home=/usr/lib/icedtea6-9999 --with-parallel-jobs=2 --with-openjdk-src-zip=/usr/paludis/distfiles/openjdk-7-ea-src-b31-17_jul_2008.zip --disable-optimizations --disable-docs --enable-gcjwebplugin --without-rhino --build=x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking how to create a pax tar archive... gnutar checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of x86_64-pc-linux-gnu-gcc... none checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++ checking whether we are using the GNU C++ compiler... yes checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes checking dependency style of x86_64-pc-linux-gnu-g++... none checking for x86_64-pc-linux-gnu-make... no checking for make... /usr/libexec/paludis/utils/make checking for x86_64-pc-linux-gnu-gzip... no checking for gzip... /bin/gzip checking for x86_64-pc-linux-gnu-ant... no checking for ant... /usr/bin/ant checking for x86_64-pc-linux-gnu-find... no checking for find... /usr/bin/find checking for x86_64-pc-linux-gnu-patch... no checking for patch... /usr/libexec/paludis/utils/patch checking for x86_64-pc-linux-gnu-tar... no checking for tar... /bin/tar checking for x86_64-pc-linux-gnu-chmod... no checking for chmod... /bin/chmod checking for x86_64-pc-linux-gnu-md5sum... no checking for md5sum... /usr/bin/md5sum checking for x86_64-pc-linux-gnu-wget... no checking for wget... /usr/bin/wget checking for x86_64-pc-linux-gnu-zip... no checking for zip... /usr/bin/zip checking for x86_64-pc-linux-gnu-unzip... no checking for unzip... /usr/bin/unzip checking for x86_64-pc-linux-gnu-cpio... no checking for cpio... /bin/cpio checking for x86_64-pc-linux-gnu-file... no checking for file... /usr/bin/file checking for x86_64-pc-linux-gnu-fastjar... no checking for x86_64-pc-linux-gnu-jar... no checking for fastjar... no checking for jar... jar checking for x86_64-pc-linux-gnu-gawk... no checking for gawk... /usr/bin/gawk checking whether to include Javascript support via Rhino... no checking openjdk source zip... /usr/paludis/distfiles/openjdk-7-ea-src-b31-17_jul_2008.zip checking openjdk sources... /var/tmp/paludis/dev-java-icedtea-9999/work/icedtea/openjdk checking whether to use CACAO as VM... no checking CACAO home directory... $(abs_top_builddir)/cacao/install checking CACAO source zip... not specified checking whether to disable optimizations... yes, building with -O0 -g checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether to use the zero-assembler port... no checking whether to use the Shark JIT... no checking whether to retrieve the source code from Mercurial... no checking whether to use code from the Closures project... no checking whether to use code from the CVMI project... no checking cups/cups.h usability... yes checking cups/cups.h presence... yes checking for cups/cups.h... yes checking cups/ppd.h usability... yes checking cups/ppd.h presence... yes checking for cups/ppd.h... yes checking X11/X.h usability... yes checking X11/X.h presence... yes checking for X11/X.h... yes checking for main in -ljpeg... yes checking for main in -lgif... yes checking for main in -lz... yes checking for x86_64-pc-linux-gnu-pkg-config... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for XPROTO... yes checking for XT... yes checking for XP... yes checking for X11... yes checking for XINERAMA... yes checking for LIBPNG... yes checking for XTST... yes checking for FREETYPE2... yes checking for ALSA... yes configure: error: conditional "GCC_OLD" was never defined. Usually this means the macro was only invoked conditionally. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 5 20:00:09 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 03:00:09 +0000 Subject: [Bug 178] Icedtea7 configure error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=178 ------- Comment #4 from eric225125 at yahoo.com 2008-08-06 03:00 ------- I'm not sure, but this might be helpful. I does look like GCC_OLD is still in a few files including configure.ac: localhost dev-java-icedtea-9999 # grep -r -i 'gcc_old' . ./work/icedtea/ChangeLog: * configure.ac: Don't bother with GCC_OLD. ./work/icedtea/ChangeLog: * Makefile.am: Changed LIBGCJ_OLD to GCC_OLD. ./work/icedtea/ChangeLog: * acinclude.m4: Renamed LIBGCJ_OLD to GCC_OLD. ./work/icedtea/ChangeLog: * configure.ac: Renamed LIBGCJ_OLD to GCC_OLD. ./work/icedtea/acinclude.m4: AM_CONDITIONAL(GCC_OLD, test x != x) ./work/icedtea/acinclude.m4: AM_CONDITIONAL(GCC_OLD, test x = x) ./work/icedtea/autom4te.cache/output.1:GCC_OLD_TRUE ./work/icedtea/autom4te.cache/output.1:GCC_OLD_FALSE ./work/icedtea/autom4te.cache/output.1: GCC_OLD_TRUE= ./work/icedtea/autom4te.cache/output.1: GCC_OLD_FALSE='#' ./work/icedtea/autom4te.cache/output.1: GCC_OLD_TRUE='#' ./work/icedtea/autom4te.cache/output.1: GCC_OLD_FALSE= ./work/icedtea/autom4te.cache/output.1: GCC_OLD_TRUE= ./work/icedtea/autom4te.cache/output.1: GCC_OLD_FALSE='#' ./work/icedtea/autom4te.cache/output.1: GCC_OLD_TRUE='#' ./work/icedtea/autom4te.cache/output.1: GCC_OLD_FALSE= ./work/icedtea/autom4te.cache/output.1:if test -z "${GCC_OLD_TRUE}" && test -z "${GCC_OLD_FALSE}"; then ./work/icedtea/autom4te.cache/output.1: { { $as_echo "$as_me:$LINENO: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/output.1:$as_echo "$as_me: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/output.1:if test -z "${GCC_OLD_TRUE}" && test -z "${GCC_OLD_FALSE}"; then ./work/icedtea/autom4te.cache/output.1: { { $as_echo "$as_me:$LINENO: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/output.1:$as_echo "$as_me: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/traces.1: AM_CONDITIONAL(GCC_OLD, test x != x) ./work/icedtea/autom4te.cache/traces.1: AM_CONDITIONAL(GCC_OLD, test x = x) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- AM_CONDITIONAL([GCC_OLD], [test x != x]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_TRUE$]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_FALSE$]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- AM_CONDITIONAL([GCC_OLD], [test x = x]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_TRUE$]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_FALSE$]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.1:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/output.2:GCC_OLD_TRUE ./work/icedtea/autom4te.cache/output.2:GCC_OLD_FALSE ./work/icedtea/autom4te.cache/output.2: GCC_OLD_TRUE= ./work/icedtea/autom4te.cache/output.2: GCC_OLD_FALSE='#' ./work/icedtea/autom4te.cache/output.2: GCC_OLD_TRUE='#' ./work/icedtea/autom4te.cache/output.2: GCC_OLD_FALSE= ./work/icedtea/autom4te.cache/output.2: GCC_OLD_TRUE= ./work/icedtea/autom4te.cache/output.2: GCC_OLD_FALSE='#' ./work/icedtea/autom4te.cache/output.2: GCC_OLD_TRUE='#' ./work/icedtea/autom4te.cache/output.2: GCC_OLD_FALSE= ./work/icedtea/autom4te.cache/output.2:if test -z "${GCC_OLD_TRUE}" && test -z "${GCC_OLD_FALSE}"; then ./work/icedtea/autom4te.cache/output.2: { { $as_echo "$as_me:$LINENO: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/output.2:$as_echo "$as_me: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/output.2:if test -z "${GCC_OLD_TRUE}" && test -z "${GCC_OLD_FALSE}"; then ./work/icedtea/autom4te.cache/output.2: { { $as_echo "$as_me:$LINENO: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/output.2:$as_echo "$as_me: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AM_CONDITIONAL([GCC_OLD], [test x != x]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST_TRACE([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_TRUE$]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST_TRACE([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_FALSE$]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AM_CONDITIONAL([GCC_OLD], [test x = x]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST_TRACE([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_TRUE$]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- AC_SUBST_TRACE([GCC_OLD_FALSE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- m4_pattern_allow([^GCC_OLD_FALSE$]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_TRUE]) ./work/icedtea/autom4te.cache/traces.2:m4trace:configure.ac:200: -1- _AM_SUBST_NOTMAKE([GCC_OLD_FALSE]) ./work/icedtea/config.log:configure:12882: error: conditional "GCC_OLD" was never defined. ./work/icedtea/config.log:GCC_OLD_FALSE='' ./work/icedtea/config.log:GCC_OLD_TRUE='' ./work/icedtea/configure:GCC_OLD_TRUE ./work/icedtea/configure:GCC_OLD_FALSE ./work/icedtea/configure: GCC_OLD_TRUE= ./work/icedtea/configure: GCC_OLD_FALSE='#' ./work/icedtea/configure: GCC_OLD_TRUE='#' ./work/icedtea/configure: GCC_OLD_FALSE= ./work/icedtea/configure: GCC_OLD_TRUE= ./work/icedtea/configure: GCC_OLD_FALSE='#' ./work/icedtea/configure: GCC_OLD_TRUE='#' ./work/icedtea/configure: GCC_OLD_FALSE= ./work/icedtea/configure:if test -z "${GCC_OLD_TRUE}" && test -z "${GCC_OLD_FALSE}"; then ./work/icedtea/configure: { { $as_echo "$as_me:$LINENO: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/configure:$as_echo "$as_me: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/configure:if test -z "${GCC_OLD_TRUE}" && test -z "${GCC_OLD_FALSE}"; then ./work/icedtea/configure: { { $as_echo "$as_me:$LINENO: error: conditional \"GCC_OLD\" was never defined. ./work/icedtea/configure:$as_echo "$as_me: error: conditional \"GCC_OLD\" was never defined. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From Svante.Schubert at Sun.COM Wed Aug 6 04:04:50 2008 From: Svante.Schubert at Sun.COM (Svante Schubert) Date: Wed, 06 Aug 2008 13:04:50 +0200 Subject: OpenOffice.org build fails due to Rhino integration in OpenJDK In-Reply-To: <1217950584.3051.18.camel@dijkstra.wildebeest.org> References: <48986E33.8090107@sun.com> <1217950584.3051.18.camel@dijkstra.wildebeest.org> Message-ID: <48998552.9060700@sun.com> Hi Mark, Mark Wielaard wrote: > Hi Svante, > > On Tue, 2008-08-05 at 17:13 +0200, Svante Schubert wrote: > >> We have an issue with building OpenOffice.org with openjdk-6-jdk 6b11-5, >> which most likely will effect the OpenOffice.org Fedora build as well. >> http://www.openoffice.org/issues/show_bug.cgi?id=91641 >> >> It was most likely introduced by >> >> http://icedtea.classpath.org/hg/icedtea6/file/63c7ccd8da7f/patches/icedtea-rhino.patch >> which adds Rhino with original package names to the OpenJDK. >> > > Yes, that is most likely the patch indeed. See also: > http://mail.openjdk.java.net/pipermail/build-dev/2008-June/001176.html > > I have added Caolan to the CC in the hope that he knows how the > OpenOffice package on Fedora handles this. (Maybe it hasn't been build > against a newer icedtea/openjdk yet?) > > >> Since than we are unable to compile a previous version of Rhino using >> the above JDK, as always the Rhino interfaces from the JDK are found. >> > > Yes, that would be a problem indeed. Do you need to compile your own > version of Rhino? I believe almost all distros come with a recent rhino > these days that you could depend on (just like icedtea/openjdk does > now). > Yes, the exchange of the Rhino would be a workaround and an update would be about time, but it does not solve the general problem compiling a different Rhino with this OpenJDK. > >> In believe that in our case it is not even possible to use the >> none-standard -Xbootclasspath parameter as a workaround as the we can >> not add the classes that we are going to compile into our classpath. >> > > I think you can use -Xbootclasspath for javac to explicitly exclude the > rhino.jar (and only use the other standard bootclasses). But I haven't > tried myself yet. > Interesting, one of the guys, which have the problem in their environment should give this a try as workaround. > >> I suggest to rename the Rhino packages part of OpenJDK to allow to use >> different versions of Rhino. >> > > Renaming isn't a very good solution. As was earlier discussed: > http://mail.openjdk.java.net/pipermail/build-dev/2008-June/001180.html > We don't actually want to bundle extra copies of classes that a > distribution already packages separately. That would create a lot of > extra work when such a package needs to be rebuild or updated. And > embedding libraries also risks missing security updates. > Adding by automation an 'internal.' in front of a package name to all external libraries does not seem too hard to me, but I am not an expert on this and certainly have overseen something. In any case now people might use the Rhino API and it might be painful if the Rhino library is exchanged later. > But you are right that the problem is that that the javax.scripting > support for javascript currently relies on all the rhino classes being > on the bootclasspath. This is obviously wrong. I have opened a bug > report: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179 > Thank you very much, Mark! > I'll try to see if I can make some time for it. But no guarantees. So if > someone else wants to take a stab on making the rhino classes loaded > through a separate classloader that would be really nice. > > Cheers, > > Mark > > Cheers, Svante From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 06:11:13 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 13:11:13 +0000 Subject: [Bug 176] openjdk 6b11-2 crashes while starting eclipse 3.4 j2ee Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=176 jsumali at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #5 from jsumali at redhat.com 2008-08-06 13:11 ------- Thanks for updating, I will close this bug. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From jsumali at redhat.com Wed Aug 6 06:23:23 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Wed, 06 Aug 2008 13:23:23 +0000 Subject: changeset in /hg/icedtea: 2008-08-06 Joshua Sumali changeset 2b7233b8a439 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2b7233b8a439 description: 2008-08-06 Joshua Sumali * acinclude.m4: Don't bother with GCC_OLD here either. diffstat: 2 files changed, 4 insertions(+), 2 deletions(-) ChangeLog | 4 ++++ acinclude.m4 | 2 -- diffs (30 lines): diff -r e6094a45393c -r 2b7233b8a439 ChangeLog --- a/ChangeLog Mon Aug 04 02:22:43 2008 +0100 +++ b/ChangeLog Wed Aug 06 09:23:00 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-04 Andrew John Hughes + + * acinclude.m4: Don't bother with GCC_OLD here either. + 2008-08-04 Andrew John Hughes * Makefile.am: diff -r e6094a45393c -r 2b7233b8a439 acinclude.m4 --- a/acinclude.m4 Mon Aug 04 02:22:43 2008 +0100 +++ b/acinclude.m4 Wed Aug 06 09:23:00 2008 -0400 @@ -220,7 +220,6 @@ AC_DEFUN([FIND_ECJ_JAR], AC_DEFUN([FIND_LIBGCJ_JAR], [ - AM_CONDITIONAL(GCC_OLD, test x != x) AC_ARG_WITH([libgcj-jar], [AS_HELP_STRING(--with-libgcj-jar,specify location of the libgcj 4.3.0 jar)], [ @@ -243,7 +242,6 @@ AC_DEFUN([FIND_LIBGCJ_JAR], LIBGCJ_JAR=/usr/share/java/libgcj-4.3.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else - AM_CONDITIONAL(GCC_OLD, test x = x) if test -e "/usr/share/java/libgcj-4.1.2.jar"; then LIBGCJ_JAR=/usr/share/java/libgcj-4.1.2.jar AC_MSG_RESULT(${LIBGCJ_JAR}) From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 06:25:13 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 13:25:13 +0000 Subject: [Bug 178] Icedtea7 configure error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=178 jsumali at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #5 from jsumali at redhat.com 2008-08-06 13:25 ------- OK, I removed the remaining GCC_OLD conditional that was missed. Running `hg pull; hg update; autoconf;` should fix the problem. Thanks for reporting this bug :) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From Dalibor.Topic at Sun.COM Wed Aug 6 06:27:24 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Wed, 06 Aug 2008 15:27:24 +0200 Subject: OpenOffice.org build fails due to Rhino integration in OpenJDK In-Reply-To: <48998552.9060700@sun.com> References: <48986E33.8090107@sun.com> <1217950584.3051.18.camel@dijkstra.wildebeest.org> <48998552.9060700@sun.com> Message-ID: <4899A6BC.3000506@Sun.COM> Svante Schubert wrote: >> Yes, that would be a problem indeed. Do you need to compile your own >> version of Rhino? I believe almost all distros come with a recent rhino >> these days that you could depend on (just like icedtea/openjdk does >> now). >> >> > Yes, the exchange of the Rhino would be a workaround and an update would > be about time, but it does not solve the general problem compiling a > different Rhino with this OpenJDK. I'm seeing another iteration of the same bug in Ubuntu's bugtracker: http://www.mail-archive.com/ubuntu-bugs at lists.ubuntu.com/msg949701.html cheers, dalibor topic -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From twisti at complang.tuwien.ac.at Wed Aug 6 08:08:18 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Wed, 06 Aug 2008 15:08:18 +0000 Subject: changeset in /hg/icedtea6: 2008-08-06 Christian Thalinger changeset caf1f4959def in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=caf1f4959def description: 2008-08-06 Christian Thalinger * patches/icedtea-cacao.patch: Moved architecture stuff into... * patches/icedtea-arch.patch: New file. * Makefile.am (EXTRA_DIST): Added patches/icedtea-arch.patch. (ICEDTEA_PATCHES): Likewise. * HACKING: Likewise. diffstat: 5 files changed, 289 insertions(+), 235 deletions(-) ChangeLog | 8 + HACKING | 4 Makefile.am | 6 patches/icedtea-arch.patch | 275 +++++++++++++++++++++++++++++++++++++++++++ patches/icedtea-cacao.patch | 231 ------------------------------------ diffs (truncated from 579 to 500 lines): diff -r 59665e494100 -r caf1f4959def ChangeLog --- a/ChangeLog Tue Aug 05 17:05:24 2008 +0200 +++ b/ChangeLog Wed Aug 06 19:13:38 2008 -0400 @@ -1,3 +1,11 @@ 2008-08-05 Christian Thalinger + + * patches/icedtea-cacao.patch: Moved architecture stuff into... + * patches/icedtea-arch.patch: New file. + * Makefile.am (EXTRA_DIST): Added patches/icedtea-arch.patch. + (ICEDTEA_PATCHES): Likewise. + * HACKING: Likewise. + 2008-08-05 Christian Thalinger * autogen.sh: New file. diff -r 59665e494100 -r caf1f4959def HACKING --- a/HACKING Tue Aug 05 17:05:24 2008 +0200 +++ b/HACKING Wed Aug 06 19:13:38 2008 -0400 @@ -63,7 +63,7 @@ The following patches are currently appl * icedtea-hotspot-gcc-pr36917.patch: Work around miscompilation with GCC 4.3 (PR 36917). * icedtea-hotspot-citypeflow.patch: Fix hotspot miscompilation with GCC 4.3 on x86. * icedtea-alpha-fixes.patch: Fix build issues on alpha-linux. -* +* icedtea-arch.patch: Add support for additional architectures. The following patches are only applied to OpenJDK6 in IcedTea6: @@ -111,7 +111,7 @@ The following patches are only applied w The following patches are only applied when building with the CACAO virtual machine: -* icedtea-cacao.patch: Add support for additional architectures and don't run 'java' in a new thread. +* icedtea-cacao.patch: Don't run 'java' in a new thread. Obsolete Patches ================ diff -r 59665e494100 -r caf1f4959def Makefile.am --- a/Makefile.am Tue Aug 05 17:05:24 2008 +0200 +++ b/Makefile.am Wed Aug 06 19:13:38 2008 -0400 @@ -74,7 +74,8 @@ EXTRA_DIST = rt generated $(ICEDTEA_PATC EXTRA_DIST = rt generated $(ICEDTEA_PATCHES) $(ICEDTEA_FSG_PATCHES) \ $(ICEDTEA_ECJ_PATCH) gcjwebplugin.cc tools-copy contrib ports \ patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES) \ - patches/icedtea-cacao.patch javaws.png javaws.desktop \ + patches/icedtea-arch.patch patches/icedtea-cacao.patch \ + javaws.png javaws.desktop \ overlays extra jconsole.desktop policytool.desktop \ test/jtreg patches/icedtea-plugin.patch \ patches/icedtea-liveconnect.patch IcedTeaPlugin.cc \ @@ -494,7 +495,8 @@ ICEDTEA_PATCHES = \ patches/icedtea-hotspot-citypeflow.patch \ patches/icedtea-alpha-fixes.patch \ $(SHARK_PATCH) \ - $(GCC_PATCH) + $(GCC_PATCH) \ + patches/icedtea-arch.patch if WITH_RHINO ICEDTEA_PATCHES += \ diff -r 59665e494100 -r caf1f4959def patches/icedtea-arch.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-arch.patch Wed Aug 06 19:13:38 2008 -0400 @@ -0,0 +1,275 @@ +diff -r 63b67d07d5e9 openjdk/jdk/make/common/shared/Compiler-gcc.gmk +--- ../openjdk/jdk/make/common/shared/Compiler-gcc.gmk Tue Mar 25 16:27:33 2008 +0000 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk Wed Mar 26 08:24:35 2008 +0000 +@@ -75,28 +75,51 @@ ifeq ($(PLATFORM), linux) + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.* + else +- ifneq ("$(findstring sparc,$(ARCH))", "") +- # sparc or sparcv9 +- REQUIRED_CC_VER = 4.0 +- REQUIRED_GCC_VER = 4.0.* +- else +- ifeq ($(ARCH_DATA_MODEL), 32) ++ ifeq ($(ARCH), alpha) ++ # alpha ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), amd64) ++ # amd64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), arm) ++ # arm ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), i586) + # i586 + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.1* + REQUIRED_GCC_VER_INT = 3.2.1-7a +- else +- ifeq ($(ARCH), amd64) +- # amd64 +- REQUIRED_CC_VER = 3.2 +- REQUIRED_GCC_VER = 3.2.* + endif + ifeq ($(ARCH), ia64) + # ia64 + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 2.9[56789].* + endif ++ ifeq ($(ARCH), mips) ++ # mips ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* + endif ++ ifneq ("$(findstring ppc,$(ARCH))", "") ++ # ppc or ppc64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring s390,$(ARCH))", "") ++ # s390 or s390x ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring sparc,$(ARCH))", "") ++ # sparc or sparcv9 ++ REQUIRED_CC_VER = 4.0 ++ REQUIRED_GCC_VER = 4.0.* + endif + endif + # Option used to create a shared library +diff -r 63b67d07d5e9 openjdk/jdk/make/javax/sound/SoundDefs.gmk +--- ../openjdk/jdk/make/javax/sound/SoundDefs.gmk Tue Mar 25 16:27:33 2008 +0000 ++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk Wed Mar 26 08:29:28 2008 +0000 +@@ -58,9 +58,45 @@ ifdef ICEDTEA_ZERO_BUILD + ifdef ICEDTEA_ZERO_BUILD + CPPFLAGS += -DX_ARCH=X_ZERO + else ++ ifeq ($(ARCH), alpha) ++ CPPFLAGS += -DX_ARCH=X_ALPHA ++ endif # ARCH alpha ++ ++ ifeq ($(ARCH), amd64) ++ CPPFLAGS += -DX_ARCH=X_AMD64 ++ endif # ARCH amd64 ++ ++ ifeq ($(ARCH), arm) ++ CPPFLAGS += -DX_ARCH=X_ARM ++ endif # ARCH arm ++ + ifeq ($(ARCH), i586) + CPPFLAGS += -DX_ARCH=X_I586 + endif # ARCH i586 ++ ++ ifeq ($(ARCH), ia64) ++ CPPFLAGS += -DX_ARCH=X_IA64 ++ endif # ARCH ia64 ++ ++ ifeq ($(ARCH), mips) ++ CPPFLAGS += -DX_ARCH=X_MIPS ++ endif # ARCH mips ++ ++ ifeq ($(ARCH), ppc) ++ CPPFLAGS += -DX_ARCH=X_PPC ++ endif # ARCH ppc ++ ++ ifeq ($(ARCH), ppc64) ++ CPPFLAGS += -DX_ARCH=X_PPC64 ++ endif # ARCH ppc64 ++ ++ ifeq ($(ARCH), s390) ++ CPPFLAGS += -DX_ARCH=X_S390 ++ endif # ARCH s390 ++ ++ ifeq ($(ARCH), s390x) ++ CPPFLAGS += -DX_ARCH=X_S390X ++ endif # ARCH s390x + + ifeq ($(ARCH), sparc) + CPPFLAGS += -DX_ARCH=X_SPARC +@@ -69,10 +105,6 @@ else + ifeq ($(ARCH), sparcv9) + CPPFLAGS += -DX_ARCH=X_SPARCV9 + endif # ARCH sparcv9 +- +- ifeq ($(ARCH), amd64) +- CPPFLAGS += -DX_ARCH=X_AMD64 +- endif # ARCH amd64 + endif + + +diff -r 63b67d07d5e9 openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h +--- ../openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Mar 25 16:27:33 2008 +0000 ++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Mar 26 08:38:14 2008 +0000 +@@ -33,12 +33,19 @@ + #define X_LINUX 3 + + // types for X_ARCH +-#define X_I586 1 +-#define X_SPARC 2 +-#define X_SPARCV9 3 +-#define X_IA64 4 +-#define X_AMD64 5 +-#define X_ZERO 6 ++#define X_ALPHA 1 ++#define X_AMD64 2 ++#define X_ARM 3 ++#define X_I586 4 ++#define X_IA64 5 ++#define X_MIPS 6 ++#define X_PPC 7 ++#define X_PPC64 8 ++#define X_S390 9 ++#define X_S390X 10 ++#define X_SPARC 11 ++#define X_SPARCV9 12 ++#define X_ZERO 13 + + // ********************************** + // Make sure you set X_PLATFORM and X_ARCH defines correctly. +--- openjdk/corba/make/common/shared/Platform.gmk~ 2008-04-21 09:54:27.000000000 +0200 ++++ openjdk/corba/make/common/shared/Platform.gmk 2008-04-21 16:14:54.000000000 +0200 +@@ -224,9 +224,34 @@ + else + # i586 is 32-bit, amd64 is 64-bit + ifndef ARCH_DATA_MODEL ++ ifeq ($(ARCH), alpha) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), amd64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), arm) ++ ARCH_DATA_MODEL=32 ++ endif + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 +- else ++ endif ++ ifeq ($(ARCH), ia64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), mips) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), s390) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), s390x) + ARCH_DATA_MODEL=64 + endif + endif +--- openjdk/jdk/make/common/shared/Platform.gmk~ 2008-04-21 09:54:27.000000000 +0200 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2008-04-21 16:15:00.000000000 +0200 +@@ -235,9 +235,34 @@ + else + # i586 is 32-bit, amd64 is 64-bit + ifndef ARCH_DATA_MODEL ++ ifeq ($(ARCH), alpha) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), amd64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), arm) ++ ARCH_DATA_MODEL=32 ++ endif + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 +- else ++ endif ++ ifeq ($(ARCH), ia64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), mips) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), s390) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), s390x) + ARCH_DATA_MODEL=64 + endif + endif +diff -r f07251088084 make/common/Defs-linux.gmk +--- a/corba/make/common/Defs-linux.gmk Mon Aug 04 13:44:45 2008 -0700 ++++ openjdk/corba/make/common/Defs-linux.gmk Wed Aug 06 18:58:18 2008 -0400 +@@ -92,9 +92,18 @@ + # We need this frame pointer to make it easy to walk the stacks. + # This should be the default on X86, but ia64 and amd64 may not have this + # as the default. ++CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_hppa += + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_m68k += ++CFLAGS_REQUIRED_mips += ++CFLAGS_REQUIRED_ppc += -m32 ++CFLAGS_REQUIRED_ppc64 += -m64 ++CFLAGS_REQUIRED_s390 += ++CFLAGS_REQUIRED_s390x += -m64 + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 +diff -r 12a0d0a1bb65 make/common/Defs-linux.gmk +--- a/jdk/make/common/Defs-linux.gmk Mon Aug 04 13:45:00 2008 -0700 ++++ openjdk/jdk/make/common/Defs-linux.gmk Wed Aug 06 18:58:22 2008 -0400 +@@ -102,9 +102,18 @@ + # We need this frame pointer to make it easy to walk the stacks. + # This should be the default on X86, but ia64 and amd64 may not have this + # as the default. ++CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_hppa += + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_m68k += ++CFLAGS_REQUIRED_mips += ++CFLAGS_REQUIRED_ppc += -m32 ++CFLAGS_REQUIRED_ppc64 += -m64 ++CFLAGS_REQUIRED_s390 += ++CFLAGS_REQUIRED_s390x += -m64 + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 diff -r 59665e494100 -r caf1f4959def patches/icedtea-cacao.patch --- a/patches/icedtea-cacao.patch Tue Aug 05 17:05:24 2008 +0200 +++ b/patches/icedtea-cacao.patch Wed Aug 06 19:13:38 2008 -0400 @@ -10,237 +10,6 @@ } } -diff -r 63b67d07d5e9 openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- ../openjdk/jdk/make/common/shared/Compiler-gcc.gmk Tue Mar 25 16:27:33 2008 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk Wed Mar 26 08:24:35 2008 +0000 -@@ -75,28 +75,51 @@ ifeq ($(PLATFORM), linux) - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.* - else -- ifneq ("$(findstring sparc,$(ARCH))", "") -- # sparc or sparcv9 -- REQUIRED_CC_VER = 4.0 -- REQUIRED_GCC_VER = 4.0.* -- else -- ifeq ($(ARCH_DATA_MODEL), 32) -+ ifeq ($(ARCH), alpha) -+ # alpha -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), amd64) -+ # amd64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), arm) -+ # arm -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), i586) - # i586 - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.1* - REQUIRED_GCC_VER_INT = 3.2.1-7a -- else -- ifeq ($(ARCH), amd64) -- # amd64 -- REQUIRED_CC_VER = 3.2 -- REQUIRED_GCC_VER = 3.2.* - endif - ifeq ($(ARCH), ia64) - # ia64 - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 2.9[56789].* - endif -+ ifeq ($(ARCH), mips) -+ # mips -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* - endif -+ ifneq ("$(findstring ppc,$(ARCH))", "") -+ # ppc or ppc64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring s390,$(ARCH))", "") -+ # s390 or s390x -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring sparc,$(ARCH))", "") -+ # sparc or sparcv9 -+ REQUIRED_CC_VER = 4.0 -+ REQUIRED_GCC_VER = 4.0.* - endif - endif - # Option used to create a shared library -diff -r 63b67d07d5e9 openjdk/jdk/make/javax/sound/SoundDefs.gmk ---- ../openjdk/jdk/make/javax/sound/SoundDefs.gmk Tue Mar 25 16:27:33 2008 +0000 -+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk Wed Mar 26 08:29:28 2008 +0000 -@@ -58,9 +58,45 @@ ifdef ICEDTEA_ZERO_BUILD - ifdef ICEDTEA_ZERO_BUILD - CPPFLAGS += -DX_ARCH=X_ZERO - else -+ ifeq ($(ARCH), alpha) -+ CPPFLAGS += -DX_ARCH=X_ALPHA -+ endif # ARCH alpha -+ -+ ifeq ($(ARCH), amd64) -+ CPPFLAGS += -DX_ARCH=X_AMD64 -+ endif # ARCH amd64 -+ -+ ifeq ($(ARCH), arm) -+ CPPFLAGS += -DX_ARCH=X_ARM -+ endif # ARCH arm -+ - ifeq ($(ARCH), i586) - CPPFLAGS += -DX_ARCH=X_I586 - endif # ARCH i586 -+ -+ ifeq ($(ARCH), ia64) -+ CPPFLAGS += -DX_ARCH=X_IA64 -+ endif # ARCH ia64 -+ -+ ifeq ($(ARCH), mips) -+ CPPFLAGS += -DX_ARCH=X_MIPS -+ endif # ARCH mips -+ -+ ifeq ($(ARCH), ppc) -+ CPPFLAGS += -DX_ARCH=X_PPC -+ endif # ARCH ppc -+ -+ ifeq ($(ARCH), ppc64) -+ CPPFLAGS += -DX_ARCH=X_PPC64 -+ endif # ARCH ppc64 -+ -+ ifeq ($(ARCH), s390) -+ CPPFLAGS += -DX_ARCH=X_S390 -+ endif # ARCH s390 -+ -+ ifeq ($(ARCH), s390x) -+ CPPFLAGS += -DX_ARCH=X_S390X -+ endif # ARCH s390x - - ifeq ($(ARCH), sparc) - CPPFLAGS += -DX_ARCH=X_SPARC -@@ -69,10 +105,6 @@ else - ifeq ($(ARCH), sparcv9) - CPPFLAGS += -DX_ARCH=X_SPARCV9 - endif # ARCH sparcv9 -- -- ifeq ($(ARCH), amd64) -- CPPFLAGS += -DX_ARCH=X_AMD64 -- endif # ARCH amd64 - endif - - -diff -r 63b67d07d5e9 openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ---- ../openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Mar 25 16:27:33 2008 +0000 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Mar 26 08:38:14 2008 +0000 -@@ -33,12 +33,19 @@ - #define X_LINUX 3 - - // types for X_ARCH --#define X_I586 1 --#define X_SPARC 2 --#define X_SPARCV9 3 --#define X_IA64 4 --#define X_AMD64 5 --#define X_ZERO 6 -+#define X_ALPHA 1 -+#define X_AMD64 2 -+#define X_ARM 3 -+#define X_I586 4 -+#define X_IA64 5 -+#define X_MIPS 6 -+#define X_PPC 7 -+#define X_PPC64 8 -+#define X_S390 9 -+#define X_S390X 10 -+#define X_SPARC 11 -+#define X_SPARCV9 12 -+#define X_ZERO 13 - - // ********************************** - // Make sure you set X_PLATFORM and X_ARCH defines correctly. From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 12:49:53 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 19:49:53 +0000 Subject: [Bug 181] New: enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 Summary: enum issue with icedtea Product: IcedTea Version: unspecified Platform: PC URL: http://www.opennms.org/~brozow/enum-spring-test.tar.gz OS/Version: Mac OS Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: ranger at opennms.org OpenNMS has some code that works in the Sun JDK but fails in icedtea (Fedora Core 9, java-1.6.0-openjdk-1.6.0.0-0.17.b09.fc9.i386). We've managed to break it down into a small test case, available at the URL in this bug. Just unpack and run "mvn test -e", you should get an error like this: [ranger at i386-fc9 enum-spring-test]$ mvn test -e /usr/lib/jvm/java + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building enum-spring-test [INFO] task-segment: [test] [INFO] ---------------------------------------------------------------------------- [INFO] Ignoring available plugin update: 2.4.3 as it requires Maven version 2.0.6 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test] [INFO] Surefire report directory: /tmp/enum-spring-test/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.openjdk.test.BeanWrapperTest Aug 6, 2008 2:49:23 PM org.springframework.beans.TypeConverterDelegate findDefaultEditor WARNING: PropertyEditor [sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory! Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.188 sec <<< FAILURE! Results : Tests in error: testBeanWrapper(org.openjdk.test.BeanWrapperTest) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to /tmp/enum-spring-test/target/surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: There are test failures. Please refer to /tmp/enum-spring-test/target/surefire-reports for the individual test results. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. Please refer to /tmp/enum-spring-test/target/surefire-reports for the individual test results. at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:530) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) ... 16 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Wed Aug 06 14:49:23 GMT-05:00 2008 [INFO] Final Memory: 5M/9M [INFO] ------------------------------------------------------------------------ -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 12:50:19 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 19:50:19 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ranger at opennms.org changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Mac OS |Linux -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 12:50:53 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 19:50:53 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ------- Comment #1 from ranger at opennms.org 2008-08-06 19:50 ------- Created an attachment (id=88) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=88&action=view) test case Even better, attach it to the bug. =) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 12:52:49 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 19:52:49 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ------- Comment #2 from ranger at opennms.org 2008-08-06 19:52 ------- Ergh, that didn't work as expected, would have thought "AttachURL" would attach the contents of the URL to the bug. Sorry about that. :P -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 6 12:58:28 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 06 Aug 2008 19:58:28 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ------- Comment #3 from ranger at opennms.org 2008-08-06 19:58 ------- ...and the test failure: ------------------------------------------------------------------------------- Test set: org.openjdk.test.BeanWrapperTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.189 sec <<< FAILURE! testBeanWrapper(org.openjdk.test.BeanWrapperTest) Time elapsed: 0.13 sec <<< ERROR! org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are: PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.openjdk.test.RelativeTime] for property 'time'; nested exception is java.lang.IllegalArgumentException: Unsupported value: YESTERDAY at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:855) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:55) at org.openjdk.test.BeanWrapperTest.testBeanWrapper(BeanWrapperTest.java:30) Caused by: java.lang.IllegalArgumentException: Unsupported value: YESTERDAY at sun.beans.editors.EnumEditor.setValue(EnumEditor.java:71) at sun.beans.editors.EnumEditor.setAsText(EnumEditor.java:101) at org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:374) at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:350) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:173) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:832) ... 31 more -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Aug 7 09:05:22 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 07 Aug 2008 16:05:22 +0000 Subject: [Bug 182] New: crashes when updating a project directory in eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=182 Summary: crashes when updating a project directory in eclipse Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P1 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: rolando.umana at gmail.com platform: fedora 9 x86_64 java version "1.6.0" OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Aug 7 09:07:42 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 07 Aug 2008 16:07:42 +0000 Subject: [Bug 182] crashes when updating a project directory in eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=182 ------- Comment #1 from rolando.umana at gmail.com 2008-08-07 16:07 ------- Created an attachment (id=89) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=89&action=view) error log An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000000000808afa, pid=2891, tid=23865680 # # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) # Problematic frame: # V [libjvm.so+0x1ffafa] # -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Aug 7 12:29:12 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 07 Aug 2008 19:29:12 +0000 Subject: [Bug 182] crashes when updating a project directory in eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=182 ------- Comment #2 from jsumali at redhat.com 2008-08-07 19:29 ------- This may be a duplicate of http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 Is the problem reproducible with b11? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From keiths at redhat.com Thu Aug 7 13:32:33 2008 From: keiths at redhat.com (Keith Seitz) Date: Thu, 07 Aug 2008 13:32:33 -0700 Subject: [Fwd: Re: [OpenJDK 2D-Dev] Code review request to integrated IcedTea lcms fixes into OpenJDK 6] Message-ID: <489B5BE1.8020700@redhat.com> FYI, it looks like icedtea-lcms-leak.patch and icedtea-LCMS-setTagData.patch will soon be unnecessary. Keith -------- Original Message -------- Subject: Re: [OpenJDK 2D-Dev] Code review request to integrated IcedTea lcms fixes into OpenJDK 6 Date: Thu, 07 Aug 2008 10:01:00 -0700 From: Joseph D. Darcy To: Alexey Ushakov CC: 2d-dev, Dalibor Topic I've put the change back into OpenJDK 6 build 12. Thanks, -Joe Alexey Ushakov wrote: > Looks good for me. > > Best Regards, > Alexey > > Joseph D. Darcy wrote: >> Hello. >> >> I'm working on getting the baseline OpenJDK 6 code base to pass JCK >> 6b. Toward that end I'm requesting a code review of my application >> of little cms patches previously sent in by Keith: >> http://mail.openjdk.java.net/pipermail/2d-dev/2008-April/000228.html >> and Tom: >> >> http://mail.openjdk.java.net/pipermail/awt-dev/2007-November/000107.html, >> >> These are also the IcedTea patches >> icedtea-LCMS-setTagData.patch: Add support for setTagData to LCMS >> peer. >> icedtea-lcms-leak.patch: Fix LCMS memory leak. >> respectively. >> >> I've applied the patches to OpenJDK 6 build 11; existing cmm >> regression tests pass as do more JCK tests (see bug 6657581). >> >> Webrev uploaded to: >> http://dcstaff.invokedynamic.info/images/7/7e/darcy-6733501.tgz >> >> It would be helpful to have a review by August 8 to ease getting this >> change into OpenJDK 6 build 12. >> >> Thanks, >> >> -Joe > From omajid at redhat.com Fri Aug 8 08:19:50 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 15:19:50 +0000 Subject: changeset in /hg/pulseaudio: more refactoring; started work on c... Message-ID: changeset 0caab9aa95b1 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=0caab9aa95b1 description: more refactoring; started work on controls diffstat: 15 files changed, 198 insertions(+), 805 deletions(-) makefile | 18 src/jni-common.h | 5 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 35 + src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 113 ----- src/org/classpath/icedtea/pulseaudio/StreamVolume.java | 114 +++++ src/org_classpath_icedtea_pulseaudio_EventLoop.c | 15 src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 25 - src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 38 - src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeMuteControl.c | 8 src/org_classpath_icedtea_pulseaudio_PulseStreamAudioVolumeControl.c | 8 unittests/org/openjdk/sound/OtherSoundProvidersAvailableTest.java | 105 ---- unittests/org/openjdk/sound/PulseAudioMixerProviderTest.java | 93 ---- unittests/org/openjdk/sound/PulseAudioMixerRawTest.java | 71 --- unittests/org/openjdk/sound/PulseAudioMixerTest.java | 222 ---------- unittests/org/openjdk/sound/PulseSourceDataLineTest.java | 133 ----- diffs (truncated from 1269 to 500 lines): diff -r 8dada78f3620 -r 0caab9aa95b1 makefile --- a/makefile Tue Aug 05 15:47:11 2008 -0400 +++ b/makefile Tue Aug 05 17:30:50 2008 -0400 @@ -9,8 +9,8 @@ CC=gcc PLATFORM_FLAGS=-DWITH_32BIT_PLATFORM -CFLAGS=-g -LDFLAGS=-g +CFLAGS=-g -Wall -Werror +LDFLAGS=-g -Wall -Werror # Standard targets @@ -18,7 +18,7 @@ all: lib/libpulse-java.so clean: - -rm src/org_*.h src/org/openjdk/sound/*.class + -rm src/org_*.h src/org/classpath/icedtea/pulseaudio/*.class -rm -r bin -rm -r lib mkdir -p lib @@ -43,22 +43,22 @@ lib/libpulse-java.so: \ # Object files bin/org_classpath_icedtea_pulseaudio_EventLoop.o: src/org_classpath_icedtea_pulseaudio_EventLoop.c src/org_classpath_icedtea_pulseaudio_EventLoop.h bin - gcc -g $(PLATFORM_FLAGS) -c -o $@ $< + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.o: src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h bin - gcc -g $(PLATFORM_FLAGS) -c -o $@ $< + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.o: src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.h bin - gcc -g $(PLATFORM_FLAGS) -c -o $@ $< + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.o: src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.c src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.h - gcc -g $(PLATFORM_FLAGS) -c -o $@ $< + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o: src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h - gcc -g $(PLATFORM_FLAGS) -c -o $@ $< + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/jni-common.o: src/jni-common.c src/jni-common.h - gcc -g $(PLATFORM_FLAGS) -c -o $@ $< + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< # Java headers diff -r 8dada78f3620 -r 0caab9aa95b1 src/jni-common.h --- a/src/jni-common.h Tue Aug 05 15:47:11 2008 -0400 +++ b/src/jni-common.h Tue Aug 05 17:30:50 2008 -0400 @@ -53,6 +53,11 @@ exception statement from your version. # error Unsupported Platform #endif +typedef struct java_context_t { + JNIEnv* env; + jobject obj; +} java_context_t; + jint getJavaIntField(JNIEnv* env, jobject obj, char* fieldName); void setJavaIntField(JNIEnv* env, jobject obj, char* fieldName, jint value); diff -r 8dada78f3620 -r 0caab9aa95b1 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine$1.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine$1.class has changed diff -r 8dada78f3620 -r 0caab9aa95b1 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.class has changed diff -r 8dada78f3620 -r 0caab9aa95b1 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 05 15:47:11 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 05 17:30:50 2008 -0400 @@ -33,7 +33,7 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; @@ -43,7 +43,9 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; +import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; @@ -63,6 +65,10 @@ public class PulseAudioSourceDataLine im private boolean isPaused = false; private AudioFormat format = null; + + private Control[] controls; + private Mute muteControl; + private StreamVolume volumeControl; private List listeners; @@ -112,6 +118,10 @@ public class PulseAudioSourceDataLine im public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; this.listeners = new ArrayList(); + + volumeControl = new StreamVolume(this); + muteControl = new Mute(); + controls = new Control[] { volumeControl, muteControl }; } public void open(AudioFormat format, int bufferSize) @@ -305,12 +315,16 @@ public class PulseAudioSourceDataLine im } public Control getControl(Type control) { - return null; + for (int i = 0; i < controls.length; i++) { + if (controls[i].getType() == control){ + return controls[i]; + } + } + throw new IllegalArgumentException("Unsupported control type"); } public Control[] getControls() { - // TODO Auto-generated method stub - return null; + return controls; } public javax.sound.sampled.Line.Info getLineInfo() { @@ -386,4 +400,17 @@ public class PulseAudioSourceDataLine im } } + private class Mute extends BooleanControl { + + protected Mute() { + super(BooleanControl.Type.MUTE, false, "TRUE", "FALSE"); + + } + + } + + public long getStreamPointer() { + return streamPointer; + } + } diff -r 8dada78f3620 -r 0caab9aa95b1 src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Tue Aug 05 15:47:11 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* PulseAudioStreamVolumeControl.java - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - - -package org.classpath.icedtea.pulseaudio; - -import java.io.IOException; - -import javax.sound.sampled.FloatControl; - -public class PulseAudioStreamVolumeControl extends FloatControl { - - private FloatControl.Type type; - - static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar + "lib" - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - System.out.println(library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } - } - - @SuppressWarnings("unused") - private long streamPointer; - @SuppressWarnings("unused") - private long mainLoopPointer; - - protected PulseAudioStreamVolumeControl(Type type, float minimum, - float maximum, float precision, int updatePeriod, - float initialValue, String units, long streamPointer, - long mainLoopPointer) { - super(type, minimum, maximum, precision, updatePeriod, initialValue, - units); - assert (type.equals(Type.VOLUME)); - this.streamPointer = streamPointer; - this.mainLoopPointer = mainLoopPointer; - - } - - @Override - public float getMaximum() { - // TODO Auto-generated method stub - return super.getMaximum(); - } - - @Override - public float getMinimum() { - // TODO Auto-generated method stub - return super.getMinimum(); - } - - @Override - public Type getType() { - // TODO Auto-generated method stub - return type; - } - - @Override - public String getUnits() { - // TODO Auto-generated method stub - return super.getUnits(); - } - - public native float getValue(); - - public native void setValue(float newValue); - - @Override - public void shift(float from, float to, int microseconds) { - // TODO Auto-generated method stub - super.shift(from, to, microseconds); - } - -} diff -r 8dada78f3620 -r 0caab9aa95b1 src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.class has changed diff -r 8dada78f3620 -r 0caab9aa95b1 src/org/classpath/icedtea/pulseaudio/StreamVolume.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/classpath/icedtea/pulseaudio/StreamVolume.java Tue Aug 05 17:30:50 2008 -0400 @@ -0,0 +1,114 @@ +/* PulseAudioStreamVolumeControl.java + Copyright (C) 2008 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +package org.classpath.icedtea.pulseaudio; + +import java.io.IOException; + +import javax.sound.sampled.FloatControl; + +public class StreamVolume extends FloatControl { + + private FloatControl.Type type; + private PulseAudioSourceDataLine stream; + + private static final int MIN_PULSE_VOLUME = 0x0; + private static final int MAX_PULSE_VOLUME = 0x10000; + + static { + try { + String library = new java.io.File(".").getCanonicalPath() + + java.io.File.separatorChar + "lib" + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(library); + System.load(library); + } catch (IOException e) { + assert ("Loading failed".endsWith("library")); + } + } + + private native void native_set_volume(int volume, long streamPointer, long contextPointer); + + protected StreamVolume(PulseAudioSourceDataLine stream) { + super(FloatControl.Type.VOLUME, 0f, 100f, 0.1f, 1, 100f, "percent", + "mute", "medium", "max"); + this.type = FloatControl.Type.VOLUME; + this.stream = stream; + } + + @Override + public float getMaximum() { + return super.getMaximum(); + } + + @Override + public float getMinimum() { + return super.getMinimum(); + } + + @Override + public Type getType() { + return type; + } + + @Override + public String getUnits() { + return super.getUnits(); + } + + public float getValue() { + return super.getValue(); + } + + public void setValue(float newValue) { + /* + * Set value of pulseaudio + * + */ + int value = (int) (newValue/100f * MAX_PULSE_VOLUME); +// native_set_volume(value, stream.getStreamPointer()); + + super.setValue(newValue); + } + + @Override + public void shift(float from, float to, int microseconds) { + super.shift(from, to, microseconds); + } + +} diff -r 8dada78f3620 -r 0caab9aa95b1 src/org_classpath_icedtea_pulseaudio_EventLoop.c --- a/src/org_classpath_icedtea_pulseaudio_EventLoop.c Tue Aug 05 15:47:11 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_EventLoop.c Tue Aug 05 17:30:50 2008 -0400 @@ -44,11 +44,6 @@ const int PA_ITERATE_BLOCK = 1; const int PA_ITERATE_BLOCK = 1; const int PA_ITERATE_NOBLOCK = 0; -typedef struct java_context_t { - JNIEnv* env; - jobject obj; -} java_context_t; - static java_context_t* java_context = NULL; JNIEnv* pulse_thread_env = NULL; @@ -92,9 +87,6 @@ JNIEXPORT void JNICALL Java_org_classpat assert(appName != NULL); - jfieldID fid; /* the field id */ - jclass cls = (*env)->GetObjectClass(env,obj); - printf("native_setup() called\n"); pa_mainloop *mainloop = pa_mainloop_new(); assert(mainloop != NULL); @@ -103,7 +95,7 @@ JNIEXPORT void JNICALL Java_org_classpat pa_context *context = NULL; - const jbyte* string_appName; + const char* string_appName; string_appName = (*env)->GetStringUTFChars(env, appName, NULL); if (string_appName == NULL) { return; /* a OutOfMemoryError thrown by vm */ @@ -124,7 +116,7 @@ JNIEXPORT void JNICALL Java_org_classpat if (server != NULL) { /* obtain the server from the caller */ - const jbyte* string_server = NULL; + const char* string_server = NULL; string_server = (*env)->GetStringUTFChars(env, server, NULL); if (string_server == NULL) { /* error, so clean up */ @@ -192,9 +184,6 @@ JNIEXPORT void JNICALL Java_org_classpat printf("native_shutdown() starting\n"); - jfieldID fid; /* the field id */ - jclass cls = (*env)->GetObjectClass(env,obj); - pa_mainloop* mainloop = (pa_mainloop*) getJavaPointer(env, obj, "mainloopPointer"); assert(mainloop != NULL); diff -r 8dada78f3620 -r 0caab9aa95b1 src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Tue Aug 05 15:47:11 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Tue Aug 05 17:30:50 2008 -0400 @@ -36,6 +36,7 @@ */ #include +#include #include #include #include @@ -43,13 +44,6 @@ #include "org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h" #include "jni-common.h" - -typedef struct java_context_t { - JNIEnv* env; - jobject obj; -} java_context_t; - -static java_context_t* java_context; /* defined in EventLoop.c */ extern JNIEnv* pulse_thread_env; @@ -156,7 +150,7 @@ JNIEXPORT void JNICALL Java_org_classpat sample_spec.channels = channels; /* obtain the server from the caller */ - const jbyte* stream_name = NULL; + const char* stream_name = NULL; stream_name = (*env)->GetStringUTFChars(env, name, NULL); if (stream_name == NULL) { return; /* OutOfMemoryError */ @@ -199,7 +193,7 @@ JNIEXPORT jint JNICALL Java_org_classpat pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); int available = pa_stream_writable_size(stream); - + return available; } /* @@ -282,5 +276,14 @@ JNIEXPORT void JNICALL Java_org_classpat JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1close (JNIEnv* env, jobject obj) { -} - + pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); + pa_operation *o = pa_stream_drain(stream, stream_drain_complete_callback, NULL); + if (o == NULL) { + pa_stream_disconnect(stream); + } else { + pa_operation_unref(o); + } + From omajid at redhat.com Fri Aug 8 08:19:50 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 15:19:50 +0000 Subject: changeset in /hg/pulseaudio: turned eventloop into a singleton. ... Message-ID: changeset 4a01f1203d48 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=4a01f1203d48 description: turned eventloop into a singleton. which revealed a bunch of threading issues; fixed most of the blockers diffstat: 16 files changed, 727 insertions(+), 284 deletions(-) makefile | 8 src/org/classpath/icedtea/pulseaudio/EventLoop.java | 43 + src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 59 +- src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 1 src/org/classpath/icedtea/pulseaudio/StreamVolume.java | 11 src/org_classpath_icedtea_pulseaudio_EventLoop.c | 5 src/org_classpath_icedtea_pulseaudio_EventLoop.h | 45 - src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h | 95 ---- src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h | 29 - src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.h | 69 -- src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.h | 13 unittests/org/classpath/icedtea/pulseaudio/OtherSoundProvidersAvailableTest.java | 105 ++++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerProviderTest.java | 93 ++++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerRawTest.java | 70 +++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 232 ++++++++++ unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 133 +++++ diffs (truncated from 1289 to 500 lines): diff -r 0caab9aa95b1 -r 4a01f1203d48 makefile --- a/makefile Tue Aug 05 17:30:50 2008 -0400 +++ b/makefile Wed Aug 06 14:08:52 2008 -0400 @@ -35,8 +35,9 @@ lib/libpulse-java.so: \ bin/org_classpath_icedtea_pulseaudio_EventLoop.o \ bin/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.o \ bin/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.o \ - bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o \ + bin/org_classpath_icedtea_pulseaudio_StreamVolume.o \ bin/jni-common.o +# bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o \ # bin/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.o \ gcc -g -shared -o $@ $^ /usr/lib/libpulse.so @@ -55,6 +56,9 @@ bin/org_classpath_icedtea_pulseaudio_Pul gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o: src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h + gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< + +bin/org_classpath_icedtea_pulseaudio_StreamVolume.o: src/org_classpath_icedtea_pulseaudio_StreamVolume.c src/org_classpath_icedtea_pulseaudio_StreamVolume.h gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/jni-common.o: src/jni-common.c src/jni-common.h @@ -77,6 +81,8 @@ src/org_classpath_icedtea_pulseaudio_Pul src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h: src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.class javah -d src -classpath src org.classpath.icedtea.pulseaudio.PulseAudioStreamVolumeControl +src/org_classpath_icedtea_pulseaudio_StreamVolume.h: src/org/classpath/icedtea/pulseaudio/StreamVolume.class + javah -d src -classpath src org.classpath.icedtea.pulseaudio.StreamVolume # Compile Java # Actually, this is not the best thing to do; javac might do some crazy things diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/ContextEvent$Type.class Binary file src/org/classpath/icedtea/pulseaudio/ContextEvent$Type.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/ContextEvent.class Binary file src/org/classpath/icedtea/pulseaudio/ContextEvent.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/ContextListener.class Binary file src/org/classpath/icedtea/pulseaudio/ContextListener.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/EventLoop$1.class Binary file src/org/classpath/icedtea/pulseaudio/EventLoop$1.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/EventLoop.class Binary file src/org/classpath/icedtea/pulseaudio/EventLoop.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/org/classpath/icedtea/pulseaudio/EventLoop.java Tue Aug 05 17:30:50 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 06 14:08:52 2008 -0400 @@ -33,7 +33,7 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; @@ -60,12 +60,15 @@ public class EventLoop implements Runnab */ public Object threadLock = new Object(); + private static EventLoop instance = null; + private List contextListeners; // private List lines; private String name; private String serverString; private int status; + // private boolean eventLoopIsRunning = false; public Semaphore finished = new Semaphore(0); @@ -88,11 +91,6 @@ public class EventLoop implements Runnab /* * These fields hold pointers * - * When going from 32 bit to 64 bit, these will have to be changed to longs, - * but not otherwise - * - * Pointer sizes change from 32 bit to 64 bit, but java data types's sizes - * dont * */ @SuppressWarnings("unused") @@ -117,8 +115,16 @@ public class EventLoop implements Runnab } } - public EventLoop() { + private EventLoop() { contextListeners = new ArrayList(); + + } + + synchronized public static EventLoop getEventLoop() { + if (instance == null) { + instance = new EventLoop(); + } + return instance; } public void setAppName(String name) { @@ -149,7 +155,6 @@ public class EventLoop implements Runnab native_shutdown(); System.out.println(this.getClass().getName() + ": shutting down"); - finished.release(); return; } @@ -158,9 +163,15 @@ public class EventLoop implements Runnab } - public void addContextListener(ContextListener l) { - synchronized (threadLock) { - contextListeners.add(l); + public void addContextListener(ContextListener contextListener) { + synchronized (contextListeners) { + contextListeners.add(contextListener); + } + } + + public void removeContextListener(ContextListener contextListener) { + synchronized (contextListeners) { + contextListeners.remove(contextListener); } } @@ -185,6 +196,7 @@ public class EventLoop implements Runnab case 3: break; case 4: + System.out.println(this.getClass().getName() + " is ready!"); fireEvent(new ContextEvent(Type.READY)); break; case 5: @@ -200,14 +212,19 @@ public class EventLoop implements Runnab } private void fireEvent(final ContextEvent e) { - + System.out.println(this.getClass().getName() + "firing event: " + + e.getType().toString()); Thread th = new Thread(new Runnable() { @Override public void run() { + System.out.println("notifying listeners"); + synchronized (contextListeners) { + System.out.println(contextListeners.size()); for (ContextListener listener : contextListeners) { listener.update(e); + System.out.println("updating listeners"); } } } @@ -215,7 +232,7 @@ public class EventLoop implements Runnab }); th.start(); - + } public void setVolume(long streamPointer, int volume) { diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Tue Aug 05 17:30:50 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 06 14:08:52 2008 -0400 @@ -33,7 +33,7 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; @@ -218,13 +218,13 @@ public class PulseAudioMixer implements eventLoopThread.interrupt(); try { - eventLoop.finished.acquire(); + eventLoopThread.join(); } catch (InterruptedException e) { System.out.println(this.getClass().getName() + ": interrupted while waiting for eventloop to finish"); } - System.out.println(this.getClass().getName() + ": closing"); + System.out.println(this.getClass().getName() + ": closed"); this.isOpen = false; fireEvent(new LineEvent(this, LineEvent.Type.CLOSE, @@ -304,25 +304,29 @@ public class PulseAudioMixer implements host = host + ":" + String.valueOf(port); } - eventLoop = new EventLoop(); + eventLoop = EventLoop.getEventLoop(); eventLoop.setAppName(appName); eventLoop.setServer(host); final Semaphore ready = new Semaphore(0); - eventLoop.addContextListener(new ContextListener() { + ContextListener initListener = new ContextListener() { @Override public void update(ContextEvent e) { - System.out.println("Event detected " + e.getType().toString()); + System.out.println(this.getClass().getName() + + ": Event detected " + e.getType().toString()); if (e.getType() == ContextEvent.Type.READY || e.getType() == ContextEvent.Type.FAILED || e.getType() == ContextEvent.Type.TERMINATED) { ready.release(); + System.out.println("realeasing semaphore ready"); } } - }); + }; + + eventLoop.addContextListener(initListener); eventLoopThread = new Thread(eventLoop, "PulseAudio Eventloop Thread"); @@ -333,17 +337,46 @@ public class PulseAudioMixer implements System.out.println("waiting..."); ready.acquire(); if (eventLoop.getStatus() != 4) { + /* + * when exiting, wait for the thread to end otherwise we get one + * thread that inits the singletone with new data and the old + * thread then cleans up the singleton asserts fail all over the + * place + */ + eventLoop.removeContextListener(initListener); + eventLoopThread.interrupt(); + eventLoopThread.join(); throw new LineUnavailableException(); } - + eventLoop.removeContextListener(initListener); System.out.println("got signal"); } catch (InterruptedException e) { - System.out.println("got interrupted"); - } - + System.out.println("PROBLEM: got interrupted"); + } + + System.out.println(this.getClass().getName() + ": ready"); + this.isOpen = true; - fireEvent(new LineEvent(this, LineEvent.Type.OPEN, - AudioSystem.NOT_SPECIFIED)); + +// ContextListener eventListener = new ContextListener() { +// +// @Override +// public void update(ContextEvent e) { +// if (e.getType() == ContextEvent.Type.READY) { +// +// fireEvent(new LineEvent(PulseAudioMixer.this, +// LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); +// } else if (e.getType() == ContextEvent.Type.FAILED +// || e.getType() == ContextEvent.Type.TERMINATED) { +// fireEvent(new LineEvent(PulseAudioMixer.this, +// LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED)); +// } +// +// } +// +// }; + +// eventLoop.addContextListener(eventListener); } diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine$1.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine$1.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 05 17:30:50 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 06 14:08:52 2008 -0400 @@ -45,7 +45,6 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; -import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.class Binary file src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/StreamEvent$Type.class Binary file src/org/classpath/icedtea/pulseaudio/StreamEvent$Type.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/StreamEvent.class Binary file src/org/classpath/icedtea/pulseaudio/StreamEvent.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/StreamListener.class Binary file src/org/classpath/icedtea/pulseaudio/StreamListener.class has changed diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org/classpath/icedtea/pulseaudio/StreamVolume.java --- a/src/org/classpath/icedtea/pulseaudio/StreamVolume.java Tue Aug 05 17:30:50 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/StreamVolume.java Wed Aug 06 14:08:52 2008 -0400 @@ -45,7 +45,7 @@ public class StreamVolume extends FloatC private FloatControl.Type type; private PulseAudioSourceDataLine stream; - + private static final int MIN_PULSE_VOLUME = 0x0; private static final int MAX_PULSE_VOLUME = 0x10000; @@ -62,8 +62,8 @@ public class StreamVolume extends FloatC } } - private native void native_set_volume(int volume, long streamPointer, long contextPointer); - + private native void native_set_volume(int volume, long streamPointer); + protected StreamVolume(PulseAudioSourceDataLine stream) { super(FloatControl.Type.VOLUME, 0f, 100f, 0.1f, 1, 100f, "percent", "mute", "medium", "max"); @@ -101,8 +101,9 @@ public class StreamVolume extends FloatC * */ int value = (int) (newValue/100f * MAX_PULSE_VOLUME); -// native_set_volume(value, stream.getStreamPointer()); - +// synchronized (eventLoop.threadLock) { + native_set_volume(value, stream.getStreamPointer()); +// } super.setValue(newValue); } diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org_classpath_icedtea_pulseaudio_EventLoop.c --- a/src/org_classpath_icedtea_pulseaudio_EventLoop.c Tue Aug 05 17:30:50 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_EventLoop.c Wed Aug 06 14:08:52 2008 -0400 @@ -52,6 +52,8 @@ static void context_change_callback(pa_c assert(context); assert(userdata == NULL); + printf("context state changed\n"); + //java_context_t* java_context = (java_context_t*)userdata; JNIEnv* env = java_context->env; jobject obj = java_context->obj; @@ -203,6 +205,9 @@ JNIEXPORT void JNICALL Java_org_classpat free(java_context); printf("native_shutdown() returning\n"); + + setJavaPointer(env, obj, "mainloopPointer", NULL); + setJavaPointer(env, obj, "contextPointer", NULL); } diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org_classpath_icedtea_pulseaudio_EventLoop.h --- a/src/org_classpath_icedtea_pulseaudio_EventLoop.h Tue Aug 05 17:30:50 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_classpath_icedtea_pulseaudio_EventLoop */ - -#ifndef _Included_org_classpath_icedtea_pulseaudio_EventLoop -#define _Included_org_classpath_icedtea_pulseaudio_EventLoop -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: org_classpath_icedtea_pulseaudio_EventLoop - * Method: native_setup - * Signature: (Ljava/lang/String;Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1setup - (JNIEnv *, jobject, jstring, jstring); - -/* - * Class: org_classpath_icedtea_pulseaudio_EventLoop - * Method: native_iterate - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1iterate - (JNIEnv *, jobject, jint); - -/* - * Class: org_classpath_icedtea_pulseaudio_EventLoop - * Method: native_shutdown - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1shutdown - (JNIEnv *, jobject); - -/* - * Class: org_classpath_icedtea_pulseaudio_EventLoop - * Method: native_set_sink_volume - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1set_1sink_1volume - (JNIEnv *, jobject, jlong, jint); - -#ifdef __cplusplus -} -#endif -#endif diff -r 0caab9aa95b1 -r 4a01f1203d48 src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h --- a/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h Tue Aug 05 17:30:50 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine */ - -#ifndef _Included_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine -#define _Included_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine -#ifdef __cplusplus -extern "C" { -#endif -#undef org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_DEFAULT_BUFFER_SIZE -#define org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_DEFAULT_BUFFER_SIZE 1000L -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_open - * Signature: (JLjava/lang/String;Ljava/lang/String;FIIZI)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1open - (JNIEnv *, jobject, jlong, jstring, jstring, jfloat, jint, jint, jboolean, jint); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_write - * Signature: ([BII)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1write - (JNIEnv *, jobject, jbyteArray, jint, jint); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_get_writable_size - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1get_1writable_1size - (JNIEnv *, jobject); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_getOperationState - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1getOperationState - (JNIEnv *, jobject, jint); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_flush - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1flush - (JNIEnv *, jobject); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_start - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1start - (JNIEnv *, jobject); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_pause - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1pause - (JNIEnv *, jobject); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_resume - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1resume - (JNIEnv *, jobject); - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_drain - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1drain - (JNIEnv *, jobject); From omajid at redhat.com Fri Aug 8 08:19:51 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 15:19:51 +0000 Subject: changeset in /hg/pulseaudio: fixed the deadlock which occurred w... Message-ID: changeset c3802b8ed541 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c3802b8ed541 description: fixed the deadlock which occurred when adding multiple listeners during the open() call of the PulseAudioMixer diffstat: 3 files changed, 76 insertions(+), 62 deletions(-) .hgignore | 8 + src/org/classpath/icedtea/pulseaudio/EventLoop.java | 35 +--- src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 95 +++++++------ diffs (198 lines): diff -r 4a01f1203d48 -r c3802b8ed541 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Wed Aug 06 14:55:15 2008 -0400 @@ -0,0 +1,8 @@ +# use glob syntax. +syntax: glob + +*.class +*.o +*~ +org_classpath_icedtea_*.h +*.log diff -r 4a01f1203d48 -r c3802b8ed541 src/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 06 14:08:52 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 06 14:55:15 2008 -0400 @@ -45,8 +45,8 @@ import org.classpath.icedtea.pulseaudio. import org.classpath.icedtea.pulseaudio.ContextEvent.Type; /* - * any methods that can obstruct the behaviour of pa_mainloop - * should run synchronized + * any methods that can obstruct the behaviour of pa_mainloop should run + * synchronized * * */ @@ -68,7 +68,7 @@ public class EventLoop implements Runnab private String serverString; private int status; - // private boolean eventLoopIsRunning = false; + // private boolean eventLoopIsRunning = false; public Semaphore finished = new Semaphore(0); @@ -214,25 +214,16 @@ public class EventLoop implements Runnab private void fireEvent(final ContextEvent e) { System.out.println(this.getClass().getName() + "firing event: " + e.getType().toString()); - Thread th = new Thread(new Runnable() { - - @Override - public void run() { - System.out.println("notifying listeners"); - - synchronized (contextListeners) { - System.out.println(contextListeners.size()); - for (ContextListener listener : contextListeners) { - listener.update(e); - System.out.println("updating listeners"); - } - } - } - - }); - - th.start(); - + System.out.println("notifying listeners"); + + synchronized (contextListeners) { + System.out.println(contextListeners.size()); + for (ContextListener listener : contextListeners) { + listener.update(e); + System.out.println("updating listeners"); + } + } + } public void setVolume(long streamPointer, int volume) { diff -r 4a01f1203d48 -r c3802b8ed541 src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 06 14:08:52 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 06 14:55:15 2008 -0400 @@ -308,12 +308,38 @@ public class PulseAudioMixer implements eventLoop.setAppName(appName); eventLoop.setServer(host); - final Semaphore ready = new Semaphore(0); - - ContextListener initListener = new ContextListener() { + + ContextListener eventListener = new ContextListener() { @Override public void update(ContextEvent e) { + System.out.println("General listener was notified"); + System.out.println(" eventType: " + e.getType()); + if (e.getType() == ContextEvent.Type.READY) { + System.out.println("firing event ready.."); + fireEvent(new LineEvent(PulseAudioMixer.this, + LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + System.out.println("done"); + } else if (e.getType() == ContextEvent.Type.FAILED + || e.getType() == ContextEvent.Type.TERMINATED) { + fireEvent(new LineEvent(PulseAudioMixer.this, + LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED)); + } + System.out.println("general listener returning"); + } + + }; + + eventLoop.addContextListener(eventListener); + + + final Semaphore ready = new Semaphore(0); + + ContextListener initListener = new ContextListener() { + + @Override + public void update(ContextEvent e) { + System.out.println("specific listener notifed"); System.out.println(this.getClass().getName() + ": Event detected " + e.getType().toString()); if (e.getType() == ContextEvent.Type.READY @@ -322,6 +348,7 @@ public class PulseAudioMixer implements ready.release(); System.out.println("realeasing semaphore ready"); } + System.out.println("specific listener returning"); } }; @@ -355,48 +382,36 @@ public class PulseAudioMixer implements } System.out.println(this.getClass().getName() + ": ready"); - + this.isOpen = true; -// ContextListener eventListener = new ContextListener() { -// -// @Override -// public void update(ContextEvent e) { -// if (e.getType() == ContextEvent.Type.READY) { -// -// fireEvent(new LineEvent(PulseAudioMixer.this, -// LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); -// } else if (e.getType() == ContextEvent.Type.FAILED -// || e.getType() == ContextEvent.Type.TERMINATED) { -// fireEvent(new LineEvent(PulseAudioMixer.this, -// LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED)); -// } -// -// } -// -// }; - -// eventLoop.addContextListener(eventListener); - - } - - @Override - synchronized public void removeLineListener(LineListener listener) { + + + } + + @Override + public void removeLineListener(LineListener listener) { lineListeners.remove(listener); } - synchronized private void fireEvent(final LineEvent e) { - Thread th = new Thread(new Runnable() { - @Override - public void run() { - synchronized (lineListeners) { - for (LineListener lineListener : lineListeners) { - lineListener.update(e); - } - } - } - }); - th.start(); + /* + * Should this method be synchronized? I had a few reasons, but i forgot them + * Pros: + * - Thread safety? + * + * Cons: + * - eventListeners are run from other threads, if those then call fireEvent + * while a method is waiting on a listener, this synchronized block wont + * be entered: deadlock! + * + */ + private void fireEvent(final LineEvent e) { + System.out.println(this.getClass().getName() + "fireEvent(): firing event"); + synchronized (lineListeners) { + for (LineListener lineListener : lineListeners) { + lineListener.update(e); + } + } } public static void main(String[] args) throws Exception { From omajid at redhat.com Fri Aug 8 08:19:51 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 15:19:51 +0000 Subject: changeset in /hg/pulseaudio: fixed the problem with listeners re... Message-ID: changeset 2331da2e5f6a in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=2331da2e5f6a description: fixed the problem with listeners remaining attached to a eventloop even after shutting down the eventloop; removed extra printing diffstat: 9 files changed, 158 insertions(+), 155 deletions(-) .hgignore | 2 src/jni-common.c | 99 ++++++---- src/org/classpath/icedtea/pulseaudio/EventLoop.java | 29 +- src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 53 +---- src/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java | 2 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 7 src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 4 src/org_classpath_icedtea_pulseaudio_EventLoop.c | 91 ++++----- src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 26 +- diffs (truncated from 653 to 500 lines): diff -r c3802b8ed541 -r 2331da2e5f6a .hgignore --- a/.hgignore Wed Aug 06 14:55:15 2008 -0400 +++ b/.hgignore Wed Aug 06 16:30:43 2008 -0400 @@ -6,3 +6,5 @@ syntax: glob *~ org_classpath_icedtea_*.h *.log +bin/* +lib/* diff -r c3802b8ed541 -r 2331da2e5f6a src/jni-common.c --- a/src/jni-common.c Wed Aug 06 14:55:15 2008 -0400 +++ b/src/jni-common.c Wed Aug 06 16:30:43 2008 -0400 @@ -1,40 +1,39 @@ /* jni-common.c - Copyright (C) 2008 Red Hat, Inc. + Copyright (C) 2008 Red Hat, Inc. -This file is part of IcedTea. + This file is part of IcedTea. -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. + IcedTea is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. + IcedTea is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. + You should have received a copy of the GNU General Public License + along with IcedTea; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + */ #include "jni-common.h" @@ -89,17 +88,53 @@ void* getJavaPointer(JNIEnv* env, jobjec void* getJavaPointer(JNIEnv* env, jobject obj, char* name) { /* + * on a 64 bit machine, the value of the long is 64 bits, which should be the pointer + * size and everything should be ok + * + * So the problem is 32 bit architectures: + * * A reference snippet * int a_int = 0x1020; long a_long = 0x102030; long long a_long_long = 0x1020304150607080; - printf("size of int: %d\nsize of long: %d\nsize of long long: %d\n", sizeof(int), sizeof(long), sizeof(long long)); + printf("size of int: %d\nsize of long: %d\nsize of long long: %d\n", + sizeof(int), sizeof(long), sizeof(long long)); printf("int to long long: %X -> %llX\n", a_int, (long long) a_int); printf("long long to int: %llX -> %X\n", a_long_long, (int)a_long_long); * this shows that long long -> int does a bitwise mask to get the lower order bits only - * FIXME what about endianness? will it get the opposite bits? + * this is a guess at how it works: + * + * raw data in register is 0x 10203040 50607080 + * 32 bits 32 bits + * + * we are interested in the 50607080 part of data + * + * Big endian: + * 10 <-- Pointer < 32bit pointer (for an int) + * 20 < + * 30 < + * 40 < + * 50 + * 60 + * 70 + * 80 + * (for big endian, will need to do masking and shifting) + * + * + * Little Endian + * 80 <-- Pointer < 32bit pointer (for an int) + * 70 < + * 60 < + * 50 < + * 40 + * 30 + * 20 + * 10 + * (so little endian works by default!) + * + * */ /* diff -r c3802b8ed541 -r 2331da2e5f6a src/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 06 14:55:15 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 06 16:30:43 2008 -0400 @@ -153,8 +153,14 @@ public class EventLoop implements Runnab if (Thread.interrupted()) { native_shutdown(); - System.out.println(this.getClass().getName() - + ": shutting down"); + // System.out.println(this.getClass().getName() + // + ": shutting down"); + + // clean up the listeners + synchronized (contextListeners) { + contextListeners.clear(); + } + return; } @@ -181,8 +187,8 @@ public class EventLoop implements Runnab public void update(int status) { synchronized (threadLock) { - System.out.println(this.getClass().getName() - + ".update() called! status = " + status); + // System.out.println(this.getClass().getName() + // + ".update() called! status = " + status); this.status = status; switch (status) { case 0: @@ -196,7 +202,6 @@ public class EventLoop implements Runnab case 3: break; case 4: - System.out.println(this.getClass().getName() + " is ready!"); fireEvent(new ContextEvent(Type.READY)); break; case 5: @@ -212,26 +217,22 @@ public class EventLoop implements Runnab } private void fireEvent(final ContextEvent e) { - System.out.println(this.getClass().getName() + "firing event: " - + e.getType().toString()); - System.out.println("notifying listeners"); - - synchronized (contextListeners) { - System.out.println(contextListeners.size()); +// System.out.println(this.getClass().getName() + "firing event: " +// + e.getType().toString()); + + synchronized (contextListeners) { +// System.out.println(contextListeners.size()); for (ContextListener listener : contextListeners) { listener.update(e); - System.out.println("updating listeners"); } } } public void setVolume(long streamPointer, int volume) { - synchronized (threadLock) { native_set_sink_volume(streamPointer, volume); } - } public long getContextPointer() { diff -r c3802b8ed541 -r 2331da2e5f6a src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 06 14:55:15 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 06 16:30:43 2008 -0400 @@ -224,7 +224,7 @@ public class PulseAudioMixer implements + ": interrupted while waiting for eventloop to finish"); } - System.out.println(this.getClass().getName() + ": closed"); + // System.out.println(this.getClass().getName() + ": closed"); this.isOpen = false; fireEvent(new LineEvent(this, LineEvent.Type.CLOSE, @@ -249,7 +249,7 @@ public class PulseAudioMixer implements @Override public javax.sound.sampled.Line.Info getLineInfo() { - System.out.println("DEBUG: PulseAudioMixer.getLineInfo() called"); + // System.out.println("DEBUG: PulseAudioMixer.getLineInfo() called"); return new Line.Info(PulseAudioMixer.class); } @@ -308,47 +308,33 @@ public class PulseAudioMixer implements eventLoop.setAppName(appName); eventLoop.setServer(host); - - ContextListener eventListener = new ContextListener() { - + ContextListener generalEventListener = new ContextListener() { @Override public void update(ContextEvent e) { - System.out.println("General listener was notified"); - System.out.println(" eventType: " + e.getType()); if (e.getType() == ContextEvent.Type.READY) { - System.out.println("firing event ready.."); fireEvent(new LineEvent(PulseAudioMixer.this, LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); - System.out.println("done"); } else if (e.getType() == ContextEvent.Type.FAILED || e.getType() == ContextEvent.Type.TERMINATED) { fireEvent(new LineEvent(PulseAudioMixer.this, LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED)); } - System.out.println("general listener returning"); - } - + } }; - eventLoop.addContextListener(eventListener); - - + eventLoop.addContextListener(generalEventListener); + final Semaphore ready = new Semaphore(0); ContextListener initListener = new ContextListener() { @Override public void update(ContextEvent e) { - System.out.println("specific listener notifed"); - System.out.println(this.getClass().getName() - + ": Event detected " + e.getType().toString()); if (e.getType() == ContextEvent.Type.READY || e.getType() == ContextEvent.Type.FAILED || e.getType() == ContextEvent.Type.TERMINATED) { ready.release(); - System.out.println("realeasing semaphore ready"); } - System.out.println("specific listener returning"); } }; @@ -361,7 +347,7 @@ public class PulseAudioMixer implements eventLoopThread.start(); try { - System.out.println("waiting..."); +// System.out.println("waiting..."); ready.acquire(); if (eventLoop.getStatus() != 4) { /* @@ -376,16 +362,14 @@ public class PulseAudioMixer implements throw new LineUnavailableException(); } eventLoop.removeContextListener(initListener); - System.out.println("got signal"); +// System.out.println("got signal"); } catch (InterruptedException e) { - System.out.println("PROBLEM: got interrupted"); - } - - System.out.println(this.getClass().getName() + ": ready"); + System.out.println("PulseAudioMixer: got interrupted while waiting for the EventLoop to initialize"); + } + +// System.out.println(this.getClass().getName() + ": ready"); this.isOpen = true; - - } @@ -395,18 +379,15 @@ public class PulseAudioMixer implements } /* - * Should this method be synchronized? I had a few reasons, but i forgot them - * Pros: - * - Thread safety? + * Should this method be synchronized? I had a few reasons, but i forgot + * them Pros: - Thread safety? * - * Cons: - * - eventListeners are run from other threads, if those then call fireEvent - * while a method is waiting on a listener, this synchronized block wont - * be entered: deadlock! + * Cons: - eventListeners are run from other threads, if those then call + * fireEvent while a method is waiting on a listener, this synchronized + * block wont be entered: deadlock! * */ private void fireEvent(final LineEvent e) { - System.out.println(this.getClass().getName() + "fireEvent(): firing event"); synchronized (lineListeners) { for (LineListener lineListener : lineListeners) { lineListener.update(e); diff -r c3802b8ed541 -r 2331da2e5f6a src/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java Wed Aug 06 14:55:15 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java Wed Aug 06 16:30:43 2008 -0400 @@ -53,7 +53,7 @@ public class PulseAudioMixerInfo extends // the "getInstance()" method synchronized public static PulseAudioMixerInfo getInfo() { if (_instance == null) { - _instance = new PulseAudioMixerInfo("PulseAudio Mixer", "openjdk", + _instance = new PulseAudioMixerInfo("PulseAudio Mixer", "icedtea", "the ear-candy mixer", "0.01"); } diff -r c3802b8ed541 -r 2331da2e5f6a src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 06 14:55:15 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 06 16:30:43 2008 -0400 @@ -205,15 +205,12 @@ public class PulseAudioSourceDataLine im this.addStreamListener(new StreamListener() { @Override public void update(StreamEvent e) { - System.out.println(this.getClass().getName() - + " waiting to stream to become ready"); if (e.getType() == StreamEvent.Type.READY) { semaphore.release(); } } }); - System.out.println("about to open stream"); native_start(); } @@ -223,7 +220,7 @@ public class PulseAudioSourceDataLine im // throw new LineUnavailableException("unable to prepare // stream"); } - System.out.println(this.getClass().getName() + "stream is ready"); + } /* @@ -369,8 +366,6 @@ public class PulseAudioSourceDataLine im public void update(int status) { synchronized (eventLoop.threadLock) { - System.out.println(this.getClass().getCanonicalName() - + ".update() called! status = " + status); switch (status) { case 0: fireEvent(new StreamEvent(StreamEvent.Type.UNCONNECTED)); diff -r c3802b8ed541 -r 2331da2e5f6a src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Wed Aug 06 14:55:15 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Wed Aug 06 16:30:43 2008 -0400 @@ -90,10 +90,6 @@ public class PulseAudioTargetDataLine im private native void openStream(String encoding, float rate, int size, int channels, boolean bigEndian, int bufferSize); - static { - System.loadLibrary("PulseAudioSourceDataLine"); - } - @Override public int read(byte[] b, int off, int len) { readFromStream(b, off, len); diff -r c3802b8ed541 -r 2331da2e5f6a src/org_classpath_icedtea_pulseaudio_EventLoop.c --- a/src/org_classpath_icedtea_pulseaudio_EventLoop.c Wed Aug 06 14:55:15 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_EventLoop.c Wed Aug 06 16:30:43 2008 -0400 @@ -1,40 +1,39 @@ /* org_classpath_icedtea_pulseaudio_EventLoop.c - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - + Copyright (C) 2008 Red Hat, Inc. + + This file is part of IcedTea. + + IcedTea is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. + + IcedTea is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with IcedTea; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + */ #include @@ -52,13 +51,11 @@ static void context_change_callback(pa_c assert(context); assert(userdata == NULL); - printf("context state changed\n"); - //java_context_t* java_context = (java_context_t*)userdata; JNIEnv* env = java_context->env; jobject obj = java_context->obj; - printf("context state changed to %d\n", pa_context_get_state(context)); + // printf("context state changed to %d\n", pa_context_get_state(context)); /* Call the 'update' method in java * to handle all java-side events @@ -89,7 +86,7 @@ JNIEXPORT void JNICALL Java_org_classpat assert(appName != NULL); - printf("native_setup() called\n"); + // printf("native_setup() called\n"); From omajid at redhat.com Fri Aug 8 08:19:52 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 15:19:52 +0000 Subject: changeset in /hg/pulseaudio: Added support for querying the audi... Message-ID: changeset 2785b9eba70d in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=2785b9eba70d description: Added support for querying the audio formats available to pulseaudio and obtaining a line based on those formats also added test cases diffstat: 5 files changed, 323 insertions(+), 106 deletions(-) src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 39 - src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 270 ++++++++-- src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 45 + unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 3 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 72 +- diffs (truncated from 719 to 500 lines): diff -r 2331da2e5f6a -r 2785b9eba70d src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 06 16:30:43 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 08 11:11:03 2008 -0400 @@ -48,6 +48,7 @@ import javax.sound.sampled.AudioInputStr import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Control; +import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; @@ -71,8 +72,6 @@ public class PulseAudioMixer implements private List sourceLines = new ArrayList(); // private List targetLines = null; - private Line.Info sourceDataLineInfo = new Line.Info( - PulseAudioSourceDataLine.class); // private Line.Info targetDataLineInfo = new // Line.Info(PulseAudioTargetDataLine.class); @@ -99,11 +98,14 @@ public class PulseAudioMixer implements throw new LineUnavailableException(); } - if (info.matches(sourceDataLineInfo)) { - PulseAudioSourceDataLine sourceLine = null; - sourceLine = new PulseAudioSourceDataLine(eventLoop); - sourceLines.add(sourceLine); - return sourceLine; + PulseAudioSourceDataLine sourceLine = null; + sourceLine = new PulseAudioSourceDataLine(eventLoop); + Line.Info sourceDataLineInfo = sourceLine.getLineInfo(); + if (info instanceof DataLine.Info) { + if (info.matches(sourceDataLineInfo)) { + sourceLines.add(sourceLine); + return sourceLine; + } } // if (info.matches(_targetDataLineInfo)) { @@ -127,8 +129,14 @@ public class PulseAudioMixer implements @Override public javax.sound.sampled.Line.Info[] getSourceLineInfo() { - Line.Info[] info = { new Line.Info(PulseAudioSourceDataLine.class), }; - return info; + if (isOpen) { + SourceDataLine sourceLine = new PulseAudioSourceDataLine(eventLoop); + Line.Info[] info = new Line.Info[] { sourceLine.getLineInfo() }; + return info; + } + + // if not open, then return empty array + return new Line.Info[] {}; } @Override @@ -347,7 +355,7 @@ public class PulseAudioMixer implements eventLoopThread.start(); try { -// System.out.println("waiting..."); + // System.out.println("waiting..."); ready.acquire(); if (eventLoop.getStatus() != 4) { /* @@ -362,12 +370,13 @@ public class PulseAudioMixer implements throw new LineUnavailableException(); } eventLoop.removeContextListener(initListener); -// System.out.println("got signal"); + // System.out.println("got signal"); } catch (InterruptedException e) { - System.out.println("PulseAudioMixer: got interrupted while waiting for the EventLoop to initialize"); - } - -// System.out.println(this.getClass().getName() + ": ready"); + System.out + .println("PulseAudioMixer: got interrupted while waiting for the EventLoop to initialize"); + } + + // System.out.println(this.getClass().getName() + ": ready"); this.isOpen = true; diff -r 2331da2e5f6a -r 2785b9eba70d src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 06 16:30:43 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 11:11:03 2008 -0400 @@ -39,22 +39,29 @@ package org.classpath.icedtea.pulseaudio import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioSystem; import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; -import javax.sound.sampled.Line; +import javax.sound.sampled.DataLine; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; +import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; public class PulseAudioSourceDataLine implements SourceDataLine { private static final int DEFAULT_BUFFER_SIZE = 1000; + private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; + private String streamName = "Java Stream"; private List streamListeners = new ArrayList(); @@ -63,7 +70,8 @@ public class PulseAudioSourceDataLine im private boolean isOpen = false; private boolean isPaused = false; - private AudioFormat format = null; + private List supportedFormats = null; + private AudioFormat currentFormat = null; private Control[] controls; private Mute muteControl; @@ -79,9 +87,8 @@ public class PulseAudioSourceDataLine im @SuppressWarnings("unused") private long streamPointer; - private native void native_open(long contextPointer, String name, - String encoding, float rate, int size, int channels, - boolean bigEndian, int bufferSize); + private native void native_open(long contextPointer, String streamName, + String encoding, int sampleRate, int channels, int bufferSize); private native void native_write(byte[] data, int offset, int length); @@ -113,6 +120,9 @@ public class PulseAudioSourceDataLine im assert ("Loading failed".endsWith("library")); } } + + + public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; @@ -121,6 +131,189 @@ public class PulseAudioSourceDataLine im volumeControl = new StreamVolume(this); muteControl = new Mute(); controls = new Control[] { volumeControl, muteControl }; + + /* + * FIXME puselaudio supports any sample rate (it can covert between + * sample rates without a problem). it calculates the frame size and the + * frame rate based on that. + * + * Java's AudioSystem interface accepts NOT_SPECIFIED only for sample + * rate and frame rate. eg: cant say that it supports any number of + * audio channels + * + * sample size in bytes [PA_SAMPLE_U8] = 1, [PA_SAMPLE_ULAW] = 1, + * [PA_SAMPLE_ALAW] = 1, [PA_SAMPLE_S16LE] = 2, [PA_SAMPLE_S16BE] = 2, + * [PA_SAMPLE_FLOAT32LE] = 4, [PA_SAMPLE_FLOAT32BE] = 4, + * [PA_SAMPLE_S32LE] = 4, [PA_SAMPLE_S32BE] = 4, + * + * + */ + + supportedFormats = new LinkedList(); + + Map properties; + + int[] channelSizes = new int[] { 1, 2, 5 }; + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + int sampleSize = 8; // in bits + AudioFormat PA_SAMPLE_U8 = new AudioFormat( + Encoding.PCM_UNSIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size in bytes + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_U8); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_ALAW"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 8; + final AudioFormat PA_SAMPLE_ALAW = new AudioFormat(Encoding.ALAW, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_ALAW); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_ULAW"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 8; + final AudioFormat PA_SAMPLE_ULAW = new AudioFormat(Encoding.ULAW, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_ULAW); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S16BE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 16; + final AudioFormat PA_SAMPLE_S16BE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + true, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_S16BE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S16LE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 16; + final AudioFormat A_SAMPLE_S16LE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(A_SAMPLE_S16LE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S32BE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 32; + final AudioFormat PA_SAMPLE_S32BE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + true, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_S32BE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S32LE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 32; + final AudioFormat PA_SAMPLE_S32LE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_S32LE); + } + + currentFormat = null; + } public void open(AudioFormat format, int bufferSize) @@ -128,19 +321,23 @@ public class PulseAudioSourceDataLine im if (isOpen) { throw new IllegalStateException("Line is already open"); } - - isOpen = true; - - int channels = format.getChannels(); - float rate = format.getSampleRate(); - int sampleSize = format.getSampleSizeInBits(); - String encoding = format.getEncoding().toString(); - boolean bigEndian = format.isBigEndian(); - - synchronized (eventLoop.threadLock) { - native_open(eventLoop.getContextPointer(), streamName, encoding, - rate, sampleSize, channels, bigEndian, bufferSize); - } + + // ignore suggested buffer size + + for (AudioFormat myFormat : supportedFormats) { + if (format.matches(myFormat)) { + native_open(eventLoop.getContextPointer(), streamName, + (String) myFormat.getProperty(PULSEAUDIO_FORMAT_KEY), + (int) format.getSampleRate(), format.getChannels(), + bufferSize); + currentFormat = format; + isOpen = true; + return; + } + } + + throw new IllegalArgumentException("invalid format"); + } public void open(AudioFormat format) throws LineUnavailableException { @@ -149,7 +346,9 @@ public class PulseAudioSourceDataLine im } public void open() throws LineUnavailableException { - format = new AudioFormat(44100, 16, 2, true, false); + // pick a random format + AudioFormat format = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, + 2, 2, AudioSystem.NOT_SPECIFIED, false); open(format, DEFAULT_BUFFER_SIZE); } @@ -260,6 +459,8 @@ public class PulseAudioSourceDataLine im }; public void close() { + assert (isOpen); + synchronized (eventLoop.threadLock) { native_close(); } @@ -271,35 +472,35 @@ public class PulseAudioSourceDataLine im } public int getBufferSize() { + // FIXME! + return 10000; + } + + public AudioFormat getFormat() { + return currentFormat; + } + + public int getFramePosition() { // TODO Auto-generated method stub return 0; } - public AudioFormat getFormat() { - // TODO Auto-generated method stub - return null; - } - - public int getFramePosition() { + public float getLevel() { // TODO Auto-generated method stub return 0; } - public float getLevel() { + public long getLongFramePosition() { // TODO Auto-generated method stub return 0; } - public long getLongFramePosition() { + public long getMicrosecondPosition() { // TODO Auto-generated method stub return 0; } - public long getMicrosecondPosition() { - // TODO Auto-generated method stub - return 0; - } - + public boolean isActive() { // TODO Auto-generated method stub return false; @@ -312,7 +513,7 @@ public class PulseAudioSourceDataLine im public Control getControl(Type control) { for (int i = 0; i < controls.length; i++) { - if (controls[i].getType() == control){ + if (controls[i].getType() == control) { return controls[i]; } } @@ -324,7 +525,8 @@ public class PulseAudioSourceDataLine im } public javax.sound.sampled.Line.Info getLineInfo() { - return new Line.Info(SourceDataLine.class); + return new DataLine.Info(SourceDataLine.class, + supportedFormats.toArray(new AudioFormat[0]), 0, 100000); } public boolean isControlSupported(Type control) { diff -r 2331da2e5f6a -r 2785b9eba70d src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Wed Aug 06 16:30:43 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Fri Aug 08 11:11:03 2008 -0400 @@ -98,14 +98,13 @@ static void stream_state_change_callback return; } - /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine * Method: native_open - * Signature: (JLjava/lang/String;Ljava/lang/String;FIIZI)V + * Signature: (JLjava/lang/String;Ljava/lang/String;III)V */ JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1open -(JNIEnv* env, jobject obj, jlong contextPointer, jstring name, jstring encodingString, jfloat rate, jint size, jint channels, jboolean bigEndian, jint bufferSize) { +(JNIEnv* env, jobject obj, jlong contextPointer, jstring name, jstring encodingString, jint sampleRate, jint channels, jint bufferSize) { //TODO: Need to deal with the buffer size. Currently ignored @@ -121,32 +120,43 @@ JNIEXPORT void JNICALL Java_org_classpat const char *encoding = (*env)->GetStringUTFChars(env, encodingString, NULL); - if( (strcmp(encoding, "PCM_UNSIGNED") == 0) && (size == 8)) { + if (strcmp(encoding, "PA_SAMPLE_U8") == 0) { sample_spec.format = PA_SAMPLE_U8; - } else if( (strcmp(encoding, "ALAW") == 0) && (size == 8)) { + } else if (strcmp(encoding, "PA_SAMPLE_ALAW") == 0) { sample_spec.format = PA_SAMPLE_ALAW; - } else if( (strcmp(encoding, "ULAW") == 0) && (size == 8)) { + } else if (strcmp(encoding, "PA_SAMPLE_ULAW;") == 0) { sample_spec.format = PA_SAMPLE_ULAW; - } else if ( (strcmp(encoding, "PCM_SIGNED") == 0) && (size == 16) && (bigEndian == 1)) { From gbenson at redhat.com Fri Aug 8 09:09:33 2008 From: gbenson at redhat.com (Gary Benson) Date: Fri, 08 Aug 2008 16:09:33 +0000 Subject: changeset in /hg/icedtea6: 2008-08-08 Gary Benson changeset fa9a766ac398 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fa9a766ac398 description: 2008-08-08 Gary Benson * configure.ac (LLVM_CFLAGS): Fix for PRODUCT builds. diffstat: 2 files changed, 7 insertions(+), 2 deletions(-) ChangeLog | 4 ++++ configure.ac | 5 +++-- diffs (27 lines): diff -r caf1f4959def -r fa9a766ac398 ChangeLog --- a/ChangeLog Wed Aug 06 19:13:38 2008 -0400 +++ b/ChangeLog Fri Aug 08 12:09:27 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-06 Christian Thalinger + + * configure.ac (LLVM_CFLAGS): Fix for PRODUCT builds. + 2008-08-06 Christian Thalinger * patches/icedtea-cacao.patch: Moved architecture stuff into... diff -r caf1f4959def -r fa9a766ac398 configure.ac --- a/configure.ac Wed Aug 06 19:13:38 2008 -0400 +++ b/configure.ac Fri Aug 08 12:09:27 2008 -0400 @@ -413,9 +413,10 @@ AC_SUBST(LIBFFI_LIBS) if test "x${SHARK_BUILD_TRUE}" = x; then FIND_TOOL([LLVM_CONFIG], [llvm-config]) - llvm_components="engine bitwriter" + llvm_components=engine LLVM_CFLAGS=`$LLVM_CONFIG --cflags $llvm_components | \ - sed -e 's/-O.//g' | sed -e 's/-fomit-frame-pointer//g'` + sed -e 's/-O.//g' | sed -e 's/-fomit-frame-pointer//g' | \ + sed -e 's/-D_DEBUG//g'` LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags $llvm_components` LLVM_LIBS=`$LLVM_CONFIG --libs $llvm_components` fi From gbenson at redhat.com Fri Aug 8 09:13:50 2008 From: gbenson at redhat.com (Gary Benson) Date: Fri, 08 Aug 2008 16:13:50 +0000 Subject: changeset in /hg/icedtea6: 2008-08-08 Gary Benson changeset d7f54e3a7a80 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d7f54e3a7a80 description: 2008-08-08 Gary Benson * patches/icedtea-signed-types.patch: Signedness fix. diffstat: 2 files changed, 16 insertions(+) ChangeLog | 4 ++++ patches/icedtea-signed-types.patch | 12 ++++++++++++ diffs (30 lines): diff -r fa9a766ac398 -r d7f54e3a7a80 ChangeLog --- a/ChangeLog Fri Aug 08 12:09:27 2008 -0400 +++ b/ChangeLog Fri Aug 08 12:11:15 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-08 Gary Benson + + * patches/icedtea-signed-types.patch: Signedness fix. + 2008-08-08 Gary Benson * configure.ac (LLVM_CFLAGS): Fix for PRODUCT builds. diff -r fa9a766ac398 -r d7f54e3a7a80 patches/icedtea-signed-types.patch --- a/patches/icedtea-signed-types.patch Fri Aug 08 12:09:27 2008 -0400 +++ b/patches/icedtea-signed-types.patch Fri Aug 08 12:11:15 2008 -0400 @@ -22,3 +22,15 @@ diff -r 9523b5ae0184 openjdk/hotspot/src #ifdef _WINDOWS struct hostent* host = hpi::get_host_by_name((char*)ip); #else +diff -r ca98ea212429 openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp +--- openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp Fri Aug 08 16:06:52 2008 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp Fri Aug 08 16:15:45 2008 +0100 +@@ -388,7 +388,7 @@ const ciTypeFlow::StateVector* ciTypeFlo + // Set the rest of the locals to bottom. + Cell cell = state->next_cell(state->tos()); + state->set_stack_size(0); +- int limit = state->limit_cell(); ++ Cell limit = state->limit_cell(); + for (; cell < limit; cell = state->next_cell(cell)) { + state->set_type_at(cell, state->bottom_type()); + } From gbenson at redhat.com Fri Aug 8 09:13:52 2008 From: gbenson at redhat.com (Gary Benson) Date: Fri, 08 Aug 2008 16:13:52 +0000 Subject: changeset in /hg/icedtea6: 2008-08-08 Gary Benson changeset a348ff2a45d1 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a348ff2a45d1 description: 2008-08-08 Gary Benson * patches/icedtea-zero.patch: Include the calling thread's stack in crash dumps. diffstat: 2 files changed, 20 insertions(+) ChangeLog | 5 +++++ patches/icedtea-zero.patch | 15 +++++++++++++++ diffs (34 lines): diff -r d7f54e3a7a80 -r a348ff2a45d1 ChangeLog --- a/ChangeLog Fri Aug 08 12:11:15 2008 -0400 +++ b/ChangeLog Fri Aug 08 12:13:41 2008 -0400 @@ -1,3 +1,8 @@ 2008-08-08 Gary Benson + + * patches/icedtea-zero.patch: Include the calling thread's + stack in crash dumps. + 2008-08-08 Gary Benson * patches/icedtea-signed-types.patch: Signedness fix. diff -r d7f54e3a7a80 -r a348ff2a45d1 patches/icedtea-zero.patch --- a/patches/icedtea-zero.patch Fri Aug 08 12:11:15 2008 -0400 +++ b/patches/icedtea-zero.patch Fri Aug 08 12:13:41 2008 -0400 @@ -196,3 +196,18 @@ } STEP(140, "(printing VM operation)" ) +@@ -472,6 +484,14 @@ void VMError::report(outputStream* st) { + op->print_on_error(st); + st->cr(); + st->cr(); ++#ifdef ZERO ++ if (op->calling_thread()->is_Java_thread()) { ++ st->print_cr("Calling thread's Java stack:"); ++ ZeroStackPrinter(st, buf, sizeof(buf)).print( ++ (JavaThread *) op->calling_thread()); ++ st->cr(); ++ } ++#endif // ZERO + } + } + From gbenson at redhat.com Fri Aug 8 09:17:09 2008 From: gbenson at redhat.com (Gary Benson) Date: Fri, 08 Aug 2008 16:17:09 +0000 Subject: changeset in /hg/icedtea6: 2008-08-08 Gary Benson changeset df71bbb2f1ad in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=df71bbb2f1ad description: 2008-08-08 Gary Benson * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp (current_frame): Remove some rubbish. * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp (set_last_Java_frame): Likewise. diffstat: 3 files changed, 8 insertions(+), 3 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp | 3 +-- ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp | 1 - diffs (38 lines): diff -r a348ff2a45d1 -r df71bbb2f1ad ChangeLog --- a/ChangeLog Fri Aug 08 12:13:41 2008 -0400 +++ b/ChangeLog Fri Aug 08 12:17:05 2008 -0400 @@ -1,3 +1,10 @@ 2008-08-08 Gary Benson + + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp + (current_frame): Remove some rubbish. + * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp + (set_last_Java_frame): Likewise. + 2008-08-08 Gary Benson * patches/icedtea-zero.patch: Include the calling thread's diff -r a348ff2a45d1 -r df71bbb2f1ad ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp --- a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Fri Aug 08 12:13:41 2008 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Fri Aug 08 12:17:05 2008 -0400 @@ -39,8 +39,7 @@ frame os::get_sender_for_C_frame(frame* frame os::current_frame() { - frame myframe((intptr_t*) os::current_stack_pointer()); - return os::get_sender_for_C_frame(&myframe); + Unimplemented(); } char* os::non_memory_address_word() diff -r a348ff2a45d1 -r df71bbb2f1ad ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp --- a/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Fri Aug 08 12:13:41 2008 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Fri Aug 08 12:17:05 2008 -0400 @@ -79,7 +79,6 @@ void set_last_Java_frame() { JavaFrameAnchor *jfa = frame_anchor(); - jfa->set_last_Java_pc(NULL); jfa->set_last_Java_sp((intptr_t *) top_zero_frame()); } void reset_last_Java_frame() From jsumali at redhat.com Fri Aug 8 09:26:31 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Fri, 08 Aug 2008 16:26:31 +0000 Subject: changeset in /hg/icedtea6: 2008-08-08 Joshua Sumali changeset a86e963e785f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a86e963e785f description: 2008-08-08 Joshua Sumali * Makefile.am: Add ALT_JAR_CMD to ICEDTEA_ENV if --with-alt-jar is used. Added patches/icedtea-alt-jar.patch. * acinclude.m4: Define --with-alt-jar. * configure.ac: Add --with-alt-jar. * patches/icedtea-alt-jar.patch: New file. * HACKING: Updated. diffstat: 6 files changed, 49 insertions(+) ChangeLog | 9 +++++++++ HACKING | 1 + Makefile.am | 6 ++++++ acinclude.m4 | 17 +++++++++++++++++ configure.ac | 1 + patches/icedtea-alt-jar.patch | 15 +++++++++++++++ diffs (107 lines): diff -r df71bbb2f1ad -r a86e963e785f ChangeLog --- a/ChangeLog Fri Aug 08 12:17:05 2008 -0400 +++ b/ChangeLog Fri Aug 08 12:26:14 2008 -0400 @@ -1,3 +1,12 @@ 2008-08-08 Gary Benson + + * Makefile.am: Add ALT_JAR_CMD to ICEDTEA_ENV if --with-alt-jar is used. + Added patches/icedtea-alt-jar.patch. + * acinclude.m4: Define --with-alt-jar. + * configure.ac: Add --with-alt-jar. + * patches/icedtea-alt-jar.patch: New file. + * HACKING: Updated. + 2008-08-08 Gary Benson * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp diff -r df71bbb2f1ad -r a86e963e785f HACKING --- a/HACKING Fri Aug 08 12:17:05 2008 -0400 +++ b/HACKING Fri Aug 08 12:26:14 2008 -0400 @@ -64,6 +64,7 @@ The following patches are currently appl * icedtea-hotspot-citypeflow.patch: Fix hotspot miscompilation with GCC 4.3 on x86. * icedtea-alpha-fixes.patch: Fix build issues on alpha-linux. * icedtea-arch.patch: Add support for additional architectures. +* icedtea-alt-jar.patch: Add support for using an alternate jar tool in JDK building. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r df71bbb2f1ad -r a86e963e785f Makefile.am --- a/Makefile.am Fri Aug 08 12:17:05 2008 -0400 +++ b/Makefile.am Fri Aug 08 12:26:14 2008 -0400 @@ -168,6 +168,11 @@ if !ENABLE_DOCS if !ENABLE_DOCS ICEDTEA_ENV += \ "NO_DOCS=true" +endif + +if USE_ALT_JAR +ICEDTEA_ENV += \ + "ALT_JAR_CMD=$(ALT_JAR_CMD)" endif env: @@ -494,6 +499,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-hotspot-gcc-pr36917.patch \ patches/icedtea-hotspot-citypeflow.patch \ patches/icedtea-alpha-fixes.patch \ + patches/icedtea-alt-jar.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ patches/icedtea-arch.patch diff -r df71bbb2f1ad -r a86e963e785f acinclude.m4 --- a/acinclude.m4 Fri Aug 08 12:17:05 2008 -0400 +++ b/acinclude.m4 Fri Aug 08 12:26:14 2008 -0400 @@ -488,6 +488,23 @@ AC_DEFUN([WITH_NETBEANS_PROFILER_SRC_ZIP AC_SUBST(ALT_NETBEANS_PROFILER_SRC_ZIP) ]) +AC_DEFUN([WITH_ALT_JAR_BINARY], +[ + AC_MSG_CHECKING(alternate jar command) + AC_ARG_WITH([alt-jar], + [AS_HELP_STRING(--with-alt-jar, specify the location of an alternate jar binary to use for building)], + [ + ALT_JAR_CMD=${withval} + AM_CONDITIONAL(USE_ALT_JAR, test x = x) + ], + [ + ALT_JAR_CMD="not specified" + AM_CONDITIONAL(USE_ALT_JAR, test x != x) + ]) + AC_MSG_RESULT(${ALT_JAR_CMD}) + AC_SUBST(ALT_JAR_CMD) +]) + AC_DEFUN([FIND_XALAN2_JAR], [ AC_ARG_WITH([xalan2-jar], diff -r df71bbb2f1ad -r a86e963e785f configure.ac --- a/configure.ac Fri Aug 08 12:17:05 2008 -0400 +++ b/configure.ac Fri Aug 08 12:26:14 2008 -0400 @@ -220,6 +220,7 @@ WITH_VISUALVM_SRC_ZIP WITH_VISUALVM_SRC_ZIP WITH_NETBEANS_PLATFORM_SRC_ZIP WITH_NETBEANS_PROFILER_SRC_ZIP +WITH_ALT_JAR_BINARY AC_CHECK_WITH_CACAO AC_CHECK_WITH_CACAO_HOME AC_CHECK_WITH_CACAO_SRC_ZIP diff -r df71bbb2f1ad -r a86e963e785f patches/icedtea-alt-jar.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-alt-jar.patch Fri Aug 08 12:26:14 2008 -0400 @@ -0,0 +1,15 @@ +--- openjdk.orig/jdk/make/common/shared/Defs-java.gmk 2008-05-30 03:50:36.000000000 -0400 ++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2008-08-06 11:18:26.000000000 -0400 +@@ -187,7 +181,11 @@ + + BOOT_JAVA_CMD = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS) + BOOT_JAVAC_CMD = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS) +-BOOT_JAR_CMD = $(BOOTDIR)/bin/jar ++ifdef ALT_JAR_CMD ++ BOOT_JAR_CMD = $(ALT_JAR_CMD) ++else ++ BOOT_JAR_CMD = $(BOOTDIR)/bin/jar ++endif + BOOT_JARSIGNER_CMD = $(BOOTDIR)/bin/jarsigner + + # Various tools we need to run (FIXUP: Are these the right ones?) From jsumali at redhat.com Fri Aug 8 09:35:08 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Fri, 08 Aug 2008 12:35:08 -0400 Subject: --with-alt-jar support Message-ID: <489C75BC.6040009@redhat.com> Hi, When building the JDK, a bit of time is spent building rt.jar, and I think this may be really evident on the non x86/x86_64 archs. So ... I've recently added a new option to ./configure: --with-alt-jar=. This uses the specified jar command instead of using the bootstrap jar via the jvm. I've tested this out with fastjar (a modified, more openjdk-compatible fastjar -- I still have to post the patch...) and here are the results: x86_64 regular build: 15m 53s x86_64 --with-alt-jar=/usr/loca/bin/fastjar: 12m 51s x86 regular build: 47m 58s x86 --with-alt-jar=/usr/loca/bin/fastjar: 41m 21s I'm kinda curious to see how much faster builds go on the other platforms :) Cheers, Josh From iivan at town.yyz.redhat.com Fri Aug 8 11:39:58 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Fri, 08 Aug 2008 18:39:58 +0000 Subject: changeset in /hg/pulseaudio: addeed mute and volume control for ... Message-ID: changeset f27fbf96d5aa in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=f27fbf96d5aa description: addeed mute and volume control for SourceDataLine diffstat: 11 files changed, 243 insertions(+), 351 deletions(-) makefile | 13 src/org/classpath/icedtea/pulseaudio/EventLoop.java | 11 src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 22 + src/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java | 50 +++ src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 144 +++++----- src/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java | 68 ++++ src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 11 src/org/classpath/icedtea/pulseaudio/StreamVolume.java | 115 ------- src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 66 ---- src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.c | 39 -- src/org_classpath_icedtea_pulseaudio_PulseStreamAudioVolumeControl.c | 55 --- diffs (truncated from 793 to 500 lines): diff -r 2785b9eba70d -r f27fbf96d5aa makefile --- a/makefile Fri Aug 08 11:11:03 2008 -0400 +++ b/makefile Fri Aug 08 14:40:11 2008 -0400 @@ -14,7 +14,7 @@ LDFLAGS=-g -Wall -Werror # Standard targets -all: lib/libpulse-java.so +all: lib lib/libpulse-java.so clean: @@ -34,9 +34,8 @@ lib/libpulse-java.so: \ lib/libpulse-java.so: \ bin/org_classpath_icedtea_pulseaudio_EventLoop.o \ bin/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.o \ - bin/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.o \ - bin/org_classpath_icedtea_pulseaudio_StreamVolume.o \ - bin/jni-common.o + bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o \ + bin/jni-common.o # bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o \ # bin/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.o \ gcc -g -shared -o $@ $^ /usr/lib/libpulse.so @@ -50,9 +49,6 @@ bin/org_classpath_icedtea_pulseaudio_Pul gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.o: src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.h bin - gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< - -bin/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.o: src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.c src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.h gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o: src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h @@ -75,9 +71,6 @@ src/org_classpath_icedtea_pulseaudio_Pul src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.h: src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.class javah -d src -classpath src org.classpath.icedtea.pulseaudio.PulseAudioTargetDataLine -src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeControl.h: src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.class - javah -d src -classpath src org.classpath.icedtea.pulseaudio.PulseAudioVolumeControl - src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h: src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.class javah -d src -classpath src org.classpath.icedtea.pulseaudio.PulseAudioStreamVolumeControl diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 08 11:11:03 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 08 14:40:11 2008 -0400 @@ -103,16 +103,17 @@ public class EventLoop implements Runnab */ static { - try { - String library = new java.io.File(".").getCanonicalPath() + //try { + /*String library = new java.io.File(".").getCanonicalPath() + java.io.File.separatorChar + "lib" + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); + + System.mapLibraryName("pulse-java");*/ + String library = "/home/yyz/iivan/workspace/pulseaudio/lib/libpulse-java.so"; System.out.println(library); System.load(library); - } catch (IOException e) { + /*} catch (IOException e) { assert ("Loading failed".endsWith("library")); - } + }*/ } private EventLoop() { diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 08 11:11:03 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 08 14:40:11 2008 -0400 @@ -47,7 +47,9 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; +import javax.sound.sampled.FloatControl; import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; @@ -101,12 +103,14 @@ public class PulseAudioMixer implements PulseAudioSourceDataLine sourceLine = null; sourceLine = new PulseAudioSourceDataLine(eventLoop); Line.Info sourceDataLineInfo = sourceLine.getLineInfo(); - if (info instanceof DataLine.Info) { + /*if (info instanceof DataLine.Info) { if (info.matches(sourceDataLineInfo)) { sourceLines.add(sourceLine); return sourceLine; } - } + }*/ + + return sourceLine; // if (info.matches(_targetDataLineInfo)) { // PulseAudioTargetDataLine targetLine = new PulseAudioTargetDataLine(); @@ -114,7 +118,7 @@ public class PulseAudioMixer implements // return targetLine; // } - throw new IllegalArgumentException(); + //throw new IllegalArgumentException(); } @Override @@ -426,13 +430,21 @@ public class PulseAudioMixer implements System.out.println("got a line"); - File soundFile = new File("new.wav"); + //File soundFile = new File(new java.io.File(".").getCanonicalPath() + "/testsounds/logout.wav"); + File soundFile = new File( "/home/iivan/workspace/pulseaudio/testsounds/logout.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); AudioFormat audioFormat = audioInputStream.getFormat(); line.open(audioFormat); line.start(); - + PulseAudioStreamVolumeControl control = (PulseAudioStreamVolumeControl) line.getControl(FloatControl.Type.VOLUME); + PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line.getControl(BooleanControl.Type.MUTE); + mute.setValue(true); + control.setValue(40000); + mute.setValue(false); + System.out.println("Volume set to " + control.getValue()); + + byte[] abData = new byte[1000]; int bytesRead = 0; diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java Fri Aug 08 14:40:11 2008 -0400 @@ -0,0 +1,50 @@ +/* PulseAudioMuteControl.java + Copyright (C) 2008 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.classpath.icedtea.pulseaudio; + +import javax.sound.sampled.BooleanControl; + +abstract class PulseAudioMuteControl extends BooleanControl { + + protected PulseAudioMuteControl() { + super(BooleanControl.Type.MUTE, false, "Volume muted", "Volume on"); + } + + +} + diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 11:11:03 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 14:40:11 2008 -0400 @@ -73,11 +73,13 @@ public class PulseAudioSourceDataLine im private List supportedFormats = null; private AudioFormat currentFormat = null; - private Control[] controls; - private Mute muteControl; - private StreamVolume volumeControl; - private List listeners; + + private Control[] controls = new Control[2]; + private PulseAudioStreamMuteControl muteControl; + private PulseAudioStreamVolumeControl volumeControl; + private boolean muted; + private float volume; /* * When moving from 32bit platform to 64 bit platform, these variables @@ -119,18 +121,21 @@ public class PulseAudioSourceDataLine im } catch (IOException e) { assert ("Loading failed".endsWith("library")); } - } - - - + + } + + + + + + public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; this.listeners = new ArrayList(); - - volumeControl = new StreamVolume(this); - muteControl = new Mute(); - controls = new Control[] { volumeControl, muteControl }; + this.volume = 65536; + + /* * FIXME puselaudio supports any sample rate (it can covert between @@ -314,8 +319,26 @@ public class PulseAudioSourceDataLine im currentFormat = null; - } - + + } + + protected boolean isMuted() { + return muted; + } + + protected void setMuted(boolean value) { + muted = value; + } + + protected float getVolume() { + return this.volume; + } + + protected void setVolume(float value) { + this.volume = value; + + } + public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { if (isOpen) { @@ -332,11 +355,42 @@ public class PulseAudioSourceDataLine im bufferSize); currentFormat = format; isOpen = true; - return; - } - } - - throw new IllegalArgumentException("invalid format"); + } + } + + //throw new IllegalArgumentException("invalid format"); + + final Semaphore semaphore = new Semaphore(0); + + synchronized (eventLoop.threadLock) { + + this.addStreamListener(new StreamListener() { + @Override + public void update(StreamEvent e) { + System.out.println(this.getClass().getName() + + " waiting to stream to become ready"); + if (e.getType() == StreamEvent.Type.READY) { + semaphore.release(); + } + } + }); + + System.out.println("about to open stream"); + native_start(); + } + + try { + semaphore.acquire(); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); + } + System.out.println(this.getClass().getName() + "stream is ready"); + + volumeControl = new PulseAudioStreamVolumeControl(this); + controls[0] = volumeControl; + muteControl = new PulseAudioStreamMuteControl(this); + controls[1] = muteControl; } @@ -392,40 +446,16 @@ public class PulseAudioSourceDataLine im } public void start() { - if (isPaused) { - native_resume(); - isPaused = false; - return; - } else { - final Semaphore semaphore = new Semaphore(0); - - synchronized (eventLoop.threadLock) { - - this.addStreamListener(new StreamListener() { - @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.READY) { - semaphore.release(); - } - } - }); - - native_start(); - } - - try { - semaphore.acquire(); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - - } + if (isPaused) { + native_resume(); + isPaused = false; + } /* * for(LineListener l :listeners) { l.update(new LineEvent(this, * LineEvent.Type.START, 0)); } */ + } public void stop() { @@ -513,7 +543,8 @@ public class PulseAudioSourceDataLine im public Control getControl(Type control) { for (int i = 0; i < controls.length; i++) { - if (controls[i].getType() == control) { + if (controls[i].getType() == control){ + return controls[i]; } } @@ -595,15 +626,12 @@ public class PulseAudioSourceDataLine im streamListener.update(e); } } - - private class Mute extends BooleanControl { - - protected Mute() { - super(BooleanControl.Type.MUTE, false, "TRUE", "FALSE"); - - } - - } + + protected EventLoop getEventLoop() { + return this.eventLoop; + } + + public long getStreamPointer() { return streamPointer; diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java Fri Aug 08 14:40:11 2008 -0400 @@ -0,0 +1,68 @@ +/* PulseAudioStreamMuteControl.java + Copyright (C) 2008 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.classpath.icedtea.pulseaudio; + +import javax.sound.sampled.FloatControl; + +public class PulseAudioStreamMuteControl extends PulseAudioMuteControl { + + private PulseAudioStreamVolumeControl volumeControl; + private PulseAudioSourceDataLine line; + + + public PulseAudioStreamMuteControl(PulseAudioSourceDataLine line) { + this.volumeControl = (PulseAudioStreamVolumeControl) line.getControl(FloatControl.Type.VOLUME); + this.line = line; + } + + public synchronized void setValue(boolean value){ + if (value == true) { + line.setMuted(true); + volumeControl.setStreamVolume(0); + } else { + line.setMuted(false); + float newValue = volumeControl.getValue(); + volumeControl.setStreamVolume(newValue); + } + } + + public synchronized boolean getValue() { + return line.isMuted(); + } + +} diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Fri Aug 08 11:11:03 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Fri Aug 08 14:40:11 2008 -0400 @@ -37,15 +37,14 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; + import javax.sound.sampled.FloatControl; -public class PulseAudioVolumeControl extends FloatControl { +abstract class PulseAudioVolumeControl extends FloatControl { - protected PulseAudioVolumeControl(Type type, float minimum, float maximum, - float precision, int updatePeriod, float initialValue, String units) { - super(type, minimum, maximum, precision, updatePeriod, initialValue, - units); - + protected PulseAudioVolumeControl(PulseAudioSourceDataLine line) { + super(FloatControl.Type.VOLUME, 0, 65536, 1, -1, line.getVolume(), "pulseaudio units", "Volume Off", "Default Volume", "Full Volume"); } + } diff -r 2785b9eba70d -r f27fbf96d5aa src/org/classpath/icedtea/pulseaudio/StreamVolume.java --- a/src/org/classpath/icedtea/pulseaudio/StreamVolume.java Fri Aug 08 11:11:03 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* PulseAudioStreamVolumeControl.java - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by From iivan at town.yyz.redhat.com Fri Aug 8 11:54:02 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Fri, 08 Aug 2008 18:54:02 +0000 Subject: changeset in /hg/pulseaudio: added PulseAudioStreamVolumeControl... Message-ID: changeset bdc766c0c2ae in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=bdc766c0c2ae description: added PulseAudioStreamVolumeControl.java diffstat: 2 files changed, 66 insertions(+), 57 deletions(-) src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 66 ++++++++++ src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeMuteControl.c | 57 -------- diffs (131 lines): diff -r f27fbf96d5aa -r bdc766c0c2ae src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Fri Aug 08 14:54:18 2008 -0400 @@ -0,0 +1,66 @@ +package org.classpath.icedtea.pulseaudio; + +import java.io.IOException; + +import org.classpath.icedtea.pulseaudio.EventLoop; +import org.classpath.icedtea.pulseaudio.PulseAudioVolumeControl; + +public class PulseAudioStreamVolumeControl extends PulseAudioVolumeControl { + private long streamPointer; + private EventLoop eventLoop; + private PulseAudioSourceDataLine line; + + + static { + try { + String library = new java.io.File(".").getCanonicalPath() + + java.io.File.separatorChar + "lib" + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(library); + System.load(library); + } catch (IOException e) { + assert ("Loading failed".endsWith("library")); + } + } + + protected PulseAudioStreamVolumeControl(PulseAudioSourceDataLine line) { + super(line); + this.streamPointer = line.getStreamPointer(); + this.eventLoop = line.getEventLoop(); + this.line = line; + } + + public synchronized void setValue(float newValue) { + if(!line.isMuted()) { + setStreamVolume(newValue); + } + + line.setVolume(newValue); + } + + protected synchronized void setStreamVolume(float newValue) { + int operationPointer; + int operationState; + synchronized(eventLoop.threadLock) { + operationPointer = native_setValue(newValue); + operationState = native_getOperationState(operationPointer); + } + while(operationState != 1) { + synchronized (eventLoop.threadLock) { + operationState = native_getOperationState(operationPointer); + } + } + + } + + public synchronized float getValue() { + return line.getVolume(); + } + + + private native int native_getOperationState(int operationState); + public native int native_setValue(float newValue); +} + + diff -r f27fbf96d5aa -r bdc766c0c2ae src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeMuteControl.c --- a/src/org_classpath_icedtea_pulseaudio_PulseAudioVolumeMuteControl.c Fri Aug 08 14:40:11 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* PulseAudioStreamVolumeControl.java - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - - -#include "jni-common.h" - -static void sink_input_change_volume(pa_context* context, - const pa_sink_input_info* input_info, int eol, void* userdata) { - assert(context); - if (eol) { - return; - } - assert(i); - userdata = i->volume; -} - -JNIEXPORT jint JNICALL Java_org_openjdk_sound_PulseAudioStreamVolumeControl_getValue(JNIEnv env*, jobject obj) { - pa_stream *stream = getJavaLongField(env, obj, "streamPointer"); - int stream_id pa_stream_get_index(stream); - pa_cvolume *volume; - pa_context_get_sink_input_info((pa_context*) contextPointer ,stream_id,sink_input_change_volume, volume); - printf("%d\n", volume->values[0]); -} From omajid at redhat.com Fri Aug 8 13:24:44 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 20:24:44 +0000 Subject: changeset in /hg/pulseaudio: fixed problem in acquiring a Source... Message-ID: changeset 61cf6f811619 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=61cf6f811619 description: fixed problem in acquiring a SourceDataLine given only a Line.Info (instead of a DataLine.Info) some minor cleanup diffstat: 4 files changed, 164 insertions(+), 106 deletions(-) src/org/classpath/icedtea/pulseaudio/EventLoop.java | 33 +-- src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 107 +++++----- src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 64 ++--- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 66 +++++- diffs (truncated from 577 to 500 lines): diff -r bdc766c0c2ae -r 61cf6f811619 src/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 08 14:54:18 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 08 16:24:38 2008 -0400 @@ -63,12 +63,11 @@ public class EventLoop implements Runnab private static EventLoop instance = null; private List contextListeners; - // private List lines; + private String name; private String serverString; private int status; - // private boolean eventLoopIsRunning = false; public Semaphore finished = new Semaphore(0); @@ -76,7 +75,7 @@ public class EventLoop implements Runnab * JNI stuff * * Do not synchronize the individual functions, synchronize - * block/method/lines around the call + * block/method/lines around the call using threadLock * */ @@ -90,7 +89,6 @@ public class EventLoop implements Runnab /* * These fields hold pointers - * * */ @SuppressWarnings("unused") @@ -103,17 +101,16 @@ public class EventLoop implements Runnab */ static { - //try { - /*String library = new java.io.File(".").getCanonicalPath() + try { + String library = new java.io.File(".").getCanonicalPath() + java.io.File.separatorChar + "lib" + java.io.File.separatorChar - + System.mapLibraryName("pulse-java");*/ - String library = "/home/yyz/iivan/workspace/pulseaudio/lib/libpulse-java.so"; - System.out.println(library); + + System.mapLibraryName("pulse-java"); + // System.out.println(library); System.load(library); - /*} catch (IOException e) { + } catch (IOException e) { assert ("Loading failed".endsWith("library")); - }*/ + } } private EventLoop() { @@ -156,12 +153,12 @@ public class EventLoop implements Runnab native_shutdown(); // System.out.println(this.getClass().getName() // + ": shutting down"); - + // clean up the listeners synchronized (contextListeners) { contextListeners.clear(); } - + return; } @@ -218,11 +215,11 @@ public class EventLoop implements Runnab } private void fireEvent(final ContextEvent e) { -// System.out.println(this.getClass().getName() + "firing event: " -// + e.getType().toString()); - - synchronized (contextListeners) { -// System.out.println(contextListeners.size()); + // System.out.println(this.getClass().getName() + "firing event: " + // + e.getType().toString()); + + synchronized (contextListeners) { + // System.out.println(contextListeners.size()); for (ContextListener listener : contextListeners) { listener.update(e); } diff -r bdc766c0c2ae -r 61cf6f811619 src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 08 14:54:18 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 08 16:24:38 2008 -0400 @@ -50,7 +50,6 @@ import javax.sound.sampled.BooleanContro import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; import javax.sound.sampled.FloatControl; -import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; @@ -74,9 +73,6 @@ public class PulseAudioMixer implements private List sourceLines = new ArrayList(); // private List targetLines = null; - // private Line.Info targetDataLineInfo = new - // Line.Info(PulseAudioTargetDataLine.class); - List lineListeners = null; private PulseAudioMixer() { @@ -103,22 +99,24 @@ public class PulseAudioMixer implements PulseAudioSourceDataLine sourceLine = null; sourceLine = new PulseAudioSourceDataLine(eventLoop); Line.Info sourceDataLineInfo = sourceLine.getLineInfo(); - /*if (info instanceof DataLine.Info) { - if (info.matches(sourceDataLineInfo)) { - sourceLines.add(sourceLine); - return sourceLine; - } - }*/ - - return sourceLine; - - // if (info.matches(_targetDataLineInfo)) { - // PulseAudioTargetDataLine targetLine = new PulseAudioTargetDataLine(); - // _targetLines.add(targetLine); + + // TODO need to add special case code for + // DataLine.Info case + if (info.matches(sourceDataLineInfo)) { + sourceLines.add(sourceLine); + return sourceLine; + } + + // PulseAudioTargetDataLine targetLine = new + // PulseAudioTargetDataLine(eventLoop); + // Line.Info targetDataLineInfo = targetLine.getLineInfo(); + + // if (info.matches(targetDataLineInfo)) { + // targetLines.add(targetLine); // return targetLine; // } - //throw new IllegalArgumentException(); + throw new IllegalArgumentException(); } @Override @@ -146,28 +144,31 @@ public class PulseAudioMixer implements @Override public javax.sound.sampled.Line.Info[] getSourceLineInfo( javax.sound.sampled.Line.Info info) { - Line.Info sourceInfo = new Line.Info(PulseAudioSourceDataLine.class); + SourceDataLine sourceLine = new PulseAudioSourceDataLine(eventLoop); + Line.Info sourceInfo = sourceLine.getLineInfo(); + if (info.matches(sourceInfo)) { Line.Info[] sourceInfos = { sourceInfo, }; return sourceInfos; - } else { - Line.Info[] sourceInfos = {}; - return sourceInfos; - - } + } + + return new Line.Info[] {}; + } @Override public Line[] getSourceLines() { - // return (Line[]) _sourceLines.toArray(); - return null; - + return (Line[]) sourceLines.toArray(); } @Override public javax.sound.sampled.Line.Info[] getTargetLineInfo() { - Line.Info[] info = { new Line.Info(PulseAudioTargetDataLine.class), }; - return info; + if (isOpen) { + PulseAudioTargetDataLine targetDataLine = new PulseAudioTargetDataLine(); + return new Line.Info[] { targetDataLine.getLineInfo() }; + } + // if not open, return an empty array + return new Line.Info[] {}; } @Override @@ -177,10 +178,10 @@ public class PulseAudioMixer implements if (info.matches(sourceInfo)) { Line.Info[] sourceInfos = { sourceInfo, }; return sourceInfos; - } else { - Line.Info[] sourceInfos = {}; - return sourceInfos; - } + } + + return new Line.Info[] {}; + } @Override @@ -191,9 +192,15 @@ public class PulseAudioMixer implements @Override public boolean isLineSupported(javax.sound.sampled.Line.Info info) { - // if ( _sourceDataLineInfo.matches(info)) { - // return true; - // } + if (isOpen) { + PulseAudioSourceDataLine sourceLine = new PulseAudioSourceDataLine( + eventLoop); + Line.Info sourceLineInfo = sourceLine.getLineInfo(); + + if (info.matches(sourceLineInfo)) { + return true; + } + } return false; } @@ -242,10 +249,9 @@ public class PulseAudioMixer implements fireEvent(new LineEvent(this, LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED)); - /* - * FIXME need to clean up the listeners on close without a race - * condition - */ + synchronized (lineListeners) { + lineListeners.clear(); + } } @@ -294,7 +300,8 @@ public class PulseAudioMixer implements try { openRemote(appName, null); } catch (UnknownHostException e) { - // not possible + assert ("opening a local connection cant result in unknownhost" + .length() == 0); } } @@ -393,7 +400,9 @@ public class PulseAudioMixer implements /* * Should this method be synchronized? I had a few reasons, but i forgot - * them Pros: - Thread safety? + * them :( + * + * Pros: - Thread safety? * * Cons: - eventListeners are run from other threads, if those then call * fireEvent while a method is waiting on a listener, this synchronized @@ -430,21 +439,25 @@ public class PulseAudioMixer implements System.out.println("got a line"); - //File soundFile = new File(new java.io.File(".").getCanonicalPath() + "/testsounds/logout.wav"); - File soundFile = new File( "/home/iivan/workspace/pulseaudio/testsounds/logout.wav"); + // File soundFile = new File(new java.io.File(".").getCanonicalPath() + // + "/testsounds/logout.wav"); + File soundFile = new File( + "/home/iivan/workspace/pulseaudio/testsounds/logout.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); AudioFormat audioFormat = audioInputStream.getFormat(); + System.out.println(); line.open(audioFormat); line.start(); - PulseAudioStreamVolumeControl control = (PulseAudioStreamVolumeControl) line.getControl(FloatControl.Type.VOLUME); - PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line.getControl(BooleanControl.Type.MUTE); + PulseAudioStreamVolumeControl control = (PulseAudioStreamVolumeControl) line + .getControl(FloatControl.Type.VOLUME); + PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line + .getControl(BooleanControl.Type.MUTE); mute.setValue(true); control.setValue(40000); mute.setValue(false); System.out.println("Volume set to " + control.getValue()); - - + byte[] abData = new byte[1000]; int bytesRead = 0; diff -r bdc766c0c2ae -r 61cf6f811619 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 14:54:18 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 16:24:38 2008 -0400 @@ -47,7 +47,6 @@ import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineEvent; @@ -74,7 +73,7 @@ public class PulseAudioSourceDataLine im private AudioFormat currentFormat = null; private List listeners; - + private Control[] controls = new Control[2]; private PulseAudioStreamMuteControl muteControl; private PulseAudioStreamVolumeControl volumeControl; @@ -124,18 +123,10 @@ public class PulseAudioSourceDataLine im } - - - - - - public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; this.listeners = new ArrayList(); this.volume = 65536; - - /* * FIXME puselaudio supports any sample rate (it can covert between @@ -153,9 +144,9 @@ public class PulseAudioSourceDataLine im * * */ - + supportedFormats = new LinkedList(); - + Map properties; int[] channelSizes = new int[] { 1, 2, 5 }; @@ -168,8 +159,7 @@ public class PulseAudioSourceDataLine im // as soon as they change something // FIXME ^ int sampleSize = 8; // in bits - AudioFormat PA_SAMPLE_U8 = new AudioFormat( - Encoding.PCM_UNSIGNED, // encoding + AudioFormat PA_SAMPLE_U8 = new AudioFormat(Encoding.PCM_UNSIGNED, // encoding AudioSystem.NOT_SPECIFIED, // sample rate sampleSize, // sample size channelSize, // channels @@ -319,32 +309,31 @@ public class PulseAudioSourceDataLine im currentFormat = null; - } protected boolean isMuted() { return muted; } - + protected void setMuted(boolean value) { muted = value; } - + protected float getVolume() { return this.volume; } - + protected void setVolume(float value) { this.volume = value; - - } - + + } + public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { if (isOpen) { throw new IllegalStateException("Line is already open"); } - + // ignore suggested buffer size for (AudioFormat myFormat : supportedFormats) { @@ -358,7 +347,9 @@ public class PulseAudioSourceDataLine im } } - //throw new IllegalArgumentException("invalid format"); + if (!isOpen) { + throw new IllegalArgumentException("Unsupported format"); + } final Semaphore semaphore = new Semaphore(0); @@ -382,11 +373,9 @@ public class PulseAudioSourceDataLine im try { semaphore.acquire(); } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - System.out.println(this.getClass().getName() + "stream is ready"); - + throw new LineUnavailableException("unable to prepare stream"); + } + volumeControl = new PulseAudioStreamVolumeControl(this); controls[0] = volumeControl; muteControl = new PulseAudioStreamMuteControl(this); @@ -446,16 +435,16 @@ public class PulseAudioSourceDataLine im } public void start() { - if (isPaused) { - native_resume(); - isPaused = false; - } + if (isPaused) { + native_resume(); + isPaused = false; + } /* * for(LineListener l :listeners) { l.update(new LineEvent(this, * LineEvent.Type.START, 0)); } */ - + } public void stop() { @@ -530,7 +519,6 @@ public class PulseAudioSourceDataLine im return 0; } - public boolean isActive() { // TODO Auto-generated method stub return false; @@ -543,7 +531,7 @@ public class PulseAudioSourceDataLine im public Control getControl(Type control) { for (int i = 0; i < controls.length; i++) { - if (controls[i].getType() == control){ + if (controls[i].getType() == control) { return controls[i]; } @@ -556,7 +544,7 @@ public class PulseAudioSourceDataLine im } public javax.sound.sampled.Line.Info getLineInfo() { - return new DataLine.Info(SourceDataLine.class, + return new DataLine.Info(PulseAudioSourceDataLine.class, supportedFormats.toArray(new AudioFormat[0]), 0, 100000); } @@ -626,12 +614,10 @@ public class PulseAudioSourceDataLine im streamListener.update(e); } } - + protected EventLoop getEventLoop() { return this.eventLoop; } - - public long getStreamPointer() { return streamPointer; diff -r bdc766c0c2ae -r 61cf6f811619 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Fri Aug 08 14:54:18 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Fri Aug 08 16:24:38 2008 -0400 @@ -43,7 +43,10 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.BooleanControl; import javax.sound.sampled.DataLine; +import javax.sound.sampled.FloatControl; +import javax.sound.sampled.Line; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; @@ -77,12 +80,11 @@ public class PulseSourceDataLineTest { AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); AudioFormat audioFormat = audioInputStream.getFormat(); From omajid at redhat.com Fri Aug 8 14:28:35 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 08 Aug 2008 21:28:35 +0000 Subject: changeset in /hg/pulseaudio: Added a Operation object to wrap pa... Message-ID: changeset 5c09d21c2d70 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=5c09d21c2d70 description: Added a Operation object to wrap pa_operation_*. Using it to free memory whenever async Operations are performed. Also added a new method to convert a pointer to a java long diffstat: 8 files changed, 160 insertions(+), 53 deletions(-) makefile | 8 - src/jni-common.c | 17 ++- src/jni-common.h | 4 src/org/classpath/icedtea/pulseaudio/Operation.java | 56 ++++++++++ src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 44 ++++--- src/org_classpath_icedtea_pulseaudio_EventLoop.c | 2 src/org_classpath_icedtea_pulseaudio_Operation.c | 43 +++++++ src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 39 ++---- diffs (351 lines): diff -r 61cf6f811619 -r 5c09d21c2d70 makefile --- a/makefile Fri Aug 08 16:24:38 2008 -0400 +++ b/makefile Fri Aug 08 17:28:30 2008 -0400 @@ -35,8 +35,8 @@ lib/libpulse-java.so: \ bin/org_classpath_icedtea_pulseaudio_EventLoop.o \ bin/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.o \ bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o \ + bin/org_classpath_icedtea_pulseaudio_Operation.o \ bin/jni-common.o -# bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o \ # bin/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.o \ gcc -g -shared -o $@ $^ /usr/lib/libpulse.so @@ -54,7 +54,7 @@ bin/org_classpath_icedtea_pulseaudio_Pul bin/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.o: src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< -bin/org_classpath_icedtea_pulseaudio_StreamVolume.o: src/org_classpath_icedtea_pulseaudio_StreamVolume.c src/org_classpath_icedtea_pulseaudio_StreamVolume.h +bin/org_classpath_icedtea_pulseaudio_Operation.o: src/org_classpath_icedtea_pulseaudio_Operation.c src/org_classpath_icedtea_pulseaudio_Operation.h gcc $(CFLAGS) $(PLATFORM_FLAGS) -c -o $@ $< bin/jni-common.o: src/jni-common.c src/jni-common.h @@ -74,8 +74,8 @@ src/org_classpath_icedtea_pulseaudio_Pul src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h: src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.class javah -d src -classpath src org.classpath.icedtea.pulseaudio.PulseAudioStreamVolumeControl -src/org_classpath_icedtea_pulseaudio_StreamVolume.h: src/org/classpath/icedtea/pulseaudio/StreamVolume.class - javah -d src -classpath src org.classpath.icedtea.pulseaudio.StreamVolume +src/org_classpath_icedtea_pulseaudio_Operation.h: src/org/classpath/icedtea/pulseaudio/Operation.class + javah -d src -classpath src org.classpath.icedtea.pulseaudio.Operation # Compile Java # Actually, this is not the best thing to do; javac might do some crazy things diff -r 61cf6f811619 -r 5c09d21c2d70 src/jni-common.c --- a/src/jni-common.c Fri Aug 08 16:24:38 2008 -0400 +++ b/src/jni-common.c Fri Aug 08 17:28:30 2008 -0400 @@ -85,6 +85,16 @@ void setJavaLongField(JNIEnv* env, jobje (*env)->SetLongField(env, obj, fid, value); } + +/* + * + * + * The functions below are going to cause headaches when porting + * + * + */ + + void* getJavaPointer(JNIEnv* env, jobject obj, char* name) { /* @@ -155,10 +165,15 @@ void setJavaPointer(JNIEnv* env, jobject } -void* convertFromJavaPointer(jlong pointer) { +void* convertJavaLongToPointer(jlong pointer) { /* this truncates the jlong */ jPointer p = pointer; return (void*) p; } + +jlong convertPointerToJavaLong(void* pointer) { + return (long) pointer; + +} diff -r 61cf6f811619 -r 5c09d21c2d70 src/jni-common.h --- a/src/jni-common.h Fri Aug 08 16:24:38 2008 -0400 +++ b/src/jni-common.h Fri Aug 08 17:28:30 2008 -0400 @@ -72,8 +72,8 @@ void* getJavaPointer(JNIEnv* env, jobjec void* getJavaPointer(JNIEnv* env, jobject obj, char* name); void setJavaPointer(JNIEnv* env, jobject obj, char*name, void* pointer_value); -void* convertFromJavaPointer(jlong pointer); - +void* convertJavaLongToPointer(jlong pointer); +jlong convertPointerToJavaLong(void* pointer); #endif diff -r 61cf6f811619 -r 5c09d21c2d70 src/org/classpath/icedtea/pulseaudio/Operation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/classpath/icedtea/pulseaudio/Operation.java Fri Aug 08 17:28:30 2008 -0400 @@ -0,0 +1,56 @@ +package org.classpath.icedtea.pulseaudio; + +/* + * Encapsulates a pa_operation object + * + * + * This is really needed only so that we can deallocate the reference counted object + * + * + */ + +public class Operation { + + long operationPointer; + + public enum State { + Running, Done, Cancelled, + } + + private native void native_ref(); + + private native void native_unref(); + + private native int native_get_state(); + + public Operation(long operationPointer) { + this.operationPointer = operationPointer; + } + + public void addReference() { + assert(operationPointer != 0); + native_ref(); + } + + public void releaseReference() { + assert(operationPointer!= 0); + native_unref(); + } + + public State getState() { + assert(operationPointer!= 0); + int state = native_get_state(); + switch (state) { + case 0: + return State.Running; + case 1: + return State.Done; + case 2: + return State.Cancelled; + default: + throw new IllegalStateException("Invalid operation State"); + } + + } + +} diff -r 61cf6f811619 -r 5c09d21c2d70 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 16:24:38 2008 -0400 +++ b/src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 08 17:28:30 2008 -0400 @@ -95,9 +95,7 @@ public class PulseAudioSourceDataLine im private native int native_get_writable_size(); - private native int native_getOperationState(int operationState); - - private native int native_flush(); + private native long native_flush(); private native void native_start(); @@ -105,7 +103,7 @@ public class PulseAudioSourceDataLine im private native void native_resume(); - private native int native_drain(); + private native long native_drain(); private native void native_close(); @@ -555,33 +553,39 @@ public class PulseAudioSourceDataLine im @Override public void drain() { - int operationPointer; - int operationState; - synchronized (eventLoop.threadLock) { - operationPointer = native_drain(); - operationState = native_getOperationState(operationPointer); - } - while (operationState != 1) { + Operation operation; + Operation.State operationState; + synchronized (eventLoop.threadLock) { + operation = new Operation(native_drain()); + operationState = operation.getState(); + } + + // FIXME need to find a way to do a wait than a busy loop + while (operationState != Operation.State.Done) { synchronized (eventLoop.threadLock) { - operationState = native_getOperationState(operationPointer); + operationState = operation.getState(); } } + operation.releaseReference(); } @Override public void flush() { - int operationPointer; - int operationState; - synchronized (eventLoop.threadLock) { - operationPointer = native_flush(); - operationState = native_getOperationState(operationPointer); - } - while (operationState != 1) { + Operation operation; + Operation.State operationState; + synchronized (eventLoop.threadLock) { + operation = new Operation(native_flush()); + operationState = operation.getState(); + } + // FIXME need to find a way to do a wait than a busy loop + while (operationState != Operation.State.Done) { synchronized (eventLoop.threadLock) { - operationState = native_getOperationState(operationPointer); + operationState = operation.getState(); } } + + operation.releaseReference(); } diff -r 61cf6f811619 -r 5c09d21c2d70 src/org_classpath_icedtea_pulseaudio_EventLoop.c --- a/src/org_classpath_icedtea_pulseaudio_EventLoop.c Fri Aug 08 16:24:38 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_EventLoop.c Fri Aug 08 17:28:30 2008 -0400 @@ -262,7 +262,7 @@ JNIEXPORT void JNICALL Java_org_classpat (JNIEnv* env, jobject obj, jlong streamPointer, jint volume) { int* new_volume = malloc(sizeof(int)); *new_volume = volume; - int stream_id = pa_stream_get_index((pa_stream*) convertFromJavaPointer(streamPointer)); + int stream_id = pa_stream_get_index((pa_stream*) convertJavaLongToPointer(streamPointer)); pa_context_get_sink_input_info((pa_context*) getJavaPointer(env, obj,"contextPointer") ,stream_id,sink_input_change_volume, new_volume); return; } diff -r 61cf6f811619 -r 5c09d21c2d70 src/org_classpath_icedtea_pulseaudio_Operation.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org_classpath_icedtea_pulseaudio_Operation.c Fri Aug 08 17:28:30 2008 -0400 @@ -0,0 +1,43 @@ +#include "org_classpath_icedtea_pulseaudio_Operation.h" + +#include "jni-common.h" +#include + +/* + * Class: org_classpath_icedtea_pulseaudio_Operation + * Method: native_ref + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_Operation_native_1ref +(JNIEnv* env, jobject obj) { + + pa_operation* operation = (pa_operation*) getJavaPointer(env, obj, "operationPointer"); + pa_operation_ref(operation); + +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Operation + * Method: native_unref + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_Operation_native_1unref +(JNIEnv* env, jobject obj) { + + pa_operation* operation = (pa_operation*) getJavaPointer(env, obj, "operationPointer"); + pa_operation_unref(operation); + +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Operation + * Method: native_get_state + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Operation_native_1get_1state +(JNIEnv* env, jobject obj) { + + pa_operation* operation = (pa_operation*) getJavaPointer(env, obj, "operationPointer"); + int state = pa_operation_get_state(operation); + return state; +} diff -r 61cf6f811619 -r 5c09d21c2d70 src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Fri Aug 08 16:24:38 2008 -0400 +++ b/src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Fri Aug 08 17:28:30 2008 -0400 @@ -113,7 +113,7 @@ JNIEXPORT void JNICALL Java_org_classpat java_context->env = env; java_context->obj = (*env)->NewGlobalRef(env, obj); - pa_context* context = (pa_context*) convertFromJavaPointer(contextPointer); + pa_context* context = (pa_context*) convertJavaLongToPointer(contextPointer); assert(context != NULL); pa_sample_spec sample_spec; @@ -210,28 +210,17 @@ JNIEXPORT jint JNICALL Java_org_classpat /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine * Method: native_flush - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1flush -(JNIEnv* env, jobject obj) { - + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1flush +(JNIEnv* env, jobject obj) +{ pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); pa_operation *o = pa_stream_flush(stream, NULL, NULL); - return (int) o; - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_getOperationState - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1getOperationState -(JNIEnv *env, jobject obj, jint operation) { - - return pa_operation_get_state((pa_operation *) operation); - -} + return convertPointerToJavaLong(o); + +} + /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine @@ -269,14 +258,14 @@ JNIEXPORT void JNICALL Java_org_classpat /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine * Method: native_drain - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1drain + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1drain (JNIEnv* env, jobject obj) { pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); assert(stream); pa_operation *o = pa_stream_drain(stream, NULL, NULL); - return (int) o; + return convertPointerToJavaLong(o); } /* From robermann at gmail.com Fri Aug 8 14:41:05 2008 From: robermann at gmail.com (Roberto Mannai) Date: Fri, 8 Aug 2008 23:41:05 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> Message-ID: <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> Hi Where (or how) can I find the default Xmx size? If I try a -Xmx400m I get the same error, so I'm thinking the default max size could be greater than my free RAM + SWAP. In this moment: linux:~ # free -m total used free shared buffers cached Mem: 503 495 7 0 63 183 -/+ buffers/cache: 248 254 Swap: 127 0 127 linux:~ # 254 + 127= 381 mega Now I can create a java virtual machine with at max -Xmx390m. So I'd much helped on knowing what is the default xmx value - googling it does not help: I found only: http://www.nabble.com/changeset-in--hg-icedtea:-*-patches-icedtea-cacao-Compiler-gcc-g...-td14884869.html Please if you're aware of a more suitable mailing list, tell me it. Best regards Roberto On Mon, Aug 4, 2008 at 9:47 PM, Roberto Mannai wrote: > In order to get some feedback, I wrote to the > opensuse-java at opensuse.org mailing list. At least one user was > successful running the command, it seems, on a 64bit processor. > > In order to get more feedback, I open the following bug: > https://bugzilla.novell.com/show_bug.cgi?id=414462 > > Coping below for your convenience: > > When running the java process, I get the following error: > > linux:~/.eclipse # java -version > Error occurred during initialization of VM > Could not reserve enough space for object heap > *** glibc detected *** java: free(): invalid pointer: 0xb7737254 *** > ======= Backtrace: ========= > /lib/libc.so.6[0xb7f86fc4] > /lib/libc.so.6(cfree+0x9c)[0xb7f8895c] > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a94fb1] > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a580a2] > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a59860] > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a5dc85] > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so(JNI_CreateJavaVM+0x5c)[0xb78faccc] > java(JavaMain+0x9e)[0x804a4de] > /lib/libpthread.so.0[0xb806e175] > /lib/libc.so.6(clone+0x5e)[0xb7fe8dce] > ======= Memory map: ======== > 08048000-08050000 r-xp 00000000 08:01 1379425 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java > 08050000-08051000 r--p 00008000 08:01 1379425 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java > 08051000-08052000 rw-p 00009000 08:01 1379425 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java > 08052000-08073000 rw-p 08052000 00:00 0 [heap] > b5400000-b5421000 rw-p b5400000 00:00 0 > b5421000-b5500000 ---p b5421000 00:00 0 > b55ca000-b55cb000 rwxp b55ca000 00:00 0 > b55cb000-b564a000 rwxp b55cb000 00:00 0 > b564a000-b5672000 rwxp b564a000 00:00 0 > b5672000-b764a000 rwxp b5672000 00:00 0 > b764a000-b766e000 r-xp 00000000 08:01 3915 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so > b766e000-b766f000 r--p 00023000 08:01 3915 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so > b766f000-b7671000 rw-p 00024000 08:01 3915 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so > b7671000-b76a6000 r--s 00000000 08:01 4401 /var/run/nscd/passwd > b76a6000-b76b9000 r-xp 00000000 08:01 1100751 /lib/libnsl-2.8.so > b76b9000-b76ba000 r--p 00012000 08:01 1100751 /lib/libnsl-2.8.so > b76ba000-b76bb000 rw-p 00013000 08:01 1100751 /lib/libnsl-2.8.so > b76bb000-b76bd000 rw-p b76bb000 00:00 0 > b76c7000-b76d3000 r-xp 00000000 08:01 24423 /lib/libgcc_s.so.1 > b76d3000-b76d4000 r--p 0000b000 08:01 24423 /lib/libgcc_s.so.1 > b76d4000-b76d5000 rw-p 0000c000 08:01 24423 /lib/libgcc_s.so.1 > b76d5000-b76dc000 r-xp 00000000 08:01 3938 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so > b76dc000-b76dd000 r--p 00006000 08:01 3938 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so > b76dd000-b76de000 rw-p 00007000 08:01 3938 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so > b76de000-b76e5000 r-xp 00000000 08:01 1218520 /lib/librt-2.8.so > b76e5000-b76e6000 r--p 00006000 08:01 1218520 /lib/librt-2.8.so > b76e6000-b76e7000 rw-p 00007000 08:01 1218520 /lib/librt-2.8.so > b76e7000-b76ea000 ---p b76e7000 00:00 0 > b76ea000-b7738000 rw-p b76ea000 00:00 0 > b7738000-b775c000 r-xp 00000000 08:01 1034658 /lib/libm-2.8.so > b775c000-b775d000 r--p 00023000 08:01 1034658 /lib/libm-2.8.so > b775d000-b775e000 rw-p 00024000 08:01 1034658 /lib/libm-2.8.so > b775e000-b7adc000 r-xp 00000000 08:01 3898 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so > b7adc000-b7aef000 r--p 0037e000 08:01 3898 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so > b7aef000-b7afb000 rw-p 00391000 08:01 3898 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so > b7afb000-b7f1b000 rw-p b7afb000 00:00 0 > b7f1b000-b8058000 r-xp 00000000 08:01 145156 /lib/libc-2.8.so > b8058000-b805a000 r--p 0013d000 08:01 145156 /lib/libc-2.8.so > b805a000-b805b000 rw-p 0013f000 08:01 145156 /lib/libc-2.8.so > b805b000-b805e000 rw-p b805b000 00:00 0 > b805e000-b8060000 r-xp 00000000 08:01 996292 /lib/libdl-2.8.so > b8060000-b8061000 r--p 00001000 08:01 996292 /lib/libdl-2.8.so > b8061000-b8062000 rw-p 00002000 08:01 996292 /lib/libdl-2.8.so > b8062000-b8066000 r-xp 00000000 08:01 3903 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so > b8066000-b8067000 r--p 00003000 08:01 3903 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so > b8067000-b8068000 rw-p 00004000 08:01 3903 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so > b8068000-b807c000 r-xp 00000000 08:01 1100778 /lib/libpthread-2.8.so > b807c000-b807d000 r--p 00013000 08:01 1100778 /lib/libpthread-2.8.so > b807d000-b807e000 rw-p 00014000 08:01 1100778 /lib/libpthread-2.8.so > b807e000-b8080000 rw-p b807e000 00:00 0 > b8080000-b8092000 r-xp 00000000 08:01 146523 /lib/libz.so.1.2.3 > b8092000-b8093000 r--p 00011000 08:01 146523 /lib/libz.so.1.2.3 > b8093000-b8094000 rw-p 00012000 08:01 146523 /lib/libz.so.1.2.3 > b8094000-b80a0000 r-xp 00000000 08:01 3937 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so > b80a0000-b80a1000 r--p 0000c000 08:01 3937 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so > b80a1000-b80a2000 rw-p 0000d000 08:01 3937 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so > b80a2000-b80aa000 rw-s 00000000 08:01 4291 /tmp/hsperfdata_root/5298 > (deleted) > b80aa000-b80b1000 r-xp 00000000 08:01 3940 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so > b80b1000-b80b2000 r--p 00006000 08:01 3940 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so > b80b2000-b80b3000 rw-p 00007000 08:01 3940 > /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so > b80b3000-b80b4000 rw-p b80b3000 00:00 0 > b80b4000-b80b5000 r--p b80b4000 00:00 0 > b80b5000-b80b6000 rw-p b80b5000 00:00 0 > b80b6000-b80d1000 r-xp 00000000 08:01 115121 /lib/ld-2.8.so > b80d1000-b80d2000 r--p 0001a000 08:01 115121 /lib/ld-2.8.so > b80d2000-b80d3000 rw-p 0001b000 08:01 115121 /lib/ld-2.8.so > bfebe000-bfed3000 rw-p bffeb000 00:00 0 [stack] > ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] > Aborted > > > In order to work, I must set the Xmx option, for example: > linux:~/.eclipse # java -Xmx1m -version > java version "1.6.0" > IcedTea Runtime Environment (build 1.6.0-b09) > OpenJDK Client VM (build 1.6.0-b09, mixed mode) > > RPM version: > linux:~/.eclipse # rpm -q java-1_6_0-openjdk > java-1_6_0-openjdk-1.2_b09-9.1 > > Opensuse version: 11.0 > Kernel version: > linux:~/.eclipse # uname -r > 2.6.25.11-0.1-pae > > > Ciao > Roberto > > > On Mon, Aug 4, 2008 at 2:35 PM, Mark Wielaard wrote: >> Hi Roberto, >> >> On Mon, 2008-08-04 at 14:23 +0200, Roberto Mannai wrote: >>> On 8/4/08, Andrew Haley wrote: >>> > Roberto Mannai wrote: >>> > >>> > > For a test I've just installed: >>> > > java-1_7_0-icedtea >>> > > on my opensuse11 box. >>> > > >>> > > "java -version" command crashes with an error. In order to work, I >>> > > must use the -Xmx option, also with 1m: >>> > > >>> > > java -Xmx1m -version >>> > > >>> > > Any reason for it? Is it a bug? >>> > >>> > It must be. How much memory have you got? >>> >>> My system has 512 mb of RAM, on a 32 bit processor. >>> >>> If I try to set the Xms option, java complains it is larger than max >>> size, so in my opinion the jvm does not allocate any default xmx >>> parameter. >>> >>> The error is: >>> "Could not reserve enough space for object heap'' >>> >>> The same message occurs also with java-1_6_0-openjdk. >> >> That is strange. Can you give us some more information? >> >> How exactly did you install icedtea/openjdk? >> >> Was is it a precompiled package, if so from where? >> If not, how did you configure and compile from source? >> >> Do other opensuse users have the same issue? >> >> What is the exact command given and output? >> Both for the failing and the working -Xmx1m -version case? >> (Best to copy/paste the command line completely, any output, including >> errors, stacktraces and the output of -version is interesting.) >> >> Thanks, >> >> Mark >> >> > From robermann at gmail.com Fri Aug 8 16:33:53 2008 From: robermann at gmail.com (Roberto Mannai) Date: Sat, 9 Aug 2008 01:33:53 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> Message-ID: <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> In the while, I downloaded from: https://api.opensuse.org/build/openSUSE:Factory/standard/i586/java-1_6_0-openjdk/java-1_6_0-openjdk-1.2_b09-18.16.src.rpm the last factory opensuse java version. If I'm not wrong, the Xmx setting is done into the file: openjdk-6-src-b09-11_apr_2008-fedora/openjdk/jdk/make/docs/Makefile Where the default size should be: MAX_VM_MEMORY = 512 That default value makes the process crash on my PC, which has 512 mb of RAM (java -Xmx512m -version crashes, too). I think the SUN default value was 384 - see: https://jdk-jrl-sources.dev.java.net/source/browse/jdk-jrl-sources/jdk6u3/trunk/j2se/make/docs/Makefile?view=markup In my PC, I can run successfully: java -Xmx384m -version If this discussion of default value was correct would mean that default openjdk / icedtea RPM versions will not work out of the box (without patches) on PCs with scarce RAM like mine. What do you think? Ciao Roberto On Fri, Aug 8, 2008 at 11:41 PM, Roberto Mannai wrote: > Hi > Where (or how) can I find the default Xmx size? > > If I try a -Xmx400m I get the same error, so I'm thinking the default > max size could be greater than my free RAM + SWAP. > > In this moment: > linux:~ # free -m > total used free shared buffers cached > Mem: 503 495 7 0 63 183 > -/+ buffers/cache: 248 254 > Swap: 127 0 127 > linux:~ # > 254 + 127= 381 mega > > Now I can create a java virtual machine with at max -Xmx390m. > > So I'd much helped on knowing what is the default xmx value - googling > it does not help: I found only: > http://www.nabble.com/changeset-in--hg-icedtea:-*-patches-icedtea-cacao-Compiler-gcc-g...-td14884869.html > > Please if you're aware of a more suitable mailing list, tell me it. > > Best regards > Roberto > > > On Mon, Aug 4, 2008 at 9:47 PM, Roberto Mannai wrote: >> In order to get some feedback, I wrote to the >> opensuse-java at opensuse.org mailing list. At least one user was >> successful running the command, it seems, on a 64bit processor. >> >> In order to get more feedback, I open the following bug: >> https://bugzilla.novell.com/show_bug.cgi?id=414462 >> >> Coping below for your convenience: >> >> When running the java process, I get the following error: >> >> linux:~/.eclipse # java -version >> Error occurred during initialization of VM >> Could not reserve enough space for object heap >> *** glibc detected *** java: free(): invalid pointer: 0xb7737254 *** >> ======= Backtrace: ========= >> /lib/libc.so.6[0xb7f86fc4] >> /lib/libc.so.6(cfree+0x9c)[0xb7f8895c] >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a94fb1] >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a580a2] >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a59860] >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a5dc85] >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so(JNI_CreateJavaVM+0x5c)[0xb78faccc] >> java(JavaMain+0x9e)[0x804a4de] >> /lib/libpthread.so.0[0xb806e175] >> /lib/libc.so.6(clone+0x5e)[0xb7fe8dce] >> ======= Memory map: ======== >> 08048000-08050000 r-xp 00000000 08:01 1379425 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java >> 08050000-08051000 r--p 00008000 08:01 1379425 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java >> 08051000-08052000 rw-p 00009000 08:01 1379425 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java >> 08052000-08073000 rw-p 08052000 00:00 0 [heap] >> b5400000-b5421000 rw-p b5400000 00:00 0 >> b5421000-b5500000 ---p b5421000 00:00 0 >> b55ca000-b55cb000 rwxp b55ca000 00:00 0 >> b55cb000-b564a000 rwxp b55cb000 00:00 0 >> b564a000-b5672000 rwxp b564a000 00:00 0 >> b5672000-b764a000 rwxp b5672000 00:00 0 >> b764a000-b766e000 r-xp 00000000 08:01 3915 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so >> b766e000-b766f000 r--p 00023000 08:01 3915 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so >> b766f000-b7671000 rw-p 00024000 08:01 3915 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so >> b7671000-b76a6000 r--s 00000000 08:01 4401 /var/run/nscd/passwd >> b76a6000-b76b9000 r-xp 00000000 08:01 1100751 /lib/libnsl-2.8.so >> b76b9000-b76ba000 r--p 00012000 08:01 1100751 /lib/libnsl-2.8.so >> b76ba000-b76bb000 rw-p 00013000 08:01 1100751 /lib/libnsl-2.8.so >> b76bb000-b76bd000 rw-p b76bb000 00:00 0 >> b76c7000-b76d3000 r-xp 00000000 08:01 24423 /lib/libgcc_s.so.1 >> b76d3000-b76d4000 r--p 0000b000 08:01 24423 /lib/libgcc_s.so.1 >> b76d4000-b76d5000 rw-p 0000c000 08:01 24423 /lib/libgcc_s.so.1 >> b76d5000-b76dc000 r-xp 00000000 08:01 3938 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so >> b76dc000-b76dd000 r--p 00006000 08:01 3938 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so >> b76dd000-b76de000 rw-p 00007000 08:01 3938 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so >> b76de000-b76e5000 r-xp 00000000 08:01 1218520 /lib/librt-2.8.so >> b76e5000-b76e6000 r--p 00006000 08:01 1218520 /lib/librt-2.8.so >> b76e6000-b76e7000 rw-p 00007000 08:01 1218520 /lib/librt-2.8.so >> b76e7000-b76ea000 ---p b76e7000 00:00 0 >> b76ea000-b7738000 rw-p b76ea000 00:00 0 >> b7738000-b775c000 r-xp 00000000 08:01 1034658 /lib/libm-2.8.so >> b775c000-b775d000 r--p 00023000 08:01 1034658 /lib/libm-2.8.so >> b775d000-b775e000 rw-p 00024000 08:01 1034658 /lib/libm-2.8.so >> b775e000-b7adc000 r-xp 00000000 08:01 3898 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so >> b7adc000-b7aef000 r--p 0037e000 08:01 3898 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so >> b7aef000-b7afb000 rw-p 00391000 08:01 3898 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so >> b7afb000-b7f1b000 rw-p b7afb000 00:00 0 >> b7f1b000-b8058000 r-xp 00000000 08:01 145156 /lib/libc-2.8.so >> b8058000-b805a000 r--p 0013d000 08:01 145156 /lib/libc-2.8.so >> b805a000-b805b000 rw-p 0013f000 08:01 145156 /lib/libc-2.8.so >> b805b000-b805e000 rw-p b805b000 00:00 0 >> b805e000-b8060000 r-xp 00000000 08:01 996292 /lib/libdl-2.8.so >> b8060000-b8061000 r--p 00001000 08:01 996292 /lib/libdl-2.8.so >> b8061000-b8062000 rw-p 00002000 08:01 996292 /lib/libdl-2.8.so >> b8062000-b8066000 r-xp 00000000 08:01 3903 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so >> b8066000-b8067000 r--p 00003000 08:01 3903 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so >> b8067000-b8068000 rw-p 00004000 08:01 3903 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so >> b8068000-b807c000 r-xp 00000000 08:01 1100778 /lib/libpthread-2.8.so >> b807c000-b807d000 r--p 00013000 08:01 1100778 /lib/libpthread-2.8.so >> b807d000-b807e000 rw-p 00014000 08:01 1100778 /lib/libpthread-2.8.so >> b807e000-b8080000 rw-p b807e000 00:00 0 >> b8080000-b8092000 r-xp 00000000 08:01 146523 /lib/libz.so.1.2.3 >> b8092000-b8093000 r--p 00011000 08:01 146523 /lib/libz.so.1.2.3 >> b8093000-b8094000 rw-p 00012000 08:01 146523 /lib/libz.so.1.2.3 >> b8094000-b80a0000 r-xp 00000000 08:01 3937 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so >> b80a0000-b80a1000 r--p 0000c000 08:01 3937 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so >> b80a1000-b80a2000 rw-p 0000d000 08:01 3937 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so >> b80a2000-b80aa000 rw-s 00000000 08:01 4291 /tmp/hsperfdata_root/5298 >> (deleted) >> b80aa000-b80b1000 r-xp 00000000 08:01 3940 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so >> b80b1000-b80b2000 r--p 00006000 08:01 3940 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so >> b80b2000-b80b3000 rw-p 00007000 08:01 3940 >> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so >> b80b3000-b80b4000 rw-p b80b3000 00:00 0 >> b80b4000-b80b5000 r--p b80b4000 00:00 0 >> b80b5000-b80b6000 rw-p b80b5000 00:00 0 >> b80b6000-b80d1000 r-xp 00000000 08:01 115121 /lib/ld-2.8.so >> b80d1000-b80d2000 r--p 0001a000 08:01 115121 /lib/ld-2.8.so >> b80d2000-b80d3000 rw-p 0001b000 08:01 115121 /lib/ld-2.8.so >> bfebe000-bfed3000 rw-p bffeb000 00:00 0 [stack] >> ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] >> Aborted >> >> >> In order to work, I must set the Xmx option, for example: >> linux:~/.eclipse # java -Xmx1m -version >> java version "1.6.0" >> IcedTea Runtime Environment (build 1.6.0-b09) >> OpenJDK Client VM (build 1.6.0-b09, mixed mode) >> >> RPM version: >> linux:~/.eclipse # rpm -q java-1_6_0-openjdk >> java-1_6_0-openjdk-1.2_b09-9.1 >> >> Opensuse version: 11.0 >> Kernel version: >> linux:~/.eclipse # uname -r >> 2.6.25.11-0.1-pae >> >> >> Ciao >> Roberto >> >> >> On Mon, Aug 4, 2008 at 2:35 PM, Mark Wielaard wrote: >>> Hi Roberto, >>> >>> On Mon, 2008-08-04 at 14:23 +0200, Roberto Mannai wrote: >>>> On 8/4/08, Andrew Haley wrote: >>>> > Roberto Mannai wrote: >>>> > >>>> > > For a test I've just installed: >>>> > > java-1_7_0-icedtea >>>> > > on my opensuse11 box. >>>> > > >>>> > > "java -version" command crashes with an error. In order to work, I >>>> > > must use the -Xmx option, also with 1m: >>>> > > >>>> > > java -Xmx1m -version >>>> > > >>>> > > Any reason for it? Is it a bug? >>>> > >>>> > It must be. How much memory have you got? >>>> >>>> My system has 512 mb of RAM, on a 32 bit processor. >>>> >>>> If I try to set the Xms option, java complains it is larger than max >>>> size, so in my opinion the jvm does not allocate any default xmx >>>> parameter. >>>> >>>> The error is: >>>> "Could not reserve enough space for object heap'' >>>> >>>> The same message occurs also with java-1_6_0-openjdk. >>> >>> That is strange. Can you give us some more information? >>> >>> How exactly did you install icedtea/openjdk? >>> >>> Was is it a precompiled package, if so from where? >>> If not, how did you configure and compile from source? >>> >>> Do other opensuse users have the same issue? >>> >>> What is the exact command given and output? >>> Both for the failing and the working -Xmx1m -version case? >>> (Best to copy/paste the command line completely, any output, including >>> errors, stacktraces and the output of -version is interesting.) >>> >>> Thanks, >>> >>> Mark >>> >>> >> > From gnu_andrew at member.fsf.org Fri Aug 8 16:56:20 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sat, 9 Aug 2008 00:56:20 +0100 Subject: changeset in /hg/icedtea: 2008-08-06 Joshua Sumali References: Message-ID: <17c6771e0808081656w6715ea00j2f5030d02a025ca1@mail.gmail.com> On 06/08/2008, Joshua Sumali wrote: > changeset 2b7233b8a439 in /hg/icedtea > details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2b7233b8a439 > description: > 2008-08-06 Joshua Sumali > > * acinclude.m4: Don't bother with GCC_OLD here either. > > diffstat: > > 2 files changed, 4 insertions(+), 2 deletions(-) > ChangeLog | 4 ++++ > acinclude.m4 | 2 -- > > diffs (30 lines): > > diff -r e6094a45393c -r 2b7233b8a439 ChangeLog > --- a/ChangeLog Mon Aug 04 02:22:43 2008 +0100 > +++ b/ChangeLog Wed Aug 06 09:23:00 2008 -0400 > @@ -1,3 +1,7 @@ 2008-08-04 Andrew John Hughes +2008-08-06 Joshua Sumali > + > + * acinclude.m4: Don't bother with GCC_OLD here either. > + > 2008-08-04 Andrew John Hughes > > * Makefile.am: > diff -r e6094a45393c -r 2b7233b8a439 acinclude.m4 > --- a/acinclude.m4 Mon Aug 04 02:22:43 2008 +0100 > +++ b/acinclude.m4 Wed Aug 06 09:23:00 2008 -0400 > @@ -220,7 +220,6 @@ AC_DEFUN([FIND_ECJ_JAR], > > AC_DEFUN([FIND_LIBGCJ_JAR], > [ > - AM_CONDITIONAL(GCC_OLD, test x != x) > AC_ARG_WITH([libgcj-jar], > [AS_HELP_STRING(--with-libgcj-jar,specify location of the libgcj 4.3.0 jar)], > [ > @@ -243,7 +242,6 @@ AC_DEFUN([FIND_LIBGCJ_JAR], > LIBGCJ_JAR=/usr/share/java/libgcj-4.3.jar > AC_MSG_RESULT(${LIBGCJ_JAR}) > else > - AM_CONDITIONAL(GCC_OLD, test x = x) > if test -e "/usr/share/java/libgcj-4.1.2.jar"; then > LIBGCJ_JAR=/usr/share/java/libgcj-4.1.2.jar > AC_MSG_RESULT(${LIBGCJ_JAR}) > Thanks! This explains why the local version of the same fix I was about to commit was no longer necessary... -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Sat Aug 9 12:22:57 2008 From: mark at klomp.org (Mark Wielaard) Date: Sat, 09 Aug 2008 21:22:57 +0200 Subject: [Fwd: Server downtime] Message-ID: <1218309778.3276.6.camel@hermans.wildebeest.org> Hi, This will impact the icedtea mercurial repos and website at icedtea.classpath.org. Cheers, Mark -------------- next part -------------- An embedded message was scrubbed... From: Jim Pick Subject: Server downtime Date: Sat, 09 Aug 2008 11:26:07 -0700 Size: 4097 Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080809/65537d3d/attachment.nws From gnu_andrew at member.fsf.org Sat Aug 9 17:01:01 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 10 Aug 2008 01:01:01 +0100 Subject: Move to b32 for IcedTea -- problems Message-ID: <17c6771e0808091701n25b7bbc1uc9b62591a3355f09@mail.gmail.com> I've just tried to move the IcedTea tree to b32 released at the beginning of the week. This currently works for --with-icedtea builds but fails for bootstrap/ecj builds. As such, I've just pushed the change to my own experimental repository for now (http://fuseyism.com/hg/icedtea). I have a feeling the issue is going to take some tracking down, and I won't be around to look at this until at least Thursday. If anyone has any ideas/wishes to fix this in the meantime, please feel free :) Meanwhile, if you're eager for b32 and can live with building with icedtea, then the tree is available for your use. FYI, the current failure is in the JDK and is shown below. My guess is some classes are not being built into the ecj build, but weren't previously being used anyway. I know we apply some patches to the CORBA makefiles, perhaps someone who knows more about these and why they were applied can take a look. /bin/cp /home/andrew/builder/icedtea/openjdk/build/linux-amd64/lib/tools.jar /home/andrew/builder/icedtea/openjdk/build/linux-amd64/j2sdk-image/lib/tools.jar /bin/mkdir -p /home/andrew/builder/icedtea/openjdk/build/linux-amd64/symbols/META-INF/sym /home/andrew/builder/icedtea/bootstrap/jdk1.6.0/bin/java -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m "-Xbootclasspath/p:/home/andrew/builder/icedtea/openjdk/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar" -jar /home/andrew/builder/icedtea/openjdk/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar -g -source 1.5 -target 5 -encoding ascii "-Xbootclasspath:/home/andrew/builder/icedtea/openjdk/build/linux-amd64/classes" -XDprocess.packages -proc:only \ -processor com.sun.tools.javac.sym.CreateSymbols \ -Acom.sun.tools.javac.sym.Jar=/home/andrew/builder/icedtea/openjdk/build/linux-amd64/tmp/rt-orig.jar \ -Acom.sun.tools.javac.sym.Dest=/home/andrew/builder/icedtea/openjdk/build/linux-amd64/symbols/META-INF/sym/rt.jar \ java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd java.awt.event java.awt.font java.awt.geom java.awt.im java.awt.im.spi java.awt.image java.awt.image.renderable java.awt.print java.beans java.beans.beancontext java.io java.lang java.lang.annotation java.lang.instrument java.lang.management java.lang.ref java.lang.reflect java.math java.net java.nio java.nio.channels java.nio.channels.spi java.nio.charset java.nio.charset.spi java.rmi java.rmi.activation java.rmi.dgc java.rmi.registry java.rmi.server java.security java.security.acl java.security.cert java.security.interfaces java.security.spec java.sql java.text java.text.spi java.util java.util.concurrent java.util.concurrent.atomic java.util.concurrent.locks java.util.jar java.util.logging java.util.prefs java.util.regex java.util.spi java.util.zip javax.accessibility javax.activation javax.activity javax.annotation javax.annotation.processing javax.crypto javax.crypto.interfaces javax.crypto.spec javax.imageio javax.imageio.event javax.imageio.metadata javax.imageio.plugins.jpeg javax.imageio.plugins.bmp javax.imageio.spi javax.imageio.stream javax.jws javax.jws.soap javax.lang.model javax.lang.model.element javax.lang.model.type javax.lang.model.util javax.management javax.management.loading javax.management.monitor javax.management.relation javax.management.openmbean javax.management.timer javax.management.modelmbean javax.management.remote javax.management.remote.rmi javax.naming javax.naming.directory javax.naming.event javax.naming.ldap javax.naming.spi javax.net javax.net.ssl javax.print javax.print.attribute javax.print.attribute.standard javax.print.event javax.rmi javax.rmi.CORBA javax.rmi.ssl javax.script javax.security.auth javax.security.auth.callback javax.security.auth.kerberos javax.security.auth.login javax.security.auth.spi javax.security.auth.x500 javax.security.cert javax.security.sasl javax.sound.sampled javax.sound.sampled.spi javax.sound.midi javax.sound.midi.spi javax.sql javax.sql.rowset javax.sql.rowset.serial javax.sql.rowset.spi javax.swing javax.swing.border javax.swing.colorchooser javax.swing.filechooser javax.swing.event javax.swing.table javax.swing.text javax.swing.text.html javax.swing.text.html.parser javax.swing.text.rtf javax.swing.tree javax.swing.undo javax.swing.plaf javax.swing.plaf.basic javax.swing.plaf.metal javax.swing.plaf.multi javax.swing.plaf.synth javax.tools javax.transaction javax.transaction.xa javax.xml.parsers javax.xml.bind javax.xml.bind.annotation javax.xml.bind.annotation.adapters javax.xml.bind.attachment javax.xml.bind.helpers javax.xml.bind.util javax.xml.soap javax.xml.ws javax.xml.ws.handler javax.xml.ws.handler.soap javax.xml.ws.http javax.xml.ws.soap javax.xml.ws.spi javax.xml.transform javax.xml.transform.sax javax.xml.transform.dom javax.xml.transform.stax javax.xml.transform.stream javax.xml javax.xml.crypto javax.xml.crypto.dom javax.xml.crypto.dsig javax.xml.crypto.dsig.dom javax.xml.crypto.dsig.keyinfo javax.xml.crypto.dsig.spec javax.xml.datatype javax.xml.validation javax.xml.namespace javax.xml.xpath javax.xml.stream javax.xml.stream.events javax.xml.stream.util org.ietf.jgss org.omg.CORBA org.omg.CORBA.DynAnyPackage org.omg.CORBA.ORBPackage org.omg.CORBA.TypeCodePackage org.omg.stub.java.rmi org.omg.CORBA.portable org.omg.CORBA_2_3 org.omg.CORBA_2_3.portable org.omg.CosNaming org.omg.CosNaming.NamingContextExtPackage org.omg.CosNaming.NamingContextPackage org.omg.SendingContext org.omg.PortableServer org.omg.PortableServer.CurrentPackage org.omg.PortableServer.POAPackage org.omg.PortableServer.POAManagerPackage org.omg.PortableServer.ServantLocatorPackage org.omg.PortableServer.portable org.omg.PortableInterceptor org.omg.PortableInterceptor.ORBInitInfoPackage org.omg.Messaging org.omg.IOP org.omg.IOP.CodecFactoryPackage org.omg.IOP.CodecPackage org.omg.Dynamic org.omg.DynamicAny org.omg.DynamicAny.DynAnyPackage org.omg.DynamicAny.DynAnyFactoryPackage org.w3c.dom org.w3c.dom.events org.w3c.dom.bootstrap org.w3c.dom.ls org.xml.sax org.xml.sax.ext org.xml.sax.helpers com.sun.java.browser.dom org.w3c.dom org.w3c.dom.bootstrap org.w3c.dom.ls org.w3c.dom.ranges org.w3c.dom.traversal org.w3c.dom.html org.w3c.dom.stylesheets org.w3c.dom.css org.w3c.dom.events org.w3c.dom.views com.sun.management com.sun.security.auth com.sun.security.auth.callback com.sun.security.auth.login com.sun.security.auth.module com.sun.security.jgss com.sun.net.ssl com.sun.net.httpserver com.sun.net.httpserver.spi javax.smartcardio com.sun.tracing com.sun.tracing.dtrace com.sun.java.swing.plaf com.sun.java.swing.plaf.windows com.sun.java.swing.plaf.motif com.sun.java.swing.plaf.gtk warning: package javax.transaction does not exist warning: package org.omg.SendingContext does not exist warning: package com.sun.java.swing.plaf does not exist Using boot class path = [/home/andrew/builder/icedtea/openjdk/build/linux-amd64/tmp/rt-orig.jar, /home/andrew/builder/icedtea/openjdk/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/resources.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/sunrsasign.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/jsse.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/jce.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/charsets.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/classes, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/ext/dnsns.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/ext/sunpkcs11.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/ext/sunjce_provider.jar, /home/andrew/builder/icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/jre/lib/ext/localedata.jar] error: org.omg.SendingContext.RunTime: class file for org.omg.SendingContext.RunTime not found error: class file for org.omg.SendingContext.RunTime not found 1 error make[2]: *** [initial-image-jdk] Error 1 make[2]: Leaving directory `/home/andrew/builder/icedtea/openjdk/jdk/make' make[1]: *** [jdk-build] Error 2 make[1]: Leaving directory `/home/andrew/builder/icedtea/openjdk' make: *** [stamps/icedtea.stamp] Error 2 ChangeLog for b32: 2008-08-08 Andrew John Hughes * HACKING: Updated. * Makefile.am: Move to b32 and add new patch for MBeanIntrospector. * patches/icedtea-debuginfo.patch, * patches/icedtea-libraries.patch: Updated. * patches/icedtea-mbeanintrospector.patch: New patch (getAnnotation cast for ecj builds). * patches/icedtea-sparc-trapsfix.patch, * patches/icedtea-version.patch: Updated. Thanks, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From jim at jimpick.com Sat Aug 9 19:25:59 2008 From: jim at jimpick.com (Jim Pick) Date: Sat, 09 Aug 2008 19:25:59 -0700 Subject: Icedtea/Classpath Server Downtime In-Reply-To: <489DE1C9.2060901@jimpick.com> References: <489DE1C9.2060901@jimpick.com> Message-ID: <489E51B7.8050506@jimpick.com> Jim Pick wrote: > Hi, > > I need to take the server down to investigate a possible failed disk in > the software RAID. I am hoping that it's just a Linux or Xen bug. > Also, I'd like to upgrade Xen to a more modern version if possible. > > I'm planning to take the server down in about 3 hours (around 2pm > Pacific Time). Hopefully, it won't take me too long to investigate > and/or upgrade it. > > There is always the possibility that things won't go well with the RAID > or the upgrade. I only have the one server online, so if I encounter > any big problems, please be patient as I try to figure out the best way > to recover. Luckily, I do have recent backups. > > This will affect jimpick.com, kaffe.org, developer.classpath.org, > planet.classpath.org, and icedtea.classpath.org. > > While the server is down, my jimpick.com/kaffe.org email addresses will > not be working. I can still be reached at my backup email address at > . The server is back now. If you see anything strange, send me an email. Cheers, - Jim From mark at klomp.org Sun Aug 10 12:49:16 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 10 Aug 2008 21:49:16 +0200 Subject: [Fwd: Server downtime] In-Reply-To: <1218309778.3276.6.camel@hermans.wildebeest.org> References: <1218309778.3276.6.camel@hermans.wildebeest.org> Message-ID: <1218397756.11715.27.camel@hermans.wildebeest.org> Hi All, On Sat, 2008-08-09 at 21:22 +0200, Mark Wielaard wrote: > This will impact the icedtea mercurial repos and website at > icedtea.classpath.org. Unfortunately not everything went well with the disks/raid. The (virtual) machines will have to be taken down for approx 10 till 20 hours. Hopefully they will be online again tomorrow (Monday). This is Jim's update from his blog: http://codeflow.bittickler.org/?p=35 > Update: > > The server is back now. One out of the three drives in the RAID wasn?t > even recognized by the BIOS, so the RAID5 is now running in a degraded > state. The failed disk was also the grub disk ? luckily, I have an > IPMI board in the machine, so I was able to get into the BIOS, and > select another disk to boot from (which fortunately had grub on it). I > came uncomfortably close to not being able to rescue the machine > remotely. I?m currently in Penticton, BC, Canada ? the server is > 2000km away in San Jose, California. > > I can run the server on two 250GB disks for a while. I?ll probably be > heading down to California in the autumn for a vacation ? when I go, > I?ll drop by, and throw in another 1TB SATA drive. Until then, I?ll > have to do some re-arranging in order to reduce my amount of disk > usage. I?ll have to convert some of my RAID5 storage into RAID1 (with > software RAID and LVM, that isn?t too hard to do). > > The good news is that I was able to upgrade Xen to the latest stable > version in Debian. Hopefully it will be stable. Attached his email to the classpath list. Cheers, Mark -------------- next part -------------- An embedded message was scrubbed... From: Jim Pick Subject: Re: Server downtime Date: Sun, 10 Aug 2008 11:16:40 -0700 Size: 5048 Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080810/ef8a28d0/attachment.nws From aph at redhat.com Mon Aug 11 01:37:40 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 11 Aug 2008 09:37:40 +0100 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> Message-ID: <489FFA54.70801@redhat.com> Roberto Mannai wrote: > In the while, I downloaded from: > https://api.opensuse.org/build/openSUSE:Factory/standard/i586/java-1_6_0-openjdk/java-1_6_0-openjdk-1.2_b09-18.16.src.rpm > the last factory opensuse java version. > > If I'm not wrong, the Xmx setting is done into the file: > openjdk-6-src-b09-11_apr_2008-fedora/openjdk/jdk/make/docs/Makefile > > Where the default size should be: > MAX_VM_MEMORY = 512 > > That default value makes the process crash on my PC, which has 512 mb > of RAM (java -Xmx512m -version crashes, too). > > I think the SUN default value was 384 - see: > https://jdk-jrl-sources.dev.java.net/source/browse/jdk-jrl-sources/jdk6u3/trunk/j2se/make/docs/Makefile?view=markup > > In my PC, I can run successfully: > java -Xmx384m -version > > If this discussion of default value was correct would mean that > default openjdk / icedtea RPM > versions will not work out of the box (without patches) on PCs with > scarce RAM like mine. What do you think? That's certainly possible. The size of the initial heap is set dynamically, depending on your machine's capacity. However, you are the only person who has ever reported this problem. I was wondering: what swap settings are you using? Andrew. From robermann at gmail.com Mon Aug 11 01:43:50 2008 From: robermann at gmail.com (Roberto Mannai) Date: Mon, 11 Aug 2008 10:43:50 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <489FFA54.70801@redhat.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> <489FFA54.70801@redhat.com> Message-ID: <414e44f70808110143k3dd3e2a8x5f10bf0037cd97b1@mail.gmail.com> linux:~ # free -m total used free shared buffers cached Mem: 503 495 7 0 63 183 -/+ buffers/cache: 248 254 Swap: 127 0 127 The SWAP is 127 mb. Now, in general should be the -Xms option the setting for the initial size. The point is that the java-1.6.0-sun works out of the box, the openjdk crashes in the same hardware. Ciao Roberto > That's certainly possible. The size of the initial heap is set dynamically, > depending on your machine's capacity. However, you are the only person > who has ever reported this problem. I was wondering: what swap settings > are you using? > > Andrew. > From aph at redhat.com Mon Aug 11 02:03:51 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 11 Aug 2008 10:03:51 +0100 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808110143k3dd3e2a8x5f10bf0037cd97b1@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> <489FFA54.70801@redhat.com> <414e44f70808110143k3dd3e2a8x5f10bf0037cd97b1@mail.gmail.com> Message-ID: <48A00077.8060705@redhat.com> Roberto Mannai wrote: > linux:~ # free -m > total used free shared buffers cached > Mem: 503 495 7 0 63 183 > -/+ buffers/cache: 248 254 > Swap: 127 0 127 > > The SWAP is 127 mb. Ouch. Now I'm starting to understand perhaps why you're the person having the problems. > Now, in general should be the -Xms option the > setting for the initial size. > > The point is that the java-1.6.0-sun works out of the box, the openjdk > crashes in the same hardware. Sure, but we still don't know *why* it does. This may be a real problem with the Generic OpenJDK, or it may just be that it can never work on a setup such as yours. IMO it should work, though. 512mb, although small for a current machine, isn't so very small. It might be that your machine's capacity is being detected incorrectly. The only way to find out is to debug. Either that, or you could just fix your swap and forget about it. Andrew. From robermann at gmail.com Mon Aug 11 02:29:45 2008 From: robermann at gmail.com (Roberto Mannai) Date: Mon, 11 Aug 2008 11:29:45 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <48A00077.8060705@redhat.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> <489FFA54.70801@redhat.com> <414e44f70808110143k3dd3e2a8x5f10bf0037cd97b1@mail.gmail.com> <48A00077.8060705@redhat.com> Message-ID: <414e44f70808110229ve63efffqb1d62dbec48fc915@mail.gmail.com> I'd like to know why does not work, too - so by now I'm not going to resize the swap (it would be easier to reinstall the SUN jvm :) In your opinion could be related to a change in the default Xmx value? What were the reasons for such a change, if I can ask? Ciao Roberto On 8/11/08, Andrew Haley wrote: > Roberto Mannai wrote: > > linux:~ # free -m > > total used free shared buffers cached > > Mem: 503 495 7 0 63 183 > > -/+ buffers/cache: 248 254 > > Swap: 127 0 127 > > > > The SWAP is 127 mb. > > Ouch. Now I'm starting to understand perhaps why you're the person having > the problems. > > > Now, in general should be the -Xms option the > > setting for the initial size. > > > > The point is that the java-1.6.0-sun works out of the box, the openjdk > > crashes in the same hardware. > > Sure, but we still don't know *why* it does. This may be a real problem with > the Generic OpenJDK, or it may just be that it can never work on a setup such > as yours. IMO it should work, though. 512mb, although small for a current > machine, isn't so very small. It might be that your machine's capacity is > being detected incorrectly. The only way to find out is to debug. > > Either that, or you could just fix your swap and forget about it. > > Andrew. > From aph at redhat.com Mon Aug 11 03:07:19 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 11 Aug 2008 11:07:19 +0100 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808110229ve63efffqb1d62dbec48fc915@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> <489FFA54.70801@redhat.com> <414e44f70808110143k3dd3e2a8x5f10bf0037cd97b1@mail.gmail.com> <48A00077.8060705@redhat.com> <414e44f70808110229ve63efffqb1d62dbec48fc915@mail.gmail.com> Message-ID: <48A00F57.201@redhat.com> Please don't top-post. It's very confusing. Roberto Mannai wrote: > I'd like to know why does not work, too - so by now I'm not going to > resize the swap (it would be easier to reinstall the SUN jvm :) Huh? Adding swap can be done in less than 30s, unless you have no disk space. > In your opinion could be related to a change in the default Xmx value? Certainly. > What were the reasons for such a change, if I can ask? You can ask, but I don't know the answer. Andrew. > On 8/11/08, Andrew Haley wrote: >> Roberto Mannai wrote: >>> linux:~ # free -m >>> total used free shared buffers cached >>> Mem: 503 495 7 0 63 183 >>> -/+ buffers/cache: 248 254 >>> Swap: 127 0 127 >>> >>> The SWAP is 127 mb. >> Ouch. Now I'm starting to understand perhaps why you're the person having >> the problems. >> >>> Now, in general should be the -Xms option the >>> setting for the initial size. >>> >>> The point is that the java-1.6.0-sun works out of the box, the openjdk >>> crashes in the same hardware. >> Sure, but we still don't know *why* it does. This may be a real problem with >> the Generic OpenJDK, or it may just be that it can never work on a setup such >> as yours. IMO it should work, though. 512mb, although small for a current >> machine, isn't so very small. It might be that your machine's capacity is >> being detected incorrectly. The only way to find out is to debug. >> >> Either that, or you could just fix your swap and forget about it. >> >> Andrew. >> From mark at klomp.org Mon Aug 11 04:05:24 2008 From: mark at klomp.org (Mark Wielaard) Date: Mon, 11 Aug 2008 13:05:24 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> Message-ID: <1218452724.2050.17.camel@dijkstra.wildebeest.org> Hi Roberto, On Sat, 2008-08-09 at 01:33 +0200, Roberto Mannai wrote: > In the while, I downloaded from: > https://api.opensuse.org/build/openSUSE:Factory/standard/i586/java-1_6_0-openjdk/java-1_6_0-openjdk-1.2_b09-18.16.src.rpm > the last factory opensuse java version. > > If I'm not wrong, the Xmx setting is done into the file: > openjdk-6-src-b09-11_apr_2008-fedora/openjdk/jdk/make/docs/Makefile > > Where the default size should be: > MAX_VM_MEMORY = 512 > > That default value makes the process crash on my PC, which has 512 mb > of RAM (java -Xmx512m -version crashes, too). That is not the place where the memory settings for the runtime java are done. Look at openjdk/hotspot/src/share/vm/runtime/arguments.cpp where there are a couple of functions trying to figure out some reasonable max memory size. In particular they try to use os::physical_memory() and os::allocatable_physical_memory to get a nice fraction of memory based on what you actually have in your machine. It seems something is failing there. In one of your traces that you posted at: https://bugzilla.novell.com/show_bug.cgi?id=414462 You see that the java launcher tries to allocate (mmap2) 603979776 bytes aka 576 MB on your machine, just before the failure, which you clearly don't have. If you could help us figure out where/what precisely is guessing something wrong for your setup that would be nice. I don't immediately have a suggestion. But start by tracing which of the os::*memory() functions in openjdk/hotspot/src/os_cpu/*/vm/os_*.cpp are called and what they return in your setup would be a good start. There seems to be a second bug during the cleanup after the abort because of too limited memory. That is the "** glibc detected *** java: free(): invalid pointer" you are seeing. Something is probably freeing something that was never allocated in this case. Cheers, Mark From bugzilla-daemon at icedtea.classpath.org Mon Aug 11 07:22:27 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 11 Aug 2008 14:22:27 +0000 Subject: [Bug 183] New: Build error: Argument list too long Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=183 Summary: Build error: Argument list too long Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: beuc at beuc.net I get this when compiling under Debian GNU/Linux Etch (from current Hg). I saw http://thread.gmane.org/gmane.comp.java.openjdk.distro-packaging.devel/2513 but this doesn't really help: my shell and my /bin/sh are bash; besides, the path is /usr/src/icedtea6 which is quite short. So I think the build system need to be fixed to avoid uber-long command lines: (cd /home/src/icedtea6/openjdk-ecj/control/build/linux-i586/classes && \ /usr/src/icedtea6/bootstrap/jdk1.6.0/bin/jar c0mf /home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/manifest.tmp /home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/rt-orig.jar \ -J-client -J-Xmx630m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m `/bin/cat /home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/jarfilelists/rt_jar_list`) /bin/sh: line 1: /usr/src/icedtea6/bootstrap/jdk1.6.0/bin/jar: Argument list too long make[2]: *** [/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/rt-orig.jar] Error 126 make[2]: Leaving directory `/home/src/icedtea6/openjdk-ecj/jdk/make' make[1]: *** [jdk-build] Erreur 2 make[1]: quittant le r?pertoire ? /home/src/icedtea6/openjdk-ecj/control/make ? make: *** [stamps/icedtea-ecj.stamp] Erreur 2 sylvain at jupiter:/usr/src/icedtea6$ ls -lh /bin/sh lrwxrwxrwx 1 root root 4 2008-01-02 10:26 /bin/sh -> bash -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From jsumali at redhat.com Mon Aug 11 07:23:03 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Mon, 11 Aug 2008 14:23:03 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Joshua Sumali changeset ab743c774cb2 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=ab743c774cb2 description: 2008-08-11 Joshua Sumali * ChangeLog: New file. * INSTALL: Likewise. * NEWS: Likewise. * Makefile.am: Likewise. * build.xml: Likewise. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Likewise. * depcomp: Likewise. * install-sh: Likewise. * libtool: Likewise. * ltmain.sh: Likewise. * missing: Likewise. * src/org/*: Moved to src/java. * src/META-INF: Moved to src/java. * src/native/Makefile.am: New file. * makefile: Removed. * src/*.c: Moved to src/native. * src/*.h: Likewise. diffstat: 60 files changed, 22994 insertions(+), 3494 deletions(-) ChangeLog | 22 INSTALL | 1 Makefile.am | 5 build.xml | 70 config.guess | 1526 + config.sub | 1658 ++ configure.ac | 9 depcomp | 589 install-sh | 519 libtool | 7895 ++++++++++ ltmain.sh | 6930 ++++++++ makefile | 112 missing | 367 src/META-INF/services/javax.sound.sampled.spi.MixerProvider | 3 src/java/META-INF/services/javax.sound.sampled.spi.MixerProvider | 3 src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java | 56 src/java/org/classpath/icedtea/pulseaudio/ContextListener.java | 44 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 247 src/java/org/classpath/icedtea/pulseaudio/Operation.java | 56 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 464 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java | 63 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java | 63 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java | 50 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 644 src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java | 68 src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 66 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 221 src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 50 src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java | 58 src/java/org/classpath/icedtea/pulseaudio/StreamListener.java | 47 src/jni-common.c | 179 src/jni-common.h | 79 src/native/Makefile.am | 17 src/native/jni-common.c | 179 src/native/jni-common.h | 79 src/native/org_classpath_icedtea_pulseaudio_EventLoop.c | 269 src/native/org_classpath_icedtea_pulseaudio_Operation.c | 43 src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 289 src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 60 src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c | 267 src/org/classpath/icedtea/pulseaudio/ContextEvent.java | 56 src/org/classpath/icedtea/pulseaudio/ContextListener.java | 44 src/org/classpath/icedtea/pulseaudio/EventLoop.java | 244 src/org/classpath/icedtea/pulseaudio/Operation.java | 56 src/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 477 src/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java | 63 src/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java | 63 src/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java | 50 src/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 630 src/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java | 68 src/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 66 src/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 221 src/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 50 src/org/classpath/icedtea/pulseaudio/StreamEvent.java | 58 src/org/classpath/icedtea/pulseaudio/StreamListener.java | 47 src/org_classpath_icedtea_pulseaudio_EventLoop.c | 269 src/org_classpath_icedtea_pulseaudio_Operation.c | 43 src/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 289 src/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 60 src/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c | 267 diffs (truncated from 26728 to 500 lines): diff -r 5c09d21c2d70 -r ab743c774cb2 ChangeLog --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ChangeLog Mon Aug 11 10:22:45 2008 -0400 @@ -0,0 +1,22 @@ +2008-08-11 Joshua Sumali + + * ChangeLog: New file. + * INSTALL: Likewise. + * NEWS: Likewise. + * Makefile.am: Likewise. + * build.xml: Likewise. + * config.guess: Likewise. + * config.sub: Likewise. + * configure.ac: Likewise. + * depcomp: Likewise. + * install-sh: Likewise. + * libtool: Likewise. + * ltmain.sh: Likewise. + * missing: Likewise. + * src/org/*: Moved to src/java. + * src/META-INF: Moved to src/java. + * src/native/Makefile.am: New file. + * makefile: Removed. + * src/*.c: Moved to src/native. + * src/*.h: Likewise. + diff -r 5c09d21c2d70 -r ab743c774cb2 INSTALL --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/INSTALL Mon Aug 11 10:22:45 2008 -0400 @@ -0,0 +1,1 @@ +No install instructions yet! diff -r 5c09d21c2d70 -r ab743c774cb2 Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.am Mon Aug 11 10:22:45 2008 -0400 @@ -0,0 +1,5 @@ +SUBDIRS = src/native + +clean-local: + ant clean + diff -r 5c09d21c2d70 -r ab743c774cb2 build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build.xml Mon Aug 11 10:22:45 2008 -0400 @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 5c09d21c2d70 -r ab743c774cb2 config.guess --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.guess Mon Aug 11 10:22:45 2008 -0400 @@ -0,0 +1,1526 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi at noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; From bugzilla-daemon at icedtea.classpath.org Mon Aug 11 07:28:41 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 11 Aug 2008 14:28:41 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ------- Comment #4 from langel at redhat.com 2008-08-11 14:28 ------- I am able to reproduce this. Looking into it. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From jsumali at redhat.com Mon Aug 11 07:37:18 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Mon, 11 Aug 2008 10:37:18 -0400 Subject: pulseaudio build system Message-ID: <48A04E9E.7020909@redhat.com> Hi, The latest patch I committed converts the old pulseaudio build system into using Autotools for building the .so, and Ant for generating headers and creating the pulseaudio jar. Building now is just: `./configure; ant; make`. I'd like this to be just a `make`, but I can't figure out how to do this at the moment ... @Omair and Ioana: -Fresh checkouts require you to run autoreconf to generate ./configure -When new headers need to be generated, add the class names in build.xml -When new C files/headers are added, be sure to add them in src/native/Makefile.am -The .so ends up in ./src/native/.libs/libpulse-java.so right now. We should probably figure out how to put this in the pulseaudio/ directory after it's built. Josh From jsumali at redhat.com Mon Aug 11 07:43:29 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Mon, 11 Aug 2008 14:43:29 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Joshua Sumali changeset af943a0023a2 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=af943a0023a2 description: 2008-08-11 Joshua Sumali * .hgignore: Updated. diffstat: 2 files changed, 16 insertions(+) .hgignore | 12 ++++++++++++ ChangeLog | 4 ++++ diffs (30 lines): diff -r ab743c774cb2 -r af943a0023a2 .hgignore --- a/.hgignore Mon Aug 11 10:22:45 2008 -0400 +++ b/.hgignore Mon Aug 11 10:43:20 2008 -0400 @@ -8,3 +8,15 @@ org_classpath_icedtea_*.h *.log bin/* lib/* +Makefile +Makefile.in +aclocal.m4 +config.status +configure +pulseaudio-java.jar +libtool +autom4te.cache/* +src/native/.deps +src/native/.libs +src/native/*.lo +src/native/*.la diff -r ab743c774cb2 -r af943a0023a2 ChangeLog --- a/ChangeLog Mon Aug 11 10:22:45 2008 -0400 +++ b/ChangeLog Mon Aug 11 10:43:20 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-11 Joshua Sumali + + * .hgignore: Updated. + 2008-08-11 Joshua Sumali * ChangeLog: New file. From jsumali at redhat.com Mon Aug 11 10:22:34 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Mon, 11 Aug 2008 17:22:34 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Joshua Sumali changeset eb66a69d6a99 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=eb66a69d6a99 description: 2008-08-11 Joshua Sumali * .hgignore: Updated. * Makefile.am: Add libpulse-java.so to clean-local. * src/native/Makefile.am: Copy libpulse-java.so to the top dir after building. diffstat: 4 files changed, 15 insertions(+), 1 deletion(-) .hgignore | 1 + ChangeLog | 7 +++++++ Makefile.am | 3 ++- src/native/Makefile.am | 5 +++++ diffs (48 lines): diff -r af943a0023a2 -r eb66a69d6a99 .hgignore --- a/.hgignore Mon Aug 11 10:43:20 2008 -0400 +++ b/.hgignore Mon Aug 11 13:22:06 2008 -0400 @@ -14,6 +14,7 @@ config.status config.status configure pulseaudio-java.jar +libpulse-java.so libtool autom4te.cache/* src/native/.deps diff -r af943a0023a2 -r eb66a69d6a99 ChangeLog --- a/ChangeLog Mon Aug 11 10:43:20 2008 -0400 +++ b/ChangeLog Mon Aug 11 13:22:06 2008 -0400 @@ -1,3 +1,10 @@ 2008-08-11 Joshua Sumali + + * .hgignore: Updated. + * Makefile.am: Add libpulse-java.so to clean-local. + * src/native/Makefile.am: Copy libpulse-java.so to the top dir after + building. + 2008-08-11 Joshua Sumali * .hgignore: Updated. diff -r af943a0023a2 -r eb66a69d6a99 Makefile.am --- a/Makefile.am Mon Aug 11 10:43:20 2008 -0400 +++ b/Makefile.am Mon Aug 11 13:22:06 2008 -0400 @@ -1,5 +1,6 @@ SUBDIRS = src/native SUBDIRS = src/native clean-local: - ant clean + ant clean ; \ + rm -f libpulse-java.so ; diff -r af943a0023a2 -r eb66a69d6a99 src/native/Makefile.am --- a/src/native/Makefile.am Mon Aug 11 10:43:20 2008 -0400 +++ b/src/native/Makefile.am Mon Aug 11 13:22:06 2008 -0400 @@ -15,3 +15,8 @@ AM_LDFLAGS = -g -Wall -Werror PLATFORM_FLAGS = -DWITH_32BIT_PLATFORM +topdir = ../.. + +all-local: $(lib_LTLIBRARIES) + cp .libs/libpulse-java.so $(topdir) + From jim at jimpick.com Sun Aug 10 22:48:01 2008 From: jim at jimpick.com (Jim Pick) Date: Sun, 10 Aug 2008 22:48:01 -0700 Subject: Icedtea/Classpath Server Downtime In-Reply-To: <489E51B7.8050506@jimpick.com> References: <489DE1C9.2060901@jimpick.com> <489E51B7.8050506@jimpick.com> Message-ID: <489FD291.5050505@jimpick.com> Jim Pick wrote: > Jim Pick wrote: >> Hi, >> >> I need to take the server down to investigate a possible failed disk in >> the software RAID. I am hoping that it's just a Linux or Xen bug. >> Also, I'd like to upgrade Xen to a more modern version if possible. >> >> I'm planning to take the server down in about 3 hours (around 2pm >> Pacific Time). Hopefully, it won't take me too long to investigate >> and/or upgrade it. >> >> There is always the possibility that things won't go well with the RAID >> or the upgrade. I only have the one server online, so if I encounter >> any big problems, please be patient as I try to figure out the best way >> to recover. Luckily, I do have recent backups. >> >> This will affect jimpick.com, kaffe.org, developer.classpath.org, >> planet.classpath.org, and icedtea.classpath.org. >> >> While the server is down, my jimpick.com/kaffe.org email addresses will >> not be working. I can still be reached at my backup email address at >> . > > The server is back now. If you see anything strange, send me an email. I'm finally done, and things should be back online. Everything has been converted to RAID1 - there isn't much disk space left, but at least the data should be safe. Sorry about all the downtime. Cheers, - Jim From jsumali at redhat.com Mon Aug 11 10:39:54 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Mon, 11 Aug 2008 17:39:54 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Joshua Sumali changeset a1efb395982d in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=a1efb395982d description: 2008-08-11 Joshua Sumali * src/native/Makefile.am: Add flags to link against pulseaudio. diffstat: 2 files changed, 6 insertions(+), 2 deletions(-) ChangeLog | 4 ++++ src/native/Makefile.am | 4 ++-- diffs (25 lines): diff -r eb66a69d6a99 -r a1efb395982d ChangeLog --- a/ChangeLog Mon Aug 11 13:22:06 2008 -0400 +++ b/ChangeLog Mon Aug 11 13:39:44 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-11 Joshua Sumali + + * src/native/Makefile.am: Add flags to link against pulseaudio. + 2008-08-11 Joshua Sumali * .hgignore: Updated. diff -r eb66a69d6a99 -r a1efb395982d src/native/Makefile.am --- a/src/native/Makefile.am Mon Aug 11 13:22:06 2008 -0400 +++ b/src/native/Makefile.am Mon Aug 11 13:39:44 2008 -0400 @@ -10,8 +10,8 @@ libpulse_java_la_SOURCES = \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h -AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) -AM_LDFLAGS = -g -Wall -Werror +AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) -D_REENTRANT +AM_LDFLAGS = -g -Wall -Werror -lpulse PLATFORM_FLAGS = -DWITH_32BIT_PLATFORM From jsumali at redhat.com Mon Aug 11 11:19:23 2008 From: jsumali at redhat.com (Joshua Sumali) Date: Mon, 11 Aug 2008 18:19:23 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Joshua Sumali changeset 6191e870eef3 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6191e870eef3 description: 2008-08-11 Joshua Sumali * configure.ac: Add check for libpulse. * src/native/Makefile.am: Use flags from PKG_CHECK_MODULES. diffstat: 3 files changed, 20 insertions(+), 3 deletions(-) ChangeLog | 5 +++++ configure.ac | 14 +++++++++++++- src/native/Makefile.am | 4 ++-- diffs (50 lines): diff -r a1efb395982d -r 6191e870eef3 ChangeLog --- a/ChangeLog Mon Aug 11 13:39:44 2008 -0400 +++ b/ChangeLog Mon Aug 11 14:19:09 2008 -0400 @@ -1,3 +1,8 @@ 2008-08-11 Joshua Sumali + + * configure.ac: Add check for libpulse. + * src/native/Makefile.am: Use flags from PKG_CHECK_MODULES. + 2008-08-11 Joshua Sumali * src/native/Makefile.am: Add flags to link against pulseaudio. diff -r a1efb395982d -r 6191e870eef3 configure.ac --- a/configure.ac Mon Aug 11 13:39:44 2008 -0400 +++ b/configure.ac Mon Aug 11 14:19:09 2008 -0400 @@ -1,7 +1,19 @@ AC_INIT([pulseaudio],[0.1],[omajid at redha -AC_INIT([pulseaudio],[0.1],[omajid at redhat.com]) +AC_INIT([pulseaudio-java],[0.1],[omajid at redhat.com]) AM_INIT_AUTOMAKE AC_PROG_CC AC_PROG_LIBTOOL + +dnl Check for pulseaudio libraries. +PKG_CHECK_MODULES(LIBPULSE,libpulse,[LIBPULSE_FOUND=yes] + ,[LIBPULSE_FOUND=no]) +if test "x${LIBPULSE_FOUND}" = xno +then + AC_MSG_ERROR([Could not find pulseaudio libraries - \ + Try installing pulseaudio-libs-devel.]) +fi +AC_SUBST(LIBPULSE_CFLAGS) +AC_SUBST(LIBPULSE_LIBS) + AC_CONFIG_FILES([ Makefile src/native/Makefile diff -r a1efb395982d -r 6191e870eef3 src/native/Makefile.am --- a/src/native/Makefile.am Mon Aug 11 13:39:44 2008 -0400 +++ b/src/native/Makefile.am Mon Aug 11 14:19:09 2008 -0400 @@ -10,8 +10,8 @@ libpulse_java_la_SOURCES = \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h -AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) -D_REENTRANT -AM_LDFLAGS = -g -Wall -Werror -lpulse +AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) $(LIBPULSE_CFLAGS) +AM_LDFLAGS = -g -Wall -Werror $(LIBPULSE_LIBS) PLATFORM_FLAGS = -DWITH_32BIT_PLATFORM From omajid at redhat.com Mon Aug 11 11:40:52 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 11 Aug 2008 18:40:52 +0000 Subject: changeset in /hg/pulseaudio: merged branches Message-ID: changeset 6d8250e41a44 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6d8250e41a44 description: merged branches diffstat: 3 files changed, 20 insertions(+), 3 deletions(-) ChangeLog | 5 +++++ configure.ac | 14 +++++++++++++- src/native/Makefile.am | 4 ++-- diffs (50 lines): diff -r 3a4ea335aefc -r 6d8250e41a44 ChangeLog --- a/ChangeLog Mon Aug 11 14:34:54 2008 -0400 +++ b/ChangeLog Mon Aug 11 14:40:43 2008 -0400 @@ -1,3 +1,8 @@ 2008-08-11 Joshua Sumali + + * configure.ac: Add check for libpulse. + * src/native/Makefile.am: Use flags from PKG_CHECK_MODULES. + 2008-08-11 Joshua Sumali * src/native/Makefile.am: Add flags to link against pulseaudio. diff -r 3a4ea335aefc -r 6d8250e41a44 configure.ac --- a/configure.ac Mon Aug 11 14:34:54 2008 -0400 +++ b/configure.ac Mon Aug 11 14:40:43 2008 -0400 @@ -1,7 +1,19 @@ AC_INIT([pulseaudio],[0.1],[omajid at redha -AC_INIT([pulseaudio],[0.1],[omajid at redhat.com]) +AC_INIT([pulseaudio-java],[0.1],[omajid at redhat.com]) AM_INIT_AUTOMAKE AC_PROG_CC AC_PROG_LIBTOOL + +dnl Check for pulseaudio libraries. +PKG_CHECK_MODULES(LIBPULSE,libpulse,[LIBPULSE_FOUND=yes] + ,[LIBPULSE_FOUND=no]) +if test "x${LIBPULSE_FOUND}" = xno +then + AC_MSG_ERROR([Could not find pulseaudio libraries - \ + Try installing pulseaudio-libs-devel.]) +fi +AC_SUBST(LIBPULSE_CFLAGS) +AC_SUBST(LIBPULSE_LIBS) + AC_CONFIG_FILES([ Makefile src/native/Makefile diff -r 3a4ea335aefc -r 6d8250e41a44 src/native/Makefile.am --- a/src/native/Makefile.am Mon Aug 11 14:34:54 2008 -0400 +++ b/src/native/Makefile.am Mon Aug 11 14:40:43 2008 -0400 @@ -12,8 +12,8 @@ libpulse_java_la_SOURCES = \ org_classpath_icedtea_pulseaudio_Operation.h \ org_classpath_icedtea_pulseaudio_Operation.c -AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) -D_REENTRANT -AM_LDFLAGS = -g -Wall -Werror -lpulse +AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) $(LIBPULSE_CFLAGS) +AM_LDFLAGS = -g -Wall -Werror $(LIBPULSE_LIBS) PLATFORM_FLAGS = -DWITH_32BIT_PLATFORM From omajid at redhat.com Mon Aug 11 11:40:52 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 11 Aug 2008 18:40:52 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Omair Majid changeset 3a4ea335aefc in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=3a4ea335aefc description: 2008-08-11 Omair Majid * .classpath: fixed eclipse project settings to use src/java as the source directory * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: fixed to point to the generated .so file * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java: same * src/native/Makefile.am: added org_classpath_icedtea_pulseaudio_Operation.{c,h} as files to be compiled * build.xml: added Operation as a class to generate header files for diffstat: 5 files changed, 5 insertions(+), 4 deletions(-) .classpath | 2 +- build.xml | 1 + src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 1 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 1 - src/native/Makefile.am | 4 +++- diffs (60 lines): diff -r a1efb395982d -r 3a4ea335aefc .classpath --- a/.classpath Mon Aug 11 13:39:44 2008 -0400 +++ b/.classpath Mon Aug 11 14:34:54 2008 -0400 @@ -1,8 +1,8 @@ - + diff -r a1efb395982d -r 3a4ea335aefc build.xml --- a/build.xml Mon Aug 11 13:39:44 2008 -0400 +++ b/build.xml Mon Aug 11 14:34:54 2008 -0400 @@ -36,6 +36,7 @@ + diff -r a1efb395982d -r 3a4ea335aefc src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 11 13:39:44 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 11 14:34:54 2008 -0400 @@ -111,7 +111,6 @@ public class PulseAudioSourceDataLine im static { try { String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar + "lib" + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); System.out.println(library); diff -r a1efb395982d -r 3a4ea335aefc src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Mon Aug 11 13:39:44 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Mon Aug 11 14:34:54 2008 -0400 @@ -14,7 +14,6 @@ public class PulseAudioStreamVolumeContr static { try { String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar + "lib" + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); System.out.println(library); diff -r a1efb395982d -r 3a4ea335aefc src/native/Makefile.am --- a/src/native/Makefile.am Mon Aug 11 13:39:44 2008 -0400 +++ b/src/native/Makefile.am Mon Aug 11 14:34:54 2008 -0400 @@ -8,7 +8,9 @@ libpulse_java_la_SOURCES = \ org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c \ org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ - org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h + org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h \ + org_classpath_icedtea_pulseaudio_Operation.h \ + org_classpath_icedtea_pulseaudio_Operation.c AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) -D_REENTRANT AM_LDFLAGS = -g -Wall -Werror -lpulse From langel at redhat.com Mon Aug 11 12:12:16 2008 From: langel at redhat.com (Lillian Angel) Date: Mon, 11 Aug 2008 19:12:16 +0000 Subject: changeset in /hg/icedtea6: 2008-08-11 Lillian Angel changeset bbb08c1771b2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=bbb08c1771b2 description: 2008-08-11 Lillian Angel Fixes Bug #181 * Makefile.am: Added new patch to the list. * patches/icedtea-enum-bug-181.patch: New patch. diffstat: 3 files changed, 18 insertions(+) ChangeLog | 6 ++++++ Makefile.am | 1 + patches/icedtea-enum-bug-181.patch | 11 +++++++++++ diffs (39 lines): diff -r a86e963e785f -r bbb08c1771b2 ChangeLog --- a/ChangeLog Fri Aug 08 12:26:14 2008 -0400 +++ b/ChangeLog Mon Aug 11 15:12:08 2008 -0400 @@ -1,3 +1,9 @@ 2008-08-08 Joshua Sumali + + Fixes Bug #181 + * Makefile.am: Added new patch to the list. + * patches/icedtea-enum-bug-181.patch: New patch. + 2008-08-08 Joshua Sumali * Makefile.am: Add ALT_JAR_CMD to ICEDTEA_ENV if --with-alt-jar is used. diff -r a86e963e785f -r bbb08c1771b2 Makefile.am --- a/Makefile.am Fri Aug 08 12:26:14 2008 -0400 +++ b/Makefile.am Mon Aug 11 15:12:08 2008 -0400 @@ -500,6 +500,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-hotspot-citypeflow.patch \ patches/icedtea-alpha-fixes.patch \ patches/icedtea-alt-jar.patch \ + patches/icedtea-enum-bu-181.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ patches/icedtea-arch.patch diff -r a86e963e785f -r bbb08c1771b2 patches/icedtea-enum-bug-181.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-enum-bug-181.patch Mon Aug 11 15:12:08 2008 -0400 @@ -0,0 +1,11 @@ +--- openjdkold/jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2008-07-10 15:57:13.000000000 -0400 ++++ openjdk/jdk/src/share/classes/sun/beans/editors/EnumEditor.java 2008-08-11 15:07:05.000000000 -0400 +@@ -67,7 +67,7 @@ + } + + public void setValue( Object value ) { +- if ( ( value != null ) && ( this.type != value.getClass() ) ) { ++ if ( ( value != null ) && ! ( this.type.isInstance( value ) ) ) { + throw new IllegalArgumentException( "Unsupported value: " + value ); + } + Object oldValue; From bugzilla-daemon at icedtea.classpath.org Mon Aug 11 12:12:45 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 11 Aug 2008 19:12:45 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #5 from langel at redhat.com 2008-08-11 19:12 ------- I committed a patch for this. I have filed the issue upstream as well. I will post a link to the bug report when it is released. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Mon Aug 11 13:49:32 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 11 Aug 2008 20:49:32 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Omair Majid changeset 03d5da3409ac in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=03d5da3409ac description: 2008-08-11 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java: fixed library path * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: added support for finding a DataLine with the last valid format in the list of valid formats asked for * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: added a default format for each line which will be used for doing a simple open(). spacing changes (used ctrl+shift+f in eclipse) * src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c: fixed the execption class that was being thrown incase of an incorrect sample specification (aka audio format) * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java: added a note to explain that a test is currently failing * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: slightly modified the audio format tests to print out more info diffstat: 6 files changed, 129 insertions(+), 79 deletions(-) src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 12 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 59 +++++-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 83 +++++----- src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 11 + unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 10 + unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 33 ++- diffs (459 lines): diff -r 6d8250e41a44 -r 03d5da3409ac src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Mon Aug 11 14:40:43 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Mon Aug 11 16:49:26 2008 -0400 @@ -103,17 +103,15 @@ public class EventLoop implements Runnab */ static { - //try { - /*String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar + "lib" + try { + String library = new java.io.File(".").getCanonicalPath() + java.io.File.separatorChar - + System.mapLibraryName("pulse-java");*/ - String library = "/home/yyz/iivan/workspace/pulseaudio/lib/libpulse-java.so"; + + System.mapLibraryName("pulse-java"); System.out.println(library); System.load(library); - /*} catch (IOException e) { + } catch (IOException e) { assert ("Loading failed".endsWith("library")); - }*/ + } } private EventLoop() { diff -r 6d8250e41a44 -r 03d5da3409ac src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Mon Aug 11 14:40:43 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Mon Aug 11 16:49:26 2008 -0400 @@ -103,14 +103,40 @@ public class PulseAudioMixer implements PulseAudioSourceDataLine sourceLine = null; sourceLine = new PulseAudioSourceDataLine(eventLoop); Line.Info sourceDataLineInfo = sourceLine.getLineInfo(); - /*if (info instanceof DataLine.Info) { - if (info.matches(sourceDataLineInfo)) { - sourceLines.add(sourceLine); - return sourceLine; - } - }*/ - - return sourceLine; + + if (DataLine.class.isAssignableFrom(info.getLineClass()) + && info instanceof DataLine.Info) { + System.out + .println("DEBUG: trying to find data line with last matching format"); + + DataLine.Info dataLineInfo = (DataLine.Info) info; + // need to find the DataLine with the last valid format + AudioFormat[] wantedFormats = dataLineInfo.getFormats(); + AudioFormat[] availableFormats = ((DataLine.Info) sourceDataLineInfo) + .getFormats(); + for (int i = wantedFormats.length - 1; i > -1; i--) { + for (AudioFormat aFormat : availableFormats) { + if (wantedFormats[i].matches(aFormat)) { + System.out.println("DEBUG: found a matching format"); + System.out.println("wanted: " + wantedFormats[i]); + System.out.println("available: " + aFormat); + sourceLine.setDefaultFormat(wantedFormats[i]); + sourceLines.add(sourceLine); + return sourceLine; + } + } + } + + System.out.println("DEBUG: no matches found"); + // no format matches, so return any line + throw new IllegalArgumentException("No matching format found"); + + } + + if (info.matches(sourceDataLineInfo)) { + sourceLines.add(sourceLine); + return sourceLine; + } // if (info.matches(_targetDataLineInfo)) { // PulseAudioTargetDataLine targetLine = new PulseAudioTargetDataLine(); @@ -118,7 +144,7 @@ public class PulseAudioMixer implements // return targetLine; // } - //throw new IllegalArgumentException(); + throw new IllegalArgumentException(); } @Override @@ -430,21 +456,24 @@ public class PulseAudioMixer implements System.out.println("got a line"); - //File soundFile = new File(new java.io.File(".").getCanonicalPath() + "/testsounds/logout.wav"); - File soundFile = new File( "/home/iivan/workspace/pulseaudio/testsounds/logout.wav"); + // File soundFile = new File(new java.io.File(".").getCanonicalPath() + + // "/testsounds/logout.wav"); + File soundFile = new File( + "/home/iivan/workspace/pulseaudio/testsounds/logout.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); AudioFormat audioFormat = audioInputStream.getFormat(); line.open(audioFormat); line.start(); - PulseAudioStreamVolumeControl control = (PulseAudioStreamVolumeControl) line.getControl(FloatControl.Type.VOLUME); - PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line.getControl(BooleanControl.Type.MUTE); + PulseAudioStreamVolumeControl control = (PulseAudioStreamVolumeControl) line + .getControl(FloatControl.Type.VOLUME); + PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line + .getControl(BooleanControl.Type.MUTE); mute.setValue(true); control.setValue(40000); mute.setValue(false); System.out.println("Volume set to " + control.getValue()); - - + byte[] abData = new byte[1000]; int bytesRead = 0; diff -r 6d8250e41a44 -r 03d5da3409ac src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 11 14:40:43 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 11 16:49:26 2008 -0400 @@ -72,9 +72,10 @@ public class PulseAudioSourceDataLine im private List supportedFormats = null; private AudioFormat currentFormat = null; + private AudioFormat defaultFormat = null; private List listeners; - + private Control[] controls = new Control[2]; private PulseAudioStreamMuteControl muteControl; private PulseAudioStreamVolumeControl volumeControl; @@ -121,18 +122,10 @@ public class PulseAudioSourceDataLine im } - - - - - - public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; this.listeners = new ArrayList(); this.volume = 65536; - - /* * FIXME puselaudio supports any sample rate (it can covert between @@ -150,9 +143,9 @@ public class PulseAudioSourceDataLine im * * */ - + supportedFormats = new LinkedList(); - + Map properties; int[] channelSizes = new int[] { 1, 2, 5 }; @@ -165,8 +158,7 @@ public class PulseAudioSourceDataLine im // as soon as they change something // FIXME ^ int sampleSize = 8; // in bits - AudioFormat PA_SAMPLE_U8 = new AudioFormat( - Encoding.PCM_UNSIGNED, // encoding + AudioFormat PA_SAMPLE_U8 = new AudioFormat(Encoding.PCM_UNSIGNED, // encoding AudioSystem.NOT_SPECIFIED, // sample rate sampleSize, // sample size channelSize, // channels @@ -316,32 +308,31 @@ public class PulseAudioSourceDataLine im currentFormat = null; - } protected boolean isMuted() { return muted; } - + protected void setMuted(boolean value) { muted = value; } - + protected float getVolume() { return this.volume; } - + protected void setVolume(float value) { this.volume = value; - - } - + + } + public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { if (isOpen) { throw new IllegalStateException("Line is already open"); } - + // ignore suggested buffer size for (AudioFormat myFormat : supportedFormats) { @@ -354,8 +345,10 @@ public class PulseAudioSourceDataLine im isOpen = true; } } - - //throw new IllegalArgumentException("invalid format"); + // no matches found + if (!isOpen) { + throw new IllegalArgumentException("Invalid format"); + } final Semaphore semaphore = new Semaphore(0); @@ -383,7 +376,7 @@ public class PulseAudioSourceDataLine im // stream"); } System.out.println(this.getClass().getName() + "stream is ready"); - + volumeControl = new PulseAudioStreamVolumeControl(this); controls[0] = volumeControl; muteControl = new PulseAudioStreamMuteControl(this); @@ -398,9 +391,12 @@ public class PulseAudioSourceDataLine im public void open() throws LineUnavailableException { // pick a random format - AudioFormat format = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, - 2, 2, AudioSystem.NOT_SPECIFIED, false); - open(format, DEFAULT_BUFFER_SIZE); + if (defaultFormat == null) { + defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, + 2, AudioSystem.NOT_SPECIFIED, false); + } + + open(defaultFormat, DEFAULT_BUFFER_SIZE); } @Override @@ -443,16 +439,16 @@ public class PulseAudioSourceDataLine im } public void start() { - if (isPaused) { - native_resume(); - isPaused = false; - } + if (isPaused) { + native_resume(); + isPaused = false; + } /* * for(LineListener l :listeners) { l.update(new LineEvent(this, * LineEvent.Type.START, 0)); } */ - + } public void stop() { @@ -507,6 +503,14 @@ public class PulseAudioSourceDataLine im return currentFormat; } + public void setDefaultFormat(AudioFormat format) { + for (AudioFormat aFormat : supportedFormats) { + if (format.matches(aFormat)) { + defaultFormat = format; + } + } + } + public int getFramePosition() { // TODO Auto-generated method stub return 0; @@ -527,7 +531,6 @@ public class PulseAudioSourceDataLine im return 0; } - public boolean isActive() { // TODO Auto-generated method stub return false; @@ -540,7 +543,7 @@ public class PulseAudioSourceDataLine im public Control getControl(Type control) { for (int i = 0; i < controls.length; i++) { - if (controls[i].getType() == control){ + if (controls[i].getType() == control) { return controls[i]; } @@ -553,8 +556,8 @@ public class PulseAudioSourceDataLine im } public javax.sound.sampled.Line.Info getLineInfo() { - return new DataLine.Info(SourceDataLine.class, - supportedFormats.toArray(new AudioFormat[0]), 0, 100000); + return new DataLine.Info(SourceDataLine.class, supportedFormats + .toArray(new AudioFormat[0]), 0, 100000); } public boolean isControlSupported(Type control) { @@ -570,7 +573,7 @@ public class PulseAudioSourceDataLine im operation = new Operation(native_drain()); operationState = operation.getState(); } - + // FIXME need to find a way to do a wait than a busy loop while (operationState != Operation.State.Done) { synchronized (eventLoop.threadLock) { @@ -595,7 +598,7 @@ public class PulseAudioSourceDataLine im operationState = operation.getState(); } } - + operation.releaseReference(); } @@ -629,12 +632,10 @@ public class PulseAudioSourceDataLine im streamListener.update(e); } } - + protected EventLoop getEventLoop() { return this.eventLoop; } - - public long getStreamPointer() { return streamPointer; diff -r 6d8250e41a44 -r 03d5da3409ac src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Mon Aug 11 14:40:43 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Mon Aug 11 16:49:26 2008 -0400 @@ -136,7 +136,7 @@ JNIEXPORT void JNICALL Java_org_classpat sample_spec.format = PA_SAMPLE_S32LE; } else { printf("error in open: encoding is : %s\n", encoding); - throwByName(env, "IllegalArgumentException", "Invalid format"); + throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); /* clean up */ free(java_context); (*env)->DeleteGlobalRef(env, obj); @@ -144,11 +144,18 @@ JNIEXPORT void JNICALL Java_org_classpat return; } + sample_spec.rate = sampleRate; sample_spec.channels = channels; + printf("sample_spec.rate = %d\n", sample_spec.rate); + printf("sample_spec.channels = %d\n", sample_spec.channels); + + + if ( !pa_sample_spec_valid(&sample_spec)) { - throwByName(env, "IllegalArgumentException", "Invalid format"); + printf("error: invalid format\n"); + throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); /* clean up */ free(java_context); (*env)->DeleteGlobalRef(env, obj); diff -r 6d8250e41a44 -r 03d5da3409ac unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Mon Aug 11 14:40:43 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Mon Aug 11 16:49:26 2008 -0400 @@ -172,6 +172,16 @@ public class PulseAudioMixerTest { public void testSourceLinesOpenAndClose() throws LineUnavailableException { System.out.println("This test checks if source lines open and close"); selectedMixer.open(); + + + /* + * FIXME + * This test currently fails. The mixer returns information about the line + * which leaves a lot of things as NOT_SPECIFIED + * when using that to do a get line, things match, and the line returned + * still has a few parameters as NOT_SPECIFIED and doing an open() on that fails + * + */ Line.Info allLineInfo[] = selectedMixer.getSourceLineInfo(); for (Line.Info lineInfo : allLineInfo) { SourceDataLine sourceDataLine = (SourceDataLine) selectedMixer diff -r 6d8250e41a44 -r 03d5da3409ac unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Mon Aug 11 14:40:43 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Mon Aug 11 16:49:26 2008 -0400 @@ -106,24 +106,29 @@ public class PulseSourceDataLineTest { @Test public void testFindLineWithFormat() throws LineUnavailableException { + System.out.println("This test tries to find a line with a valid format"); + AudioFormat wantedFormat = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); + System.out.println(wantedFormat); + SourceDataLine line = (SourceDataLine) mixer.getLine(new DataLine.Info( + SourceDataLine.class, wantedFormat)); + line.open(); + System.out.println(line.getFormat()); + + } + + @Test(expected = IllegalArgumentException.class) + public void testFindLineWithWrongFormat() throws LineUnavailableException { + System.out + .println("This test tries to acquire a line with incorrect format spec"); SourceDataLine line = (SourceDataLine) mixer.getLine(new DataLine.Info( SourceDataLine.class, new AudioFormat( - AudioFormat.Encoding.PCM_UNSIGNED, 44100, 8, 1, 1, 10, - true))); + AudioFormat.Encoding.PCM_UNSIGNED, 44100, 10000, 1, 13, + 10, true))); line.open(); } - @Test (expected = IllegalArgumentException.class) - public void testFindLineWithWrongFormat() throws LineUnavailableException { - SourceDataLine line = (SourceDataLine) mixer.getLine(new DataLine.Info( - SourceDataLine.class, new AudioFormat( - AudioFormat.Encoding.PCM_UNSIGNED, 44100, 100000, 1, 1, 10, - true))); - line.open(); - - } - @Test public void testVolumeAndMute() throws Exception { Mixer.Info mixerInfos[] = AudioSystem.getMixerInfo(); @@ -153,10 +158,10 @@ public class PulseSourceDataLineTest { .getControl(FloatControl.Type.VOLUME); PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line .getControl(BooleanControl.Type.MUTE); - + mute.setValue(true); volume.setValue(40000); - + mute.setValue(false); byte[] abData = new byte[1000]; From omajid at redhat.com Mon Aug 11 14:38:38 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 11 Aug 2008 21:38:38 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Omair Majid changeset ffc11c4c5c53 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=ffc11c4c5c53 description: 2008-08-11 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: replaced volume value with constant * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java: added a check in setValue() for a valid value * src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java: added constants for min and max value * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: modified the test to use the constants diffstat: 4 files changed, 13 insertions(+), 3 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 2 +- src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 7 +++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 5 ++++- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 2 +- diffs (66 lines): diff -r e77e418081f7 -r ffc11c4c5c53 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 11 16:55:35 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 11 17:30:11 2008 -0400 @@ -125,7 +125,7 @@ public class PulseAudioSourceDataLine im public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; this.listeners = new ArrayList(); - this.volume = 65536; + this.volume = PulseAudioVolumeControl.MAX_VOLUME; /* * FIXME puselaudio supports any sample rate (it can covert between diff -r e77e418081f7 -r ffc11c4c5c53 src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Mon Aug 11 16:55:35 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Mon Aug 11 17:30:11 2008 -0400 @@ -6,7 +6,10 @@ import org.classpath.icedtea.pulseaudio. import org.classpath.icedtea.pulseaudio.PulseAudioVolumeControl; public class PulseAudioStreamVolumeControl extends PulseAudioVolumeControl { + + @SuppressWarnings("unused") private long streamPointer; + private EventLoop eventLoop; private PulseAudioSourceDataLine line; @@ -31,6 +34,10 @@ public class PulseAudioStreamVolumeContr } public synchronized void setValue(float newValue) { + if ( newValue > PulseAudioVolumeControl.MAX_VOLUME || newValue < PulseAudioStreamVolumeControl.MIN_VOLUME) { + throw new IllegalArgumentException("invalid value"); + } + if(!line.isMuted()) { setStreamVolume(newValue); } diff -r e77e418081f7 -r ffc11c4c5c53 src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Mon Aug 11 16:55:35 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Mon Aug 11 17:30:11 2008 -0400 @@ -41,9 +41,12 @@ import javax.sound.sampled.FloatControl; import javax.sound.sampled.FloatControl; abstract class PulseAudioVolumeControl extends FloatControl { + + public static final int MAX_VOLUME = 65536; + public static final int MIN_VOLUME = 0; protected PulseAudioVolumeControl(PulseAudioSourceDataLine line) { - super(FloatControl.Type.VOLUME, 0, 65536, 1, -1, line.getVolume(), "pulseaudio units", "Volume Off", "Default Volume", "Full Volume"); + super(FloatControl.Type.VOLUME, MIN_VOLUME, MAX_VOLUME, 1, -1, line.getVolume(), "pulseaudio units", "Volume Off", "Default Volume", "Full Volume"); } diff -r e77e418081f7 -r ffc11c4c5c53 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Mon Aug 11 16:55:35 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Mon Aug 11 17:30:11 2008 -0400 @@ -160,7 +160,7 @@ public class PulseSourceDataLineTest { .getControl(BooleanControl.Type.MUTE); mute.setValue(true); - volume.setValue(40000); + volume.setValue(PulseAudioStreamVolumeControl.MAX_VOLUME); mute.setValue(false); From omajid at redhat.com Mon Aug 11 14:38:38 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 11 Aug 2008 21:38:38 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Omair Majid changeset 686f9e8f1803 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=686f9e8f1803 description: 2008-08-11 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Operation.java: synchronized the native calls; start on a function to wait for operation to complete diffstat: 1 file changed, 37 insertions(+), 6 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Operation.java | 43 ++++++++++++-- diffs (82 lines): diff -r ffc11c4c5c53 -r 686f9e8f1803 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Aug 11 17:30:11 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Aug 11 17:38:17 2008 -0400 @@ -1,4 +1,6 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; + +import java.io.IOException; /* * Encapsulates a pa_operation object @@ -12,9 +14,22 @@ public class Operation { public class Operation { long operationPointer; + EventLoop eventLoop; public enum State { Running, Done, Cancelled, + } + + static { + try { + String library = new java.io.File(".").getCanonicalPath() + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(library); + System.load(library); + } catch (IOException e) { + assert ("Loading failed".endsWith("library")); + } } private native void native_ref(); @@ -25,21 +40,29 @@ public class Operation { public Operation(long operationPointer) { this.operationPointer = operationPointer; + this.eventLoop = EventLoop.getEventLoop(); } public void addReference() { - assert(operationPointer != 0); - native_ref(); + assert (operationPointer != 0); + synchronized (eventLoop.threadLock) { + native_ref(); + } } public void releaseReference() { - assert(operationPointer!= 0); - native_unref(); + assert (operationPointer != 0); + synchronized (eventLoop.threadLock) { + native_unref(); + } } public State getState() { - assert(operationPointer!= 0); - int state = native_get_state(); + assert (operationPointer != 0); + int state; + synchronized (eventLoop.threadLock) { + state = native_get_state(); + } switch (state) { case 0: return State.Running; @@ -53,4 +76,12 @@ public class Operation { } + public void waitForCompletion() { + throw new RuntimeException("not implemented"); + + synchronized (eventLoop.threadLock) { + eventLoop.threadLock.wait(); + } + + } } From omajid at redhat.com Mon Aug 11 14:38:38 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 11 Aug 2008 21:38:38 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Omair Majid changeset e77e418081f7 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=e77e418081f7 description: 2008-08-11 Omair Majid * libtool: removed file from version control diffstat: 1 file changed, 7895 deletions(-) libtool | 7895 --------------------------------------------------------------- diffs (truncated from 7899 to 500 lines): diff -r 03d5da3409ac -r e77e418081f7 libtool --- a/libtool Mon Aug 11 16:49:26 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7895 +0,0 @@ -#! /bin/sh - -# libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU pulseaudio 0.1) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED="/bin/sed" - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="/bin/sed -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags=" CXX F77" - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host toddy: - -# Shell to use when invoking shell scripts. -SHELL="/bin/sh" - -# Whether or not to build shared libraries. -build_libtool_libs=yes - -# Whether or not to build static libraries. -build_old_libs=yes - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=no - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=no - -# Whether or not to optimize for fast installation. -fast_install=yes - -# The host system. -host_alias= -host=i686-pc-linux-gnu -host_os=linux-gnu - -# The build system. -build_alias= -build=i686-pc-linux-gnu -build_os=linux-gnu - -# An echo program that does not interpret backslashes. -echo="echo" - -# The archiver. -AR="ar" -AR_FLAGS="cru" - -# A C compiler. -LTCC="gcc" - -# LTCC compiler flags. -LTCFLAGS="-g -O2" - -# A language-specific compiler. -CC="gcc" - -# Is the compiler the GNU C compiler? -with_gcc=yes - -# An ERE matcher. -EGREP="/bin/grep -E" - -# The linker used to build libraries. -LD="/usr/bin/ld" - -# Whether we need hard or soft links. -LN_S="ln -s" - -# A BSD-compatible nm program. -NM="/usr/bin/nm -B" - -# A symbol stripping program -STRIP="strip" - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=file - -# Used on cygwin: DLL creation program. -DLLTOOL="dlltool" - -# Used on cygwin: object dumper. -OBJDUMP="objdump" - -# Used on cygwin: assembler. -AS="as" - -# The name of the directory that contains temporary libtool files. -objdir=.libs - -# How to create reloadable object files. -reload_flag=" -r" -reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" - -# How to pass a linker flag through the compiler. -wl="-Wl," - -# Object file suffix (normally "o"). -objext="o" - -# Old archive suffix (normally "a"). -libext="a" - -# Shared library suffix (normally ".so"). -shrext_cmds='.so' - -# Executable file suffix (normally ""). -exeext="" - -# Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" -pic_mode=default - -# What is the maximum length of a command? -max_cmd_len=1966080 - -# Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" - -# Must we lock files when doing compilation? -need_locks="no" - -# Do we need the lib prefix for modules? -need_lib_prefix=no - -# Do we need a version for libraries? -need_version=no - -# Whether dlopen is supported. -dlopen_support=unknown - -# Whether dlopen of programs is supported. -dlopen_self=unknown - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=unknown - -# Compiler flag to prevent dynamic linking. -link_static_flag="-static" - -# Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec="" - -# Library versioning type. -version_type=linux - -# Format of library name prefix. -libname_spec="lib\$name" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" - -# The coded name of the library, if different from the real name. -soname_spec="\${libname}\${release}\${shared_ext}\$major" - -# Commands used to build and install an old-style archive. -RANLIB="ranlib" -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" -old_postuninstall_cmds="" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="" - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds="" - -# Commands used to build and install a shared archive. -archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ - cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ - \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ - \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" -postinstall_cmds="" -postuninstall_cmds="" - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds="" -module_expsym_cmds="" - -# Commands to strip libraries. -old_striplib="strip --strip-debug" -striplib="strip --strip-unneeded" - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects="" - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps="" - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps="" - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path="" - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method="pass_all" - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd="\$MAGIC_CMD" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="" - -# Flag that forces no undefined symbols. -no_undefined_flag="" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" - -# This is the shared library runtime path variable. -runpath_var=LD_RUN_PATH - -# This is the shared library path variable. -shlibpath_var=LD_LIBRARY_PATH - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=no - -# How to hardcode a shared library path into an executable. -hardcode_action=immediate - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=yes - -# Flag to hardcode $libdir into a binary during linking. -# This must work even if $libdir does not exist. -hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" - -# If ld is used when linking, flag to hardcode $libdir into -# a binary during linking. This must work even if $libdir does -# not exist. -hardcode_libdir_flag_spec_ld="" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="" - -# Set to yes if using DIR/libNAME during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=no - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=no - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=unsupported - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=no - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=unknown - -# Compile-time system search path for libraries -sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib" - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/xulrunner-1.9 " - -# Fix the shell variable $srcfile for the compiler. -fix_srcfile_path="" - -# Set to yes if exported symbols are required. -always_export_symbols=no - -# The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds="" - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - -# Symbols that must always be exported. -include_expsyms="" - -# ### END LIBTOOL CONFIG - -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= From doko at ubuntu.com Mon Aug 11 15:07:57 2008 From: doko at ubuntu.com (Matthias Klose) Date: Tue, 12 Aug 2008 00:07:57 +0200 Subject: changeset in /hg/icedtea6: 2008-08-11 Lillian Angel References: Message-ID: <48A0B83D.1080404@ubuntu.com> Lillian Angel schrieb: > patches/icedtea-alpha-fixes.patch \ > patches/icedtea-alt-jar.patch \ > + patches/icedtea-enum-bu-181.patch \ typo From twisti at complang.tuwien.ac.at Tue Aug 12 00:37:20 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Tue, 12 Aug 2008 07:37:20 +0000 Subject: changeset in /hg/icedtea6: 2008-08-12 Christian Thalinger changeset 7cd4d87f69f2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7cd4d87f69f2 description: 2008-08-12 Christian Thalinger * Makefile.am (ICEDTEA_PATCHES): Fixed typo. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 2 +- diffs (23 lines): diff -r bbb08c1771b2 -r 7cd4d87f69f2 ChangeLog --- a/ChangeLog Mon Aug 11 15:12:08 2008 -0400 +++ b/ChangeLog Tue Aug 12 09:37:13 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-11 Lillian Angel + + * Makefile.am (ICEDTEA_PATCHES): Fixed typo. + 2008-08-11 Lillian Angel Fixes Bug #181 diff -r bbb08c1771b2 -r 7cd4d87f69f2 Makefile.am --- a/Makefile.am Mon Aug 11 15:12:08 2008 -0400 +++ b/Makefile.am Tue Aug 12 09:37:13 2008 +0200 @@ -500,7 +500,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-hotspot-citypeflow.patch \ patches/icedtea-alpha-fixes.patch \ patches/icedtea-alt-jar.patch \ - patches/icedtea-enum-bu-181.patch \ + patches/icedtea-enum-bug-181.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ patches/icedtea-arch.patch From twisti at complang.tuwien.ac.at Tue Aug 12 00:38:13 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Tue, 12 Aug 2008 09:38:13 +0200 Subject: changeset in /hg/icedtea6: 2008-08-11 Lillian Angel References: <48A0B83D.1080404@ubuntu.com> Message-ID: <1218526693.15857.10.camel@cthalinger> On Tue, 2008-08-12 at 00:07 +0200, Matthias Klose wrote: > Lillian Angel schrieb: > > patches/icedtea-alpha-fixes.patch \ > > patches/icedtea-alt-jar.patch \ > > + patches/icedtea-enum-bu-181.patch \ > > typo I fixed it: http://icedtea.classpath.org/hg/icedtea6/rev/7cd4d87f69f2 - twisti From gbenson at redhat.com Tue Aug 12 02:35:28 2008 From: gbenson at redhat.com (Gary Benson) Date: Tue, 12 Aug 2008 09:35:28 +0000 Subject: changeset in /hg/icedtea6: 2008-08-12 Gary Benson changeset e8c5220a41f5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e8c5220a41f5 description: 2008-08-12 Gary Benson * patches/icedtea-shark.patch: Updated to latest Shark. * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise. * ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise. * ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Likewise. * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkType.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise. * ports/hotspot/src/share/vm/shark/shark_globals.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: New file. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMethod.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise. diffstat: 35 files changed, 2671 insertions(+), 598 deletions(-) ChangeLog | 37 patches/icedtea-shark.patch | 30 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp | 12 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp | 21 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp | 15 ports/hotspot/src/cpu/zero/vm/frame_zero.hpp | 4 ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp | 32 ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp | 11 ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp | 21 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 27 ports/hotspot/src/cpu/zero/vm/stack_zero.hpp | 3 ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp | 2 ports/hotspot/src/share/vm/includeDB_shark | 58 + ports/hotspot/src/share/vm/shark/llvmHeaders.hpp | 20 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 815 ++++++++++++---- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 74 - ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 162 +-- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 185 ++- ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 172 ++- ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 30 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp | 156 +++ ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 70 + ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 136 ++ ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 152 ++ ports/hotspot/src/share/vm/shark/sharkMethod.hpp | 91 + ports/hotspot/src/share/vm/shark/sharkMonitor.cpp | 154 +++ ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 92 + ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 209 ++++ ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 112 ++ ports/hotspot/src/share/vm/shark/sharkState.cpp | 194 +++ ports/hotspot/src/share/vm/shark/sharkState.hpp | 32 ports/hotspot/src/share/vm/shark/sharkType.cpp | 41 ports/hotspot/src/share/vm/shark/sharkType.hpp | 30 ports/hotspot/src/share/vm/shark/sharkValue.hpp | 43 ports/hotspot/src/share/vm/shark/shark_globals.hpp | 26 diffs (truncated from 4551 to 500 lines): diff -r 7cd4d87f69f2 -r e8c5220a41f5 ChangeLog --- a/ChangeLog Tue Aug 12 09:37:13 2008 +0200 +++ b/ChangeLog Tue Aug 12 05:35:18 2008 -0400 @@ -1,3 +1,40 @@ 2008-08-12 Christian Thalinger + + * patches/icedtea-shark.patch: Updated to latest Shark. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise. + * ports/hotspot/src/share/vm/includeDB_shark: Likewise. + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkType.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/shark_globals.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: New file. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMethod.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise. + 2008-08-12 Christian Thalinger * Makefile.am (ICEDTEA_PATCHES): Fixed typo. diff -r 7cd4d87f69f2 -r e8c5220a41f5 patches/icedtea-shark.patch --- a/patches/icedtea-shark.patch Tue Aug 12 09:37:13 2008 +0200 +++ b/patches/icedtea-shark.patch Tue Aug 12 05:35:18 2008 -0400 @@ -176,13 +176,16 @@ diff -ru openjdk/hotspot/src/share/vm/oo diff -ru openjdk/hotspot/src/share/vm/oops/methodOop.cpp openjdk/hotspot/src/share/vm/oops/methodOop.cpp --- openjdk/hotspot/src/share/vm/oops/methodOop.cpp 2008-06-20 10:22:11.000000000 +0100 +++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp 2008-04-15 10:52:44.000000000 +0100 -@@ -733,7 +733,11 @@ +@@ -730,10 +730,14 @@ void methodOopDesc::set_code(methodHandl + } + + OrderAccess::storestore(); ++#ifdef SHARK ++ mh->_from_interpreted_entry = SharkMethod::mark(code->instructions_begin()); ++#else mh->_from_compiled_entry = code->verified_entry_point(); OrderAccess::storestore(); // Instantly compiled code can execute. -+#ifdef SHARK -+ mh->_from_interpreted_entry = *(address *) code->instructions_begin(); -+#else mh->_from_interpreted_entry = mh->get_i2c_entry(); +#endif // SHARK @@ -281,3 +284,22 @@ diff -ru openjdk/hotspot/src/share/vm/ru #endif // TIERED #ifndef HOTSPOT_VM_DISTRO +diff -r ef3bb05d21d5 openjdk/hotspot/src/share/vm/code/nmethod.cpp +--- openjdk/hotspot/src/share/vm/code/nmethod.cpp Fri Aug 08 11:17:59 2008 +0100 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Fri Aug 08 11:35:04 2008 +0100 +@@ -1453,6 +1453,7 @@ void nmethod::oops_do(OopClosure* f) { + // Method that knows how to preserve outgoing arguments at call. This method must be + // called with a frame corresponding to a Java invoke + void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { ++#ifndef SHARK + if (!method()->is_native()) { + SimpleScopeDesc ssd(this, fr.pc()); + Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci()); +@@ -1460,6 +1461,7 @@ void nmethod::preserve_callee_argument_o + symbolOop signature = call->signature(); + fr.oops_compiled_arguments_do(signature, is_static, reg_map, f); + } ++#endif // !SHARK + } + + diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -51,6 +51,18 @@ class MacroAssembler : public Assembler void align(int modulus); void bang_stack_with_offset(int offset); + +#ifdef SHARK + public: + void emit_zero_byte() + { + emit_byte(0); + } + void emit_intptr(intptr_t x) + { + emit_address((address) x); + } +#endif // SHARK }; #ifdef ASSERT diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Aug 12 05:35:18 2008 -0400 @@ -85,8 +85,7 @@ void CppInterpreter::normal_entry(method stack->set_sp(istate->stack() + 1); // Make the call - address entry_point = istate->callee_entry_point(); - ((Interpreter::method_entry_t) entry_point) (method, THREAD); + Interpreter::invoke_method(method, istate->callee_entry_point(), THREAD); fixup_after_potential_safepoint(); // Convert the result @@ -623,11 +622,13 @@ address InterpreterGenerator::generate_a address InterpreterGenerator::generate_native_entry(bool synchronized) { + assert (synchronized == false, "should be"); return (address) CppInterpreter::native_entry; } address InterpreterGenerator::generate_normal_entry(bool synchronized) { + assert (synchronized == false, "should be"); return (address) CppInterpreter::normal_entry; } @@ -635,14 +636,10 @@ address AbstractInterpreterGenerator::ge AbstractInterpreter::MethodKind kind) { address entry_point = NULL; - bool synchronized = false; switch (kind) { case Interpreter::zerolocals: - break; - case Interpreter::zerolocals_synchronized: - synchronized = true; break; case Interpreter::native: @@ -679,10 +676,14 @@ address AbstractInterpreterGenerator::ge ShouldNotReachHere(); } - if (entry_point) - return entry_point; - - return ((InterpreterGenerator*)this)->generate_normal_entry(false); + if (entry_point == NULL) + entry_point = ((InterpreterGenerator*)this)->generate_normal_entry(false); + +#ifdef SHARK + assert(!SharkMethod::is_shark_method(entry_point), "shouldn't be"); +#endif // SHARK + + return entry_point; } InterpreterGenerator::InterpreterGenerator(StubQueue* code) diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Tue Aug 12 05:35:18 2008 -0400 @@ -26,8 +26,6 @@ #include "incls/_precompiled.incl" #include "incls/_frame_zero.cpp.incl" -intptr_t frame::shark_dummy_bcx = 0; - #ifdef ASSERT void RegisterMap::check_location_valid() { @@ -37,8 +35,7 @@ void RegisterMap::check_location_valid() bool frame::is_interpreted_frame() const { - return zeroframe()->is_interpreter_frame() || - zeroframe()->is_shark_frame(); + return zeroframe()->is_interpreter_frame(); } frame frame::sender_for_entry_frame(RegisterMap *map) const @@ -57,6 +54,11 @@ frame frame::sender_for_interpreter_fram return frame(sender_sp()); } +frame frame::sender_for_compiled_frame(RegisterMap *map) const +{ + return frame(sender_sp()); +} + frame frame::sender(RegisterMap* map) const { // Default is not to follow arguments; the various @@ -68,6 +70,11 @@ frame frame::sender(RegisterMap* map) co if (is_interpreted_frame()) return sender_for_interpreter_frame(map); + + assert(_cb == CodeCache::find_blob(pc()),"Must be the same"); + if (_cb != NULL) { + return sender_for_compiled_frame(map); + } Unimplemented(); } diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/frame_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -37,7 +37,6 @@ public: // Constructors frame(intptr_t* sp); - frame(intptr_t* sp, address pc); // accessors for the instance variables intptr_t* fp() const @@ -70,6 +69,3 @@ assert(zeroframe()->is_shark_frame(), "must be"); return (SharkFrame *) zeroframe(); } - - private: - static intptr_t shark_dummy_bcx; diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp --- a/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -40,11 +40,25 @@ inline frame::frame(intptr_t* sp) inline frame::frame(intptr_t* sp) { _sp = sp; - if (zeroframe()->is_entry_frame()) + switch (zeroframe()->type()) { + case ZeroFrame::ENTRY_FRAME: _pc = StubRoutines::call_stub_return_pc(); - else + _cb = NULL; + break; + + case ZeroFrame::INTERPRETER_FRAME: _pc = NULL; - _cb = NULL; + _cb = NULL; + break; + + case ZeroFrame::SHARK_FRAME: + _pc = zero_sharkframe()->pc(); + _cb = CodeCache::find_blob(pc()); + break; + + default: + ShouldNotReachHere(); + } _deopt_state = not_deoptimized; } @@ -73,10 +87,7 @@ inline intptr_t** frame::interpreter_fra inline intptr_t* frame::interpreter_frame_bcx_addr() const { - if (zeroframe()->is_shark_frame()) - return &shark_dummy_bcx; - else - return (intptr_t*) &(get_interpreterState()->_bcp); + return (intptr_t*) &(get_interpreterState()->_bcp); } inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const @@ -86,10 +97,7 @@ inline constantPoolCacheOop* frame::inte inline methodOop* frame::interpreter_frame_method_addr() const { - if (zeroframe()->is_shark_frame()) - return zero_sharkframe()->method_addr(); - else - return &(get_interpreterState()->_method); + return &(get_interpreterState()->_method); } inline intptr_t* frame::interpreter_frame_mdx_addr() const @@ -154,5 +162,5 @@ inline intptr_t* frame::entry_frame_argu inline intptr_t* frame::unextended_sp() const { - Unimplemented(); + return zero_sharkframe()->unextended_sp(); } diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -25,6 +25,17 @@ public: typedef void (*method_entry_t)(methodOop method, TRAPS); + + static void invoke_method(methodOop method, address entry_point, TRAPS) + { +#ifdef SHARK + if (SharkMethod::is_shark_method(entry_point)) { + SharkMethod::get(entry_point)->invoke(method, THREAD); + return; + } +#endif // SHARK + ((method_entry_t) entry_point) (method, THREAD); + } public: static int expr_index_at(int i) diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -28,9 +28,12 @@ // | stack slot n-1 | low addresses // | ... | // | stack slot 0 | -// | monitor 0 (maybe) | +// | monitor m-1 | // | ... | +// | monitor 0 | // | method | +// | unextended_sp | +// | pc | // | frame_type | // | next_frame | high addresses // +--------------------+ ------------------ @@ -48,17 +51,25 @@ class SharkFrame : public ZeroFrame { protected: enum Layout { - method_off = jf_header_words, + pc_off = jf_header_words, + unextended_sp_off, + method_off, header_words }; public: - methodOop* method_addr() const + address pc() const { - return (methodOop *) addr_of_word(method_off); + return (address) value_of_word(pc_off); } + + intptr_t* unextended_sp() const + { + return (intptr_t *) value_of_word(unextended_sp_off); + } + methodOop method() const { - return *method_addr(); + return (methodOop) value_of_word(method_off); } }; diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -101,6 +101,7 @@ class ZeroStackPrinter { if (frame->is_interpreter_frame()) { interpreterState istate = ((InterpreterFrame *) frame)->interpreter_state(); + intptr_t *monitor_base = (intptr_t *) istate->monitor_base(); if (addr >= (intptr_t *) istate) { field = istate->name_of_field_at_address((address) addr); if (field) { @@ -116,6 +117,24 @@ class ZeroStackPrinter { } else if (addr == (intptr_t *) istate) { field = "(vtable for istate)"; + } + } + else if (addr >= istate->stack_base() && addr < monitor_base) { + int monitor_size = frame::interpreter_frame_monitor_size(); + int last_index = + (monitor_base - istate->stack_base()) / monitor_size - 1; + int index = + last_index - (addr - istate->stack_base()) / monitor_size; + intptr_t monitor = (intptr_t) (istate->monitor_base() - 1 - index); + intptr_t offset = (intptr_t) addr - monitor; + + if (offset == BasicObjectLock::obj_offset_in_bytes()) { + snprintf(_buf, _buflen, "monitor[%d]->_obj", index); + field = _buf; + } + else if (offset == BasicObjectLock::lock_offset_in_bytes()) { + snprintf(_buf, _buflen, "monitor[%d]->_lock", index); + field = _buf; } } else if (addr < istate->stack_base()) { @@ -164,7 +183,13 @@ class ZeroStackPrinter { } } if (frame->is_shark_frame()) { - if (word == SharkFrame::method_off) { + if (word == SharkFrame::pc_off) { + field = "pc"; + } + else if (word == SharkFrame::unextended_sp_off) { + field = "unextended_sp"; + } + else if (word == SharkFrame::method_off) { field = "method"; methodOop method = ((SharkFrame *) frame)->method(); if (method->is_oop()) diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/stack_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Tue Aug 12 05:35:18 2008 -0400 @@ -98,10 +98,12 @@ class ZeroStack { { return byte_offset_of(ZeroStack, _base); } + static ByteSize top_offset() { return byte_offset_of(ZeroStack, _top); } + static ByteSize sp_offset() { return byte_offset_of(ZeroStack, _sp); @@ -118,6 +120,7 @@ class ZeroStack { // | ... | class ZeroFrame { + friend class frame; friend class ZeroStackPrinter; protected: diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Tue Aug 12 05:35:18 2008 -0400 @@ -66,7 +66,7 @@ class StubGenerator: public StubCodeGene EntryFrame::build(stack, parameters, parameter_words, call_wrapper)); // Make the call - ((Interpreter::method_entry_t) entry_point) (method, THREAD); + Interpreter::invoke_method(method, entry_point, THREAD); // Store result depending on type if (!HAS_PENDING_EXCEPTION) { diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Tue Aug 12 09:37:13 2008 +0200 +++ b/ports/hotspot/src/share/vm/includeDB_shark Tue Aug 12 05:35:18 2008 -0400 @@ -56,6 +56,10 @@ globals.hpp globals.cpp shark_globals.hpp +interpreter.hpp sharkMethod.hpp + +methodOop.cpp sharkMethod.hpp + shark_globals.cpp shark_globals.hpp shark_globals.hpp shark_globals_.hpp @@ -72,6 +76,8 @@ sharkBlock.cpp sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkConstantPool.hpp +sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp sharkBlock.cpp sharkValue.hpp @@ -81,8 +87,9 @@ sharkBlock.hpp sharkBlock.hpp ciType.hpp sharkBlock.hpp ciTypeFlow.hpp sharkBlock.hpp llvmHeaders.hpp +sharkBlock.hpp sharkBuilder.hpp sharkBlock.hpp sharkFunction.hpp -sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkMonitor.hpp sharkBlock.hpp sharkState.hpp sharkBlock.hpp sharkValue.hpp @@ -94,8 +101,9 @@ sharkBuilder.cpp sharkBuilder.cpp resourceArea.hpp sharkBuilder.cpp llvmHeaders.hpp sharkBuilder.cpp sharkBuilder.hpp +sharkBuilder.cpp sharkRuntime.hpp +sharkBuilder.cpp synchronizer.hpp sharkBuilder.cpp thread.hpp -sharkBuilder.cpp synchronizer.hpp sharkBuilder.hpp barrierSet.hpp From gbenson at redhat.com Tue Aug 12 03:04:14 2008 From: gbenson at redhat.com (Gary Benson) Date: Tue, 12 Aug 2008 11:04:14 +0100 Subject: Shark v0.02 Message-ID: <20080812100413.GD3720@redhat.com> Hi all, I just updated the icedtea6 repository with what I have of Shark. To build it you need a recent svn LLVM installed (I'm using 54012) and you need to configure with --enable-shark. Cheers, Gary -- http://gbenson.net/ From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 07:00:33 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 14:00:33 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ------- Comment #6 from langel at redhat.com 2008-08-12 14:00 ------- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6736248 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Tue Aug 12 07:09:04 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 12 Aug 2008 14:09:04 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-12 Omair Majid changeset 3887b2fc72a5 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=3887b2fc72a5 description: 2008-08-12 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Operation.java: fixed compile error; added license text * src/native/org_classpath_icedtea_pulseaudio_Operation.c: added license text diffstat: 2 files changed, 76 insertions(+), 3 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Operation.java | 42 +++++++++++++- src/native/org_classpath_icedtea_pulseaudio_Operation.c | 37 ++++++++++++ diffs (100 lines): diff -r 686f9e8f1803 -r 3887b2fc72a5 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Aug 11 17:38:17 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Tue Aug 12 10:09:01 2008 -0400 @@ -1,3 +1,40 @@ package org.classpath.icedtea.pulseaudio +/* Operation.java + Copyright (C) 2008 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + package org.classpath.icedtea.pulseaudio; import java.io.IOException; @@ -76,9 +113,8 @@ public class Operation { } - public void waitForCompletion() { - throw new RuntimeException("not implemented"); - + public void waitForCompletion() throws InterruptedException { + synchronized (eventLoop.threadLock) { eventLoop.threadLock.wait(); } diff -r 686f9e8f1803 -r 3887b2fc72a5 src/native/org_classpath_icedtea_pulseaudio_Operation.c --- a/src/native/org_classpath_icedtea_pulseaudio_Operation.c Mon Aug 11 17:38:17 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Operation.c Tue Aug 12 10:09:01 2008 -0400 @@ -1,3 +1,40 @@ +/* org_classpath_icedtea_pulseaudio_Operation.c + Copyright (C) 2008 Red Hat, Inc. + + This file is part of IcedTea. + + IcedTea is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. + + IcedTea is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with IcedTea; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + */ + #include "org_classpath_icedtea_pulseaudio_Operation.h" #include "jni-common.h" From omajid at redhat.com Tue Aug 12 07:51:15 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 12 Aug 2008 14:51:15 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-12 Omair Majid changeset 748e7984cd83 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=748e7984cd83 description: 2008-08-12 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: fixed getControl(); implemented isControlSupported() * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: added two tests for checking controls diffstat: 2 files changed, 30 insertions(+), 15 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 14 ++-- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 31 ++++++---- diffs (106 lines): diff -r 3887b2fc72a5 -r 748e7984cd83 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 10:09:01 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 10:31:11 2008 -0400 @@ -47,7 +47,6 @@ import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineEvent; @@ -395,12 +394,14 @@ public class PulseAudioSourceDataLine im defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, 2, AudioSystem.NOT_SPECIFIED, false); } - + open(defaultFormat, DEFAULT_BUFFER_SIZE); } @Override public int write(byte[] data, int offset, int length) { + + // TODO add check that the data is an integral number of frames int position = offset; int remainingLength = length; @@ -543,8 +544,7 @@ public class PulseAudioSourceDataLine im public Control getControl(Type control) { for (int i = 0; i < controls.length; i++) { - if (controls[i].getType() == control) { - + if (controls[i].getType().getClass() == control.getClass()) { return controls[i]; } } @@ -561,7 +561,11 @@ public class PulseAudioSourceDataLine im } public boolean isControlSupported(Type control) { - // TODO Auto-generated method stub + for (Control myControl: controls) { + if (myControl.getType().getClass() == control.getClass()) { + return true; + } + } return false; } diff -r 3887b2fc72a5 -r 748e7984cd83 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 10:09:01 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 10:31:11 2008 -0400 @@ -106,7 +106,8 @@ public class PulseSourceDataLineTest { @Test public void testFindLineWithFormat() throws LineUnavailableException { - System.out.println("This test tries to find a line with a valid format"); + System.out + .println("This test tries to find a line with a valid format"); AudioFormat wantedFormat = new AudioFormat( AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); System.out.println(wantedFormat); @@ -131,16 +132,8 @@ public class PulseSourceDataLineTest { @Test public void testVolumeAndMute() throws Exception { - Mixer.Info mixerInfos[] = AudioSystem.getMixerInfo(); - Mixer.Info selectedMixerInfo = null; - for (Mixer.Info info : mixerInfos) { - if (info.getName().contains("PulseAudio")) { - selectedMixerInfo = info; - System.out.println(selectedMixerInfo); - } - } - Mixer selectedMixer = AudioSystem.getMixer(selectedMixerInfo); + Mixer selectedMixer = mixer; selectedMixer.open(); SourceDataLine line = (SourceDataLine) selectedMixer @@ -179,6 +172,24 @@ public class PulseSourceDataLineTest { } + @Test + public void testFindControl() throws LineUnavailableException { + SourceDataLine sourceLine = (SourceDataLine) mixer + .getLine(new Line.Info(SourceDataLine.class)); + Assert.assertTrue(sourceLine.getControls().length > 0); + } + + + @Test + public void testSupportedControls() throws LineUnavailableException { + SourceDataLine sourceLine = (SourceDataLine) mixer + .getLine(new Line.Info(SourceDataLine.class)); + sourceLine.open(); + Assert.assertTrue(sourceLine.isControlSupported(FloatControl.Type.VOLUME)); + Assert.assertTrue(sourceLine.isControlSupported(BooleanControl.Type.MUTE)); + } + + @After public void tearDown() throws Exception { From omajid at redhat.com Tue Aug 12 07:51:15 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 12 Aug 2008 14:51:15 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-12 Omair Majid changeset 573735d22e54 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=573735d22e54 description: 2008-08-12 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: getControls() now returns a null rather than a Control[2] containing nulls * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: fixed the testFindControl() test to check the array returned diffstat: 2 files changed, 19 insertions(+), 9 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 3 - unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 25 ++++++---- diffs (68 lines): diff -r 748e7984cd83 -r 573735d22e54 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 10:31:11 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 10:51:02 2008 -0400 @@ -75,7 +75,7 @@ public class PulseAudioSourceDataLine im private List listeners; - private Control[] controls = new Control[2]; + private Control[] controls = null; private PulseAudioStreamMuteControl muteControl; private PulseAudioStreamVolumeControl volumeControl; private boolean muted; @@ -376,6 +376,7 @@ public class PulseAudioSourceDataLine im } System.out.println(this.getClass().getName() + "stream is ready"); + controls = new Control[2]; volumeControl = new PulseAudioStreamVolumeControl(this); controls[0] = volumeControl; muteControl = new PulseAudioStreamMuteControl(this); diff -r 748e7984cd83 -r 573735d22e54 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 10:31:11 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 10:51:02 2008 -0400 @@ -44,6 +44,7 @@ import javax.sound.sampled.AudioInputStr import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.BooleanControl; +import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; @@ -176,20 +177,28 @@ public class PulseSourceDataLineTest { public void testFindControl() throws LineUnavailableException { SourceDataLine sourceLine = (SourceDataLine) mixer .getLine(new Line.Info(SourceDataLine.class)); + sourceLine.open(); + Control[] controls = sourceLine.getControls(); + Assert.assertNotNull(controls); Assert.assertTrue(sourceLine.getControls().length > 0); - } - - + for (Control control : controls) { + Assert.assertNotNull(control); + } + sourceLine.close(); + } + @Test public void testSupportedControls() throws LineUnavailableException { SourceDataLine sourceLine = (SourceDataLine) mixer .getLine(new Line.Info(SourceDataLine.class)); sourceLine.open(); - Assert.assertTrue(sourceLine.isControlSupported(FloatControl.Type.VOLUME)); - Assert.assertTrue(sourceLine.isControlSupported(BooleanControl.Type.MUTE)); - } - - + Assert.assertTrue(sourceLine + .isControlSupported(FloatControl.Type.VOLUME)); + Assert.assertTrue(sourceLine + .isControlSupported(BooleanControl.Type.MUTE)); + sourceLine.close(); + } + @After public void tearDown() throws Exception { From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:07:09 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:07:09 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rolando.umana at gmail.com ------- Comment #5 from langel at redhat.com 2008-08-12 15:07 ------- *** Bug 182 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:07:09 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:07:09 +0000 Subject: [Bug 182] crashes when updating a project directory in eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=182 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #3 from langel at redhat.com 2008-08-12 15:07 ------- *** This bug has been marked as a duplicate of bug 180 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:08:36 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:08:36 +0000 Subject: [Bug 155] Eclipse crashes in [libxul.so+0x9c753c] Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=155 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #3 from langel at redhat.com 2008-08-12 15:08 ------- *** This bug has been marked as a duplicate of bug 152 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:08:36 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:08:36 +0000 Subject: [Bug 152] HotSpot crashes while compiling GNU Classpath! Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=152 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mcepl at redhat.com ------- Comment #13 from langel at redhat.com 2008-08-12 15:08 ------- *** Bug 155 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:08:57 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:08:57 +0000 Subject: [Bug 156] Eclipse crashes in [libglib-2.0.so.0+0x54f39] g_slice_alloc+0x139 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=156 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #2 from langel at redhat.com 2008-08-12 15:08 ------- *** This bug has been marked as a duplicate of bug 152 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:08:57 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:08:57 +0000 Subject: [Bug 152] HotSpot crashes while compiling GNU Classpath! Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=152 ------- Comment #14 from langel at redhat.com 2008-08-12 15:08 ------- *** Bug 156 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:11:54 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:11:54 +0000 Subject: [Bug 79] security type applet doesnt work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=79 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|fkung at redhat.com |unassigned at icedtea.classpath | |.org -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:13:08 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:13:08 +0000 Subject: [Bug 89] Error when creating a new Servlet in Eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=89 ------- Comment #1 from langel at redhat.com 2008-08-12 15:13 ------- Is this still a problem? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:13:59 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:13:59 +0000 Subject: [Bug 135] OpenJDK segfaults when running a java project of mine Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=135 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #9 from langel at redhat.com 2008-08-12 15:13 ------- cant reproduce -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:20:06 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:20:06 +0000 Subject: [Bug 135] OpenJDK segfaults when running a java project of mine Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=135 ------- Comment #10 from konrad at tylerc.org 2008-08-12 15:20 ------- I can't reproduce either; it should be closed. Sorry to not be able to provide a test case. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:24:24 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:24:24 +0000 Subject: [Bug 152] HotSpot crashes while compiling GNU Classpath! Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=152 ------- Comment #15 from mlists at juma.me.uk 2008-08-12 15:24 ------- Does this still happen? I don't think there have been reports of any of the various Eclipse crashes with builds including the fix for 6614100 (which was tracked in IcedTea as bug #180). -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 08:26:17 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 15:26:17 +0000 Subject: [Bug 152] HotSpot crashes while compiling GNU Classpath! Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=152 ------- Comment #16 from langel at redhat.com 2008-08-12 15:26 ------- We should keep this open to keep track of the Sun bug that was created. This bug still exists: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6708395 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Tue Aug 12 08:28:27 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 12 Aug 2008 15:28:27 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-12 Omair Majid changeset 8f4e01b67c92 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=8f4e01b67c92 description: 2008-08-12 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: fixed notification of line listeners multiple times during a close(). cleared all the line listeners when a close is done(). fixed getControl() to throw an exception because no controls are supported. fixed getControls() to return an array of length 0. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: if the line hasnt been opened, getControl() now throws an exception and getControls() returns an array of length 0 * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java: fixed the listener tests to make sure that the listeners are called only once diffstat: 3 files changed, 41 insertions(+), 22 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 19 +++--- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 14 ++++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 30 ++++++---- diffs (157 lines): diff -r 573735d22e54 -r 8f4e01b67c92 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Tue Aug 12 10:51:02 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Tue Aug 12 11:28:22 2008 -0400 @@ -265,24 +265,23 @@ public class PulseAudioMixer implements // System.out.println(this.getClass().getName() + ": closed"); this.isOpen = false; - fireEvent(new LineEvent(this, LineEvent.Type.CLOSE, - AudioSystem.NOT_SPECIFIED)); - - /* - * FIXME need to clean up the listeners on close without a race - * condition - */ + + synchronized (lineListeners) { + lineListeners.clear(); + } } @Override public Control getControl(Type control) { - return null; + // mixer supports no controls + throw new IllegalArgumentException(); } @Override public Control[] getControls() { - return null; + // mixer supports no controls; return an array of length 0 + return new Control[] {}; } @Override @@ -293,7 +292,7 @@ public class PulseAudioMixer implements @Override public boolean isControlSupported(Type control) { - // FIXME + // mixer supports no controls return false; } diff -r 573735d22e54 -r 8f4e01b67c92 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 10:51:02 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 11:28:22 2008 -0400 @@ -544,6 +544,11 @@ public class PulseAudioSourceDataLine im } public Control getControl(Type control) { + if (!isOpen) { + throw new IllegalArgumentException( + "Controls only supported when line is open"); + } + for (int i = 0; i < controls.length; i++) { if (controls[i].getType().getClass() == control.getClass()) { return controls[i]; @@ -553,7 +558,12 @@ public class PulseAudioSourceDataLine im } public Control[] getControls() { - return controls; + if (isOpen) { + return controls; + } else { + return new Control[] {}; + } + } public javax.sound.sampled.Line.Info getLineInfo() { @@ -562,7 +572,7 @@ public class PulseAudioSourceDataLine im } public boolean isControlSupported(Type control) { - for (Control myControl: controls) { + for (Control myControl : controls) { if (myControl.getType().getClass() == control.getClass()) { return true; } diff -r 573735d22e54 -r 8f4e01b67c92 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Tue Aug 12 10:51:02 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Tue Aug 12 11:28:22 2008 -0400 @@ -52,6 +52,7 @@ import junit.framework.JUnit4TestAdapter import junit.framework.JUnit4TestAdapter; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -157,8 +158,8 @@ public class PulseAudioMixerTest { @Test public void testOpeningAgain() throws LineUnavailableException, UnsupportedOperationException { - selectedMixer.open(); - selectedMixer.open(); + selectedMixer.open(); + selectedMixer.open(); } @Test @@ -172,14 +173,12 @@ public class PulseAudioMixerTest { public void testSourceLinesOpenAndClose() throws LineUnavailableException { System.out.println("This test checks if source lines open and close"); selectedMixer.open(); - - + /* - * FIXME - * This test currently fails. The mixer returns information about the line - * which leaves a lot of things as NOT_SPECIFIED - * when using that to do a get line, things match, and the line returned - * still has a few parameters as NOT_SPECIFIED and doing an open() on that fails + * FIXME This test currently fails. The mixer returns information about + * the line which leaves a lot of things as NOT_SPECIFIED when using + * that to do a get line, things match, and the line returned still has + * a few parameters as NOT_SPECIFIED and doing an open() on that fails * */ Line.Info allLineInfo[] = selectedMixer.getSourceLineInfo(); @@ -196,9 +195,14 @@ public class PulseAudioMixerTest { @Test public void testOpenEvent() throws LineUnavailableException { LineListener listener = new LineListener() { + private int called = 0; + @Override public void update(LineEvent event) { assert (event.getType() == LineEvent.Type.OPEN); + called++; + // assert listener is called exactly once + Assert.assertEquals(1,called); } }; @@ -212,9 +216,15 @@ public class PulseAudioMixerTest { @Test public void testCloseEvent() throws LineUnavailableException { LineListener listener = new LineListener() { + private int count = 0; + @Override public void update(LineEvent event) { - assert (event.getType() == LineEvent.Type.CLOSE); + Assert.assertTrue(event.getType() == LineEvent.Type.CLOSE); + count++; + // assert listener is called exactly once + Assert.assertEquals(1, count); + } }; From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:19:58 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:19:58 +0000 Subject: [Bug 152] HotSpot crashes while compiling GNU Classpath! Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=152 ------- Comment #17 from mlists at juma.me.uk 2008-08-12 16:19 ------- Yes, but the reporters should check if it has been fixed and add a comment in their bug database in that case. :) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:34:16 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:34:16 +0000 Subject: [Bug 89] Error when creating a new Servlet in Eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=89 ------- Comment #2 from daarty at gg-com.de 2008-08-12 16:34 ------- (In reply to comment #1) > Is this still a problem? > I am no longer using F8 / IcedTea. Sorry, can't check this any longer. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:41:08 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:41:08 +0000 Subject: [Bug 152] HotSpot crashes while compiling GNU Classpath! Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=152 ------- Comment #18 from langel at redhat.com 2008-08-12 16:41 ------- it has not been fixed in openjdk, but it has in icedtea. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:41:20 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:41:20 +0000 Subject: [Bug 89] Error when creating a new Servlet in Eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=89 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #3 from langel at redhat.com 2008-08-12 16:41 ------- closing, cannot reproduce -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:44:36 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:44:36 +0000 Subject: [Bug 85] no javascript plugin support. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=85 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|dbhole at redhat.com |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:44:47 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:44:47 +0000 Subject: [Bug 79] security type applet doesnt work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=79 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|dbhole at redhat.com |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 09:49:00 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 12 Aug 2008 16:49:00 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 veguilla at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED ------- Comment #6 from veguilla at gmail.com 2008-08-12 16:49 ------- Upgraded to 1.6.0_10-rc-b28 and everything is working correctly. Since the problem is present in the Java version (b09) currently available from the Fedora 9 update repositories, I will take this issue to the Fedora bugzilla/mailing-lists. Closing the bug. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Tue Aug 12 10:43:20 2008 From: langel at redhat.com (Lillian Angel) Date: Tue, 12 Aug 2008 17:43:20 +0000 Subject: changeset in /hg/icedtea6: 2008-08-12 Lillian Angel changeset 3b7c41ea8ccb in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3b7c41ea8ccb description: 2008-08-12 Lillian Angel * HACKING: Added icedtea-enum-bug-181.patch. diffstat: 2 files changed, 5 insertions(+) ChangeLog | 4 ++++ HACKING | 1 + diffs (22 lines): diff -r e8c5220a41f5 -r 3b7c41ea8ccb ChangeLog --- a/ChangeLog Tue Aug 12 05:35:18 2008 -0400 +++ b/ChangeLog Tue Aug 12 13:43:16 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-12 Gary Benson + + * HACKING: Added icedtea-enum-bug-181.patch. + 2008-08-12 Gary Benson * patches/icedtea-shark.patch: Updated to latest Shark. diff -r e8c5220a41f5 -r 3b7c41ea8ccb HACKING --- a/HACKING Tue Aug 12 05:35:18 2008 -0400 +++ b/HACKING Tue Aug 12 13:43:16 2008 -0400 @@ -25,6 +25,7 @@ The following patches are currently appl * icedtea-debuginfo.patch: Add -g option to build to generate debugging information. * icedtea-demos.patch: Fix building of JVMTI demo. * icedtea-directaudio-close-trick.patch: Allow hardware sound device to be reopened. +* icedtea-enum-bug-181.patch: Fixes class type check (PR181/S6736248) * icedtea-float-double-trailing-zeros.patch: Remove trailing zeros from Double/Float (PR29/30) * icedtea-fonts.patch: Add Fedora fontconfig. * icedtea-gcc-4.3.patch: Fix code to compile with GCC 4.3 and turn off -Werror. From doko at ubuntu.com Tue Aug 12 11:24:26 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Tue, 12 Aug 2008 18:24:26 +0000 Subject: changeset in /hg/icedtea6: 2008-08-12 Matthias Klose changeset 5fd318f3b379 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5fd318f3b379 description: 2008-08-12 Matthias Klose * Makefile.am (stamps/cacao.stamp): Robustify. diffstat: 2 files changed, 6 insertions(+), 2 deletions(-) ChangeLog | 4 ++++ Makefile.am | 4 ++-- diffs (32 lines): diff -r 3b7c41ea8ccb -r 5fd318f3b379 ChangeLog --- a/ChangeLog Tue Aug 12 13:43:16 2008 -0400 +++ b/ChangeLog Tue Aug 12 20:23:58 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-12 Lillian Angel + + * Makefile.am (stamps/cacao.stamp): Robustify. + 2008-08-12 Lillian Angel * HACKING: Added icedtea-enum-bug-181.patch. diff -r 3b7c41ea8ccb -r 5fd318f3b379 Makefile.am --- a/Makefile.am Tue Aug 12 13:43:16 2008 -0400 +++ b/Makefile.am Tue Aug 12 20:23:58 2008 +0200 @@ -2,7 +2,7 @@ OPENJDK_MD5SUM = 8e60cdac02ec1b2d8ddb9d7 OPENJDK_MD5SUM = 8e60cdac02ec1b2d8ddb9d7369be69df OPENJDK_VERSION = b11 -CACAO_VERSION = 0.99.2 +CACAO_VERSION = 0.99.3 CACAO_MD5SUM = a2865f47535f6dc3def268c0055ff20a NETBEANS_PLATFORM_MD5SUM = 77c79b3a7d3dbe6a8858639f8d564a38 @@ -1250,7 +1250,7 @@ stamps/cacao.stamp: stamps/extract.stamp stamps/cacao.stamp: stamps/extract.stamp stamps/rt-class-files.stamp if WITH_CACAO if !USE_SYSTEM_CACAO - cd cacao/cacao-$(CACAO_VERSION) ; \ + cd cacao/cacao-$(CACAO_VERSION) && \ ./configure \ --prefix=$(abs_top_builddir)/cacao/install \ --with-java-runtime-library=openjdk \ From doko at ubuntu.com Tue Aug 12 11:26:56 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Tue, 12 Aug 2008 18:26:56 +0000 Subject: changeset in /hg/icedtea6: 2008-08-12 Matthias Klose changeset ce522c9080e5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ce522c9080e5 description: 2008-08-12 Matthias Klose * patches/icedtea-arch.patch: Add support for mipsel-linux. diffstat: 2 files changed, 198 insertions(+), 186 deletions(-) ChangeLog | 4 patches/icedtea-arch.patch | 380 ++++++++++++++++++++++---------------------- diffs (449 lines): diff -r 5fd318f3b379 -r ce522c9080e5 ChangeLog --- a/ChangeLog Tue Aug 12 20:23:58 2008 +0200 +++ b/ChangeLog Tue Aug 12 20:25:43 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-12 Matthias Klose + + * patches/icedtea-arch.patch: Add support for mipsel-linux. + 2008-08-12 Matthias Klose * Makefile.am (stamps/cacao.stamp): Robustify. diff -r 5fd318f3b379 -r ce522c9080e5 patches/icedtea-arch.patch --- a/patches/icedtea-arch.patch Tue Aug 12 20:23:58 2008 +0200 +++ b/patches/icedtea-arch.patch Tue Aug 12 20:25:43 2008 +0200 @@ -1,73 +1,6 @@ diff -r 63b67d07d5e9 openjdk/jdk/make/co -diff -r 63b67d07d5e9 openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- ../openjdk/jdk/make/common/shared/Compiler-gcc.gmk Tue Mar 25 16:27:33 2008 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk Wed Mar 26 08:24:35 2008 +0000 -@@ -75,28 +75,51 @@ ifeq ($(PLATFORM), linux) - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.* - else -- ifneq ("$(findstring sparc,$(ARCH))", "") -- # sparc or sparcv9 -- REQUIRED_CC_VER = 4.0 -- REQUIRED_GCC_VER = 4.0.* -- else -- ifeq ($(ARCH_DATA_MODEL), 32) -+ ifeq ($(ARCH), alpha) -+ # alpha -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), amd64) -+ # amd64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), arm) -+ # arm -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), i586) - # i586 - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.1* - REQUIRED_GCC_VER_INT = 3.2.1-7a -- else -- ifeq ($(ARCH), amd64) -- # amd64 -- REQUIRED_CC_VER = 3.2 -- REQUIRED_GCC_VER = 3.2.* - endif - ifeq ($(ARCH), ia64) - # ia64 - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 2.9[56789].* - endif -+ ifeq ($(ARCH), mips) -+ # mips -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* - endif -+ ifneq ("$(findstring ppc,$(ARCH))", "") -+ # ppc or ppc64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring s390,$(ARCH))", "") -+ # s390 or s390x -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring sparc,$(ARCH))", "") -+ # sparc or sparcv9 -+ REQUIRED_CC_VER = 4.0 -+ REQUIRED_GCC_VER = 4.0.* - endif - endif - # Option used to create a shared library -diff -r 63b67d07d5e9 openjdk/jdk/make/javax/sound/SoundDefs.gmk ---- ../openjdk/jdk/make/javax/sound/SoundDefs.gmk Tue Mar 25 16:27:33 2008 +0000 -+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk Wed Mar 26 08:29:28 2008 +0000 -@@ -58,9 +58,45 @@ ifdef ICEDTEA_ZERO_BUILD +--- openjdk/jdk/make/javax/sound/SoundDefs.gmk.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2008-08-12 18:12:15.000000000 +0000 +@@ -58,10 +58,50 @@ ifdef ICEDTEA_ZERO_BUILD CPPFLAGS += -DX_ARCH=X_ZERO else @@ -86,7 +19,7 @@ diff -r 63b67d07d5e9 openjdk/jdk/make/ja ifeq ($(ARCH), i586) CPPFLAGS += -DX_ARCH=X_I586 endif # ARCH i586 -+ + + ifeq ($(ARCH), ia64) + CPPFLAGS += -DX_ARCH=X_IA64 + endif # ARCH ia64 @@ -95,6 +28,10 @@ diff -r 63b67d07d5e9 openjdk/jdk/make/ja + CPPFLAGS += -DX_ARCH=X_MIPS + endif # ARCH mips + ++ ifeq ($(ARCH), mipsel) ++ CPPFLAGS += -DX_ARCH=X_MIPSEL ++ endif # ARCH mipsel ++ + ifeq ($(ARCH), ppc) + CPPFLAGS += -DX_ARCH=X_PPC + endif # ARCH ppc @@ -110,10 +47,11 @@ diff -r 63b67d07d5e9 openjdk/jdk/make/ja + ifeq ($(ARCH), s390x) + CPPFLAGS += -DX_ARCH=X_S390X + endif # ARCH s390x - ++ ifeq ($(ARCH), sparc) CPPFLAGS += -DX_ARCH=X_SPARC -@@ -69,10 +105,6 @@ else + endif # ARCH sparc +@@ -69,10 +109,6 @@ ifeq ($(ARCH), sparcv9) CPPFLAGS += -DX_ARCH=X_SPARCV9 endif # ARCH sparcv9 @@ -124,10 +62,136 @@ diff -r 63b67d07d5e9 openjdk/jdk/make/ja endif -diff -r 63b67d07d5e9 openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ---- ../openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Mar 25 16:27:33 2008 +0000 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Mar 26 08:38:14 2008 +0000 -@@ -33,12 +33,19 @@ +--- openjdk/jdk/make/common/Defs-linux.gmk.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2008-08-12 18:15:54.000000000 +0000 +@@ -102,9 +102,19 @@ + # We need this frame pointer to make it easy to walk the stacks. + # This should be the default on X86, but ia64 and amd64 may not have this + # as the default. ++CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_hppa += + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_m68k += ++CFLAGS_REQUIRED_mips += ++CFLAGS_REQUIRED_mipsel += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_ppc += -m32 ++CFLAGS_REQUIRED_ppc64 += -m64 ++CFLAGS_REQUIRED_s390 += ++CFLAGS_REQUIRED_s390x += -m64 + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 +--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2008-08-12 18:10:45.000000000 +0000 +@@ -75,28 +75,51 @@ + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.* + else +- ifneq ("$(findstring sparc,$(ARCH))", "") +- # sparc or sparcv9 +- REQUIRED_CC_VER = 4.0 +- REQUIRED_GCC_VER = 4.0.* +- else +- ifeq ($(ARCH_DATA_MODEL), 32) +- # i586 ++ ifeq ($(ARCH), alpha) ++ # alpha + REQUIRED_CC_VER = 3.2 +- REQUIRED_GCC_VER = 3.2.1* +- REQUIRED_GCC_VER_INT = 3.2.1-7a +- else ++ REQUIRED_GCC_VER = 3.2.* ++ endif + ifeq ($(ARCH), amd64) + # amd64 + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.* + endif ++ ifeq ($(ARCH), arm) ++ # arm ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), i586) ++ # i586 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.1* ++ REQUIRED_GCC_VER_INT = 3.2.1-7a ++ endif + ifeq ($(ARCH), ia64) + # ia64 + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 2.9[56789].* + endif ++ ifneq ("$(findstring mips,$(ARCH))", "") ++ # mips ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring ppc,$(ARCH))", "") ++ # ppc or ppc64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring s390,$(ARCH))", "") ++ # s390 or s390x ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* + endif ++ ifneq ("$(findstring sparc,$(ARCH))", "") ++ # sparc or sparcv9 ++ REQUIRED_CC_VER = 4.0 ++ REQUIRED_GCC_VER = 4.0.* + endif + endif + # Option used to create a shared library +--- openjdk/jdk/make/common/shared/Platform.gmk.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2008-08-12 18:14:37.000000000 +0000 +@@ -237,9 +237,37 @@ + else + # i586 is 32-bit, amd64 is 64-bit + ifndef ARCH_DATA_MODEL ++ ifeq ($(ARCH), alpha) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), amd64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), arm) ++ ARCH_DATA_MODEL=32 ++ endif + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 +- else ++ endif ++ ifeq ($(ARCH), ia64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), mips) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), mipsel) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), s390) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), s390x) + ARCH_DATA_MODEL=64 + endif + endif +--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2008-08-12 18:13:17.000000000 +0000 +@@ -33,12 +33,20 @@ #define X_LINUX 3 // types for X_ARCH @@ -143,96 +207,20 @@ diff -r 63b67d07d5e9 openjdk/jdk/src/sha +#define X_I586 4 +#define X_IA64 5 +#define X_MIPS 6 -+#define X_PPC 7 -+#define X_PPC64 8 -+#define X_S390 9 -+#define X_S390X 10 -+#define X_SPARC 11 -+#define X_SPARCV9 12 -+#define X_ZERO 13 ++#define X_MIPSEL 7 ++#define X_PPC 8 ++#define X_PPC64 9 ++#define X_S390 10 ++#define X_S390X 11 ++#define X_SPARC 12 ++#define X_SPARCV9 13 ++#define X_ZERO 14 // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly. ---- openjdk/corba/make/common/shared/Platform.gmk~ 2008-04-21 09:54:27.000000000 +0200 -+++ openjdk/corba/make/common/shared/Platform.gmk 2008-04-21 16:14:54.000000000 +0200 -@@ -224,9 +224,34 @@ - else - # i586 is 32-bit, amd64 is 64-bit - ifndef ARCH_DATA_MODEL -+ ifeq ($(ARCH), alpha) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), amd64) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), arm) -+ ARCH_DATA_MODEL=32 -+ endif - ifeq ($(ARCH), i586) - ARCH_DATA_MODEL=32 -- else -+ endif -+ ifeq ($(ARCH), ia64) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), mips) -+ ARCH_DATA_MODEL=32 -+ endif -+ ifeq ($(ARCH), ppc) -+ ARCH_DATA_MODEL=32 -+ endif -+ ifeq ($(ARCH), ppc64) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), s390) -+ ARCH_DATA_MODEL=32 -+ endif -+ ifeq ($(ARCH), s390x) - ARCH_DATA_MODEL=64 - endif - endif ---- openjdk/jdk/make/common/shared/Platform.gmk~ 2008-04-21 09:54:27.000000000 +0200 -+++ openjdk/jdk/make/common/shared/Platform.gmk 2008-04-21 16:15:00.000000000 +0200 -@@ -235,9 +235,34 @@ - else - # i586 is 32-bit, amd64 is 64-bit - ifndef ARCH_DATA_MODEL -+ ifeq ($(ARCH), alpha) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), amd64) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), arm) -+ ARCH_DATA_MODEL=32 -+ endif - ifeq ($(ARCH), i586) - ARCH_DATA_MODEL=32 -- else -+ endif -+ ifeq ($(ARCH), ia64) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), mips) -+ ARCH_DATA_MODEL=32 -+ endif -+ ifeq ($(ARCH), ppc) -+ ARCH_DATA_MODEL=32 -+ endif -+ ifeq ($(ARCH), ppc64) -+ ARCH_DATA_MODEL=64 -+ endif -+ ifeq ($(ARCH), s390) -+ ARCH_DATA_MODEL=32 -+ endif -+ ifeq ($(ARCH), s390x) - ARCH_DATA_MODEL=64 - endif - endif -diff -r f07251088084 make/common/Defs-linux.gmk ---- a/corba/make/common/Defs-linux.gmk Mon Aug 04 13:44:45 2008 -0700 -+++ openjdk/corba/make/common/Defs-linux.gmk Wed Aug 06 18:58:18 2008 -0400 -@@ -92,9 +92,18 @@ +--- openjdk/corba/make/common/Defs-linux.gmk.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/corba/make/common/Defs-linux.gmk 2008-08-12 18:15:12.000000000 +0000 +@@ -92,9 +92,19 @@ # We need this frame pointer to make it easy to walk the stacks. # This should be the default on X86, but ia64 and amd64 may not have this # as the default. @@ -244,6 +232,7 @@ diff -r f07251088084 make/common/Defs-li CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN +CFLAGS_REQUIRED_m68k += +CFLAGS_REQUIRED_mips += ++CFLAGS_REQUIRED_mipsel += -D_LITTLE_ENDIAN +CFLAGS_REQUIRED_ppc += -m32 +CFLAGS_REQUIRED_ppc64 += -m64 +CFLAGS_REQUIRED_s390 += @@ -251,25 +240,44 @@ diff -r f07251088084 make/common/Defs-li CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 -diff -r 12a0d0a1bb65 make/common/Defs-linux.gmk ---- a/jdk/make/common/Defs-linux.gmk Mon Aug 04 13:45:00 2008 -0700 -+++ openjdk/jdk/make/common/Defs-linux.gmk Wed Aug 06 18:58:22 2008 -0400 -@@ -102,9 +102,18 @@ - # We need this frame pointer to make it easy to walk the stacks. - # This should be the default on X86, but ia64 and amd64 may not have this - # as the default. -+CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_hppa += - CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_m68k += -+CFLAGS_REQUIRED_mips += -+CFLAGS_REQUIRED_ppc += -m32 -+CFLAGS_REQUIRED_ppc64 += -m64 -+CFLAGS_REQUIRED_s390 += -+CFLAGS_REQUIRED_s390x += -m64 - CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 - CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 +--- openjdk/corba/make/common/shared/Platform.gmk.orig 2008-08-12 18:09:03.000000000 +0000 ++++ openjdk/corba/make/common/shared/Platform.gmk 2008-08-12 18:14:03.000000000 +0000 +@@ -227,9 +227,37 @@ + else + # i586 is 32-bit, amd64 is 64-bit + ifndef ARCH_DATA_MODEL ++ ifeq ($(ARCH), alpha) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), amd64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), arm) ++ ARCH_DATA_MODEL=32 ++ endif + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 +- else ++ endif ++ ifeq ($(ARCH), ia64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), mips) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), mipsel) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), ppc64) ++ ARCH_DATA_MODEL=64 ++ endif ++ ifeq ($(ARCH), s390) ++ ARCH_DATA_MODEL=32 ++ endif ++ ifeq ($(ARCH), s390x) + ARCH_DATA_MODEL=64 + endif + endif From omajid at redhat.com Tue Aug 12 12:17:20 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 12 Aug 2008 19:17:20 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-11 Omair Majid changeset 856e11044f24 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=856e11044f24 description: 2008-08-11 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: now notifies any linelisteners of OPEN event. write() now tests the arguments passed to it * src/native/org_classpath_icedtea_pulseaudio/PulseAudioSourceDataLine.c: enabled a little debug output * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: added tests to confirm write's argument checking. also added tests to check that listeners are notified of OPEN and CLOSE LineEvents diffstat: 3 files changed, 159 insertions(+), 17 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 63 ++++- src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 2 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 111 ++++++++++ diffs (299 lines): diff -r 8f4e01b67c92 -r 856e11044f24 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 11:28:22 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 15:17:14 2008 -0400 @@ -73,7 +73,7 @@ public class PulseAudioSourceDataLine im private AudioFormat currentFormat = null; private AudioFormat defaultFormat = null; - private List listeners; + private List lineListeners; private Control[] controls = null; private PulseAudioStreamMuteControl muteControl; @@ -123,7 +123,7 @@ public class PulseAudioSourceDataLine im public PulseAudioSourceDataLine(EventLoop eventLoop) { this.eventLoop = eventLoop; - this.listeners = new ArrayList(); + this.lineListeners = new ArrayList(); this.volume = PulseAudioVolumeControl.MAX_VOLUME; /* @@ -349,6 +349,24 @@ public class PulseAudioSourceDataLine im throw new IllegalArgumentException("Invalid format"); } + StreamListener openCloseListener = new StreamListener() { + + @Override + public void update(StreamEvent e) { + if (e.getType() == StreamEvent.Type.READY) { + fireLineEvent(new LineEvent(PulseAudioSourceDataLine.this, + LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + } else if (e.getType() == StreamEvent.Type.TERMINATED + || e.getType() == StreamEvent.Type.FAILED) { + fireLineEvent((new LineEvent(PulseAudioSourceDataLine.this, + LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); + } + } + + }; + + addStreamListener(openCloseListener); + final Semaphore semaphore = new Semaphore(0); synchronized (eventLoop.threadLock) { @@ -374,6 +392,7 @@ public class PulseAudioSourceDataLine im // throw new LineUnavailableException("unable to prepare // stream"); } + System.out.println(this.getClass().getName() + "stream is ready"); controls = new Control[2]; @@ -402,7 +421,18 @@ public class PulseAudioSourceDataLine im @Override public int write(byte[] data, int offset, int length) { - // TODO add check that the data is an integral number of frames + int frameSize = currentFormat.getFrameSize(); + if (length % frameSize != 0) { + throw new IllegalArgumentException( + "amount of data to write does not represent an integral number of frames"); + } + if (length < 0) { + throw new IllegalArgumentException("length is negative"); + } + + if (length + offset > data.length) { + throw new ArrayIndexOutOfBoundsException(length + offset); + } int position = offset; int remainingLength = length; @@ -462,11 +492,11 @@ public class PulseAudioSourceDataLine im } public void addLineListener(LineListener listener) { - this.listeners.add(listener); + this.lineListeners.add(listener); } public void removeLineListener(LineListener listener) { - this.listeners.remove(listener); + this.lineListeners.remove(listener); } private void addStreamListener(StreamListener listener) { @@ -488,10 +518,6 @@ public class PulseAudioSourceDataLine im synchronized (eventLoop.threadLock) { native_close(); - } - - for (LineListener l : this.listeners) { - l.update(new LineEvent(this, LineEvent.Type.CLOSE, 0)); } } @@ -563,7 +589,7 @@ public class PulseAudioSourceDataLine im } else { return new Control[] {}; } - + } public javax.sound.sampled.Line.Info getLineInfo() { @@ -622,16 +648,16 @@ public class PulseAudioSourceDataLine im synchronized (eventLoop.threadLock) { switch (status) { case 0: - fireEvent(new StreamEvent(StreamEvent.Type.UNCONNECTED)); + fireStreamEvent(new StreamEvent(StreamEvent.Type.UNCONNECTED)); break; case 1: - fireEvent(new StreamEvent(StreamEvent.Type.CREATING)); + fireStreamEvent(new StreamEvent(StreamEvent.Type.CREATING)); break; case 2: - fireEvent(new StreamEvent(StreamEvent.Type.READY)); + fireStreamEvent(new StreamEvent(StreamEvent.Type.READY)); break; case 3: - fireEvent(new StreamEvent(StreamEvent.Type.FAILED)); + fireStreamEvent(new StreamEvent(StreamEvent.Type.FAILED)); break; case 4: break; @@ -641,8 +667,13 @@ public class PulseAudioSourceDataLine im } } - private void fireEvent(StreamEvent e) { - + private void fireLineEvent(LineEvent e) { + for (LineListener lineListener : lineListeners) { + lineListener.update(e); + } + } + + private void fireStreamEvent(StreamEvent e) { for (StreamListener streamListener : streamListeners) { streamListener.update(e); } diff -r 8f4e01b67c92 -r 856e11044f24 src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Tue Aug 12 11:28:22 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Tue Aug 12 15:17:14 2008 -0400 @@ -75,7 +75,7 @@ static void stream_state_change_callback jobject obj = java_context->obj; - // printf("stream state changed to %d\n", pa_stream_get_state(stream)); + printf("----> Stream state changed to %d\n", pa_stream_get_state(stream)); /* Call the 'update' method in java * to handle all java-side events diff -r 8f4e01b67c92 -r 856e11044f24 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 11:28:22 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 15:17:14 2008 -0400 @@ -48,6 +48,8 @@ import javax.sound.sampled.DataLine; import javax.sound.sampled.DataLine; import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; +import javax.sound.sampled.LineEvent; +import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; @@ -63,6 +65,8 @@ public class PulseSourceDataLineTest { public class PulseSourceDataLineTest { Mixer mixer; + private int listenerCalled = 0; + public static junit.framework.Test suite() { return new JUnit4TestAdapter(PulseSourceDataLineTest.class); } @@ -103,6 +107,51 @@ public class PulseSourceDataLineTest { line.flush(); line.close(); + } + + @Test(expected = IllegalArgumentException.class) + public void testPlayLessThanFrameSize() throws LineUnavailableException, + UnsupportedAudioFileException, IOException { + File soundFile = new File("testsounds/startup.wav"); + AudioInputStream audioInputStream = AudioSystem + .getAudioInputStream(soundFile); + AudioFormat audioFormat = audioInputStream.getFormat(); + // the audio file must have an even number of channels + Assert.assertTrue(audioFormat.getChannels() % 2 == 0); + SourceDataLine line; + line = (SourceDataLine) mixer.getLine(new DataLine.Info( + SourceDataLine.class, audioFormat)); + + byte[] data = new byte[1]; + data[0] = (byte) 'a'; + + line.open(); + line.write(data, 0, 1); + + line.close(); + + } + + @Test + public void testOpenFormat() throws LineUnavailableException, + UnsupportedAudioFileException, IOException { + /* + * This test makes sure that the default format of a line using open() + * is the same format that was passed to the mixer's getLine() function + * to get the line in the first place + */ + + File soundFile = new File("testsounds/startup.wav"); + AudioInputStream audioInputStream = AudioSystem + .getAudioInputStream(soundFile); + AudioFormat audioFormat = audioInputStream.getFormat(); + + SourceDataLine line; + line = (SourceDataLine) mixer.getLine(new DataLine.Info( + SourceDataLine.class, audioFormat)); + Assert.assertNotNull(line); + line.open(); + Assert.assertTrue(line.getFormat().matches(audioFormat)); } @Test @@ -199,6 +248,68 @@ public class PulseSourceDataLineTest { sourceLine.close(); } + @Test + public void testOpenEvent() throws LineUnavailableException { + + listenerCalled = 0; + LineListener openListener = new LineListener() { + public void update(LineEvent event) { + Assert.assertTrue(event.getType() == LineEvent.Type.OPEN); + PulseSourceDataLineTest.this.listenerCalled++; + } + }; + + SourceDataLine line = (SourceDataLine) mixer.getLine(new Line.Info( + SourceDataLine.class)); + line.addLineListener(openListener); + line.open(); + line.removeLineListener(openListener); + line.close(); + Assert.assertEquals(1, listenerCalled); + listenerCalled = 0; + } + + @Test + public void testCloseEvent() throws LineUnavailableException { + listenerCalled = 0; + LineListener closeListener = new LineListener() { + public void update(LineEvent event) { + Assert.assertTrue(event.getType() == LineEvent.Type.CLOSE); + PulseSourceDataLineTest.this.listenerCalled++; + } + }; + + SourceDataLine line = (SourceDataLine) mixer.getLine(new Line.Info( + SourceDataLine.class)); + line.open(); + line.addLineListener(closeListener); + line.close(); + line.removeLineListener(closeListener); + Assert.assertEquals(1, listenerCalled); + listenerCalled = 0; + } + + @Test + public void testCloseEventWrongListener() throws LineUnavailableException { + listenerCalled = 0; + LineListener closeListener = new LineListener() { + public void update(LineEvent event) { + PulseSourceDataLineTest.this.listenerCalled++; + } + }; + + SourceDataLine line = (SourceDataLine) mixer.getLine(new Line.Info( + SourceDataLine.class)); + + line.open(); + line.addLineListener(closeListener); + line.removeLineListener(closeListener); + line.close(); + Assert.assertEquals(0, listenerCalled); + listenerCalled = 0; + + } + @After public void tearDown() throws Exception { From omajid at redhat.com Tue Aug 12 13:55:34 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 12 Aug 2008 20:55:34 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-12 Omair Majid changeset 9a72b909f18a in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=9a72b909f18a description: 2008-08-12 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Operation.java: added a function isNull to check if the pa_operation pointer is NULL * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: added support for LineListeners to be notified on a CLOSE event * src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c: removed debugging output * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: added description to be println()ed for testPlay() test diffstat: 4 files changed, 51 insertions(+), 17 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Operation.java | 7 + src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 47 ++++++++-- src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 12 -- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 2 diffs (186 lines): diff -r 856e11044f24 -r 9a72b909f18a src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Tue Aug 12 15:17:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Tue Aug 12 16:55:28 2008 -0400 @@ -94,6 +94,13 @@ public class Operation { } } + public boolean isNull() { + if (operationPointer == 0) { + return true; + } + return false; + } + public State getState() { assert (operationPointer != 0); int state; diff -r 856e11044f24 -r 9a72b909f18a src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 15:17:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 16:55:28 2008 -0400 @@ -364,7 +364,7 @@ public class PulseAudioSourceDataLine im } }; - + addStreamListener(openCloseListener); final Semaphore semaphore = new Semaphore(0); @@ -374,15 +374,12 @@ public class PulseAudioSourceDataLine im this.addStreamListener(new StreamListener() { @Override public void update(StreamEvent e) { - System.out.println(this.getClass().getName() - + " waiting to stream to become ready"); if (e.getType() == StreamEvent.Type.READY) { semaphore.release(); } } }); - System.out.println("about to open stream"); native_start(); } @@ -392,8 +389,6 @@ public class PulseAudioSourceDataLine im // throw new LineUnavailableException("unable to prepare // stream"); } - - System.out.println(this.getClass().getName() + "stream is ready"); controls = new Control[2]; volumeControl = new PulseAudioStreamVolumeControl(this); @@ -500,7 +495,15 @@ public class PulseAudioSourceDataLine im } private void addStreamListener(StreamListener listener) { - this.streamListeners.add(listener); + synchronized (streamListeners) { + this.streamListeners.add(listener); + } + } + + private void removeStreamListener(StreamListener listener) { + synchronized (streamListeners) { + this.streamListeners.remove(listener); + } } public boolean isOpen() { @@ -516,8 +519,31 @@ public class PulseAudioSourceDataLine im public void close() { assert (isOpen); + final Semaphore semaphore = new Semaphore(0); + + StreamListener closeListener = new StreamListener() { + @Override + public void update(StreamEvent e) { + if (e.getType() == StreamEvent.Type.TERMINATED + || e.getType() == StreamEvent.Type.FAILED) { + semaphore.release(); + } + } + }; + + addStreamListener(closeListener); + synchronized (eventLoop.threadLock) { native_close(); + } + + try { + semaphore.acquire(); + System.out.println("stream closed"); + removeStreamListener(closeListener); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); } } @@ -660,6 +686,7 @@ public class PulseAudioSourceDataLine im fireStreamEvent(new StreamEvent(StreamEvent.Type.FAILED)); break; case 4: + fireStreamEvent(new StreamEvent(StreamEvent.Type.TERMINATED)); break; default: assert ("not supposed to happen".indexOf("false") >= 0); @@ -674,8 +701,10 @@ public class PulseAudioSourceDataLine im } private void fireStreamEvent(StreamEvent e) { - for (StreamListener streamListener : streamListeners) { - streamListener.update(e); + synchronized (streamListeners) { + for (StreamListener streamListener : streamListeners) { + streamListener.update(e); + } } } diff -r 856e11044f24 -r 9a72b909f18a src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Tue Aug 12 15:17:14 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Tue Aug 12 16:55:28 2008 -0400 @@ -75,7 +75,7 @@ static void stream_state_change_callback jobject obj = java_context->obj; - printf("----> Stream state changed to %d\n", pa_stream_get_state(stream)); + // printf("stream state changed to %d\n", pa_stream_get_state(stream)); /* Call the 'update' method in java * to handle all java-side events @@ -91,10 +91,10 @@ static void stream_state_change_callback return; } - // printf("calling update on java\n"); + //printf("calling update on java\n"); (*env)->CallVoidMethod(env, obj, mid, pa_stream_get_state(stream)); - // printf("returning form stream_state_change_callback\n"); + //printf("returning form stream_state_change_callback\n"); return; } @@ -144,15 +144,12 @@ JNIEXPORT void JNICALL Java_org_classpat return; } - sample_spec.rate = sampleRate; sample_spec.channels = channels; printf("sample_spec.rate = %d\n", sample_spec.rate); printf("sample_spec.channels = %d\n", sample_spec.channels); - - - + if ( !pa_sample_spec_valid(&sample_spec)) { printf("error: invalid format\n"); throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); @@ -228,7 +225,6 @@ JNIEXPORT jlong JNICALL Java_org_classpa } - /* * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine * Method: native_start diff -r 856e11044f24 -r 9a72b909f18a unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 15:17:14 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 16:55:28 2008 -0400 @@ -81,6 +81,8 @@ public class PulseSourceDataLineTest { @Test public void testPlay() throws LineUnavailableException, UnsupportedAudioFileException, IOException { + System.out.println("This test plays a file"); + File soundFile = new File("testsounds/startup.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); From bugzilla-daemon at icedtea.classpath.org Tue Aug 12 19:22:49 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 13 Aug 2008 02:22:49 +0000 Subject: [Bug 184] New: Internal Error (stubGenerator_zero.cpp:84), pid=14195, tid=1873802416 Error: ShouldNotReachHere() Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=184 Summary: Internal Error (stubGenerator_zero.cpp:84), pid=14195, tid=1873802416 Error: ShouldNotReachHere() Product: IcedTea Version: unspecified Platform: Macintosh OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: zenlive at gmail.com I tested the program in the ibook fedora9. My application uses the ThinWire+springframework(2.0/2.5) running in the Tomcat 5.5/6.0. It works in the jdk5/6+tomcat5/6+windows xp. But it let tomcat crashed in the fedora9. I switched the jdk to 1.5.0-gcj/openjdk-1.6.0, springframework 2.0/2.5 ,tomcat 5/6 and rebuilt the program. Because the jdk/jvm of sun cannot be installed in my ibook, I cannot test them. ------------------------------------------------------------------------------ # # An unexpected error has been detected by Java Runtime Environment: # # Internal Error (stubGenerator_zero.cpp:84), pid=14195, tid=1873802416 # Error: ShouldNotReachHere() # # Java VM: OpenJDK Core VM (1.6.0-b09 interpreted mode linux-) # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # --------------- T H R E A D --------------- Current thread (0x101e6648): JavaThread "ThinWire-EventProcessorThread-0-25776844" daemon [_thread_in_Java, id=14237, stack(0x6fa00000,0x6fb00000)] Java stack: 0x6fafddd8: local[0] = 0x3f800000 0x6fafdddc: call_wrapper = 0x6fa7ea80 0x6fafdde0: frame_type = ENTRY_FRAME 0x6fafdde4: next_frame = 0x6fafde4c 0x6fafdde8: unboxed parameter[3] = 0x6fafde54 0x6fafddec: unboxed parameter[2] = 0x6fafde58 0x6fafddf0: parameter[0] (JNIEnv) = 0x6fa7eea8 0x6fafddf4: parameter[1] (mirror) = 0x6fa7eeac 0x6fafddf8: parameter[2] = 0x6fafddec 0x6fafddfc: parameter[3] = 0x6fafdde8 0x6fafde00: parameter[4] = 0x6fafde50 0x6fafde04: istate->_thread = 0x101e6648 0x6fafde08: istate->_bcp = 0x00000000 0x6fafde0c: istate->_locals = 0x6fafde58 0x6fafde10: istate->_constants = 0x6a5e2b48 0x6fafde14: istate->_method = sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 0x6fafde18: istate->_mdx = 0x00000000 0x6fafde1c: istate->_stack = 0x6fafde00 0x6fafde20: istate->_msg = 0x00000002 0x6fafde24: istate->_result = 0x00000000 0x6fafde28: (istate->_result) = 0x00000009 0x6fafde2c: (istate->_result) = 0x000000ac 0x6fafde30: istate->_prev_link = 0x00000000 0x6fafde34: istate->_oop_temp = 0x6a5e2ab8 0x6fafde38: istate->_stack_base = 0x6fafde04 0x6fafde3c: istate->_stack_limit = 0x6fafde00 0x6fafde40: istate->_monitor_base = 0x6fafde04 0x6fafde44: istate->_self_link = 0x6fafde04 0x6fafde48: frame_type = INTERPRETER_FRAME 0x6fafde4c: next_frame = 0x6fafdea4 0x6fafde50: local[2] = 0x00000000 0x6fafde54: local[1] = 0x5102bb40 0x6fafde58: local[0] = 0x4a373728 0x6fafde5c: istate->_thread = 0x101e6648 0x6fafde60: istate->_bcp = 0x6a5e278f 0x6fafde64: istate->_locals = 0x6fafdeb4 0x6fafde68: istate->_constants = 0x6a5e2b48 0x6fafde6c: istate->_method = sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 0x6fafde70: istate->_mdx = 0x00000000 0x6fafde74: istate->_stack = 0x6fafde4c 0x6fafde78: istate->_msg = 0x00000008 0x6fafde7c: istate->_result = 0x6a5e2900 0x6fafde80: (istate->_result) = 0x0ee60e30 0x6fafde84: (istate->_result) = 0x00000003 0x6fafde88: istate->_prev_link = 0x00000000 0x6fafde8c: istate->_oop_temp = 0x00000000 0x6fafde90: istate->_stack_base = 0x6fafde5c 0x6fafde94: istate->_stack_limit = 0x6fafde3c 0x6fafde98: istate->_monitor_base = 0x6fafde5c 0x6fafde9c: istate->_self_link = 0x6fafde5c 0x6fafdea0: frame_type = INTERPRETER_FRAME 0x6fafdea4: next_frame = 0x6fafdf00 0x6fafdea8: local[3] = 0x00000000 0x6fafdeac: local[2] = 0x00000000 0x6fafdeb0: local[1] = 0x5102bb40 0x6fafdeb4: local[0] = 0x4a396fa8 0x6fafdeb8: istate->_thread = 0x101e6648 0x6fafdebc: istate->_bcp = 0x6a5e2e7e 0x6fafdec0: istate->_locals = 0x6fafdf0c 0x6fafdec4: istate->_constants = 0x6a5e3170 0x6fafdec8: istate->_method = sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 0x6fafdecc: istate->_mdx = 0x00000000 0x6fafded0: istate->_stack = 0x6fafdea8 0x6fafded4: istate->_msg = 0x00000008 0x6fafded8: istate->_result = 0x6a5e27d8 0x6fafdedc: (istate->_result) = 0x0ee614a0 0x6fafdee0: (istate->_result) = 0x00000003 0x6fafdee4: istate->_prev_link = 0x00000000 0x6fafdee8: istate->_oop_temp = 0x00000000 0x6fafdeec: istate->_stack_base = 0x6fafdeb8 0x6fafdef0: istate->_stack_limit = 0x6fafdea8 0x6fafdef4: istate->_monitor_base = 0x6fafdeb8 0x6fafdef8: istate->_self_link = 0x6fafdeb8 0x6fafdefc: frame_type = INTERPRETER_FRAME 0x6fafdf00: next_frame = 0x6fafdf58 0x6fafdf04: local[2] = 0x00000000 0x6fafdf08: local[1] = 0x5102bb40 0x6fafdf0c: local[0] = 0x4a396fc0 0x6fafdf10: istate->_thread = 0x101e6648 0x6fafdf14: istate->_bcp = 0x6a2bb859 0x6fafdf18: istate->_locals = 0x6fafdf7c 0x6fafdf1c: istate->_constants = 0x6a2f2b90 0x6fafdf20: istate->_method = java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 0x6fafdf24: istate->_mdx = 0x00000000 0x6fafdf28: istate->_stack = 0x6fafdf00 0x6fafdf2c: istate->_msg = 0x00000008 0x6fafdf30: istate->_result = 0x6a5e2eb8 0x6fafdf34: (istate->_result) = 0x0ee614a0 0x6fafdf38: (istate->_result) = 0x00000005 0x6fafdf3c: istate->_prev_link = 0x00000000 0x6fafdf40: istate->_oop_temp = 0x00000000 0x6fafdf44: istate->_stack_base = 0x6fafdf10 0x6fafdf48: istate->_stack_limit = 0x6fafdefc 0x6fafdf4c: istate->_monitor_base = 0x6fafdf10 0x6fafdf50: istate->_self_link = 0x6fafdf10 0x6fafdf54: frame_type = INTERPRETER_FRAME 0x6fafdf58: next_frame = 0x6fafdfc8 0x6fafdf5c: local[8] = 0x00000000 0x6fafdf60: local[7] = 0x00000000 0x6fafdf64: local[6] = 0x00000000 0x6fafdf68: local[5] = 0x00000000 0x6fafdf6c: local[4] = 0x00000000 0x6fafdf70: local[3] = 0x00000000 0x6fafdf74: local[2] = 0x00000000 0x6fafdf78: local[1] = 0x5102bb40 0x6fafdf7c: local[0] = 0x4a373728 0x6fafdf80: istate->_thread = 0x101e6648 0x6fafdf84: istate->_bcp = 0x6ae7090f 0x6fafdf88: istate->_locals = 0x6fafdfd8 0x6fafdf8c: istate->_constants = 0x6ae71118 0x6fafdf90: istate->_method = org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; 0x6fafdf94: istate->_mdx = 0x00000000 0x6fafdf98: istate->_stack = 0x6fafdf70 0x6fafdf9c: istate->_msg = 0x00000008 0x6fafdfa0: istate->_result = 0x6a2bb8c8 0x6fafdfa4: (istate->_result) = 0x0ee614a0 0x6fafdfa8: (istate->_result) = 0x00000003 0x6fafdfac: istate->_prev_link = 0x00000000 0x6fafdfb0: istate->_oop_temp = 0x00000000 0x6fafdfb4: istate->_stack_base = 0x6fafdf80 0x6fafdfb8: istate->_stack_limit = 0x6fafdf6c 0x6fafdfbc: istate->_monitor_base = 0x6fafdf80 0x6fafdfc0: istate->_self_link = 0x6fafdf80 0x6fafdfc4: frame_type = INTERPRETER_FRAME 0x6fafdfc8: next_frame = 0x6fafe024 0x6fafdfcc: local[3] = 0x00000000 0x6fafdfd0: local[2] = 0x00000000 0x6fafdfd4: local[1] = 0x4a373728 0x6fafdfd8: local[0] = 0x5102bb40 0x6fafdfdc: istate->_thread = 0x101e6648 0x6fafdfe0: istate->_bcp = 0x6b3747b4 0x6fafdfe4: istate->_locals = 0x6fafe028 0x6fafdfe8: istate->_constants = 0x6b374fd8 0x6fafdfec: istate->_method = org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint()Ljava/lang/Object; 0x6fafdff0: istate->_mdx = 0x00000000 0x6fafdff4: istate->_stack = 0x6fafdfcc 0x6fafdff8: istate->_msg = 0x00000008 0x6fafdffc: istate->_result = 0x6ae709c8 0x6fafe000: (istate->_result) = 0x0ee614a0 0x6fafe004: (istate->_result) = 0x00000003 0x6fafe008: istate->_prev_link = 0x00000000 0x6fafe00c: istate->_oop_temp = 0x00000000 0x6fafe010: istate->_stack_base = 0x6fafdfdc 0x6fafe014: istate->_stack_limit = 0x6fafdfcc 0x6fafe018: istate->_monitor_base = 0x6fafdfdc 0x6fafe01c: istate->_self_link = 0x6fafdfdc 0x6fafe020: frame_type = INTERPRETER_FRAME 0x6fafe024: next_frame = 0x6fafe074 0x6fafe028: local[0] = 0x4a396c98 0x6fafe02c: istate->_thread = 0x101e6648 0x6fafe030: istate->_bcp = 0x6b374693 0x6fafe034: istate->_locals = 0x6fafe080 0x6fafe038: istate->_constants = 0x6b374fd8 0x6fafe03c: istate->_method = org.springframework.aop.framework.ReflectiveMethodInvocation.proceed()Ljava/lang/Object; 0x6fafe040: istate->_mdx = 0x00000000 0x6fafe044: istate->_stack = 0x6fafe024 0x6fafe048: istate->_msg = 0x00000008 0x6fafe04c: istate->_result = 0x6b3747d0 0x6fafe050: (istate->_result) = 0x0ee614a0 0x6fafe054: (istate->_result) = 0x00000003 0x6fafe058: istate->_prev_link = 0x00000000 0x6fafe05c: istate->_oop_temp = 0x00000000 0x6fafe060: istate->_stack_base = 0x6fafe02c 0x6fafe064: istate->_stack_limit = 0x6fafe018 0x6fafe068: istate->_monitor_base = 0x6fafe02c 0x6fafe06c: istate->_self_link = 0x6fafe02c 0x6fafe070: frame_type = INTERPRETER_FRAME 0x6fafe074: next_frame = 0x6fafe0cc 0x6fafe078: local[2] = 0x00000000 0x6fafe07c: local[1] = 0x00000000 0x6fafe080: local[0] = 0x4a396c98 0x6fafe084: istate->_thread = 0x101e6648 0x6fafe088: istate->_bcp = 0x6ac2dc7f 0x6fafe08c: istate->_locals = 0x6fafe0f4 0x6fafe090: istate->_constants = 0x6ac338e0 0x6fafe094: istate->_method = org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Lorg/aopalliance/intercept/MethodInvocation;)Ljava/lang/Object; 0x6fafe098: istate->_mdx = 0x00000000 0x6fafe09c: istate->_stack = 0x6fafe07c 0x6fafe0a0: istate->_msg = 0x00000008 0x6fafe0a4: istate->_result = 0x6b374728 0x6fafe0a8: (istate->_result) = 0x0ee614a0 0x6fafe0ac: (istate->_result) = 0x00000005 0x6fafe0b0: istate->_prev_link = 0x00000000 0x6fafe0b4: istate->_oop_temp = 0x00000000 0x6fafe0b8: istate->_stack_base = 0x6fafe084 0x6fafe0bc: istate->_stack_limit = 0x6fafe060 0x6fafe0c0: istate->_monitor_base = 0x6fafe084 0x6fafe0c4: istate->_self_link = 0x6fafe084 0x6fafe0c8: frame_type = INTERPRETER_FRAME 0x6fafe0cc: next_frame = 0x6fafe140 0x6fafe0d0: local[9] = 0x00000000 0x6fafe0d4: local[8] = 0x00000000 0x6fafe0d8: local[7] = 0x00000000 0x6fafe0dc: local[6] = 0x00000000 0x6fafe0e0: local[5] = 0x4a396f88 0x6fafe0e4: local[4] = 0x4a396e80 0x6fafe0e8: local[3] = 0x50ac13b8 0x6fafe0ec: local[2] = 0x6ac98b28 0x6fafe0f0: local[1] = 0x4a396c98 0x6fafe0f4: local[0] = 0x50bfaa28 0x6fafe0f8: istate->_thread = 0x101e6648 0x6fafe0fc: istate->_bcp = 0x6b3746e5 0x6fafe100: istate->_locals = 0x6fafe14c 0x6fafe104: istate->_constants = 0x6b374fd8 0x6fafe108: istate->_method = org.springframework.aop.framework.ReflectiveMethodInvocation.proceed()Ljava/lang/Object; 0x6fafe10c: istate->_mdx = 0x00000000 0x6fafe110: istate->_stack = 0x6fafe0ec 0x6fafe114: istate->_msg = 0x00000008 0x6fafe118: istate->_result = 0x6ac2dd88 0x6fafe11c: (istate->_result) = 0x0ee614a0 0x6fafe120: (istate->_result) = 0x00000005 0x6fafe124: istate->_prev_link = 0x00000000 0x6fafe128: istate->_oop_temp = 0x00000000 0x6fafe12c: istate->_stack_base = 0x6fafe0f8 0x6fafe130: istate->_stack_limit = 0x6fafe0e4 0x6fafe134: istate->_monitor_base = 0x6fafe0f8 0x6fafe138: istate->_self_link = 0x6fafe0f8 0x6fafe13c: frame_type = INTERPRETER_FRAME 0x6fafe140: next_frame = 0x6fafe198 0x6fafe144: local[2] = 0x00000000 0x6fafe148: local[1] = 0x50bfaa28 0x6fafe14c: local[0] = 0x4a396c98 0x6fafe150: istate->_thread = 0x101e6648 0x6fafe154: istate->_bcp = 0x6afe249f 0x6fafe158: istate->_locals = 0x6fafe1b0 0x6fafe15c: istate->_constants = 0x6afe2958 0x6fafe160: istate->_method = org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(Lorg/aopalliance/intercept/MethodInvocation;)Ljava/lang/Object; 0x6fafe164: istate->_mdx = 0x00000000 0x6fafe168: istate->_stack = 0x6fafe148 0x6fafe16c: istate->_msg = 0x00000008 0x6fafe170: istate->_result = 0x6b374728 0x6fafe174: (istate->_result) = 0x0ee614a0 0x6fafe178: (istate->_result) = 0x00000005 0x6fafe17c: istate->_prev_link = 0x00000000 0x6fafe180: istate->_oop_temp = 0x00000000 0x6fafe184: istate->_stack_base = 0x6fafe150 0x6fafe188: istate->_stack_limit = 0x6fafe144 0x6fafe18c: istate->_monitor_base = 0x6fafe150 0x6fafe190: istate->_self_link = 0x6fafe150 0x6fafe194: frame_type = INTERPRETER_FRAME 0x6fafe198: next_frame = 0x6fafe1fc 0x6fafe19c: local[5] = 0x00000000 0x6fafe1a0: local[4] = 0x00000000 0x6fafe1a4: local[3] = 0x00000000 0x6fafe1a8: local[2] = 0x00000000 0x6fafe1ac: local[1] = 0x4a396c98 0x6fafe1b0: local[0] = 0x50ba54f0 0x6fafe1b4: istate->_thread = 0x101e6648 0x6fafe1b8: istate->_bcp = 0x6b3746e5 0x6fafe1bc: istate->_locals = 0x6fafe208 0x6fafe1c0: istate->_constants = 0x6b374fd8 0x6fafe1c4: istate->_method = org.springframework.aop.framework.ReflectiveMethodInvocation.proceed()Ljava/lang/Object; 0x6fafe1c8: istate->_mdx = 0x00000000 0x6fafe1cc: istate->_stack = 0x6fafe1a8 0x6fafe1d0: istate->_msg = 0x00000008 0x6fafe1d4: istate->_result = 0x6afe24f0 0x6fafe1d8: (istate->_result) = 0x0ee614a0 0x6fafe1dc: (istate->_result) = 0x00000005 0x6fafe1e0: istate->_prev_link = 0x00000000 0x6fafe1e4: istate->_oop_temp = 0x00000000 0x6fafe1e8: istate->_stack_base = 0x6fafe1b4 0x6fafe1ec: istate->_stack_limit = 0x6fafe1a0 0x6fafe1f0: istate->_monitor_base = 0x6fafe1b4 0x6fafe1f4: istate->_self_link = 0x6fafe1b4 0x6fafe1f8: frame_type = INTERPRETER_FRAME 0x6fafe1fc: next_frame = 0x6fafe254 0x6fafe200: local[2] = 0x00000000 0x6fafe204: local[1] = 0x50ba54f0 0x6fafe208: local[0] = 0x4a396c98 0x6fafe20c: istate->_thread = 0x101e6648 0x6fafe210: istate->_bcp = 0x6aff58d7 0x6fafe214: istate->_locals = 0x6fafe28c 0x6fafe218: istate->_constants = 0x6aff5fd8 0x6fafe21c: istate->_method = org.springframework.aop.framework.JdkDynamicAopProxy.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; 0x6fafe220: istate->_mdx = 0x00000000 0x6fafe224: istate->_stack = 0x6fafe204 0x6fafe228: istate->_msg = 0x00000008 0x6fafe22c: istate->_result = 0x6b374728 0x6fafe230: (istate->_result) = 0x0ee614a0 0x6fafe234: (istate->_result) = 0x00000005 0x6fafe238: istate->_prev_link = 0x00000000 0x6fafe23c: istate->_oop_temp = 0x00000000 0x6fafe240: istate->_stack_base = 0x6fafe20c 0x6fafe244: istate->_stack_limit = 0x6fafe1e8 0x6fafe248: istate->_monitor_base = 0x6fafe20c 0x6fafe24c: istate->_self_link = 0x6fafe20c 0x6fafe250: frame_type = INTERPRETER_FRAME 0x6fafe254: next_frame = 0x6fafe2d8 0x6fafe258: local[13] = 0x00000000 0x6fafe25c: local[12] = 0x00000000 0x6fafe260: local[11] = 0x4a38f230 0x6fafe264: local[10] = 0x00000000 0x6fafe268: local[9] = 0x5102bb40 0x6fafe26c: local[8] = 0x6ac98b28 0x6fafe270: local[7] = 0x4a31f8e8 0x6fafe274: local[6] = 0x00000000 0x6fafe278: local[5] = 0x00000000 0x6fafe27c: local[4] = 0x4a396c98 0x6fafe280: local[3] = 0x00000000 0x6fafe284: local[2] = 0x4a373728 0x6fafe288: local[1] = 0x4a374008 0x6fafe28c: local[0] = 0x4a320200 0x6fafe290: istate->_thread = 0x101e6648 0x6fafe294: istate->_bcp = 0x6b4ee091 0x6fafe298: istate->_locals = 0x6fafe2e0 0x6fafe29c: istate->_constants = 0x6b4efc88 0x6fafe2a0: istate->_method = $Proxy9.getTimeOut()F 0x6fafe2a4: istate->_mdx = 0x00000000 0x6fafe2a8: istate->_stack = 0x6fafe27c 0x6fafe2ac: istate->_msg = 0x00000008 0x6fafe2b0: istate->_result = 0x6aff5a48 0x6fafe2b4: (istate->_result) = 0x0ee614a0 0x6fafe2b8: (istate->_result) = 0x00000005 0x6fafe2bc: istate->_prev_link = 0x00000000 0x6fafe2c0: istate->_oop_temp = 0x00000000 0x6fafe2c4: istate->_stack_base = 0x6fafe290 0x6fafe2c8: istate->_stack_limit = 0x6fafe264 0x6fafe2cc: istate->_monitor_base = 0x6fafe290 0x6fafe2d0: istate->_self_link = 0x6fafe290 0x6fafe2d4: frame_type = INTERPRETER_FRAME 0x6fafe2d8: next_frame = 0x6fafe340 0x6fafe2dc: local[6] = 0x00000000 0x6fafe2e0: local[5] = 0x4a374008 0x6fafe2e4: local[4] = 0x00000001 0x6fafe2e8: local[3] = 0x4a386c00 0x6fafe2ec: local[2] = 0x4a386c00 0x6fafe2f0: local[1] = 0x4a386348 0x6fafe2f4: local[0] = 0x5102bb78 0x6fafe2f8: istate->_thread = 0x101e6648 0x6fafe2fc: istate->_bcp = 0x6b4e680f 0x6fafe300: istate->_locals = 0x6fafe354 0x6fafe304: istate->_constants = 0x6b4e7558 0x6fafe308: istate->_method = com.toroasia.crm.apps.components.AdPagePanel.refreshAdPageGridBox(I)V 0x6fafe30c: istate->_mdx = 0x00000000 0x6fafe310: istate->_stack = 0x6fafe2dc 0x6fafe314: istate->_msg = 0x00000008 0x6fafe318: istate->_result = 0x6b4ee0b0 0x6fafe31c: (istate->_result) = 0x0ee614a0 0x6fafe320: (istate->_result) = 0x00000005 0x6fafe324: istate->_prev_link = 0x00000000 0x6fafe328: istate->_oop_temp = 0x00000000 0x6fafe32c: istate->_stack_base = 0x6fafe2f8 0x6fafe330: istate->_stack_limit = 0x6fafe2dc 0x6fafe334: istate->_monitor_base = 0x6fafe2f8 0x6fafe338: istate->_self_link = 0x6fafe2f8 0x6fafe33c: frame_type = INTERPRETER_FRAME 0x6fafe340: next_frame = 0x6fafe3a0 0x6fafe344: local[4] = 0x00000000 0x6fafe348: local[3] = 0x00000000 0x6fafe34c: local[2] = 0x4a374008 0x6fafe350: local[1] = 0x00000035 0x6fafe354: local[0] = 0x5102bb78 0x6fafe358: istate->_thread = 0x101e6648 0x6fafe35c: istate->_bcp = 0x6b4e6673 0x6fafe360: istate->_locals = 0x6fafe3bc 0x6fafe364: istate->_constants = 0x6b4e7558 0x6fafe368: istate->_method = com.toroasia.crm.apps.components.AdPagePanel.initComponents()V 0x6fafe36c: istate->_mdx = 0x00000000 0x6fafe370: istate->_stack = 0x6fafe34c 0x6fafe374: istate->_msg = 0x00000008 0x6fafe378: istate->_result = 0x6b4e68a0 0x6fafe37c: (istate->_result) = 0x0ee614a0 0x6fafe380: (istate->_result) = 0x00000003 0x6fafe384: istate->_prev_link = 0x00000000 0x6fafe388: istate->_oop_temp = 0x00000000 0x6fafe38c: istate->_stack_base = 0x6fafe358 0x6fafe390: istate->_stack_limit = 0x6fafe340 0x6fafe394: istate->_monitor_base = 0x6fafe358 0x6fafe398: istate->_self_link = 0x6fafe358 0x6fafe39c: frame_type = INTERPRETER_FRAME 0x6fafe3a0: next_frame = 0x6fafe408 0x6fafe3a4: local[6] = 0x00000000 0x6fafe3a8: local[5] = 0x5102bd18 0x6fafe3ac: local[4] = 0x5102bce0 0x6fafe3b0: local[3] = 0x5102bca8 0x6fafe3b4: local[2] = 0x5102bc70 0x6fafe3b8: local[1] = 0x5102bc38 0x6fafe3bc: local[0] = 0x5102bb78 0x6fafe3c0: istate->_thread = 0x101e6648 0x6fafe3c4: istate->_bcp = 0x6b4e63ea 0x6fafe3c8: istate->_locals = 0x6fafe410 0x6fafe3cc: istate->_constants = 0x6b4e7558 0x6fafe3d0: istate->_method = com.toroasia.crm.apps.components.AdPagePanel.(I)V 0x6fafe3d4: istate->_mdx = 0x00000000 0x6fafe3d8: istate->_stack = 0x6fafe3b8 0x6fafe3dc: istate->_msg = 0x00000008 0x6fafe3e0: istate->_result = 0x6b4e6718 0x6fafe3e4: (istate->_result) = 0x0ee614a0 0x6fafe3e8: (istate->_result) = 0x00000003 0x6fafe3ec: istate->_prev_link = 0x00000000 0x6fafe3f0: istate->_oop_temp = 0x00000000 0x6fafe3f4: istate->_stack_base = 0x6fafe3c0 0x6fafe3f8: istate->_stack_limit = 0x6fafe3b4 0x6fafe3fc: istate->_monitor_base = 0x6fafe3c0 0x6fafe400: istate->_self_link = 0x6fafe3c0 0x6fafe404: frame_type = INTERPRETER_FRAME 0x6fafe408: next_frame = 0x6fafe464 0x6fafe40c: local[3] = 0x00000035 0x6fafe410: local[2] = 0x5102bb78 0x6fafe414: local[1] = 0x5102bb78 0x6fafe418: local[0] = 0x5102bd50 0x6fafe41c: istate->_thread = 0x101e6648 0x6fafe420: istate->_bcp = 0x6b4e519a 0x6fafe424: istate->_locals = 0x6fafe468 0x6fafe428: istate->_constants = 0x6b4e5618 0x6fafe42c: istate->_method = com.toroasia.crm.apps.components.AdvertisingPageTab.initComponents()V 0x6fafe430: istate->_mdx = 0x00000000 0x6fafe434: istate->_stack = 0x6fafe408 0x6fafe438: istate->_msg = 0x00000008 0x6fafe43c: istate->_result = 0x6b4e6418 0x6fafe440: (istate->_result) = 0x0ee614a0 0x6fafe444: (istate->_result) = 0x00000003 0x6fafe448: istate->_prev_link = 0x00000000 0x6fafe44c: istate->_oop_temp = 0x00000000 0x6fafe450: istate->_stack_base = 0x6fafe41c 0x6fafe454: istate->_stack_limit = 0x6fafe404 0x6fafe458: istate->_monitor_base = 0x6fafe41c 0x6fafe45c: istate->_self_link = 0x6fafe41c 0x6fafe460: frame_type = INTERPRETER_FRAME 0x6fafe464: next_frame = 0x6fafe4b4 0x6fafe468: local[0] = 0x5102bd50 0x6fafe46c: istate->_thread = 0x101e6648 0x6fafe470: istate->_bcp = 0x6b4e5081 0x6fafe474: istate->_locals = 0x6fafe4bc 0x6fafe478: istate->_constants = 0x6b4e5618 0x6fafe47c: istate->_method = com.toroasia.crm.apps.components.AdvertisingPageTab.(I)V 0x6fafe480: istate->_mdx = 0x00000000 0x6fafe484: istate->_stack = 0x6fafe464 0x6fafe488: istate->_msg = 0x00000008 0x6fafe48c: istate->_result = 0x6b4e5218 0x6fafe490: (istate->_result) = 0x0ee614a0 0x6fafe494: (istate->_result) = 0x00000003 0x6fafe498: istate->_prev_link = 0x00000000 0x6fafe49c: istate->_oop_temp = 0x00000000 0x6fafe4a0: istate->_stack_base = 0x6fafe46c 0x6fafe4a4: istate->_stack_limit = 0x6fafe458 0x6fafe4a8: istate->_monitor_base = 0x6fafe46c 0x6fafe4ac: istate->_self_link = 0x6fafe46c 0x6fafe4b0: frame_type = INTERPRETER_FRAME 0x6fafe4b4: next_frame = 0x6fafe510 0x6fafe4b8: local[3] = 0x00000035 0x6fafe4bc: local[2] = 0x5102bd50 0x6fafe4c0: local[1] = 0x5102bd50 0x6fafe4c4: local[0] = 0x50fcd9d8 0x6fafe4c8: istate->_thread = 0x101e6648 0x6fafe4cc: istate->_bcp = 0x6b3ed784 0x6fafe4d0: istate->_locals = 0x6fafe530 0x6fafe4d4: istate->_constants = 0x6b474958 0x6fafe4d8: istate->_method = com.toroasia.crm.apps.components.AdvertisingCampaignManager.initComponents(Lorg/springframework/jdbc/support/rowset/SqlRowSet;)V 0x6fafe4dc: istate->_mdx = 0x00000000 0x6fafe4e0: istate->_stack = 0x6fafe4b4 0x6fafe4e4: istate->_msg = 0x00000008 0x6fafe4e8: istate->_result = 0x6b4e50b0 0x6fafe4ec: (istate->_result) = 0x0ee614a0 0x6fafe4f0: (istate->_result) = 0x00000003 0x6fafe4f4: istate->_prev_link = 0x00000000 0x6fafe4f8: istate->_oop_temp = 0x00000000 0x6fafe4fc: istate->_stack_base = 0x6fafe4c8 0x6fafe500: istate->_stack_limit = 0x6fafe4ac 0x6fafe504: istate->_monitor_base = 0x6fafe4c8 0x6fafe508: istate->_self_link = 0x6fafe4c8 0x6fafe50c: frame_type = INTERPRETER_FRAME 0x6fafe510: next_frame = 0x6fafe57c 0x6fafe514: local[7] = 0x5102bdf8 0x6fafe518: local[6] = 0x5102bde0 0x6fafe51c: local[5] = 0x5102bdc8 0x6fafe520: local[4] = 0x00000001 0x6fafe524: local[3] = 0x00000000 0x6fafe528: local[2] = 0x50f0b310 0x6fafe52c: local[1] = 0x50fcdaf0 0x6fafe530: local[0] = 0x50fcd9d8 0x6fafe534: istate->_thread = 0x101e6648 0x6fafe538: istate->_bcp = 0x6b3ed1f0 0x6fafe53c: istate->_locals = 0x6fafe588 0x6fafe540: istate->_constants = 0x6b474958 0x6fafe544: istate->_method = com.toroasia.crm.apps.components.AdvertisingCampaignManager.(Lcom/toroasia/crm/apps/components/AdvertisingCampaignDialog;Lorg/springframework/jdbc/support/rowset/SqlRowSet;)V 0x6fafe548: istate->_mdx = 0x00000000 0x6fafe54c: istate->_stack = 0x6fafe528 0x6fafe550: istate->_msg = 0x00000008 0x6fafe554: istate->_result = 0x6b3edb90 0x6fafe558: (istate->_result) = 0x0ee614a0 0x6fafe55c: (istate->_result) = 0x00000003 0x6fafe560: istate->_prev_link = 0x00000000 0x6fafe564: istate->_oop_temp = 0x00000000 0x6fafe568: istate->_stack_base = 0x6fafe534 0x6fafe56c: istate->_stack_limit = 0x6fafe520 0x6fafe570: istate->_monitor_base = 0x6fafe534 0x6fafe574: istate->_self_link = 0x6fafe534 0x6fafe578: frame_type = INTERPRETER_FRAME 0x6fafe57c: next_frame = 0x6fafe5d8 0x6fafe580: local[3] = 0x50fcdaf0 0x6fafe584: local[2] = 0x50f506d8 0x6fafe588: local[1] = 0x50fcd9d8 0x6fafe58c: local[0] = 0x50fcd9d8 0x6fafe590: istate->_thread = 0x101e6648 0x6fafe594: istate->_bcp = 0x6b3e1153 0x6fafe598: istate->_locals = 0x6fafe5ec 0x6fafe59c: istate->_constants = 0x6b3eeb08 0x6fafe5a0: istate->_method = com.toroasia.crm.apps.components.AdvertisingCampaignDialog.editAction()V 0x6fafe5a4: istate->_mdx = 0x00000000 0x6fafe5a8: istate->_stack = 0x6fafe57c 0x6fafe5ac: istate->_msg = 0x00000008 0x6fafe5b0: istate->_result = 0x6b3ed250 0x6fafe5b4: (istate->_result) = 0x0ee614a0 0x6fafe5b8: (istate->_result) = 0x00000003 0x6fafe5bc: istate->_prev_link = 0x00000000 0x6fafe5c0: istate->_oop_temp = 0x00000000 0x6fafe5c4: istate->_stack_base = 0x6fafe590 0x6fafe5c8: istate->_stack_limit = 0x6fafe57c 0x6fafe5cc: istate->_monitor_base = 0x6fafe590 0x6fafe5d0: istate->_self_link = 0x6fafe590 0x6fafe5d4: frame_type = INTERPRETER_FRAME 0x6fafe5d8: next_frame = 0x6fafe638 0x6fafe5dc: local[4] = 0x00000000 0x6fafe5e0: local[3] = 0x50fcdb00 0x6fafe5e4: local[2] = 0x50fcdaf0 0x6fafe5e8: local[1] = 0x00000000 0x6fafe5ec: local[0] = 0x50f506d8 0x6fafe5f0: istate->_thread = 0x101e6648 0x6fafe5f4: istate->_bcp = 0x6b3e44f6 0x6fafe5f8: istate->_locals = 0x6fafe640 0x6fafe5fc: istate->_constants = 0x6b3e8c90 0x6fafe600: istate->_method = com.toroasia.common.components.MyCommonDialog.actionPerformed(Lthinwire/ui/event/ActionEvent;)V 0x6fafe604: istate->_mdx = 0x00000000 0x6fafe608: istate->_stack = 0x6fafe5e8 0x6fafe60c: istate->_msg = 0x00000008 0x6fafe610: istate->_result = 0x6b3e11d0 0x6fafe614: (istate->_result) = 0x0ee614a0 0x6fafe618: (istate->_result) = 0x00000003 0x6fafe61c: istate->_prev_link = 0x00000000 0x6fafe620: istate->_oop_temp = 0x00000000 0x6fafe624: istate->_stack_base = 0x6fafe5f0 0x6fafe628: istate->_stack_limit = 0x6fafe5e4 0x6fafe62c: istate->_monitor_base = 0x6fafe5f0 0x6fafe630: istate->_self_link = 0x6fafe5f0 0x6fafe634: frame_type = INTERPRETER_FRAME 0x6fafe638: next_frame = 0x6fafe68c 0x6fafe63c: local[1] = 0x50fcdb10 0x6fafe640: local[0] = 0x50f506d8 0x6fafe644: istate->_thread = 0x101e6648 0x6fafe648: istate->_bcp = 0x6b35d6db 0x6fafe64c: istate->_locals = 0x6fafe6b0 0x6fafe650: istate->_constants = 0x6b35f808 0x6fafe654: istate->_method = thinwire.ui.EventListenerImpl.fireEvent(Ljava/util/EventObject;Ljava/lang/Object;)V 0x6fafe658: istate->_mdx = 0x00000000 0x6fafe65c: istate->_stack = 0x6fafe638 0x6fafe660: istate->_msg = 0x00000008 0x6fafe664: istate->_result = 0x6b3e4548 0x6fafe668: (istate->_result) = 0x0ee614a0 0x6fafe66c: (istate->_result) = 0x00000005 0x6fafe670: istate->_prev_link = 0x00000000 0x6fafe674: istate->_oop_temp = 0x00000000 0x6fafe678: istate->_stack_base = 0x6fafe644 0x6fafe67c: istate->_stack_limit = 0x6fafe62c 0x6fafe680: istate->_monitor_base = 0x6fafe644 0x6fafe684: istate->_self_link = 0x6fafe644 0x6fafe688: frame_type = INTERPRETER_FRAME 0x6fafe68c: next_frame = 0x6fafe6fc 0x6fafe690: local[8] = 0x6b294970 0x6fafe694: local[7] = 0x4a373ef0 0x6fafe698: local[6] = 0x51016860 0x6fafe69c: local[5] = 0x50f506d8 0x6fafe6a0: local[4] = 0x50fcdb68 0x6fafe6a4: local[3] = 0x50fcdb50 0x6fafe6a8: local[2] = 0x50fcdb38 0x6fafe6ac: local[1] = 0x50fcdb10 0x6fafe6b0: local[0] = 0x50f59410 0x6fafe6b4: istate->_thread = 0x101e6648 0x6fafe6b8: istate->_bcp = 0x6b35cf78 0x6fafe6bc: istate->_locals = 0x6fafe708 0x6fafe6c0: istate->_constants = 0x6b35f808 0x6fafe6c4: istate->_method = thinwire.ui.EventListenerImpl.fireAction(Lthinwire/ui/event/ActionEvent;)V 0x6fafe6c8: istate->_mdx = 0x00000000 0x6fafe6cc: istate->_stack = 0x6fafe6a4 0x6fafe6d0: istate->_msg = 0x00000008 0x6fafe6d4: istate->_result = 0x6b35d8d8 0x6fafe6d8: (istate->_result) = 0x0ee614a0 0x6fafe6dc: (istate->_result) = 0x00000003 0x6fafe6e0: istate->_prev_link = 0x00000000 0x6fafe6e4: istate->_oop_temp = 0x00000000 0x6fafe6e8: istate->_stack_base = 0x6fafe6b4 0x6fafe6ec: istate->_stack_limit = 0x6fafe6a0 0x6fafe6f0: istate->_monitor_base = 0x6fafe6b4 0x6fafe6f4: istate->_self_link = 0x6fafe6b4 0x6fafe6f8: frame_type = INTERPRETER_FRAME 0x6fafe6fc: next_frame = 0x6fafe754 0x6fafe700: local[2] = 0x6b302180 0x6fafe704: local[1] = 0x50fcdb10 0x6fafe708: local[0] = 0x50f59410 0x6fafe70c: istate->_thread = 0x101e6648 0x6fafe710: istate->_bcp = 0x6b2d7b8d 0x6fafe714: istate->_locals = 0x6fafe75c 0x6fafe718: istate->_constants = 0x6b2e33d8 0x6fafe71c: istate->_method = thinwire.ui.AbstractComponent.fireAction(Lthinwire/ui/event/ActionEvent;)V 0x6fafe720: istate->_mdx = 0x00000000 0x6fafe724: istate->_stack = 0x6fafe700 0x6fafe728: istate->_msg = 0x00000008 0x6fafe72c: istate->_result = 0x6b35cfb8 0x6fafe730: (istate->_result) = 0x0ee614a0 0x6fafe734: (istate->_result) = 0x00000003 0x6fafe738: istate->_prev_link = 0x00000000 0x6fafe73c: istate->_oop_temp = 0x00000000 0x6fafe740: istate->_stack_base = 0x6fafe70c 0x6fafe744: istate->_stack_limit = 0x6fafe700 0x6fafe748: istate->_monitor_base = 0x6fafe70c 0x6fafe74c: istate->_self_link = 0x6fafe70c 0x6fafe750: frame_type = INTERPRETER_FRAME 0x6fafe754: next_frame = 0x6fafe7a8 0x6fafe758: local[1] = 0x50fcdb10 0x6fafe75c: local[0] = 0x50f53cd0 0x6fafe760: istate->_thread = 0x101e6648 0x6fafe764: istate->_bcp = 0x6b3019aa 0x6fafe768: istate->_locals = 0x6fafe7b0 0x6fafe76c: istate->_constants = 0x6b302228 0x6fafe770: istate->_method = thinwire.ui.Button.fireAction(Lthinwire/ui/event/ActionEvent;)V 0x6fafe774: istate->_mdx = 0x00000000 0x6fafe778: istate->_stack = 0x6fafe754 0x6fafe77c: istate->_msg = 0x00000008 0x6fafe780: istate->_result = 0x6b2d7bb8 0x6fafe784: (istate->_result) = 0x0ee614a0 0x6fafe788: (istate->_result) = 0x00000003 0x6fafe78c: istate->_prev_link = 0x00000000 0x6fafe790: istate->_oop_temp = 0x00000000 0x6fafe794: istate->_stack_base = 0x6fafe760 0x6fafe798: istate->_stack_limit = 0x6fafe754 0x6fafe79c: istate->_monitor_base = 0x6fafe760 0x6fafe7a0: istate->_self_link = 0x6fafe760 0x6fafe7a4: frame_type = INTERPRETER_FRAME 0x6fafe7a8: next_frame = 0x6fafe7fc 0x6fafe7ac: local[1] = 0x50fcdb10 0x6fafe7b0: local[0] = 0x50f53cd0 0x6fafe7b4: istate->_thread = 0x101e6648 0x6fafe7b8: istate->_bcp = 0x6b28d540 0x6fafe7bc: istate->_locals = 0x6fafe824 0x6fafe7c0: istate->_constants = 0x6b359b20 0x6fafe7c4: istate->_method = thinwire.render.web.ComponentRenderer.componentChange(Lthinwire/render/web/WebComponentEvent;)V 0x6fafe7c8: istate->_mdx = 0x00000000 0x6fafe7cc: istate->_stack = 0x6fafe7a8 0x6fafe7d0: istate->_msg = 0x00000008 0x6fafe7d4: istate->_result = 0x6b3019d0 0x6fafe7d8: (istate->_result) = 0x0ee614a0 0x6fafe7dc: (istate->_result) = 0x00000005 0x6fafe7e0: istate->_prev_link = 0x00000000 0x6fafe7e4: istate->_oop_temp = 0x00000000 0x6fafe7e8: istate->_stack_base = 0x6fafe7b4 0x6fafe7ec: istate->_stack_limit = 0x6fafe774 0x6fafe7f0: istate->_monitor_base = 0x6fafe7b4 0x6fafe7f4: istate->_self_link = 0x6fafe7b4 0x6fafe7f8: frame_type = INTERPRETER_FRAME 0x6fafe7fc: next_frame = 0x6fafe870 0x6fafe800: local[9] = 0x0000000d 0x6fafe804: local[8] = 0x00000044 0x6fafe808: local[7] = 0x0000000d 0x6fafe80c: local[6] = 0x00000044 0x6fafe810: local[5] = 0x50fcdbb0 0x6fafe814: local[4] = 0x50fcdb98 0x6fafe818: local[3] = 0x00000000 0x6fafe81c: local[2] = 0x50fcdb38 0x6fafe820: local[1] = 0x50fcdb80 0x6fafe824: local[0] = 0x50f56608 0x6fafe828: istate->_thread = 0x101e6648 0x6fafe82c: istate->_bcp = 0x6b29f247 0x6fafe830: istate->_locals = 0x6fafe87c 0x6fafe834: istate->_constants = 0x6b3580d0 0x6fafe838: istate->_method = thinwire.render.web.EventProcessor.processUserActionEvent()V 0x6fafe83c: istate->_mdx = 0x00000000 0x6fafe840: istate->_stack = 0x6fafe81c 0x6fafe844: istate->_msg = 0x00000008 0x6fafe848: istate->_result = 0x6b28d938 0x6fafe84c: (istate->_result) = 0x0ee614a0 0x6fafe850: (istate->_result) = 0x00000005 0x6fafe854: istate->_prev_link = 0x00000000 0x6fafe858: istate->_oop_temp = 0x00000000 0x6fafe85c: istate->_stack_base = 0x6fafe828 0x6fafe860: istate->_stack_limit = 0x6fafe810 0x6fafe864: istate->_monitor_base = 0x6fafe828 0x6fafe868: istate->_self_link = 0x6fafe828 0x6fafe86c: frame_type = INTERPRETER_FRAME 0x6fafe870: next_frame = 0x6fafe8d0 0x6fafe874: local[2] = 0x50f56608 0x6fafe878: local[1] = 0x50fcdb80 0x6fafe87c: local[0] = 0x50effd80 0x6fafe880: word[20] = 0x00000003 0x6fafe884: word[19] = 0x50effe28 0x6fafe888: istate->_thread = 0x101e6648 0x6fafe88c: istate->_bcp = 0x6b29eea0 0x6fafe890: istate->_locals = 0x6fafe8e4 0x6fafe894: istate->_constants = 0x6b3580d0 0x6fafe898: istate->_method = thinwire.render.web.EventProcessor.run()V 0x6fafe89c: istate->_mdx = 0x00000000 0x6fafe8a0: istate->_stack = 0x6fafe878 0x6fafe8a4: istate->_msg = 0x00000008 0x6fafe8a8: istate->_result = 0x6b29f4d0 0x6fafe8ac: (istate->_result) = 0x0ee614a0 0x6fafe8b0: (istate->_result) = 0x00000003 0x6fafe8b4: istate->_prev_link = 0x00000000 0x6fafe8b8: istate->_oop_temp = 0x00000000 0x6fafe8bc: istate->_stack_base = 0x6fafe880 0x6fafe8c0: istate->_stack_limit = 0x6fafe86c 0x6fafe8c4: istate->_monitor_base = 0x6fafe888 0x6fafe8c8: istate->_self_link = 0x6fafe888 0x6fafe8cc: frame_type = INTERPRETER_FRAME 0x6fafe8d0: next_frame = 0x6fafe8f0 0x6fafe8d4: local[4] = 0x00000000 0x6fafe8d8: local[3] = 0x00000000 0x6fafe8dc: local[2] = 0x00000000 0x6fafe8e0: local[1] = 0x50effe28 0x6fafe8e4: local[0] = 0x50effd80 0x6fafe8e8: call_wrapper = 0x6fafe960 0x6fafe8ec: frame_type = ENTRY_FRAME 0x6fafe8f0: next_frame = 0x00000000 --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x1025ddd0 JavaThread "Timer-0" daemon [_thread_blocked, id=14239, stack(0x6fb00000,0x6fc00000)] =>0x101e6648 JavaThread "ThinWire-EventProcessorThread-0-25776844" daemon [_thread_in_Java, id=14237, stack(0x6fa00000,0x6fb00000)] 0x10249e38 JavaThread "http-8080-3" daemon [_thread_blocked, id=14219, stack(0x6f900000,0x6fa00000)] 0x101b5f78 JavaThread "http-8080-2" daemon [_thread_blocked, id=14216, stack(0x6f800000,0x6f900000)] 0x6f219538 JavaThread "TP-Monitor" daemon [_thread_blocked, id=14215, stack(0x6f700000,0x6f800000)] 0x6f2181d8 JavaThread "TP-Processor4" daemon [_thread_in_native, id=14214, stack(0x6f600000,0x6f700000)] 0x6f216a00 JavaThread "TP-Processor3" daemon [_thread_blocked, id=14213, stack(0x6f500000,0x6f600000)] 0x6f20bcf0 JavaThread "TP-Processor2" daemon [_thread_blocked, id=14212, stack(0x6f400000,0x6f500000)] 0x6f2178a0 JavaThread "TP-Processor1" daemon [_thread_blocked, id=14211, stack(0x6f300000,0x6f400000)] 0x1005e088 JavaThread "http-8080-1" daemon [_thread_blocked, id=14209, stack(0x6f021000,0x6f121000)] 0x102342b8 JavaThread "http-8080-Acceptor-0" daemon [_thread_in_native, id=14208, stack(0x6ef21000,0x6f021000)] 0x101586f8 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=14207, stack(0x6ee21000,0x6ef21000)] 0x1008db80 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=14201, stack(0x6ebc2000,0x6ecc2000)] 0x1008c348 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14200, stack(0x6eac2000,0x6ebc2000)] 0x1007c0b0 JavaThread "Finalizer" daemon [_thread_blocked, id=14199, stack(0x6e7c2000,0x6e8c2000)] 0x10077888 JavaThread "Reference Handler" daemon [_thread_blocked, id=14198, stack(0x6e6c2000,0x6e7c2000)] 0x10020e28 JavaThread "main" [_thread_in_native, id=14196, stack(0x480e8000,0x481e7000)] Other Threads: 0x10074788 VMThread [stack: 0x6e643000,0x6e6c2000] [id=14197] 0x1008f708 WatcherThread [stack: 0x6ecc3000,0x6ed42000] [id=14202] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 2944K, used 1180K [0x4a270000, 0x4a5a0000, 0x508d0000) eden space 2624K, 44% used [0x4a270000, 0x4a397000, 0x4a500000) from space 320K, 0% used [0x4a500000, 0x4a500000, 0x4a550000) to space 320K, 0% used [0x4a550000, 0x4a550000, 0x4a5a0000) tenured generation total 12844K, used 7705K [0x508d0000, 0x5155b000, 0x6a270000) the space 12844K, 59% used [0x508d0000, 0x51056610, 0x51056800, 0x5155b000) compacting perm gen total 19200K, used 18944K [0x6a270000, 0x6b530000, 0x6e270000) the space 19200K, 98% used [0x6a270000, 0x6b4f0330, 0x6b4f0400, 0x6b530000) No shared spaces configured. Dynamic libraries: 00100000-00103000 r-xp 00100000 00:00 0 [vdso] 0ebc0000-0ebc5000 r-xp 00000000 fd:00 1032232 /lib/libnss_dns-2.8.so 0ebc5000-0ebdf000 ---p 00005000 fd:00 1032232 /lib/libnss_dns-2.8.so 0ebdf000-0ebe0000 r--p 0000f000 fd:00 1032232 /lib/libnss_dns-2.8.so 0ebe0000-0ebe1000 rw-p 00010000 fd:00 1032232 /lib/libnss_dns-2.8.so 0ebf1000-0ec08000 r-xp 00000000 fd:00 1130869 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libnet.so 0ec08000-0ec17000 ---p 00017000 fd:00 1130869 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libnet.so 0ec17000-0ec18000 rw-p 00016000 fd:00 1130869 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libnet.so 0ec28000-0ec30000 r-xp 00000000 fd:00 1130876 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libzip.so 0ec30000-0ec3f000 ---p 00008000 fd:00 1130876 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libzip.so 0ec3f000-0ec40000 rw-p 00007000 fd:00 1130876 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libzip.so 0ec50000-0ec7e000 r-xp 00000000 fd:00 1130857 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libjava.so 0ec7e000-0ec8d000 ---p 0002e000 fd:00 1130857 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libjava.so 0ec8d000-0ec90000 rw-p 0002d000 fd:00 1130857 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libjava.so 0eca0000-0ecad000 r-xp 00000000 fd:00 1130875 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libverify.so 0ecad000-0ecbc000 ---p 0000d000 fd:00 1130875 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libverify.so 0ecbc000-0ecbd000 rw-p 0000c000 fd:00 1130875 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/libverify.so 0eccd000-0ecda000 r-xp 00000000 fd:00 1032234 /lib/libnss_files-2.8.so 0ecda000-0ecec000 ---p 0000d000 fd:00 1032234 /lib/libnss_files-2.8.so 0ecec000-0eced000 r--p 0000f000 fd:00 1032234 /lib/libnss_files-2.8.so 0eced000-0ecee000 rw-p 00010000 fd:00 1032234 /lib/libnss_files-2.8.so 0ecfe000-0ed07000 r-xp 00000000 fd:00 1130877 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/native_threads/libhpi.so 0ed07000-0ed16000 ---p 00009000 fd:00 1130877 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/native_threads/libhpi.so 0ed16000-0ed17000 rw-p 00008000 fd:00 1130877 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/native_threads/libhpi.so 0ed27000-0ed30000 r-xp 00000000 fd:00 984763 /usr/lib/libffi.so.5.0.2 0ed30000-0ed3f000 ---p 00009000 fd:00 984763 /usr/lib/libffi.so.5.0.2 0ed3f000-0ed40000 rw-p 00008000 fd:00 984763 /usr/lib/libffi.so.5.0.2 0ed40000-0ed41000 rw-p 0ed40000 00:00 0 0ed51000-0f0dc000 r-xp 00000000 fd:00 1130881 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/server/libjvm.so 0f0dc000-0f0eb000 ---p 0038b000 fd:00 1130881 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/server/libjvm.so 0f0eb000-0f10b000 rw-p 0038a000 fd:00 1130881 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/server/libjvm.so 0f10b000-0f120000 rw-p 0f10b000 00:00 0 0f130000-0f145000 r-xp 00000000 fd:00 483357 /lib/libz.so.1.2.3 0f145000-0f154000 ---p 00015000 fd:00 483357 /lib/libz.so.1.2.3 0f154000-0f155000 rw-p 00014000 fd:00 483357 /lib/libz.so.1.2.3 0f1b0000-0f1c9000 r-xp 00000000 fd:00 483343 /lib/libpthread-2.8.so 0f1c9000-0f1df000 ---p 00019000 fd:00 483343 /lib/libpthread-2.8.so 0f1df000-0f1e0000 r--p 0001f000 fd:00 483343 /lib/libpthread-2.8.so 0f1e0000-0f1e1000 rw-p 00020000 fd:00 483343 /lib/libpthread-2.8.so 0f1e1000-0f1e3000 rw-p 0f1e1000 00:00 0 0f1f0000-0f37e000 r-xp 00000000 fd:00 483332 /lib/libc-2.8.so 0f37e000-0f38c000 ---p 0018e000 fd:00 483332 /lib/libc-2.8.so 0f38c000-0f390000 r--p 0019c000 fd:00 483332 /lib/libc-2.8.so 0f390000-0f391000 rw-p 001a0000 fd:00 483332 /lib/libc-2.8.so 0f391000-0f394000 rw-p 0f391000 00:00 0 0fd30000-0fd43000 r-xp 00000000 fd:00 483353 /lib/libresolv-2.8.so 0fd43000-0fd5f000 ---p 00013000 fd:00 483353 /lib/libresolv-2.8.so 0fd5f000-0fd60000 r--p 0001f000 fd:00 483353 /lib/libresolv-2.8.so 0fd60000-0fd61000 rw-p 00020000 fd:00 483353 /lib/libresolv-2.8.so 0fd61000-0fd63000 rw-p 0fd61000 00:00 0 0fde0000-0fdfa000 r-xp 00000000 fd:00 483354 /lib/libnsl-2.8.so 0fdfa000-0fe0f000 ---p 0001a000 fd:00 483354 /lib/libnsl-2.8.so 0fe0f000-0fe10000 r--p 0001f000 fd:00 483354 /lib/libnsl-2.8.so 0fe10000-0fe11000 rw-p 00020000 fd:00 483354 /lib/libnsl-2.8.so 0fe11000-0fe13000 rw-p 0fe11000 00:00 0 0fe60000-0fe69000 r-xp 00000000 fd:00 483344 /lib/librt-2.8.so 0fe69000-0fe7f000 ---p 00009000 fd:00 483344 /lib/librt-2.8.so 0fe7f000-0fe80000 r--p 0000f000 fd:00 483344 /lib/librt-2.8.so 0fe80000-0fe81000 rw-p 00010000 fd:00 483344 /lib/librt-2.8.so 0fea0000-0fea3000 r-xp 00000000 fd:00 483345 /lib/libdl-2.8.so 0fea3000-0febf000 ---p 00003000 fd:00 483345 /lib/libdl-2.8.so 0febf000-0fec0000 r--p 0000f000 fd:00 483345 /lib/libdl-2.8.so 0fec0000-0fec1000 rw-p 00010000 fd:00 483345 /lib/libdl-2.8.so 0ff90000-0ff94000 r-xp 00000000 fd:00 1132086 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/jli/libjli.so 0ff94000-0ffa3000 ---p 00004000 fd:00 1132086 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/jli/libjli.so 0ffa3000-0ffa4000 rw-p 00003000 fd:00 1132086 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/jli/libjli.so 0ffb0000-0ffd1000 r-xp 00000000 fd:00 483330 /lib/ld-2.8.so 0ffef000-0fff0000 r--p 0002f000 fd:00 483330 /lib/ld-2.8.so 0fff0000-0fff1000 rw-p 00030000 fd:00 483330 /lib/ld-2.8.so 10000000-1000b000 r-xp 00000000 fd:00 246489 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java 1001a000-1001c000 rw-p 0000a000 fd:00 246489 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java 1001c000-10334000 rwxp 1001c000 00:00 0 [heap] 48000000-48001000 rw-p 48000000 00:00 0 48001000-48002000 r--p 48001000 00:00 0 48002000-48003000 rwxp 48002000 00:00 0 48003000-4800b000 rw-s 00000000 fd:00 706846 /tmp/hsperfdata_root/14195 4800b000-48014000 r--s 00065000 fd:00 1130800 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/gnome-java-bridge.jar 48014000-48016000 rw-p 48014000 00:00 0 48016000-480d6000 r-xp 00000000 fd:00 483355 /lib/libm-2.8.so 480d6000-480e1000 ---p 000c0000 fd:00 483355 /lib/libm-2.8.so 480e1000-480e6000 r--p 000cb000 fd:00 483355 /lib/libm-2.8.so 480e6000-480e7000 rw-p 000d0000 fd:00 483355 /lib/libm-2.8.so 480e7000-480eb000 ---p 480e7000 00:00 0 480eb000-4820f000 rwxp 480eb000 00:00 0 4820f000-4a1e7000 rwxp 4820f000 00:00 0 4a1e7000-4a1e8000 rwxp 4a1e7000 00:00 0 4a1e8000-4a267000 rwxp 4a1e8000 00:00 0 4a267000-4a269000 r--s 00003000 fd:00 1109608 /usr/local/apache/tomcat-6.0.18/bin/bootstrap.jar 4a269000-4a26d000 r--s 00079000 fd:00 1133356 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jsse.jar 4a26d000-4a26f000 r--s 00001000 fd:00 1109611 /usr/local/apache/tomcat-6.0.18/bin/commons-daemon.jar 4a26f000-4a270000 r--s 00004000 fd:00 1109619 /usr/local/apache/tomcat-6.0.18/bin/tomcat-juli.jar 4a270000-4a5a0000 rwxp 4a270000 00:00 0 4a5a0000-508d0000 rwxp 4a5a0000 00:00 0 508d0000-5155b000 rwxp 508d0000 00:00 0 5155b000-6a270000 rwxp 5155b000 00:00 0 6a270000-6b530000 rwxp 6a270000 00:00 0 6b530000-6e270000 rwxp 6b530000 00:00 0 6e270000-6e272000 rwxp 6e270000 00:00 0 6e272000-6e2a3000 rwxp 6e272000 00:00 0 6e2a3000-6e2aa000 rwxp 6e2a3000 00:00 0 6e2aa000-6e370000 rwxp 6e2aa000 00:00 0 6e370000-6e37a000 rwxp 6e370000 00:00 0 6e37a000-6e390000 rwxp 6e37a000 00:00 0 6e390000-6e398000 rwxp 6e390000 00:00 0 6e398000-6e45e000 rwxp 6e398000 00:00 0 6e45e000-6e468000 rwxp 6e45e000 00:00 0 6e468000-6e47f000 rwxp 6e468000 00:00 0 6e47f000-6e60f000 r--s 033ee000 fd:00 1130888 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rt.jar 6e60f000-6e642000 rw-p 6e60f000 00:00 0 6e642000-6e643000 ---p 6e642000 00:00 0 6e643000-6e6c2000 rwxp 6e643000 00:00 0 6e6c2000-6e6c5000 ---p 6e6c2000 00:00 0 6e6c5000-6e7c2000 rwxp 6e6c5000 00:00 0 6e7c2000-6e7c5000 ---p 6e7c2000 00:00 0 6e7c5000-6e8c2000 rwxp 6e7c5000 00:00 0 6e8c2000-6eac2000 r--p 00000000 fd:00 984125 /usr/lib/locale/locale-archive 6eac2000-6eac5000 ---p 6eac2000 00:00 0 6eac5000-6ebc2000 rwxp 6eac5000 00:00 0 6ebc2000-6ebc5000 ---p 6ebc2000 00:00 0 6ebc5000-6ecc2000 rwxp 6ebc5000 00:00 0 6ecc2000-6ecc3000 ---p 6ecc2000 00:00 0 6ecc3000-6ed42000 rwxp 6ecc3000 00:00 0 6ed42000-6ed44000 r--s 00017000 fd:00 1109631 /usr/local/apache/tomcat-6.0.18/lib/jasper-el.jar 6ed44000-6ed46000 r--s 00009000 fd:00 1109639 /usr/local/apache/tomcat-6.0.18/lib/tomcat-i18n-fr.jar 6ed46000-6ed48000 r--s 00013000 fd:00 1109635 /usr/local/apache/tomcat-6.0.18/lib/servlet-api.jar 6ed48000-6ed49000 r--s 00005000 fd:00 1109641 /usr/local/apache/tomcat-6.0.18/lib/toro-jaas.jar 6ed49000-6ed4c000 r--s 0001c000 fd:00 1109627 /usr/local/apache/tomcat-6.0.18/lib/catalina-ha.jar 6ed4c000-6ed53000 r--s 00076000 fd:00 1109633 /usr/local/apache/tomcat-6.0.18/lib/jasper.jar 6ed53000-6ed54000 r--s 00006000 fd:00 1109630 /usr/local/apache/tomcat-6.0.18/lib/el-api.jar 6ed54000-6ed60000 r--s 00149000 fd:00 1109632 /usr/local/apache/tomcat-6.0.18/lib/jasper-jdt.jar 6ed60000-6ed64000 r--s 0002d000 fd:00 1109637 /usr/local/apache/tomcat-6.0.18/lib/tomcat-dbcp.jar 6ed64000-6ed66000 r--s 0000a000 fd:00 1109640 /usr/local/apache/tomcat-6.0.18/lib/tomcat-i18n-ja.jar 6ed66000-6ed67000 r--s 0000b000 fd:00 1109626 /usr/local/apache/tomcat-6.0.18/lib/catalina-ant.jar 6ed67000-6ed71000 r--s 000ac000 fd:00 1109636 /usr/local/apache/tomcat-6.0.18/lib/tomcat-coyote.jar 6ed71000-6ed74000 r--s 00009000 fd:00 1109638 /usr/local/apache/tomcat-6.0.18/lib/tomcat-i18n-es.jar 6ed74000-6ed78000 r--s 00034000 fd:00 1109628 /usr/local/apache/tomcat-6.0.18/lib/catalina-tribes.jar 6ed78000-6ed86000 r--s 00106000 fd:00 1109629 /usr/local/apache/tomcat-6.0.18/lib/catalina.jar 6ed86000-6ed8c000 r--s 00068000 fd:00 1109600 /usr/local/apache/tomcat-6.0.18/lib/postgresql-8.3-603.jdbc3.jar 6ed8c000-6ed8d000 r--s 00002000 fd:00 1109625 /usr/local/apache/tomcat-6.0.18/lib/annotations-api.jar 6ed8d000-6ed90000 r--s 0000f000 fd:00 1109634 /usr/local/apache/tomcat-6.0.18/lib/jsp-api.jar 6ed90000-6ed94000 r--s 00076000 fd:00 1130801 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/localedata.jar 6ed94000-6ed96000 r--s 0000a000 fd:00 192848 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/activation.jar 6ed96000-6edb1000 r--s 001b7000 fd:00 192849 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/aspectjweaver.jar 6edb1000-6edb8000 r--s 00049000 fd:00 192850 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/cglib-nodep-2.1_3.jar 6edb8000-6edbd000 r--s 0002a000 fd:00 192851 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/commons-beanutils.jar 6edbd000-6edca000 r--s 0007f000 fd:00 192852 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/commons-collections.jar 6edca000-6edcc000 r--s 0001c000 fd:00 192853 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/commons-dbcp.jar 6edcc000-6edce000 r--s 00004000 fd:00 192854 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/commons-fileupload-1.0.jar 6edce000-6edd0000 r--s 0000d000 fd:00 192855 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/commons-logging.jar 6edd0000-6edd2000 r--s 0000e000 fd:00 192856 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/commons-pool.jar 6edd2000-6edd8000 r--s 00055000 fd:00 192857 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/mail.jar 6edd8000-6ee17000 r--s 0028a000 fd:00 192858 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/spring.jar 6ee17000-6ee1a000 r--s 0000b000 fd:00 192859 /usr/local/apache/tomcat-6.0.18/webapps/CRM_TOOL/WEB-INF/lib/toroasia.jar 6ee1a000-6ee21000 r--s 000fd000 fd:00 1130887 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/resources.jar 6ee21000-6ee24000 ---p 6ee21000 00:00 0 6ee24000-6ef21000 rwxp 6ee24000 00:00 0 6ef21000-6ef24000 ---p 6ef21000 00:00 0 6ef24000-6f021000 rwxp 6ef24000 00:00 0 6f021000-6f024000 ---p 6f021000 00:00 0 6f024000-6f121000 rwxp 6f024000 00:00 0 6f200000-6f226000 rw-p 6f200000 00:00 0 6f226000-6f300000 ---p 6f226000 00:00 0 6f300000-6f303000 ---p 6f300000 00:00 0 6f303000-6f400000 rwxp 6f303000 00:00 0 6f400000-6f403000 ---p 6f400000 00:00 0 6f403000-6f500000 rwxp 6f403000 00:00 0 6f500000-6f503000 ---p 6f500000 00:00 0 6f503000-6f600000 rwxp 6f503000 00:00 0 6f600000-6f603000 ---p 6f600000 00:00 0 6f603000-6f700000 rwxp 6f603000 00:00 0 6f700000-6f703000 ---p 6f700000 00:00 0 6f703000-6f800000 rwxp 6f703000 00:00 0 6f800000-6f803000 ---p 6f800000 00:00 0 6f803000-6f900000 rwxp 6f803000 00:00 0 6f900000-6f903000 ---p 6f900000 00:00 0 6f903000-6fa00000 rwxp 6f903000 00:00 0 6fa00000-6fa03000 ---p 6fa00000 00:00 0 6fa03000-6fb00000 rwxp 6fa03000 00:00 0 6fb00000-6fb03000 ---p 6fb00000 00:00 0 6fb03000-6fc00000 rwxp 6fb03000 00:00 0 bf91f000-bf934000 rwxp bffeb000 00:00 0 [stack] VM Arguments: jvm_args: -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/apache/tomcat-6.0.18/conf/logging.properties -Djava.endorsed.dirs=/usr/local/apache/tomcat-6.0.18/endorsed -Dcatalina.base=/usr/local/apache/tomcat-6.0.18 -Dcatalina.home=/usr/local/apache/tomcat-6.0.18 -Djava.io.tmpdir=/usr/local/apache/tomcat-6.0.18/temp java_command: org.apache.catalina.startup.Bootstrap start Launcher Type: SUN_STANDARD Environment Variables: PATH=/usr/local/apache/apache-ant-1.7.1/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ppc:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/ppc SHELL=/bin/bash Signal Handlers: SIGSEGV: [libjvm.so+0x334940], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x334940], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x27fbb0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x27fbb0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x27fbb0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x27fbb0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x27f080], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x281d70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGTERM: [libjvm.so+0x281d70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x281d70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:Fedora release 9 (Sulphur) uname:Linux 2.6.25.3-18.fc9.ppc #1 Tue May 13 04:30:41 EDT 2008 ppc libc:glibc 2.8 NPTL 2.8 rlimit: STACK 10240k, CORE 0k, NPROC 1024, NOFILE 1024, AS infinity load average:0.50 0.35 0.22 CPU:total 1 Memory: 4k page, physical 383992k(5296k free), swap 786424k(614480k free) vm_info: OpenJDK Core VM (1.6.0-b09) for linux- JRE (1.6.0-b09), built on Jul 8 2008 12:56:42 by "mockbuild" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8) time: Tue Aug 12 18:23:19 2008 elapsed time: 206 seconds -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From gbenson at redhat.com Wed Aug 13 00:53:46 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 13 Aug 2008 07:53:46 +0000 Subject: changeset in /hg/icedtea6: 2008-08-13 Gary Benson changeset c7c621c16a15 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c7c621c16a15 description: 2008-08-13 Gary Benson PR icedtea/184: * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp (call_stub): Add support for returning floats and doubles. diffstat: 2 files changed, 12 insertions(+) ChangeLog | 6 ++++++ ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp | 6 ++++++ diffs (29 lines): diff -r ce522c9080e5 -r c7c621c16a15 ChangeLog --- a/ChangeLog Tue Aug 12 20:25:43 2008 +0200 +++ b/ChangeLog Wed Aug 13 08:53:38 2008 +0100 @@ -1,3 +1,9 @@ 2008-08-12 Matthias Klose + + PR icedtea/184: + * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp + (call_stub): Add support for returning floats and doubles. + 2008-08-12 Matthias Klose * patches/icedtea-arch.patch: Add support for mipsel-linux. diff -r ce522c9080e5 -r c7c621c16a15 ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Tue Aug 12 20:25:43 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Wed Aug 13 08:53:38 2008 +0100 @@ -77,6 +77,12 @@ class StubGenerator: public StubCodeGene case T_LONG: *(jlong *) result = *(jlong *) stack->sp(); break; + case T_FLOAT: + *(jfloat *) result = *(jfloat *) stack->sp(); + break; + case T_DOUBLE: + *(jdouble *) result = *(jdouble *) stack->sp(); + break; case T_OBJECT: *(oop *) result = *(oop *) stack->sp(); break; From bugzilla-daemon at icedtea.classpath.org Wed Aug 13 00:57:20 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 13 Aug 2008 07:57:20 +0000 Subject: [Bug 184] Internal Error (stubGenerator_zero.cpp:84), pid=14195, tid=1873802416 Error: ShouldNotReachHere() Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=184 gbenson at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from gbenson at redhat.com 2008-08-13 07:57 ------- So it turns out the call stub (the bridge that calls Java code from C++) had no support for methods that returned float or double values. Fix committed to icedtea6 hg. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 13 01:12:30 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 13 Aug 2008 08:12:30 +0000 Subject: [Bug 184] Internal Error (stubGenerator_zero.cpp:84), pid=14195, tid=1873802416 Error: ShouldNotReachHere() Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=184 ------- Comment #2 from zenlive at gmail.com 2008-08-13 08:12 ------- (In reply to comment #1) > So it turns out the call stub (the bridge that calls Java code from C++) had no > support for methods that returned float or double values. Fix committed to > icedtea6 hg. > Thanks! -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 13 01:23:59 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 13 Aug 2008 08:23:59 +0000 Subject: [Bug 184] Internal Error (stubGenerator_zero.cpp:84), pid=14195, tid=1873802416 Error: ShouldNotReachHere() Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=184 ------- Comment #3 from gbenson at redhat.com 2008-08-13 08:23 ------- No problem! -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Wed Aug 13 07:13:03 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 13 Aug 2008 14:13:03 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-13 Omair Majid changeset c054a0681a49 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c054a0681a49 description: 2008-08-13 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: implemented getFramePosition(), getLevel(), getLongFramePosition() and getMicrosecondPosition * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java: added a test for getMicrosecondPosition() (the test isnt perfect; cant confirm microsecond length with any other wav player) diffstat: 2 files changed, 45 insertions(+), 10 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 21 +++--- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 34 +++++++++- diffs (111 lines): diff -r 9a72b909f18a -r c054a0681a49 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 12 16:55:28 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 13 10:12:49 2008 -0400 @@ -80,6 +80,8 @@ public class PulseAudioSourceDataLine im private PulseAudioStreamVolumeControl volumeControl; private boolean muted; private float volume; + + private long currentFramePosition = 0; /* * When moving from 32bit platform to 64 bit platform, these variables @@ -451,13 +453,14 @@ public class PulseAudioSourceDataLine im sizeWritten += availableSize; position += availableSize; remainingLength -= availableSize; + } } // all the data should have been played by now assert (sizeWritten == length); - + currentFramePosition += (sizeWritten/getFormat().getFrameSize()); /* * FIXME when the stream is flushed() etc, instead of returning length * this should unblock and return the the size of data written so far @@ -566,23 +569,23 @@ public class PulseAudioSourceDataLine im } public int getFramePosition() { - // TODO Auto-generated method stub - return 0; + return (int)currentFramePosition; } public float getLevel() { - // TODO Auto-generated method stub - return 0; + return AudioSystem.NOT_SPECIFIED; } public long getLongFramePosition() { - // TODO Auto-generated method stub - return 0; + return currentFramePosition; } public long getMicrosecondPosition() { - // TODO Auto-generated method stub - return 0; + + float frameRate = currentFormat.getFrameRate(); + float time = currentFramePosition/frameRate; // seconds + long microseconds = (long)(time * 1000); + return microseconds; } public boolean isActive() { diff -r 9a72b909f18a -r c054a0681a49 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 12 16:55:28 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Wed Aug 13 10:12:49 2008 -0400 @@ -82,7 +82,7 @@ public class PulseSourceDataLineTest { public void testPlay() throws LineUnavailableException, UnsupportedAudioFileException, IOException { System.out.println("This test plays a file"); - + File soundFile = new File("testsounds/startup.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); @@ -312,6 +312,38 @@ public class PulseSourceDataLineTest { } + @Test + public void testFramePosition() throws UnsupportedAudioFileException, + IOException, LineUnavailableException { + File soundFile = new File("testsounds/logout.wav"); + AudioInputStream audioInputStream = AudioSystem + .getAudioInputStream(soundFile); + AudioFormat audioFormat = audioInputStream.getFormat(); + + SourceDataLine line; + line = (PulseAudioSourceDataLine) mixer.getLine(new DataLine.Info( + SourceDataLine.class, audioFormat)); + Assert.assertNotNull(line); + + line.open(audioFormat); + line.start(); + + byte[] abData = new byte[1000]; + int bytesRead = 0; + + while (bytesRead >= 0) { + bytesRead = audioInputStream.read(abData, 0, abData.length); + if (bytesRead > 0) { + line.write(abData, 0, bytesRead); + } + } + + line.flush(); + System.out.println("time position: " + line.getMicrosecondPosition()); + Assert.assertEquals(6199, line.getMicrosecondPosition()); + line.close(); + } + @After public void tearDown() throws Exception { From gbenson at redhat.com Wed Aug 13 07:46:26 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 13 Aug 2008 14:46:26 +0000 Subject: changeset in /hg/icedtea6: 2008-08-13 Gary Benson changeset a469b20018d9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a469b20018d9 description: 2008-08-13 Gary Benson * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp (print_word): Recognise non-header parts of Shark frames. diffstat: 2 files changed, 36 insertions(+) ChangeLog | 5 +++ ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 31 +++++++++++++++++++ diffs (53 lines): diff -r c7c621c16a15 -r a469b20018d9 ChangeLog --- a/ChangeLog Wed Aug 13 08:53:38 2008 +0100 +++ b/ChangeLog Wed Aug 13 15:46:18 2008 +0100 @@ -1,3 +1,8 @@ 2008-08-13 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp + (print_word): Recognise non-header parts of Shark frames. + 2008-08-13 Gary Benson PR icedtea/184: diff -r c7c621c16a15 -r a469b20018d9 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Aug 13 08:53:38 2008 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Aug 13 15:46:18 2008 +0100 @@ -195,6 +195,37 @@ class ZeroStackPrinter { if (method->is_oop()) value = method->name_and_sig_as_C_string(_buf, _buflen); } + else { + SharkFrame *sf = (SharkFrame *) frame; + intptr_t *monitor_base = + (intptr_t *) frame - SharkFrame::header_words + 1; + intptr_t *stack_base = + sf->unextended_sp() + sf->method()->max_stack(); + + if (addr >= stack_base && addr < monitor_base) { + int monitor_size = frame::interpreter_frame_monitor_size(); + int last_index = (monitor_base - stack_base) / monitor_size - 1; + int index = last_index - (addr - stack_base) / monitor_size; + intptr_t monitor = + (intptr_t) ((BasicObjectLock *) monitor_base - 1 - index); + intptr_t offset = (intptr_t) addr - monitor; + + if (offset == BasicObjectLock::obj_offset_in_bytes()) { + snprintf(_buf, _buflen, "monitor[%d]->_obj", index); + field = _buf; + } + else if (offset == BasicObjectLock::lock_offset_in_bytes()) { + snprintf(_buf, _buflen, "monitor[%d]->_lock", index); + field = _buf; + } + } + else { + snprintf(_buf, _buflen, "%s[%d]", + top_frame ? "stack_word" : "local", + stack_base - addr - 1); + field = _buf; + } + } } } From omajid at redhat.com Wed Aug 13 10:00:49 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 13 Aug 2008 17:00:49 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-13 Omair Majid changeset 3c53bfe980bc in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=3c53bfe980bc description: 2008-08-13 Omair Majid * build.xml: now generates headers for PulseAudioClip.java * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java: new file. implements the Clip interface. currently mainly a stub * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: added support for getting a clip from the mixer * src/native/Makefile.am: added src/native/*PulseAudioClip.{c,h} to list of files to build * src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c: new file * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java: new file. junit tests for PulseAudioClip diffstat: 6 files changed, 357 insertions(+), 2 deletions(-) build.xml | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 268 ++++++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 11 src/native/Makefile.am | 4 src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c | 24 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 51 + diffs (408 lines): diff -r c054a0681a49 -r 3c53bfe980bc build.xml --- a/build.xml Wed Aug 13 10:12:49 2008 -0400 +++ b/build.xml Wed Aug 13 13:00:36 2008 -0400 @@ -38,6 +38,7 @@ + diff -r c054a0681a49 -r 3c53bfe980bc src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 13 13:00:36 2008 -0400 @@ -0,0 +1,268 @@ +package org.classpath.icedtea.pulseaudio; + +import java.io.IOException; +import java.util.LinkedList; +import java.util.List; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Clip; +import javax.sound.sampled.Control; +import javax.sound.sampled.Line; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.Control.Type; + +public class PulseAudioClip implements Clip { + + private byte[] data = null; + private int bufferSize = 0; + + // these are frame indices. so counted from 0 + private long currentFrame = 0; + private int frameCount = 0; + private long startFrame = 0; + private long endFrame = 0; + private long framesSinceOpen = 0; + + private AudioFormat currentFormat = null; + private static final AudioFormat DEFAULT_FORMAT = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 22050, 8, 2, 2, 22050 / 2, false); + + private boolean isOpen = false; + + private List lineListeners = null; + + private static final int DEFAULT_BUFFER_SIZE = 0; + + @SuppressWarnings("unused") + private long streamPointer = 0; + + private native void native_open(); + + private native void native_close(); + + private native void native_start(); + + private native void native_stop(); + + private native long native_drain(); + + private native long native_flush(); + + static { + try { + String library = new java.io.File(".").getCanonicalPath() + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(library); + System.load(library); + } catch (IOException e) { + assert ("Loading failed".endsWith("library")); + } + } + + public PulseAudioClip() { + lineListeners = new LinkedList(); + } + + @Override + public void addLineListener(LineListener listener) { + lineListeners.add(listener); + } + + @Override + public int available() { + return 0; // a clip always returns 0 + } + + @Override + public void close() { + // TODO Auto-generated method stub + native_close(); + isOpen = false; + } + + @Override + public void drain() { + // TODO Auto-generated method stub + native_drain(); + } + + @Override + public void flush() { + // TODO Auto-generated method stub + native_flush(); + } + + @Override + public int getBufferSize() { + return bufferSize; + } + + @Override + public Control getControl(Type control) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Control[] getControls() { + // TODO Auto-generated method stub + return null; + } + + @Override + public AudioFormat getFormat() { + if (!isOpen) { + return DEFAULT_FORMAT; + } + return currentFormat; + } + + @Override + public int getFrameLength() { + return frameCount; + } + + @Override + public int getFramePosition() { + return (int) framesSinceOpen; + } + + @Override + public float getLevel() { + // TODO Auto-generated method stub + return AudioSystem.NOT_SPECIFIED; + } + + @Override + public javax.sound.sampled.Line.Info getLineInfo() { + return new Line.Info(this.getClass()); + } + + @Override + public long getLongFramePosition() { + return framesSinceOpen; + } + + @Override + public long getMicrosecondLength() { + if (!isOpen) { + return AudioSystem.NOT_SPECIFIED; + } + return frameCount / currentFormat.getFrameSize(); + } + + @Override + public long getMicrosecondPosition() { + return framesSinceOpen / currentFormat.getFrameSize(); + } + + @Override + public boolean isActive() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isControlSupported(Type control) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOpen() { + return isOpen; + } + + @Override + public boolean isRunning() { + // really confused about what this is supposed to do + return isActive(); + } + + @Override + public void loop(int count) { + // TODO Auto-generated method stub + + } + + @Override + public void open() throws LineUnavailableException { + throw new IllegalArgumentException("open() on a Clip is not allowed"); + } + + @Override + public void open(AudioFormat format, byte[] data, int offset, int bufferSize) + throws LineUnavailableException { + // TODO Auto-generated method stub + + native_open(); + + isOpen = true; + } + + @Override + public void open(AudioInputStream stream) throws LineUnavailableException, + IOException { + // TODO Auto-generated method stub + + byte[] buffer = new byte[(int) (stream.getFrameLength() * stream + .getFormat().getFrameSize())]; + + open(stream.getFormat(), buffer, 0, DEFAULT_BUFFER_SIZE); + + } + + @Override + public void removeLineListener(LineListener listener) { + lineListeners.remove(listener); + } + + @Override + public void setFramePosition(int frames) { + + if (frames > frameCount) { + throw new IllegalArgumentException("incorreft frame value"); + } + + currentFrame = frames; + + } + + @Override + public void setLoopPoints(int start, int end) { + if (end == -1) { + end = frameCount; + } + + if (end < start) { + throw new IllegalArgumentException( + "ending point must be greater than or equal to the starting point"); + } + + startFrame = start; + endFrame = end; + + } + + @Override + public void setMicrosecondPosition(long microseconds) { + float frameIndex = microseconds * currentFormat.getFrameRate(); + currentFrame = (long) frameIndex; + + } + + @Override + public void start() { + native_start(); + } + + @Override + public void stop() { + native_stop(); + } + +} diff -r c054a0681a49 -r 3c53bfe980bc src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 13 10:12:49 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 13 13:00:36 2008 -0400 @@ -73,7 +73,8 @@ public class PulseAudioMixer implements private List sourceLines = new ArrayList(); // private List targetLines = null; - + private List clips = new ArrayList(); + // private Line.Info targetDataLineInfo = new // Line.Info(PulseAudioTargetDataLine.class); @@ -144,6 +145,14 @@ public class PulseAudioMixer implements // return targetLine; // } + PulseAudioClip clip = new PulseAudioClip(); + + if (info.matches(clip.getLineInfo())) { + clips.add(clip); + return clip; + } + + throw new IllegalArgumentException(); } diff -r c054a0681a49 -r 3c53bfe980bc src/native/Makefile.am --- a/src/native/Makefile.am Wed Aug 13 10:12:49 2008 -0400 +++ b/src/native/Makefile.am Wed Aug 13 13:00:36 2008 -0400 @@ -10,7 +10,9 @@ libpulse_java_la_SOURCES = \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h \ org_classpath_icedtea_pulseaudio_Operation.h \ - org_classpath_icedtea_pulseaudio_Operation.c + org_classpath_icedtea_pulseaudio_Operation.c \ + org_classpath_icedtea_pulseaudio_PulseAudioClip.c \ + org_classpath_icedtea_pulseaudio_PulseAudioClip.h AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) $(LIBPULSE_CFLAGS) AM_LDFLAGS = -g -Wall -Werror $(LIBPULSE_LIBS) diff -r c054a0681a49 -r 3c53bfe980bc src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c Wed Aug 13 13:00:36 2008 -0400 @@ -0,0 +1,24 @@ +#include "org_classpath_icedtea_pulseaudio_PulseAudioClip.h" + +#include "jni-common.h" + +/* + * Class: org_classpath_icedtea_pulseaudio_PulseAudioClip + * Method: native_open + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioClip_native_1open +(JNIEnv* env, jobject obj) { + +} + +/* + * Class: org_classpath_icedtea_pulseaudio_PulseAudioClip + * Method: native_close + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioClip_native_1close +(JNIEnv* env, jobject obj) { + +} + diff -r c054a0681a49 -r 3c53bfe980bc unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Wed Aug 13 13:00:36 2008 -0400 @@ -0,0 +1,51 @@ +package org.classpath.icedtea.pulseaudio; + +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Clip; +import javax.sound.sampled.Line; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.Mixer; + +import junit.framework.JUnit4TestAdapter; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class PulseAudioClipTest { + + Mixer mixer; + + public static junit.framework.Test suite() { + return new JUnit4TestAdapter(PulseAudioClipTest.class); + } + + @Before + public void setUp() throws LineUnavailableException { + Mixer.Info wantedMixerInfo = null; + Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo(); + for (Mixer.Info mixerInfo : mixerInfos) { + if (mixerInfo.getName().contains("PulseAudio")) { + wantedMixerInfo = mixerInfo; + break; + } + } + assert (wantedMixerInfo != null); + mixer = AudioSystem.getMixer(wantedMixerInfo); + mixer.open(); + } + + @Test + public void testObtainingAClip() throws LineUnavailableException { + Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); + Assert.assertNotNull(clip); + } + + + @After + public void tearDown() { + + } + +} From omajid at redhat.com Wed Aug 13 10:17:18 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 13 Aug 2008 17:17:18 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-13 Omair Majid changeset 9ed589465932 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=9ed589465932 description: 2008-08-13 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java: added license text * src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c: same * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java: same diffstat: 3 files changed, 111 insertions(+), 1 deletion(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 37 +++++++++ src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c | 37 +++++++++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 38 +++++++++- diffs (140 lines): diff -r 3c53bfe980bc -r 9ed589465932 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 13 13:00:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 13 13:17:13 2008 -0400 @@ -1,3 +1,40 @@ package org.classpath.icedtea.pulseaudio +/* PulseAudioClip.java + Copyright (C) 2008 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + package org.classpath.icedtea.pulseaudio; import java.io.IOException; diff -r 3c53bfe980bc -r 9ed589465932 src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c Wed Aug 13 13:00:36 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c Wed Aug 13 13:17:13 2008 -0400 @@ -1,3 +1,40 @@ +/* org_classpath_icedtea_pulseaudio_PulseAudioClip.c + Copyright (C) 2008 Red Hat, Inc. + + This file is part of IcedTea. + + IcedTea is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. + + IcedTea is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with IcedTea; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from + or based on this library. If you modify this library, you may extend + this exception to your version of the library, but you are not + obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + */ + #include "org_classpath_icedtea_pulseaudio_PulseAudioClip.h" #include "jni-common.h" diff -r 3c53bfe980bc -r 9ed589465932 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Wed Aug 13 13:00:36 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Wed Aug 13 13:17:13 2008 -0400 @@ -1,3 +1,40 @@ package org.classpath.icedtea.pulseaudio +/* PulseAudioClipTest.java + Copyright (C) 2008 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + package org.classpath.icedtea.pulseaudio; import javax.sound.sampled.AudioSystem; @@ -42,7 +79,6 @@ public class PulseAudioClipTest { Assert.assertNotNull(clip); } - @After public void tearDown() { From mark at klomp.org Thu Aug 14 07:55:17 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 14 Aug 2008 14:55:17 +0000 Subject: changeset in /hg/icedtea6: * patches/icedtea-signed-types-hot6.p... Message-ID: changeset 288bdc0696ff in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=288bdc0696ff description: * patches/icedtea-signed-types-hot6.patch: New patch. * Makefile.am (NON_ZERO_PATCHES): Add icedtea-signed-types-hot6.patch. diffstat: 3 files changed, 28 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 2 +- patches/icedtea-signed-types-hot6.patch | 22 ++++++++++++++++++++++ diffs (50 lines): diff -r a469b20018d9 -r 288bdc0696ff ChangeLog --- a/ChangeLog Wed Aug 13 15:46:18 2008 +0100 +++ b/ChangeLog Thu Aug 14 16:54:46 2008 +0200 @@ -1,3 +1,8 @@ 2008-08-13 Gary Benson + + * patches/icedtea-signed-types-hot6.patch: New patch. + * Makefile.am (NON_ZERO_PATCHES): Add icedtea-signed-types-hot6.patch. + 2008-08-13 Gary Benson * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp diff -r a469b20018d9 -r 288bdc0696ff Makefile.am --- a/Makefile.am Wed Aug 13 15:46:18 2008 +0100 +++ b/Makefile.am Thu Aug 14 16:54:46 2008 +0200 @@ -426,7 +426,7 @@ ZERO_PATCHES = \ patches/icedtea-ia64-bugfix.patch # Patches needed when not using the newer OpenJDK 7 HotSpot for zero. -NON_ZERO_PATCHES = +NON_ZERO_PATCHES = patches/icedtea-signed-types-hot6.patch if ZERO_BUILD ZERO_PATCHES_COND = $(ZERO_PATCHES) diff -r a469b20018d9 -r 288bdc0696ff patches/icedtea-signed-types-hot6.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-signed-types-hot6.patch Thu Aug 14 16:54:46 2008 +0200 @@ -0,0 +1,22 @@ +--- openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp.orig 2008-08-14 16:24:58.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp 2008-08-14 16:25:20.000000000 +0200 +@@ -84,7 +84,7 @@ + address _locs_point; // last relocated position (grows upward) + bool _locs_own; // did I allocate the locs myself? + bool _frozen; // no more expansion of this section +- char _index; // my section number (SECT_INST, etc.) ++ signed char _index; // my section number (SECT_INST, etc.) + CodeBuffer* _outer; // enclosing CodeBuffer + + // (Note: _locs_point used to be called _last_reloc_offset.) +--- openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp.orig 2008-08-14 16:21:47.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2008-08-14 16:25:51.000000000 +0200 +@@ -391,7 +391,7 @@ + // Set the rest of the locals to bottom. + Cell cell = state->next_cell(state->tos()); + state->set_stack_size(0); +- int limit = state->limit_cell(); ++ Cell limit = state->limit_cell(); + for (; cell < limit; cell = state->next_cell(cell)) { + state->set_type_at(cell, state->bottom_type()); + } From mark at klomp.org Thu Aug 14 07:58:16 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 14 Aug 2008 16:58:16 +0200 Subject: changeset in /hg/icedtea6: 2008-08-08 Gary Benson References: Message-ID: <1218725896.3136.8.camel@dijkstra.wildebeest.org> Hi, On Fri, 2008-08-08 at 16:13 +0000, Gary Benson wrote: > changeset d7f54e3a7a80 in /hg/icedtea6 > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d7f54e3a7a80 > description: > 2008-08-08 Gary Benson > > * patches/icedtea-signed-types.patch: Signedness fix. Had the same issue (gcc 4.1.2) with the non-zero hotspot6 code. Adapted your patch to also apply in that case: 2008-08-14 Mark Wielaard * patches/icedtea-signed-types-hot6.patch: New patch. * Makefile.am (NON_ZERO_PATCHES): Add icedtea-signed-types-hot6.patch. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-signed-types-hot6.patch Type: text/x-patch Size: 1187 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080814/79869e83/icedtea-signed-types-hot6.patch From langel at redhat.com Thu Aug 14 08:09:59 2008 From: langel at redhat.com (Lillian Angel) Date: Thu, 14 Aug 2008 15:09:59 +0000 Subject: changeset in /hg/icedtea6: 2008-08-13 Lillian Angel changeset cd5c0ea5fe82 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=cd5c0ea5fe82 description: 2008-08-13 Lillian Angel * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with minor versions. diffstat: 2 files changed, 15 insertions(+), 20 deletions(-) ChangeLog | 5 +++++ acinclude.m4 | 30 ++++++++++-------------------- diffs (54 lines): diff -r a469b20018d9 -r cd5c0ea5fe82 ChangeLog --- a/ChangeLog Wed Aug 13 15:46:18 2008 +0100 +++ b/ChangeLog Thu Aug 14 11:06:24 2008 -0400 @@ -1,3 +1,8 @@ 2008-08-13 Gary Benson + + * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with + minor versions. + 2008-08-13 Gary Benson * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp diff -r a469b20018d9 -r cd5c0ea5fe82 acinclude.m4 --- a/acinclude.m4 Wed Aug 13 15:46:18 2008 +0100 +++ b/acinclude.m4 Thu Aug 14 11:06:24 2008 -0400 @@ -254,28 +254,18 @@ AC_DEFUN([FIND_LIBGCJ_JAR], LIBGCJ_JAR= ]) if test -z "${LIBGCJ_JAR}"; then - AC_MSG_CHECKING(for libgcj-4.3.0.jar or libgcj-4.1.2.jar) - if test -e "/usr/share/java/libgcj-4.3.0.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.3.0.jar + AC_MSG_CHECKING(for libgcj-4.3*.jar or libgcj-4.1*.jar) + if test -e /usr/share/java/libgcj-4.3*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.3*.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else - if test -e "/usr/share/java/libgcj-4.3.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.3.jar - AC_MSG_RESULT(${LIBGCJ_JAR}) - else - AM_CONDITIONAL(GCC_OLD, test x = x) - if test -e "/usr/share/java/libgcj-4.1.2.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.1.2.jar - AC_MSG_RESULT(${LIBGCJ_JAR}) - else - if test -e "/usr/share/java/libgcj-4.1.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.1.jar - AC_MSG_RESULT(${LIBGCJ_JAR}) - else - AC_MSG_RESULT(no) - fi - fi - fi + AM_CONDITIONAL(GCC_OLD, test x = x) + if test -e /usr/share/java/libgcj-4.1*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.1*.jar + AC_MSG_RESULT(${LIBGCJ_JAR}) + else + AC_MSG_RESULT(no) + fi fi fi if test -z "${LIBGCJ_JAR}"; then From langel at redhat.com Thu Aug 14 08:14:30 2008 From: langel at redhat.com (Lillian Angel) Date: Thu, 14 Aug 2008 15:14:30 +0000 Subject: changeset in /hg/icedtea6: 2008-08-14 Lillian Angel changeset 626751ee178e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=626751ee178e description: 2008-08-14 Lillian Angel * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with minor versions. diffstat: 2 files changed, 15 insertions(+), 20 deletions(-) ChangeLog | 5 +++++ acinclude.m4 | 30 ++++++++++-------------------- diffs (54 lines): diff -r 288bdc0696ff -r 626751ee178e ChangeLog --- a/ChangeLog Thu Aug 14 16:54:46 2008 +0200 +++ b/ChangeLog Thu Aug 14 11:14:26 2008 -0400 @@ -1,3 +1,8 @@ 2008-08-14 Mark Wielaard + + * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with + minor versions. + 2008-08-14 Mark Wielaard * patches/icedtea-signed-types-hot6.patch: New patch. diff -r 288bdc0696ff -r 626751ee178e acinclude.m4 --- a/acinclude.m4 Thu Aug 14 16:54:46 2008 +0200 +++ b/acinclude.m4 Thu Aug 14 11:14:26 2008 -0400 @@ -254,28 +254,18 @@ AC_DEFUN([FIND_LIBGCJ_JAR], LIBGCJ_JAR= ]) if test -z "${LIBGCJ_JAR}"; then - AC_MSG_CHECKING(for libgcj-4.3.0.jar or libgcj-4.1.2.jar) - if test -e "/usr/share/java/libgcj-4.3.0.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.3.0.jar + AC_MSG_CHECKING(for libgcj-4.3*.jar or libgcj-4.1*.jar) + if test -e /usr/share/java/libgcj-4.3*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.3*.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else - if test -e "/usr/share/java/libgcj-4.3.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.3.jar - AC_MSG_RESULT(${LIBGCJ_JAR}) - else - AM_CONDITIONAL(GCC_OLD, test x = x) - if test -e "/usr/share/java/libgcj-4.1.2.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.1.2.jar - AC_MSG_RESULT(${LIBGCJ_JAR}) - else - if test -e "/usr/share/java/libgcj-4.1.jar"; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.1.jar - AC_MSG_RESULT(${LIBGCJ_JAR}) - else - AC_MSG_RESULT(no) - fi - fi - fi + AM_CONDITIONAL(GCC_OLD, test x = x) + if test -e /usr/share/java/libgcj-4.1*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.1*.jar + AC_MSG_RESULT(${LIBGCJ_JAR}) + else + AC_MSG_RESULT(no) + fi fi fi if test -z "${LIBGCJ_JAR}"; then From aph at redhat.com Thu Aug 14 08:57:40 2008 From: aph at redhat.com (Andrew Haley) Date: Thu, 14 Aug 2008 16:57:40 +0100 Subject: Shark: fix some minor typos (and thinkos) Message-ID: <48A455F4.60802@redhat.com> 2008-08-14 Andrew Haley * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::SharkBuilder): Fix syntax error on template class name. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (class SharkBuilder): Likewise. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (class SharkValue): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Properly declare temporaries. diff -r a469b20018d9 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Aug 13 15:46:18 2008 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Aug 14 16:51:13 2008 +0100 @@ -29,7 +29,7 @@ using namespace llvm; SharkBuilder::SharkBuilder() - : IRBuilder(), + : IRBuilder<>(), _module("shark"), _module_provider(module()), _execution_engine(ExecutionEngine::create(&_module_provider)) diff -r a469b20018d9 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Aug 13 15:46:18 2008 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Thu Aug 14 16:51:13 2008 +0100 @@ -23,7 +23,7 @@ * */ -class SharkBuilder : public llvm::IRBuilder { +class SharkBuilder : public llvm::IRBuilder<> { public: SharkBuilder(); diff -r a469b20018d9 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Aug 13 15:46:18 2008 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Aug 14 16:51:13 2008 +0100 @@ -101,9 +101,11 @@ function.function()->dump(); } if (SharkTraceInstalls) { + uint32_t *start = NULL; + uint32_t *limit = NULL; #ifdef PPC - uint32_t *start = *(uint32_t **) bb->instructions_begin(); - uint32_t *limit = start; + start = *(uint32_t **) bb->instructions_begin(); + limit = start; while (*limit) limit++; #else diff -r a469b20018d9 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Wed Aug 13 15:46:18 2008 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Aug 14 16:51:13 2008 +0100 @@ -182,7 +182,7 @@ { return llvm_value(); } - llvm::Value* intptr_value(llvm::IRBuilder* builder) const + llvm::Value* intptr_value(llvm::IRBuilder<>* builder) const { assert(is_jobject(), "should be"); return builder->CreatePtrToInt(llvm_value(), SharkType::intptr_type()); From aph at redhat.com Thu Aug 14 09:00:35 2008 From: aph at redhat.com (Andrew Haley) Date: Thu, 14 Aug 2008 16:00:35 +0000 Subject: changeset in /hg/icedtea6: 2008-08-14 Andrew Haley changeset 1ff78f827345 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1ff78f827345 description: 2008-08-14 Andrew Haley * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::SharkBuilder): Fix syntax error on template class name. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (class SharkBuilder): Likewise. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (class SharkValue): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Properly declare temporaries. diffstat: 5 files changed, 20 insertions(+), 5 deletions(-) ChangeLog | 13 +++++++++++++ ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 2 +- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 2 +- ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 6 ++++-- ports/hotspot/src/share/vm/shark/sharkValue.hpp | 2 +- diffs (73 lines): diff -r 626751ee178e -r 1ff78f827345 ChangeLog --- a/ChangeLog Thu Aug 14 11:14:26 2008 -0400 +++ b/ChangeLog Thu Aug 14 17:00:18 2008 +0100 @@ -1,3 +1,16 @@ 2008-08-14 Lillian Angel + + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::SharkBuilder): Fix syntax error on template class + name. + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (class + SharkBuilder): Likewise. + * ports/hotspot/src/share/vm/shark/sharkValue.hpp (class + SharkValue): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Properly declare temporaries. + 2008-08-14 Lillian Angel * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with diff -r 626751ee178e -r 1ff78f827345 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Aug 14 11:14:26 2008 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Aug 14 17:00:18 2008 +0100 @@ -29,7 +29,7 @@ using namespace llvm; using namespace llvm; SharkBuilder::SharkBuilder() - : IRBuilder(), + : IRBuilder<>(), _module("shark"), _module_provider(module()), _execution_engine(ExecutionEngine::create(&_module_provider)) diff -r 626751ee178e -r 1ff78f827345 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Thu Aug 14 11:14:26 2008 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Thu Aug 14 17:00:18 2008 +0100 @@ -23,7 +23,7 @@ * */ -class SharkBuilder : public llvm::IRBuilder { +class SharkBuilder : public llvm::IRBuilder<> { public: SharkBuilder(); diff -r 626751ee178e -r 1ff78f827345 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Aug 14 11:14:26 2008 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Aug 14 17:00:18 2008 +0100 @@ -101,9 +101,11 @@ void SharkCompiler::compile_method(ciEnv function.function()->dump(); } if (SharkTraceInstalls) { + uint32_t *start = NULL; + uint32_t *limit = NULL; #ifdef PPC - uint32_t *start = *(uint32_t **) bb->instructions_begin(); - uint32_t *limit = start; + start = *(uint32_t **) bb->instructions_begin(); + limit = start; while (*limit) limit++; #else diff -r 626751ee178e -r 1ff78f827345 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Aug 14 11:14:26 2008 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Aug 14 17:00:18 2008 +0100 @@ -182,7 +182,7 @@ class SharkValue : public ResourceObj { { return llvm_value(); } - llvm::Value* intptr_value(llvm::IRBuilder* builder) const + llvm::Value* intptr_value(llvm::IRBuilder<>* builder) const { assert(is_jobject(), "should be"); return builder->CreatePtrToInt(llvm_value(), SharkType::intptr_type()); From martinrb at google.com Thu Aug 14 09:32:29 2008 From: martinrb at google.com (Martin Buchholz) Date: Thu, 14 Aug 2008 09:32:29 -0700 Subject: Status of com.sun.image.codec.jpeg Message-ID: <1ccfd1c10808140932k75eb642eqfab640978d6fdb45@mail.gmail.com> Hi 2d guys, We're testing different flavors of OpenJDK, and noticing uses of classes in com.sun.image.codec.jpeg. These classes are still in non-OpenJDK JDK7. They were removed from OpenJDK, probably because they were encumbered (proprietary Kodak code). The IcedTea folks have created new versions of these classes, but they appear to be only stubs. Can we have a clear statement about the status? These classes were documented at least for 1.4, e.g. http://java.sun.com/j2se/1.4.2/docs/guide/2d/api-jpeg/com/sun/image/codec/jpeg/JPEGImageEncoder.html There does appear to be full support for the JPEG image standard in OpenJDK and IcedTea. It would be nice if the API in com.sun.image.codec.jpeg could be adapted, or if not, at least provide stubs with clear @deprecated tags that explain to maintainers of legacy code what APIs should be used instead. Thanks, Martin From martinrb at google.com Thu Aug 14 09:54:41 2008 From: martinrb at google.com (Martin Buchholz) Date: Thu, 14 Aug 2008 09:54:41 -0700 Subject: [OpenJDK 2D-Dev] Status of com.sun.image.codec.jpeg In-Reply-To: References: <1ccfd1c10808140932k75eb642eqfab640978d6fdb45@mail.gmail.com> Message-ID: <1ccfd1c10808140954k1d10e2e6uebf2ba5961e4fb15@mail.gmail.com> Hi Chris, Thanks very much for that informative pointer. In hindsight, it would have been good if @deprecated warnings had been added to these classes years ago. Today it's probably too late to do much good. Martin On Thu, Aug 14, 2008 at 9:45 AM, Chris Campbell wrote: > Hi Martin, > > The history (and fate) of those classes is documented here: > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962 > > Chris > > > On Aug 14, 2008, at 9:32 AM, Martin Buchholz wrote: >> >> Hi 2d guys, >> >> We're testing different flavors of OpenJDK, >> and noticing uses of classes in com.sun.image.codec.jpeg. >> These classes are still in non-OpenJDK JDK7. >> They were removed from OpenJDK, probably >> because they were encumbered (proprietary Kodak code). >> The IcedTea folks have created new versions of these >> classes, but they appear to be only stubs. >> >> Can we have a clear statement about the status? >> These classes were documented at least for 1.4, e.g. >> >> >> http://java.sun.com/j2se/1.4.2/docs/guide/2d/api-jpeg/com/sun/image/codec/jpeg/JPEGImageEncoder.html >> >> There does appear to be full support for the JPEG image >> standard in OpenJDK and IcedTea. It would be nice if the >> API in com.sun.image.codec.jpeg could be adapted, or if not, >> at least provide stubs with clear @deprecated tags that >> explain to maintainers of legacy code >> what APIs should be used instead. >> >> Thanks, >> >> Martin > > From Christopher.Campbell at Sun.COM Thu Aug 14 09:45:26 2008 From: Christopher.Campbell at Sun.COM (Chris Campbell) Date: Thu, 14 Aug 2008 09:45:26 -0700 Subject: [OpenJDK 2D-Dev] Status of com.sun.image.codec.jpeg In-Reply-To: <1ccfd1c10808140932k75eb642eqfab640978d6fdb45@mail.gmail.com> References: <1ccfd1c10808140932k75eb642eqfab640978d6fdb45@mail.gmail.com> Message-ID: Hi Martin, The history (and fate) of those classes is documented here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962 Chris On Aug 14, 2008, at 9:32 AM, Martin Buchholz wrote: > Hi 2d guys, > > We're testing different flavors of OpenJDK, > and noticing uses of classes in com.sun.image.codec.jpeg. > These classes are still in non-OpenJDK JDK7. > They were removed from OpenJDK, probably > because they were encumbered (proprietary Kodak code). > The IcedTea folks have created new versions of these > classes, but they appear to be only stubs. > > Can we have a clear statement about the status? > These classes were documented at least for 1.4, e.g. > > http://java.sun.com/j2se/1.4.2/docs/guide/2d/api-jpeg/com/sun/image/codec/jpeg/JPEGImageEncoder.html > > There does appear to be full support for the JPEG image > standard in OpenJDK and IcedTea. It would be nice if the > API in com.sun.image.codec.jpeg could be adapted, or if not, > at least provide stubs with clear @deprecated tags that > explain to maintainers of legacy code > what APIs should be used instead. > > Thanks, > > Martin From robermann at gmail.com Thu Aug 14 11:41:21 2008 From: robermann at gmail.com (Roberto Mannai) Date: Thu, 14 Aug 2008 20:41:21 +0200 Subject: [OpenJDK 2D-Dev] Status of com.sun.image.codec.jpeg In-Reply-To: <1ccfd1c10808140954k1d10e2e6uebf2ba5961e4fb15@mail.gmail.com> References: <1ccfd1c10808140932k75eb642eqfab640978d6fdb45@mail.gmail.com> <1ccfd1c10808140954k1d10e2e6uebf2ba5961e4fb15@mail.gmail.com> Message-ID: <414e44f70808141141p30997204m3bc8921fe3af1b7b@mail.gmail.com> Thank you, I posted a request on that same topic (http://article.gmane.org/gmane.comp.java.openjdk.distro-packaging.devel/2817). Ciao Roberto > On Thu, Aug 14, 2008 at 9:45 AM, Chris Campbell > wrote: >> Hi Martin, >> >> The history (and fate) of those classes is documented here: >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962 >> >> Chris >> >> >> On Aug 14, 2008, at 9:32 AM, Martin Buchholz wrote: >>> >>> Hi 2d guys, >>> >>> We're testing different flavors of OpenJDK, >>> and noticing uses of classes in com.sun.image.codec.jpeg. >>> These classes are still in non-OpenJDK JDK7. >>> They were removed from OpenJDK, probably >>> because they were encumbered (proprietary Kodak code). >>> The IcedTea folks have created new versions of these >>> classes, but they appear to be only stubs. >>> >>> Can we have a clear statement about the status? >>> These classes were documented at least for 1.4, e.g. >>> >>> >>> http://java.sun.com/j2se/1.4.2/docs/guide/2d/api-jpeg/com/sun/image/codec/jpeg/JPEGImageEncoder.html >>> >>> There does appear to be full support for the JPEG image >>> standard in OpenJDK and IcedTea. It would be nice if the >>> API in com.sun.image.codec.jpeg could be adapted, or if not, >>> at least provide stubs with clear @deprecated tags that >>> explain to maintainers of legacy code >>> what APIs should be used instead. >>> >>> Thanks, >>> >>> Martin >> >> > From iivan at town.yyz.redhat.com Thu Aug 14 13:09:02 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Thu, 14 Aug 2008 20:09:02 +0000 Subject: changeset in /hg/pulseaudio: * src/java/org/classpath/icedtea/pu... Message-ID: changeset 20b37b004b8e in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=20b37b004b8e description: * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: modified getLine() to allow us to obtain a TargetDataLine * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: added open(), read() and close() * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java marged the streamListeners into a single listener diffstat: 8 files changed, 652 insertions(+), 445 deletions(-) ChangeLog | 13 build.xml | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 6 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 40 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 456 ++++------ src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java | 248 +++++ src/native/Makefile.am | 2 src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c | 330 +++---- diffs (truncated from 1336 to 500 lines): diff -r 3003bf4192f2 -r 20b37b004b8e ChangeLog --- a/ChangeLog Wed Aug 13 14:22:35 2008 -0400 +++ b/ChangeLog Thu Aug 14 16:09:15 2008 -0400 @@ -1,10 +1,21 @@ 2008-08-13 Ioana Ivan + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: + modified getLine() to allow us to obtain a TargetDataLine + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: + added open(), read() and close() + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + marged the streamListeners into a single listener + + + 2008-08-13 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: the list of formats recognized by PulseAudio is being set here, so it can be used by all DataLines. Also made some changes to get*LineInfo() and isLineSupported() - *src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: changed the constructor diff -r 3003bf4192f2 -r 20b37b004b8e build.xml --- a/build.xml Wed Aug 13 14:22:35 2008 -0400 +++ b/build.xml Thu Aug 14 16:09:15 2008 -0400 @@ -38,9 +38,11 @@ + + diff -r 3003bf4192f2 -r 20b37b004b8e src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 13 14:22:35 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Thu Aug 14 16:09:15 2008 -0400 @@ -317,9 +317,9 @@ private AudioFormat[] getSupportedFormat return new PulseAudioSourceDataLine(eventLoop, formats, defaultFormat); } - /*if ((info.getLineClass() == TargetDataLine.class)) { - return new PulseAudioTargetDataLine(this, (DataLine.Info) info); - }*/ + if ((info.getLineClass() == TargetDataLine.class)) { + return new PulseAudioTargetDataLine(eventLoop, formats, defaultFormat); + } PulseAudioClip clip = new PulseAudioClip(); diff -r 3003bf4192f2 -r 20b37b004b8e src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 13 14:22:35 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu Aug 14 16:09:15 2008 -0400 @@ -81,6 +81,8 @@ public class PulseAudioSourceDataLine im private boolean muted; private float volume; + private Semaphore semaphore = new Semaphore(0); + private long currentFramePosition = 0; /* @@ -122,10 +124,7 @@ public class PulseAudioSourceDataLine im } public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { - if (formats == null) { - - } - + supportedFormats = formats; this.eventLoop = eventLoop; this.lineListeners = new ArrayList(); @@ -182,10 +181,12 @@ public class PulseAudioSourceDataLine im if (e.getType() == StreamEvent.Type.READY) { fireLineEvent(new LineEvent(PulseAudioSourceDataLine.this, LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + semaphore.release(); } else if (e.getType() == StreamEvent.Type.TERMINATED || e.getType() == StreamEvent.Type.FAILED) { fireLineEvent((new LineEvent(PulseAudioSourceDataLine.this, LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); + semaphore.release(); } } @@ -193,18 +194,9 @@ public class PulseAudioSourceDataLine im addStreamListener(openCloseListener); - final Semaphore semaphore = new Semaphore(0); - - synchronized (eventLoop.threadLock) { - - this.addStreamListener(new StreamListener() { - @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.READY) { - semaphore.release(); - } - } - }); + + + synchronized (eventLoop.threadLock) { native_start(); } @@ -264,7 +256,7 @@ public class PulseAudioSourceDataLine im while (remainingLength != 0) { synchronized (eventLoop.threadLock) { - availableSize = native_get_writable_size(); + availableSize = available(); if (availableSize < 0) { return sizeWritten; } @@ -346,19 +338,6 @@ public class PulseAudioSourceDataLine im public void close() { assert (isOpen); - final Semaphore semaphore = new Semaphore(0); - - StreamListener closeListener = new StreamListener() { - @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.TERMINATED - || e.getType() == StreamEvent.Type.FAILED) { - semaphore.release(); - } - } - }; - - addStreamListener(closeListener); synchronized (eventLoop.threadLock) { native_close(); @@ -367,7 +346,6 @@ public class PulseAudioSourceDataLine im try { semaphore.acquire(); System.out.println("stream closed"); - removeStreamListener(closeListener); } catch (InterruptedException e) { // throw new LineUnavailableException("unable to prepare // stream"); diff -r 3003bf4192f2 -r 20b37b004b8e src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Wed Aug 13 14:22:35 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Thu Aug 14 16:09:15 2008 -0400 @@ -37,41 +37,51 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.concurrent.Semaphore; import javax.sound.sampled.*; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; +import javax.sound.sampled.Port.Info; public class PulseAudioTargetDataLine implements TargetDataLine { - protected long contextPointer; - protected long mainLoopPointer; - protected long streamPointer; + protected boolean isOpen = false; protected boolean isPaused = false; - protected int defaultBufferSize; - - + + private AudioFormat[] supportedFormats = null; + private AudioFormat currentFormat = null; + private AudioFormat defaultFormat = null; + + private List lineListeners; + + private List streamListeners = new ArrayList(); + + private String streamName = "Java Stream"; private static final int DEFAULT_BUFFER_SIZE = 1000; private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; - private List supportedFormats = null; - private AudioFormat currentFormat = null; + private EventLoop eventLoop = null; protected ArrayList listeners; + + private Semaphore semaphore = new Semaphore(0); + + @SuppressWarnings("unused") + private long streamPointer; static { try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar + "lib" - + java.io.File.separatorChar + String library = new java.io.File(".").getCanonicalPath() + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); System.out.println(library); System.load(library); @@ -80,226 +90,148 @@ public class PulseAudioTargetDataLine im } } - public PulseAudioTargetDataLine(EventLoop eventLoop) { + private native void native_open(long contextPointer, String streamName, + String encoding, int sampleRate, int channels, int bufferSize); + + private native void native_start(); + + private native int native_get_readable_size(); + + private native void native_close(); + + private native int native_read(byte[] array, int remaininglength, int position); + + public PulseAudioTargetDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { + supportedFormats = formats; this.eventLoop = eventLoop; - this.listeners = new ArrayList(); - - - - - /* - * FIXME puselaudio supports any sample rate (it can covert between - * sample rates without a problem). it calculates the frame size and the - * frame rate based on that. - * - * Java's AudioSystem interface accepts NOT_SPECIFIED only for sample - * rate and frame rate. eg: cant say that it supports any number of - * audio channels - * - * sample size in bytes [PA_SAMPLE_U8] = 1, [PA_SAMPLE_ULAW] = 1, - * [PA_SAMPLE_ALAW] = 1, [PA_SAMPLE_S16LE] = 2, [PA_SAMPLE_S16BE] = 2, - * [PA_SAMPLE_FLOAT32LE] = 4, [PA_SAMPLE_FLOAT32BE] = 4, - * [PA_SAMPLE_S32LE] = 4, [PA_SAMPLE_S32BE] = 4, - * - * - */ - - supportedFormats = new LinkedList(); - - Map properties; - - int[] channelSizes = new int[] { 1, 2, 5 }; - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - int sampleSize = 8; // in bits - AudioFormat PA_SAMPLE_U8 = new AudioFormat( - Encoding.PCM_UNSIGNED, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size in bytes - AudioSystem.NOT_SPECIFIED, // frame rate - false, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_U8); - } - - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_ALAW"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - - int sampleSize = 8; - final AudioFormat PA_SAMPLE_ALAW = new AudioFormat(Encoding.ALAW, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size - AudioSystem.NOT_SPECIFIED, // frame rate - false, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_ALAW); - } - - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_ULAW"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - - int sampleSize = 8; - final AudioFormat PA_SAMPLE_ULAW = new AudioFormat(Encoding.ULAW, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size - AudioSystem.NOT_SPECIFIED, // frame rate - false, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_ULAW); - } - - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S16BE"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - - int sampleSize = 16; - final AudioFormat PA_SAMPLE_S16BE = new AudioFormat( - Encoding.PCM_SIGNED, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size - AudioSystem.NOT_SPECIFIED, // frame rate - true, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_S16BE); - } - - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S16LE"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - - int sampleSize = 16; - final AudioFormat A_SAMPLE_S16LE = new AudioFormat( - Encoding.PCM_SIGNED, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size - AudioSystem.NOT_SPECIFIED, // frame rate - false, // big endian? - properties); - - supportedFormats.add(A_SAMPLE_S16LE); - } - - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S32BE"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - - int sampleSize = 32; - final AudioFormat PA_SAMPLE_S32BE = new AudioFormat( - Encoding.PCM_SIGNED, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size - AudioSystem.NOT_SPECIFIED, // frame rate - true, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_S32BE); - } - - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S32LE"); - - // frameSize = sample size (in bytes, not bits) x # of channels - // ^ that's from PulseAudio sources, so it will pretty much break - // as soon as they change something - // FIXME ^ - - int sampleSize = 32; - final AudioFormat PA_SAMPLE_S32LE = new AudioFormat( - Encoding.PCM_SIGNED, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size - AudioSystem.NOT_SPECIFIED, // frame rate - false, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_S32LE); - } - - currentFormat = null; - + this.lineListeners = new ArrayList(); + this.defaultFormat = defaultFormat; + this.currentFormat = defaultFormat; } public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { - isOpen = true; - - int channels = format.getChannels(); - float rate = format.getSampleRate(); - int sampleSize = format.getSampleSizeInBits(); - String encoding = format.getEncoding().toString(); - boolean bigEndian = format.isBigEndian(); - openStream(encoding, rate, sampleSize, channels, bigEndian, bufferSize); + System.out.println("OPEn CALLED"); + if (isOpen) { + throw new IllegalStateException("Line is already open"); + } + + // ignore suggested buffer size + + for (AudioFormat myFormat : supportedFormats) { + if (format.matches(myFormat)) { + native_open(eventLoop.getContextPointer(), streamName, + (String) myFormat.getProperty(PULSEAUDIO_FORMAT_KEY), + (int) format.getSampleRate(), format.getChannels(), + bufferSize); + currentFormat = format; + isOpen = true; + } + } + // no matches found + if (!isOpen) { + throw new IllegalArgumentException("Invalid format"); + } + + StreamListener openCloseListener = new StreamListener() { + + @Override + public void update(StreamEvent e) { + if (e.getType() == StreamEvent.Type.READY) { + fireLineEvent(new LineEvent(PulseAudioTargetDataLine.this, + LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + System.out.println("IN HERE"); + semaphore.release(); + } else if (e.getType() == StreamEvent.Type.TERMINATED + || e.getType() == StreamEvent.Type.FAILED) { + fireLineEvent((new LineEvent(PulseAudioTargetDataLine.this, + LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); + semaphore.release(); + } + } + + }; + + addStreamListener(openCloseListener); + + + + synchronized (eventLoop.threadLock) { + + native_start(); + } + + try { + semaphore.acquire(); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); + } } public void open(AudioFormat format) throws LineUnavailableException { From doko at ubuntu.com Thu Aug 14 13:43:59 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 14 Aug 2008 20:43:59 +0000 Subject: changeset in /hg/icedtea6: 2008-08-14 Matthias Klose changeset f8dc8a133c2a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f8dc8a133c2a description: 2008-08-14 Matthias Klose * patches/icedtea-jdk-use-ssize_t.patch: New. * Makefile.am (ICEDTEA_PATCHES): Add patch. diffstat: 3 files changed, 39 insertions(+) ChangeLog | 5 +++++ Makefile.am | 1 + patches/icedtea-jdk-use-ssize_t.patch | 33 +++++++++++++++++++++++++++++++++ diffs (60 lines): diff -r 1ff78f827345 -r f8dc8a133c2a ChangeLog --- a/ChangeLog Thu Aug 14 17:00:18 2008 +0100 +++ b/ChangeLog Thu Aug 14 22:43:19 2008 +0200 @@ -1,3 +1,8 @@ 2008-08-14 Andrew Haley + + * patches/icedtea-jdk-use-ssize_t.patch: New. + * Makefile.am (ICEDTEA_PATCHES): Add patch. + 2008-08-14 Andrew Haley * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp diff -r 1ff78f827345 -r f8dc8a133c2a Makefile.am --- a/Makefile.am Thu Aug 14 17:00:18 2008 +0100 +++ b/Makefile.am Thu Aug 14 22:43:19 2008 +0200 @@ -501,6 +501,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-alpha-fixes.patch \ patches/icedtea-alt-jar.patch \ patches/icedtea-enum-bug-181.patch \ + patches/icedtea-jdk-use-ssize_t.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ patches/icedtea-arch.patch diff -r 1ff78f827345 -r f8dc8a133c2a patches/icedtea-jdk-use-ssize_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jdk-use-ssize_t.patch Thu Aug 14 22:43:19 2008 +0200 @@ -0,0 +1,33 @@ +--- openjdk/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c.old 2008-07-10 21:58:39.000000000 +0200 ++++ openjdk/jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2008-08-03 16:26:16.000000000 +0200 +@@ -380,12 +380,12 @@ + return socket(domain, type, protocol); + } + +-ssize_t ++SSIZE_T + sysRecv(int fd, char *buf, int nBytes, int flags) { + INTERRUPT_IO(recv(fd, buf, nBytes, flags)) + } + +-ssize_t ++SSIZE_T + sysSend(int fd, char *buf, int nBytes, int flags) { + INTERRUPT_IO(send(fd, buf, nBytes, flags)) + } +@@ -595,13 +595,13 @@ + /* + * Routines to do datagrams + */ +-ssize_t ++SSIZE_T + sysSendTo(int fd, char *buf, int len, + int flags, struct sockaddr *to, int tolen) { + INTERRUPT_IO(sendto(fd, buf, len, flags, to, tolen)) + } + +-ssize_t ++SSIZE_T + sysRecvFrom(int fd, char *buf, int nBytes, + int flags, struct sockaddr *from, int *fromlen) { + INTERRUPT_IO(recvfrom(fd, buf, nBytes, flags, from, (uint *)fromlen)) From doko at ubuntu.com Thu Aug 14 18:55:32 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 15 Aug 2008 01:55:32 +0000 Subject: changeset in /hg/icedtea6: 2008-08-15 Matthias Klose changeset 994664294f98 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=994664294f98 description: 2008-08-15 Matthias Klose * openjdk/hotspot/build/linux/makefiles/gcc.make: Build hotspot with -fPIC on s390/s390x. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ patches/icedtea-text-relocations.patch | 2 +- diffs (24 lines): diff -r f8dc8a133c2a -r 994664294f98 ChangeLog --- a/ChangeLog Thu Aug 14 22:43:19 2008 +0200 +++ b/ChangeLog Fri Aug 15 03:54:56 2008 +0200 @@ -1,3 +1,8 @@ 2008-08-14 Matthias Klose + + * openjdk/hotspot/build/linux/makefiles/gcc.make: Build hotspot + with -fPIC on s390/s390x. + 2008-08-14 Matthias Klose * patches/icedtea-jdk-use-ssize_t.patch: New. diff -r f8dc8a133c2a -r 994664294f98 patches/icedtea-text-relocations.patch --- a/patches/icedtea-text-relocations.patch Thu Aug 14 22:43:19 2008 +0200 +++ b/patches/icedtea-text-relocations.patch Fri Aug 15 03:54:56 2008 +0200 @@ -4,7 +4,7 @@ # Compiler flags # position-independent code -+ifneq ($(filter ppc ppc64 sparc sparc64,$(ZERO_LIBARCH)),) ++ifneq ($(filter ppc ppc64 s390 s390x sparc sparc64,$(ZERO_LIBARCH)),) PICFLAG = -fPIC +else +PICFLAG = -fpic From doko at ubuntu.com Thu Aug 14 19:03:14 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 15 Aug 2008 02:03:14 +0000 Subject: changeset in /hg/icedtea6: 2008-08-15 Matthias Klose changeset 60760430f24d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=60760430f24d description: 2008-08-15 Matthias Klose * patches/icedtea-hotspot-use-idx_t.patch: New. * patches/icedtea-hotspot-params-cast-size_t.patch: Likewise. * Makefile.am (ICEDTEA_PATCHES): Add patches. diffstat: 4 files changed, 411 insertions(+) ChangeLog | 6 Makefile.am | 2 patches/icedtea-hotspot-params-cast-size_t.patch | 121 +++++++++ patches/icedtea-hotspot-use-idx_t.patch | 282 ++++++++++++++++++++++ diffs (436 lines): diff -r 994664294f98 -r 60760430f24d ChangeLog --- a/ChangeLog Fri Aug 15 03:54:56 2008 +0200 +++ b/ChangeLog Fri Aug 15 04:02:41 2008 +0200 @@ -1,3 +1,9 @@ 2008-08-15 Matthias Klose + + * patches/icedtea-hotspot-use-idx_t.patch: New. + * patches/icedtea-hotspot-params-cast-size_t.patch: Likewise. + * Makefile.am (ICEDTEA_PATCHES): Add patches. + 2008-08-15 Matthias Klose * openjdk/hotspot/build/linux/makefiles/gcc.make: Build hotspot diff -r 994664294f98 -r 60760430f24d Makefile.am --- a/Makefile.am Fri Aug 15 03:54:56 2008 +0200 +++ b/Makefile.am Fri Aug 15 04:02:41 2008 +0200 @@ -502,6 +502,8 @@ ICEDTEA_PATCHES = \ patches/icedtea-alt-jar.patch \ patches/icedtea-enum-bug-181.patch \ patches/icedtea-jdk-use-ssize_t.patch \ + patches/icedtea-hotspot-use-idx_t.patch \ + patches/icedtea-hotspot-params-cast-size_t.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ patches/icedtea-arch.patch diff -r 994664294f98 -r 60760430f24d patches/icedtea-hotspot-params-cast-size_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-params-cast-size_t.patch Fri Aug 15 04:02:41 2008 +0200 @@ -0,0 +1,121 @@ +--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-08-03 14:58:48.000000000 +0200 +@@ -63,7 +63,7 @@ + _last_used = current_live; + + // We have different alignment constraints than the rest of the heap. +- const size_t alignment = MAX2(MinPermHeapExpansion, ++ const size_t alignment = MAX2((size_t) MinPermHeapExpansion, + virtual_space()->alignment()); + + // Compute the desired size: +--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-08-03 14:58:15.000000000 +0200 +@@ -925,8 +925,8 @@ + void PSParallelCompact::initialize_dead_wood_limiter() + { + const size_t max = 100; +- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0; +- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; ++ _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0; ++ _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; + _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); + DEBUG_ONLY(_dwl_initialized = true;) + _dwl_adjustment = normal_distribution(1.0); +--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-08-03 14:39:46.000000000 +0200 +@@ -926,7 +926,7 @@ + if (free_percentage < desired_free_percentage) { + size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); + assert(desired_capacity >= capacity(), "invalid expansion size"); +- expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); ++ expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes); + } + if (expand_bytes > 0) { + if (PrintGCDetails && Verbose) { +@@ -5963,7 +5963,7 @@ + HeapWord* curAddr = _markBitMap.startWord(); + while (curAddr < _markBitMap.endWord()) { + size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr); +- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining)); ++ MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining)); + _markBitMap.clear_large_range(chunk); + if (ConcurrentMarkSweepThread::should_yield() && + !foregroundGCIsActive() && +@@ -6251,7 +6251,7 @@ + return; + } + // Double capacity if possible +- size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax); ++ size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax); + // Do not give up existing stack until we have managed to + // get the double capacity that we desired. + ReservedSpace rs(ReservedSpace::allocation_align_size_up( +--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp.old 2008-08-03 13:49:24.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-08-03 14:04:48.000000000 +0200 +@@ -1038,7 +1038,7 @@ + // for "short" pauses ~ 4M*ParallelGCThreads + if (FLAG_IS_DEFAULT(MaxNewSize)) { // MaxNewSize not set at command-line + if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line +- FLAG_SET_DEFAULT(MaxNewSize, MAX2(NewSize, preferred_max_new_size)); ++ FLAG_SET_DEFAULT(MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size)); + } else { + FLAG_SET_DEFAULT(MaxNewSize, preferred_max_new_size); + } +@@ -1047,7 +1047,7 @@ + // Old to Young gen size so as to shift the collection load + // to the old generation concurrent collector + if (FLAG_IS_DEFAULT(NewRatio)) { +- FLAG_SET_DEFAULT(NewRatio, MAX2(NewRatio, new_ratio)); ++ FLAG_SET_DEFAULT(NewRatio, MAX2((intx) NewRatio, new_ratio)); + + size_t min_new = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size()); + size_t prev_initial_size = initial_heap_size(); +@@ -1069,15 +1069,15 @@ + // Unless explicitly requested otherwise, make young gen + // at least min_new, and at most preferred_max_new_size. + if (FLAG_IS_DEFAULT(NewSize)) { +- FLAG_SET_DEFAULT(NewSize, MAX2(NewSize, min_new)); +- FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, NewSize)); ++ FLAG_SET_DEFAULT(NewSize, MAX2((size_t) NewSize, min_new)); ++ FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, (size_t) NewSize)); + } + // Unless explicitly requested otherwise, size old gen + // so that it's at least 3X of NewSize to begin with; + // later NewRatio will decide how it grows; see above. + if (FLAG_IS_DEFAULT(OldSize)) { + if (max_heap > NewSize) { +- FLAG_SET_DEFAULT(OldSize, MIN2(3*NewSize, max_heap - NewSize)); ++ FLAG_SET_DEFAULT(OldSize, MIN2((size_t) (3*NewSize), max_heap - (size_t) NewSize)); + } + } + } +--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-08-03 14:21:27.000000000 +0200 +@@ -233,13 +233,13 @@ + // as a lower bound as with + // _min_gen0_size = MIN2(_min_gen0_size, MaxNewSize); + // and 640k seemed too small a young generation. +- _min_gen0_size = MIN2(MAX2(_min_gen0_size, NewSize), MaxNewSize); ++ _min_gen0_size = MIN2(MAX2(_min_gen0_size, (size_t) NewSize), (size_t) MaxNewSize); + } + + // Parameters are valid, compute area sizes. + size_t max_new_size = align_size_down(_max_heap_byte_size / (NewRatio+1), + min_alignment()); +- max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), MaxNewSize); ++ max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), (size_t) MaxNewSize); + + // desired_new_size is used to set the initial size. The + // initial size must be greater than the minimum size. +--- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.old 2008-08-03 13:12:02.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-08-03 15:02:15.000000000 +0200 +@@ -222,7 +222,7 @@ + size_t init_sz; + + if (TLABSize > 0) { +- init_sz = MIN2(TLABSize / HeapWordSize, max_size()); ++ init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size()); + } else if (global_stats() == NULL) { + // Startup issue - main thread initialized before heap initialized. + init_sz = min_size(); diff -r 994664294f98 -r 60760430f24d patches/icedtea-hotspot-use-idx_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-use-idx_t.patch Fri Aug 15 04:02:41 2008 +0200 @@ -0,0 +1,282 @@ +--- openjdk/hotspot/src/share/vm/oops/generateOopMap.hpp.orig 2008-07-10 22:04:33.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/oops/generateOopMap.hpp 2008-08-14 23:08:36.000000000 +0200 +@@ -341,7 +341,7 @@ + BasicBlock * _basic_blocks; // Array of basicblock info + int _gc_points; + int _bb_count; +- uintptr_t * _bb_hdr_bits; ++ size_t * _bb_hdr_bits; + + // Basicblocks methods + void initialize_bb (); +--- openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp.orig 2008-08-14 22:58:36.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp 2008-08-14 23:03:33.000000000 +0200 +@@ -374,19 +374,19 @@ + _gc_points = 0; + _bb_count = 0; + int size = binsToHold(method()->code_size()); +- _bb_hdr_bits = NEW_RESOURCE_ARRAY(uintptr_t,size); +- memset(_bb_hdr_bits, 0, size*sizeof(uintptr_t)); ++ _bb_hdr_bits = NEW_RESOURCE_ARRAY(size_t,size); ++ memset(_bb_hdr_bits, 0, size*sizeof(size_t)); + } + + void GenerateOopMap ::set_bbmark_bit(int bci) { + int idx = bci >> LogBitsPerWord; +- uintptr_t bit = (uintptr_t)1 << (bci & (BitsPerWord-1)); ++ size_t bit = (size_t)1 << (bci & (BitsPerWord-1)); + _bb_hdr_bits[idx] |= bit; + } + + void GenerateOopMap ::clear_bbmark_bit(int bci) { + int idx = bci >> LogBitsPerWord; +- uintptr_t bit = (uintptr_t)1 << (bci & (BitsPerWord-1)); ++ size_t bit = (size_t)1 << (bci & (BitsPerWord-1)); + _bb_hdr_bits[idx] &= (~bit); + } + +@@ -1027,7 +1027,7 @@ + "new method size is too small"); + int newWords = binsToHold(new_method_size); + +- uintptr_t * new_bb_hdr_bits = NEW_RESOURCE_ARRAY(uintptr_t, newWords); ++ size_t * new_bb_hdr_bits = NEW_RESOURCE_ARRAY(size_t, newWords); + + BitMap bb_bits(new_bb_hdr_bits, new_method_size); + bb_bits.clear(); +--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.orig 2008-07-10 22:04:31.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-08-14 22:59:30.000000000 +0200 +@@ -6162,7 +6162,7 @@ + } + assert(_virtual_space.committed_size() == brs.size(), + "didn't reserve backing store for all of CMS bit map?"); +- _bm.set_map((uintptr_t*)_virtual_space.low()); ++ _bm.set_map((size_t*)_virtual_space.low()); + assert(_virtual_space.committed_size() << (_shifter + LogBitsPerByte) >= + _bmWordSize, "inconsistency in bit map sizing"); + _bm.set_size(_bmWordSize >> _shifter); +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig 2008-07-10 22:04:30.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-08-14 22:59:30.000000000 +0200 +@@ -569,15 +569,15 @@ + + + MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : +- _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), + _last_bci(-1) { + _analyzer = analyzer; +@@ -994,7 +994,7 @@ + } + + MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { +- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()), ++ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), + _analyzer->bit_map_size_bits()); + answer.set_is_valid(); + +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.hpp.orig 2008-07-10 22:04:30.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.hpp 2008-08-14 22:59:30.000000000 +0200 +@@ -32,7 +32,7 @@ + bool _is_valid; + + public: +- MethodLivenessResult(uintptr_t* map, idx_t size_in_bits) ++ MethodLivenessResult(idx_t* map, idx_t size_in_bits) + : BitMap(map, size_in_bits) + , _is_valid(false) + {} +--- openjdk/hotspot/src/share/vm/utilities/bitMap.cpp.orig 2008-07-10 22:04:37.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.cpp 2008-08-14 23:06:51.000000000 +0200 +@@ -46,7 +46,7 @@ + void BitMap::resize(idx_t size_in_bits) { + assert(size_in_bits >= 0, "just checking"); + size_t old_size_in_words = size_in_words(); +- uintptr_t* old_map = map(); ++ idx_t* old_map = map(); + _size = size_in_bits; + size_t new_size_in_words = size_in_words(); + _map = NEW_RESOURCE_ARRAY(idx_t, new_size_in_words); +@@ -109,11 +109,11 @@ + } + + inline void BitMap::set_large_range_of_words(idx_t beg, idx_t end) { +- memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(uintptr_t)); ++ memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(idx_t)); + } + + inline void BitMap::clear_large_range_of_words(idx_t beg, idx_t end) { +- memset(_map + beg, 0, (end - beg) * sizeof(uintptr_t)); ++ memset(_map + beg, 0, (end - beg) * sizeof(idx_t)); + } + + inline BitMap::idx_t BitMap::word_index_round_up(idx_t bit) const { +@@ -285,11 +285,11 @@ + + bool BitMap::contains(const BitMap other) const { + assert(size() == other.size(), "must have same size"); +- uintptr_t* dest_map = map(); +- uintptr_t* other_map = other.map(); ++ idx_t* dest_map = map(); ++ idx_t* other_map = other.map(); + idx_t size = size_in_words(); + for (idx_t index = 0; index < size_in_words(); index++) { +- uintptr_t word_union = dest_map[index] | other_map[index]; ++ idx_t word_union = dest_map[index] | other_map[index]; + // If this has more bits set than dest_map[index], then other is not a + // subset. + if (word_union != dest_map[index]) return false; +@@ -299,8 +299,8 @@ + + bool BitMap::intersects(const BitMap other) const { + assert(size() == other.size(), "must have same size"); +- uintptr_t* dest_map = map(); +- uintptr_t* other_map = other.map(); ++ idx_t* dest_map = map(); ++ idx_t* other_map = other.map(); + idx_t size = size_in_words(); + for (idx_t index = 0; index < size_in_words(); index++) { + if ((dest_map[index] & other_map[index]) != 0) return true; +@@ -411,24 +411,24 @@ + } + + bool BitMap::is_full() const { +- uintptr_t* word = map(); ++ idx_t* word = map(); + idx_t rest = size(); + for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) { +- if (*word != (uintptr_t) AllBits) return false; ++ if (*word != (idx_t) AllBits) return false; + word++; + } +- return rest == 0 || (*word | ~right_n_bits((int)rest)) == (uintptr_t) AllBits; ++ return rest == 0 || (*word | ~right_n_bits((int)rest)) == (idx_t) AllBits; + } + + + bool BitMap::is_empty() const { +- uintptr_t* word = map(); ++ idx_t* word = map(); + idx_t rest = size(); + for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) { +- if (*word != (uintptr_t) NoBits) return false; ++ if (*word != (idx_t) NoBits) return false; + word++; + } +- return rest == 0 || (*word & right_n_bits((int)rest)) == (uintptr_t) NoBits; ++ return rest == 0 || (*word & right_n_bits((int)rest)) == (idx_t) NoBits; + } + + void BitMap::clear_large() { +@@ -448,7 +448,7 @@ + offset < rightOffset && index < endIndex; + offset = (++index) << LogBitsPerWord) { + idx_t rest = map(index) >> (offset & (BitsPerWord - 1)); +- for (; offset < rightOffset && rest != (uintptr_t)NoBits; offset++) { ++ for (; offset < rightOffset && rest != (idx_t)NoBits; offset++) { + if (rest & 1) { + blk->do_bit(offset); + // resample at each closure application +@@ -481,7 +481,7 @@ + // check bits including and to the _left_ of offset's position + idx_t pos = bit_in_word(res_offset); + idx_t res = map(index) >> pos; +- if (res != (uintptr_t)NoBits) { ++ if (res != (idx_t)NoBits) { + // find the position of the 1-bit + for (; !(res & 1); res_offset++) { + res = res >> 1; +@@ -492,7 +492,7 @@ + // skip over all word length 0-bit runs + for (index++; index < r_index; index++) { + res = map(index); +- if (res != (uintptr_t)NoBits) { ++ if (res != (idx_t)NoBits) { + // found a 1, return the offset + for (res_offset = index << LogBitsPerWord; !(res & 1); + res_offset++) { +@@ -523,7 +523,7 @@ + idx_t pos = res_offset & (BitsPerWord - 1); + idx_t res = (map(index) >> pos) | left_n_bits((int)pos); + +- if (res != (uintptr_t)AllBits) { ++ if (res != (idx_t)AllBits) { + // find the position of the 0-bit + for (; res & 1; res_offset++) { + res = res >> 1; +@@ -534,7 +534,7 @@ + // skip over all word length 1-bit runs + for (index++; index < r_index; index++) { + res = map(index); +- if (res != (uintptr_t)AllBits) { ++ if (res != (idx_t)AllBits) { + // found a 0, return the offset + for (res_offset = index << LogBitsPerWord; res & 1; + res_offset++) { +@@ -561,7 +561,7 @@ + #endif + + +-BitMap2D::BitMap2D(uintptr_t* map, idx_t size_in_slots, idx_t bits_per_slot) ++BitMap2D::BitMap2D(idx_t* map, idx_t size_in_slots, idx_t bits_per_slot) + : _bits_per_slot(bits_per_slot) + , _map(map, size_in_slots * bits_per_slot) + { +--- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig 2008-07-10 22:04:37.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2008-08-14 23:08:18.000000000 +0200 +@@ -35,7 +35,7 @@ + + + // Operations for bitmaps represented as arrays of unsigned 32- or 64-bit +-// integers (uintptr_t). ++// integers (size_t). + // + // Bit offsets are numbered from 0 to size-1 + +@@ -82,7 +82,7 @@ + + // Set a word to a specified value or to all ones; clear a word. + void set_word (idx_t word, idx_t val) { _map[word] = val; } +- void set_word (idx_t word) { set_word(word, ~(uintptr_t)0); } ++ void set_word (idx_t word) { set_word(word, ~(idx_t)0); } + void clear_word(idx_t word) { _map[word] = 0; } + + // Utilities for ranges of bits. Ranges are half-open [beg, end). +@@ -313,7 +313,7 @@ + + public: + // Construction. bits_per_slot must be greater than 0. +- BitMap2D(uintptr_t* map, idx_t size_in_slots, idx_t bits_per_slot); ++ BitMap2D(idx_t* map, idx_t size_in_slots, idx_t bits_per_slot); + + // Allocates necessary data structure in resource area. bits_per_slot must be greater than 0. + BitMap2D(idx_t size_in_slots, idx_t bits_per_slot); +@@ -366,13 +366,13 @@ + + + inline void BitMap::set_range_of_words(idx_t beg, idx_t end) { +- uintptr_t* map = _map; +- for (idx_t i = beg; i < end; ++i) map[i] = ~(uintptr_t)0; ++ idx_t* map = _map; ++ for (idx_t i = beg; i < end; ++i) map[i] = ~(idx_t)0; + } + + + inline void BitMap::clear_range_of_words(idx_t beg, idx_t end) { +- uintptr_t* map = _map; ++ idx_t* map = _map; + for (idx_t i = beg; i < end; ++i) map[i] = 0; + } + From xerxes at zafena.se Fri Aug 15 01:54:35 2008 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Fri, 15 Aug 2008 10:54:35 +0200 Subject: changeset in /hg/icedtea6: 2008-08-14 Lillian Angel References: Message-ID: <48A5444B.8030208@zafena.se> Hi Lillian! This change makes configure fail on my system with: checking for libgcj-4.3*.jar or libgcj-4.1*.jar... ./configure: line 7826: test: /usr/share/java/libgcj-4.3.1.jar: binary operator expected no configure: error: "A LIBGCJ jar was not found." make: *** [config.status] Fel 1 the error is cause because the wildcard matches both the symlink and the real libgcj jar file in /usr/share/java/ on my system it looks like this: xerxes at armel:/usr/share/java$ ls -la libgcj* lrwxrwxrwx 1 root root 14 25 jul 16.23 libgcj-4.3.1.jar -> libgcj-4.3.jar -rw-r--r-- 1 root root 10240119 11 jul 01.51 libgcj-4.3.jar the attached patch fixes this issue on my system by adding a . before the * . Have a great day! Xerxes Lillian Angel skrev: > changeset 626751ee178e in /hg/icedtea6 > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=626751ee178e > description: > 2008-08-14 Lillian Angel > > * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with > minor versions. > > diffstat: > > 2 files changed, 15 insertions(+), 20 deletions(-) > ChangeLog | 5 +++++ > acinclude.m4 | 30 ++++++++++-------------------- > > diffs (54 lines): > > diff -r 288bdc0696ff -r 626751ee178e ChangeLog > --- a/ChangeLog Thu Aug 14 16:54:46 2008 +0200 > +++ b/ChangeLog Thu Aug 14 11:14:26 2008 -0400 > @@ -1,3 +1,8 @@ 2008-08-14 Mark Wielaard +2008-08-14 Lillian Angel > + > + * acinclude.m4: Changed LIBGCJ_JAR check to be less stringent with > + minor versions. > + > 2008-08-14 Mark Wielaard > > * patches/icedtea-signed-types-hot6.patch: New patch. > diff -r 288bdc0696ff -r 626751ee178e acinclude.m4 > --- a/acinclude.m4 Thu Aug 14 16:54:46 2008 +0200 > +++ b/acinclude.m4 Thu Aug 14 11:14:26 2008 -0400 > @@ -254,28 +254,18 @@ AC_DEFUN([FIND_LIBGCJ_JAR], > LIBGCJ_JAR= > ]) > if test -z "${LIBGCJ_JAR}"; then > - AC_MSG_CHECKING(for libgcj-4.3.0.jar or libgcj-4.1.2.jar) > - if test -e "/usr/share/java/libgcj-4.3.0.jar"; then > - LIBGCJ_JAR=/usr/share/java/libgcj-4.3.0.jar > + AC_MSG_CHECKING(for libgcj-4.3*.jar or libgcj-4.1*.jar) > + if test -e /usr/share/java/libgcj-4.3*.jar; then > + LIBGCJ_JAR=/usr/share/java/libgcj-4.3*.jar > AC_MSG_RESULT(${LIBGCJ_JAR}) > else > - if test -e "/usr/share/java/libgcj-4.3.jar"; then > - LIBGCJ_JAR=/usr/share/java/libgcj-4.3.jar > - AC_MSG_RESULT(${LIBGCJ_JAR}) > - else > - AM_CONDITIONAL(GCC_OLD, test x = x) > - if test -e "/usr/share/java/libgcj-4.1.2.jar"; then > - LIBGCJ_JAR=/usr/share/java/libgcj-4.1.2.jar > - AC_MSG_RESULT(${LIBGCJ_JAR}) > - else > - if test -e "/usr/share/java/libgcj-4.1.jar"; then > - LIBGCJ_JAR=/usr/share/java/libgcj-4.1.jar > - AC_MSG_RESULT(${LIBGCJ_JAR}) > - else > - AC_MSG_RESULT(no) > - fi > - fi > - fi > + AM_CONDITIONAL(GCC_OLD, test x = x) > + if test -e /usr/share/java/libgcj-4.1*.jar; then > + LIBGCJ_JAR=/usr/share/java/libgcj-4.1*.jar > + AC_MSG_RESULT(${LIBGCJ_JAR}) > + else > + AC_MSG_RESULT(no) > + fi > fi > fi > if test -z "${LIBGCJ_JAR}"; then > -------------- next part -------------- A non-text attachment was scrubbed... Name: libgcj.check.patch Type: text/x-patch Size: 934 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080815/21c42828/libgcj.check.patch From xerxes at zafena.se Fri Aug 15 02:17:03 2008 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Fri, 15 Aug 2008 11:17:03 +0200 Subject: changeset in /hg/icedtea6: 2008-08-12 Matthias Klose References: Message-ID: <48A5498F.7060409@zafena.se> Hi Matthias! I have attached a patch to change the md5sum to match the new cacao release 0.99.3. doko at ubuntu.com skrev: > changeset 5fd318f3b379 in /hg/icedtea6 > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5fd318f3b379 > description: > 2008-08-12 Matthias Klose > > * Makefile.am (stamps/cacao.stamp): Robustify. > > diffstat: > > 2 files changed, 6 insertions(+), 2 deletions(-) > ChangeLog | 4 ++++ > Makefile.am | 4 ++-- > > diffs (32 lines): > > diff -r 3b7c41ea8ccb -r 5fd318f3b379 ChangeLog > --- a/ChangeLog Tue Aug 12 13:43:16 2008 -0400 > +++ b/ChangeLog Tue Aug 12 20:23:58 2008 +0200 > @@ -1,3 +1,7 @@ 2008-08-12 Lillian Angel +2008-08-12 Matthias Klose > + > + * Makefile.am (stamps/cacao.stamp): Robustify. > + > 2008-08-12 Lillian Angel > > * HACKING: Added icedtea-enum-bug-181.patch. > diff -r 3b7c41ea8ccb -r 5fd318f3b379 Makefile.am > --- a/Makefile.am Tue Aug 12 13:43:16 2008 -0400 > +++ b/Makefile.am Tue Aug 12 20:23:58 2008 +0200 > @@ -2,7 +2,7 @@ OPENJDK_MD5SUM = 8e60cdac02ec1b2d8ddb9d7 > OPENJDK_MD5SUM = 8e60cdac02ec1b2d8ddb9d7369be69df > OPENJDK_VERSION = b11 > > -CACAO_VERSION = 0.99.2 > +CACAO_VERSION = 0.99.3 > CACAO_MD5SUM = a2865f47535f6dc3def268c0055ff20a > > NETBEANS_PLATFORM_MD5SUM = 77c79b3a7d3dbe6a8858639f8d564a38 > @@ -1250,7 +1250,7 @@ stamps/cacao.stamp: stamps/extract.stamp > stamps/cacao.stamp: stamps/extract.stamp stamps/rt-class-files.stamp > if WITH_CACAO > if !USE_SYSTEM_CACAO > - cd cacao/cacao-$(CACAO_VERSION) ; \ > + cd cacao/cacao-$(CACAO_VERSION) && \ > ./configure \ > --prefix=$(abs_top_builddir)/cacao/install \ > --with-java-runtime-library=openjdk \ > -------------- next part -------------- A non-text attachment was scrubbed... Name: cacao.md5sum.patch Type: text/x-patch Size: 418 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080815/555fcc61/cacao.md5sum.patch From doko at ubuntu.com Fri Aug 15 04:25:14 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 15 Aug 2008 11:25:14 +0000 Subject: changeset in /hg/icedtea6: 2008-08-15 Xerxes Ranby changeset b38674a9b357 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b38674a9b357 description: 2008-08-15 Xerxes Ranby * Makefile.am (CACAO_MD5SUM): Update for 0.99.3. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 2 +- diffs (23 lines): diff -r 60760430f24d -r b38674a9b357 ChangeLog --- a/ChangeLog Fri Aug 15 04:02:41 2008 +0200 +++ b/ChangeLog Fri Aug 15 13:24:41 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-15 Matthias Klose + + * Makefile.am (CACAO_MD5SUM): Update for 0.99.3. + 2008-08-15 Matthias Klose * patches/icedtea-hotspot-use-idx_t.patch: New. diff -r 60760430f24d -r b38674a9b357 Makefile.am --- a/Makefile.am Fri Aug 15 04:02:41 2008 +0200 +++ b/Makefile.am Fri Aug 15 13:24:41 2008 +0200 @@ -3,7 +3,7 @@ OPENJDK_VERSION = b11 OPENJDK_VERSION = b11 CACAO_VERSION = 0.99.3 -CACAO_MD5SUM = a2865f47535f6dc3def268c0055ff20a +CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 NETBEANS_PLATFORM_MD5SUM = 77c79b3a7d3dbe6a8858639f8d564a38 NETBEANS_PROFILER_MD5SUM = ff8e8abc42df6c6749e6b02bcf7bb0a5 From langel at redhat.com Fri Aug 15 06:34:08 2008 From: langel at redhat.com (Lillian Angel) Date: Fri, 15 Aug 2008 13:34:08 +0000 Subject: changeset in /hg/icedtea6: 2008-08-15 Xerxes Ranby changeset 87bc57c2a16e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=87bc57c2a16e description: 2008-08-15 Xerxes Ranby * acinclude.m4: Fixed LIBGCJ_JAR check. diffstat: 2 files changed, 9 insertions(+), 5 deletions(-) ChangeLog | 4 ++++ acinclude.m4 | 10 +++++----- diffs (36 lines): diff -r b38674a9b357 -r 87bc57c2a16e ChangeLog --- a/ChangeLog Fri Aug 15 13:24:41 2008 +0200 +++ b/ChangeLog Fri Aug 15 09:34:04 2008 -0400 @@ -1,3 +1,7 @@ 2008-08-15 Xerxes Ranby + + * acinclude.m4: Fixed LIBGCJ_JAR check. + 2008-08-15 Xerxes Ranby * Makefile.am (CACAO_MD5SUM): Update for 0.99.3. diff -r b38674a9b357 -r 87bc57c2a16e acinclude.m4 --- a/acinclude.m4 Fri Aug 15 13:24:41 2008 +0200 +++ b/acinclude.m4 Fri Aug 15 09:34:04 2008 -0400 @@ -254,14 +254,14 @@ AC_DEFUN([FIND_LIBGCJ_JAR], LIBGCJ_JAR= ]) if test -z "${LIBGCJ_JAR}"; then - AC_MSG_CHECKING(for libgcj-4.3*.jar or libgcj-4.1*.jar) - if test -e /usr/share/java/libgcj-4.3*.jar; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.3*.jar + AC_MSG_CHECKING(for libgcj-4.3.*.jar or libgcj-4.1.*.jar) + if test -e /usr/share/java/libgcj-4.3.*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.3.*.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else AM_CONDITIONAL(GCC_OLD, test x = x) - if test -e /usr/share/java/libgcj-4.1*.jar; then - LIBGCJ_JAR=/usr/share/java/libgcj-4.1*.jar + if test -e /usr/share/java/libgcj-4.1.*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.1.*.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else AC_MSG_RESULT(no) diff -r b38674a9b357 -r 87bc57c2a16e generated/sun/awt/X11/generator/sizer.32 Binary file generated/sun/awt/X11/generator/sizer.32 has changed From doko at ubuntu.com Fri Aug 15 06:51:38 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 15 Aug 2008 13:51:38 +0000 Subject: changeset in /hg/icedtea6: 2008-08-15 Matthias Klose changeset bb468b09871b in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=bb468b09871b description: 2008-08-15 Matthias Klose * acinclude.m4 (FIND_LIBGCJ_JAR): Extend check for libgcj-4.2.*.jar. diffstat: 2 files changed, 10 insertions(+), 3 deletions(-) ChangeLog | 4 ++++ acinclude.m4 | 9 ++++++--- diffs (42 lines): diff -r 87bc57c2a16e -r bb468b09871b ChangeLog --- a/ChangeLog Fri Aug 15 09:34:04 2008 -0400 +++ b/ChangeLog Fri Aug 15 15:51:05 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-15 Xerxes Ranby + + * acinclude.m4 (FIND_LIBGCJ_JAR): Extend check for libgcj-4.2.*.jar. + 2008-08-15 Xerxes Ranby * acinclude.m4: Fixed LIBGCJ_JAR check. diff -r 87bc57c2a16e -r bb468b09871b acinclude.m4 --- a/acinclude.m4 Fri Aug 15 09:34:04 2008 -0400 +++ b/acinclude.m4 Fri Aug 15 15:51:05 2008 +0200 @@ -242,7 +242,7 @@ AC_DEFUN([FIND_LIBGCJ_JAR], [ AM_CONDITIONAL(GCC_OLD, test x != x) AC_ARG_WITH([libgcj-jar], - [AS_HELP_STRING(--with-libgcj-jar,specify location of the libgcj 4.3.0 jar)], + [AS_HELP_STRING(--with-libgcj-jar,specify location of the libgcj 4.3.x jar)], [ if test -f "${withval}"; then AC_MSG_CHECKING(libgcj jar) @@ -254,13 +254,16 @@ AC_DEFUN([FIND_LIBGCJ_JAR], LIBGCJ_JAR= ]) if test -z "${LIBGCJ_JAR}"; then - AC_MSG_CHECKING(for libgcj-4.3.*.jar or libgcj-4.1.*.jar) + AC_MSG_CHECKING(for libgcj-4.3.*.jar, libgcj-4.2.*.jar or libgcj-4.1.*.jar) if test -e /usr/share/java/libgcj-4.3.*.jar; then LIBGCJ_JAR=/usr/share/java/libgcj-4.3.*.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else AM_CONDITIONAL(GCC_OLD, test x = x) - if test -e /usr/share/java/libgcj-4.1.*.jar; then + if test -e /usr/share/java/libgcj-4.2.*.jar; then + LIBGCJ_JAR=/usr/share/java/libgcj-4.2.*.jar + AC_MSG_RESULT(${LIBGCJ_JAR}) + elif test -e /usr/share/java/libgcj-4.1.*.jar; then LIBGCJ_JAR=/usr/share/java/libgcj-4.1.*.jar AC_MSG_RESULT(${LIBGCJ_JAR}) else From omajid at redhat.com Fri Aug 15 09:03:11 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 16:03:11 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset 2e3dd470d097 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=2e3dd470d097 description: 2008-08-15 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java: removed * src/java/org/classpath/icedtea/pulseaudio/StreamListener.java: removed diffstat: 2 files changed, 105 deletions(-) src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java | 58 ---------- src/java/org/classpath/icedtea/pulseaudio/StreamListener.java | 47 -------- diffs (113 lines): diff -r c7d9beb92d3d -r 2e3dd470d097 src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java --- a/src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java Fri Aug 15 10:37:25 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* StreamEvent.java - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - - -package org.classpath.icedtea.pulseaudio; - -public class StreamEvent { - - public static enum Type { - UNCONNECTED, CREATING, READY, FAILED, TERMINATED, - } - - - private Type type; - - public StreamEvent(StreamEvent.Type type) { - this.type = type; - } - - public Type getType() { - return this.type; - } - -} diff -r c7d9beb92d3d -r 2e3dd470d097 src/java/org/classpath/icedtea/pulseaudio/StreamListener.java --- a/src/java/org/classpath/icedtea/pulseaudio/StreamListener.java Fri Aug 15 10:37:25 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* StreamListener.java - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - - -package org.classpath.icedtea.pulseaudio; - - -public interface StreamListener{ - - public void update(StreamEvent e); - -} - From omajid at redhat.com Fri Aug 15 09:03:10 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 16:03:10 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-14 Omair Majid changeset 5f856aeca15a in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=5f856aeca15a description: 2008-08-14 Omair Majid * build.xml: added Stream.java to list of files to generate jni headers from * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java: initial implementation using the Stream class * src/java/org/classpath/icedtea/pulseaudio/Stream.java: new file * src/native/Makefile.am: added Stream.c to list of files to package * src/native/org_classpath_icedtea_pulseaudio_Stream.c * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java: added a few more tests diffstat: 6 files changed, 832 insertions(+), 26 deletions(-) build.xml | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 54 - src/java/org/classpath/icedtea/pulseaudio/Stream.java | 441 ++++++++++ src/native/Makefile.am | 4 src/native/org_classpath_icedtea_pulseaudio_Stream.c | 324 +++++++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 34 diffs (truncated from 959 to 500 lines): diff -r 9ed589465932 -r 5f856aeca15a build.xml --- a/build.xml Wed Aug 13 13:17:13 2008 -0400 +++ b/build.xml Thu Aug 14 14:24:17 2008 -0400 @@ -39,6 +39,7 @@ + diff -r 9ed589465932 -r 5f856aeca15a src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 13 13:17:13 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Aug 14 14:24:17 2008 -0400 @@ -54,6 +54,8 @@ public class PulseAudioClip implements C public class PulseAudioClip implements Clip { private byte[] data = null; + + // FIXME private int bufferSize = 0; // these are frame indices. so counted from 0 @@ -72,21 +74,20 @@ public class PulseAudioClip implements C private List lineListeners = null; private static final int DEFAULT_BUFFER_SIZE = 0; - - @SuppressWarnings("unused") - private long streamPointer = 0; - - private native void native_open(); - - private native void native_close(); - - private native void native_start(); - - private native void native_stop(); - - private native long native_drain(); - - private native long native_flush(); + public static final String DEFAULT_CLIP_NAME = "Clip"; + + private Stream stream; + + private Thread clipLoop = new Thread() { + @Override + public void run() { + while (true) { + + } + + } + + }; static { try { @@ -117,20 +118,19 @@ public class PulseAudioClip implements C @Override public void close() { // TODO Auto-generated method stub - native_close(); + stream.drain(); + stream.disconnect(); isOpen = false; } @Override public void drain() { - // TODO Auto-generated method stub - native_drain(); + stream.drain(); } @Override public void flush() { - // TODO Auto-generated method stub - native_flush(); + stream.flush(); } @Override @@ -234,9 +234,13 @@ public class PulseAudioClip implements C @Override public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { - // TODO Auto-generated method stub - - native_open(); + + + long contextPointer = EventLoop.getEventLoop().getContextPointer(); + int channels = 2; + int sampleRate = 22050; + stream = new Stream(contextPointer, DEFAULT_CLIP_NAME, + Stream.Format.PA_SAMPLE_U8, sampleRate, channels); isOpen = true; } @@ -294,12 +298,12 @@ public class PulseAudioClip implements C @Override public void start() { - native_start(); + stream.cork(false); } @Override public void stop() { - native_stop(); + stream.cork(true); } } diff -r 9ed589465932 -r 5f856aeca15a src/java/org/classpath/icedtea/pulseaudio/Stream.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Thu Aug 14 14:24:17 2008 -0400 @@ -0,0 +1,441 @@ +package org.classpath.icedtea.pulseaudio; + +import javax.sound.sampled.AudioFormat; + +/** + * + * This class encapsulates a pa_stream object and provides easier access to the + * native functions + * + */ +public class Stream { + + public static enum State { + UNCONNECTED, CREATING, READY, FAILED, TERMINATED, + } + + public static enum Format { + PA_SAMPLE_U8, PA_SAMPLE_ULAW, PA_SAMPLE_ALAW, PA_SAMPLE_S16LE, PA_SAMPLE_S16BE, PA_SAMPLE_FLOAT32LE, PA_SAMPLE_FLOAT32BE, PA_SAMPLE_S32LE, PA_SAMPLE_S32BE, + } + + @SuppressWarnings("unused") + private long streamPointer; + + private native void native_pa_stream_new(long contextPointer, String name, + String format, int sampleRate, int channels); + + private native int native_pa_stream_get_state(); + + private native long native_pa_stream_get_context(); + + private native int native_pa_stream_get_index(); + + private native int native_pa_stream_get_device_index(); + + private native String native_pa_stream_get_device_name(); + + private native int native_pa_stream_is_suspended(); + + private native int native_pa_stream_connect_playback(String name, + long buffer_attrPointer, int flags, long volumePointer, + long sync_streamPointer); + + private native int native_pa_stream_connect_record(String device, + long buffer_attrPointer, int flags); + + private native int native_pa_stream_disconnect(); + + private native int native_pa_stream_write(byte[] data, int offset, + int length); + + /* + * private native int native_pa_stream_peek (pa_stream *p, const void + * **data, size_t *nbytes) Read the next fragment from the buffer (for + * recording). int pa_stream_drop (pa_stream *p) Remove the current fragment + * on record streams. + * + */ + + private native int native_pa_stream_writable_size(); + + private native int native_pa_stream_readable_size(); + + private native long native_pa_stream_drain(); + + /* + * Drain a playback stream. pa_operation pa_stream_update_timing_info + * (pa_stream *p, pa_stream_success_cb_t cb, void *userdata) Request a + * timing info structure update for a stream. void + * pa_stream_set_state_callback (pa_stream *s, pa_stream_notify_cb_t cb, + * void *userdata) Set the callback function that is called whenever the + * state of the stream changes. void pa_stream_set_write_callback (pa_stream + * *p, pa_stream_request_cb_t cb, void *userdata) Set the callback function + * that is called when new data may be written to the stream. void + * pa_stream_set_read_callback (pa_stream *p, pa_stream_request_cb_t cb, + * void *userdata) Set the callback function that is called when new data is + * available from the stream. void pa_stream_set_overflow_callback + * (pa_stream *p, pa_stream_notify_cb_t cb, void *userdata) Set the callback + * function that is called when a buffer overflow happens. void + * pa_stream_set_underflow_callback (pa_stream *p, pa_stream_notify_cb_t cb, + * void *userdata) Set the callback function that is called when a buffer + * underflow happens. void pa_stream_set_started_callback (pa_stream *p, + * pa_stream_notify_cb_t cb, void *userdata) Set the callback function that + * is called when a the server starts playback after an underrun or on + * initial startup. void pa_stream_set_latency_update_callback (pa_stream + * *p, pa_stream_notify_cb_t cb, void *userdata) Set the callback function + * that is called whenever a latency information update happens. void + * pa_stream_set_moved_callback (pa_stream *p, pa_stream_notify_cb_t cb, + * void *userdata) Set the callback function that is called whenever the + * stream is moved to a different sink/source. void + * pa_stream_set_suspended_callback (pa_stream *p, pa_stream_notify_cb_t cb, + * void *userdata) Set the callback function that is called whenever the + * sink/source this stream is connected to is suspended or resumed. + * + */ + + private native long native_pa_stream_cork(int b); + + private native long native_pa_stream_flush(); + + /* + * pa_operation pa_stream_prebuf (pa_stream *s, pa_stream_success_cb_t cb, + * void *userdata) Reenable prebuffering as specified in the pa_buffer_attr + * structure. + */ + + private native long native_pa_stream_trigger(); + + /* returns an operationPointer */ + private native long native_pa_stream_set_name(String name); + + /* + * Return the current playback/recording time private native int + * native_pa_stream_get_time (pa_usec_t r_usec); + */ + + /* + * Return the total stream latency private native int + * native_pa_stream_get_latency ( pa_usec_t *r_usec, int *negative); + */ + + /* + * const pa_timing_info * pa_stream_get_timing_info (pa_stream *s) Return + * the latest raw timing data structure. const pa_sample_spec * + * pa_stream_get_sample_spec (pa_stream *s) Return a pointer to the stream's + * sample specification. const pa_channel_map * pa_stream_get_channel_map + * (pa_stream *s) Return a pointer to the stream's channel map. const + * pa_buffer_attr * pa_stream_get_buffer_attr (pa_stream *s) Return the + * per-stream server-side buffer metrics of the stream. pa_operation * + * pa_stream_set_buffer_attr (pa_stream *s, const pa_buffer_attr *attr, + * pa_stream_success_cb_t cb, void *userdata) Change the buffer metrics of + * the stream during playback. pa_operation * pa_stream_update_sample_rate + * (pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata) + * Change the stream sampling rate during playback. pa_operation * + * pa_stream_proplist_update (pa_stream *s, pa_update_mode_t mode, + * pa_proplist *p, pa_stream_success_cb_t cb, void *userdata) Update the + * property list of the sink input/source output of this stream, adding new + * entries. pa_operation * pa_stream_proplist_remove (pa_stream *s, const + * char *const keys[], pa_stream_success_cb_t cb, void *userdata) Update the + * property list of the sink input/source output of this stream, remove + * entries. int pa_stream_set_monitor_stream (pa_stream *s, uint32_t + * sink_input_idx) For record streams connected to a monitor source: monitor + * only a very specific sink input of the sink. uint32_t + * pa_stream_get_monitor_stream (pa_stream *s) Return what has been set with + * pa_stream_set_monitor_stream() ebfore. + */ + + public Stream(long contextPointer, String name, Format format, + int sampleRate, int channels) { + System.out.println("format: "+ format.toString()); + native_pa_stream_new(contextPointer, name, format.toString(), + sampleRate, channels); + } + + public Stream.State getState() { + int state = native_pa_stream_get_state(); + switch (state) { + case 0: + return State.UNCONNECTED; + case 1: + return State.CREATING; + case 2: + return State.READY; + case 3: + return State.FAILED; + case 4: + return State.TERMINATED; + default: + throw new IllegalStateException("invalid stream state"); + } + + } + + public long getContextPointer() { + return native_pa_stream_get_context(); + } + + public int getSinkInputIndex() { + return native_pa_stream_get_index(); + } + + /** + * + * @return the index of the sink or source this stream is connected to in + * the server + */ + public int getDeviceIndex() { + return native_pa_stream_get_device_index(); + } + + /** + * + * @return the name of the sink or source this stream is connected to in the + * server + */ + public String getDeviceName() { + return native_pa_stream_get_device_name(); + } + + /** + * if the sink or source this stream is connected to has been suspended. + * + * @return + */ + public boolean isSuspended() { + return (native_pa_stream_is_suspended() != 0); + } + + /** + * Connect the stream to a sink + * + * @param deviceName + */ + public void connectForPlayback(String deviceName) { + + int returnValue = native_pa_stream_connect_playback(deviceName, 0, 0, + 0, 0); + } + + /** + * Connect the stream to a source. + * + */ + void connectForRecording(String deviceName) { + int returnValue = native_pa_stream_connect_record(deviceName, 0, 0); + } + + /** + * Disconnect a stream from a source/sink. + */ + void disconnect() { + int returnValue = native_pa_stream_disconnect(); + } + + /** + * Write data to the server + * + * @param data + * @param length + * @return + */ + int write(byte[] data, int offset, int length) { + return native_pa_stream_write(data, offset, length); + } + + /** + * Read the next fragment from the buffer (for recording). + * + * + * @param data + */ + public void peek(byte[] data) { + + } + + /** + * + * Remove the current fragment on record streams. + */ + void drop() { + + } + + /** + * Return the number of bytes that may be written using write(). + * + * @return + */ + public int getWritableSize() { + return native_pa_stream_writable_size(); + } + + /** + * Return the number of bytes that may be read using peek(). + * + * @return + */ + public int getReableSize() { + return native_pa_stream_readable_size(); + } + + /** + * Drain a playback stream + * + * @return + */ + Operation drain() { + Operation drainOperation = new Operation(native_pa_stream_drain()); + return drainOperation; + } + + /** + * this function is called whenever the state changes + */ + void stateCallback() { + + } + + void writeCallback() { + + } + + void readCallback() { + + } + + void overflowCallback() { + + } + + void underflowCallback() { + + } + + /** + * callback function that is called when a the server starts playback after + * an underrun or on initial startup + */ + void playbackStartedCallback() { + + } + + /** + * called whenever a latency information update happens + */ + void latencyUpdateCallback() { + + } + + /** + * whenever the stream is moved to a different sink/source + */ + void movedCallback() { + + } + + /** + * whenever the sink/source this stream is connected to is suspended or + * resumed + */ + void suspendedCallback() { + + } + + /** + * Pause (or resume) playback of this stream temporarily. + * + * @param cork + * @return + */ + Operation cork(boolean cork) { + int yes = cork ? 1 : 0; + Operation corkOperation = new Operation(native_pa_stream_cork(yes)); + return corkOperation; + } + + /** + * Flush the playback buffer of this stream. + * + * @return + */ + Operation flush() { + Operation flushOperation = new Operation(native_pa_stream_flush()); + return flushOperation; + } + + /* + * Operation pa_stream_prebuf (pa_stream *s, pa_stream_success_cb_t cb, void + * *userdata) + * + * Reenable prebuffering as specified in the pa_buffer_attr structure. + */ + + /** + * Request immediate start of playback on this stream. + */ + Operation triggerStart() { + Operation triggerOperation = new Operation(native_pa_stream_trigger()); + return triggerOperation; + } + From omajid at redhat.com Fri Aug 15 09:03:10 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 16:03:10 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset a2034200b782 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=a2034200b782 description: 2008-08-15 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java removed all native functions. uses the stream class to work now * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeContro fixed to use the stream class * src/java/org/classpath/icedtea/pulseaudio/Stream.java: initial implementation * src/native/jni-common.c: added callJavaVoidMethod() * src/native/jni-common.h: same * src/native/org_classpath_icedtea_pulseaudio_Stream.c: implemented callbacks diffstat: 6 files changed, 486 insertions(+), 196 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 159 +--- src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 2 src/java/org/classpath/icedtea/pulseaudio/Stream.java | 322 +++++++--- src/native/jni-common.c | 23 src/native/jni-common.h | 3 src/native/org_classpath_icedtea_pulseaudio_Stream.c | 173 +++++ diffs (truncated from 1114 to 500 lines): diff -r 5f856aeca15a -r a2034200b782 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu Aug 14 14:24:17 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 10:26:12 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; @@ -62,7 +61,6 @@ public class PulseAudioSourceDataLine im private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; private String streamName = "Java Stream"; - private List streamListeners = new ArrayList(); private EventLoop eventLoop = null; @@ -80,50 +78,13 @@ public class PulseAudioSourceDataLine im private PulseAudioStreamVolumeControl volumeControl; private boolean muted; private float volume; - + private long currentFramePosition = 0; - /* - * When moving from 32bit platform to 64 bit platform, these variables - * should make life fun - * - */ - @SuppressWarnings("unused") - private long streamPointer; - - private native void native_open(long contextPointer, String streamName, - String encoding, int sampleRate, int channels, int bufferSize); - - private native void native_write(byte[] data, int offset, int length); - - private native int native_get_writable_size(); - - private native long native_flush(); - - private native void native_start(); - - private native void native_pause(); - - private native void native_resume(); - - private native long native_drain(); - - private native void native_close(); - - static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - System.out.println(library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } - - } + private Stream stream; public PulseAudioSourceDataLine(EventLoop eventLoop) { + this.eventLoop = eventLoop; this.lineListeners = new ArrayList(); this.volume = PulseAudioVolumeControl.MAX_VOLUME; @@ -338,10 +299,10 @@ public class PulseAudioSourceDataLine im for (AudioFormat myFormat : supportedFormats) { if (format.matches(myFormat)) { - native_open(eventLoop.getContextPointer(), streamName, - (String) myFormat.getProperty(PULSEAUDIO_FORMAT_KEY), - (int) format.getSampleRate(), format.getChannels(), - bufferSize); + stream = new Stream(eventLoop.getContextPointer(), streamName, + Stream.Format.valueOf((String) myFormat + .getProperty(PULSEAUDIO_FORMAT_KEY)), + (int) format.getSampleRate(), format.getChannels()); currentFormat = format; isOpen = true; } @@ -351,15 +312,15 @@ public class PulseAudioSourceDataLine im throw new IllegalArgumentException("Invalid format"); } - StreamListener openCloseListener = new StreamListener() { + Stream.StateListener openCloseListener = new Stream.StateListener() { @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.READY) { + public void update() { + if (stream.getState() == Stream.State.READY) { fireLineEvent(new LineEvent(PulseAudioSourceDataLine.this, LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); - } else if (e.getType() == StreamEvent.Type.TERMINATED - || e.getType() == StreamEvent.Type.FAILED) { + } else if (stream.getState() == Stream.State.TERMINATED + || stream.getState() == Stream.State.FAILED) { fireLineEvent((new LineEvent(PulseAudioSourceDataLine.this, LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); } @@ -367,22 +328,22 @@ public class PulseAudioSourceDataLine im }; - addStreamListener(openCloseListener); + stream.addStateListener(openCloseListener); final Semaphore semaphore = new Semaphore(0); synchronized (eventLoop.threadLock) { - this.addStreamListener(new StreamListener() { + stream.addStateListener(new Stream.StateListener() { @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.READY) { + public void update() { + if (stream.getState() == Stream.State.READY) { semaphore.release(); } } }); - native_start(); + stream.connectForPlayback(null); } try { @@ -440,7 +401,7 @@ public class PulseAudioSourceDataLine im while (remainingLength != 0) { synchronized (eventLoop.threadLock) { - availableSize = native_get_writable_size(); + availableSize = stream.getWritableSize(); if (availableSize < 0) { return sizeWritten; } @@ -448,19 +409,18 @@ public class PulseAudioSourceDataLine im availableSize = remainingLength; } /* write a little bit of the buffer */ - native_write(data, position, availableSize); + stream.write(data, position, availableSize); sizeWritten += availableSize; position += availableSize; remainingLength -= availableSize; - } } // all the data should have been played by now assert (sizeWritten == length); - currentFramePosition += (sizeWritten/getFormat().getFrameSize()); + currentFramePosition += (sizeWritten / getFormat().getFrameSize()); /* * FIXME when the stream is flushed() etc, instead of returning length * this should unblock and return the the size of data written so far @@ -470,7 +430,7 @@ public class PulseAudioSourceDataLine im public void start() { if (isPaused) { - native_resume(); + stream.cork(false); isPaused = false; } @@ -483,7 +443,7 @@ public class PulseAudioSourceDataLine im public void stop() { synchronized (eventLoop.threadLock) { - native_pause(); + stream.cork(true); } isPaused = true; @@ -497,25 +457,13 @@ public class PulseAudioSourceDataLine im this.lineListeners.remove(listener); } - private void addStreamListener(StreamListener listener) { - synchronized (streamListeners) { - this.streamListeners.add(listener); - } - } - - private void removeStreamListener(StreamListener listener) { - synchronized (streamListeners) { - this.streamListeners.remove(listener); - } - } - public boolean isOpen() { return isOpen; } public int available() { synchronized (eventLoop.threadLock) { - return native_get_writable_size(); + return stream.getWritableSize(); } }; @@ -524,26 +472,27 @@ public class PulseAudioSourceDataLine im final Semaphore semaphore = new Semaphore(0); - StreamListener closeListener = new StreamListener() { + Stream.StateListener closeListener = new Stream.StateListener() { @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.TERMINATED - || e.getType() == StreamEvent.Type.FAILED) { + public void update() { + if (stream.getState() == Stream.State.TERMINATED + || stream.getState() == Stream.State.FAILED) { semaphore.release(); } } }; - addStreamListener(closeListener); + stream.addStateListener(closeListener); synchronized (eventLoop.threadLock) { - native_close(); + stream.drain(); + stream.disconnect(); } try { semaphore.acquire(); System.out.println("stream closed"); - removeStreamListener(closeListener); + stream.removeStateListener(closeListener); } catch (InterruptedException e) { // throw new LineUnavailableException("unable to prepare // stream"); @@ -569,7 +518,7 @@ public class PulseAudioSourceDataLine im } public int getFramePosition() { - return (int)currentFramePosition; + return (int) currentFramePosition; } public float getLevel() { @@ -583,8 +532,8 @@ public class PulseAudioSourceDataLine im public long getMicrosecondPosition() { float frameRate = currentFormat.getFrameRate(); - float time = currentFramePosition/frameRate; // seconds - long microseconds = (long)(time * 1000); + float time = currentFramePosition / frameRate; // seconds + long microseconds = (long) (time * 1000); return microseconds; } @@ -640,7 +589,7 @@ public class PulseAudioSourceDataLine im Operation operation; Operation.State operationState; synchronized (eventLoop.threadLock) { - operation = new Operation(native_drain()); + operation = stream.drain(); operationState = operation.getState(); } @@ -659,7 +608,7 @@ public class PulseAudioSourceDataLine im Operation operation; Operation.State operationState; synchronized (eventLoop.threadLock) { - operation = new Operation(native_flush()); + operation = stream.flush(); operationState = operation.getState(); } // FIXME need to find a way to do a wait than a busy loop @@ -673,50 +622,18 @@ public class PulseAudioSourceDataLine im } - public void update(int status) { - synchronized (eventLoop.threadLock) { - switch (status) { - case 0: - fireStreamEvent(new StreamEvent(StreamEvent.Type.UNCONNECTED)); - break; - case 1: - fireStreamEvent(new StreamEvent(StreamEvent.Type.CREATING)); - break; - case 2: - fireStreamEvent(new StreamEvent(StreamEvent.Type.READY)); - break; - case 3: - fireStreamEvent(new StreamEvent(StreamEvent.Type.FAILED)); - break; - case 4: - fireStreamEvent(new StreamEvent(StreamEvent.Type.TERMINATED)); - break; - default: - assert ("not supposed to happen".indexOf("false") >= 0); - } - } - } - private void fireLineEvent(LineEvent e) { for (LineListener lineListener : lineListeners) { lineListener.update(e); } } - private void fireStreamEvent(StreamEvent e) { - synchronized (streamListeners) { - for (StreamListener streamListener : streamListeners) { - streamListener.update(e); - } - } - } - protected EventLoop getEventLoop() { return this.eventLoop; } - public long getStreamPointer() { - return streamPointer; + public Stream getStream() { + return stream; } } diff -r 5f856aeca15a -r a2034200b782 src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Thu Aug 14 14:24:17 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Fri Aug 15 10:26:12 2008 -0400 @@ -28,7 +28,7 @@ public class PulseAudioStreamVolumeContr protected PulseAudioStreamVolumeControl(PulseAudioSourceDataLine line) { super(line); - this.streamPointer = line.getStreamPointer(); + this.streamPointer = line.getStream().getStreamPointer(); this.eventLoop = line.getEventLoop(); this.line = line; } diff -r 5f856aeca15a -r a2034200b782 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Thu Aug 14 14:24:17 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Fri Aug 15 10:26:12 2008 -0400 @@ -1,6 +1,7 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; -import javax.sound.sampled.AudioFormat; +import java.util.LinkedList; +import java.util.List; /** * @@ -10,16 +11,64 @@ import javax.sound.sampled.AudioFormat; */ public class Stream { + public interface StateListener { + public void update(); + } + + public interface WriteListener { + public void update(); + } + + public interface ReadListener { + public void update(); + } + + public interface OverflowListener { + public void update(); + } + + public interface UnderflowListener { + public void update(); + } + + public interface PlaybackStartedListener { + public void update(); + } + + public interface LatencyUpdateListener { + public void update(); + } + + public interface MovedListener { + public void update(); + } + + public interface SuspendedListener { + public void update(); + } + public static enum State { UNCONNECTED, CREATING, READY, FAILED, TERMINATED, } public static enum Format { - PA_SAMPLE_U8, PA_SAMPLE_ULAW, PA_SAMPLE_ALAW, PA_SAMPLE_S16LE, PA_SAMPLE_S16BE, PA_SAMPLE_FLOAT32LE, PA_SAMPLE_FLOAT32BE, PA_SAMPLE_S32LE, PA_SAMPLE_S32BE, + PA_SAMPLE_U8, PA_SAMPLE_ULAW, PA_SAMPLE_ALAW, PA_SAMPLE_S16LE, PA_SAMPLE_S16BE, PA_SAMPLE_FLOAT32LE, PA_SAMPLE_FLOAT32BE, PA_SAMPLE_S32LE, PA_SAMPLE_S32BE } @SuppressWarnings("unused") private long streamPointer; + + private Format format; + + private List stateListeners; + private List writeListeners; + private List readListeners; + private List overflowListeners; + private List underflowListeners; + private List playbackStartedListeners; + private List latencyUpdateListeners; + private List movedListeners; + private List suspendedListeners; private native void native_pa_stream_new(long contextPointer, String name, String format, int sampleRate, int channels); @@ -65,32 +114,7 @@ public class Stream { /* * Drain a playback stream. pa_operation pa_stream_update_timing_info * (pa_stream *p, pa_stream_success_cb_t cb, void *userdata) Request a - * timing info structure update for a stream. void - * pa_stream_set_state_callback (pa_stream *s, pa_stream_notify_cb_t cb, - * void *userdata) Set the callback function that is called whenever the - * state of the stream changes. void pa_stream_set_write_callback (pa_stream - * *p, pa_stream_request_cb_t cb, void *userdata) Set the callback function - * that is called when new data may be written to the stream. void - * pa_stream_set_read_callback (pa_stream *p, pa_stream_request_cb_t cb, - * void *userdata) Set the callback function that is called when new data is - * available from the stream. void pa_stream_set_overflow_callback - * (pa_stream *p, pa_stream_notify_cb_t cb, void *userdata) Set the callback - * function that is called when a buffer overflow happens. void - * pa_stream_set_underflow_callback (pa_stream *p, pa_stream_notify_cb_t cb, - * void *userdata) Set the callback function that is called when a buffer - * underflow happens. void pa_stream_set_started_callback (pa_stream *p, - * pa_stream_notify_cb_t cb, void *userdata) Set the callback function that - * is called when a the server starts playback after an underrun or on - * initial startup. void pa_stream_set_latency_update_callback (pa_stream - * *p, pa_stream_notify_cb_t cb, void *userdata) Set the callback function - * that is called whenever a latency information update happens. void - * pa_stream_set_moved_callback (pa_stream *p, pa_stream_notify_cb_t cb, - * void *userdata) Set the callback function that is called whenever the - * stream is moved to a different sink/source. void - * pa_stream_set_suspended_callback (pa_stream *p, pa_stream_notify_cb_t cb, - * void *userdata) Set the callback function that is called whenever the - * sink/source this stream is connected to is suspended or resumed. - * + * timing info structure update for a stream. */ private native long native_pa_stream_cork(int b); @@ -146,9 +170,107 @@ public class Stream { public Stream(long contextPointer, String name, Format format, int sampleRate, int channels) { - System.out.println("format: "+ format.toString()); + System.out.println("format: " + format.toString()); + + stateListeners = new LinkedList(); + writeListeners = new LinkedList(); + readListeners = new LinkedList(); + overflowListeners = new LinkedList(); + underflowListeners = new LinkedList(); + playbackStartedListeners = new LinkedList(); + latencyUpdateListeners = new LinkedList(); + movedListeners = new LinkedList(); + suspendedListeners = new LinkedList(); + + this.format = format; + native_pa_stream_new(contextPointer, name, format.toString(), sampleRate, channels); + } + + public void addStateListener(StateListener listener) { + synchronized (stateListeners) { + stateListeners.add(listener); + } + } + + public void removeStateListener(StateListener listener) { + synchronized (stateListeners) { + stateListeners.remove(listener); + } + + } + + public void addWriteListener(WriteListener listener) { From omajid at redhat.com Fri Aug 15 09:03:10 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 16:03:10 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset c7d9beb92d3d in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c7d9beb92d3d description: 2008-08-15 Omair Majid * build.xml: removed javah tasks for SourceDataLine and Clip * src/native/Makefile.am: removed PulseAudio{Clip,SourceDataLine}.{c,h} as files to build * src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c: removed * src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c: removed diffstat: 4 files changed, 359 deletions(-) build.xml | 2 src/native/Makefile.am | 4 src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c | 61 -- src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c | 292 ---------- diffs (391 lines): diff -r a2034200b782 -r c7d9beb92d3d build.xml --- a/build.xml Fri Aug 15 10:26:12 2008 -0400 +++ b/build.xml Fri Aug 15 10:37:25 2008 -0400 @@ -37,8 +37,6 @@ - - diff -r a2034200b782 -r c7d9beb92d3d src/native/Makefile.am --- a/src/native/Makefile.am Fri Aug 15 10:26:12 2008 -0400 +++ b/src/native/Makefile.am Fri Aug 15 10:37:25 2008 -0400 @@ -5,14 +5,10 @@ libpulse_java_la_SOURCES = \ jni-common.h \ org_classpath_icedtea_pulseaudio_EventLoop.c \ org_classpath_icedtea_pulseaudio_EventLoop.h \ - org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c \ - org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h \ org_classpath_icedtea_pulseaudio_Operation.h \ org_classpath_icedtea_pulseaudio_Operation.c \ - org_classpath_icedtea_pulseaudio_PulseAudioClip.c \ - org_classpath_icedtea_pulseaudio_PulseAudioClip.h \ org_classpath_icedtea_pulseaudio_Stream.c \ org_classpath_icedtea_pulseaudio_Stream.h diff -r a2034200b782 -r c7d9beb92d3d src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioClip.c Fri Aug 15 10:26:12 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* org_classpath_icedtea_pulseaudio_PulseAudioClip.c - Copyright (C) 2008 Red Hat, Inc. - - This file is part of IcedTea. - - IcedTea is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, version 2. - - IcedTea is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with IcedTea; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. - - Linking this library statically or dynamically with other modules is - making a combined work based on this library. Thus, the terms and - conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent - modules, and to copy and distribute the resulting executable under - terms of your choice, provided that you also meet, for each linked - independent module, the terms and conditions of the license of that - module. An independent module is a module which is not derived from - or based on this library. If you modify this library, you may extend - this exception to your version of the library, but you are not - obligated to do so. If you do not wish to do so, delete this - exception statement from your version. - */ - -#include "org_classpath_icedtea_pulseaudio_PulseAudioClip.h" - -#include "jni-common.h" - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioClip - * Method: native_open - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioClip_native_1open -(JNIEnv* env, jobject obj) { - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioClip - * Method: native_close - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioClip_native_1close -(JNIEnv* env, jobject obj) { - -} - diff -r a2034200b782 -r c7d9beb92d3d src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c Fri Aug 15 10:26:12 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,292 +0,0 @@ -/* org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.c - Copyright (C) 2008 Red Hat, Inc. - - This file is part of IcedTea. - - IcedTea is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, version 2. - - IcedTea is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with IcedTea; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. - - Linking this library statically or dynamically with other modules is - making a combined work based on this library. Thus, the terms and - conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent - modules, and to copy and distribute the resulting executable under - terms of your choice, provided that you also meet, for each linked - independent module, the terms and conditions of the license of that - module. An independent module is a module which is not derived from - or based on this library. If you modify this library, you may extend - this exception to your version of the library, but you are not - obligated to do so. If you do not wish to do so, delete this - exception statement from your version. - */ - -#include -#include -#include -#include -#include -#include - -#include "org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine.h" -#include "jni-common.h" - -/* defined in EventLoop.c */ -extern JNIEnv* pulse_thread_env; - -static void stream_drain_complete_callback(pa_stream* stream, int success, - void* userdata) { - assert(stream); - assert(success != 0); - - pa_stream_disconnect(stream); -} - -static void stream_state_change_callback(pa_stream* stream, void* userdata) { - assert(stream); - assert(userdata); - - // printf("entering stream_state_change_callback\n"); - - java_context_t* java_context = (java_context_t*)userdata; - JNIEnv* env; - - /* needed so we can create a stream from another thread - */ - if (pa_stream_get_state(stream) == PA_STREAM_CREATING) { - env = java_context->env; - } else { - env = pulse_thread_env; - } - - jobject obj = java_context->obj; - - // printf("stream state changed to %d\n", pa_stream_get_state(stream)); - - /* Call the 'update' method in java - * to handle all java-side events - */ - jclass cls = (*env)->GetObjectClass(env, obj); - if (cls == NULL) { - printf("unable to get class of object"); - return; - } - jmethodID mid = (*env)->GetMethodID(env, cls, "update", "(I)V"); - if (mid == NULL) { - printf("unable to get callback method\n"); - return; - - } - //printf("calling update on java\n"); - (*env)->CallVoidMethod(env, obj, mid, pa_stream_get_state(stream)); - - //printf("returning form stream_state_change_callback\n"); - return; - -} -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_open - * Signature: (JLjava/lang/String;Ljava/lang/String;III)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1open -(JNIEnv* env, jobject obj, jlong contextPointer, jstring name, jstring encodingString, jint sampleRate, jint channels, jint bufferSize) { - - //TODO: Need to deal with the buffer size. Currently ignored - - // printf("entering native_open\n"); - java_context_t* java_context = malloc(sizeof(java_context)); - java_context->env = env; - java_context->obj = (*env)->NewGlobalRef(env, obj); - - pa_context* context = (pa_context*) convertJavaLongToPointer(contextPointer); - assert(context != NULL); - - pa_sample_spec sample_spec; - - const char *encoding = (*env)->GetStringUTFChars(env, encodingString, NULL); - - if (strcmp(encoding, "PA_SAMPLE_U8") == 0) { - sample_spec.format = PA_SAMPLE_U8; - } else if (strcmp(encoding, "PA_SAMPLE_ALAW") == 0) { - sample_spec.format = PA_SAMPLE_ALAW; - } else if (strcmp(encoding, "PA_SAMPLE_ULAW;") == 0) { - sample_spec.format = PA_SAMPLE_ULAW; - } else if (strcmp(encoding, "PA_SAMPLE_S16BE") == 0) { - sample_spec.format = PA_SAMPLE_S16BE; - } else if (strcmp(encoding, "PA_SAMPLE_S16LE") == 0) { - sample_spec.format = PA_SAMPLE_S16LE; - } else if (strcmp(encoding, "PA_SAMPLE_S32BE") == 0) { - sample_spec.format = PA_SAMPLE_S32BE; - } else if (strcmp(encoding, "PA_SAMPLE_S32LE") == 0) { - sample_spec.format = PA_SAMPLE_S32LE; - } else { - printf("error in open: encoding is : %s\n", encoding); - throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); - /* clean up */ - free(java_context); - (*env)->DeleteGlobalRef(env, obj); - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - return; - } - - sample_spec.rate = sampleRate; - sample_spec.channels = channels; - - printf("sample_spec.rate = %d\n", sample_spec.rate); - printf("sample_spec.channels = %d\n", sample_spec.channels); - - if ( !pa_sample_spec_valid(&sample_spec)) { - printf("error: invalid format\n"); - throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); - /* clean up */ - free(java_context); - (*env)->DeleteGlobalRef(env, obj); - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - return; - } - - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - - /* obtain the server from the caller */ - const char* stream_name = NULL; - stream_name = (*env)->GetStringUTFChars(env, name, NULL); - if (stream_name == NULL) { - return; /* OutOfMemoryError */ - } - // printf("About to create stream: %s\n", stream_name); - pa_stream* stream = pa_stream_new(context, stream_name, &sample_spec, NULL); - assert(stream != NULL); - (*env)->ReleaseStringUTFChars(env, name, stream_name); - - pa_stream_set_state_callback(stream, stream_state_change_callback, java_context); - - // printf("seeting stream pointer: %d\n", (int)stream); - setJavaPointer(env, obj, "streamPointer", stream); - // printf("returning from native_open\n"); - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_write - * Signature: ([BII)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1write -(JNIEnv* env, jobject obj, jbyteArray data, jint offset, jint data_length) { - - pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - jbyte* data_buffer = (*env)->GetByteArrayElements(env, data, NULL); - jbyte* buffer_start = data_buffer + offset; - pa_stream_write(stream, buffer_start, data_length, NULL, 0, PA_SEEK_RELATIVE); - (*env)->ReleaseByteArrayElements(env, data, data_buffer, 0); - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_get_writable_size - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1get_1writable_1size -(JNIEnv* env, jobject obj) { - - pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - assert(stream); - int available = pa_stream_writable_size(stream); - return available; -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_flush - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1flush -(JNIEnv* env, jobject obj) -{ - pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - pa_operation *o = pa_stream_flush(stream, NULL, NULL); - return convertPointerToJavaLong(o); - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_start - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1start -(JNIEnv *env, jobject obj) { - pa_stream *stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); - assert(stream); - pa_stream_connect_playback(stream, NULL, NULL, 0, NULL, NULL); - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_pause - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1pause -(JNIEnv* env, jobject obj) { - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_resume - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1resume -(JNIEnv* env, jobject obj) { - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_drain - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1drain -(JNIEnv* env, jobject obj) { - pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - assert(stream); - pa_operation *o = pa_stream_drain(stream, NULL, NULL); - return convertPointerToJavaLong(o); -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_close - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine_native_1close -(JNIEnv* env, jobject obj) { - - pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - assert(stream); - pa_operation *o = pa_stream_drain(stream, stream_drain_complete_callback, NULL); - if (o == NULL) { - pa_stream_disconnect(stream); - } else { - pa_operation_unref(o); - } - -} - From omajid at redhat.com Fri Aug 15 09:03:11 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 16:03:11 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset 3cf90f7c6931 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=3cf90f7c6931 description: 2008-08-15 Omair Majid * build.xml: added PulseAudioTargetDataLine as a javah target * src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java: spacing changes (modified to fit with eclipse's guidelines * src/java/org/classpath/icedtea/pulseaudio/ContextListener.java: same * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java: same * src/java/org/classpath/icedtea/pulseaudio/Operaiton.java: same * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java: same * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: merged * src/java/org/classpath/icedtea/pulseausio/PulseAUdioMixerInfo.java: spacing changes * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java: same * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java: same * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: merged file * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java: spacing changes * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java: same * src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeContro.java: same * src/java/org/classpath/icedtea/pulseaudio/PulseAudioRecorder.java: merged file * src/native/Makefile.am: merged file diffstat: 20 files changed, 959 insertions(+), 599 deletions(-) ChangeLog | 21 build.xml | 1 src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java | 2 src/java/org/classpath/icedtea/pulseaudio/ContextListener.java | 4 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 18 src/java/org/classpath/icedtea/pulseaudio/Operation.java | 15 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 3 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 379 +++++++--- src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java | 3 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java | 4 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 227 ----- src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java | 14 src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 35 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 278 ++++++- src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 10 src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java | 208 +++++ src/native/Makefile.am | 2 src/native/org_classpath_icedtea_pulseaudio_Operation.c | 2 src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c | 330 +++----- diffs (truncated from 2120 to 500 lines): diff -r 2e3dd470d097 -r 3cf90f7c6931 ChangeLog --- a/ChangeLog Fri Aug 15 10:51:54 2008 -0400 +++ b/ChangeLog Fri Aug 15 12:03:05 2008 -0400 @@ -1,3 +1,24 @@ 2008-08-11 Joshua Sumali + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: + modified getLine() to allow us to obtain a TargetDataLine + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: + added open(), read() and close() + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + marged the streamListeners into a single listener + + + +2008-08-13 Ioana Ivan + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: the + list of formats recognized by PulseAudio is being set here, so it can + be used by all DataLines. Also made some changes to get*LineInfo() and + isLineSupported() + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: + changed the constructor + + 2008-08-11 Joshua Sumali * configure.ac: Add check for libpulse. diff -r 2e3dd470d097 -r 3cf90f7c6931 build.xml --- a/build.xml Fri Aug 15 10:51:54 2008 -0400 +++ b/build.xml Fri Aug 15 12:03:05 2008 -0400 @@ -38,6 +38,7 @@ + diff -r 2e3dd470d097 -r 3cf90f7c6931 src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java --- a/src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java Fri Aug 15 10:51:54 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java Fri Aug 15 12:03:05 2008 -0400 @@ -33,7 +33,7 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; diff -r 2e3dd470d097 -r 3cf90f7c6931 src/java/org/classpath/icedtea/pulseaudio/ContextListener.java --- a/src/java/org/classpath/icedtea/pulseaudio/ContextListener.java Fri Aug 15 10:51:54 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/ContextListener.java Fri Aug 15 12:03:05 2008 -0400 @@ -33,12 +33,12 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; public interface ContextListener { public void update(ContextEvent e); - + } diff -r 2e3dd470d097 -r 3cf90f7c6931 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 15 10:51:54 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 15 12:03:05 2008 -0400 @@ -105,8 +105,8 @@ public class EventLoop implements Runnab static { try { String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); + + + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); System.out.println(library); System.load(library); } catch (IOException e) { @@ -154,12 +154,12 @@ public class EventLoop implements Runnab native_shutdown(); // System.out.println(this.getClass().getName() // + ": shutting down"); - + // clean up the listeners synchronized (contextListeners) { contextListeners.clear(); } - + return; } @@ -216,11 +216,11 @@ public class EventLoop implements Runnab } private void fireEvent(final ContextEvent e) { -// System.out.println(this.getClass().getName() + "firing event: " -// + e.getType().toString()); - - synchronized (contextListeners) { -// System.out.println(contextListeners.size()); + // System.out.println(this.getClass().getName() + "firing event: " + // + e.getType().toString()); + + synchronized (contextListeners) { + // System.out.println(contextListeners.size()); for (ContextListener listener : contextListeners) { listener.update(e); } diff -r 2e3dd470d097 -r 3cf90f7c6931 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Fri Aug 15 10:51:54 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Fri Aug 15 12:03:05 2008 -0400 @@ -33,7 +33,7 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; @@ -43,7 +43,8 @@ import java.io.IOException; * Encapsulates a pa_operation object * * - * This is really needed only so that we can deallocate the reference counted object + * This is really needed only so that we can deallocate the reference counted + * object * * */ @@ -100,9 +101,9 @@ public class Operation { } return false; } - + public State getState() { - assert (operationPointer != 0); + assert (operationPointer != 0); int state; synchronized (eventLoop.threadLock) { state = native_get_state(); @@ -120,11 +121,11 @@ public class Operation { } - public void waitForCompletion() throws InterruptedException { - + public void waitForCompletion() throws InterruptedException { + synchronized (eventLoop.threadLock) { eventLoop.threadLock.wait(); } - + } } diff -r 2e3dd470d097 -r 3cf90f7c6931 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Aug 15 10:51:54 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Aug 15 12:03:05 2008 -0400 @@ -234,8 +234,7 @@ public class PulseAudioClip implements C @Override public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { - - + long contextPointer = EventLoop.getEventLoop().getContextPointer(); int channels = 2; int sampleRate = 22050; diff -r 2e3dd470d097 -r 3cf90f7c6931 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 10:51:54 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 12:03:05 2008 -0400 @@ -41,7 +41,10 @@ import java.net.InetAddress; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; @@ -57,6 +60,8 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; +import javax.sound.sampled.TargetDataLine; +import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; public class PulseAudioMixer implements javax.sound.sampled.Mixer { @@ -65,16 +70,20 @@ public class PulseAudioMixer implements public EventLoop eventLoop; public Thread eventLoopThread; + private Line.Info[] sourceLineInfos; + private Line.Info[] targetLineInfos; + private static PulseAudioMixer _instance = null; private static final String DEFAULT_APP_NAME = "Java App"; + private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; private boolean isOpen = false; private List sourceLines = new ArrayList(); // private List targetLines = null; private List clips = new ArrayList(); - + // private Line.Info targetDataLineInfo = new // Line.Info(PulseAudioTargetDataLine.class); @@ -83,6 +92,13 @@ public class PulseAudioMixer implements private PulseAudioMixer() { lineListeners = new ArrayList(); sourceLines = new ArrayList(); + AudioFormat[] formats = getSupportedFormats(); + sourceLineInfos = new Line.Info[] { new DataLine.Info( + SourceDataLine.class, formats, AudioSystem.NOT_SPECIFIED, + AudioSystem.NOT_SPECIFIED) }; + targetLineInfos = new Line.Info[] { new DataLine.Info( + TargetDataLine.class, formats, AudioSystem.NOT_SPECIFIED, + AudioSystem.NOT_SPECIFIED) }; // _targetLines = new ArrayList(); } @@ -93,6 +109,173 @@ public class PulseAudioMixer implements return _instance; } + private AudioFormat[] getSupportedFormats() { + + List supportedFormats = new ArrayList(); + + Map properties; + + int[] channelSizes = new int[] { 1, 2, 5 }; + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + int sampleSize = 8; // in bits + AudioFormat PA_SAMPLE_U8 = new AudioFormat(Encoding.PCM_UNSIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size in bytes + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_U8); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_ALAW"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 8; + final AudioFormat PA_SAMPLE_ALAW = new AudioFormat(Encoding.ALAW, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_ALAW); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_ULAW"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 8; + final AudioFormat PA_SAMPLE_ULAW = new AudioFormat(Encoding.ULAW, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_ULAW); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S16BE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 16; + final AudioFormat PA_SAMPLE_S16BE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + true, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_S16BE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S16LE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 16; + final AudioFormat A_SAMPLE_S16LE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(A_SAMPLE_S16LE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S32BE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 32; + final AudioFormat PA_SAMPLE_S32BE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + true, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_S32BE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_S32LE"); + + // frameSize = sample size (in bytes, not bits) x # of channels + // ^ that's from PulseAudio sources, so it will pretty much break + // as soon as they change something + // FIXME ^ + + int sampleSize = 32; + final AudioFormat PA_SAMPLE_S32LE = new AudioFormat( + Encoding.PCM_SIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_S32LE); + } + + return supportedFormats.toArray(new AudioFormat[0]); + } + @Override public Line getLine(javax.sound.sampled.Line.Info info) throws LineUnavailableException { @@ -101,59 +284,54 @@ public class PulseAudioMixer implements throw new LineUnavailableException(); } - PulseAudioSourceDataLine sourceLine = null; - sourceLine = new PulseAudioSourceDataLine(eventLoop); - Line.Info sourceDataLineInfo = sourceLine.getLineInfo(); - - if (DataLine.class.isAssignableFrom(info.getLineClass()) - && info instanceof DataLine.Info) { - System.out - .println("DEBUG: trying to find data line with last matching format"); - - DataLine.Info dataLineInfo = (DataLine.Info) info; - // need to find the DataLine with the last valid format - AudioFormat[] wantedFormats = dataLineInfo.getFormats(); - AudioFormat[] availableFormats = ((DataLine.Info) sourceDataLineInfo) + if (!isLineSupported(info)) { + throw new IllegalArgumentException("Line unsupported: " + info); + } + + AudioFormat[] formats = null; + AudioFormat defaultFormat = null; + + if (DataLine.Info.class.isInstance(info)) { + ArrayList formatList = new ArrayList(); + AudioFormat[] requestedFormats = ((DataLine.Info) info) .getFormats(); - for (int i = wantedFormats.length - 1; i > -1; i--) { - for (AudioFormat aFormat : availableFormats) { - if (wantedFormats[i].matches(aFormat)) { - System.out.println("DEBUG: found a matching format"); - System.out.println("wanted: " + wantedFormats[i]); - System.out.println("available: " + aFormat); - sourceLine.setDefaultFormat(wantedFormats[i]); - sourceLines.add(sourceLine); - return sourceLine; + for (int i = 0; i < requestedFormats.length; i++) { + AudioFormat f1 = requestedFormats[i]; + for (AudioFormat f2 : getSupportedFormats()) { + + if (f1.matches(f2)) { + formatList.add(f2); + defaultFormat = f1; } } } - - System.out.println("DEBUG: no matches found"); - // no format matches, so return any line - throw new IllegalArgumentException("No matching format found"); - - } - - if (info.matches(sourceDataLineInfo)) { - sourceLines.add(sourceLine); - return sourceLine; - } - - // if (info.matches(_targetDataLineInfo)) { - // PulseAudioTargetDataLine targetLine = new PulseAudioTargetDataLine(); - // _targetLines.add(targetLine); - // return targetLine; - // } + formats = formatList.toArray(new AudioFormat[0]); + + } else { + formats = getSupportedFormats(); + defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, + 2, AudioSystem.NOT_SPECIFIED, false); + } + + if ((info.getLineClass() == SourceDataLine.class)) { + return new PulseAudioSourceDataLine(eventLoop, formats, + defaultFormat); + } + + if ((info.getLineClass() == TargetDataLine.class)) { + return new PulseAudioTargetDataLine(eventLoop, formats, + defaultFormat); + } PulseAudioClip clip = new PulseAudioClip(); - + if (info.matches(clip.getLineInfo())) { clips.add(clip); return clip; } - From gnu_andrew at member.fsf.org Fri Aug 15 11:15:19 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 15 Aug 2008 19:15:19 +0100 Subject: Is third party code included in langtools sources? In-Reply-To: <489889EC.3020003@sun.com> References: <489889EC.3020003@sun.com> Message-ID: <17c6771e0808151115p47cfd40ak8e6bc1e483de3d25@mail.gmail.com> On 05/08/2008, Yulia Novozhilova wrote: > Hi, > > Could you please, help me to answer a question: > Is third party code included in langtools sources? > If "no" then _why_ the THIRD_PARTY_README and ASSEMBLY_EXCEPTION files are > included into the repository? > > Actually I'm working on the Debian/Ubuntu native packaging for NetBeans > IDE. > NetBeans uses javac that is a fork of the langtools repository: > http://hg.openjdk.java.net/jdk7/tl/langtools/ > > So I have to create a debian package for it. The problem is that Debian > policy is strict about license: > I must point the license for each file in the upstream source (files from > langtools repository). Currently I can't explain why > THIRD_PARTY_README and ASSEMBLY_EXCEPTION are in the upstream. Are there > any files that need them? > > Thanks in advance, > -Yulia > > Hi, > the NetBeans javac is a fork of the javac from the OpenJDK. More > precisely, we use a fork of the langtools repository: > http://hg.openjdk.java.net/jdk7/tl/langtools/ > > The THIRD_PARTY_README and ASSEMBLY_EXCEPTION files originate in this > repository. I am not sure if we can simply delete them. Better solution, in > my opinion, would be to ask the maintainers of OpenJDK/langtools repository > whether these files could be removed from the original langtools repository > (I do not think these are needed for langtools, but IANAL). We could adopt > the change in our fork easily. > > Jan > > Yulia Novozhilova wrote: > > > Hi, > > > > As nobody responds I think it is better to use the same license and > copyright files for packaging as we've used for javaparser-6.0: > > > http://java.netbeans.org/files/documents/25/1798/nb-javaparser-6.0-src.zip > > > > nb-javaparser-6.0-src.zip doesn't contain THIRD_PARTY_README and > ASSEMBLY_EXCEPTION, so > > > > Honza, could you please, ___remove___ these files from the > > > > > http://java.netbeans.org/files/documents/25/2033/nb-javaparser-6.1-src.zip > ? > > > > Thanks in advance, > > Yulia > > > > > > Yulia Novozhilova wrote: > > > > > Hi all, > > > > > > Could someone explain me how to determine what license .java file (for > example) is under? > > > I definitely don't understand why we need THIRD_PARTY_README and > ASSEMBLY_EXCEPTION for javaparser upstream. > > > Does third party code is included there? How can I check that? > > > I've looked through the source code in > http://java.netbeans.org/files/documents/25/2033/nb-javaparser-6.1-src.zip > > > and couldn't find any copyright mentioned in THIRD_PARTY_README. > > > > > > Furthermore for NetBeans we remove all license files from the upstream, > including THIRDPARTYLICENSEREADME.txt and leave > > > one LICENSE file with GNU and CDDL licenses. > > > > > > Thanks in advance, > > > Yulia > > > > > > Dalibor Topic wrote: > > > > > > > Marek Slama wrote: > > > > > > > > > Question: What is THIRD_PARTY_README good for? > > > > > > > > > > > > > In OpenJDK, we use that file to track licenses of third party code > included in the source code, > > > > so that downstream knows what the ingredients are. See > http://hg.openjdk.java.net/jdk7/jdk7/file/3300a35a0bd5/THIRD_PARTY_README > for an example. > > > > > > > > > It is necessary to include this? > > > > > > > > > It makes the life of the packager easier, in general, since Debian, > for example, wants to know what > > > > licenses all the code in a project is under, including third party > code that's included in the sources. > > > > > > > > cheers, > > > > dalibor topic > > > > > > > > > > > > > > > > > > > > > > > > > The more obvious question for me is why NetBeans needs a fork of this in the first place. The Debian OpenJDK team have already gone through the extensive task of verifying this code legally to package OpenJDK 6, which is now in unstable and testing: http://release.debian.org/migration/testing.pl?package=openjdk-6 Having another copy in another package seems ludicrous and a duplication of existing work. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From omajid at redhat.com Fri Aug 15 13:23:20 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 20:23:20 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset 6462973e76b1 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6462973e76b1 description: 2008-08-15 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: the mixer can now return Clip as well diffstat: 1 file changed, 15 insertions(+), 11 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 26 +++++----- diffs (59 lines): diff -r 17b5e29d9a21 -r 6462973e76b1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 12:22:25 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 15:19:43 2008 -0400 @@ -69,6 +69,7 @@ public class PulseAudioMixer implements private Line.Info[] sourceLineInfos; private Line.Info[] targetLineInfos; + private Line.Info[] clipInfos; private static PulseAudioMixer _instance = null; @@ -77,18 +78,13 @@ public class PulseAudioMixer implements private boolean isOpen = false; - private List sourceLines = new ArrayList(); - // private List targetLines = null; - private List clips = new ArrayList(); - - // private Line.Info targetDataLineInfo = new - // Line.Info(PulseAudioTargetDataLine.class); - - List lineListeners = null; + private final List sourceLines = new ArrayList(); + private final List targetLines = new ArrayList(); + private final List clips = new ArrayList(); + + private final List lineListeners = new ArrayList(); private PulseAudioMixer() { - lineListeners = new ArrayList(); - sourceLines = new ArrayList(); AudioFormat[] formats = getSupportedFormats(); sourceLineInfos = new Line.Info[] { new DataLine.Info( SourceDataLine.class, formats, AudioSystem.NOT_SPECIFIED, @@ -96,7 +92,9 @@ public class PulseAudioMixer implements targetLineInfos = new Line.Info[] { new DataLine.Info( TargetDataLine.class, formats, AudioSystem.NOT_SPECIFIED, AudioSystem.NOT_SPECIFIED) }; - // _targetLines = new ArrayList(); + clipInfos = new Line.Info[] { new DataLine.Info(PulseAudioClip.class, + formats, AudioSystem.NOT_SPECIFIED, AudioSystem.NOT_SPECIFIED) }; + } synchronized public static PulseAudioMixer getInstance() { @@ -406,6 +404,12 @@ public class PulseAudioMixer implements for (int i = 0; i < targetLineInfos.length; i++) { if (info.matches(targetLineInfos[i])) { + return true; + } + } + + for (Line.Info clipInfo : clipInfos) { + if (info.matches(clipInfo)) { return true; } } From omajid at redhat.com Fri Aug 15 13:23:21 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 20:23:21 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset 543d5b1cef67 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=543d5b1cef67 description: 2008-08-15 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: fixed support for LineListeners * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java: added a test that attempts to open() a clip and fails * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java: marked testSourceLinesOpenAndClose() to be ignored for now * unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDatLineTest.java: new file. a few tests for PulseAudioTargetDataLine diffstat: 4 files changed, 122 insertions(+), 6 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 8 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 8 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 3 unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java | 109 ++++++++++ diffs (193 lines): diff -r 6462973e76b1 -r 543d5b1cef67 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 15:19:43 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 15:46:53 2008 -0400 @@ -62,7 +62,7 @@ public class PulseAudioTargetDataLine im private AudioFormat currentFormat = null; private AudioFormat defaultFormat = null; - private List lineListeners; + private List lineListeners = new LinkedList(); private List streamListeners = new ArrayList(); @@ -71,8 +71,6 @@ public class PulseAudioTargetDataLine im private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; private EventLoop eventLoop = null; - - protected ArrayList listeners; private Semaphore semaphore = new Semaphore(0); @@ -274,11 +272,11 @@ public class PulseAudioTargetDataLine im } public void addLineListener(LineListener listener) { - listeners.add(listener); + lineListeners.add(listener); } public void removeLineListener(LineListener listener) { - listeners.remove(listener); + lineListeners.remove(listener); } public boolean isOpen() { diff -r 6462973e76b1 -r 543d5b1cef67 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Fri Aug 15 15:19:43 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Fri Aug 15 15:46:53 2008 -0400 @@ -47,6 +47,7 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.UnsupportedAudioFileException; +import javax.sound.sampled.DataLine.Info; import junit.framework.JUnit4TestAdapter; @@ -113,6 +114,13 @@ public class PulseAudioClipTest { } + @Test (expected=IllegalArgumentException.class) + public void testOpenWrongUse() throws LineUnavailableException { + Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); + clip.open(); + + } + @After public void tearDown() { diff -r 6462973e76b1 -r 543d5b1cef67 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Fri Aug 15 15:19:43 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Fri Aug 15 15:46:53 2008 -0400 @@ -54,6 +54,7 @@ import org.junit.After; import org.junit.After; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; public class PulseAudioMixerTest { @@ -169,7 +170,7 @@ public class PulseAudioMixerTest { selectedMixer.close(); } - @Test + @Test @Ignore public void testSourceLinesOpenAndClose() throws LineUnavailableException { System.out.println("This test checks if source lines open and close"); selectedMixer.open(); diff -r 6462973e76b1 -r 543d5b1cef67 unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Fri Aug 15 15:46:53 2008 -0400 @@ -0,0 +1,109 @@ +package org.classpath.icedtea.pulseaudio; + +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Line; +import javax.sound.sampled.LineEvent; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.Mixer; +import javax.sound.sampled.TargetDataLine; + +import junit.framework.JUnit4TestAdapter; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class PulseAudioTargetDataLineTest { + + public static junit.framework.Test suite() { + return new JUnit4TestAdapter(PulseAudioTargetDataLineTest.class); + } + + private Mixer mixer; + private TargetDataLine targetDataLine; + + @Before + public void setUp() throws LineUnavailableException { + Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo(); + Mixer.Info wantedMixerInfo = null; + for (Mixer.Info mixerInfo : mixerInfos) { + if (mixerInfo.getName().contains("PulseAudio")) { + wantedMixerInfo = mixerInfo; + } + } + Assert.assertNotNull(wantedMixerInfo); + mixer = AudioSystem.getMixer(wantedMixerInfo); + Assert.assertNotNull(mixer); + mixer.open(); + + } + + @Test + public void testOpenClose() throws LineUnavailableException { + targetDataLine = (TargetDataLine) mixer.getLine(new Line.Info( + TargetDataLine.class)); + Assert.assertNotNull(targetDataLine); + targetDataLine.open(); + targetDataLine.close(); + } + + @Test + public void testOpenEvents() throws LineUnavailableException { + targetDataLine = (TargetDataLine) mixer.getLine(new Line.Info( + TargetDataLine.class)); + Assert.assertNotNull(targetDataLine); + + LineListener openListener = new LineListener() { + private int calledCount = 0; + + @Override + public void update(LineEvent event) { + Assert.assertEquals(LineEvent.Type.OPEN, event.getType()); + calledCount++; + Assert.assertEquals(1, calledCount); + } + + }; + + targetDataLine.addLineListener(openListener); + targetDataLine.open(); + targetDataLine.removeLineListener(openListener); + targetDataLine.close(); + + } + + @Test + public void testCloseEvents() throws LineUnavailableException { + targetDataLine = (TargetDataLine) mixer.getLine(new Line.Info( + TargetDataLine.class)); + Assert.assertNotNull(targetDataLine); + + LineListener closeListener = new LineListener() { + private int calledCount = 0; + + @Override + public void update(LineEvent event) { + Assert.assertEquals(LineEvent.Type.CLOSE, event.getType()); + calledCount++; + Assert.assertEquals(1, calledCount); + } + + }; + + + targetDataLine.open(); + targetDataLine.addLineListener(closeListener); + targetDataLine.close(); + targetDataLine.removeLineListener(closeListener); + + } + + + @After + public void tearDown() { + mixer.close(); + } + +} From iivan at town.yyz.redhat.com Fri Aug 15 13:39:40 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Fri, 15 Aug 2008 20:39:40 +0000 Subject: changeset in /hg/pulseaudio: * src/java/org/classpath/icedtea/pu... Message-ID: changeset 10aa02b5a832 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=10aa02b5a832 description: * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java: superclass for TargetDataLine and SourceDataLine; moved open and close here * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: chnaged the methods written so far to use Stream.java diffstat: 10 files changed, 181 insertions(+), 295 deletions(-) ChangeLog | 9 build.xml | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 118 ++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 105 ----- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 187 ---------- src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java | 1 src/java/org/classpath/icedtea/pulseaudio/Stream.java | 6 src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java | 20 - src/java/org/classpath/icedtea/pulseaudio/StreamListener.java | 8 src/native/org_classpath_icedtea_pulseaudio_Stream.c | 21 - diffs (truncated from 682 to 500 lines): diff -r 543d5b1cef67 -r 10aa02b5a832 ChangeLog --- a/ChangeLog Fri Aug 15 15:46:53 2008 -0400 +++ b/ChangeLog Fri Aug 15 16:39:53 2008 -0400 @@ -1,3 +1,12 @@ 2008-08-13 Ioana Ivan + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java: + superclass for TargetDataLine and SourceDataLine; moved open + and close here + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: + chnaged the methods written so far to use Stream.java + + 2008-08-13 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: diff -r 543d5b1cef67 -r 10aa02b5a832 build.xml --- a/build.xml Fri Aug 15 15:46:53 2008 -0400 +++ b/build.xml Fri Aug 15 16:39:53 2008 -0400 @@ -40,6 +40,7 @@ + diff -r 543d5b1cef67 -r 10aa02b5a832 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Aug 15 16:39:53 2008 -0400 @@ -0,0 +1,118 @@ +package org.classpath.icedtea.pulseaudio; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Semaphore; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Line; +import javax.sound.sampled.LineEvent; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; + +public abstract class PulseAudioDataLine implements Line { + + protected static final int DEFAULT_BUFFER_SIZE = 1000; + protected static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; + + protected String streamName = "Java Stream"; + + protected boolean isOpen = false; + protected AudioFormat[] supportedFormats = null; + protected AudioFormat currentFormat = null; + protected AudioFormat defaultFormat = null; + + + protected List lineListeners = new ArrayList();; + + protected EventLoop eventLoop = null; + protected Semaphore semaphore = new Semaphore(0); + protected Stream stream; + + + + public void open(AudioFormat format, int bufferSize) + throws LineUnavailableException { + if (isOpen) { + throw new IllegalStateException("Line is already open"); + } + + // ignore suggested buffer size + + for (AudioFormat myFormat : supportedFormats) { + if (format.matches(myFormat)) { + stream = new Stream(eventLoop.getContextPointer(), streamName, + Stream.Format.valueOf((String) myFormat + .getProperty(PULSEAUDIO_FORMAT_KEY)), + (int) format.getSampleRate(), format.getChannels()); + currentFormat = format; + isOpen = true; + } + } + // no matches found + if (!isOpen) { + throw new IllegalArgumentException("Invalid format"); + } + + Stream.StateListener openCloseListener = new Stream.StateListener() { + + @Override + public void update() { + if (stream.getState() == Stream.State.READY) { + fireLineEvent(new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + semaphore.release(); + } else if (stream.getState() == Stream.State.TERMINATED + || stream.getState() == Stream.State.FAILED) { + fireLineEvent((new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); + semaphore.release(); + } + } + + }; + + stream.addStateListener(openCloseListener); + + synchronized (eventLoop.threadLock) { + + connectLine(); + } + + try { + semaphore.acquire(); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); + } + } + + public void close() { + assert (isOpen); + + synchronized (eventLoop.threadLock) { + stream.drain(); + stream.disconnect(); + } + + try { + semaphore.acquire(); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); + } + + } + + private void fireLineEvent(LineEvent e) { + for (LineListener lineListener : lineListeners) { + lineListener.update(e); + } + } + + abstract void connectLine(); + + + +} diff -r 543d5b1cef67 -r 10aa02b5a832 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 15:46:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 16:39:53 2008 -0400 @@ -38,37 +38,23 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; -import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; -public class PulseAudioSourceDataLine implements SourceDataLine { - - private static final int DEFAULT_BUFFER_SIZE = 1000; - private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; - - private String streamName = "Java Stream"; - - private EventLoop eventLoop = null; - - private boolean isOpen = false; +public class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine { + + private boolean isPaused = false; - private AudioFormat[] supportedFormats = null; - private AudioFormat currentFormat = null; - private AudioFormat defaultFormat = null; - - private List lineListeners; + private Control[] controls = null; private PulseAudioStreamMuteControl muteControl; @@ -76,10 +62,9 @@ public class PulseAudioSourceDataLine im private boolean muted; private float volume; - private Semaphore semaphore = new Semaphore(0); private long currentFramePosition = 0; - private Stream stream; + public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { @@ -112,65 +97,18 @@ public class PulseAudioSourceDataLine im public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { - if (isOpen) { - throw new IllegalStateException("Line is already open"); - } - - // ignore suggested buffer size - - for (AudioFormat myFormat : supportedFormats) { - if (format.matches(myFormat)) { - stream = new Stream(eventLoop.getContextPointer(), streamName, - Stream.Format.valueOf((String) myFormat - .getProperty(PULSEAUDIO_FORMAT_KEY)), - (int) format.getSampleRate(), format.getChannels()); - currentFormat = format; - isOpen = true; - } - } - // no matches found - if (!isOpen) { - throw new IllegalArgumentException("Invalid format"); - } - - Stream.StateListener openCloseListener = new Stream.StateListener() { - - @Override - public void update() { - if (stream.getState() == Stream.State.READY) { - fireLineEvent(new LineEvent(PulseAudioSourceDataLine.this, - LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); - semaphore.release(); - } else if (stream.getState() == Stream.State.TERMINATED - || stream.getState() == Stream.State.FAILED) { - fireLineEvent((new LineEvent(PulseAudioSourceDataLine.this, - LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); - semaphore.release(); - } - } - - }; - - stream.addStateListener(openCloseListener); - - synchronized (eventLoop.threadLock) { - - stream.connectForPlayback(null); - } - - try { - semaphore.acquire(); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - + + super.open(format, bufferSize); controls = new Control[2]; volumeControl = new PulseAudioStreamVolumeControl(this); controls[0] = volumeControl; muteControl = new PulseAudioStreamMuteControl(this); controls[1] = muteControl; + } + + protected void connectLine() { + stream.connectForPlayback(null); } public void open(AudioFormat format) throws LineUnavailableException { @@ -279,22 +217,6 @@ public class PulseAudioSourceDataLine im } }; - public void close() { - assert (isOpen); - - synchronized (eventLoop.threadLock) { - stream.drain(); - stream.disconnect(); - } - - try { - semaphore.acquire(); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - - } public int getBufferSize() { // FIXME! @@ -418,11 +340,6 @@ public class PulseAudioSourceDataLine im } - private void fireLineEvent(LineEvent e) { - for (LineListener lineListener : lineListeners) { - lineListener.update(e); - } - } protected EventLoop getEventLoop() { return this.eventLoop; diff -r 543d5b1cef67 -r 10aa02b5a832 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 15:46:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 16:39:53 2008 -0400 @@ -37,42 +37,20 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.File; + import java.io.IOException; import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Semaphore; - import javax.sound.sampled.*; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; -import javax.sound.sampled.Port.Info; - -public class PulseAudioTargetDataLine implements TargetDataLine { + + +public class PulseAudioTargetDataLine extends PulseAudioDataLine implements TargetDataLine { protected boolean isOpen = false; protected boolean isPaused = false; - - private AudioFormat[] supportedFormats = null; - private AudioFormat currentFormat = null; - private AudioFormat defaultFormat = null; - - private List lineListeners = new LinkedList(); - - private List streamListeners = new ArrayList(); - - private String streamName = "Java Stream"; - private static final int DEFAULT_BUFFER_SIZE = 1000; - private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; - - private EventLoop eventLoop = null; - - private Semaphore semaphore = new Semaphore(0); @SuppressWarnings("unused") private long streamPointer; @@ -88,16 +66,9 @@ public class PulseAudioTargetDataLine im } } - private native void native_open(long contextPointer, String streamName, - String encoding, int sampleRate, int channels, int bufferSize); - - private native void native_start(); private native int native_get_readable_size(); - private native void native_close(); - - private native int native_read(byte[] array, int remaininglength, int position); public PulseAudioTargetDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { supportedFormats = formats; @@ -108,64 +79,8 @@ public class PulseAudioTargetDataLine im } - public void open(AudioFormat format, int bufferSize) - throws LineUnavailableException { - System.out.println("OPEn CALLED"); - if (isOpen) { - throw new IllegalStateException("Line is already open"); - } - - // ignore suggested buffer size - - for (AudioFormat myFormat : supportedFormats) { - if (format.matches(myFormat)) { - native_open(eventLoop.getContextPointer(), streamName, - (String) myFormat.getProperty(PULSEAUDIO_FORMAT_KEY), - (int) format.getSampleRate(), format.getChannels(), - bufferSize); - currentFormat = format; - isOpen = true; - } - } - // no matches found - if (!isOpen) { - throw new IllegalArgumentException("Invalid format"); - } - - StreamListener openCloseListener = new StreamListener() { - - @Override - public void update(StreamEvent e) { - if (e.getType() == StreamEvent.Type.READY) { - fireLineEvent(new LineEvent(PulseAudioTargetDataLine.this, - LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); - System.out.println("IN HERE"); - semaphore.release(); - } else if (e.getType() == StreamEvent.Type.TERMINATED - || e.getType() == StreamEvent.Type.FAILED) { - fireLineEvent((new LineEvent(PulseAudioTargetDataLine.this, - LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); - semaphore.release(); - } - } - - }; - - addStreamListener(openCloseListener); - - - - synchronized (eventLoop.threadLock) { - - native_start(); - } - - try { - semaphore.acquire(); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } + protected void connectLine() { + stream.connectForRecording(null); } public void open(AudioFormat format) throws LineUnavailableException { @@ -203,19 +118,16 @@ public class PulseAudioTargetDataLine im int position = offset; int remainingLength = length; - int availableSize; - int sizeRead = 0; while (remainingLength != 0) { synchronized (eventLoop.threadLock) { - availableSize = available(); - int toRead = native_read(data, remainingLength, position); - - sizeRead += toRead; - position += toRead; - remainingLength -= toRead; + int bytesRead = stream.read(data, remainingLength, position); + + sizeRead += bytesRead; + position += bytesRead; + remainingLength -= bytesRead; } @@ -289,25 +201,6 @@ public class PulseAudioTargetDataLine im } } - public void close() { - assert (isOpen); - - - synchronized (eventLoop.threadLock) { - native_close(); - } - - try { - semaphore.acquire(); - System.out.println("stream closed"); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - - } - - private native void closeStream(); public int getBufferSize() { // TODO Auto-generated method stub @@ -365,57 +258,11 @@ public class PulseAudioTargetDataLine im public boolean isControlSupported(Type control) { From iivan at town.yyz.redhat.com Fri Aug 15 13:56:54 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Fri, 15 Aug 2008 20:56:54 +0000 Subject: changeset in /hg/pulseaudio: Moved more methods to DataLine Message-ID: changeset 3f9cc08fdbc0 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=3f9cc08fdbc0 description: Moved more methods to DataLine diffstat: 4 files changed, 55 insertions(+), 106 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 54 +++++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 50 --------- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 55 ---------- diffs (268 lines): diff -r 10aa02b5a832 -r 3f9cc08fdbc0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Aug 15 16:39:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Aug 15 16:57:00 2008 -0400 @@ -10,6 +10,7 @@ import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.AudioFormat.Encoding; public abstract class PulseAudioDataLine implements Line { @@ -19,6 +20,7 @@ public abstract class PulseAudioDataLine protected String streamName = "Java Stream"; protected boolean isOpen = false; + private boolean isPaused = false; protected AudioFormat[] supportedFormats = null; protected AudioFormat currentFormat = null; protected AudioFormat defaultFormat = null; @@ -88,11 +90,27 @@ public abstract class PulseAudioDataLine } } + public void open(AudioFormat format) throws LineUnavailableException { + open(format, DEFAULT_BUFFER_SIZE); + + } + + public void open() throws LineUnavailableException { + // pick a random format + if (defaultFormat == null) { + defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 44100, 8, 2, + 2, AudioSystem.NOT_SPECIFIED, false); + } + + open(defaultFormat, DEFAULT_BUFFER_SIZE); + } + + public void close() { assert (isOpen); synchronized (eventLoop.threadLock) { - stream.drain(); + //drain(); stream.disconnect(); } @@ -105,6 +123,35 @@ public abstract class PulseAudioDataLine } + public void start() { + if (isPaused) { + stream.cork(false); + isPaused = false; + } + + /* + * for(LineListener l :listeners) { l.update(new LineEvent(this, + * LineEvent.Type.START, 0)); } + */ + + } + + public void stop() { + synchronized (eventLoop.threadLock) { + stream.cork(true); + } + isPaused = true; + + } + + public void addLineListener(LineListener listener) { + this.lineListeners.add(listener); + } + + public void removeLineListener(LineListener listener) { + this.lineListeners.remove(listener); + } + private void fireLineEvent(LineEvent e) { for (LineListener lineListener : lineListeners) { lineListener.update(e); @@ -112,6 +159,11 @@ public abstract class PulseAudioDataLine } abstract void connectLine(); + abstract void drain(); + + public boolean isOpen() { + return isOpen; + } diff -r 10aa02b5a832 -r 3f9cc08fdbc0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 16:39:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 16:57:00 2008 -0400 @@ -304,7 +304,7 @@ public class PulseAudioMixer implements } else { formats = getSupportedFormats(); - defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, + defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 44100, 8, 2, 2, AudioSystem.NOT_SPECIFIED, false); } diff -r 10aa02b5a832 -r 3f9cc08fdbc0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 16:39:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 16:57:00 2008 -0400 @@ -52,10 +52,6 @@ public class PulseAudioSourceDataLine ex public class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine { - private boolean isPaused = false; - - - private Control[] controls = null; private PulseAudioStreamMuteControl muteControl; private PulseAudioStreamVolumeControl volumeControl; @@ -111,20 +107,6 @@ public class PulseAudioSourceDataLine ex stream.connectForPlayback(null); } - public void open(AudioFormat format) throws LineUnavailableException { - open(format, DEFAULT_BUFFER_SIZE); - - } - - public void open() throws LineUnavailableException { - // pick a random format - if (defaultFormat == null) { - defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, - 2, AudioSystem.NOT_SPECIFIED, false); - } - - open(defaultFormat, DEFAULT_BUFFER_SIZE); - } @Override public int write(byte[] data, int offset, int length) { @@ -178,38 +160,6 @@ public class PulseAudioSourceDataLine ex return sizeWritten; } - public void start() { - if (isPaused) { - stream.cork(false); - isPaused = false; - } - - /* - * for(LineListener l :listeners) { l.update(new LineEvent(this, - * LineEvent.Type.START, 0)); } - */ - - } - - public void stop() { - synchronized (eventLoop.threadLock) { - stream.cork(true); - } - isPaused = true; - - } - - public void addLineListener(LineListener listener) { - this.lineListeners.add(listener); - } - - public void removeLineListener(LineListener listener) { - this.lineListeners.remove(listener); - } - - public boolean isOpen() { - return isOpen; - } public int available() { synchronized (eventLoop.threadLock) { diff -r 10aa02b5a832 -r 3f9cc08fdbc0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 16:39:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 16:57:00 2008 -0400 @@ -41,7 +41,6 @@ import java.io.IOException; import java.io.IOException; import java.util.ArrayList; import javax.sound.sampled.*; -import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; @@ -83,21 +82,6 @@ public class PulseAudioTargetDataLine ex stream.connectForRecording(null); } - public void open(AudioFormat format) throws LineUnavailableException { - open(format, DEFAULT_BUFFER_SIZE); - - } - - public void open() throws LineUnavailableException { - // pick a random format - if (defaultFormat == null) { - defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, - 2, AudioSystem.NOT_SPECIFIED, false); - } - - open(defaultFormat, DEFAULT_BUFFER_SIZE); - } - @Override public int read(byte[] data, int offset, int length) { @@ -144,32 +128,7 @@ public class PulseAudioTargetDataLine ex } - private native void readFromStream(byte[] b, int off, int len); - - public void start() { - if (isPaused) { - resumeStream(); - isPaused = false; - } /*else { - startStream(); - }*/ - - /*for (LineListener l : listeners) { - l.update(new LineEvent(this, LineEvent.Type.START, 0)); - }*/ - } - - public void stop() { - //pauseStream(); - isPaused = true; - - } - - private native void startStream(); - - private native void pauseStream(); - - private native void resumeStream(); + @Override public void drain() { @@ -181,18 +140,6 @@ public class PulseAudioTargetDataLine ex public void flush() { // TODO Auto-generated method stub - } - - public void addLineListener(LineListener listener) { - lineListeners.add(listener); - } - - public void removeLineListener(LineListener listener) { - lineListeners.remove(listener); - } - - public boolean isOpen() { - return isOpen; } public int available() { From omajid at redhat.com Fri Aug 15 14:11:06 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 21:11:06 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset dc7a6d1c130e in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=dc7a6d1c130e description: 2008-08-15 Omair Majid merged files diffstat: 11 files changed, 234 insertions(+), 399 deletions(-) ChangeLog | 9 build.xml | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 170 +++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 153 ------ src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 242 ---------- src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java | 1 src/java/org/classpath/icedtea/pulseaudio/Stream.java | 6 src/java/org/classpath/icedtea/pulseaudio/StreamEvent.java | 20 src/java/org/classpath/icedtea/pulseaudio/StreamListener.java | 8 src/native/org_classpath_icedtea_pulseaudio_Stream.c | 21 diffs (truncated from 868 to 500 lines): diff -r d3ed87d80d16 -r dc7a6d1c130e ChangeLog --- a/ChangeLog Fri Aug 15 17:09:53 2008 -0400 +++ b/ChangeLog Fri Aug 15 17:11:01 2008 -0400 @@ -1,3 +1,12 @@ 2008-08-13 Ioana Ivan + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java: + superclass for TargetDataLine and SourceDataLine; moved open + and close here + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java: + chnaged the methods written so far to use Stream.java + + 2008-08-13 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java: diff -r d3ed87d80d16 -r dc7a6d1c130e build.xml --- a/build.xml Fri Aug 15 17:09:53 2008 -0400 +++ b/build.xml Fri Aug 15 17:11:01 2008 -0400 @@ -40,6 +40,7 @@ + diff -r d3ed87d80d16 -r dc7a6d1c130e src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Aug 15 17:11:01 2008 -0400 @@ -0,0 +1,170 @@ +package org.classpath.icedtea.pulseaudio; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Semaphore; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Line; +import javax.sound.sampled.LineEvent; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.AudioFormat.Encoding; + +public abstract class PulseAudioDataLine implements Line { + + protected static final int DEFAULT_BUFFER_SIZE = 1000; + protected static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; + + protected String streamName = "Java Stream"; + + protected boolean isOpen = false; + private boolean isPaused = false; + protected AudioFormat[] supportedFormats = null; + protected AudioFormat currentFormat = null; + protected AudioFormat defaultFormat = null; + + + protected List lineListeners = new ArrayList();; + + protected EventLoop eventLoop = null; + protected Semaphore semaphore = new Semaphore(0); + protected Stream stream; + + + + public void open(AudioFormat format, int bufferSize) + throws LineUnavailableException { + if (isOpen) { + throw new IllegalStateException("Line is already open"); + } + + // ignore suggested buffer size + + for (AudioFormat myFormat : supportedFormats) { + if (format.matches(myFormat)) { + stream = new Stream(eventLoop.getContextPointer(), streamName, + Stream.Format.valueOf((String) myFormat + .getProperty(PULSEAUDIO_FORMAT_KEY)), + (int) format.getSampleRate(), format.getChannels()); + currentFormat = format; + isOpen = true; + } + } + // no matches found + if (!isOpen) { + throw new IllegalArgumentException("Invalid format"); + } + + Stream.StateListener openCloseListener = new Stream.StateListener() { + + @Override + public void update() { + if (stream.getState() == Stream.State.READY) { + fireLineEvent(new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + semaphore.release(); + } else if (stream.getState() == Stream.State.TERMINATED + || stream.getState() == Stream.State.FAILED) { + fireLineEvent((new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); + semaphore.release(); + } + } + + }; + + stream.addStateListener(openCloseListener); + + synchronized (eventLoop.threadLock) { + + connectLine(); + } + + try { + semaphore.acquire(); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); + } + } + + public void open(AudioFormat format) throws LineUnavailableException { + open(format, DEFAULT_BUFFER_SIZE); + + } + + public void open() throws LineUnavailableException { + // pick a random format + if (defaultFormat == null) { + defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 44100, 8, 2, + 2, AudioSystem.NOT_SPECIFIED, false); + } + + open(defaultFormat, DEFAULT_BUFFER_SIZE); + } + + + public void close() { + assert (isOpen); + + synchronized (eventLoop.threadLock) { + //drain(); + stream.disconnect(); + } + + try { + semaphore.acquire(); + } catch (InterruptedException e) { + // throw new LineUnavailableException("unable to prepare + // stream"); + } + + } + + public void start() { + if (isPaused) { + stream.cork(false); + isPaused = false; + } + + /* + * for(LineListener l :listeners) { l.update(new LineEvent(this, + * LineEvent.Type.START, 0)); } + */ + + } + + public void stop() { + synchronized (eventLoop.threadLock) { + stream.cork(true); + } + isPaused = true; + + } + + public void addLineListener(LineListener listener) { + this.lineListeners.add(listener); + } + + public void removeLineListener(LineListener listener) { + this.lineListeners.remove(listener); + } + + private void fireLineEvent(LineEvent e) { + for (LineListener lineListener : lineListeners) { + lineListener.update(e); + } + } + + abstract void connectLine(); + abstract void drain(); + + public boolean isOpen() { + return isOpen; + } + + + +} diff -r d3ed87d80d16 -r dc7a6d1c130e src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 17:09:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Aug 15 17:11:01 2008 -0400 @@ -304,7 +304,7 @@ public class PulseAudioMixer implements } else { formats = getSupportedFormats(); - defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, + defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 44100, 8, 2, 2, AudioSystem.NOT_SPECIFIED, false); } diff -r d3ed87d80d16 -r dc7a6d1c130e src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 17:09:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Aug 15 17:11:01 2008 -0400 @@ -38,37 +38,19 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; -import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; -public class PulseAudioSourceDataLine implements SourceDataLine { - - private static final int DEFAULT_BUFFER_SIZE = 1000; - private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; - - private String streamName = "Java Stream"; - - private EventLoop eventLoop = null; - - private boolean isOpen = false; - private boolean isPaused = false; - - private AudioFormat[] supportedFormats = null; - private AudioFormat currentFormat = null; - private AudioFormat defaultFormat = null; - - private List lineListeners; +public class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine { + private Control[] controls = null; private PulseAudioStreamMuteControl muteControl; @@ -76,10 +58,9 @@ public class PulseAudioSourceDataLine im private boolean muted; private float volume; - private Semaphore semaphore = new Semaphore(0); private long currentFramePosition = 0; - private Stream stream; + public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { @@ -112,59 +93,8 @@ public class PulseAudioSourceDataLine im public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { - if (isOpen) { - throw new IllegalStateException("Line is already open"); - } - - // ignore suggested buffer size - - for (AudioFormat myFormat : supportedFormats) { - if (format.matches(myFormat)) { - stream = new Stream(eventLoop.getContextPointer(), streamName, - Stream.Format.valueOf((String) myFormat - .getProperty(PULSEAUDIO_FORMAT_KEY)), - (int) format.getSampleRate(), format.getChannels()); - currentFormat = format; - isOpen = true; - } - } - // no matches found - if (!isOpen) { - throw new IllegalArgumentException("Invalid format"); - } - - Stream.StateListener openCloseListener = new Stream.StateListener() { - - @Override - public void update() { - if (stream.getState() == Stream.State.READY) { - fireLineEvent(new LineEvent(PulseAudioSourceDataLine.this, - LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); - semaphore.release(); - } else if (stream.getState() == Stream.State.TERMINATED - || stream.getState() == Stream.State.FAILED) { - fireLineEvent((new LineEvent(PulseAudioSourceDataLine.this, - LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); - semaphore.release(); - } - } - - }; - - stream.addStateListener(openCloseListener); - - synchronized (eventLoop.threadLock) { - - stream.connectForPlayback(null); - } - - try { - semaphore.acquire(); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - + + super.open(format, bufferSize); controls = new Control[2]; volumeControl = new PulseAudioStreamVolumeControl(this); controls[0] = volumeControl; @@ -172,21 +102,11 @@ public class PulseAudioSourceDataLine im controls[1] = muteControl; } - - public void open(AudioFormat format) throws LineUnavailableException { - open(format, DEFAULT_BUFFER_SIZE); - - } - - public void open() throws LineUnavailableException { - // pick a random format - if (defaultFormat == null) { - defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 22050, 8, 2, - 2, AudioSystem.NOT_SPECIFIED, false); - } - - open(defaultFormat, DEFAULT_BUFFER_SIZE); - } + + protected void connectLine() { + stream.connectForPlayback(null); + } + @Override public int write(byte[] data, int offset, int length) { @@ -240,38 +160,6 @@ public class PulseAudioSourceDataLine im return sizeWritten; } - public void start() { - if (isPaused) { - stream.cork(false); - isPaused = false; - } - - /* - * for(LineListener l :listeners) { l.update(new LineEvent(this, - * LineEvent.Type.START, 0)); } - */ - - } - - public void stop() { - synchronized (eventLoop.threadLock) { - stream.cork(true); - } - isPaused = true; - - } - - public void addLineListener(LineListener listener) { - this.lineListeners.add(listener); - } - - public void removeLineListener(LineListener listener) { - this.lineListeners.remove(listener); - } - - public boolean isOpen() { - return isOpen; - } public int available() { synchronized (eventLoop.threadLock) { @@ -279,22 +167,6 @@ public class PulseAudioSourceDataLine im } }; - public void close() { - assert (isOpen); - - synchronized (eventLoop.threadLock) { - stream.drain(); - stream.disconnect(); - } - - try { - semaphore.acquire(); - } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); - } - - } public int getBufferSize() { // FIXME! @@ -418,11 +290,6 @@ public class PulseAudioSourceDataLine im } - private void fireLineEvent(LineEvent e) { - for (LineListener lineListener : lineListeners) { - lineListener.update(e); - } - } protected EventLoop getEventLoop() { return this.eventLoop; diff -r d3ed87d80d16 -r dc7a6d1c130e src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 17:09:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 17:11:01 2008 -0400 @@ -37,42 +37,19 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.File; + import java.io.IOException; import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Semaphore; - import javax.sound.sampled.*; -import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; -import javax.sound.sampled.Port.Info; - -public class PulseAudioTargetDataLine implements TargetDataLine { + + +public class PulseAudioTargetDataLine extends PulseAudioDataLine implements TargetDataLine { protected boolean isOpen = false; protected boolean isPaused = false; - - private AudioFormat[] supportedFormats = null; - private AudioFormat currentFormat = null; - private AudioFormat defaultFormat = null; - - private List lineListeners = new LinkedList(); - - private List streamListeners = new ArrayList(); - - private String streamName = "Java Stream"; - private static final int DEFAULT_BUFFER_SIZE = 1000; - private static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; - - private EventLoop eventLoop = null; - - private Semaphore semaphore = new Semaphore(0); @SuppressWarnings("unused") private long streamPointer; @@ -88,16 +65,9 @@ public class PulseAudioTargetDataLine im } } - private native void native_open(long contextPointer, String streamName, - String encoding, int sampleRate, int channels, int bufferSize); - - private native void native_start(); private native int native_get_readable_size(); - private native void native_close(); - - private native int native_read(byte[] array, int remaininglength, int position); public PulseAudioTargetDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { supportedFormats = formats; @@ -108,79 +78,8 @@ public class PulseAudioTargetDataLine im From omajid at redhat.com Fri Aug 15 14:11:05 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 15 Aug 2008 21:11:05 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-15 Omair Majid changeset d3ed87d80d16 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=d3ed87d80d16 description: 2008-08-15 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Stream.java: implemented drop() and peek() * src/native/org_classpath_icedtea_pulseaudio_Stream.c: added a prototype for stream_started_callback(), more cleanup on an error in new(). implmeneted peek() and drop() diffstat: 2 files changed, 71 insertions(+), 18 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Stream.java | 26 ++----- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 63 ++++++++++++++++- diffs (179 lines): diff -r 543d5b1cef67 -r d3ed87d80d16 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Fri Aug 15 15:46:53 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Fri Aug 15 17:09:53 2008 -0400 @@ -97,13 +97,9 @@ public class Stream { private native int native_pa_stream_write(byte[] data, int offset, int length); - /* - * private native int native_pa_stream_peek (pa_stream *p, const void - * **data, size_t *nbytes) Read the next fragment from the buffer (for - * recording). int pa_stream_drop (pa_stream *p) Remove the current fragment - * on record streams. - * - */ + private native byte[] native_pa_stream_peek(); + + private native int native_pa_stream_drop(); private native int native_pa_stream_writable_size(); @@ -336,7 +332,7 @@ public class Stream { int returnValue = native_pa_stream_connect_playback(deviceName, 0, 0, 0, 0); - assert(returnValue == 0); + assert (returnValue == 0); } /** @@ -345,7 +341,7 @@ public class Stream { */ public void connectForRecording(String deviceName) { int returnValue = native_pa_stream_connect_record(deviceName, 0, 0); - assert(returnValue == 0); + assert (returnValue == 0); } /** @@ -353,8 +349,8 @@ public class Stream { */ public void disconnect() { int returnValue = native_pa_stream_disconnect(); - assert(returnValue == 0); - } + assert (returnValue == 0); + } /** * Write data to the server @@ -373,8 +369,8 @@ public class Stream { * * @param data */ - public void peek(byte[] data) { - + public byte[] peek() { + return native_pa_stream_peek(); } /** @@ -382,7 +378,7 @@ public class Stream { * Remove the current fragment on record streams. */ public void drop() { - + native_pa_stream_drop(); } /** @@ -467,7 +463,7 @@ public class Stream { */ @SuppressWarnings("unused") private void playbackStartedCallback() { - assert(false); + assert (false); synchronized (playbackStartedListeners) { for (PlaybackStartedListener listener : playbackStartedListeners) { listener.update(); diff -r 543d5b1cef67 -r d3ed87d80d16 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Fri Aug 15 15:46:53 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Fri Aug 15 17:09:53 2008 -0400 @@ -96,9 +96,23 @@ static void stream_underflow_callback(pa } // requires pulseaudio 0.9.11 :( -//static void stream_started_callback(pa_stream *p, void *userdata) { -// printf("stream_started_callback called\n"); -//} +/* + static void stream_started_callback(pa_stream *p, void *userdata) { + printf("stream_started_callback called\n"); + java_context* context = userdata; + assert(stream); + assert(context); + assert(context->env); + assert(context->obj); + + if (pa_stream_get_state(stream) == PA_STREAM_CREATING) { + callJavaVoidMethod(context->env, context->obj, "playbackStartedCallback"); + } else { + callJavaVoidMethod(pulse_thread_env, context->obj, "playbackStartedCallback"); + } + + } + */ static void stream_latency_update_callback(pa_stream *stream, void *userdata) { printf("stream_latency_update_callback called\n"); @@ -160,6 +174,7 @@ JNIEXPORT void JNICALL Java_org_classpat (JNIEnv* env, jobject obj, jlong contextPointer, jstring nameString, jstring encodingString, jint sampleRate, jint channels) { java_context* j_context = malloc(sizeof(java_context)); + assert(j_context); j_context->env = env; j_context->obj = (*env)->NewGlobalRef(env, obj); @@ -169,6 +184,8 @@ JNIEXPORT void JNICALL Java_org_classpat if (nameString) { name = (*env)->GetStringUTFChars(env,nameString, NULL); if (name == NULL) { + (*env)->DeleteGlobalRef(env, obj); + free(j_context); return; // oome thrown } } @@ -199,6 +216,8 @@ JNIEXPORT void JNICALL Java_org_classpat throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); /* clean up */ (*env)->ReleaseStringUTFChars(env, encodingString, encoding); + free(j_context); + (*env)->DeleteGlobalRef(env, obj); return; } @@ -400,6 +419,44 @@ JNIEXPORT jint JNICALL Java_org_classpat /* * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_peek + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1peek +(JNIEnv* env, jobject obj) { + + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + const void* startLocation; + size_t count; + + if ( pa_stream_peek(stream, &startLocation, &count) < 0 ) { + return NULL; + } + + jsize length = count; + jbyteArray data = (*env)->NewByteArray(env, length); + + if ( data == NULL) { + return NULL; // oome thrown + } + + (*env)->SetByteArrayRegion(env, data, 0, count, startLocation); + return data; +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_drop + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1drop +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); + return pa_stream_drop(stream); +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_writable_size * Signature: ()I */ From bugzilla-daemon at icedtea.classpath.org Sat Aug 16 00:55:53 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 16 Aug 2008 07:55:53 +0000 Subject: [Bug 185] New: Application SweetHome 3D crashes when i want to print Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=185 Summary: Application SweetHome 3D crashes when i want to print Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P1 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: davalv at alice.it # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x072cc752, pid=17044, tid=58227600 # # Java VM: OpenJDK Client VM (1.6.0-b09 mixed mode linux-x86) # Problematic frame: # C [libGL.so.1+0x34752] # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x086cfc00): JavaThread "J3D-Renderer-1" [_thread_in_native, id=17068, stack(0x03737000,0x03788000)] siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000010 Registers: EAX=0x00000000, EBX=0x0730808c, ECX=0x05d1245c, EDX=0x08bb2568 ESP=0x03786c5c, EBP=0x03786c68, ESI=0x089da1c8, EDI=0x089f3af8 EIP=0x072cc752, CR2=0x00000010, EFLAGS=0x00210216 Top of Stack: (sp=0x03786c5c) 0x03786c5c: 0730808c 089da1c8 089f3af8 03786cd8 0x03786c6c: 072b12c5 08bb2568 00000000 00000000 0x03786c7c: 072daa04 03786cb0 9b9b0930 00000000 0x03786c8c: 0000000c 089da1c8 00000000 00786d38 0x03786c9c: 089da1c8 08744c80 9bbd1cd8 0003fff4 0x03786cac: 03786d38 03786cd0 00b02b64 03786cec 0x03786cbc: 00000029 b46ae929 b46ae929 072b120d 0x03786ccc: 089da1c8 083b0c90 00000000 03786d08 Instructions: (pc=0x072cc752) 0x072cc742: e5 83 ec 0c 8b 55 08 8b 42 14 8b 48 0c 8b 45 10 0x072cc752: ff 70 10 8b 45 0c ff 70 10 ff 72 0c ff 51 34 c9 Stack: [0x03737000,0x03788000], sp=0x03786c5c, free space=319k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libGL.so.1+0x34752] C [libGL.so.1+0x192c5] glXMakeCurrentReadSGI+0xc3 C [libGL.so.1+0x194ed] glXMakeCurrent+0x18 C [libj3dcore-ogl.so+0xdb5f] Java_javax_media_j3d_NativePipeline_createNewContext+0x150 v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::StubRoutines (1) V [libjvm.so+0x193677] V [libjvm.so+0x26c459] V [libjvm.so+0x19294f] V [libjvm.so+0x192e22] V [libjvm.so+0x192faa] V [libjvm.so+0x1e38f6] V [libjvm.so+0x2fc39c] V [libjvm.so+0x2fc45a] V [libjvm.so+0x271b49] C [libpthread.so.0+0x632f] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::StubRoutines (1) --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x0831a400 JavaThread "Thread-4" daemon [_thread_blocked, id=17111, stack(0x05573000,0x055c4000)] 0x089f0400 JavaThread "J3D-InputDeviceScheduler-2" [_thread_blocked, id=17098, stack(0x03e40000,0x03e91000)] 0x089ef400 JavaThread "J3D-SoundSchedulerUpdateThread-2" [_thread_blocked, id=17097, stack(0x03573000,0x035c4000)] 0x089ee400 JavaThread "J3D-RenderStructureUpdateThread-2" [_thread_blocked, id=17096, stack(0x03c63000,0x03cb4000)] 0x083ae000 JavaThread "J3D-BehaviorScheduler-2" [_thread_blocked, id=17095, stack(0x03c12000,0x03c63000)] 0x083ad000 JavaThread "J3D-TransformStructureUpdateThread-2" [_thread_blocked, id=17094, stack(0x04b5f000,0x04bb0000)] 0x083ac000 JavaThread "J3D-RenderingEnvironmentStructureUpdateThread-2" [_thread_blocked, id=17093, stack(0x039ca000,0x03a1b000)] 0x083ab000 JavaThread "J3D-SoundStructureUpdateThread-2" [_thread_blocked, id=17092, stack(0x03a1b000,0x03a6c000)] 0x083aa000 JavaThread "J3D-GeometryStructureUpdateThread-2" [_thread_blocked, id=17091, stack(0x03a6c000,0x03abd000)] 0x083a9400 JavaThread "J3D-BehaviorStructureUpdateThread-2" [_thread_blocked, id=17090, stack(0x03b1f000,0x03b70000)] 0x08b25c00 JavaThread "J3D-MasterControl-2" [_thread_blocked, id=17089, stack(0x03b70000,0x03bc1000)] 0x08b25400 JavaThread "J3D-NotificationThread" [_thread_blocked, id=17088, stack(0x03bc1000,0x03c12000)] 0x08b24c00 JavaThread "J3D-TimerThread" [_thread_blocked, id=17087, stack(0x035f3000,0x03644000)] 0x088b4400 JavaThread "J3D-RenderingAttributesStructureUpdateThread" [_thread_blocked, id=17086, stack(0x03644000,0x03695000)] 0x08853c00 JavaThread "pool-2-thread-1" [_thread_blocked, id=17085, stack(0x03695000,0x036e6000)] 0x08775400 JavaThread "pool-1-thread-5" [_thread_blocked, id=17084, stack(0x036e6000,0x03737000)] 0x0822b000 JavaThread "pool-1-thread-4" [_thread_blocked, id=17082, stack(0x03def000,0x03e40000)] 0x08239800 JavaThread "pool-1-thread-3" [_thread_blocked, id=17081, stack(0x03d56000,0x03da7000)] 0x083c3c00 JavaThread "pool-1-thread-2" [_thread_blocked, id=17080, stack(0x03d05000,0x03d56000)] 0x083c6400 JavaThread "pool-1-thread-1" [_thread_blocked, id=17079, stack(0x03cb4000,0x03d05000)] 0x08776c00 JavaThread "TimerQueue" daemon [_thread_blocked, id=17069, stack(0x03979000,0x039ca000)] =>0x086cfc00 JavaThread "J3D-Renderer-1" [_thread_in_native, id=17068, stack(0x03737000,0x03788000)] 0x0812e000 JavaThread "DestroyJavaVM" [_thread_blocked, id=17045, stack(0x0013a000,0x0018b000)] 0x08652400 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=17061, stack(0x03ace000,0x03b1f000)] 0x08652000 JavaThread "AWT-Shutdown" [_thread_blocked, id=17060, stack(0x03260000,0x032b1000)] 0x084bf000 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=17055, stack(0x0794a000,0x0799b000)] 0x0844cc00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=17054, stack(0x05f56000,0x05fa7000)] 0x08407800 JavaThread "Timer-0" daemon [_thread_blocked, id=17053, stack(0x074f6000,0x07547000)] 0x081a0800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=17051, stack(0x0307d000,0x030ce000)] 0x0819dc00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=17050, stack(0x02ffc000,0x0307d000)] 0x0819cc00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=17049, stack(0x005cc000,0x0061d000)] 0x08188000 JavaThread "Finalizer" daemon [_thread_blocked, id=17048, stack(0x0057b000,0x005cc000)] 0x08187000 JavaThread "Reference Handler" daemon [_thread_blocked, id=17047, stack(0x0052a000,0x0057b000)] Other Threads: 0x08183c00 VMThread [stack: 0x004a9000,0x0052a000] [id=17046] 0x081a2000 WatcherThread [stack: 0x030ce000,0x0314f000] [id=17052] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 1920K, used 587K [0x94080000, 0x94290000, 0x967e0000) eden space 1728K, 33% used [0x94080000, 0x94112de0, 0x94230000) from space 192K, 0% used [0x94230000, 0x94230000, 0x94260000) to space 192K, 0% used [0x94260000, 0x94260000, 0x94290000) tenured generation total 24104K, used 21363K [0x967e0000, 0x97f6a000, 0xb4080000) the space 24104K, 88% used [0x967e0000, 0x97cbcdb0, 0x97cbce00, 0x97f6a000) compacting perm gen total 22784K, used 22580K [0xb4080000, 0xb56c0000, 0xb8080000) the space 22784K, 99% used [0xb4080000, 0xb568d090, 0xb568d200, 0xb56c0000) No shared spaces configured. Dynamic libraries: 00110000-00111000 r-xp 00110000 00:00 0 [vdso] 00111000-00138000 r-xp 00000000 fd:00 2089213 /lib/libm-2.8.so 00138000-00139000 r--p 00026000 fd:00 2089213 /lib/libm-2.8.so 00139000-0013a000 rw-p 00027000 fd:00 2089213 /lib/libm-2.8.so 0013a000-0013d000 ---p 0013a000 00:00 0 0013d000-0018b000 rwxp 0013d000 00:00 0 0018b000-00193000 r-xp 00000000 fd:00 2089217 /lib/librt-2.8.so 00193000-00194000 r--p 00007000 fd:00 2089217 /lib/librt-2.8.so 00194000-00195000 rw-p 00008000 fd:00 2089217 /lib/librt-2.8.so 00195000-0019b000 r-xp 00000000 fd:00 647678 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/native_threads/libhpi.so 0019b000-0019c000 rw-p 00006000 fd:00 647678 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/native_threads/libhpi.so 0019c000-001b2000 r-xp 00000000 fd:00 2089219 /lib/libnsl-2.8.so 001b2000-001b3000 r--p 00015000 fd:00 2089219 /lib/libnsl-2.8.so 001b3000-001b4000 rw-p 00016000 fd:00 2089219 /lib/libnsl-2.8.so 001b4000-001b6000 rw-p 001b4000 00:00 0 001b6000-001c0000 r-xp 00000000 fd:00 2089080 /lib/libnss_files-2.8.so 001c0000-001c1000 r--p 0000a000 fd:00 2089080 /lib/libnss_files-2.8.so 001c1000-001c2000 rw-p 0000b000 fd:00 2089080 /lib/libnss_files-2.8.so 001c2000-001ce000 r-xp 00000000 fd:00 647676 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libverify.so 001ce000-001cf000 rw-p 0000b000 fd:00 647676 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libverify.so 001cf000-001f1000 r-xp 00000000 fd:00 647653 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libjava.so 001f1000-001f3000 rw-p 00022000 fd:00 647653 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libjava.so 001f3000-001f9000 r-xp 00000000 fd:00 647677 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libzip.so 001f9000-001fa000 rw-p 00006000 fd:00 647677 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libzip.so 001fa000-00206000 rwxp 001fa000 00:00 0 00206000-0027a000 rwxp 00206000 00:00 0 0027a000-0027c000 rwxp 0027a000 00:00 0 0027c000-0028d000 rwxp 0027c000 00:00 0 0028d000-0029a000 rwxp 0028d000 00:00 0 0029a000-0037a000 rwxp 0029a000 00:00 0 0037a000-00386000 rwxp 0037a000 00:00 0 00386000-0039a000 rwxp 00386000 00:00 0 0039a000-003a7000 rwxp 0039a000 00:00 0 003a7000-00488000 rwxp 003a7000 00:00 0 00488000-00494000 rwxp 00488000 00:00 0 00494000-004a9000 rwxp 00494000 00:00 0 004a9000-004aa000 ---p 004a9000 00:00 0 004aa000-0052a000 rwxp 004aa000 00:00 0 0052a000-0052d000 ---p 0052a000 00:00 0 0052d000-0057b000 rwxp 0052d000 00:00 0 0057b000-0057e000 ---p 0057b000 00:00 0 0057e000-005cc000 rwxp 0057e000 00:00 0 005cc000-005cf000 ---p 005cc000 00:00 0 005cf000-0061d000 rwxp 005cf000 00:00 0 0061d000-0062c000 r-xp 00000000 fd:00 2720044 /usr/lib/libXext.so.6.4.0 0062c000-0062d000 rw-p 0000e000 fd:00 2720044 /usr/lib/libXext.so.6.4.0 0062d000-00635000 r-xp 00000000 fd:00 2720046 /usr/lib/libXi.so.6.0.0 00635000-00636000 rw-p 00007000 fd:00 2720046 /usr/lib/libXi.so.6.0.0 00636000-00637000 r-xp 00000000 fd:00 2720028 /usr/lib/libxcb-xlib.so.0.0.0 00637000-00638000 rw-p 00000000 fd:00 2720028 /usr/lib/libxcb-xlib.so.0.0.0 00638000-00654000 r-xp 00000000 fd:00 2089114 /lib/ld-2.8.so 00654000-00655000 r--p 0001c000 fd:00 2089114 /lib/ld-2.8.so 00655000-00656000 rw-p 0001d000 fd:00 2089114 /lib/ld-2.8.so 00656000-00657000 r--p 00656000 00:00 0 00658000-007bb000 r-xp 00000000 fd:00 2089123 /lib/libc-2.8.so 007bb000-007bd000 r--p 00163000 fd:00 2089123 /lib/libc-2.8.so 007bd000-007be000 rw-p 00165000 fd:00 2089123 /lib/libc-2.8.so 007be000-007c1000 rw-p 007be000 00:00 0 007c1000-007c2000 r-xp 00000000 fd:00 647655 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libjawt.so 007c2000-007c3000 rw-p 00000000 fd:00 647655 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libjawt.so 007c3000-007c6000 r-xp 00000000 fd:00 647183 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/jli/libjli.so 007c6000-007c7000 rw-p 00003000 fd:00 647183 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/jli/libjli.so 007c7000-007c9000 r-xp 00000000 fd:00 2719837 /usr/lib/libXau.so.6.0.0 007c9000-007ca000 rw-p 00001000 fd:00 2719837 /usr/lib/libXau.so.6.0.0 007ca000-007e5000 r-xp 00000000 fd:00 2720027 /usr/lib/libxcb.so.1.0.0 007e5000-007e6000 rw-p 0001a000 fd:00 2720027 /usr/lib/libxcb.so.1.0.0 007e6000-007eb000 r-xp 00000000 fd:00 2720026 /usr/lib/libXdmcp.so.6.0.0 007eb000-007ec000 rw-p 00004000 fd:00 2720026 /usr/lib/libXdmcp.so.6.0.0 007ee000-007f1000 r-xp 00000000 fd:00 2089127 /lib/libdl-2.8.so 007f1000-007f2000 r--p 00002000 fd:00 2089127 /lib/libdl-2.8.so 007f2000-007f3000 rw-p 00003000 fd:00 2089127 /lib/libdl-2.8.so 007f5000-0080a000 r-xp 00000000 fd:00 2089216 /lib/libpthread-2.8.so 0080a000-0080b000 r--p 00014000 fd:00 2089216 /lib/libpthread-2.8.so 0080b000-0080c000 rw-p 00015000 fd:00 2089216 /lib/libpthread-2.8.so 0080c000-0080e000 rw-p 0080c000 00:00 0 0080e000-0081b000 r-xp 00000000 fd:00 2089239 /lib/libgcc_s-4.3.0-20080428.so.1 0081b000-0081c000 rw-p 0000c000 fd:00 2089239 /lib/libgcc_s-4.3.0-20080428.so.1 0081c000-00823000 r-xp 00000000 fd:00 647668 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libnio.so 00823000-00824000 rw-p 00006000 fd:00 647668 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libnio.so 00824000-0082d000 r-xp 00000000 fd:00 2720056 /usr/lib/libXcursor.so.1.0.2 0082d000-0082e000 rw-p 00008000 fd:00 2720056 /usr/lib/libXcursor.so.1.0.2 0082e000-00841000 r-xp 00000000 fd:00 2089212 /lib/libz.so.1.2.3 00841000-00842000 rw-p 00012000 fd:00 2089212 /lib/libz.so.1.2.3 00842000-00bbf000 r-xp 00000000 fd:00 647638 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client/libjvm.so 00bbf000-00bde000 rw-p 0037d000 fd:00 647638 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client/libjvm.so 00bde000-00ffc000 rw-p 00bde000 00:00 0 00ffc000-012e4000 rwxp 00ffc000 00:00 0 012e4000-02ffc000 rwxp 012e4000 00:00 0 02ffc000-02fff000 ---p 02ffc000 00:00 0 02fff000-0307d000 rwxp 02fff000 00:00 0 0307d000-03080000 ---p 0307d000 00:00 0 03080000-030ce000 rwxp 03080000 00:00 0 030ce000-030cf000 ---p 030ce000 00:00 0 030cf000-0314f000 rwxp 030cf000 00:00 0 0314f000-03192000 r-xp 00000000 fd:00 647645 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libfontmanager.so 03192000-03194000 rw-p 00043000 fd:00 647645 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libfontmanager.so 03194000-03198000 rw-p 03194000 00:00 0 03198000-031ac000 r-xp 00000000 fd:00 647667 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libnet.so 031ac000-031ad000 rw-p 00013000 fd:00 647667 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libnet.so 031ad000-031af000 r-xp 00000000 fd:00 2720098 /usr/lib/libXdamage.so.1.1.0 031af000-031b0000 rw-p 00001000 fd:00 2720098 /usr/lib/libXdamage.so.1.1.0 031b0000-031c5000 r-xp 00000000 fd:00 533707 /usr/lib/libelf-0.135.so 031c5000-031c6000 r--p 00014000 fd:00 533707 /usr/lib/libelf-0.135.so 031c6000-031c7000 rw-p 00015000 fd:00 533707 /usr/lib/libelf-0.135.so 031c7000-031c9000 r-xp 00000000 fd:00 2089220 /lib/libkeyutils-1.2.so 031c9000-031ca000 rw-p 00001000 fd:00 2089220 /lib/libkeyutils-1.2.so 031cb000-031d0000 r-xp 00000000 fd:00 533756 /usr/lib/libXtst.so.6.1.0 031d0000-031d1000 rw-p 00004000 fd:00 533756 /usr/lib/libXtst.so.6.1.0 031d1000-0325c000 r-xp 00000000 fd:00 2719816 /usr/lib/libfreetype.so.6.3.16 0325c000-03260000 rw-p 0008a000 fd:00 2719816 /usr/lib/libfreetype.so.6.3.16 03260000-03263000 ---p 03260000 00:00 0 03263000-032b1000 rwxp 03263000 00:00 0 032b1000-032cc000 r-xp 00000000 fd:00 539370 /usr/lib/libatk-1.0.so.0.2209.1 032cc000-032ce000 rw-p 0001a000 fd:00 539370 /usr/lib/libatk-1.0.so.0.2209.1 032ce000-0330d000 r-xp 00000000 fd:00 2089105 /lib/libgobject-2.0.so.0.1600.5 0330d000-0330e000 rw-p 0003f000 fd:00 2089105 /lib/libgobject-2.0.so.0.1600.5 0330e000-033ef000 r-xp 00000000 fd:00 2089092 /lib/libglib-2.0.so.0.1600.5 033ef000-033f0000 rw-p 000e1000 fd:00 2089092 /lib/libglib-2.0.so.0.1600.5 033f0000-03419000 r-xp 00000000 fd:00 539314 /usr/lib/libpangoft2-1.0.so.0.2000.4 03419000-0341a000 rw-p 00028000 fd:00 539314 /usr/lib/libpangoft2-1.0.so.0.2000.4 0341a000-03446000 r-xp 00000000 fd:00 2720031 /usr/lib/libpixman-1.so.0.10.0 03446000-03447000 rw-p 0002c000 fd:00 2720031 /usr/lib/libpixman-1.so.0.10.0 03447000-0346c000 r-xp 00000000 fd:00 2089214 /lib/libexpat.so.1.5.2 0346c000-0346e000 rw-p 00024000 fd:00 2089214 /lib/libexpat.so.1.5.2 0346e000-03555000 r-xp 00000000 fd:00 535820 /usr/lib/libstdc++.so.6.0.10 03555000-03559000 r--p 000e6000 fd:00 535820 /usr/lib/libstdc++.so.6.0.10 03559000-0355b000 rw-p 000ea000 fd:00 535820 /usr/lib/libstdc++.so.6.0.10 0355b000-03560000 rw-p 0355b000 00:00 0 03560000-03572000 r-xp 00000000 fd:00 641257 /usr/lib/gtk-2.0/2.10.0/engines/libnodoka.so 03572000-03573000 rw-p 00011000 fd:00 641257 /usr/lib/gtk-2.0/2.10.0/engines/libnodoka.so 03573000-03576000 ---p 03573000 00:00 0 03576000-035c4000 rwxp 03576000 00:00 0 035c4000-035ef000 r-xp 00000000 fd:00 647662 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/liblcms.so 035ef000-035f0000 rw-p 0002b000 fd:00 647662 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/liblcms.so 035f0000-035f3000 rw-p 035f0000 00:00 0 035f3000-035f6000 ---p 035f3000 00:00 0 035f6000-03644000 rwxp 035f6000 00:00 0 03644000-03647000 ---p 03644000 00:00 0 03647000-03695000 rwxp 03647000 00:00 0 03695000-03698000 ---p 03695000 00:00 0 03698000-036e6000 rwxp 03698000 00:00 0 036e6000-036e9000 ---p 036e6000 00:00 0 036e9000-03737000 rwxp 036e9000 00:00 0 03737000-0373a000 ---p 03737000 00:00 0 0373a000-03788000 rwxp 0373a000 00:00 0 03788000-0395b000 r-xp 00000000 fd:00 631285 /usr/lib/dri/libdricore.so 0395b000-0396e000 rw-p 001d3000 fd:00 631285 /usr/lib/dri/libdricore.so 0396e000-03979000 rw-p 0396e000 00:00 0 03979000-0397c000 ---p 03979000 00:00 0 0397c000-039ca000 rwxp 0397c000 00:00 0 039ca000-039cd000 ---p 039ca000 00:00 0 039cd000-03a1b000 rwxp 039cd000 00:00 0 03a1b000-03a1e000 ---p 03a1b000 00:00 0 03a1e000-03a6c000 rwxp 03a1e000 00:00 0 03a6c000-03a6f000 ---p 03a6c000 00:00 0 03a6f000-03abd000 rwxp 03a6f000 00:00 0 03abd000-03acd000 r-xp 00000000 fd:00 535810 /usr/lib/libtasn1.so.3.0.14 03acd000-03ace000 rw-p 00010000 fd:00 535810 /usr/lib/libtasn1.so.3.0.14 03ace000-03ad1000 ---p 03ace000 00:00 0 03ad1000-03b1f000 rwxp 03ad1000 00:00 0 03b1f000-03b22000 ---p 03b1f000 00:00 0 03b22000-03b70000 rwxp 03b22000 00:00 0 03b70000-03b73000 ---p 03b70000 00:00 0 03b73000-03bc1000 rwxp 03b73000 00:00 0 03bc1000-03bc4000 ---p 03bc1000 00:00 0 03bc4000-03c12000 rwxp 03bc4000 00:00 0 03c12000-03c15000 ---p 03c12000 00:00 0 03c15000-03c63000 rwxp 03c15000 00:00 0 03c63000-03c66000 ---p 03c63000 00:00 0 03c66000-03cb4000 rwxp 03c66000 00:00 0 03cb4000-03cb7000 ---p 03cb4000 00:00 0 03cb7000-03d05000 rwxp 03cb7000 00:00 0 03d05000-03d08000 ---p 03d05000 00:00 0 03d08000-03d56000 rwxp 03d08000 00:00 0 03d56000-03d59000 ---p 03d56000 00:00 0 03d59000-03da7000 rwxp 03d59000 00:00 0 03da7000-03dd4000 r-xp 00000000 fd:00 2720074 /usr/lib/libgssapi_krb5.so.2.2 03dd4000-03dd6000 rw-p 0002d000 fd:00 2720074 /usr/lib/libgssapi_krb5.so.2.2 03dd6000-03dd9000 r-xp 00000000 fd:00 2089235 /lib/libgpg-error.so.0.4.0 03dd9000-03dda000 rw-p 00002000 fd:00 2089235 /lib/libgpg-error.so.0.4.0 03def000-03df2000 ---p 03def000 00:00 0 03df2000-03e40000 rwxp 03df2000 00:00 0 03e40000-03e43000 ---p 03e40000 00:00 0 03e43000-03e91000 rwxp 03e43000 00:00 0 03e91000-03f09000 r-xp 00000000 fd:00 2720093 /usr/lib/libgnutls.so.13.9.1 03f09000-03f0f000 rw-p 00077000 fd:00 2720093 /usr/lib/libgnutls.so.13.9.1 03f1f000-03f27000 r-xp 00000000 fd:00 647657 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libjpeg.so 03f27000-03f28000 rw-p 00008000 fd:00 647657 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libjpeg.so 03f28000-03f31000 r-xp 00000000 fd:00 2089238 /lib/libcrypt-2.8.so 03f31000-03f32000 r--p 00009000 fd:00 2089238 /lib/libcrypt-2.8.so 03f32000-03f33000 rw-p 0000a000 fd:00 2089238 /lib/libcrypt-2.8.so 03f33000-03f5a000 rw-p 03f33000 00:00 0 03f5a000-03fc7000 r-xp 00000000 fd:00 2089236 /lib/libgcrypt.so.11.4.3 03fc7000-03fc9000 rw-p 0006c000 fd:00 2089236 /lib/libgcrypt.so.11.4.3 03fc9000-03fcc000 rwxp 03fc9000 00:00 0 03fcc000-0401a000 rwxp 03fcc000 00:00 0 0401a000-0401d000 rwxp 0401a000 00:00 0 0401d000-0406b000 rwxp 0401d000 00:00 0 0410b000-0410d000 r-xp 00000000 fd:00 2720057 /usr/lib/libXcomposite.so.1.0.0 0410d000-0410e000 rw-p 00001000 fd:00 2720057 /usr/lib/libXcomposite.so.1.0.0 0415f000-04168000 r-xp 00000000 fd:00 539326 /usr/lib/libpangocairo-1.0.so.0.2000.4 04168000-04169000 rw-p 00008000 fd:00 539326 /usr/lib/libpangocairo-1.0.so.0.2000.4 041d0000-041d2000 r-xp 00000000 fd:00 2720045 /usr/lib/libXinerama.so.1.0.0 041d2000-041d3000 rw-p 00001000 fd:00 2720045 /usr/lib/libXinerama.so.1.0.0 041e2000-041e5000 r-xp 00000000 fd:00 2089096 /lib/libgmodule-2.0.so.0.1600.5 041e5000-041e6000 rw-p 00002000 fd:00 2089096 /lib/libgmodule-2.0.so.0.1600.5 04218000-0421e000 r-xp 00000000 fd:00 2720047 /usr/lib/libXrandr.so.2.1.0 0421e000-0421f000 rw-p 00005000 fd:00 2720047 /usr/lib/libXrandr.so.2.1.0 04243000-0425f000 r-xp 00000000 fd:00 535263 /usr/lib/libgdk_pixbuf-2.0.so.0.1200.11 0425f000-04260000 rw-p 0001b000 fd:00 535263 /usr/lib/libgdk_pixbuf-2.0.so.0.1200.11 04392000-043ac000 r-xp 00000000 fd:00 2089206 /lib/libselinux.so.1 043ac000-043ad000 r--p 00019000 fd:00 2089206 /lib/libselinux.so.1 043ad000-043ae000 rw-p 0001a000 fd:00 2089206 /lib/libselinux.so.1 0440b000-0444c000 r-xp 00000000 fd:00 535445 /usr/lib/libpango-1.0.so.0.2000.4 0444c000-0444e000 rw-p 00040000 fd:00 535445 /usr/lib/libpango-1.0.so.0.2000.4 0446a000-04491000 r-xp 00000000 fd:00 537054 /usr/lib/libpng12.so.0.29.0 04491000-04492000 rw-p 00026000 fd:00 537054 /usr/lib/libpng12.so.0.29.0 044e8000-04516000 r-xp 00000000 fd:00 2719818 /usr/lib/libfontconfig.so.1.3.0 04516000-04517000 rw-p 0002e000 fd:00 2719818 /usr/lib/libfontconfig.so.1.3.0 046d8000-0475b000 r-xp 00000000 fd:00 647643 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libawt.so 0475b000-04762000 rw-p 00082000 fd:00 647643 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libawt.so 04762000-04786000 rw-p 04762000 00:00 0 04792000-0479c000 r-xp 00000000 fd:00 2720099 /usr/lib/libdrm.so.2.3.0 0479c000-0479d000 rw-p 0000a000 fd:00 2720099 /usr/lib/libdrm.so.2.3.0 047ef000-04882000 r-xp 00000000 fd:00 539367 /usr/lib/libgdk-x11-2.0.so.0.1200.11 04882000-04885000 rw-p 00093000 fd:00 539367 /usr/lib/libgdk-x11-2.0.so.0.1200.11 04968000-049d5000 r-xp 00000000 fd:00 2720032 /usr/lib/libcairo.so.2.17.5 049d5000-049d7000 rw-p 0006d000 fd:00 2720032 /usr/lib/libcairo.so.2.17.5 04b5f000-04b62000 ---p 04b5f000 00:00 0 04b62000-04bb0000 rwxp 04b62000 00:00 0 04d20000-04d2e000 r-xp 00000000 fd:00 641029 /usr/lib/gtk-2.0/modules/libgnomebreakpad.so 04d2e000-04d2f000 rw-p 0000d000 fd:00 641029 /usr/lib/gtk-2.0/modules/libgnomebreakpad.so 04fd5000-053d7000 r-xp 00000000 fd:00 539402 /usr/lib/libgtk-x11-2.0.so.0.1200.11 053d7000-053dd000 rw-p 00402000 fd:00 539402 /usr/lib/libgtk-x11-2.0.so.0.1200.11 053dd000-053de000 rw-p 053dd000 00:00 0 0551e000-0556e000 r-xp 00000000 fd:00 845584 /usr/lib/bug-buddy/libbreakpad.so.0.0.0 0556e000-0556f000 rw-p 00050000 fd:00 845584 /usr/lib/bug-buddy/libbreakpad.so.0.0.0 05573000-05576000 ---p 05573000 00:00 0 05576000-055c4000 rwxp 05576000 00:00 0 05cc6000-05d11000 r-xp 00000000 fd:00 631290 /usr/lib/dri/r300_dri.so 05d11000-05d13000 rw-p 0004a000 fd:00 631290 /usr/lib/dri/r300_dri.so 05d13000-05d14000 rw-p 05d13000 00:00 0 05d38000-05d3c000 r-xp 00000000 fd:00 2720055 /usr/lib/libXfixes.so.3.1.0 05d3c000-05d3d000 rw-p 00003000 fd:00 2720055 /usr/lib/libXfixes.so.3.1.0 05da0000-05da8000 r-xp 00000000 fd:00 2720030 /usr/lib/libXrender.so.1.3.0 05da8000-05da9000 rw-p 00007000 fd:00 2720030 /usr/lib/libXrender.so.1.3.0 05f56000-05f59000 ---p 05f56000 00:00 0 05f59000-05fa7000 rwxp 05f59000 00:00 0 06522000-06561000 r-xp 00000000 fd:00 647682 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/xawt/libmawt.so 06561000-06564000 rw-p 0003e000 fd:00 647682 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/xawt/libmawt.so 06a5b000-06b58000 r-xp 00000000 fd:00 2720029 /usr/lib/libX11.so.6.2.0 06b58000-06b5c000 rw-p 000fc000 fd:00 2720029 /usr/lib/libX11.so.6.2.0 06dde000-06de2000 r-xp 00000000 fd:00 540585 /usr/lib/libXxf86vm.so.1.0.0 06de2000-06de3000 rw-p 00003000 fd:00 540585 /usr/lib/libXxf86vm.so.1.0.0 06f28000-06f4a000 r-xp 00000000 fd:00 1476145 /opt/SweetHome3D-1.3/lib/libj3dcore-ogl.so 06f4a000-06f4b000 rw-p 00021000 fd:00 1476145 /opt/SweetHome3D-1.3/lib/libj3dcore-ogl.so 0708a000-0708c000 r-xp 00000000 fd:00 2089222 /lib/libcom_err.so.2.1 0708c000-0708d000 rw-p 00001000 fd:00 2089222 /lib/libcom_err.so.2.1 07096000-0709e000 r-xp 00000000 fd:00 2720067 /usr/lib/libkrb5support.so.0.1 0709e000-0709f000 rw-p 00007000 fd:00 2720067 /usr/lib/libkrb5support.so.0.1 070ae000-070bf000 r-xp 00000000 fd:00 2089221 /lib/libresolv-2.8.so 070bf000-070c0000 r--p 00010000 fd:00 2089221 /lib/libresolv-2.8.so 070c0000-070c1000 rw-p 00011000 fd:00 2089221 /lib/libresolv-2.8.so 070c1000-070c3000 rw-p 070c1000 00:00 0 070ce000-070f2000 r-xp 00000000 fd:00 2720072 /usr/lib/libk5crypto.so.3.1 070f2000-070f3000 rw-p 00024000 fd:00 2720072 /usr/lib/libk5crypto.so.3.1 070f6000-0712d000 r-xp 00000000 fd:00 2719850 /usr/lib/libcups.so.2 0712d000-0712f000 rw-p 00037000 fd:00 2719850 /usr/lib/libcups.so.2 071c4000-07261000 r-xp 00000000 fd:00 2720073 /usr/lib/libkrb5.so.3.3 07261000-07264000 rw-p 0009c000 fd:00 2720073 /usr/lib/libkrb5.so.3.3 07298000-07304000 r-xp 00000000 fd:00 2720100 /usr/lib/libGL.so.1.2 07304000-0730a000 rw-p 0006c000 fd:00 2720100 /usr/lib/libGL.so.1.2 0730a000-0730b000 rw-p 0730a000 00:00 0 074f6000-074f9000 ---p 074f6000 00:00 0 074f9000-07547000 rwxp 074f9000 00:00 0 0794a000-0794d000 ---p 0794a000 00:00 0 0794d000-0799b000 rwxp 0794d000 00:00 0 08048000-08050000 r-xp 00000000 fd:00 647587 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java 08050000-08052000 rw-p 00007000 fd:00 647587 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java 08128000-08e74000 rw-p 08128000 00:00 0 [heap] 8a58d000-8a801000 rw-p 8a58d000 00:00 0 8a801000-8a8d4000 rw-s 00000000 00:09 34766865 /SYSV00000000 (deleted) 8a8d8000-8a981000 rw-s 00000000 00:09 35258389 /SYSV00000000 (deleted) 8a981000-8ac6e000 rw-s 00000000 00:09 34340883 /SYSV00000000 (deleted) 8acc6000-8ae1a000 rw-p 8acc6000 00:00 0 8ae1a000-8ae6e000 rw-s 00000000 00:09 34570258 /SYSV00000000 (deleted) 8ae85000-8b0f9000 rw-p 8ae85000 00:00 0 8b116000-8b176000 rw-s 00000000 00:09 33783824 /SYSV00000000 (deleted) 8b176000-8b656000 rw-s f8e13000 00:0f 6095 /dev/dri/card0 8b656000-8b856000 rw-s f8c13000 00:0f 6095 /dev/dri/card0 8b856000-8b866000 r--s fd7f0000 00:0f 6095 /dev/dri/card0 8b866000-9385e000 rw-s d8000000 00:0f 6095 /dev/dri/card0 9385e000-93962000 rw-p 9385e000 00:00 0 93962000-939f4000 r--p 00000000 fd:00 614634 /usr/share/fonts/dejavu/DejaVuSans.ttf 939f4000-939f8000 r--s 00000000 fd:00 1040457 /var/cache/fontconfig/177aa5f8e4784b879645141d1d73ae7a-x86.cache-2 939f8000-939fc000 r--s 00000000 fd:00 1040455 /var/cache/fontconfig/f4023520196b2bc2c439adcafb2470ff-x86.cache-2 939fc000-939fe000 r--s 00000000 fd:00 1040509 /var/cache/fontconfig/87f5e051180a7a75f16eb6fe7dbd3749-x86.cache-2 939fe000-93a04000 r--s 00000000 fd:00 1040439 /var/cache/fontconfig/b79f3aaa7d385a141ab53ec885cc22a8-x86.cache-2 93a04000-93a0e000 r--s 00000000 fd:00 1040458 /var/cache/fontconfig/40c848d2bcd698028c81266d97f97863-x86.cache-2 93a0e000-93a0f000 r--s 00000000 fd:00 1040443 /var/cache/fontconfig/6cfc7d49b27ba7d3eb71ab86e04def2c-x86.cache-2 93a0f000-93a22000 r--s 00000000 fd:00 1041443 /var/cache/fontconfig/73a61b34dd8ca4d8a159807604ab432f-x86.cache-2 93a22000-93a23000 r--s 00000000 fd:00 1040462 /var/cache/fontconfig/b887eea8f1b96e1d899b44ed6681fc27-x86.cache-2 93a23000-93a24000 r--s 00000000 fd:00 1040445 /var/cache/fontconfig/860639f272b8b4b3094f9e399e41bccd-x86.cache-2 93a24000-93a25000 r--s 00000000 fd:00 1040452 /var/cache/fontconfig/211368abcb0ff835c229ff05c9ec01dc-x86.cache-2 93a25000-93a26000 r--s 00000000 fd:00 1040463 /var/cache/fontconfig/c46020d7221988a13df853d2b46304fc-x86.cache-2 93a26000-93a27000 r--s 00000000 fd:00 1040449 /var/cache/fontconfig/fa2b533b7056bdadb961f088bc0a978b-x86.cache-2 93a27000-93a28000 r--s 00000000 fd:00 1040459 /var/cache/fontconfig/df893b4576ad6107f9397134092c4059-x86.cache-2 93a28000-93a29000 r--s 00000000 fd:00 1040460 /var/cache/fontconfig/ff627ea95a65192232277bf7c8a56f23-x86.cache-2 93a29000-93a2a000 r--s 00000000 fd:00 1040461 /var/cache/fontconfig/900402270e15d763a6e008bb2d4c7686-x86.cache-2 93a2a000-93a2b000 r--s 00000000 fd:00 1040444 /var/cache/fontconfig/2881ed3fd21ca306ddad6f9b0dd3189f-x86.cache-2 93a2b000-93a2c000 r--s 00000000 fd:00 1040447 /var/cache/fontconfig/e61abf8156cc476151baa07d67337cae-x86.cache-2 93a2c000-93a2f000 r--s 00000000 fd:00 1041594 /var/cache/fontconfig/b67b32625a2bb51b023d3814a918f351-x86.cache-2 93a2f000-93a32000 r--s 00000000 fd:00 1040446 /var/cache/fontconfig/46b47dbc682d2ca4191e148ea7bde7f2-x86.cache-2 93a32000-93a33000 r--s 00000000 fd:00 1040441 /var/cache/fontconfig/b4d0b56f766d89640448751fcd18ec1e-x86.cache-2 93a33000-93a3a000 r--s 00000000 fd:00 1041433 /var/cache/fontconfig/71e44b93d92c4d850a6425411914df5e-x86.cache-2 93a3a000-93a40000 r--s 00000000 fd:00 1040440 /var/cache/fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86.cache-2 93a40000-93a44000 r--s 00000000 fd:00 1040450 /var/cache/fontconfig/766670f26ba71bf5eea34bac120eb600-x86.cache-2 93a44000-93a4c000 r--s 00000000 fd:00 1040442 /var/cache/fontconfig/e19de935dec46bbf3ed114ee4965548a-x86.cache-2 93a4c000-93a4e000 r--s 00000000 fd:00 1040453 /var/cache/fontconfig/273572fe21058bf32b3be773088b9170-x86.cache-2 93a4e000-93a4f000 r--s 00000000 fd:00 1040451 /var/cache/fontconfig/1248881498ac025e45c3042f6afe9284-x86.cache-2 93a4f000-93a55000 r--s 00000000 fd:00 1041490 /var/cache/fontconfig/38fe83377a1c305c15f7cc08a8aa9e01-x86.cache-2 93a55000-93a57000 r--s 00000000 fd:00 1040448 /var/cache/fontconfig/8fd5071779cacc5b88f04796ea2b3c26-x86.cache-2 93a57000-93a5a000 r--s 00000000 fd:00 1040512 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-x86.cache-2 93a5a000-93a63000 r--p 00000000 fd:00 543487 /usr/share/locale/it/LC_MESSAGES/libc.mo 93a63000-93a88000 r--p 00000000 fd:00 541994 /usr/share/locale/it/LC_MESSAGES/gtk20-properties.mo 93a88000-93a8f000 r--s 00000000 fd:00 558154 /usr/lib/gconv/gconv-modules.cache 93a8f000-93aa0000 r--p 00000000 fd:00 543278 /usr/share/locale/it/LC_MESSAGES/gtk20.mo 93aa0000-93aa4000 r--s 00000000 fd:00 1040457 /var/cache/fontconfig/177aa5f8e4784b879645141d1d73ae7a-x86.cache-2 93aa4000-93aa8000 r--s 00000000 fd:00 1040455 /var/cache/fontconfig/f4023520196b2bc2c439adcafb2470ff-x86.cache-2 93aa8000-93aaa000 r--s 00000000 fd:00 1040509 /var/cache/fontconfig/87f5e051180a7a75f16eb6fe7dbd3749-x86.cache-2 93aaa000-93ab0000 r--s 00000000 fd:00 1040439 /var/cache/fontconfig/b79f3aaa7d385a141ab53ec885cc22a8-x86.cache-2 93ab0000-93aba000 r--s 00000000 fd:00 1040458 /var/cache/fontconfig/40c848d2bcd698028c81266d97f97863-x86.cache-2 93aba000-93abb000 r--s 00000000 fd:00 1040443 /var/cache/fontconfig/6cfc7d49b27ba7d3eb71ab86e04def2c-x86.cache-2 93abb000-93ace000 r--s 00000000 fd:00 1041443 /var/cache/fontconfig/73a61b34dd8ca4d8a159807604ab432f-x86.cache-2 93ace000-93acf000 r--s 00000000 fd:00 1040462 /var/cache/fontconfig/b887eea8f1b96e1d899b44ed6681fc27-x86.cache-2 93acf000-93ad0000 r--s 00000000 fd:00 1040445 /var/cache/fontconfig/860639f272b8b4b3094f9e399e41bccd-x86.cache-2 93ad0000-93ad1000 r--s 00000000 fd:00 1040452 /var/cache/fontconfig/211368abcb0ff835c229ff05c9ec01dc-x86.cache-2 93ad1000-93ad2000 r--s 00000000 fd:00 1040463 /var/cache/fontconfig/c46020d7221988a13df853d2b46304fc-x86.cache-2 93ad2000-93ad3000 r--s 00000000 fd:00 1040449 /var/cache/fontconfig/fa2b533b7056bdadb961f088bc0a978b-x86.cache-2 93ad3000-93ad4000 r--s 00000000 fd:00 1040459 /var/cache/fontconfig/df893b4576ad6107f9397134092c4059-x86.cache-2 93ad4000-93ad5000 r--s 00000000 fd:00 1040460 /var/cache/fontconfig/ff627ea95a65192232277bf7c8a56f23-x86.cache-2 93ad5000-93ad6000 r--s 00000000 fd:00 1040461 /var/cache/fontconfig/900402270e15d763a6e008bb2d4c7686-x86.cache-2 93ad6000-93ad7000 r--s 00000000 fd:00 1040444 /var/cache/fontconfig/2881ed3fd21ca306ddad6f9b0dd3189f-x86.cache-2 93ad7000-93ad8000 r--s 00000000 fd:00 1040447 /var/cache/fontconfig/e61abf8156cc476151baa07d67337cae-x86.cache-2 93ad8000-93adb000 r--s 00000000 fd:00 1041594 /var/cache/fontconfig/b67b32625a2bb51b023d3814a918f351-x86.cache-2 93adb000-93ade000 r--s 00000000 fd:00 1040446 /var/cache/fontconfig/46b47dbc682d2ca4191e148ea7bde7f2-x86.cache-2 93ade000-93adf000 r--s 00000000 fd:00 1040441 /var/cache/fontconfig/b4d0b56f766d89640448751fcd18ec1e-x86.cache-2 93adf000-93ae6000 r--s 00000000 fd:00 1041433 /var/cache/fontconfig/71e44b93d92c4d850a6425411914df5e-x86.cache-2 93ae6000-93aec000 r--s 00000000 fd:00 1040440 /var/cache/fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86.cache-2 93aec000-93af0000 r--s 00000000 fd:00 1040450 /var/cache/fontconfig/766670f26ba71bf5eea34bac120eb600-x86.cache-2 93af0000-93af8000 r--s 00000000 fd:00 1040442 /var/cache/fontconfig/e19de935dec46bbf3ed114ee4965548a-x86.cache-2 93af8000-93afa000 r--s 00000000 fd:00 1040453 /var/cache/fontconfig/273572fe21058bf32b3be773088b9170-x86.cache-2 93afa000-93afb000 r--s 00000000 fd:00 1040451 /var/cache/fontconfig/1248881498ac025e45c3042f6afe9284-x86.cache-2 93afb000-93b01000 r--s 00000000 fd:00 1041490 /var/cache/fontconfig/38fe83377a1c305c15f7cc08a8aa9e01-x86.cache-2 93b01000-93b03000 r--s 00000000 fd:00 1040448 /var/cache/fontconfig/8fd5071779cacc5b88f04796ea2b3c26-x86.cache-2 93b03000-93b06000 r--s 00000000 fd:00 1040512 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-x86.cache-2 93b06000-93b0a000 r--s 00000000 fd:00 1040457 /var/cache/fontconfig/177aa5f8e4784b879645141d1d73ae7a-x86.cache-2 93b0a000-93b0e000 r--s 00000000 fd:00 1040455 /var/cache/fontconfig/f4023520196b2bc2c439adcafb2470ff-x86.cache-2 93b0e000-93b10000 r--s 00000000 fd:00 1040509 /var/cache/fontconfig/87f5e051180a7a75f16eb6fe7dbd3749-x86.cache-2 93b10000-93b16000 r--s 00000000 fd:00 1040439 /var/cache/fontconfig/b79f3aaa7d385a141ab53ec885cc22a8-x86.cache-2 93b16000-93b20000 r--s 00000000 fd:00 1040458 /var/cache/fontconfig/40c848d2bcd698028c81266d97f97863-x86.cache-2 93b20000-93b21000 r--s 00000000 fd:00 1040443 /var/cache/fontconfig/6cfc7d49b27ba7d3eb71ab86e04def2c-x86.cache-2 93b21000-93b34000 r--s 00000000 fd:00 1041443 /var/cache/fontconfig/73a61b34dd8ca4d8a159807604ab432f-x86.cache-2 93b34000-93b35000 r--s 00000000 fd:00 1040462 /var/cache/fontconfig/b887eea8f1b96e1d899b44ed6681fc27-x86.cache-2 93b35000-93b36000 r--s 00000000 fd:00 1040445 /var/cache/fontconfig/860639f272b8b4b3094f9e399e41bccd-x86.cache-2 93b36000-93b37000 r--s 00000000 fd:00 1040452 /var/cache/fontconfig/211368abcb0ff835c229ff05c9ec01dc-x86.cache-2 93b37000-93b38000 r--s 00000000 fd:00 1040463 /var/cache/fontconfig/c46020d7221988a13df853d2b46304fc-x86.cache-2 93b38000-93b39000 r--s 00000000 fd:00 1040449 /var/cache/fontconfig/fa2b533b7056bdadb961f088bc0a978b-x86.cache-2 93b39000-93b3a000 r--s 00000000 fd:00 1040459 /var/cache/fontconfig/df893b4576ad6107f9397134092c4059-x86.cache-2 93b3a000-93b3b000 r--s 00000000 fd:00 1040460 /var/cache/fontconfig/ff627ea95a65192232277bf7c8a56f23-x86.cache-2 93b3b000-93b3c000 r--s 00000000 fd:00 1040461 /var/cache/fontconfig/900402270e15d763a6e008bb2d4c7686-x86.cache-2 93b3c000-93b3d000 r--s 00000000 fd:00 1040444 /var/cache/fontconfig/2881ed3fd21ca306ddad6f9b0dd3189f-x86.cache-2 93b3d000-93b3e000 r--s 00000000 fd:00 1040447 /var/cache/fontconfig/e61abf8156cc476151baa07d67337cae-x86.cache-2 93b3e000-93b41000 r--s 00000000 fd:00 1041594 /var/cache/fontconfig/b67b32625a2bb51b023d3814a918f351-x86.cache-2 93b41000-93b44000 r--s 00000000 fd:00 1040446 /var/cache/fontconfig/46b47dbc682d2ca4191e148ea7bde7f2-x86.cache-2 93b44000-93b45000 r--s 00000000 fd:00 1040441 /var/cache/fontconfig/b4d0b56f766d89640448751fcd18ec1e-x86.cache-2 93b45000-93b4c000 r--s 00000000 fd:00 1041433 /var/cache/fontconfig/71e44b93d92c4d850a6425411914df5e-x86.cache-2 93b4c000-93b52000 r--s 00000000 fd:00 1040440 /var/cache/fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86.cache-2 93b52000-93b56000 r--s 00000000 fd:00 1040450 /var/cache/fontconfig/766670f26ba71bf5eea34bac120eb600-x86.cache-2 93b56000-93b5e000 r--s 00000000 fd:00 1040442 /var/cache/fontconfig/e19de935dec46bbf3ed114ee4965548a-x86.cache-2 93b5e000-93b60000 r--s 00000000 fd:00 1040453 /var/cache/fontconfig/273572fe21058bf32b3be773088b9170-x86.cache-2 93b60000-93b61000 r--s 00000000 fd:00 1040451 /var/cache/fontconfig/1248881498ac025e45c3042f6afe9284-x86.cache-2 93b61000-93b67000 r--s 00000000 fd:00 1041490 /var/cache/fontconfig/38fe83377a1c305c15f7cc08a8aa9e01-x86.cache-2 93b67000-93b69000 r--s 00000000 fd:00 1040448 /var/cache/fontconfig/8fd5071779cacc5b88f04796ea2b3c26-x86.cache-2 93b69000-93b6c000 r--s 00000000 fd:00 1040512 /var/cache/fontconfig/beeeeb3dfe132a8a0633a017c99ce0c0-x86.cache-2 93b6c000-93b73000 r--s 000fd000 fd:00 647705 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/resources.jar 93b73000-93b7b000 r--s 00096000 fd:00 1475617 /opt/SweetHome3D-1.3/jre1.6.0_06/lib/javaws.jar 93b7b000-93b7d000 r--s 0004e000 fd:00 1476146 /opt/SweetHome3D-1.3/lib/vecmath.jar 93b7d000-93b8b000 r--s 00192000 fd:00 1476143 /opt/SweetHome3D-1.3/lib/j3dutils.jar 93b8b000-93b97000 r--s 002c7000 fd:00 1476142 /opt/SweetHome3D-1.3/lib/j3dcore.jar 93b97000-93ba4000 r--s 0010a000 fd:00 1476141 /opt/SweetHome3D-1.3/lib/itext-2.0.4.jar 93ba4000-93ba7000 r--s 0001f000 fd:00 1476139 /opt/SweetHome3D-1.3/lib/Loader3DS1_2.jar 93ba7000-93bab000 r--s 00079000 fd:00 647199 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jsse.jar 93bab000-93bcf000 r--s 00801000 fd:00 1476140 /opt/SweetHome3D-1.3/lib/SweetHome3D.jar 93bcf000-93bd8000 r--s 00065000 fd:00 647610 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/gnome-java-bridge.jar 93bd8000-93bd9000 r--p 0136d000 fd:00 539823 /usr/lib/locale/locale-archive 93bd9000-93cbd000 r--p 0019a000 fd:00 539823 /usr/lib/locale/locale-archive 93cbd000-93ebd000 r--p 00000000 fd:00 539823 /usr/lib/locale/locale-archive 93ebd000-93ef0000 rw-p 93ebd000 00:00 0 93ef0000-94080000 r--s 033ee000 fd:00 647707 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rt.jar 94080000-94290000 rwxp 94080000 00:00 0 94290000-967e0000 rwxp 94290000 00:00 0 967e0000-97f6a000 rwxp 967e0000 00:00 0 97f6a000-b4080000 rwxp 97f6a000 00:00 0 b4080000-b56c0000 rwxp b4080000 00:00 0 b56c0000-b8080000 rwxp b56c0000 00:00 0 b808d000-b808f000 rw-p b808d000 00:00 0 b8090000-b8091000 r--s 00040000 fd:00 2588867 /tmp/open2792.sweethome3d b8091000-b8092000 r--s f8c12000 00:0f 6095 /dev/dri/card0 b8092000-b8094000 rw-s f8a3d000 00:0f 6095 /dev/dri/card0 b8094000-b809c000 rw-s 00000000 fd:00 2588780 /tmp/hsperfdata_davalv/17044 b809c000-b809d000 rwxp b809c000 00:00 0 b809d000-b809e000 r--p b809d000 00:00 0 b809e000-b809f000 rw-p b809e000 00:00 0 bfe89000-bfe9c000 rwxp bffeb000 00:00 0 [stack] bfe9c000-bfe9e000 rw-p bfffe000 00:00 0 VM Arguments: jvm_args: -Djava.library.path=lib -Xmx512m java_command: com.eteks.sweethome3d.SweetHome3D Launcher Type: SUN_STANDARD Environment Variables: PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/home/davalv/bin USERNAME=davalv LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386 SHELL=/bin/bash DISPLAY=:0.0 Signal Handlers: SIGSEGV: [libjvm.so+0x327970], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x327970], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x26ea60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGXFSZ: [libjvm.so+0x26ea60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x26ea60], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x26e410], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x2705d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: [libjvm.so+0x2705d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGTERM: [libjvm.so+0x2705d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x2705d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:Fedora release 9 (Sulphur) uname:Linux 2.6.25.14-108.fc9.i686 #1 SMP Mon Aug 4 14:08:11 EDT 2008 i686 libc:glibc 2.8 NPTL 2.8 rlimit: STACK 10240k, CORE 0k, NPROC 1024, NOFILE 1024, AS infinity load average:0,47 0,36 0,33 CPU:total 1 (1 cores per cpu, 1 threads per core) family 15 model 47 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, mmxext, 3dnow, 3dnowext Memory: 4k page, physical 1555060k(435028k free), swap 2031608k(2031608k free) vm_info: OpenJDK Client VM (1.6.0-b09) for linux-x86 JRE (1.6.0-b09), built on Jul 8 2008 11:26:24 by "mockbuild" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8) time: Sat Aug 16 09:51:23 2008 elapsed time: 35 seconds -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From martinrb at google.com Sat Aug 16 19:59:20 2008 From: martinrb at google.com (Martin Buchholz) Date: Sat, 16 Aug 2008 19:59:20 -0700 Subject: [OpenJDK 2D-Dev] Status of com.sun.image.codec.jpeg In-Reply-To: <1ccfd1c10808140954k1d10e2e6uebf2ba5961e4fb15@mail.gmail.com> References: <1ccfd1c10808140932k75eb642eqfab640978d6fdb45@mail.gmail.com> <1ccfd1c10808140954k1d10e2e6uebf2ba5961e4fb15@mail.gmail.com> Message-ID: <1ccfd1c10808161959h7d25a707gdd661d443730163b@mail.gmail.com> I decided to pursue this a little more, since our code base contains multiple references to com.sun.image.codec.jpeg and I'll probably have to deal with it, even though I know nothing about image I/O. I added the following comment to the bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962 ==== I'm disappointed by the decision to not support this API indefinitely. The API was published and never deprecated. If the javax.imageio API provides equivalent functionality, it should be possible to modify the implementation of com.sun.image.jpeg.codec to just act as an adapter shim over javax.imageio. If doing this is difficult, then it will also be difficult for applications to migrate, making it unreassonable to remove these classes. Meanwhile, the IcedTea people have created a patch to re-create this package, but with a stub implementation. I'm not sure whether the intent is to flesh out the stubs, or to merely make it possible for legacy applications that use com.sun.image.codec.jpeg to continue to compile, but perhaps fail at runtime. The latter option is not in the spirit of Java, which is to prefer compile-time failure. Martin On Thu, Aug 14, 2008 at 9:54 AM, Martin Buchholz wrote: > Hi Chris, > > Thanks very much for that informative pointer. > > In hindsight, it would have been good if @deprecated > warnings had been added to these classes years ago. > Today it's probably too late to do much good. > > Martin > > On Thu, Aug 14, 2008 at 9:45 AM, Chris Campbell > wrote: >> Hi Martin, >> >> The history (and fate) of those classes is documented here: >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527962 >> >> Chris >> >> >> On Aug 14, 2008, at 9:32 AM, Martin Buchholz wrote: >>> >>> Hi 2d guys, >>> >>> We're testing different flavors of OpenJDK, >>> and noticing uses of classes in com.sun.image.codec.jpeg. >>> These classes are still in non-OpenJDK JDK7. >>> They were removed from OpenJDK, probably >>> because they were encumbered (proprietary Kodak code). >>> The IcedTea folks have created new versions of these >>> classes, but they appear to be only stubs. >>> >>> Can we have a clear statement about the status? >>> These classes were documented at least for 1.4, e.g. >>> >>> >>> http://java.sun.com/j2se/1.4.2/docs/guide/2d/api-jpeg/com/sun/image/codec/jpeg/JPEGImageEncoder.html >>> >>> There does appear to be full support for the JPEG image >>> standard in OpenJDK and IcedTea. It would be nice if the >>> API in com.sun.image.codec.jpeg could be adapted, or if not, >>> at least provide stubs with clear @deprecated tags that >>> explain to maintainers of legacy code >>> what APIs should be used instead. >>> >>> Thanks, >>> >>> Martin >> >> > From mark at klomp.org Sun Aug 17 07:03:21 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 17 Aug 2008 16:03:21 +0200 Subject: FYI: More auto* generated files fixups Message-ID: <1218981801.3259.4.camel@dijkstra.wildebeest.org> Hi, This removes three generated files that were still in the tree (regenerated by running ./autogen.sh). Set the contact info to this mailinglist and mark this configuration as foreign so it doesn't override INSTALL with the generic GNU version. 2008-08-17 Mark Wielaard * configure.ac (AM_INIT): Set contact to mailinglist. (AM_INIT_AUTOMAKE): Require 1.10, set as foreign (non-gnu). * config.guess: Removed generated file (autogen.sh). * config.sub: Likewise. * install-sh: Likewise. * .hgignore: Add generated files. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: gen-files.patch Type: text/x-patch Size: 659 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080817/4f2d2086/gen-files.patch From mark at klomp.org Sun Aug 17 07:21:30 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 17 Aug 2008 16:21:30 +0200 Subject: Applet do not work In-Reply-To: References: Message-ID: <1218982890.3259.11.camel@dijkstra.wildebeest.org> Hi Mateusz, (CCed distro-pkg-dev where most of the development of the applet plugin is done and Deepak who is currently hacking on the plugin and the liveconnect integration.) On Sun, 2008-08-17 at 12:09 +0200, Mateusz Kaduk wrote: > Here is what I get after running this > http://czateria.interia.pl/czat,room,70,Warszawa > Exception in thread "Chat-GUI-Thread" > java.lang.ExceptionInInitializerError > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:186) > at INTChat.jsFunction(INTChat.java) > at INTChat.run(INTChat.java) > at java.lang.Thread.run(Thread.java:636) > Caused by: java.security.AccessControlException: access denied > (java.util.PropertyPermission netscape.jsj.dll read) > at > java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) > at > java.security.AccessController.checkPermission(AccessController.java:553) > at > java.lang.SecurityManager.checkPermission(SecurityManager.java:549) > at > net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:267) > at > java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302) > at java.lang.System.getProperty(System.java:705) > at > netscape.javascript.JSObject.(JSObject.java) > ... 5 more > > > Full log is on http://pastebin.com/f6ab39580 Thanks. That is very useful. Although I don't immediately have an answer. I am unsure why or whether an applet should have access this this system property and I couldn't find any documentation on it. It seems to have to do with LiveConnect (the java<->javascript bridge). Could you file a bug report at http://icedtea.classpath.org/bugzilla/ with the full log attached? Then we won't forget about the issue. Hopefully Deepak know a bit more about the issues still needing to be resolved with LiveConnect. Thanks, Mark From mark at klomp.org Sun Aug 17 08:59:15 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 17 Aug 2008 15:59:15 +0000 Subject: changeset in /hg/icedtea6: * configure.ac (AM_INIT): Set contact... Message-ID: changeset 8bd5f7718ae0 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8bd5f7718ae0 description: * configure.ac (AM_INIT): Set contact to mailinglist. (AM_INIT_AUTOMAKE): Require 1.10, set as foreign (non-gnu). * config.guess: Removed generated file (autogen.sh). * config.sub: Likewise. * install-sh: Likewise. * .hgignore: Add generated files. diffstat: 6 files changed, 14 insertions(+), 3681 deletions(-) .hgignore | 3 ChangeLog | 9 config.guess | 1532 ------------------------------------------------------ config.sub | 1640 ---------------------------------------------------------- configure.ac | 4 install-sh | 507 ----------------- diffs (truncated from 3736 to 500 lines): diff -r bb468b09871b -r 8bd5f7718ae0 .hgignore --- a/.hgignore Fri Aug 15 15:51:05 2008 +0200 +++ b/.hgignore Sun Aug 17 16:03:52 2008 +0200 @@ -16,7 +16,10 @@ stamps stamps Makefile config.log +config.guess +config.sub config.status +install-sh javac javap gcjwebplugin.so diff -r bb468b09871b -r 8bd5f7718ae0 ChangeLog --- a/ChangeLog Fri Aug 15 15:51:05 2008 +0200 +++ b/ChangeLog Sun Aug 17 16:03:52 2008 +0200 @@ -43,6 +43,15 @@ 2008-08-14 Lillian Angel + + * configure.ac (AM_INIT): Set contact to mailinglist. + (AM_INIT_AUTOMAKE): Require 1.10, set as foreign (non-gnu). + * config.guess: Removed generated file (autogen.sh). + * config.sub: Likewise. + * install-sh: Likewise. + * .hgignore: Add generated files. 2008-08-14 Mark Wielaard diff -r bb468b09871b -r 8bd5f7718ae0 config.guess --- a/config.guess Fri Aug 15 15:51:05 2008 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1532 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-01-15' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi at noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -if [ "${UNAME_SYSTEM}" = "Linux" ] ; then - eval $set_cc_for_build - cat << EOF > $dummy.c - #include - #ifdef __UCLIBC__ - # ifdef __UCLIBC_CONFIG_VERSION__ - LIBC=uclibc __UCLIBC_CONFIG_VERSION__ - # else - LIBC=uclibc - # endif - #else - LIBC=gnu - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` -fi - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax From bugzilla-daemon at icedtea.classpath.org Sun Aug 17 15:47:54 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 17 Aug 2008 22:47:54 +0000 Subject: [Bug 186] New: Applet does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=186 Summary: Applet does not work Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: mateusz.kaduk at gmail.com I have ii openjdk-6-jre 6b11-6 OpenJDK Java runtime, using Hotspot JIT ii openjdk-6-jre-headless 6b11-6 OpenJDK Java runtime, using Hotspot JIT (hea ii openjdk-6-jre-lib 6b11-6 OpenJDK Java runtime (architecture independe and after opening this page http://czateria.interia.pl/czat,room,70,Warszawa I get the following error # Exception in thread "Chat-GUI-Thread" java.lang.ExceptionInInitializerError # at java.lang.Class.forName0(Native Method) # at java.lang.Class.forName(Class.java:186) # at INTChat.jsFunction(INTChat.java) # at INTChat.run(INTChat.java) # at java.lang.Thread.run(Thread.java:636) # Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission netscape.jsj.dll read) # at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) # at java.security.AccessController.checkPermission(AccessController.java:553) # at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) # at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:267) # at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302) # at java.lang.System.getProperty(System.java:705) # at netscape.javascript.JSObject.(JSObject.java) # ... 5 more Full log is at http://pastebin.com/f6ab39580 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From gnu_andrew at member.fsf.org Mon Aug 18 06:27:08 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 18 Aug 2008 14:27:08 +0100 Subject: Is third party code included in langtools sources? In-Reply-To: <48A9645F.7070802@sun.com> References: <489889EC.3020003@sun.com> <17c6771e0808151115p47cfd40ak8e6bc1e483de3d25@mail.gmail.com> <48A9645F.7070802@sun.com> Message-ID: <17c6771e0808180627o13f332a9mf098e84df1d769d9@mail.gmail.com> On 18/08/2008, Yulia Novozhilova wrote: > Hi, > > Andrew John Hughes wrote: > > > The more obvious question for me is why NetBeans needs a fork of this > > in the first place. The Debian OpenJDK team have already gone through > > the extensive task of verifying this code legally to package OpenJDK > > 6, which is now in unstable and testing: > > > > > http://release.debian.org/migration/testing.pl?package=openjdk-6 > > > > Having another copy in another package seems ludicrous and a > > duplication of existing work. > > > > > There are users who want to use NetBeans but don't want to install openjdk. > (you can find an example here: > https://bugs.launchpad.net/ubuntu/+source/netbeans/+bug/258844) > They already have sun-java6-jdk installed and expect NetBeans to work on > it. > That is why NetBeans needs a fork of the code included into openjdk. > > Thanks, > Yulia > > > > > It doesn't explain why a fork is needed. It just says that NetBeans has to be able to work against either the langtools from OpenJDK or the proprietary Sun JDK. As I read it, a fork solution is suggesting a third alternative, namely to include another different copy of the langtools for NetBeans. In short, what is the reason NetBeans can't just work against the tools.zip in either JDK? -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From Yulia.Novozhilova at Sun.COM Mon Aug 18 05:00:31 2008 From: Yulia.Novozhilova at Sun.COM (Yulia Novozhilova) Date: Mon, 18 Aug 2008 16:00:31 +0400 Subject: Is third party code included in langtools sources? In-Reply-To: <17c6771e0808151115p47cfd40ak8e6bc1e483de3d25@mail.gmail.com> References: <489889EC.3020003@sun.com> <17c6771e0808151115p47cfd40ak8e6bc1e483de3d25@mail.gmail.com> Message-ID: <48A9645F.7070802@sun.com> Hi, Andrew John Hughes wrote: > The more obvious question for me is why NetBeans needs a fork of this > in the first place. The Debian OpenJDK team have already gone through > the extensive task of verifying this code legally to package OpenJDK > 6, which is now in unstable and testing: > > http://release.debian.org/migration/testing.pl?package=openjdk-6 > > Having another copy in another package seems ludicrous and a > duplication of existing work. > There are users who want to use NetBeans but don't want to install openjdk. (you can find an example here: https://bugs.launchpad.net/ubuntu/+source/netbeans/+bug/258844) They already have sun-java6-jdk installed and expect NetBeans to work on it. That is why NetBeans needs a fork of the code included into openjdk. Thanks, Yulia From bugzilla-daemon at icedtea.classpath.org Mon Aug 18 10:01:25 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 18 Aug 2008 17:01:25 +0000 Subject: [Bug 186] Applet does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=186 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #1 from langel at redhat.com 2008-08-18 17:01 ------- This applet requires liveconnect support. *** This bug has been marked as a duplicate of bug 85 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From robermann at gmail.com Tue Aug 19 08:25:18 2008 From: robermann at gmail.com (Roberto Mannai) Date: Tue, 19 Aug 2008 17:25:18 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <1218452724.2050.17.camel@dijkstra.wildebeest.org> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> <1218452724.2050.17.camel@dijkstra.wildebeest.org> Message-ID: <414e44f70808190825g5f11d308g503d2de34f891b12@mail.gmail.com> Hi A quick update. On 8/11/08, Mark Wielaard wrote: > Hi Roberto, > In one of your traces that you posted at: > https://bugzilla.novell.com/show_bug.cgi?id=414462 > You see that the java launcher tries to allocate (mmap2) > 603979776 bytes aka 576 MB on your machine, just before the failure, > which you clearly don't have. I started to debug the JVM, and the wrong result can be read into: openjdk/hotspot/src/share/vm/memory/genCollectedHeap.cpp:193 When looping for three times, I have: print total_reserved 0 print total_reserved 41287680 = 39,375 mb print total_reserved 603979776 = 576mb print _n_gens 2 The lines are the following: for (int i = 0; i < _n_gens; i++) { total_reserved += _gen_specs[i]->max_size(); *** break and print total_reserved *** if (total_reserved < _gen_specs[i]->max_size()) { vm_exit_during_initialization(overflow_msg); } n_covered_regions += _gen_specs[i]->n_covered_regions(); } The problem seems related to the generations. I'll continue the analysis. Ciao Roberto Mannai > > If you could help us figure out where/what precisely is guessing > something wrong for your setup that would be nice. I don't immediately > have a suggestion. But start by tracing which of the os::*memory() > functions in openjdk/hotspot/src/os_cpu/*/vm/os_*.cpp are called and > what they return in your setup would be a good start. > > There seems to be a second bug during the cleanup after the abort > because of too limited memory. That is the "** glibc detected *** java: > free(): invalid pointer" you are seeing. Something is probably freeing > something that was never allocated in this case. > > Cheers, > > Mark > > From bugzilla-daemon at icedtea.classpath.org Tue Aug 19 12:28:19 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 19 Aug 2008 19:28:19 +0000 Subject: [Bug 181] enum issue with icedtea Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=181 ------- Comment #7 from ranger at opennms.org 2008-08-19 19:28 ------- Are there snapshot RPMs somewhere I could try to see if it works so I can see if any other issues come up? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From gbenson at redhat.com Wed Aug 20 01:12:46 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 20 Aug 2008 08:12:46 +0000 Subject: changeset in /hg/icedtea6: 2008-08-20 Gary Benson changeset 67600de741be in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=67600de741be description: 2008-08-20 Gary Benson * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp (VMlongDiv): Handle the special case of division of the most negative value possible by -1. (VMlongRem): Likewise. diffstat: 2 files changed, 13 insertions(+), 3 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp | 9 ++++++--- diffs (40 lines): diff -r 8bd5f7718ae0 -r 67600de741be ChangeLog --- a/ChangeLog Sun Aug 17 16:03:52 2008 +0200 +++ b/ChangeLog Wed Aug 20 04:12:41 2008 -0400 @@ -1,3 +1,10 @@ 2008-08-15 Matthias Klose + + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp + (VMlongDiv): Handle the special case of division of the most + negative value possible by -1. + (VMlongRem): Likewise. + 2008-08-15 Matthias Klose * acinclude.m4 (FIND_LIBGCJ_JAR): Extend check for libgcj-4.2.*.jar. diff -r 8bd5f7718ae0 -r 67600de741be ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp --- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Sun Aug 17 16:03:52 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Wed Aug 20 04:12:41 2008 -0400 @@ -54,8 +54,9 @@ inline jlong BytecodeInterpreter::VMlong } inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) { - // QQQ what about check and throw... - return op1 / op2; + /* it's possible we could catch this special case implicitly */ + if (op1 == (jlong) 0x8000000000000000LL && op2 == -1) return op1; + else return op1 / op2; } inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) { @@ -75,7 +76,9 @@ inline jlong BytecodeInterpreter::VMlong } inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) { - return op1 % op2; + /* it's possible we could catch this special case implicitly */ + if (op1 == (jlong) 0x8000000000000000LL && op2 == -1) return 0; + else return op1 % op2; } inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) { From gbenson at redhat.com Wed Aug 20 01:24:50 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 20 Aug 2008 08:24:50 +0000 Subject: changeset in /hg/icedtea6: 2008-08-20 Gary Benson changeset 4f4d268762d7 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4f4d268762d7 description: 2008-08-20 Gary Benson * patches/icedtea-shark.patch: Updated to latest Shark. * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: Likewise. * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise. * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp: Likewise. * ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkType.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise. * ports/hotspot/src/cpu/zero/vm/entry_zero.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkEntry.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkEntry.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMethod.hpp: Removed. diffstat: 31 files changed, 1536 insertions(+), 628 deletions(-) ChangeLog | 34 patches/icedtea-shark.patch | 2 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp | 25 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp | 27 ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp | 39 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp | 34 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp | 11 ports/hotspot/src/cpu/zero/vm/entry_zero.hpp | 60 ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp | 1 ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp | 10 ports/hotspot/src/share/vm/includeDB_shark | 15 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 981 ++++++++-- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 98 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 2 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 62 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 101 - ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 11 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp | 14 ports/hotspot/src/share/vm/shark/sharkEntry.cpp | 136 + ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 55 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 92 ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 57 ports/hotspot/src/share/vm/shark/sharkMethod.hpp | 91 ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 12 ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 19 ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 6 ports/hotspot/src/share/vm/shark/sharkState.cpp | 25 ports/hotspot/src/share/vm/shark/sharkState.hpp | 5 ports/hotspot/src/share/vm/shark/sharkType.cpp | 10 ports/hotspot/src/share/vm/shark/sharkType.hpp | 11 ports/hotspot/src/share/vm/shark/sharkValue.hpp | 118 - diffs (truncated from 3308 to 500 lines): diff -r 67600de741be -r 4f4d268762d7 ChangeLog --- a/ChangeLog Wed Aug 20 04:12:41 2008 -0400 +++ b/ChangeLog Wed Aug 20 04:24:45 2008 -0400 @@ -1,3 +1,37 @@ 2008-08-20 Gary Benson + + * patches/icedtea-shark.patch: Updated to latest Shark. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp: + Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise. + * ports/hotspot/src/share/vm/includeDB_shark: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkType.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/entry_zero.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkEntry.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMethod.hpp: Removed. + 2008-08-20 Gary Benson * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp diff -r 67600de741be -r 4f4d268762d7 patches/icedtea-shark.patch --- a/patches/icedtea-shark.patch Wed Aug 20 04:12:41 2008 -0400 +++ b/patches/icedtea-shark.patch Wed Aug 20 04:24:45 2008 -0400 @@ -181,7 +181,7 @@ diff -ru openjdk/hotspot/src/share/vm/oo OrderAccess::storestore(); +#ifdef SHARK -+ mh->_from_interpreted_entry = SharkMethod::mark(code->instructions_begin()); ++ mh->_from_interpreted_entry = code->instructions_begin(); +#else mh->_from_compiled_entry = code->verified_entry_point(); OrderAccess::storestore(); diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Aug 20 04:24:45 2008 -0400 @@ -28,11 +28,7 @@ int AbstractAssembler::code_fill_byte() { -#ifdef SHARK return 0; -#else - Unimplemented(); -#endif // SHARK } void Assembler::pd_patch_instruction(address branch, address target) @@ -47,27 +43,26 @@ void Assembler::pd_print_patched_instruc } #endif // PRODUCT +void MacroAssembler::align(int modulus) +{ + while (offset() % modulus != 0) + emit_byte(AbstractAssembler::code_fill_byte()); +} + void MacroAssembler::bang_stack_with_offset(int offset) { Unimplemented(); } -void MacroAssembler::align(int modulus) +void MacroAssembler::advance(int bytes) { - // Loads of places assert that code is generated, - // and I'm guessing plenty of places assume that - // *something* was generated. This is a sneaky - // place to emit such a something. - emit_byte(0x23); - - // Probably ought to align it too, while we're here. - while (offset() % modulus != 0) - emit_byte(0x23); + _code_pos += bytes; + sync(); } static void _UnimplementedStub() { - report_unimplemented("fake-generated-code", 23); + report_unimplemented(__FILE__, __LINE__); } address UnimplementedStub() diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Wed Aug 20 04:24:45 2008 -0400 @@ -23,27 +23,20 @@ * */ -// The definitions needed for zero assembly code generation. - -// The zero Assembler: Pure assembler doing NO optimizations on -// the instruction level; i.e., what you write is what you get. -// The Assembler is generating code into a CodeBuffer. +// In normal, CPU-specific ports of HotSpot these two classes are used +// for generating assembly language. We don't do any of this in zero, +// of course, but we do sneak entry points around in CodeBuffers so we +// generate those here. class Assembler : public AbstractAssembler { public: Assembler(CodeBuffer* code) : AbstractAssembler(code) {} - // Function to fix up forward branches void pd_patch_instruction(address branch, address target); #ifndef PRODUCT static void pd_print_patched_instruction(address branch); #endif // PRODUCT }; - -// MacroAssembler extends Assembler by frequently used macros. -// -// Instructions for which a 'better' code sequence exists depending -// on arguments should also go in here. class MacroAssembler : public Assembler { public: @@ -52,17 +45,8 @@ class MacroAssembler : public Assembler void align(int modulus); void bang_stack_with_offset(int offset); -#ifdef SHARK public: - void emit_zero_byte() - { - emit_byte(0); - } - void emit_intptr(intptr_t x) - { - emit_address((address) x); - } -#endif // SHARK + void advance(int bytes); }; #ifdef ASSERT @@ -79,4 +63,5 @@ address ShouldNotReachHereStub(); // Nothing to do with the assembler (or lack of), // just a real convenient place to include these. #include +#include #include diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp Wed Aug 20 04:24:45 2008 -0400 @@ -0,0 +1,39 @@ +/* + * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008 Red Hat, Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + + protected: + MacroAssembler* assembler() const + { + return _masm; + } + + protected: + address generate_entry(ZeroEntry::method_entry_t entry_point) + { + ZeroEntry *entry = (ZeroEntry *) assembler()->pc(); + assembler()->advance(sizeof(ZeroEntry)); + entry->set_entry_point(entry_point); + return (address) entry; + } diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Aug 20 04:24:45 2008 -0400 @@ -37,7 +37,7 @@ thread->reset_last_Java_frame(); \ fixup_after_potential_safepoint() -void CppInterpreter::normal_entry(methodOop method, TRAPS) +void CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -146,7 +146,7 @@ void CppInterpreter::normal_entry(method stack->push(result[-i]); } -void CppInterpreter::native_entry(methodOop method, TRAPS) +void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -374,7 +374,7 @@ void CppInterpreter::native_entry(method } } -void CppInterpreter::accessor_entry(methodOop method, TRAPS) +void CppInterpreter::accessor_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -382,7 +382,7 @@ void CppInterpreter::accessor_entry(meth // Drop into the slow path if we need a safepoint check if (SafepointSynchronize::do_call_back()) { - normal_entry(method, THREAD); + normal_entry(method, 0, THREAD); return; } @@ -390,7 +390,7 @@ void CppInterpreter::accessor_entry(meth // if we have a NullPointerException oop object = LOCALS_OBJECT(0); if (object == NULL) { - normal_entry(method, THREAD); + normal_entry(method, 0, THREAD); return; } @@ -413,7 +413,7 @@ void CppInterpreter::accessor_entry(meth constantPoolCacheOop cache = method->constants()->cache(); ConstantPoolCacheEntry* entry = cache->entry_at(index); if (!entry->is_resolved(Bytecodes::_getfield)) { - normal_entry(method, THREAD); + normal_entry(method, 0, THREAD); return; } @@ -505,14 +505,14 @@ void CppInterpreter::accessor_entry(meth } } -void CppInterpreter::empty_entry(methodOop method, TRAPS) +void CppInterpreter::empty_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); // Drop into the slow path if we need a safepoint check if (SafepointSynchronize::do_call_back()) { - normal_entry(method, THREAD); + normal_entry(method, 0, THREAD); return; } @@ -609,7 +609,7 @@ address InterpreterGenerator::generate_e if (!UseFastEmptyMethods) return NULL; - return (address) CppInterpreter::empty_entry; + return generate_entry(CppInterpreter::empty_entry); } address InterpreterGenerator::generate_accessor_entry() @@ -617,19 +617,21 @@ address InterpreterGenerator::generate_a if (!UseFastAccessorMethods) return NULL; - return (address) CppInterpreter::accessor_entry; + return generate_entry(CppInterpreter::accessor_entry); } address InterpreterGenerator::generate_native_entry(bool synchronized) { assert (synchronized == false, "should be"); - return (address) CppInterpreter::native_entry; + + return generate_entry(CppInterpreter::native_entry); } address InterpreterGenerator::generate_normal_entry(bool synchronized) { assert (synchronized == false, "should be"); - return (address) CppInterpreter::normal_entry; + + return generate_entry(CppInterpreter::normal_entry); } address AbstractInterpreterGenerator::generate_method_entry( @@ -679,10 +681,6 @@ address AbstractInterpreterGenerator::ge if (entry_point == NULL) entry_point = ((InterpreterGenerator*)this)->generate_normal_entry(false); -#ifdef SHARK - assert(!SharkMethod::is_shark_method(entry_point), "shouldn't be"); -#endif // SHARK - return entry_point; } @@ -732,21 +730,25 @@ bool CppInterpreter::contains(address pc address CppInterpreterGenerator::generate_result_handler_for( BasicType type) { + assembler()->advance(1); return ShouldNotReachHereStub(); } address CppInterpreterGenerator::generate_tosca_to_stack_converter( BasicType type) { + assembler()->advance(1); return ShouldNotReachHereStub(); } address CppInterpreterGenerator::generate_stack_to_stack_converter( BasicType type) { + assembler()->advance(1); return ShouldNotReachHereStub(); } address CppInterpreterGenerator::generate_stack_to_native_abi_converter( BasicType type) { + assembler()->advance(1); return ShouldNotReachHereStub(); } diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Wed Aug 20 04:24:45 2008 -0400 @@ -25,13 +25,12 @@ protected: - // Size of interpreter code. We don't have generated code so - // this should be zero, but that hits all kinds of assertions + // Size of interpreter code const static int InterpreterCodeSize = 6 * K; private: // Method entries - static void normal_entry(methodOop method, TRAPS); - static void native_entry(methodOop method, TRAPS); - static void accessor_entry(methodOop method, TRAPS); - static void empty_entry(methodOop method, TRAPS); + static void normal_entry(methodOop method, intptr_t UNUSED, TRAPS); + static void native_entry(methodOop method, intptr_t UNUSED, TRAPS); + static void accessor_entry(methodOop method, intptr_t UNUSED, TRAPS); + static void empty_entry(methodOop method, intptr_t UNUSED, TRAPS); diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/entry_zero.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/entry_zero.hpp Wed Aug 20 04:24:45 2008 -0400 @@ -0,0 +1,60 @@ +/* + * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008 Red Hat, Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +class ZeroEntry { + public: + ZeroEntry() + { + ShouldNotCallThis(); + } + + public: + typedef void (*method_entry_t)(methodOop method, intptr_t base_pc, TRAPS); + + private: + method_entry_t _entry_point; + + public: + method_entry_t entry_point() const + { + return _entry_point; + } + void set_entry_point(method_entry_t entry_point) + { + _entry_point = entry_point; + } + + public: + void invoke(methodOop method, TRAPS) const + { + entry_point()(method, (intptr_t) this, THREAD); + } + + public: + static ByteSize entry_point_offset() + { + return byte_offset_of(ZeroEntry, _entry_point); + } +}; diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Wed Aug 20 04:24:45 2008 -0400 @@ -28,6 +28,7 @@ address AbstractInterpreterGenerator::generate_slow_signature_handler() { + _masm->advance(1); return (address) InterpreterRuntime::slow_signature_handler; } diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Wed Aug 20 04:24:45 2008 -0400 @@ -24,17 +24,9 @@ */ public: - typedef void (*method_entry_t)(methodOop method, TRAPS); - static void invoke_method(methodOop method, address entry_point, TRAPS) { -#ifdef SHARK - if (SharkMethod::is_shark_method(entry_point)) { - SharkMethod::get(entry_point)->invoke(method, THREAD); - return; - } -#endif // SHARK - ((method_entry_t) entry_point) (method, THREAD); + ((ZeroEntry *) entry_point)->invoke(method, THREAD); } public: diff -r 67600de741be -r 4f4d268762d7 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Aug 20 04:12:41 2008 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Aug 20 04:24:45 2008 -0400 @@ -56,9 +56,7 @@ globals.hpp globals.cpp shark_globals.hpp -interpreter.hpp sharkMethod.hpp - -methodOop.cpp sharkMethod.hpp +methodOop.cpp sharkEntry.hpp shark_globals.cpp shark_globals.hpp @@ -126,6 +124,7 @@ sharkCompiler.cpp sharkCompiler.cpp oopRecorder.hpp sharkCompiler.cpp shark_globals.hpp sharkCompiler.cpp sharkCompiler.hpp +sharkCompiler.cpp sharkEntry.hpp sharkCompiler.cpp sharkFunction.hpp sharkCompiler.cpp sharkRuntime.hpp @@ -153,12 +152,18 @@ sharkConstantPool.hpp sharkConstantPool.hpp sharkBlock.hpp sharkConstantPool.hpp sharkBuilder.hpp +sharkEntry.cpp sharkEntry.hpp From gbenson at redhat.com Wed Aug 20 01:58:20 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 20 Aug 2008 09:58:20 +0100 Subject: Shark 0.03 Message-ID: <20080820085820.GA3851@redhat.com> Hi all, I just updated the icedtea6 repository with the latest Shark. The main reason for this release is that Andrew Haley pointed out that the marked-method stuff I was using to differentiate compiled methods and interpreted methods didn't work on amd64. While it was possible to make it work there, I don't like the idea of having something that needs tweaking for each new platform you build on, so made interpreted methods have the same calling convention as compiled ones which makes the need for differentiation obsolete. Other new features in this release include support for long, float, and double values, and a massive pile of new bytecodes: lconst_0, lconst_1, fconst_0, fconst_1, fconst_2, dconst_0, dconst_1, lload, fload, dload, lload_0, lload_1, lload_2, lload_3, fload_0, fload_1, fload_2, fload_3, dload_0, dload_1, dload_2, dload_3, laload, faload, daload, lstore, fstore, dstore, lstore_0, lstore_1, lstore_2, lstore_3, fstore_0, fstore_1, fstore_2, fstore_3, dstore_0, dstore_1, dstore_2, dstore_3, lastore, fastore, dastore, pop2, dup_x1, dup_x2, dup2, dup2_x1, dup2_x2, swap, ladd, fadd, dadd, lsub, fsub, dsub, lmul, fmul, dmul, idiv, ldiv, fdiv, ddiv, irem, lrem, frem, drem, lneg, fneg, dneg, lshl, lshr, lushr, land, lor, lxor, i2l, i2f, i2d, l2i, l2f, l2d, f2i, f2l, f2d, d2i, d2l, d2f, i2s, lcmp, lreturn, freturn, dreturn, newarray, monitorenter and monitorexit. Check out the coverage page (http://gbenson.net/?page_id=71), it's awesome! Cheers, Gary -- http://gbenson.net/ From gbenson at redhat.com Wed Aug 20 02:07:40 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 20 Aug 2008 10:07:40 +0100 Subject: Shark: fix some minor typos (and thinkos) In-Reply-To: <48A455F4.60802@redhat.com> References: <48A455F4.60802@redhat.com> Message-ID: <20080820090740.GB3851@redhat.com> Andrew Haley wrote: > - : IRBuilder(), > + : IRBuilder<>(), ... > -class SharkBuilder : public llvm::IRBuilder { > +class SharkBuilder : public llvm::IRBuilder<> { ... > - llvm::Value* intptr_value(llvm::IRBuilder* builder) const > + llvm::Value* intptr_value(llvm::IRBuilder<>* builder) const This patch breaks the build for older g++s. Is there any way it can be made to work for all? Cheers, Gary -- http://gbenson.net/ From aph at redhat.com Wed Aug 20 02:43:36 2008 From: aph at redhat.com (Andrew Haley) Date: Wed, 20 Aug 2008 10:43:36 +0100 Subject: Shark: fix some minor typos (and thinkos) In-Reply-To: <20080820090740.GB3851@redhat.com> References: <48A455F4.60802@redhat.com> <20080820090740.GB3851@redhat.com> Message-ID: <48ABE748.30000@redhat.com> Gary Benson wrote: > Andrew Haley wrote: >> - : IRBuilder(), >> + : IRBuilder<>(), > ... >> -class SharkBuilder : public llvm::IRBuilder { >> +class SharkBuilder : public llvm::IRBuilder<> { > ... >> - llvm::Value* intptr_value(llvm::IRBuilder* builder) const >> + llvm::Value* intptr_value(llvm::IRBuilder<>* builder) const > > This patch breaks the build for older g++s. Is there any way it can > be made to work for all? Hmm, I wonder why it breaks. I'd try inserting the default template arguments. I think they were something like . Andrew. From gnu_andrew at member.fsf.org Wed Aug 20 11:36:25 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 20 Aug 2008 19:36:25 +0100 Subject: Is third party code included in langtools sources? In-Reply-To: <48AC4D19.7070204@sun.com> References: <489889EC.3020003@sun.com> <17c6771e0808151115p47cfd40ak8e6bc1e483de3d25@mail.gmail.com> <48A9645F.7070802@sun.com> <17c6771e0808180627o13f332a9mf098e84df1d769d9@mail.gmail.com> <48AC4D19.7070204@sun.com> Message-ID: <17c6771e0808201136n1b3ca436s9bd62a17edc1ddd9@mail.gmail.com> On 20/08/2008, Yulia Novozhilova wrote: > Hi, > sorry for not responding earlier. > Here is more qualified answer on your question: > > Jan Lahoda wrote: > > > Hi, > > the javac in the langtools repository is currently more a command line > tool than a Java parser suitable for an IDE. The NetBeans' fork contains a > lot of changes that make the parser more IDE friendly. An example for all: > the javac works in "phases" - it first parses the source, then attributes > classes/methods/fields declarations, then attributes the "bodies" of > methods, etc. The vanilla javac will not continue to another phase if there > was an compilation error in the previous phase. This behavior is > unacceptable for IDE, so we have patched the parser to execute "all" phases > even in presence of errors. > > > > The long-term intent is to merge (ideally all) NetBeans patches into the > vanilla javac, but the progress is quite slow. > > > > I think there are also "latency" problems - even if all the NetBeans > patches would be adopted into the JDK7 langtools today, it would still take > a long time before it would get into the packages (I think at least - if you > are producing package only for "releases", than the changes would be visible > either after OpenJDK7 would be released or after OpenJDK6 would adopt these > changes, which both would take some time). Something similar would be true > for any further change we would do. > > > > Hope this answers your question, > > Jan > > That does; it establishes that there is a third copy of langtools used for NetBeans that wasn't clear from your initial e-mail. > Anyway, my goal is to create a package for javaparser that is needed for > NetBeans. And I have an aggressive timetable. > So, could you please, provide me with information about third party code. > Is it difficult? I believe langtools repository doesn't contain any third > party code and THIRD_PARTY_README and ASSEMBLY_EXCEPTION > can be removed. > You should check with Sun legal -- IANAL. From the files in the OpenJDK7 tree, it would seem that all the Java files are under the GPL and copyrighted to Sun with the exception of one ( src/share/sample/javac/processing/src/CheckNamesProcessor.java) which appears to be BSD licensed. Most tests don't seem to include copyright information. There doesn't appear to be any third-party code mentioned by the THIRD_PARTY_README, which appears to largely be stuff from the JDK. I think you need to keep the ASSEMBLY_EXCEPTION as it allows pure GPL code to be linked with GPL+Classpath exception code, and most of the code uses the Classpath exception. 'it allows licensees and sublicensees of Sun's GPL2 OpenJDK Code to build an executable that includes those portions of necessary code that Sun could not provide under GPL2 (or that Sun has provided under GPL2 with the Classpath exception).' > Thanks, > Yulia > > > Andrew John Hughes wrote: > > > On 18/08/2008, Yulia Novozhilova wrote: > > > > > > > Hi, > > > > > > Andrew John Hughes wrote: > > > > > > > > > > > > > The more obvious question for me is why NetBeans needs a fork of this > > > > in the first place. The Debian OpenJDK team have already gone through > > > > the extensive task of verifying this code legally to package OpenJDK > > > > 6, which is now in unstable and testing: > > > > > > > > > > > > > > > > > > > > http://release.debian.org/migration/testing.pl?package=openjdk-6 > > > > > > > > > > Having another copy in another package seems ludicrous and a > > > > duplication of existing work. > > > > > > > > > > > > > > > > > > > There are users who want to use NetBeans but don't want to install > openjdk. > > > (you can find an example here: > > > > https://bugs.launchpad.net/ubuntu/+source/netbeans/+bug/258844) > > > They already have sun-java6-jdk installed and expect NetBeans to work > on > > > it. > > > That is why NetBeans needs a fork of the code included into openjdk. > > > > > > Thanks, > > > Yulia > > > > > > > > > > > > > > > > > > > > > > > > > It doesn't explain why a fork is needed. It just says that NetBeans > > has to be able to work against either the langtools from OpenJDK or > > the proprietary Sun JDK. As I read it, a fork solution is suggesting > > a third alternative, namely to include another different copy of the > > langtools for NetBeans. > > > > In short, what is the reason NetBeans can't just work against the > > tools.zip in either JDK? > > > > > > -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From robermann at gmail.com Wed Aug 20 14:48:33 2008 From: robermann at gmail.com (Roberto Mannai) Date: Wed, 20 Aug 2008 23:48:33 +0200 Subject: openjdk,icedtea - Xmx option mandatory In-Reply-To: <414e44f70808190825g5f11d308g503d2de34f891b12@mail.gmail.com> References: <414e44f70808020442n6e6bec20kb18bca726a99e035@mail.gmail.com> <4896E5B9.7020603@redhat.com> <414e44f70808040523t55812505w92f753d94ef5976a@mail.gmail.com> <1217853319.3061.11.camel@dijkstra.wildebeest.org> <414e44f70808041247v2b7da6b8x1078b69b1f90a663@mail.gmail.com> <414e44f70808081441n296e54a5xce8cadad42d32691@mail.gmail.com> <414e44f70808081633m76d43ac9x211527bc35ed9271@mail.gmail.com> <1218452724.2050.17.camel@dijkstra.wildebeest.org> <414e44f70808190825g5f11d308g503d2de34f891b12@mail.gmail.com> Message-ID: <414e44f70808201448h578f63adj949eeea3df6fea59@mail.gmail.com> After some debug I have found the following: * File collectorPolicy.cpp: >From CollectorPolicy::initialize_size_info() I have: _max_heap_byte_size = align_size_up(MaxHeapSize, max_alignment()) = 512 mb. where max_alignment() = 2 mb MaxHeapSize = 512 mb Then into TwoGenerationCollectorPolicy::initialize_size_info() I have: _max_heap_byte_size = 536870912 (512 mb) _max_gen0_size = 41287680 (39,375 mb) _max_gen1_size = _max_heap_byte_size - _max_gen0_size = 495583232 (472.625 mb) Then into MarkSweepPolicy::initialize_generations() I have: _generations[0] = new GenerationSpec(Generation::DefNew, _initial_gen0_size, _max_gen0_size); _generations[1] = new GenerationSpec(Generation::MarkSweepCompact, _initial_gen1_size, _max_gen1_size); * Going to the file genCollectedHeap.cpp: In the method GenCollectedHeap::allocate(), I have: total_reserved = 512 mb total_reserved += perm_gen_spec->max_size(); total_reserved = 576mb So adding the max size of PermGen sums up to 603979776 bytes. I found no call to os:: memory related functions from os_linux.cpp (os::available_memory() or os::physical_memory()). physical_memory is called by arguments.cpp only when there is a UseParallelGC or AggressiveHeap option. In conclusion: it seems to me that, running without the Xmx option, MaxHeapSize values 512 because is so defined in hotspot/src/share/vm/runtime/globals.hpp. Adding the max perm size to the two generations max sizes returns the value of 576 mb, which is greater of my RAM (512 mb). That's all for me, I hope this can help you. Ciao Roberto Mannai On Tue, Aug 19, 2008 at 5:25 PM, Roberto Mannai wrote: > Hi > A quick update. > > On 8/11/08, Mark Wielaard wrote: >> Hi Roberto, >> In one of your traces that you posted at: >> https://bugzilla.novell.com/show_bug.cgi?id=414462 >> You see that the java launcher tries to allocate (mmap2) >> 603979776 bytes aka 576 MB on your machine, just before the failure, >> which you clearly don't have. > > I started to debug the JVM, and the wrong result can be read into: > openjdk/hotspot/src/share/vm/memory/genCollectedHeap.cpp:193 > > When looping for three times, I have: > print total_reserved > 0 > print total_reserved > 41287680 = 39,375 mb > print total_reserved > 603979776 = 576mb > print _n_gens > 2 > > The lines are the following: > for (int i = 0; i < _n_gens; i++) { > total_reserved += _gen_specs[i]->max_size(); > *** break and print total_reserved *** > if (total_reserved < _gen_specs[i]->max_size()) { > vm_exit_during_initialization(overflow_msg); > } > n_covered_regions += _gen_specs[i]->n_covered_regions(); > } > > The problem seems related to the generations. I'll continue the analysis. > > Ciao > Roberto Mannai > >> >> If you could help us figure out where/what precisely is guessing >> something wrong for your setup that would be nice. I don't immediately >> have a suggestion. But start by tracing which of the os::*memory() >> functions in openjdk/hotspot/src/os_cpu/*/vm/os_*.cpp are called and >> what they return in your setup would be a good start. >> >> There seems to be a second bug during the cleanup after the abort >> because of too limited memory. That is the "** glibc detected *** java: >> free(): invalid pointer" you are seeing. Something is probably freeing >> something that was never allocated in this case. >> >> Cheers, >> >> Mark >> >> > From gnu_andrew at member.fsf.org Wed Aug 20 15:53:04 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 20 Aug 2008 23:53:04 +0100 Subject: Shark 0.03 In-Reply-To: <20080820085820.GA3851@redhat.com> References: <20080820085820.GA3851@redhat.com> Message-ID: <17c6771e0808201553md2b496wffc98d7954b6829d@mail.gmail.com> On 20/08/2008, Gary Benson wrote: > Hi all, > > I just updated the icedtea6 repository with the latest Shark. > The main reason for this release is that Andrew Haley pointed > out that the marked-method stuff I was using to differentiate > compiled methods and interpreted methods didn't work on amd64. > While it was possible to make it work there, I don't like the > idea of having something that needs tweaking for each new > platform you build on, so made interpreted methods have the > same calling convention as compiled ones which makes the need > for differentiation obsolete. > > Other new features in this release include support for long, > float, and double values, and a massive pile of new bytecodes: > > lconst_0, lconst_1, fconst_0, fconst_1, fconst_2, dconst_0, > dconst_1, lload, fload, dload, lload_0, lload_1, lload_2, > lload_3, fload_0, fload_1, fload_2, fload_3, dload_0, dload_1, > dload_2, dload_3, laload, faload, daload, lstore, fstore, > dstore, lstore_0, lstore_1, lstore_2, lstore_3, fstore_0, > fstore_1, fstore_2, fstore_3, dstore_0, dstore_1, dstore_2, > dstore_3, lastore, fastore, dastore, pop2, dup_x1, dup_x2, > dup2, dup2_x1, dup2_x2, swap, ladd, fadd, dadd, lsub, fsub, > dsub, lmul, fmul, dmul, idiv, ldiv, fdiv, ddiv, irem, lrem, > frem, drem, lneg, fneg, dneg, lshl, lshr, lushr, land, lor, > lxor, i2l, i2f, i2d, l2i, l2f, l2d, f2i, f2l, f2d, d2i, d2l, > d2f, i2s, lcmp, lreturn, freturn, dreturn, newarray, > monitorenter and monitorexit. > > Check out the coverage page (http://gbenson.net/?page_id=71), > it's awesome! > > Cheers, > Gary > > > -- > http://gbenson.net/ > Definitely is! Have to give this a spin on my ppc64 box... :) Keep up the great work! -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Thu Aug 21 04:05:39 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 21 Aug 2008 11:05:39 +0000 Subject: changeset in /hg/icedtea6: Add test/jtreg.jar to .hgignore. Message-ID: changeset 1842897fe307 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1842897fe307 description: Add test/jtreg.jar to .hgignore. diffstat: 2 files changed, 5 insertions(+) .hgignore | 1 + ChangeLog | 4 ++++ diffs (22 lines): diff -r 4f4d268762d7 -r 1842897fe307 .hgignore --- a/.hgignore Wed Aug 20 04:24:45 2008 -0400 +++ b/.hgignore Thu Aug 21 13:02:39 2008 +0200 @@ -35,6 +35,7 @@ test/hotspot test/hotspot test/jdk test/langtools +test/jtreg.jar test/jtreg/classes rt/com/sun/jdi/AbsentInformationException.java rt/com/sun/jdi/Accessible.java diff -r 4f4d268762d7 -r 1842897fe307 ChangeLog --- a/ChangeLog Wed Aug 20 04:24:45 2008 -0400 +++ b/ChangeLog Thu Aug 21 13:02:39 2008 +0200 @@ -1,3 +1,7 @@ 2008-08-20 Gary Benson + + * .hgignore: Add test/jtreg.jar. + 2008-08-20 Gary Benson * patches/icedtea-shark.patch: Updated to latest Shark. From wim at pizzastop.be Fri Aug 22 00:06:07 2008 From: wim at pizzastop.be (Wim Verreycken) Date: Fri, 22 Aug 2008 09:06:07 +0200 Subject: Someone is doing a linux-sparc port! (Paul Hohensee) Message-ID: Hi Paul, everyone, Could you be as kind as to update me on the status of this? In the meantime, did anything change to the policy not to push the linux-sparc port to the icedtea repo? Thank you, Wim -----Original Message----- From: Wim V Sent: woensdag 5 maart 2008 14:03 To: Paul.Hohensee at Sun.COM Subject: RE: Someone is doing a linux-sparc port! (Paul Hohensee) Paul, If I understand correctly : 1) the linux-sparc port (32 or 64 bit) will not be included in icedtea 2) the linux-sparc 32 port is already in openjdk7, source and make files for target linux_sparc.ad have to be copied from this source to build icedtea7 on sparc32 3) for the build to also complete on sparc64, I have to wait for the hotspot-rt port someone is still writing for sparc 64-bit? Can you confirm this, as it still a little vague here? Wim -----Original Message----- From: Paul.Hohensee at Sun.COM [mailto:Paul.Hohensee at Sun.COM] Sent: dinsdag 4 maart 2008 19:28 To: wim at pizzastop.be Cc: distro-pkg-dev at openjdk.java.net Subject: Re: Someone is doing a linux-sparc port! (Paul Hohensee) We won't be pushing the linux-sparc port to the icedtea repository. We're building it in from the openjdk jdk7 repository. The makefiles in the latter are already set up for linux-sparc builds, though that was as of a few months ago, so might need tweaking. So all that's needed are the hotspot linux-sparc files. The hotspot port will show up first in the hotspot runtime jdk7 repository http://hg.openjdk.java.net/jdk7/hotspot-rt/ then after some testing (to make sure we haven't broken other platforms) will be pushed up to the jdk7 hotspot integration repository http://hg.openjdk.java.net/jdk7/hotspot/ and eventually after even more testing to the jdk7 master repository http://hg.openjdk.java.net/jdk7/jdk7 You should be able to pull it over to the icedtea repository as soon as it shows up in hotspot-rt. Paul Wim V wrote: I assume it is this linux-sparc hotspot port that I'm building. (I used hg clone http://icedtea.classpath.org/hg/icedtea and make builds everything in a directory named "hotspot") >From the Makefiles it seems the only thing missing to complete my build on sparc64 is a directory named "linux-sparc" under "os_cpu" with about a douzen of c- and header files. If you have built icedtea with success on sparc32, that directory must have been there with the files (at least for a sparc 32 bit cpu) and a target for linux_sparc.ad(!), which is missing in the current source for icedtea7. Otherwise not possible, you will need it for your 32-bit build as well. So where can I find these missing files pls? And which version of icedtea did you built with success on 32-bit sparc? wim P.S. I had some library issues but I fixed those updating to hardy and using some packages from debian lenny testing. Sun has a prototype linux-sparc hotspot port that we've been waiting for the openjdk repositories to open up to post. Last time I tried to build it, 32-bit worked fine, but 64-bit died with some sort of build machine library incompatibility. Anyway, it'll be posted soon, but it's quite definitely unsupported by Sun, etc. If there's enough interest (read, money), Sun might consider supporting it at some future time. I'll post a note as soon as we push it. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080822/22057edf/attachment.html From mark at klomp.org Fri Aug 22 01:32:02 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 22 Aug 2008 10:32:02 +0200 Subject: Someone is doing a linux-sparc port! (Paul Hohensee) In-Reply-To: References: Message-ID: <1219393922.3053.13.camel@dijkstra.wildebeest.org> Hi Wim, On Fri, 2008-08-22 at 09:06 +0200, Wim Verreycken wrote: > Could you be as kind as to update me on the status of this? In the > meantime, did anything change to the policy not to push the > linux-sparc port to the icedtea repo? Hotspot sparc as posted by Paul has been added to the icedtea repo by Matthias back in May, replacing the standard zero based support: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-May/001913.html http://icedtea.classpath.org/hg/icedtea6/rev/33a90721ac50 Fixes for sparc32/64 have been added by Dennis and Tom in June: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-June/002392.html http://icedtea.classpath.org/hg/icedtea6/rev/931f7730ecf9 It is currently shipping in the various GNU/Linux distros: http://sparc.koji.fedoraproject.org/koji/packageinfo?packageID=8220 http://packages.debian.org/sid/openjdk-6-jdk Some background can also be found in this podcast: http://blogs.sun.com/barton808/entry/dgilmore_on_the_fedora_sparc Cheers, Mark From jim at amarooas.com.au Fri Aug 22 01:45:45 2008 From: jim at amarooas.com.au (Jim Watson) Date: Fri, 22 Aug 2008 18:45:45 +1000 Subject: Someone is doing a linux-sparc port! (Paul Hohensee) In-Reply-To: <1219393922.3053.13.camel@dijkstra.wildebeest.org> References: <1219393922.3053.13.camel@dijkstra.wildebeest.org> Message-ID: <48AE7CB9.3070903@amarooas.com.au> Mark Wielaard wrote: > Hi Wim, > > On Fri, 2008-08-22 at 09:06 +0200, Wim Verreycken wrote: > >> Could you be as kind as to update me on the status of this? In the >> meantime, did anything change to the policy not to push the >> linux-sparc port to the icedtea repo? >> > > Hotspot sparc as posted by Paul has been added to the icedtea repo by > Matthias back in May, replacing the standard zero based support: > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-May/001913.html > http://icedtea.classpath.org/hg/icedtea6/rev/33a90721ac50 > > Fixes for sparc32/64 have been added by Dennis and Tom in June: > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-June/002392.html > http://icedtea.classpath.org/hg/icedtea6/rev/931f7730ecf9 > > It is currently shipping in the various GNU/Linux distros: > http://sparc.koji.fedoraproject.org/koji/packageinfo?packageID=8220 > http://packages.debian.org/sid/openjdk-6-jdk > > Some background can also be found in this podcast: > http://blogs.sun.com/barton808/entry/dgilmore_on_the_fedora_sparc > > Cheers, > > Mark > > > It works fine too ;) I checked out b9 and built it on Debian GNU/Linux SPARC recently, then used it to build openoffice.org without any incidents. thanks jim From martinrb at google.com Sat Aug 23 16:22:03 2008 From: martinrb at google.com (Martin Buchholz) Date: Sat, 23 Aug 2008 16:22:03 -0700 Subject: Crash in ciTypeFlow.cpp Message-ID: <1ccfd1c10808231622x25ab2b16i52459b96ce74e361@mail.gmail.com> Hi hotspot maintainers, For a while now, there's been a crash in hotspot compiled with gcc 4.2 in ciTypeFlow.cpp (crashes in Swingset demo) There have been a number of approaches to fixing it. It appears that Matthias Klose has patched icedtea6 as follows: --- openjdk/hotspot/src/share/vm/ci/ciTypeFlow.hpp~ 2008-07-10 22:04:30.000000000 +0200 +++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.hpp 2008-07-25 14:32:03.544802121 +0200 @@ -130,7 +130,7 @@ // Used as a combined index for locals and temps enum Cell { - Cell_0 + Cell_0, Cell_max = UINT_MAX }; // A StateVector summarizes the type information at some Unfortunately, this fails to compile (at least with gcc 4.0 and OpenJDK7) cc1plus: warnings being treated as errors /usr/local/google/home/martin/ws/hotspot/hotspot/src/share/vm/ci/ciTypeFlow.cpp: In member function 'const ciTypeFlow::StateVector* ciTypeFlow::get_start_state()': /usr/local/google/home/martin/ws/hotspot/hotspot/src/share/vm/ci/ciTypeFlow.cpp:392: warning: comparison between signed and unsigned integer expressions make[6]: *** [ciTypeFlow.o] Error 1 Here's another try, and this time let's try to get it into both OpenJDK7 and OpenJDK6. I'll do the push into OpenJDK7. # HG changeset patch # User martin # Date 1219532277 25200 # Node ID 52c7e88431fc50fd682a0506cd9588c476ca7a00 # Parent f8068895c22d848b6f0e6998886652c3d2f51b24 6666666: Crash in ciTypeFlow with gcc 4.2, enum Cell range too small Reviewed-by: Contributed-by: doko at ubuntu.com diff --git a/src/share/vm/ci/ciTypeFlow.hpp b/src/share/vm/ci/ciTypeFlow.hpp --- a/src/share/vm/ci/ciTypeFlow.hpp +++ b/src/share/vm/ci/ciTypeFlow.hpp @@ -127,7 +127,7 @@ // Used as a combined index for locals and temps enum Cell { - Cell_0 + Cell_0, Cell_max = INT_MAX }; // A StateVector summarizes the type information at some There doesn't seem to be a bug for this in bugtraq. Sun folk, please file a bug, and let me know which team hg forest to push this into. For those of us using newer gccs, this is a P1 bug. As justification, note that the existing code is illegal C++ Enum variables must take on values in the range of the enum constants, which was not the case with the old code. @doko: please review. My version of this change maintains the signedness of enum Cell, avoiding possible changes in behavior and subtleties with signed/unsigned comparison. Let's all try harder to get "community"-developed patches upstream. Thanks, Martin From xerxes at zafena.se Mon Aug 25 04:51:00 2008 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 25 Aug 2008 13:51:00 +0200 Subject: Icedtea6 with CACAO jit for ARM EABI softfloat systems. Packaging tips? Message-ID: <48B29CA4.9080107@zafena.se> Greetings! Last week Icedtea got served with CACAO JIT for debian armel softfloat systems: some screenshots here: http://labb.zafena.se/?p=1 It is rather fast comparing to the interperted zero hotspot currently found in lenny so it might benefit the debian armel port users. How do to best package it into .debs for testing? Im not that familiar with the debian way of distributing packages. Have a great day! Xerxes From Dalibor.Topic at Sun.COM Mon Aug 25 05:03:00 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Mon, 25 Aug 2008 14:03:00 +0200 Subject: Icedtea6 with CACAO jit for ARM EABI softfloat systems. Packaging tips? In-Reply-To: <48B29CA4.9080107@zafena.se> References: <48B29CA4.9080107@zafena.se> Message-ID: <48B29F74.6040108@Sun.COM> On 25/08/2008 13:51, Xerxes R?nby wrote: > Greetings! > Last week Icedtea got served with CACAO JIT for debian armel softfloat > systems: > some screenshots here: http://labb.zafena.se/?p=1 Very cool - congrats, in particular for the coolest display of slime volleyball in ages. ;) > How do to best package it into .debs for testing? Im not that familiar > with the debian way of distributing packages. I think the best way would be to contribute your fixes to appropriate places (Cacao & OpenJDK/IcedTea), and make sure the debian cacao-oj6 packages contain them. See http://packages.qa.debian.org/c/cacao-oj6.html for details. cheers, dalibor topic -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From dbhole at redhat.com Mon Aug 25 12:15:36 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 25 Aug 2008 19:15:36 +0000 Subject: changeset in /hg/icedtea6: Added a JNI communication bridge betw... Message-ID: changeset 1be4e928200c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1be4e928200c description: Added a JNI communication bridge between C++ and Java (commented out for now, to maintain stability from TCP) Updated processing model to handle requests in different threads, so that recursuve JS->JAVA->JS calls work (e.g.: http://www.javasonics.com/support/run_liveconnect.php?mayscript) Other bug fixes to fix exceptions and hangs diffstat: 2 files changed, 2516 insertions(+), 1325 deletions(-) IcedTeaPlugin.cc | 1159 ++++++++++++--- patches/icedtea-liveconnect.patch | 2682 +++++++++++++++++++++---------------- diffs (truncated from 4773 to 500 lines): diff -r 1842897fe307 -r 1be4e928200c IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Thu Aug 21 13:02:39 2008 +0200 +++ b/IcedTeaPlugin.cc Mon Aug 25 15:15:30 2008 -0400 @@ -134,6 +134,8 @@ private: #define PLUGIN_TRACE_INSTANCE() Trace _trace ("Instance::", __func__) #define PLUGIN_TRACE_EVENTSINK() Trace _trace ("EventSink::", __func__) #define PLUGIN_TRACE_LISTENER() Trace _trace ("Listener::", __func__) +//#define PLUGIN_TRACE_RC() Trace _trace ("ResultContainer::", __func__) +#define PLUGIN_TRACE_RC() // Error reporting macros. #define PLUGIN_ERROR(message) \ @@ -242,6 +244,7 @@ static GError* channel_error = NULL; static GError* channel_error = NULL; // Fully-qualified appletviewer executable. static char* appletviewer_executable = NULL; +static char* libjvm_so = NULL; #include @@ -301,11 +304,20 @@ char const* TYPES[10] = { "Object", "void" }; // FIXME: create index from security context. -#define MESSAGE_CREATE() \ +#define MESSAGE_CREATE(reference) \ nsCString message ("context "); \ message.AppendInt (0); \ - message += " "; \ - message += __func__; + message += " reference "; \ + message.AppendInt (reference); \ + message += " "; \ + message += __func__; \ + if (factory->resultMap[reference] == NULL) { \ + factory->resultMap[reference] = new ResultContainer(); \ + printf("ResultMap created -- %p %d\n", factory->resultMap[reference], factory->resultMap[reference]->returnIdentifier); \ + } \ + else \ + factory->resultMap[reference]->Clear(); + #define MESSAGE_ADD_STRING(name) \ message += " "; \ @@ -363,55 +375,60 @@ char const* TYPES[10] = { "Object", #define MESSAGE_SEND() \ factory->SendMessageToAppletViewer (message); -#define MESSAGE_RECEIVE_REFERENCE(cast, name) \ + +#define PROCESS_PENDING_EVENTS \ + PRBool hasPending; \ + factory->current->HasPendingEvents(&hasPending); \ + if (hasPending == PR_TRUE) { \ + PRBool processed = PR_FALSE; \ + factory->current->ProcessNextEvent(PR_TRUE, &processed); \ + } else { \ + PR_Sleep(PR_INTERVAL_NO_WAIT); \ + } + +#define MESSAGE_RECEIVE_REFERENCE(reference, cast, name) \ + nsresult res = NS_OK; \ + printf ("RECEIVE 1\n"); \ + while (factory->resultMap[reference]->returnIdentifier == -1) \ + { \ + PROCESS_PENDING_EVENTS; \ + } \ + printf ("RECEIVE 3\n"); \ + if (factory->resultMap[reference]->returnIdentifier == 0) \ + { \ + *name = NULL; \ + } else { \ + *name = \ + reinterpret_cast \ + (factory->references.ReferenceObject (factory->resultMap[reference]->returnIdentifier)); \ + } \ + printf ("RECEIVE_REFERENCE: %s result: %x = %d\n", \ + __func__, *name, factory->resultMap[reference]->returnIdentifier); + +// FIXME: track and free JNIIDs. +#define MESSAGE_RECEIVE_ID(reference, cast, id, signature) \ PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ - factory->returnIdentifier = -1; \ - printf ("RECEIVE 1\n"); \ - while (factory->returnIdentifier == -1) \ + printf("RECEIVE ID 1\n"); \ + while (factory->resultMap[reference]->returnIdentifier == -1) \ { \ - printf ("RECEIVE 2\n"); \ - res = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, res); \ + PROCESS_PENDING_EVENTS; \ } \ - printf ("RECEIVE 3\n"); \ - *name = \ - reinterpret_cast \ - (factory->references.ReferenceObject (factory->returnIdentifier)); \ - printf ("RECEIVE_REFERENCE: %s result: %x = %d\n", \ - __func__, *name, factory->returnIdentifier); - -// FIXME: track and free JNIIDs. -#define MESSAGE_RECEIVE_ID(cast, id, signature) \ - PRBool processed = PR_FALSE; \ - nsresult result = NS_OK; \ - factory->returnIdentifier = -1; \ - while (factory->returnIdentifier == -1) \ - { \ - result = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, result); \ - } \ - \ + \ *id = reinterpret_cast \ - (new JNIID (factory->returnIdentifier, signature)); -// \ -// printf ("RECEIVE_ID: %s result: %x = %d, %s\n", \ -// __func__, *id, factory->returnIdentifier, \ -// signature); - -#define MESSAGE_RECEIVE_VALUE(type, result) \ - PRBool processed = PR_FALSE; \ - nsresult res = NS_OK; \ - factory->returnValue = ""; \ - while (factory->returnValue == "") \ - { \ - res = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, res); \ - } \ - *result = ParseValue (type, factory->returnValue); + (new JNIID (factory->resultMap[reference]->returnIdentifier, signature)); \ + printf ("RECEIVE_ID: %s result: %x = %d, %s\n", \ + __func__, *id, factory->resultMap[reference]->returnIdentifier, \ + signature); + +#define MESSAGE_RECEIVE_VALUE(reference, ctype, result) \ + nsresult res = NS_OK; \ + printf("RECEIVE VALUE 1\n"); \ + while (factory->resultMap[reference]->returnValue == "") \ + { \ + PROCESS_PENDING_EVENTS; \ + } \ + *result = ParseValue (type, factory->resultMap[reference]->returnValue); // \ // char* valueString = ValueString (type, *result); \ // printf ("RECEIVE_VALUE: %s result: %x = %s\n", \ @@ -419,72 +436,70 @@ char const* TYPES[10] = { "Object", // free (valueString); \ // valueString = NULL; -#define MESSAGE_RECEIVE_SIZE(result) \ +#define MESSAGE_RECEIVE_SIZE(reference, result) \ PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ - factory->returnValue = ""; \ - while (factory->returnValue == "") \ + printf("RECEIVE SIZE 1\n"); \ + while (factory->resultMap[reference]->returnValue == "") \ { \ - res = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, res); \ + PROCESS_PENDING_EVENTS; \ } \ nsresult conversionResult; \ - *result = factory->returnValue.ToInteger (&conversionResult); \ + *result = factory->resultMap[reference]->returnValue.ToInteger (&conversionResult); \ PLUGIN_CHECK ("parse integer", conversionResult); // \ // printf ("RECEIVE_SIZE: %s result: %x = %d\n", \ // __func__, result, *result); // strdup'd string must be freed by calling function. -#define MESSAGE_RECEIVE_STRING(char_type, result) \ +#define MESSAGE_RECEIVE_STRING(reference, char_type, result) \ PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ - factory->returnValue = ""; \ - while (factory->returnValue == "") \ + printf("RECEIVE STRING 1\n"); \ + while (factory->resultMap[reference]->returnValue == "") \ { \ - res = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, res); \ + PROCESS_PENDING_EVENTS; \ } \ + printf("Setting result to: %s\n", strdup (factory->resultMap[reference]->returnValue.get ())); \ *result = reinterpret_cast \ - (strdup (factory->returnValue.get ())); + (strdup (factory->resultMap[reference]->returnValue.get ())); // \ // printf ("RECEIVE_STRING: %s result: %x = %s\n", \ // __func__, result, *result); // strdup'd string must be freed by calling function. -#define MESSAGE_RECEIVE_STRING_UCS(result) \ +#define MESSAGE_RECEIVE_STRING_UCS(reference, result) \ PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ - factory->returnValueUCS.Truncate (); \ - while (factory->returnValueUCS.IsEmpty ()) \ + printf("RECEIVE STRING UCS 1\n"); \ + while (factory->resultMap[reference]->returnValueUCS.IsEmpty()) \ { \ - res = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, res); \ + PROCESS_PENDING_EVENTS; \ } \ - int length = factory->returnValueUCS.Length (); \ + int length = factory->resultMap[reference]->returnValueUCS.Length (); \ jchar* newstring = static_cast (PR_Malloc (length)); \ memset (newstring, 0, length); \ - memcpy (newstring, factory->returnValueUCS.get (), length); \ + memcpy (newstring, factory->resultMap[reference]->returnValueUCS.get (), length); \ + std::cout << "Setting result to: " << factory->resultMap[reference]->returnValueUCS.get() << std::endl; \ *result = static_cast (newstring); // \ // printf ("RECEIVE_STRING: %s result: %x = %s\n", \ // __func__, result, *result); -#define MESSAGE_RECEIVE_BOOLEAN(result) \ +#define MESSAGE_RECEIVE_BOOLEAN(reference, result) \ PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ - factory->returnIdentifier = -1; \ - while (factory->returnIdentifier == -1) \ + printf("RECEIVE BOOLEAN 1\n"); \ + while (factory->resultMap[reference]->returnIdentifier == -1) \ { \ - res = factory->current->ProcessNextEvent (PR_TRUE, \ - &processed); \ - PLUGIN_CHECK_RETURN (__func__, res); \ + PROCESS_PENDING_EVENTS; \ } \ - *result = factory->returnIdentifier; + *result = factory->resultMap[reference]->returnIdentifier; +// res = factory->current->ProcessNextEvent (PR_TRUE, \ +// &processed); \ +// PLUGIN_CHECK_RETURN (__func__, res); \ + // \ // printf ("RECEIVE_BOOLEAN: %s result: %x = %s\n", \ // __func__, result, *result ? "true" : "false"); @@ -524,6 +539,8 @@ extern "C" NS_EXPORT nsresult NSGetFacto #include #include #include +#include +#include // // FIXME: I had to hack dist/include/xpcom/xpcom-config.h to comment // // out this line: #define HAVE_CPP_2BYTE_WCHAR_T 1 so that // // nsStringAPI.h would not trigger a compilation assertion failure: @@ -625,8 +642,50 @@ ReferenceHashtable::UnreferenceObject (P } } +class ResultContainer +{ + public: + ResultContainer(); + ~ResultContainer(); + void Clear(); + PRUint32 returnIdentifier; + nsCString returnValue; + nsString returnValueUCS; + +}; + +ResultContainer::ResultContainer () +{ + PLUGIN_TRACE_RC(); + + returnIdentifier = -1; + returnValue.Truncate(); + returnValueUCS.Truncate(); +} + +ResultContainer::~ResultContainer () +{ + PLUGIN_TRACE_RC(); + + returnIdentifier = -1; + returnValue.Truncate(); + returnValueUCS.Truncate(); +} + +void +ResultContainer::Clear() +{ + PLUGIN_TRACE_RC(); + + returnIdentifier = -1; + returnValue.Truncate(); + returnValueUCS.Truncate(); +} + #include #include +#include +#include class IcedTeaJNIEnv; @@ -667,16 +726,17 @@ public: nsresult SetTransport (nsISocketTransport* transport); void Connected (); void Disconnected (); +// PRUint32 returnIdentifier; +// nsCString returnValue; +// nsString returnValueUCS; PRBool IsConnected (); nsCOMPtr async; nsCOMPtr current; - PRUint32 returnIdentifier; - nsCString returnValue; - nsString returnValueUCS; ReferenceHashtable references; // FIXME: make private? JNIEnv* proxyEnv; nsISecureEnv* secureEnv; + std::map resultMap; void GetMember (); void SetMember (); void GetSlot (); @@ -693,24 +753,52 @@ private: nsresult TestAppletviewer (); void DisplayFailureDialog (); nsresult StartAppletviewer (); + void ProcessMessage(); + void ConsumeMsgFromJVM(); + nsCOMPtr processThread; nsCOMPtr sink; nsCOMPtr transport; nsCOMPtr input; nsCOMPtr output; + nsCOMPtr applet_viewer_process; PRBool connected; PRUint32 next_instance_identifier; // Does not do construction/deconstruction or reference counting. nsDataHashtable instances; PRUint32 object_identifier_return; + PRMonitor *jvmMsgQueuePRMonitor; + std::queue jvmMsgQueue; int javascript_identifier; int name_identifier; int args_identifier; int string_identifier; int slot_index; int value_identifier; + PRBool shutting_down; + +/** + * JNI I/O related code + * + + void WriteToJVM(nsCString& message); + void InitJVM(); + void ReadFromJVM(); + + PRMonitor *jvmPRMonitor; + nsCOMPtr readThread; + JavaVM *jvm; + JNIEnv *javaEnv; + jclass javaPluginClass; + jobject javaPluginObj; + jmethodID getMessageMID; + jmethodID postMessageMID; + + */ + }; class IcedTeaEventSink; + class IcedTeaPluginInstance : public nsIPluginInstance, public nsIJVMPluginInstance @@ -726,6 +814,7 @@ public: void GetWindow (); nsIPluginInstancePeer* peer; + PRBool initialized; private: @@ -738,12 +827,15 @@ private: PRUint32 instance_identifier; nsCString instanceIdentifierPrefix; }; + #include #include #include #include #include +#include +#include class IcedTeaSocketListener : public nsIServerSocketListener { @@ -1013,6 +1105,12 @@ private: ~IcedTeaJNIEnv (); IcedTeaPluginFactory* factory; + + PRMonitor *contextCounterPRMonitor; + + int IncrementContextCounter(); + void DecrementContextCounter(); + int contextCounter; }; NS_IMPL_ISUPPORTS6 (IcedTeaPluginFactory, nsIFactory, nsIPlugin, nsIJVMManager, @@ -1029,7 +1127,8 @@ IcedTeaPluginFactory::IcedTeaPluginFacto slot_index (0), value_identifier (0), connected (PR_FALSE), - liveconnect (0) + liveconnect (0), + shutting_down(PR_FALSE) { PLUGIN_TRACE_FACTORY (); instances.Init (); @@ -1101,6 +1200,11 @@ IcedTeaPluginFactory::Initialize () getter_AddRefs (liveconnect)); PLUGIN_CHECK_RETURN ("liveconnect", result); +/* + * Socket initialization code for TCP/IP communication + * + */ + nsCOMPtr socket; result = manager->CreateInstanceByContractID (NS_SERVERSOCKET_CONTRACTID, nsnull, @@ -1110,11 +1214,21 @@ IcedTeaPluginFactory::Initialize () // FIXME: hard-coded port result = socket->Init (50007, PR_TRUE, -1); + + PLUGIN_CHECK_RETURN ("socket init", result); nsCOMPtr listener = new IcedTeaSocketListener (this); result = socket->AsyncListen (listener); PLUGIN_CHECK_RETURN ("add socket listener", result); + +/** + * JNI I/O code + + // Initialize mutex to control access to the jvm + jvmPRMonitor = PR_NewMonitor(); +*/ + jvmMsgQueuePRMonitor = PR_NewMonitor(); result = StartAppletviewer (); PLUGIN_CHECK_RETURN ("started appletviewer", result); @@ -1128,6 +1242,12 @@ IcedTeaPluginFactory::Initialize () result = threadManager->GetCurrentThread (getter_AddRefs (current)); PLUGIN_CHECK_RETURN ("current thread", result); +/* + * + * Socket related code for TCP/IP communication + * + */ + PLUGIN_DEBUG ("Instance::Initialize: awaiting connection from appletviewer"); PRBool processed; // FIXME: move this somewhere applet-window specific so it doesn't block page @@ -1156,14 +1276,44 @@ IcedTeaPluginFactory::Initialize () result = async->AsyncWait (this, 0, 0, current); PLUGIN_CHECK_RETURN ("add async wait", result); - return result; + return NS_OK; } NS_IMETHODIMP IcedTeaPluginFactory::Shutdown () { - NOT_IMPLEMENTED (); - return NS_ERROR_NOT_IMPLEMENTED; + shutting_down = PR_TRUE; + + nsCString shutdownStr("shutdown"); + SendMessageToAppletViewer(shutdownStr); + + // wake up process thread to tell it to shutdown + PRThread *prThread; + processThread->GetPRThread(&prThread); + printf("Interrupting process thread..."); + PRStatus res = PR_Interrupt(prThread); From gnu_andrew at member.fsf.org Mon Aug 25 12:23:55 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 25 Aug 2008 20:23:55 +0100 Subject: OpenJDK b33 and IcedTea Message-ID: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> IcedTea b33 appears to fix the CORBA issue I found with b32, so I've moved straight to working on that rather than b32. However, there are again a number of issues building this in IcedTea and I haven't managed to overcome the latest as yet. So far: * A number of the AWT classes started using @Override for interface methods. Most versions of ecj don't support this so I've extended the icedtea-override.patch to remove these. * To avoid the issues seen on this list with various /bin/sh substitutes, the NIO generator seems to have been replaced with a Java version instead. This Java version as packaged in b33 won't work with Classpath-based solutions like GCJ due to two issues: the use of java.util.Scanner (only added to Classpath in the last week) and a bug in java.util.regex.Matcher. Current CVS Classpath (which hopefully will soon become 0.98) should be able to work with the vanilla version but earlier version will need the fixes now in icedtea-ecj.patch. I'm currently stuck on this strange issue whereby sun_java2d_opengl_OGLContext_OGLContextCaps.h is not being generated. Has anyone else seen this? To try for yourself, you can get a b33 IcedTea from http://fuseyism.com/hg/icedtea. Cheers, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From gnu_andrew at member.fsf.org Mon Aug 25 16:46:00 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 26 Aug 2008 00:46:00 +0100 Subject: OpenJDK b33 and IcedTea In-Reply-To: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> References: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> Message-ID: <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> On 25/08/2008, Andrew John Hughes wrote: > IcedTea b33 appears to fix the CORBA issue I found with b32, so I've > moved straight to working on that rather than b32. However, there are > again a number of issues building this in IcedTea and I haven't > managed to overcome the latest as yet. > > So far: > > * A number of the AWT classes started using @Override for interface > methods. Most versions of ecj don't support this so I've extended the > icedtea-override.patch to remove these. > * To avoid the issues seen on this list with various /bin/sh > substitutes, the NIO generator seems to have been replaced with a Java > version instead. This Java version as packaged in b33 won't work with > Classpath-based solutions like GCJ due to two issues: the use of > java.util.Scanner (only added to Classpath in the last week) and a bug > in java.util.regex.Matcher. Current CVS Classpath (which hopefully > will soon become 0.98) should be able to work with the vanilla version > but earlier version will need the fixes now in icedtea-ecj.patch. > > I'm currently stuck on this strange issue whereby > sun_java2d_opengl_OGLContext_OGLContextCaps.h is not being generated. > Has anyone else seen this? To try for yourself, you can get a b33 > IcedTea from http://fuseyism.com/hg/icedtea. > > Cheers, > -- > Andrew :-) > > Support Free Java! > Contribute to GNU Classpath and the OpenJDK > http://www.gnu.org/software/classpath > http://openjdk.java.net > > PGP Key: 94EFD9D8 (http://subkeys.pgp.net) > Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 > Further on this, with Mark's help via IRC, I made the following additions to icedtea-ecj.patch: +++ openjdk-ecj/jdk/make/common/Rules.gmk 2008-08-26 00:30:58.000000000 +0100 - +- $(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner)) + $(CLASSES.export) + $(foreach innerclass,$(subst $$,\$$,$(EXPORTED_inner)), \ + $(JAVAH_CMD) \ + -o $(CLASSHDRDIR)/$(subst .,_,$(subst \$$,_,$(innerclass))).h \ + $(innerclass)) +++ openjdk-ecj/jdk/make/sun/awt/FILES_export_unix.gmk 2008-08-25 3:13:37.000000000 +0100 @@ -223,3 +223,5 @@ sun/awt/CausedFocusEvent.java \ sun/awt/motif/MEmbedCanvasPeer.java +EXPORTED_inner = \ + sun.java2d.opengl.OGLContext$$OGLContextCaps The first change generally gets round the ambiguity in the naming of header files generated from inner classes by explicitly specifying an output file name for members of EXPORTED_inner. By default, gjavah keeps the $ in the filename, while javah replaces it with _ -- neither behaviour is formally specified. The second more specific change adds sun.java2d.opengl.OGLContext$OGLContextCaps to EXPORTED_inner as it doesn't seem to be added and thus generated at all, even with the wrong output name. There's still an issue; the build can now find the header but javah and gjavah appear to name them differently: ../../../src/share/native/sun/java2d/opengl/OGLContext.c:855: error: 'sun_java2d_opengl_OGLContext_OGLContextCaps_CAPS_TEXNONSQUARE' undeclared (first use in this function) gjavah only generates a subset and encodes them wrongly: #define sun_java2d_opengl_OGLContext_00024OGLContextCaps_CAPS_STORED_ALPHA 2L Again, the latest IcedTea version is at http://fuseyism.com/hg/icedtea. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From xerxes at zafena.se Tue Aug 26 02:24:09 2008 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 26 Aug 2008 11:24:09 +0200 Subject: Icedtea6 with CACAO jit for ARM EABI softfloat systems. Packaging tips? In-Reply-To: <48B29F74.6040108@Sun.COM> References: <48B29CA4.9080107@zafena.se> <48B29F74.6040108@Sun.COM> Message-ID: <48B3CBB9.9090504@zafena.se> Dalibor Topic skrev: > On 25/08/2008 13:51, Xerxes R?nby wrote: >> Greetings! >> Last week Icedtea got served with CACAO JIT for debian armel >> softfloat systems: >> some screenshots here: http://labb.zafena.se/?p=1 > Very cool - congrats, in particular for the coolest display of slime > volleyball in ages. ;) >> How do to best package it into .debs for testing? Im not that >> familiar with the debian way of distributing packages. > I think the best way would be to contribute your fixes to appropriate > places (Cacao & OpenJDK/IcedTea), and make sure the debian cacao-oj6 > packages contain them. See > http://packages.qa.debian.org/c/cacao-oj6.html for details. > > cheers, > dalibor topic > Thank you for the pointer into the guts of the debian build cycle! I very impressed with the debian porters and to my suprise the debian build machines had actually made both a sucessful compile and done packing of the OpenJDK6 with cacao 0.99.3 sources four days before i finnished my own build using the mercurial sources. http://buildd.debian.org/pkg.cgi?pkg=cacao-oj6 http://buildd.debian.org/fetch.cgi?pkg=cacao-oj6;ver=6b11-1;arch=armel;stamp=1218889974 Im stunned of the impressive work made by the debian maintainers to get openjdk with cacao jit shipped. Kudos to Matthias Klose, Torsten Werner and Michael Koch! It would be great to get these packages into Lenny for armel users! Cheers and have a great day! Xerxes From mark at klomp.org Tue Aug 26 02:50:58 2008 From: mark at klomp.org (Mark Wielaard) Date: Tue, 26 Aug 2008 11:50:58 +0200 Subject: OpenJDK b33 and IcedTea In-Reply-To: <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> References: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> Message-ID: <1219744258.3066.19.camel@dijkstra.wildebeest.org> Hi Andrew, On Tue, 2008-08-26 at 00:46 +0100, Andrew John Hughes wrote: > > I'm currently stuck on this strange issue whereby > > sun_java2d_opengl_OGLContext_OGLContextCaps.h is not being generated. > > Has anyone else seen this? To try for yourself, you can get a b33 > > IcedTea from http://fuseyism.com/hg/icedtea. > > Further on this, with Mark's help via IRC, I made the following > additions to icedtea-ecj.patch: > > +++ openjdk-ecj/jdk/make/common/Rules.gmk 2008-08-26 00:30:58.000000000 +0100 > > - +- $(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner)) > + $(CLASSES.export) > + $(foreach innerclass,$(subst $$,\$$,$(EXPORTED_inner)), \ > + $(JAVAH_CMD) \ > + -o $(CLASSHDRDIR)/$(subst .,_,$(subst \$$,_,$(innerclass))).h \ > + $(innerclass)) > > +++ openjdk-ecj/jdk/make/sun/awt/FILES_export_unix.gmk 2008-08-25 > 3:13:37.000000000 +0100 > @@ -223,3 +223,5 @@ > sun/awt/CausedFocusEvent.java \ > sun/awt/motif/MEmbedCanvasPeer.java > > +EXPORTED_inner = \ > + sun.java2d.opengl.OGLContext$$OGLContextCaps > > The first change generally gets round the ambiguity in the naming of > header files generated from inner classes by explicitly specifying an > output file name for members of EXPORTED_inner. By default, gjavah > keeps the $ in the filename, while javah replaces it with _ -- neither > behaviour is formally specified. I like this change. Traditionally the various javah commands (gcjh, kaffeh, gjavah) didn't use the same default output name. So adding an explicit -o makes this much more robust. > The second more specific change adds > sun.java2d.opengl.OGLContext$OGLContextCaps to EXPORTED_inner as it > doesn't seem to be added and thus generated at all, even with the > wrong output name. This one seems correct, although I cannot see how it worked before. > There's still an issue; the build can now find the header but javah > and gjavah appear to name them differently: > > ../../../src/share/native/sun/java2d/opengl/OGLContext.c:855: error: > 'sun_java2d_opengl_OGLContext_OGLContextCaps_CAPS_TEXNONSQUARE' > undeclared (first use in this function) > > gjavah only generates a subset and encodes them wrongly: > > #define sun_java2d_opengl_OGLContext_00024OGLContextCaps_CAPS_STORED_ALPHA 2L I believe gjavah is correct here. The class name is "OGLContext$GLContextCaps". Which contains according to the jni C translation rules contains the escape sequence _0XXXX where the XXXX is 0024 for the unicode character $. I don't know how the openjdk javah gets the single underscore. If you wanted to encode it as OGLContext_GLContextCaps (as the default output name hints is what javah prefers), then the underscore would translate to _1, giving "OGLContext_1GLContextCaps". This is all a bit unfortunate since the .c source code does use these constants literally. Easiest solution for now seems a simple sed invocation on the resulting .h file that turns a the sequence '_00024' into a single underscore '_'. A better recommendation might be to not mix inner classes and native methods since the results don't seem to be very consistent across implementations (of javah). Cheers, Mark From mark at klomp.org Tue Aug 26 04:17:38 2008 From: mark at klomp.org (Mark Wielaard) Date: Tue, 26 Aug 2008 13:17:38 +0200 Subject: OpenJDK b33 and IcedTea In-Reply-To: <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> References: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> Message-ID: <1219749458.3066.26.camel@dijkstra.wildebeest.org> Hi Andrew, On Tue, 2008-08-26 at 00:46 +0100, Andrew John Hughes wrote: > ../../../src/share/native/sun/java2d/opengl/OGLContext.c:855: error: > 'sun_java2d_opengl_OGLContext_OGLContextCaps_CAPS_TEXNONSQUARE' > undeclared (first use in this function) > > gjavah only generates a subset This one is also curious. The constant you mention, CAPS_TEXNONSQUARE, isn't defined in OGLContext.OGLContextCaps, but in the super class ContextCapabilities. I cannot find the exact rules for generating the constants from static final (super) classes. Apparently for the pusposes of javah you inherit the static fields of your super class. But I don't believe any javah except the openjdk one does that. It seems more correct to include sun_java2d_pipe_hw_ContextCapabilities.h and use the constant sun_java2d_pipe_hw_ContextCapabilities_CAPS_TEXNONSQUARE in the .c source file. Cheers, Mark From gnu_andrew at member.fsf.org Tue Aug 26 06:22:21 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 26 Aug 2008 14:22:21 +0100 Subject: OpenJDK b33 and IcedTea In-Reply-To: <1219744258.3066.19.camel@dijkstra.wildebeest.org> References: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> <1219744258.3066.19.camel@dijkstra.wildebeest.org> Message-ID: <17c6771e0808260622w311b2b15m39432017c1595734@mail.gmail.com> 2008/8/26 Mark Wielaard : > Hi Andrew, > > On Tue, 2008-08-26 at 00:46 +0100, Andrew John Hughes wrote: >> > I'm currently stuck on this strange issue whereby >> > sun_java2d_opengl_OGLContext_OGLContextCaps.h is not being generated. >> > Has anyone else seen this? To try for yourself, you can get a b33 >> > IcedTea from http://fuseyism.com/hg/icedtea. >> >> Further on this, with Mark's help via IRC, I made the following >> additions to icedtea-ecj.patch: >> >> +++ openjdk-ecj/jdk/make/common/Rules.gmk 2008-08-26 00:30:58.000000000 +0100 >> >> - +- $(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner)) >> + $(CLASSES.export) >> + $(foreach innerclass,$(subst $$,\$$,$(EXPORTED_inner)), \ >> + $(JAVAH_CMD) \ >> + -o $(CLASSHDRDIR)/$(subst .,_,$(subst \$$,_,$(innerclass))).h \ >> + $(innerclass)) >> >> +++ openjdk-ecj/jdk/make/sun/awt/FILES_export_unix.gmk 2008-08-25 >> 3:13:37.000000000 +0100 >> @@ -223,3 +223,5 @@ >> sun/awt/CausedFocusEvent.java \ >> sun/awt/motif/MEmbedCanvasPeer.java >> >> +EXPORTED_inner = \ >> + sun.java2d.opengl.OGLContext$$OGLContextCaps >> >> The first change generally gets round the ambiguity in the naming of >> header files generated from inner classes by explicitly specifying an >> output file name for members of EXPORTED_inner. By default, gjavah >> keeps the $ in the filename, while javah replaces it with _ -- neither >> behaviour is formally specified. > > I like this change. Traditionally the various javah commands (gcjh, > kaffeh, gjavah) didn't use the same default output name. So adding an > explicit -o makes this much more robust. > So do I. I think this should really go upstream. >> The second more specific change adds >> sun.java2d.opengl.OGLContext$OGLContextCaps to EXPORTED_inner as it >> doesn't seem to be added and thus generated at all, even with the >> wrong output name. > > This one seems correct, although I cannot see how it worked before. > Me neither. The proof will be in the openjdk as opposed to openjdk-ecj build which won't have this patch applied (it being part of openjdk-ecj.patch). We of course have to get that far first :) >> There's still an issue; the build can now find the header but javah >> and gjavah appear to name them differently: >> >> ../../../src/share/native/sun/java2d/opengl/OGLContext.c:855: error: >> 'sun_java2d_opengl_OGLContext_OGLContextCaps_CAPS_TEXNONSQUARE' >> undeclared (first use in this function) >> >> gjavah only generates a subset and encodes them wrongly: >> >> #define sun_java2d_opengl_OGLContext_00024OGLContextCaps_CAPS_STORED_ALPHA 2L > > I believe gjavah is correct here. > The class name is "OGLContext$GLContextCaps". Which contains according > to the jni C translation rules contains the escape sequence _0XXXX where > the XXXX is 0024 for the unicode character $. > > I don't know how the openjdk javah gets the single underscore. If you > wanted to encode it as OGLContext_GLContextCaps (as the default output > name hints is what javah prefers), then the underscore would translate > to _1, giving "OGLContext_1GLContextCaps". > > This is all a bit unfortunate since the .c source code does use these > constants literally. Easiest solution for now seems a simple sed > invocation on the resulting .h file that turns a the sequence '_00024' > into a single underscore '_'. A better recommendation might be to not > mix inner classes and native methods since the results don't seem to be > very consistent across implementations (of javah). > I think the simplest solution is to patch the c file in openjdk-ecj.patch. This also solves the issue mentioned in your other mail. Substituting the _00024 with _ is more tricky because in the other inner class header,ClassLoader.NativeLibrary, _00024 does appear and is used by the .c file. I wonder if there is some implicit rule difference between constant and method name generation? Seems like it's worth looking through the javah source code. > Cheers, > > Mark > > Cheers, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From A.Hughes at dcs.shef.ac.uk Tue Aug 26 07:43:10 2008 From: A.Hughes at dcs.shef.ac.uk (Andrew Hughes) Date: Tue, 26 Aug 2008 15:43:10 +0100 Subject: FYI: Another out-of-dir build fix Message-ID: <20080826144310.GA22066@omega.dcs.shef.ac.uk> This fixes an issue introduced by the VisualVM work. ICEDTEA_HOME for ecj builds should be $(abs_top_builddir) not $(abs_top_srcdir). ChangeLog: 2008-08-26 Andrew John Hughes * HACKING: Add icedtea-signed-types-hot6.patch. * Makefile.am: Correct use of srcdir for ICEDTEA_HOME, should be builddir. -- Andrew :) -------------- next part -------------- diff -r 1be4e928200c HACKING --- a/HACKING Mon Aug 25 15:15:30 2008 -0400 +++ b/HACKING Tue Aug 26 15:39:24 2008 +0100 @@ -103,6 +103,10 @@ * icedtea-test-atomic-operations.patch: Add check to see if GCC's sync_lock_test works. * icedtea-zero.patch: Generalise architecture support, add ARM and #ifdef out non-zero applicable parts. +The following patches are only applied for IcedTea builds not using the zero-assembler: + +* icedtea-signed-types-hot6.patch: Make use of unsigned/signed types explicit. + The following patches are only applied for IcedTea builds using the Shark JIT: * icedtea-shark.patch: Add support for the Shark JIT. diff -r 1be4e928200c Makefile.am --- a/Makefile.am Mon Aug 25 15:15:30 2008 -0400 +++ b/Makefile.am Tue Aug 26 15:39:24 2008 +0100 @@ -754,7 +754,7 @@ ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR) else BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp - ICEDTEA_HOME = $(abs_top_srcdir)/bootstrap/icedtea + ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea endif endif From gnu_andrew at member.fsf.org Tue Aug 26 07:43:46 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 26 Aug 2008 14:43:46 +0000 Subject: changeset in /hg/icedtea6: Replace use of srcdir with builddir. Message-ID: changeset 94838da77197 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=94838da77197 description: Replace use of srcdir with builddir. 2008-08-26 Andrew John Hughes * HACKING: Add icedtea-signed-types-hot6.patch. * Makefile.am: Correct use of srcdir for ICEDTEA_HOME, should be builddir. diffstat: 3 files changed, 11 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ HACKING | 4 ++++ Makefile.am | 2 +- diffs (39 lines): diff -r 1be4e928200c -r 94838da77197 ChangeLog --- a/ChangeLog Mon Aug 25 15:15:30 2008 -0400 +++ b/ChangeLog Tue Aug 26 15:41:08 2008 +0100 @@ -1,3 +1,9 @@ 2008-08-21 Mark Wielaard + + * HACKING: Add icedtea-signed-types-hot6.patch. + * Makefile.am: Correct use of srcdir for ICEDTEA_HOME, + should be builddir. + 2008-08-21 Mark Wielaard * .hgignore: Add test/jtreg.jar. diff -r 1be4e928200c -r 94838da77197 HACKING --- a/HACKING Mon Aug 25 15:15:30 2008 -0400 +++ b/HACKING Tue Aug 26 15:41:08 2008 +0100 @@ -103,6 +103,10 @@ The following patches are only applied f * icedtea-test-atomic-operations.patch: Add check to see if GCC's sync_lock_test works. * icedtea-zero.patch: Generalise architecture support, add ARM and #ifdef out non-zero applicable parts. +The following patches are only applied for IcedTea builds not using the zero-assembler: + +* icedtea-signed-types-hot6.patch: Make use of unsigned/signed types explicit. + The following patches are only applied for IcedTea builds using the Shark JIT: * icedtea-shark.patch: Add support for the Shark JIT. diff -r 1be4e928200c -r 94838da77197 Makefile.am --- a/Makefile.am Mon Aug 25 15:15:30 2008 -0400 +++ b/Makefile.am Tue Aug 26 15:41:08 2008 +0100 @@ -754,7 +754,7 @@ if WITH_ICEDTEA ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR) else BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp - ICEDTEA_HOME = $(abs_top_srcdir)/bootstrap/icedtea + ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea endif endif From bugzilla-daemon at icedtea.classpath.org Tue Aug 26 09:36:12 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 26 Aug 2008 16:36:12 +0000 Subject: [Bug 187] New: Applet does not render graph using IcedTea; works on Sun JRE. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=187 Summary: Applet does not render graph using IcedTea; works on Sun JRE. Product: IcedTea Version: unspecified Platform: PC URL: http://www.rahastot.fi/en/ OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: sami.makinen at helsinki.fi Rahastot.fi is a stock fund information service. For each fund, a graph of historical values is rendered as an applet. Why an applet is used remains a mystery, where a simple fully server-side caching image rendering service could be used instead. The Sun JRE renders the graph as expected on 32 bit systems, but icedtea-gcjwebplugin 1.0-0ubunt on a 64 bit Kubuntu 8.04 on Firefox 3 does not render the graph data. Instead it only renders a blank graph grid with axis information. Steps to repeat: 1: go to http://www.rahastot.fi/en/ 2: click any fund name -> new tab opens 3: scroll down to applet, just before "Show performance" dropdown with time ranges in it Actual results: Graph does not have any content Expected function: Applet should render a graph line and/or fill Severity: I can't follow my stock on my desktop, and have to use my laptop instead! While this isn't a life or death issue, it sure would be nice if it worked. Hint: The graph applet is in an iframe, so before anything else right-click near the graph and choose "This frame" > "Show only this frame" to isolate the applet. Then check the page sources - the graph data seems to be in a Very Long set of applet parameters. Some values from parameters are definitely parsed successfully, e.g. and - these are rendered next to the axis as expected. Perhaps the problem lies in parsing parameter values that have linefeeds in them? The markup defining the applet seems ok to me, except that tags are not terminated, but that shouldn't be the problem because the axis values are parsed successfully. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 26 10:12:27 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 26 Aug 2008 17:12:27 +0000 Subject: [Bug 187] Applet does not render graph using IcedTea; works on Sun JRE. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=187 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|dbhole at redhat.com |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From gnu_andrew at member.fsf.org Tue Aug 26 11:19:58 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 26 Aug 2008 19:19:58 +0100 Subject: changeset in /hg/icedtea6: Added a JNI communication bridge betw... In-Reply-To: References: Message-ID: <17c6771e0808261119y47ef436ep99df2866684884ce@mail.gmail.com> On 25/08/2008, Deepak Bhole wrote: > changeset 1be4e928200c in /hg/icedtea6 > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1be4e928200c > description: > Added a JNI communication bridge between C++ and Java (commented out for now, > to maintain stability from TCP) > > Updated processing model to handle requests in different threads, so that > recursuve JS->JAVA->JS calls work (e.g.: > http://www.javasonics.com/support/run_liveconnect.php?mayscript) > > Other bug fixes to fix exceptions and hangs > > diffstat: > > 2 files changed, 2516 insertions(+), 1325 deletions(-) > IcedTeaPlugin.cc | 1159 ++++++++++++--- > patches/icedtea-liveconnect.patch | 2682 +++++++++++++++++++++---------------- > This patch should have an entry in ChangeLog. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Tue Aug 26 12:31:08 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 26 Aug 2008 19:31:08 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 ------- Comment #7 from cgoudie at twelvehorses.com 2008-08-26 19:31 ------- I have filed a bug with redhat's bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=460205 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From dbhole at redhat.com Tue Aug 26 13:29:13 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 26 Aug 2008 16:29:13 -0400 Subject: changeset in /hg/icedtea6: Added a JNI communication bridge betw... In-Reply-To: <17c6771e0808261119y47ef436ep99df2866684884ce@mail.gmail.com> References: <17c6771e0808261119y47ef436ep99df2866684884ce@mail.gmail.com> Message-ID: <20080826202913.GA11503@redhat.com> * Andrew John Hughes [2008-08-26 14:20]: > On 25/08/2008, Deepak Bhole wrote: > > changeset 1be4e928200c in /hg/icedtea6 > > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1be4e928200c > > description: > > Added a JNI communication bridge between C++ and Java (commented out for now, > > to maintain stability from TCP) > > > > Updated processing model to handle requests in different threads, so that > > recursuve JS->JAVA->JS calls work (e.g.: > > http://www.javasonics.com/support/run_liveconnect.php?mayscript) > > > > Other bug fixes to fix exceptions and hangs > > > > diffstat: > > > > 2 files changed, 2516 insertions(+), 1325 deletions(-) > > IcedTeaPlugin.cc | 1159 ++++++++++++--- > > patches/icedtea-liveconnect.patch | 2682 +++++++++++++++++++++---------------- > > > > This patch should have an entry in ChangeLog. Doh! Sorry.. it was my first commit. I was wondering when some sort of "you forgot X" message would come in :) Fixed now! Cheers, Deepak > -- > Andrew :-) > > Support Free Java! > Contribute to GNU Classpath and the OpenJDK > http://www.gnu.org/software/classpath > http://openjdk.java.net > > PGP Key: 94EFD9D8 (http://subkeys.pgp.net) > Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From dbhole at redhat.com Tue Aug 26 13:34:59 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 26 Aug 2008 20:34:59 +0000 Subject: changeset in /hg/icedtea6: Added changelog message for a commit ... Message-ID: changeset c1d1aca38209 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c1d1aca38209 description: Added changelog message for a commit that went in yesterday diffstat: 1 file changed, 6 insertions(+) ChangeLog | 6 ++++++ diffs (13 lines): diff -r 94838da77197 -r c1d1aca38209 ChangeLog --- a/ChangeLog Tue Aug 26 15:41:08 2008 +0100 +++ b/ChangeLog Tue Aug 26 16:27:07 2008 -0400 @@ -1,3 +1,9 @@ 2008-08-26 Andrew John Hughes + + * IcedTeaPlugin.cc: Added JNI communication bridge, updated processing + model to handle recursive JS->JAVA->JS calls, other minor bug fixes. + * patches/icedtea-liveconnect.patch: Likewise. + 2008-08-26 Andrew John Hughes * HACKING: Add icedtea-signed-types-hot6.patch. From Thomas.Rodriguez at Sun.COM Tue Aug 26 13:19:23 2008 From: Thomas.Rodriguez at Sun.COM (Tom Rodriguez) Date: Tue, 26 Aug 2008 13:19:23 -0700 Subject: Crash in ciTypeFlow.cpp In-Reply-To: <1ccfd1c10808231622x25ab2b16i52459b96ce74e361@mail.gmail.com> References: <1ccfd1c10808231622x25ab2b16i52459b96ce74e361@mail.gmail.com> Message-ID: Sorry this took so long. I had intended to pick this up when it was first discussed but with vacation and other things I lost track of it. Since we want everything, even trivial things, to go through our jprt build system, I picked this up and put it into the queue on its way to hotspot-comp/hotspot. It should be completed by the end of the day since it is second in line. The webrev is at http://webrev.invokedynamic.info/never/6741642 . INT_MAX is a good enough value since it should only contain positive integers. Again sorry for the delay in handling this. tom On Aug 23, 2008, at 4:22 PM, Martin Buchholz wrote: > Hi hotspot maintainers, > > For a while now, there's been a crash in hotspot compiled with gcc 4.2 > in ciTypeFlow.cpp (crashes in Swingset demo) > > There have been a number of approaches to fixing it. > It appears that Matthias Klose has patched icedtea6 as follows: > > > > --- openjdk/hotspot/src/share/vm/ci/ciTypeFlow.hpp~ 2008-07-10 > 22:04:30.000000000 +0200 > +++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.hpp 2008-07-25 > 14:32:03.544802121 +0200 > @@ -130,7 +130,7 @@ > > // Used as a combined index for locals and temps > enum Cell { > - Cell_0 > + Cell_0, Cell_max = UINT_MAX > }; > > // A StateVector summarizes the type information at some > > > Unfortunately, this fails to compile (at least with gcc 4.0 > and OpenJDK7) > > cc1plus: warnings being treated as errors > /usr/local/google/home/martin/ws/hotspot/hotspot/src/share/vm/ci/ > ciTypeFlow.cpp: > In member function 'const ciTypeFlow::StateVector* > ciTypeFlow::get_start_state()': > /usr/local/google/home/martin/ws/hotspot/hotspot/src/share/vm/ci/ > ciTypeFlow.cpp:392: > warning: comparison between signed and unsigned integer expressions > make[6]: *** [ciTypeFlow.o] Error 1 > > > Here's another try, > and this time let's try to get it into both OpenJDK7 and OpenJDK6. > I'll do the push into OpenJDK7. > > # HG changeset patch > # User martin > # Date 1219532277 25200 > # Node ID 52c7e88431fc50fd682a0506cd9588c476ca7a00 > # Parent f8068895c22d848b6f0e6998886652c3d2f51b24 > 6666666: Crash in ciTypeFlow with gcc 4.2, enum Cell range too small > Reviewed-by: > Contributed-by: doko at ubuntu.com > > diff --git a/src/share/vm/ci/ciTypeFlow.hpp b/src/share/vm/ci/ > ciTypeFlow.hpp > --- a/src/share/vm/ci/ciTypeFlow.hpp > +++ b/src/share/vm/ci/ciTypeFlow.hpp > @@ -127,7 +127,7 @@ > > // Used as a combined index for locals and temps > enum Cell { > - Cell_0 > + Cell_0, Cell_max = INT_MAX > }; > > // A StateVector summarizes the type information at some > > > There doesn't seem to be a bug for this in bugtraq. > Sun folk, please file a bug, > and let me know which team hg forest to push this into. > For those of us using newer gccs, this is a P1 bug. > > As justification, note that the existing code is illegal C++ > Enum variables must take on values in the range of the enum constants, > which was not the case with the old code. > > @doko: please review. My version of this change maintains the > signedness of enum Cell, avoiding possible changes in behavior > and subtleties with signed/unsigned comparison. > > Let's all try harder to get "community"-developed patches upstream. > > Thanks, > > Martin From martinrb at google.com Tue Aug 26 13:48:02 2008 From: martinrb at google.com (Martin Buchholz) Date: Tue, 26 Aug 2008 13:48:02 -0700 Subject: Crash in ciTypeFlow.cpp In-Reply-To: References: <1ccfd1c10808231622x25ab2b16i52459b96ce74e361@mail.gmail.com> Message-ID: <1ccfd1c10808261348k7ac4df03t67ef20790601d1b5@mail.gmail.com> Thanks, Tom. Could you include me ("martin") in the Reviewed-by: list? It would be nice if there was a JPRT "service" that non-Sun committers (pushers?) could use. One would think it would be good enough to push into a tributary forest like hotspot-runtime, since JPRT runs are certain to happen (twice, even!) on their way to the MASTER. If that's not good enough, provide a sub-sub-tributary forest. Martin From Joe.Darcy at Sun.COM Tue Aug 26 13:49:42 2008 From: Joe.Darcy at Sun.COM (Joe Darcy) Date: Tue, 26 Aug 2008 13:49:42 -0700 Subject: Crash in ciTypeFlow.cpp In-Reply-To: <1ccfd1c10808261348k7ac4df03t67ef20790601d1b5@mail.gmail.com> References: <1ccfd1c10808231622x25ab2b16i52459b96ce74e361@mail.gmail.com> <1ccfd1c10808261348k7ac4df03t67ef20790601d1b5@mail.gmail.com> Message-ID: <48B46C66.8020709@sun.com> Martin Buchholz wrote: > Thanks, Tom. > > Could you include me ("martin") in the Reviewed-by: list? > > It would be nice if there was a JPRT "service" that > non-Sun committers (pushers?) could use. > > One would think it would be good enough to push > into a tributary forest like hotspot-runtime, > since JPRT runs are certain to happen (twice, even!) > on their way to the MASTER. > If that's not good enough, provide a sub-sub-tributary forest. > > Martin > This fix will also be in OpenJDK 6 build 12. -Joe From Thomas.Rodriguez at Sun.COM Tue Aug 26 14:33:00 2008 From: Thomas.Rodriguez at Sun.COM (Tom Rodriguez) Date: Tue, 26 Aug 2008 14:33:00 -0700 Subject: Crash in ciTypeFlow.cpp In-Reply-To: <1ccfd1c10808261348k7ac4df03t67ef20790601d1b5@mail.gmail.com> References: <1ccfd1c10808231622x25ab2b16i52459b96ce74e361@mail.gmail.com> <1ccfd1c10808261348k7ac4df03t67ef20790601d1b5@mail.gmail.com> Message-ID: On Aug 26, 2008, at 1:48 PM, Martin Buchholz wrote: > Thanks, Tom. > > Could you include me ("martin") in the Reviewed-by: list? Sure thing. > > It would be nice if there was a JPRT "service" that > non-Sun committers (pushers?) could use. I know there's been talk about such a thing but I have no idea what's actually happening in that direction. tom From gnu_andrew at member.fsf.org Tue Aug 26 16:29:07 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 27 Aug 2008 00:29:07 +0100 Subject: changeset in /hg/icedtea6: Added a JNI communication bridge betw... In-Reply-To: <20080826202913.GA11503@redhat.com> References: <17c6771e0808261119y47ef436ep99df2866684884ce@mail.gmail.com> <20080826202913.GA11503@redhat.com> Message-ID: <17c6771e0808261629i450068a1nd992edbb4bb2de@mail.gmail.com> On 26/08/2008, Deepak Bhole wrote: > * Andrew John Hughes [2008-08-26 14:20]: > > > On 25/08/2008, Deepak Bhole wrote: > > > changeset 1be4e928200c in /hg/icedtea6 > > > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1be4e928200c > > > description: > > > Added a JNI communication bridge between C++ and Java (commented out for now, > > > to maintain stability from TCP) > > > > > > Updated processing model to handle requests in different threads, so that > > > recursuve JS->JAVA->JS calls work (e.g.: > > > http://www.javasonics.com/support/run_liveconnect.php?mayscript) > > > > > > Other bug fixes to fix exceptions and hangs > > > > > > diffstat: > > > > > > 2 files changed, 2516 insertions(+), 1325 deletions(-) > > > IcedTeaPlugin.cc | 1159 ++++++++++++--- > > > patches/icedtea-liveconnect.patch | 2682 +++++++++++++++++++++---------------- > > > > > > > This patch should have an entry in ChangeLog. > > > Doh! Sorry.. it was my first commit. I was wondering when some sort of > "you forgot X" message would come in :) > > Fixed now! > > Cheers, > > Deepak > > > > -- > > Andrew :-) > > > > Support Free Java! > > Contribute to GNU Classpath and the OpenJDK > > http://www.gnu.org/software/classpath > > http://openjdk.java.net > > > > PGP Key: 94EFD9D8 (http://subkeys.pgp.net) > > Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 > No problem! We've all done it one time or another! Nice to have you on the team, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-20 Omair Majid changeset c9268e180613 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c9268e180613 description: 2008-08-20 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (connectLine): New sane formatting. (drain): Replaced continuously polling loop with a call to waitForCompletion. (flush): Likewise. * src/native/jni-common.c (notifyWaitingOperations): New function. * src/native/jni-common.h (notifyWaitingOperations): New function. * src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c (set_sink_input_volume_callback): Call notifyWaitingOperations to do the same thing as before. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1read): Changed return type from int to jint. (drain_callback): New function. (cork_callback): Likewise. (flush_callback): Likewise. (trigger_callback): Likewise. (set_name_callback): Likewise. (set_buffer_attr_callback): Likewise. (update_sample_rate_callback): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1drain): Added callback. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1flush): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1trigger): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1set_1name): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1set_1buffer_1attr): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1update_1sample_1rate): Likewise. diffstat: 5 files changed, 113 insertions(+), 64 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 37 +---- src/native/jni-common.c | 38 +++++ src/native/jni-common.h | 2 src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 32 ---- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 68 ++++++++-- diffs (316 lines): diff -r f4ead96961a9 -r c9268e180613 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 20 11:05:00 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 20 11:53:39 2008 -0400 @@ -102,11 +102,13 @@ public class PulseAudioSourceDataLine ex protected void connectLine() { StreamBufferAttributes bufferAttributes = new StreamBufferAttributes( - StreamBufferAttributes.SANE_DEFAULT, StreamBufferAttributes.SANE_DEFAULT, - StreamBufferAttributes.SANE_DEFAULT, StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, StreamBufferAttributes.SANE_DEFAULT); - - stream.connectForPlayback(null,bufferAttributes); + + stream.connectForPlayback(null, bufferAttributes); } @Override @@ -254,18 +256,12 @@ public class PulseAudioSourceDataLine ex @Override public void drain() { Operation operation; - Operation.State operationState; + synchronized (eventLoop.threadLock) { operation = stream.drain(); - operationState = operation.getState(); - } - - // FIXME need to find a way to do a wait than a busy loop - while (operationState != Operation.State.Done) { - synchronized (eventLoop.threadLock) { - operationState = operation.getState(); - } - } + } + + operation.waitForCompletion(); operation.releaseReference(); } @@ -273,18 +269,11 @@ public class PulseAudioSourceDataLine ex @Override public void flush() { Operation operation; - Operation.State operationState; synchronized (eventLoop.threadLock) { operation = stream.flush(); - operationState = operation.getState(); - } - // FIXME need to find a way to do a wait than a busy loop - while (operationState != Operation.State.Done) { - synchronized (eventLoop.threadLock) { - operationState = operation.getState(); - } - } - + } + + operation.waitForCompletion(); operation.releaseReference(); } diff -r f4ead96961a9 -r c9268e180613 src/native/jni-common.c --- a/src/native/jni-common.c Wed Aug 20 11:05:00 2008 -0400 +++ b/src/native/jni-common.c Wed Aug 20 11:53:39 2008 -0400 @@ -104,6 +104,44 @@ void callJavaVoidMethod(JNIEnv* env, job } +void notifyWaitingOperations(JNIEnv* env) { + + const char* eventLoopClassName = + "Lorg/classpath/icedtea/pulseaudio/EventLoop;"; + jclass eventLoopClass = (*env)->FindClass(env, eventLoopClassName); + assert(eventLoopClass); + + const char* getEventLoopIDSignature = + "()Lorg/classpath/icedtea/pulseaudio/EventLoop;"; + jmethodID getEventLoopID = (*env)->GetStaticMethodID(env, eventLoopClass, "getEventLoop", + getEventLoopIDSignature); + assert(getEventLoopID); + + jobject eventLoop = (*env)->CallStaticObjectMethod(env, eventLoopClass, getEventLoopID); + assert(eventLoop); + + jfieldID lockID = (*env)->GetFieldID(env, eventLoopClass, "threadLock", + "Ljava/lang/Object;"); + assert(lockID); + + jobject lockObject = (*env)->GetObjectField(env, eventLoop, lockID); + assert(lockObject); + + (*env)->MonitorEnter(env, lockObject); + + jclass objectClass = (*env)->FindClass(env, "Ljava/lang/Object;"); + assert(objectClass); + jmethodID notifyAllID = (*env)->GetMethodID(env, objectClass, "notifyAll", "()V"); + assert(notifyAllID); + + (*env)->CallObjectMethod(env, lockObject, notifyAllID); + + (*env)->MonitorExit(env, lockObject); + +} + + + /* * * diff -r f4ead96961a9 -r c9268e180613 src/native/jni-common.h --- a/src/native/jni-common.h Wed Aug 20 11:05:00 2008 -0400 +++ b/src/native/jni-common.h Wed Aug 20 11:53:39 2008 -0400 @@ -70,7 +70,7 @@ void throwByName(JNIEnv* const env, cons void throwByName(JNIEnv* const env, const char* const name, const char* const msg); - +void notifyWaitingOperations(JNIEnv* env); void* getJavaPointer(JNIEnv* env, jobject obj, char* name); void setJavaPointer(JNIEnv* env, jobject obj, char*name, void* pointer_value); diff -r f4ead96961a9 -r c9268e180613 src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c Wed Aug 20 11:05:00 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c Wed Aug 20 11:53:39 2008 -0400 @@ -48,37 +48,7 @@ static void set_sink_input_volume_callba JNIEnv* env = pulse_thread_env; - const char* eventLoopClassName = - "Lorg/classpath/icedtea/pulseaudio/EventLoop;"; - jclass eventLoopClass = (*env)->FindClass(env, eventLoopClassName); - assert(eventLoopClass); - - const char* getEventLoopIDSignature = - "()Lorg/classpath/icedtea/pulseaudio/EventLoop;"; - jmethodID getEventLoopID = (*env)->GetStaticMethodID(env, eventLoopClass, "getEventLoop", - getEventLoopIDSignature); - assert(getEventLoopID); - - jobject eventLoop = (*env)->CallStaticObjectMethod(env, eventLoopClass, getEventLoopID); - assert(eventLoop); - - jfieldID lockID = (*env)->GetFieldID(env, eventLoopClass, "threadLock", - "Ljava/lang/Object;"); - assert(lockID); - - jobject lockObject = (*env)->GetObjectField(env, eventLoop, lockID); - assert(lockObject); - - (*env)->MonitorEnter(env, lockObject); - - jclass objectClass = (*env)->FindClass(env,"Ljava/lang/Object;"); - assert(objectClass); - jmethodID notifyAllID = (*env)->GetMethodID(env, objectClass, "notifyAll", "()V"); - assert(notifyAllID); - - (*env)->CallObjectMethod(env, lockObject, notifyAllID); - - (*env)->MonitorExit(env, lockObject); + notifyWaitingOperations(env); } diff -r f4ead96961a9 -r c9268e180613 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Wed Aug 20 11:05:00 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Wed Aug 20 11:53:39 2008 -0400 @@ -460,7 +460,7 @@ JNIEXPORT jint JNICALL Java_org_classpat return value; } -JNIEXPORT int JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1read +JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1read (JNIEnv *env, jobject obj, jbyteArray array, jint length, jint offset) { pa_stream *stream = getJavaPointer(env, obj, "streamPointer"); const void *read_data = NULL; @@ -537,6 +537,14 @@ JNIEXPORT jint JNICALL Java_org_classpat return pa_stream_readable_size(stream); } +static void drain_callback(pa_stream* stream, int success, void* userdata) { + + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + +} + /* * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_drain @@ -545,8 +553,15 @@ JNIEXPORT jlong JNICALL Java_org_classpa JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1drain (JNIEnv* env, jobject obj) { pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); - pa_operation* operation = pa_stream_drain(stream, NULL, NULL); + pa_operation* operation = pa_stream_drain(stream, drain_callback, NULL); return convertPointerToJavaLong(operation); +} + +static void cork_callback(pa_stream* stream, int success, void* userdata) { + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + } /* @@ -557,8 +572,15 @@ JNIEXPORT jlong JNICALL Java_org_classpa JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork (JNIEnv* env, jobject obj, jint yes) { pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); - pa_operation* operation = pa_stream_cork(stream, yes, NULL, NULL); + pa_operation* operation = pa_stream_cork(stream, yes, cork_callback, NULL); return convertPointerToJavaLong(operation); +} + +static void flush_callback(pa_stream* stream, int success, void* userdata) { + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + } /* @@ -569,8 +591,15 @@ JNIEXPORT jlong JNICALL Java_org_classpa JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1flush (JNIEnv* env, jobject obj) { pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - pa_operation* operation = pa_stream_flush(stream, NULL, NULL); + pa_operation* operation = pa_stream_flush(stream, flush_callback, NULL); return convertPointerToJavaLong(operation); +} + +static void trigger_callback(pa_stream* stream, int success, void* userdata) { + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + } /* @@ -581,8 +610,15 @@ JNIEXPORT jlong JNICALL Java_org_classpa JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1trigger (JNIEnv* env, jobject obj) { pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); - pa_operation* operation = pa_stream_trigger(stream, NULL, NULL); + pa_operation* operation = pa_stream_trigger(stream, trigger_callback, NULL); return convertPointerToJavaLong(operation); +} + +static void set_name_callback(pa_stream* stream, int success, void* userdata) { + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + } /* @@ -599,7 +635,7 @@ JNIEXPORT jlong JNICALL Java_org_classpa return 0; // OutOfMemoryError already thrown } - pa_operation* operation = pa_stream_set_name(stream, name, NULL, NULL); + pa_operation* operation = pa_stream_set_name(stream, name, set_name_callback, NULL); assert(operation); (*env)->ReleaseStringUTFChars(env, newName, name); @@ -693,6 +729,14 @@ JNIEXPORT jobject JNICALL Java_org_class return return_object; } +static void set_buffer_attr_callback(pa_stream* stream, int success, void* userdata) { + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + +} + + /* * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_set_buffer_attr @@ -723,10 +767,18 @@ JNIEXPORT jlong JNICALL Java_org_classpa jmethodID getFragmentSizeID = (*env)->GetMethodID(env,cls,"getFragmentSize","()I"); buffer->fragsize = (*env)->CallIntMethod(env, bufferAttributeObject, getFragmentSizeID ); - pa_operation* operation = pa_stream_set_buffer_attr(stream, buffer, NULL, NULL); + pa_operation* operation = pa_stream_set_buffer_attr(stream, buffer, set_buffer_attr_callback, NULL); assert(operation); return convertPointerToJavaLong(operation); } + +static void update_sample_rate_callback(pa_stream* stream, int success, void* userdata) { + assert(success); + JNIEnv* env = pulse_thread_env; + notifyWaitingOperations(env); + +} + /* * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_update_sample_rate @@ -739,7 +791,7 @@ JNIEXPORT jlong JNICALL Java_org_classpa pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); assert(stream); - pa_operation* operation = pa_stream_update_sample_rate(stream,rate, NULL, NULL); + pa_operation* operation = pa_stream_update_sample_rate(stream,rate, update_sample_rate_callback, NULL); assert(operation); return convertPointerToJavaLong(operation); From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-20 Omair Majid changeset c1154939ba8b in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c1154939ba8b description: 2008-08-20 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Operation.java (waitForCompletion): Fixed race condition. diffstat: 1 file changed, 3 insertions(+), 1 deletion(-) src/java/org/classpath/icedtea/pulseaudio/Operation.java | 4 +++- diffs (14 lines): diff -r c9268e180613 -r c1154939ba8b src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Aug 20 11:53:39 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Aug 20 13:34:24 2008 -0400 @@ -136,7 +136,9 @@ public class Operation { do { synchronized (eventLoop.threadLock) { - + if (getState() == Operation.State.Done) { + return; + } try { eventLoop.threadLock.wait(); } catch (InterruptedException e) { From iivan at town.yyz.redhat.com Wed Aug 27 09:05:26 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: added start, stop and loop in Clip Message-ID: changeset 23c52715cfb2 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=23c52715cfb2 description: added start, stop and loop in Clip diffstat: 3 files changed, 225 insertions(+), 61 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 241 +++++++--- src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 8 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 37 + diffs (438 lines): diff -r c1154939ba8b -r 23c52715cfb2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 20 13:34:24 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 20 14:27:45 2008 -0400 @@ -38,8 +38,10 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; import java.io.IOException; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; @@ -51,7 +53,7 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Control.Type; -public class PulseAudioClip implements Clip { +public class PulseAudioClip extends PulseAudioDataLine implements Clip { private byte[] data = null; @@ -59,44 +61,120 @@ public class PulseAudioClip implements C private int bufferSize = 0; // these are frame indices. so counted from 0 - private long currentFrame = 0; + private int currentFrame = 0; private int frameCount = 0; - private long startFrame = 0; - private long endFrame = 0; - private long framesSinceOpen = 0; + private int startFrame = 0; + private int endFrame = 0; + private int framesSinceOpen = 0; private AudioFormat currentFormat = null; private static final AudioFormat DEFAULT_FORMAT = new AudioFormat( AudioFormat.Encoding.PCM_UNSIGNED, 22050, 8, 2, 2, 22050 / 2, false); - private boolean isOpen = false; - - private List lineListeners = null; + private static final int DEFAULT_BUFFER_SIZE = 0; public static final String DEFAULT_CLIP_NAME = "Clip"; - private Stream stream; - - private Thread clipLoop = new Thread() { + private Object clipLock = new Object(); + private boolean clipThreadStarted; + private int loopsLeft; + private Semaphore clipSemaphore= new Semaphore(1); + + private class ClipThread extends Thread { @Override public void run() { - while (true) { - - } - - } - - }; - - public PulseAudioClip() { - lineListeners = new LinkedList(); - } - - @Override - public void addLineListener(LineListener listener) { - lineListeners.add(listener); - } + clipThreadStarted = true; + while(loopsLeft >= 0) { + writeFrames(currentFrame, endFrame + 1); + if(Thread.interrupted()) { + //Thread.currentThread().interrupt(); + clipThreadStarted = false; + return; + } + + + + try { + //if loop(0) has been called from the mainThread, + //wait until loopsLeft has been set + clipSemaphore.acquire(); + if(loopsLeft == 0){ + System.out.println("Reading to the end of the file"); + writeFrames( endFrame, getFrameLength()); + return; + } else { + synchronized (clipLock) { + currentFrame = startFrame; + loopsLeft--; + } + } + clipSemaphore.release(); + } catch (InterruptedException e) { + return; + } + + + } + } + } + + private ClipThread clipThread; + + + private void writeFrames(int startingFrame, int lastFrame) { + + int remainingFrames = lastFrame - startingFrame - 1; + while(remainingFrames > 0) { + synchronized (eventLoop.threadLock) { + int availableSize = stream.getWritableSize(); + int framesToWrite = Math.min(remainingFrames, availableSize / getFormat().getFrameSize()); + stream.write(data, currentFrame * getFormat().getFrameSize(), framesToWrite * getFormat().getFrameSize()); + remainingFrames -= framesToWrite; + currentFrame += framesToWrite; + if(Thread.interrupted()) { + Thread.currentThread().interrupt(); + break; + } + System.out.println("remaining frames" + remainingFrames); + } + } + } + + + static { + try { + String library = new java.io.File(".").getCanonicalPath() + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(library); + System.load(library); + } catch (IOException e) { + assert ("Loading failed".endsWith("library")); + } + } + + public PulseAudioClip(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { + supportedFormats = formats; + this.eventLoop = eventLoop; + this.lineListeners = new ArrayList(); + this.defaultFormat = defaultFormat; + this.currentFormat = defaultFormat; + clipThread = new ClipThread(); + + } + + protected void connectLine() { + StreamBufferAttributes bufferAttributes = new StreamBufferAttributes( + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT); + + stream.connectForPlayback(null, bufferAttributes); + } + @Override public int available() { @@ -105,7 +183,12 @@ public class PulseAudioClip implements C @Override public void close() { - // TODO Auto-generated method stub + try { + clipThread.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + stream.drain(); stream.disconnect(); isOpen = false; @@ -113,7 +196,15 @@ public class PulseAudioClip implements C @Override public void drain() { - stream.drain(); + Operation operation; + + synchronized (eventLoop.threadLock) { + operation = stream.drain(); + } + + operation.waitForCompletion(); + operation.releaseReference(); + } @Override @@ -169,7 +260,9 @@ public class PulseAudioClip implements C @Override public long getLongFramePosition() { - return framesSinceOpen; + synchronized(clipLock) { + return framesSinceOpen; + } } @Override @@ -177,12 +270,16 @@ public class PulseAudioClip implements C if (!isOpen) { return AudioSystem.NOT_SPECIFIED; } - return frameCount / currentFormat.getFrameSize(); + synchronized(clipLock) { + return frameCount / currentFormat.getFrameSize(); + } } @Override public long getMicrosecondPosition() { - return framesSinceOpen / currentFormat.getFrameSize(); + synchronized(clipLock) { + return framesSinceOpen / currentFormat.getFrameSize(); + } } @Override @@ -210,8 +307,23 @@ public class PulseAudioClip implements C @Override public void loop(int count) { - // TODO Auto-generated method stub - + System.out.println("Loop " + count + " called"); + if(clipThreadStarted && count != 0) { + //Do nothing; behavior not specified by the Java API + return; + } + synchronized(clipLock) { + if(currentFrame > endFrame) { + loopsLeft = 0; + } else { + loopsLeft = count; + } + } + if (!clipThread.isAlive()) { + clipThread = new ClipThread(); + clipThread.start(); + } + } @Override @@ -223,24 +335,22 @@ public class PulseAudioClip implements C public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { - long contextPointer = EventLoop.getEventLoop().getContextPointer(); - int channels = 2; - int sampleRate = 22050; - stream = new Stream(contextPointer, DEFAULT_CLIP_NAME, - Stream.Format.PA_SAMPLE_U8, sampleRate, channels); - + super.open(format); + this.data = new byte[bufferSize]; + System.arraycopy(data, offset, this.data, 0, bufferSize); + frameCount = bufferSize / format.getFrameSize(); isOpen = true; } @Override public void open(AudioInputStream stream) throws LineUnavailableException, IOException { - // TODO Auto-generated method stub - byte[] buffer = new byte[(int) (stream.getFrameLength() * stream .getFormat().getFrameSize())]; - - open(stream.getFormat(), buffer, 0, DEFAULT_BUFFER_SIZE); + stream.read(buffer, 0, buffer.length); + + open(stream.getFormat(), buffer, 0, buffer.length); + } @@ -255,8 +365,10 @@ public class PulseAudioClip implements C if (frames > frameCount) { throw new IllegalArgumentException("incorreft frame value"); } - - currentFrame = frames; + + synchronized(clipLock) { + currentFrame = frames; + } } @@ -271,26 +383,47 @@ public class PulseAudioClip implements C "ending point must be greater than or equal to the starting point"); } - startFrame = start; - endFrame = end; + synchronized(clipLock) { + startFrame = start; + endFrame = end; + } } @Override public void setMicrosecondPosition(long microseconds) { float frameIndex = microseconds * currentFormat.getFrameRate(); - currentFrame = (long) frameIndex; + synchronized(clipLock) { + currentFrame = (int) frameIndex; + } } @Override public void start() { - stream.cork(false); - } - - @Override + if(!clipThread.isAlive()) { + synchronized(clipLock) { + loopsLeft = 0; + } + clipThread = new ClipThread(); + clipThread.start(); + } + } + + public void stop() { - stream.cork(true); + if(clipThread.isAlive()) { + clipThread.interrupt(); + } + try { + clipThread.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + synchronized(clipLock) { + currentFrame = 0; + loopsLeft = 0; + } } } diff -r c1154939ba8b -r 23c52715cfb2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 20 13:34:24 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 20 14:27:45 2008 -0400 @@ -49,6 +49,7 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Clip; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; @@ -318,10 +319,9 @@ public class PulseAudioMixer implements defaultFormat); } - PulseAudioClip clip = new PulseAudioClip(); - - if (info.matches(clip.getLineInfo())) { - clips.add(clip); + if ((info.getLineClass() == Clip.class)) { + Clip clip = new PulseAudioClip(eventLoop, formats, defaultFormat); + clips.add((PulseAudioClip) clip); return clip; } diff -r c1154939ba8b -r 23c52715cfb2 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Wed Aug 20 13:34:24 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Wed Aug 20 14:27:45 2008 -0400 @@ -102,16 +102,47 @@ public class PulseAudioClipTest { } @Test - public void testPlayClip() throws LineUnavailableException, IOException, UnsupportedAudioFileException { + public void testLoopStopStartClip() throws LineUnavailableException, IOException, UnsupportedAudioFileException { Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); File soundFile = new File("testsounds/startup.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); clip.open(audioInputStream); - clip.loop(1); + clip.setLoopPoints((int) (clip.getFrameLength() / 4), (int) (clip.getFrameLength() / 2)); + clip.loop(4); + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + clip.stop(); + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + clip.start(); + clip.close(); + } + + @Test + public void testLoop0Clip() throws LineUnavailableException, IOException, UnsupportedAudioFileException { + Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); + File soundFile = new File("testsounds/startup.wav"); + AudioInputStream audioInputStream = AudioSystem + .getAudioInputStream(soundFile); + clip.open(audioInputStream); - + clip.setLoopPoints((int) (clip.getFrameLength() / 4), (int) (clip.getFrameLength() / 2)); + clip.loop(4); + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + clip.loop(0); + clip.close(); } @Test (expected=IllegalArgumentException.class) From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-19 Omair Majid changeset 675a5044aecb in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=675a5044aecb description: 2008-08-19 Omair Majid * .hgignore: Ignore *.orig files too now. * src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java: New class. Forgot to add this last time. * src/java/org/classpath/icedtea/pulseaudio/StreamSampleSpecification.java: Liksewise. * src/native/Makefile.am: Removed obsolete compilation of TargetDataLine.c * src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c: Removed obsolete file diffstat: 5 files changed, 78 insertions(+), 239 deletions(-) .hgignore | 1 src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java | 43 + src/java/org/classpath/icedtea/pulseaudio/StreamSampleSpecification.java | 34 + src/native/Makefile.am | 2 src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c | 237 ---------- diffs (350 lines): diff -r 0ab3515d5074 -r 675a5044aecb .hgignore --- a/.hgignore Tue Aug 19 17:04:11 2008 -0400 +++ b/.hgignore Tue Aug 19 17:29:25 2008 -0400 @@ -6,6 +6,7 @@ syntax: glob *~ org_classpath_icedtea_*.h *.log +*.orig bin/* lib/* Makefile diff -r 0ab3515d5074 -r 675a5044aecb src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java Tue Aug 19 17:29:25 2008 -0400 @@ -0,0 +1,43 @@ +package org.classpath.icedtea.pulseaudio; + +public class StreamBufferAttributes { + + public static final int SANE_DEFAULT = -1; + + private int maxLength; + private int targetLength; + private int preBuffering; + private int minimumRequest; + private int fragmentSize; + + public StreamBufferAttributes(int maxLength, int targetLength, + int preBuffering, int minimumRequest, int fragmentSize) { + this.maxLength = maxLength; + this.targetLength = targetLength; + this.preBuffering = preBuffering; + this.minimumRequest = minimumRequest; + this.fragmentSize = fragmentSize; + } + + public int getMaxLength() { + return maxLength; + } + + public int getTargetLength() { + return targetLength; + } + + public int getPreBuffering() { + return preBuffering; + } + + public int getMinimumRequest() { + return minimumRequest; + } + + public int getFragmentSize() { + return fragmentSize; + } + +} + diff -r 0ab3515d5074 -r 675a5044aecb src/java/org/classpath/icedtea/pulseaudio/StreamSampleSpecification.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/StreamSampleSpecification.java Tue Aug 19 17:29:25 2008 -0400 @@ -0,0 +1,34 @@ +package org.classpath.icedtea.pulseaudio; + +import org.classpath.icedtea.pulseaudio.Stream.Format; + + +public class StreamSampleSpecification { + private Format format; + private int rate; + private int channels; + + public StreamSampleSpecification(Format format, int rate, int channels) { + this.format = format; + this.rate = rate; + this.channels = channels; + } + + public StreamSampleSpecification(String format, int rate, int channels) { + this.format = Format.valueOf(format); + this.rate = rate; + this.channels = channels; + } + + public Format getFormat() { + return format; + } + + public int getRate() { + return rate; + } + + public int getChannels() { + return channels; + } +} \ No newline at end of file diff -r 0ab3515d5074 -r 675a5044aecb src/native/Makefile.am --- a/src/native/Makefile.am Tue Aug 19 17:04:11 2008 -0400 +++ b/src/native/Makefile.am Tue Aug 19 17:29:25 2008 -0400 @@ -5,8 +5,6 @@ libpulse_java_la_SOURCES = \ jni-common.h \ org_classpath_icedtea_pulseaudio_EventLoop.c \ org_classpath_icedtea_pulseaudio_EventLoop.h \ - org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c \ - org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.h \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h \ org_classpath_icedtea_pulseaudio_Operation.h \ diff -r 0ab3515d5074 -r 675a5044aecb src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c Tue Aug 19 17:04:11 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* org_org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.c - Copyright (C) 2008 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - - - -#include -#include -#include -#include -#include -#include - -#include "org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine.h" -#include "jni-common.h" - -/* defined in EventLoop.c */ -extern JNIEnv* pulse_thread_env; - -/*static void stream_read_cb(pa_stream* stream, size_t length, void* userdata) { - pa_threaded_mainloop *mainloop = userdata; - pa_threaded_mainloop_signal(mainloop, 0); -} - -static void stream_operation_complete_cb(pa_stream* stream, int success, - void* userdata) { - pa_threaded_mainloop *mainloop = userdata; - pa_threaded_mainloop_signal(mainloop, 0); -}*/ - -static void stream_state_change_callback(pa_stream* stream, void* userdata) { - assert(stream); - assert(userdata); - - // printf("entering stream_state_change_callback\n"); - - java_context_t* java_context = (java_context_t*)userdata; - JNIEnv* env; - - /* needed so we can create a stream from another thread - */ - if (pa_stream_get_state(stream) == PA_STREAM_CREATING) { - env = java_context->env; - } else { - env = pulse_thread_env; - } - - jobject obj = java_context->obj; - - // printf("stream state changed to %d\n", pa_stream_get_state(stream)); - - /* Call the 'update' method in java - * to handle all java-side events - */ - jclass cls = (*env)->GetObjectClass(env, obj); - if (cls == NULL) { - printf("unable to get class of object"); - return; - } - jmethodID mid = (*env)->GetMethodID(env, cls, "update", "(I)V"); - if (mid == NULL) { - printf("unable to get callback method\n"); - return; - - } - //printf("calling update on java\n"); - (*env)->CallVoidMethod(env, obj, mid, pa_stream_get_state(stream)); - - //printf("returning form stream_state_change_callback\n"); - return; - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_open - * Signature: (JLjava/lang/String;Ljava/lang/String;III)V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine_native_1open -(JNIEnv* env, jobject obj, jlong contextPointer, jstring name, jstring encodingString, jint sampleRate, jint channels, jint bufferSize) { - - //TODO: Need to deal with the buffer size. Currently ignored - - // printf("entering native_open\n"); - java_context_t* java_context = malloc(sizeof(java_context)); - java_context->env = env; - java_context->obj = (*env)->NewGlobalRef(env, obj); - - pa_context* context = (pa_context*) convertJavaLongToPointer(contextPointer); - assert(context != NULL); - - pa_sample_spec sample_spec; - - const char *encoding = (*env)->GetStringUTFChars(env, encodingString, NULL); - - if (strcmp(encoding, "PA_SAMPLE_U8") == 0) { - sample_spec.format = PA_SAMPLE_U8; - } else if (strcmp(encoding, "PA_SAMPLE_ALAW") == 0) { - sample_spec.format = PA_SAMPLE_ALAW; - } else if (strcmp(encoding, "PA_SAMPLE_ULAW;") == 0) { - sample_spec.format = PA_SAMPLE_ULAW; - } else if (strcmp(encoding, "PA_SAMPLE_S16BE") == 0) { - sample_spec.format = PA_SAMPLE_S16BE; - } else if (strcmp(encoding, "PA_SAMPLE_S16LE") == 0) { - sample_spec.format = PA_SAMPLE_S16LE; - } else if (strcmp(encoding, "PA_SAMPLE_S32BE") == 0) { - sample_spec.format = PA_SAMPLE_S32BE; - } else if (strcmp(encoding, "PA_SAMPLE_S32LE") == 0) { - sample_spec.format = PA_SAMPLE_S32LE; - } else { - printf("error in open: encoding is : %s\n", encoding); - throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); - /* clean up */ - free(java_context); - (*env)->DeleteGlobalRef(env, obj); - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - return; - } - - sample_spec.rate = sampleRate; - sample_spec.channels = channels; - - printf("sample_spec.rate = %d\n", sample_spec.rate); - printf("sample_spec.channels = %d\n", sample_spec.channels); - - if ( !pa_sample_spec_valid(&sample_spec)) { - printf("error: invalid format\n"); - throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); - /* clean up */ - free(java_context); - (*env)->DeleteGlobalRef(env, obj); - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - return; - } - - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - - /* obtain the server from the caller */ - const char* stream_name = NULL; - stream_name = (*env)->GetStringUTFChars(env, name, NULL); - if (stream_name == NULL) { - return; /* OutOfMemoryError */ - } - // printf("About to create stream: %s\n", stream_name); - pa_stream* stream = pa_stream_new(context, stream_name, &sample_spec, NULL); - assert(stream != NULL); - (*env)->ReleaseStringUTFChars(env, name, stream_name); - - pa_stream_set_state_callback(stream, stream_state_change_callback, java_context); - - // printf("seeting stream pointer: %d\n", (int)stream); - setJavaPointer(env, obj, "streamPointer", stream); - // printf("returning from native_open\n"); - -} - -/* - * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourceDataLine - * Method: native_start - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine_native_1start -(JNIEnv *env, jobject obj) { - pa_stream *stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); - assert(stream); - pa_stream_connect_record(stream, NULL, NULL, 0); - -} - - -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine_native_1get_1readable_1size -(JNIEnv* env, jobject obj) { - - - - pa_stream *stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - assert(stream); - int available = pa_stream_readable_size(stream); - return available; -} - -JNIEXPORT int JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine_native_1read - (JNIEnv *env, jobject obj, jbyteArray array, jint length, jint offset) { - pa_stream *stream = getJavaPointer(env, obj, "streamPointer"); - const void *read_data = NULL; - size_t read_length = 0; - pa_stream_peek(stream, &read_data, &read_length); - if (length < read_length) { - read_length = length; - } - - (*env)->SetByteArrayRegion(env, array, offset, read_length, read_data); - pa_stream_drop(stream); - return read_length; -} - -JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioTargetDataLine_native_1close -(JNIEnv* env, jobject obj) { - pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); - pa_stream_disconnect(stream); - - -} - From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-25 Omair Majid changeset 2e4a2a022ffb in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=2e4a2a022ffb description: 2008-08-25 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java (static): Output the name of the class and the native library being loaded. * src/java/org/classpath/icedtea/pulseaudio/Operation.java (static): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Removed unneeded imports to remove compiler warnings. Moved bufferSize into PulseAudioDataLine so it can be shared. Removed DEFAULT_FORMAT and DEFAULT_BUFFER_SIZE. (static): Removed static initializer (there are no native methods) (flush): Added Operation object to release refernce and wait for operation to complete. (getControl): Throw an exception to comply with the api reference. (getControls): Return an array of size 0 instead of null. (getFormat): Return defaultFormat which is set when obtaining a line instead of DEFAULT_FORMAT. (getLineInfo): Return a DataLine.Info object which includes extra information. (isControlSupported): Removed (wrong) comment. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Added bufferSize as a protected variable (open): Set the value of bufferSize. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (PulseAudioMixer): Set the values of min and max buffer sizes. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java (getMixer): Commented out extra debug output. (getMixerInfo): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (getBufferSize): Return the actual buffer size. (getFormat): Return the default format of the line if the line is not open. (getLineInfo): Return the proper buffer metrics. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java (static). Output name of class and the library being loaded. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (getBufferSize): Return the actual buffer size. (getFormat): Return the default format of the line if the line is closed. (getLineInfo): Set the correct value of buffer metrics. * src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java Removed uneeded imports to remove compiler warnings. * src/java/org/classpath/icedtea/pulseaudio/Stream.java (static): Added static initializer. (Stream): Commented out debug output. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (stream_underflow_callback): Commented out debug output. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Removed unneeded imports to remove compiler warnings. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Likewise. diffstat: 14 files changed, 79 insertions(+), 76 deletions(-) src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 7 - src/java/org/classpath/icedtea/pulseaudio/Operation.java | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 55 +++------- src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 4 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 17 +-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java | 4 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 10 + src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 12 -- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 10 + src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java | 13 +- src/java/org/classpath/icedtea/pulseaudio/Stream.java | 16 ++ src/native/org_classpath_icedtea_pulseaudio_Stream.c | 2 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 1 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 2 diffs (457 lines): diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Mon Aug 25 14:51:13 2008 -0400 @@ -105,9 +105,10 @@ public class EventLoop implements Runnab static { try { String library = new java.io.File(".").getCanonicalPath() - - + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); - System.out.println(library); + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(EventLoop.class.getCanonicalName() + ": " + + library); System.load(library); } catch (IOException e) { assert ("Loading failed".endsWith("library")); diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Aug 25 14:51:13 2008 -0400 @@ -63,7 +63,7 @@ public class Operation { String library = new java.io.File(".").getCanonicalPath() + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); - System.out.println(library); + System.out.println(Operation.class.getCanonicalName() + ": " + library); System.load(library); } catch (IOException e) { assert ("Loading failed".endsWith("library")); diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Aug 25 14:51:13 2008 -0400 @@ -39,8 +39,6 @@ package org.classpath.icedtea.pulseaudio import java.io.IOException; import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; @@ -48,7 +46,7 @@ import javax.sound.sampled.AudioSystem; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.Control; -import javax.sound.sampled.Line; +import javax.sound.sampled.DataLine; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Control.Type; @@ -56,9 +54,6 @@ public class PulseAudioClip extends Puls public class PulseAudioClip extends PulseAudioDataLine implements Clip { private byte[] data = null; - - // FIXME - private int bufferSize = 0; // these are frame indices. so counted from 0 private int currentFrame = 0; @@ -68,10 +63,7 @@ public class PulseAudioClip extends Puls private int framesSinceOpen = 0; private AudioFormat currentFormat = null; - private static final AudioFormat DEFAULT_FORMAT = new AudioFormat( - AudioFormat.Encoding.PCM_UNSIGNED, 22050, 8, 2, 2, 22050 / 2, false); - - private static final int DEFAULT_BUFFER_SIZE = 0; + public static final String DEFAULT_CLIP_NAME = "Clip"; private Object clipLock = new Object(); @@ -86,14 +78,14 @@ public class PulseAudioClip extends Puls while (loopsLeft >= 0) { writeFrames(currentFrame, endFrame + 1); if (Thread.interrupted()) { - //Thread.currentThread().interrupt(); + // Thread.currentThread().interrupt(); clipThreadStarted = false; return; } try { - //if loop(0) has been called from the mainThread, - //wait until loopsLeft has been set + // if loop(0) has been called from the mainThread, + // wait until loopsLeft has been set clipSemaphore.acquire(); if (loopsLeft == 0) { System.out.println("Reading to the end of the file"); @@ -137,18 +129,6 @@ public class PulseAudioClip extends Puls } } - static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - System.out.println(library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } - } - public PulseAudioClip(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { supportedFormats = formats; @@ -202,9 +182,13 @@ public class PulseAudioClip extends Puls @Override public void flush() { + Operation operation; synchronized (eventLoop.threadLock) { - stream.flush(); - } + operation = stream.flush(); + operation.waitForCompletion(); + } + operation.releaseReference(); + } @Override @@ -214,20 +198,19 @@ public class PulseAudioClip extends Puls @Override public Control getControl(Type control) { - // TODO Auto-generated method stub - return null; + throw new IllegalArgumentException(control.toString() + + " not supported"); } @Override public Control[] getControls() { - // TODO Auto-generated method stub - return null; + return new Control[] {}; } @Override public AudioFormat getFormat() { if (!isOpen) { - return DEFAULT_FORMAT; + return defaultFormat; } return currentFormat; } @@ -244,13 +227,14 @@ public class PulseAudioClip extends Puls @Override public float getLevel() { - // TODO Auto-generated method stub return AudioSystem.NOT_SPECIFIED; } @Override public javax.sound.sampled.Line.Info getLineInfo() { - return new Line.Info(this.getClass()); + return new DataLine.Info(this.getClass(), supportedFormats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE); } @Override @@ -285,7 +269,6 @@ public class PulseAudioClip extends Puls @Override public boolean isControlSupported(Type control) { - // TODO Auto-generated method stub return false; } @@ -304,7 +287,7 @@ public class PulseAudioClip extends Puls public void loop(int count) { System.out.println("Loop " + count + " called"); if (clipThreadStarted && count != 0) { - //Do nothing; behavior not specified by the Java API + // Do nothing; behavior not specified by the Java API return; } synchronized (clipLock) { diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Mon Aug 25 14:51:13 2008 -0400 @@ -25,6 +25,8 @@ public abstract class PulseAudioDataLine protected AudioFormat currentFormat = null; protected AudioFormat defaultFormat = null; + protected int bufferSize = 0; + protected List lineListeners = new ArrayList();; protected EventLoop eventLoop = null; @@ -79,7 +81,7 @@ public abstract class PulseAudioDataLine synchronized (eventLoop.threadLock) { connectLine(bufferSize); } - + this.bufferSize = bufferSize; try { semaphore.acquire(); synchronized (eventLoop.threadLock) { diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Mon Aug 25 14:51:13 2008 -0400 @@ -88,13 +88,16 @@ public class PulseAudioMixer implements private PulseAudioMixer() { AudioFormat[] formats = getSupportedFormats(); sourceLineInfos = new Line.Info[] { new DataLine.Info( - SourceDataLine.class, formats, AudioSystem.NOT_SPECIFIED, - AudioSystem.NOT_SPECIFIED) }; + SourceDataLine.class, formats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE) }; targetLineInfos = new Line.Info[] { new DataLine.Info( - TargetDataLine.class, formats, AudioSystem.NOT_SPECIFIED, - AudioSystem.NOT_SPECIFIED) }; - clipInfos = new Line.Info[] { new DataLine.Info(PulseAudioClip.class, - formats, AudioSystem.NOT_SPECIFIED, AudioSystem.NOT_SPECIFIED) }; + TargetDataLine.class, formats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE) }; + clipInfos = new Line.Info[] { new DataLine.Info(Clip.class, formats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE) }; } @@ -320,7 +323,7 @@ public class PulseAudioMixer implements } if ((info.getLineClass() == Clip.class)) { - Clip clip = new PulseAudioClip(eventLoop, formats, defaultFormat); + Clip clip = new PulseAudioClip(eventLoop, formats, defaultFormat); clips.add((PulseAudioClip) clip); return clip; } diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java Mon Aug 25 14:51:13 2008 -0400 @@ -45,7 +45,7 @@ public class PulseAudioMixerProvider ext @Override public Mixer getMixer(Info info) { - System.out.println("DEBUG: getMixer called"); + // System.out.println("DEBUG: getMixer called"); if (info.equals(PulseAudioMixerInfo.getInfo())) { return PulseAudioMixer.getInstance(); } else { @@ -55,7 +55,7 @@ public class PulseAudioMixerProvider ext @Override public Info[] getMixerInfo() { - System.out.println("DEBUG: get mixer info called"); + // System.out.println("DEBUG: get mixer info called"); Mixer.Info[] m = { PulseAudioMixerInfo.getInfo() }; return m; } diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 25 14:51:13 2008 -0400 @@ -168,11 +168,13 @@ public class PulseAudioSourceDataLine ex }; public int getBufferSize() { - // FIXME! - return 10000; + return bufferSize; } public AudioFormat getFormat() { + if (!isOpen) { + return defaultFormat; + } return currentFormat; } @@ -238,8 +240,8 @@ public class PulseAudioSourceDataLine ex } public javax.sound.sampled.Line.Info getLineInfo() { - return new DataLine.Info(SourceDataLine.class, supportedFormats, 0, - 100000); + return new DataLine.Info(this.getClass(), supportedFormats, StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE); } public boolean isControlSupported(Type control) { diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Mon Aug 25 14:51:13 2008 -0400 @@ -16,10 +16,11 @@ public class PulseAudioStreamVolumeContr static { try { String library = new java.io.File(".").getCanonicalPath() - - + java.io.File.separatorChar + System.mapLibraryName("pulse-java"); - - System.out.println(library); + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out.println(PulseAudioStreamVolumeControl.class + .getCanonicalName() + + ": " + library); System.load(library); } catch (IOException e) { assert ("Loading failed".endsWith("library")); @@ -53,9 +54,6 @@ public class PulseAudioStreamVolumeContr } op.waitForCompletion(); - - assert (op.getState() == Operation.State.Done); - op.releaseReference(); } diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 25 14:51:13 2008 -0400 @@ -143,10 +143,13 @@ public class PulseAudioTargetDataLine ex } public int getBufferSize() { - return DEFAULT_BUFFER_SIZE; + return bufferSize; } public AudioFormat getFormat() { + if (!isOpen) { + return defaultFormat; + } return currentFormat; } @@ -186,8 +189,9 @@ public class PulseAudioTargetDataLine ex } public javax.sound.sampled.Line.Info getLineInfo() { - return new DataLine.Info(TargetDataLine.class, supportedFormats, 0, - DEFAULT_BUFFER_SIZE); + return new DataLine.Info(this.getClass(), supportedFormats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE); } public boolean isControlSupported(Type control) { diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java --- a/src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/SimpleAudioRecorder.java Mon Aug 25 14:51:13 2008 -0400 @@ -39,17 +39,16 @@ package org.classpath.icedtea.pulseaudio |<--- this code is formatted to fit into 80 columns --->| */ +import java.io.File; import java.io.IOException; -import java.io.File; - + +import javax.sound.sampled.AudioFileFormat; +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.Mixer; import javax.sound.sampled.TargetDataLine; -import javax.sound.sampled.AudioFormat; -import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.AudioInputStream; -import javax.sound.sampled.LineUnavailableException; -import javax.sound.sampled.AudioFileFormat; public class SimpleAudioRecorder extends Thread { private TargetDataLine m_line; diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Aug 25 12:07:04 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Aug 25 14:51:13 2008 -0400 @@ -1,5 +1,6 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; +import java.io.IOException; import java.util.LinkedList; import java.util.List; @@ -59,6 +60,19 @@ public class Stream { @SuppressWarnings("unused") private long streamPointer; + + static { + try { + String library = new java.io.File(".").getCanonicalPath() + + java.io.File.separatorChar + + System.mapLibraryName("pulse-java"); + System.out + .println(Stream.class.getCanonicalName() + ": " + library); + System.load(library); + } catch (IOException e) { + assert ("Loading failed".endsWith("library")); + } + } private Format format; @@ -178,7 +192,7 @@ public class Stream { public Stream(long contextPointer, String name, Format format, int sampleRate, int channels) { - System.out.println("format: " + format.toString()); + // System.out.println("format: " + format.toString()); stateListeners = new LinkedList(); writeListeners = new LinkedList(); diff -r 9a4c1d255bc6 -r 2e4a2a022ffb src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Aug 25 12:07:04 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Aug 25 14:51:13 2008 -0400 @@ -130,7 +130,7 @@ static void stream_overflow_callback(pa_ } static void stream_underflow_callback(pa_stream *stream, void *userdata) { - printf("stream_underflow_callback called\n"); + // printf("stream_underflow_callback called\n"); java_context* context = userdata; assert(stream); diff -r 9a4c1d255bc6 -r 2e4a2a022ffb unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Aug 25 12:07:04 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Aug 25 14:51:13 2008 -0400 @@ -47,7 +47,6 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.UnsupportedAudioFileException; -import javax.sound.sampled.DataLine.Info; import junit.framework.JUnit4TestAdapter; diff -r 9a4c1d255bc6 -r 2e4a2a022ffb unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Mon Aug 25 12:07:04 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Mon Aug 25 14:51:13 2008 -0400 @@ -51,14 +51,12 @@ import javax.sound.sampled.Port; import javax.sound.sampled.Port; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; -import javax.sound.sampled.Line.Info; import junit.framework.JUnit4TestAdapter; import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; public class PulseAudioMixerTest { From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-20 Omair Majid changeset f4ead96961a9 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=f4ead96961a9 description: 2008-08-20 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Operation.java (finalize): New function. (releaseReference): Set operationPointer to null. (waitForCompletion): Replaced stub with actual implementation. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java (setStreamVolume): Replaced polling loop with call to waitForCompletion. (native_getOperationState): Removed obsolete function. * src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c (set_sink_input_volume_callback): New function. (Java_org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl_native_1setValue): Commented out debug info. Added a callback for pa_context_set_sink_input_volume. (Java_org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl_native_1getOperationState): Removed obsolete function. * unittests/org/classpath/icedtea/pulseaudio/PulseSouceDataLineTest.java (testVolumeChanging): Removed unused varaible mute. diffstat: 4 files changed, 73 insertions(+), 24 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Operation.java | 26 ++++- src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 19 +-- src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 50 ++++++++-- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 2 diffs (167 lines): diff -r 675a5044aecb -r f4ead96961a9 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Tue Aug 19 17:29:25 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Aug 20 11:05:00 2008 -0400 @@ -81,6 +81,13 @@ public class Operation { this.eventLoop = EventLoop.getEventLoop(); } + @Override + protected void finalize() throws Throwable { + // might catch operations which havent been released + assert (operationPointer == 0); + super.finalize(); + } + public void addReference() { assert (operationPointer != 0); synchronized (eventLoop.threadLock) { @@ -93,6 +100,7 @@ public class Operation { synchronized (eventLoop.threadLock) { native_unref(); } + operationPointer = 0; } public boolean isNull() { @@ -121,11 +129,21 @@ public class Operation { } - public void waitForCompletion() throws InterruptedException { + public void waitForCompletion() { + assert (operationPointer != 0); + State operationState = getState(); + assert (operationState != State.Done); - synchronized (eventLoop.threadLock) { - eventLoop.threadLock.wait(); - } + do { + synchronized (eventLoop.threadLock) { + + try { + eventLoop.threadLock.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } while (getState() != State.Done); } } diff -r 675a5044aecb -r f4ead96961a9 src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Tue Aug 19 17:29:25 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java Wed Aug 20 11:05:00 2008 -0400 @@ -47,17 +47,16 @@ public class PulseAudioStreamVolumeContr } protected synchronized void setStreamVolume(float newValue) { - int operationPointer; - int operationState; + Operation op; synchronized (eventLoop.threadLock) { - operationPointer = native_setValue(newValue); - operationState = native_getOperationState(operationPointer); + op = new Operation(native_setValue(newValue)); } - while (operationState != 1) { - synchronized (eventLoop.threadLock) { - operationState = native_getOperationState(operationPointer); - } - } + + op.waitForCompletion(); + + assert (op.getState() == Operation.State.Done); + + op.releaseReference(); } @@ -65,7 +64,5 @@ public class PulseAudioStreamVolumeContr return line.getVolume(); } - private native int native_getOperationState(int operationState); - public native int native_setValue(float newValue); } diff -r 675a5044aecb -r f4ead96961a9 src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c --- a/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c Tue Aug 19 17:29:25 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c Wed Aug 20 11:05:00 2008 -0400 @@ -41,20 +41,56 @@ #include "jni-common.h" #include "org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h" +extern JNIEnv* pulse_thread_env; +static void set_sink_input_volume_callback(pa_context* context, int success, + void* userdata) { + JNIEnv* env = pulse_thread_env; -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl_native_1setValue(JNIEnv *env, jobject obj, jfloat new_volume) { - printf("IN NATIVE SET VOLUME\n"); + const char* eventLoopClassName = + "Lorg/classpath/icedtea/pulseaudio/EventLoop;"; + jclass eventLoopClass = (*env)->FindClass(env, eventLoopClassName); + assert(eventLoopClass); + + const char* getEventLoopIDSignature = + "()Lorg/classpath/icedtea/pulseaudio/EventLoop;"; + jmethodID getEventLoopID = (*env)->GetStaticMethodID(env, eventLoopClass, "getEventLoop", + getEventLoopIDSignature); + assert(getEventLoopID); + + jobject eventLoop = (*env)->CallStaticObjectMethod(env, eventLoopClass, getEventLoopID); + assert(eventLoop); + + jfieldID lockID = (*env)->GetFieldID(env, eventLoopClass, "threadLock", + "Ljava/lang/Object;"); + assert(lockID); + + jobject lockObject = (*env)->GetObjectField(env, eventLoop, lockID); + assert(lockObject); + + (*env)->MonitorEnter(env, lockObject); + + jclass objectClass = (*env)->FindClass(env,"Ljava/lang/Object;"); + assert(objectClass); + jmethodID notifyAllID = (*env)->GetMethodID(env, objectClass, "notifyAll", "()V"); + assert(notifyAllID); + + (*env)->CallObjectMethod(env, lockObject, notifyAllID); + + (*env)->MonitorExit(env, lockObject); + +} + +JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl_native_1setValue +(JNIEnv *env, jobject obj, jfloat new_volume) { + // printf("IN NATIVE SET VOLUME\n"); pa_stream *stream = getJavaPointer(env, obj, "streamPointer"); - printf("STREAM POINTER %d", (int) stream); + // printf("STREAM POINTER %d", (int) stream); pa_context *context = pa_stream_get_context(stream); int stream_id = pa_stream_get_index(stream); int channels = pa_stream_get_sample_spec(stream)->channels; pa_cvolume cv; - return (jint) pa_context_set_sink_input_volume(context, stream_id, pa_cvolume_set(&cv, channels, new_volume), NULL, NULL); + return (jint) pa_context_set_sink_input_volume(context, stream_id, pa_cvolume_set(&cv, channels, new_volume), set_sink_input_volume_callback, NULL); } -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl_native_1getOperationState(JNIEnv *env, jobject obj, jint operation) { - return pa_operation_get_state((pa_operation *) operation); -} diff -r 675a5044aecb -r f4ead96961a9 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 19 17:29:25 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Wed Aug 20 11:05:00 2008 -0400 @@ -244,8 +244,6 @@ public class PulseSourceDataLineTest { line.start(); PulseAudioStreamVolumeControl volume = (PulseAudioStreamVolumeControl) line .getControl(FloatControl.Type.VOLUME); - PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line - .getControl(BooleanControl.Type.MUTE); volume.setValue(PulseAudioStreamVolumeControl.MIN_VOLUME); From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-19 Omair Majid changeset 0ab3515d5074 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=0ab3515d5074 description: 2008-08-19 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (connectLine): Added support for buffer attributes. * src/java/org/classpath/icedtea/pulseaudio/Stream.java: (native_pa_stream_connect_playback): Likeswise. (native_pa_stream_get_sample_spec): New function. (native_pa_stream_get_buffer_attr): Likewise. (native_pa_stream_set_buffer_attr): Likewise. (Stream): Uses SampleSpecification objects now. (connectForPlayback): Added support for buffer attributes. (getBufferAttributes): New function. (setBufferAtrributes): Likewise. * src/native/org_classpath_icedtea_pulseaudio_Stream.c: (getStringFromFormat): New function. (getFormatFromString): New function. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new): Uses getFormatFromString now. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1connect_1playback): New function. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1sample_1spec): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1buffer_1attr): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1set_1buffer_1attr): Likewise. * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java (testVolumeChanging): New function. diffstat: 4 files changed, 244 insertions(+), 71 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 24 - src/java/org/classpath/icedtea/pulseaudio/Stream.java | 65 +-- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 185 ++++++++-- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 41 ++ diffs (472 lines): diff -r 52b513a7e5e9 -r 0ab3515d5074 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 19 11:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Aug 19 17:04:11 2008 -0400 @@ -46,11 +46,10 @@ import javax.sound.sampled.LineListener; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; -import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; -public class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine { - +public class PulseAudioSourceDataLine extends PulseAudioDataLine implements + SourceDataLine { private Control[] controls = null; private PulseAudioStreamMuteControl muteControl; @@ -59,8 +58,6 @@ public class PulseAudioSourceDataLine ex private float volume; private long currentFramePosition = 0; - - public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { @@ -93,7 +90,7 @@ public class PulseAudioSourceDataLine ex public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { - + super.open(format, bufferSize); controls = new Control[2]; volumeControl = new PulseAudioStreamVolumeControl(this); @@ -102,11 +99,15 @@ public class PulseAudioSourceDataLine ex controls[1] = muteControl; } - + protected void connectLine() { - stream.connectForPlayback(null); - } - + StreamBufferAttributes bufferAttributes = new StreamBufferAttributes( + StreamBufferAttributes.SANE_DEFAULT, StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT, StreamBufferAttributes.SANE_DEFAULT, + StreamBufferAttributes.SANE_DEFAULT); + + stream.connectForPlayback(null,bufferAttributes); + } @Override public int write(byte[] data, int offset, int length) { @@ -160,13 +161,11 @@ public class PulseAudioSourceDataLine ex return sizeWritten; } - public int available() { synchronized (eventLoop.threadLock) { return stream.getWritableSize(); } }; - public int getBufferSize() { // FIXME! @@ -290,7 +289,6 @@ public class PulseAudioSourceDataLine ex } - protected EventLoop getEventLoop() { return this.eventLoop; } diff -r 52b513a7e5e9 -r 0ab3515d5074 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Tue Aug 19 11:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Tue Aug 19 17:04:11 2008 -0400 @@ -86,7 +86,9 @@ public class Stream { private native int native_pa_stream_is_suspended(); private native int native_pa_stream_connect_playback(String name, - long buffer_attrPointer, int flags, long volumePointer, + int bufferMaxLength, int bufferTargetLength, + int bufferPreBuffering, int bufferMinimumRequest, + int bufferFragmentSize, int flags, long volumePointer, long sync_streamPointer); private native int native_pa_stream_connect_record(String device, @@ -139,16 +141,19 @@ public class Stream { /* * const pa_timing_info * pa_stream_get_timing_info (pa_stream *s) Return - * the latest raw timing data structure. const pa_sample_spec * - * pa_stream_get_sample_spec (pa_stream *s) Return a pointer to the stream's - * sample specification. const pa_channel_map * pa_stream_get_channel_map - * (pa_stream *s) Return a pointer to the stream's channel map. const - * pa_buffer_attr * pa_stream_get_buffer_attr (pa_stream *s) Return the - * per-stream server-side buffer metrics of the stream. pa_operation * - * pa_stream_set_buffer_attr (pa_stream *s, const pa_buffer_attr *attr, - * pa_stream_success_cb_t cb, void *userdata) Change the buffer metrics of - * the stream during playback. - */ + * the latest raw timing data structure. + */ + + native StreamSampleSpecification native_pa_stream_get_sample_spec(); + + /* + * const pa_channel_map * pa_stream_get_channel_map (pa_stream *s) Return a + * pointer to the stream's channel map. const + * + */ + native StreamBufferAttributes native_pa_stream_get_buffer_attr(); + + native long native_pa_stream_set_buffer_attr(StreamBufferAttributes info); private native long native_pa_stream_update_sample_rate(int rate); @@ -182,8 +187,11 @@ public class Stream { this.format = format; - native_pa_stream_new(contextPointer, name, format.toString(), + StreamSampleSpecification spec = new StreamSampleSpecification(format, sampleRate, channels); + + native_pa_stream_new(contextPointer, name, spec.getFormat().toString(), + spec.getRate(), spec.getChannels()); } public void addStateListener(StateListener listener) { @@ -330,10 +338,14 @@ public class Stream { * * @param deviceName */ - public void connectForPlayback(String deviceName) { - - int returnValue = native_pa_stream_connect_playback(deviceName, 0, 0, - 0, 0); + public void connectForPlayback(String deviceName, + StreamBufferAttributes bufferAttributes) { + + int returnValue = native_pa_stream_connect_playback(deviceName, + bufferAttributes.getMaxLength(), bufferAttributes + .getTargetLength(), bufferAttributes.getPreBuffering(), + bufferAttributes.getMinimumRequest(), bufferAttributes + .getFragmentSize(), 0, 0, 0); assert (returnValue == 0); } @@ -575,8 +587,6 @@ public class Stream { return native_pa_stream_get_time(); } - - /** * @returns the total stream latency in microseconds */ @@ -599,18 +609,13 @@ public class Stream { * pointer to the stream's channel map. */ - /* - * const pa_buffer_attr * pa_stream_get_buffer_attr (pa_stream *s) Return - * the per-stream server-side buffer metrics of the stream. - * - */ - - /* - * pa_operation * pa_stream_set_buffer_attr (pa_stream *s, const - * pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata) Change - * the buffer metrics of the stream during playback. - * - */ + public StreamBufferAttributes getBufferAttributes() { + return native_pa_stream_get_buffer_attr(); + } + + public Operation setBufferAtrributes(StreamBufferAttributes attr) { + return new Operation(native_pa_stream_set_buffer_attr(attr)); + } /** * Change the stream sampling rate during playback. diff -r 52b513a7e5e9 -r 0ab3515d5074 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Tue Aug 19 11:35:27 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Tue Aug 19 17:04:11 2008 -0400 @@ -10,6 +10,56 @@ typedef struct java_context { } java_context; extern JNIEnv* pulse_thread_env; + +const char* getStringFromFormat(pa_sample_format_t format) { + + const char* value; + + if (format == PA_SAMPLE_U8) { + value = "PA_SAMPLE_U8"; + } else if (format == PA_SAMPLE_ALAW) { + value = "PA_SAMPLE_ALAW"; + } else if (format == PA_SAMPLE_ULAW) { + value = "PA_SAMPLE_ULAW"; + } else if (format == PA_SAMPLE_S16BE) { + value = "PA_SAMPLE_S16BE"; + } else if (format == PA_SAMPLE_S16LE) { + value = "PA_SAMPLE_S16LE"; + } else if (format == PA_SAMPLE_S32BE) { + value = "PA_SAMPLE_S32BE"; + } else if (format == PA_SAMPLE_S32LE) { + value = "PA_SAMPLE_S32LE"; + } else { + value = "PA_SAMPLE_INVALID"; + } + + return value; +} + +pa_sample_format_t getFormatFromString(const char* encoding) { + + pa_sample_format_t format; + + if (strcmp(encoding, "PA_SAMPLE_U8") == 0) { + format = PA_SAMPLE_U8; + } else if (strcmp(encoding, "PA_SAMPLE_ALAW") == 0) { + format = PA_SAMPLE_ALAW; + } else if (strcmp(encoding, "PA_SAMPLE_ULAW;") == 0) { + format = PA_SAMPLE_ULAW; + } else if (strcmp(encoding, "PA_SAMPLE_S16BE") == 0) { + format = PA_SAMPLE_S16BE; + } else if (strcmp(encoding, "PA_SAMPLE_S16LE") == 0) { + format = PA_SAMPLE_S16LE; + } else if (strcmp(encoding, "PA_SAMPLE_S32BE") == 0) { + format = PA_SAMPLE_S32BE; + } else if (strcmp(encoding, "PA_SAMPLE_S32LE") == 0) { + format = PA_SAMPLE_S32LE; + } else { + format = PA_SAMPLE_INVALID; + } + + return format; +} static void stream_state_callback(pa_stream* stream, void *userdata) { printf("stream_state_callback called\n"); @@ -168,11 +218,14 @@ static void stream_suspended_callback(pa /* * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_new - * Signature: (Ljava/lang/String;)V + * Signature: (JLjava/lang/String;Ljava/lang/String;IIIIIII)V */ JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new -(JNIEnv* env, jobject obj, jlong contextPointer, jstring nameString, jstring encodingString, jint sampleRate, jint channels) { +(JNIEnv* env, jobject obj, jlong contextPointer, jstring nameString, + jstring encodingString, jint sampleRate, jint channels) { + printf("creating a new PulseAudio stream\n"); + java_context* j_context = malloc(sizeof(java_context)); assert(j_context); j_context->env = env; @@ -180,6 +233,7 @@ JNIEXPORT void JNICALL Java_org_classpat pa_context* context = convertJavaLongToPointer(contextPointer); assert(context); + const char* name = NULL; if (nameString) { name = (*env)->GetStringUTFChars(env,nameString, NULL); @@ -197,30 +251,7 @@ JNIEXPORT void JNICALL Java_org_classpat pa_sample_spec sample_spec; - if (strcmp(encoding, "PA_SAMPLE_U8") == 0) { - sample_spec.format = PA_SAMPLE_U8; - } else if (strcmp(encoding, "PA_SAMPLE_ALAW") == 0) { - sample_spec.format = PA_SAMPLE_ALAW; - } else if (strcmp(encoding, "PA_SAMPLE_ULAW;") == 0) { - sample_spec.format = PA_SAMPLE_ULAW; - } else if (strcmp(encoding, "PA_SAMPLE_S16BE") == 0) { - sample_spec.format = PA_SAMPLE_S16BE; - } else if (strcmp(encoding, "PA_SAMPLE_S16LE") == 0) { - sample_spec.format = PA_SAMPLE_S16LE; - } else if (strcmp(encoding, "PA_SAMPLE_S32BE") == 0) { - sample_spec.format = PA_SAMPLE_S32BE; - } else if (strcmp(encoding, "PA_SAMPLE_S32LE") == 0) { - sample_spec.format = PA_SAMPLE_S32LE; - } else { - printf("error in open: encoding is : %s\n", encoding); - throwByName(env, "java/lang/IllegalArgumentException", "Invalid format"); - /* clean up */ - (*env)->ReleaseStringUTFChars(env, encodingString, encoding); - free(j_context); - (*env)->DeleteGlobalRef(env, obj); - return; - } - + sample_spec.format = getFormatFromString(encoding); sample_spec.rate = sampleRate; sample_spec.channels = channels; @@ -342,8 +373,20 @@ JNIEXPORT jint JNICALL Java_org_classpat * Signature: (Ljava/lang/String;JIJJ)I */ JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1connect_1playback -(JNIEnv* env, jobject obj, jstring device, jlong pointer, jint anotherPointer, jlong yetAnotherPointer, jlong TooManyPointers) { - pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); +(JNIEnv* env, jobject obj, jstring device, jint bufferMaxLength, + jint bufferTargetLength, jint bufferPreBuffering, + jint bufferMinimumRequest, jint bufferFragmentSize, jint flags, + jlong volumePointer, jlong sync_streamPointer) { + pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, "streamPointer"); + + pa_buffer_attr buffer_attributes; + + buffer_attributes.maxlength = bufferMaxLength; + buffer_attributes.tlength = bufferTargetLength; + buffer_attributes.prebuf = bufferPreBuffering; + buffer_attributes.minreq = bufferMinimumRequest; + buffer_attributes.fragsize = bufferFragmentSize; + const char* dev = NULL; if (device != NULL) { dev = (*env)->GetStringUTFChars(env, device, NULL); @@ -600,6 +643,92 @@ JNIEXPORT jlong JNICALL Java_org_classpa /* * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_get_sample_spec + * Signature: ()Lorg/classpath/icedtea/pulseaudio/StreamSampleSpecification; + */ +JNIEXPORT jobject JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1sample_1spec +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + const pa_sample_spec* sample_spec = pa_stream_get_sample_spec(stream); + + char* name = "Lorg/classpath/icedtea/pulseaudio/StreamSampleSpecification;"; + jclass cls = (*env)->FindClass(env, name); + jmethodID constructor_mid = (*env)->GetMethodID(env, cls, "", "V"); + + const char* formatString = getStringFromFormat(sample_spec->format); + int rate = sample_spec->rate; + int channels = sample_spec->channels; + + jstring format = (*env)->NewStringUTF(env, formatString); + + jobject return_object = (*env)->NewObject(env, cls, constructor_mid, format, rate, channels); + + return return_object; +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_get_buffer_attr + * Signature: ()Lorg/classpath/icedtea/pulseaudio/StreamBufferAttributes; + */ +JNIEXPORT jobject JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1buffer_1attr +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + assert(stream); + const pa_buffer_attr* buffer = pa_stream_get_buffer_attr(stream); + + const char* class_name = "Lorg/classpath/icedtea/pulseaudio/StreamBufferAttributes;"; + jclass cls = (*env)->FindClass(env, class_name); + jmethodID constructor_mid = (*env)->GetMethodID(env, cls, "", "V"); + + jint maxLength = buffer->maxlength; + jint targetLength = buffer->tlength; + jint preBuffering = buffer->prebuf; + jint minimumRequest = buffer->minreq; + jint fragmentSize = buffer->fragsize; + + jobject return_object = (*env)->NewObject(env, cls, constructor_mid, maxLength, targetLength, + preBuffering, minimumRequest, fragmentSize); + + return return_object; +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_set_buffer_attr + * Signature: (Lorg/classpath/icedtea/pulseaudio/Stream/BufferAttributes;)J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1set_1buffer_1attr +(JNIEnv* env, jobject obj, jobject bufferAttributeObject) { + + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + assert(stream); + + jclass cls = (*env)->GetObjectClass(env, bufferAttributeObject); + + pa_buffer_attr* buffer = malloc(sizeof(pa_buffer_attr)); + + jmethodID getMaxLengthID = (*env)->GetMethodID(env,cls,"getMaxLength","()I"); + buffer->maxlength = (*env)->CallIntMethod(env, bufferAttributeObject, getMaxLengthID); + + jmethodID getTargetLengthID = (*env)->GetMethodID(env,cls,"getTargetLength","()I"); + buffer->tlength = (*env)->CallIntMethod(env, bufferAttributeObject, getTargetLengthID); + + jmethodID getPreBufferingID = (*env)->GetMethodID(env,cls,"getPreBuffering","()I"); + buffer->prebuf = (*env)->CallIntMethod(env, bufferAttributeObject, getPreBufferingID); + + jmethodID getMinimumRequestID = (*env)->GetMethodID(env,cls,"getMinimumRequest ","()I"); + buffer->minreq = (*env)->CallIntMethod(env, bufferAttributeObject, getMinimumRequestID ); + + jmethodID getFragmentSizeID = (*env)->GetMethodID(env,cls,"getFragmentSize","()I"); + buffer->fragsize = (*env)->CallIntMethod(env, bufferAttributeObject, getFragmentSizeID ); + + pa_operation* operation = pa_stream_set_buffer_attr(stream, buffer, NULL, NULL); + assert(operation); + return convertPointerToJavaLong(operation); +} +/* + * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_update_sample_rate * Signature: (I)J */ diff -r 52b513a7e5e9 -r 0ab3515d5074 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 19 11:35:27 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Tue Aug 19 17:04:11 2008 -0400 @@ -225,6 +225,47 @@ public class PulseSourceDataLineTest { } @Test + public void testVolumeChanging() throws LineUnavailableException, + IOException, UnsupportedAudioFileException { + + Mixer selectedMixer = mixer; + + selectedMixer.open(); + SourceDataLine line = (SourceDataLine) selectedMixer + .getLine(new Line.Info(SourceDataLine.class)); + + File soundFile = new File(new java.io.File(".").getCanonicalPath() + + "/testsounds/logout.wav"); + AudioInputStream audioInputStream = AudioSystem + .getAudioInputStream(soundFile); + AudioFormat audioFormat = audioInputStream.getFormat(); + + line.open(audioFormat); + line.start(); + PulseAudioStreamVolumeControl volume = (PulseAudioStreamVolumeControl) line + .getControl(FloatControl.Type.VOLUME); + PulseAudioStreamMuteControl mute = (PulseAudioStreamMuteControl) line + .getControl(BooleanControl.Type.MUTE); + + volume.setValue(PulseAudioStreamVolumeControl.MIN_VOLUME); + + byte[] abData = new byte[1000]; + int bytesRead = 0; + + while (bytesRead >= 0) { + bytesRead = audioInputStream.read(abData, 0, abData.length); + if (bytesRead > 0) { + line.write(abData, 0, bytesRead); + volume.setValue(volume.getValue() + 100); + } + } + + line.flush(); + selectedMixer.close(); + + } + + @Test public void testFindControl() throws LineUnavailableException { SourceDataLine sourceLine = (SourceDataLine) mixer .getLine(new Line.Info(SourceDataLine.class)); From omajid at redhat.com Wed Aug 27 09:05:25 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:25 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-18 Omair Majid changeset 23ff317f0c99 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=23ff317f0c99 description: 2008-08-18 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (static): Removed loading of native library. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (static): Removed obsolete loading of native library. (read): Fixed code format to eclipse's default. (available): Find the readable size through the stream class. * src/java/org/classpath/icedtea/pulseaudio/Stream.java (native_pa_stream_get_latency): New function. (native_pa_stream_update_sample_rate): Likewise. (getLatency): Call native_pa_stream_get_latency to obtain the correct value. (updateSampleRate): New function. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (stream_read_callback): Uncommented function; removed verbose output. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new): Enabled calls to stream_read_callback. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1latency): New function. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1update_1sample_1rate): Likewise. diffstat: 4 files changed, 88 insertions(+), 88 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 12 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 52 ++------ src/java/org/classpath/icedtea/pulseaudio/Stream.java | 63 +++++----- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 49 ++++++- diffs (360 lines): diff -r dc7a6d1c130e -r 23ff317f0c99 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Aug 15 17:11:01 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Aug 18 15:36:12 2008 -0400 @@ -89,18 +89,6 @@ public class PulseAudioClip implements C }; - static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - System.out.println(library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } - } - public PulseAudioClip() { lineListeners = new LinkedList(); } diff -r dc7a6d1c130e -r 23ff317f0c99 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Aug 15 17:11:01 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 18 15:36:12 2008 -0400 @@ -33,47 +33,30 @@ this exception to your version of the li this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.classpath.icedtea.pulseaudio; - import java.io.IOException; import java.util.ArrayList; import javax.sound.sampled.*; import javax.sound.sampled.Control.Type; +public class PulseAudioTargetDataLine extends PulseAudioDataLine implements + TargetDataLine { -public class PulseAudioTargetDataLine extends PulseAudioDataLine implements TargetDataLine { - - - protected boolean isOpen = false; protected boolean isPaused = false; - + @SuppressWarnings("unused") private long streamPointer; - static { - try { - String library = new java.io.File(".").getCanonicalPath() + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - System.out.println(library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } - } - - - private native int native_get_readable_size(); - - - public PulseAudioTargetDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { + public PulseAudioTargetDataLine(EventLoop eventLoop, AudioFormat[] formats, + AudioFormat defaultFormat) { supportedFormats = formats; this.eventLoop = eventLoop; this.lineListeners = new ArrayList(); - this.defaultFormat = defaultFormat; + this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; } @@ -82,16 +65,15 @@ public class PulseAudioTargetDataLine ex stream.connectForRecording(null); } - @Override public int read(byte[] data, int offset, int length) { int frameSize = currentFormat.getFrameSize(); - + if (length % frameSize != 0) { throw new IllegalArgumentException( "amount of data to write does not represent an integral number of frames"); } - + if (length < 0) { throw new IllegalArgumentException("length is negative"); } @@ -112,23 +94,20 @@ public class PulseAudioTargetDataLine ex sizeRead += bytesRead; position += bytesRead; remainingLength -= bytesRead; - } } // all the data should have been played by now assert (sizeRead == length); - //currentFramePosition += (sizeWritten/getFormat().getFrameSize()); + // currentFramePosition += (sizeWritten/getFormat().getFrameSize()); /* * FIXME when the stream is flushed() etc, instead of returning length * this should unblock and return the the size of data written so far */ return sizeRead; - + } - - @Override public void drain() { @@ -144,10 +123,9 @@ public class PulseAudioTargetDataLine ex public int available() { synchronized (eventLoop.threadLock) { - return native_get_readable_size(); + return stream.getReableSize(); } } - public int getBufferSize() { // TODO Auto-generated method stub @@ -205,11 +183,7 @@ public class PulseAudioTargetDataLine ex public boolean isControlSupported(Type control) { // TODO Auto-generated method stub return false; - + } - - - - } \ No newline at end of file diff -r dc7a6d1c130e -r 23ff317f0c99 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Fri Aug 15 17:11:01 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Aug 18 15:36:12 2008 -0400 @@ -96,8 +96,9 @@ public class Stream { private native int native_pa_stream_write(byte[] data, int offset, int length); - - private native int native_pa_stream_read(byte[] array, int length, int position); + + private native int native_pa_stream_read(byte[] array, int length, + int position); private native byte[] native_pa_stream_peek(); @@ -110,9 +111,9 @@ public class Stream { private native long native_pa_stream_drain(); /* - * Drain a playback stream. pa_operation pa_stream_update_timing_info - * (pa_stream *p, pa_stream_success_cb_t cb, void *userdata) Request a - * timing info structure update for a stream. + * pa_operation pa_stream_update_timing_info (pa_stream *p, + * pa_stream_success_cb_t cb, void *userdata) Request a timing info + * structure update for a stream. */ private native long native_pa_stream_cork(int b); @@ -135,10 +136,9 @@ public class Stream { * native_pa_stream_get_time (pa_usec_t r_usec); */ - /* - * Return the total stream latency private native int - * native_pa_stream_get_latency ( pa_usec_t *r_usec, int *negative); - */ + /* Return the total stream latency */ + private native long native_pa_stream_get_latency(); + /* * const pa_timing_info * pa_stream_get_timing_info (pa_stream *s) Return @@ -150,16 +150,19 @@ public class Stream { * per-stream server-side buffer metrics of the stream. pa_operation * * pa_stream_set_buffer_attr (pa_stream *s, const pa_buffer_attr *attr, * pa_stream_success_cb_t cb, void *userdata) Change the buffer metrics of - * the stream during playback. pa_operation * pa_stream_update_sample_rate - * (pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata) - * Change the stream sampling rate during playback. pa_operation * - * pa_stream_proplist_update (pa_stream *s, pa_update_mode_t mode, - * pa_proplist *p, pa_stream_success_cb_t cb, void *userdata) Update the - * property list of the sink input/source output of this stream, adding new - * entries. pa_operation * pa_stream_proplist_remove (pa_stream *s, const - * char *const keys[], pa_stream_success_cb_t cb, void *userdata) Update the - * property list of the sink input/source output of this stream, remove - * entries. int pa_stream_set_monitor_stream (pa_stream *s, uint32_t + * the stream during playback. + */ + + private native long native_pa_stream_update_sample_rate(int rate); + + /* + * pa_operation pa_stream_proplist_update (pa_stream *s, pa_update_mode_t + * mode, pa_proplist *p, pa_stream_success_cb_t cb, void *userdata) Update + * the property list of the sink input/source output of this stream, adding + * new entries. pa_operation * pa_stream_proplist_remove (pa_stream *s, + * const char *const keys[], pa_stream_success_cb_t cb, void *userdata) + * Update the property list of the sink input/source output of this stream, + * remove entries. int pa_stream_set_monitor_stream (pa_stream *s, uint32_t * sink_input_idx) For record streams connected to a monitor source: monitor * only a very specific sink input of the sink. uint32_t * pa_stream_get_monitor_stream (pa_stream *s) Return what has been set with @@ -364,7 +367,7 @@ public class Stream { public int write(byte[] data, int offset, int length) { return native_pa_stream_write(data, offset, length); } - + public int read(byte[] array, int length, int position) { return native_pa_stream_read(array, length, position); } @@ -575,12 +578,11 @@ public class Stream { return -1; } - // TODO: huh? - /** - * @returns the total stream latency - */ - public int getLatency() { - return -1; + /** + * @returns the total stream latency in microseconds + */ + public long getLatency() { + return native_pa_stream_get_latency(); } /* @@ -615,10 +617,11 @@ public class Stream { * Change the stream sampling rate during playback. * */ - /* - * Operation updateSampleRate(int rate) { Operation updateOp = new - * Operation(native_pa_stream_) } - */ + + Operation updateSampleRate(int rate) { + return new Operation(native_pa_stream_update_sample_rate(rate)); + + } public long getStreamPointer() { return streamPointer; diff -r dc7a6d1c130e -r 23ff317f0c99 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Fri Aug 15 17:11:01 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Aug 18 15:36:12 2008 -0400 @@ -45,9 +45,9 @@ static void stream_write_callback(pa_str } } -/*static void stream_read_callback(pa_stream *stream, size_t length, +static void stream_read_callback(pa_stream *stream, size_t length, void *userdata) { - printf("stream_read_callback called\n"); + // printf("stream_read_callback called\n"); java_context* context = userdata; assert(stream); @@ -61,7 +61,7 @@ static void stream_write_callback(pa_str callJavaVoidMethod(pulse_thread_env, context->obj, "readCallback"); } -}*/ +} static void stream_overflow_callback(pa_stream *stream, void *userdata) { printf("stream_overflow_callback called\n"); @@ -172,7 +172,7 @@ static void stream_suspended_callback(pa */ JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new (JNIEnv* env, jobject obj, jlong contextPointer, jstring nameString, jstring encodingString, jint sampleRate, jint channels) { - + printf("creating a new PulseAudio stream\n"); java_context* j_context = malloc(sizeof(java_context)); assert(j_context); j_context->env = env; @@ -250,7 +250,7 @@ JNIEXPORT void JNICALL Java_org_classpat pa_stream_set_state_callback (stream, stream_state_callback, j_context); pa_stream_set_write_callback (stream, stream_write_callback, j_context); - //pa_stream_set_read_callback (stream, stream_read_callback, j_context); + pa_stream_set_read_callback (stream, stream_read_callback, j_context); pa_stream_set_overflow_callback (stream, stream_overflow_callback, j_context); pa_stream_set_underflow_callback (stream, stream_underflow_callback, j_context); // pa_stream_set_started_callback (stream, stream_started_callback, j_context); @@ -418,10 +418,10 @@ JNIEXPORT jint JNICALL Java_org_classpat } JNIEXPORT int JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1read - (JNIEnv *env, jobject obj, jbyteArray array, jint length, jint offset) { +(JNIEnv *env, jobject obj, jbyteArray array, jint length, jint offset) { pa_stream *stream = getJavaPointer(env, obj, "streamPointer"); const void *read_data = NULL; - size_t read_length = 0; + size_t read_length = 0; pa_stream_peek(stream, &read_data, &read_length); if (length < read_length) { read_length = length; @@ -563,3 +563,38 @@ JNIEXPORT jlong JNICALL Java_org_classpa return convertPointerToJavaLong(operation); } +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_get_latency + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1latency +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + assert(stream); + pa_usec_t returnValue = 0; + int negative = 0; + int result = pa_stream_get_latency ( stream, &returnValue, &negative); + assert(result == 0); + assert(negative == 0); + return returnValue; +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_update_sample_rate + * Signature: (I)J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1update_1sample_1rate +(JNIEnv* env, jobject obj, jint newRate) { + + uint32_t rate = (uint32_t) newRate; + + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + assert(stream); + pa_operation* operation = pa_stream_update_sample_rate(stream,rate, NULL, NULL); + assert(operation); + return convertPointerToJavaLong(operation); + +} + From omajid at redhat.com Wed Aug 27 09:05:25 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:25 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-19 Omair Majid changeset 52b513a7e5e9 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=52b513a7e5e9 description: 2008-08-19 Omair Majid * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java (testSourceLinesExist): Added more asserts. (testTargetLinesExist): New function. (testGetTargetPortInfo): Likewise. (testGetSourcePortInfo): Likewise. (testHeadphonePortExists): Likewise. (testSpeakerPortExists): Likewise. (testLineInPortExists): Likewise. (testCdPortExists): Likewise. (testLineOutPortExists): Likewise. (testMicrophonePortExists): Likewise. (testSourceLinesOpenAndClose): Fixed test by using a known working format. (testTargetLinesOpenAndClose): New function. Similar to testSourceLinesOpenAndClose. diffstat: 1 file changed, 115 insertions(+), 10 deletions(-) unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 125 +++++++++- diffs (181 lines): diff -r 6dd17faac024 -r 52b513a7e5e9 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Tue Aug 19 10:04:12 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Tue Aug 19 11:35:27 2008 -0400 @@ -41,13 +41,17 @@ import static org.junit.Assert.assertNot import java.net.UnknownHostException; +import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; +import javax.sound.sampled.Port; import javax.sound.sampled.SourceDataLine; +import javax.sound.sampled.TargetDataLine; +import javax.sound.sampled.Line.Info; import junit.framework.JUnit4TestAdapter; @@ -144,6 +148,8 @@ public class PulseAudioMixerTest { public void testSourceLinesExist() throws LineUnavailableException { selectedMixer.open(); Line.Info allLineInfo[] = selectedMixer.getSourceLineInfo(); + Assert.assertNotNull(allLineInfo); + Assert.assertTrue(allLineInfo.length > 0); int j = 0; for (Line.Info lineInfo : allLineInfo) { System.out.println("Source Line " + j++ + ": " @@ -157,6 +163,90 @@ public class PulseAudioMixerTest { } @Test + public void testTargetLinesExist() throws LineUnavailableException { + selectedMixer.open(); + Line.Info allLineInfo[] = selectedMixer.getTargetLineInfo(); + Assert.assertNotNull(allLineInfo); + Assert.assertTrue(allLineInfo.length > 0); + int j = 0; + for (Line.Info lineInfo : allLineInfo) { + System.out.println("Target Line " + j++ + ": " + + lineInfo.getLineClass()); + TargetDataLine targetDataLine = (TargetDataLine) selectedMixer + .getLine(lineInfo); + assertNotNull(targetDataLine); + + } + + } + + @Test + public void testGetTargetPortInfo() throws LineUnavailableException { + selectedMixer.open(); + Line.Info[] lineInfos = selectedMixer.getTargetLineInfo(); + int i = 0; + for (Line.Info info : lineInfos) { + if (info instanceof Port.Info) { + Port.Info portInfo = (Port.Info) info; + System.out.println("Port " + ++i + ": " + portInfo.getName() + + " - " + portInfo.getLineClass()); + } + } + + } + + @Test + public void testGetSourcePortInfo() throws LineUnavailableException { + selectedMixer.open(); + Line.Info[] lineInfos = selectedMixer.getSourceLineInfo(); + int i = 0; + for (Line.Info info : lineInfos) { + if (info instanceof Port.Info) { + Port.Info portInfo = (Port.Info) info; + System.out.println("Port " + ++i + ": " + portInfo.getName() + + " - " + portInfo.getLineClass()); + } + } + + } + + @Test + public void testHeadphonePortExists() throws LineUnavailableException { + selectedMixer.open(); + selectedMixer.getLine(Port.Info.HEADPHONE); + } + + @Test + public void testSpeakerPortExists() throws LineUnavailableException { + selectedMixer.open(); + selectedMixer.getLine(Port.Info.SPEAKER); + } + + @Test + public void testLineInPortExists() throws LineUnavailableException { + selectedMixer.open(); + selectedMixer.getLine(Port.Info.LINE_IN); + } + + @Test + public void testCdPortExists() throws LineUnavailableException { + selectedMixer.open(); + selectedMixer.getLine(Port.Info.COMPACT_DISC); + } + + @Test + public void testLineOutPortExists() throws LineUnavailableException { + selectedMixer.open(); + selectedMixer.getLine(Port.Info.LINE_OUT); + } + + @Test + public void testMicrophonePortExists() throws LineUnavailableException { + selectedMixer.open(); + selectedMixer.getLine(Port.Info.MICROPHONE); + } + + @Test public void testOpeningAgain() throws LineUnavailableException, UnsupportedOperationException { selectedMixer.open(); @@ -170,26 +260,41 @@ public class PulseAudioMixerTest { selectedMixer.close(); } - @Test @Ignore + @Test public void testSourceLinesOpenAndClose() throws LineUnavailableException { System.out.println("This test checks if source lines open and close"); selectedMixer.open(); - /* - * FIXME This test currently fails. The mixer returns information about - * the line which leaves a lot of things as NOT_SPECIFIED when using - * that to do a get line, things match, and the line returned still has - * a few parameters as NOT_SPECIFIED and doing an open() on that fails - * - */ + AudioFormat wantedFormat = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); + Line.Info allLineInfo[] = selectedMixer.getSourceLineInfo(); for (Line.Info lineInfo : allLineInfo) { SourceDataLine sourceDataLine = (SourceDataLine) selectedMixer .getLine(lineInfo); System.out.println("opening line"); - sourceDataLine.open(); + sourceDataLine.open(wantedFormat); System.out.println("closing line"); sourceDataLine.close(); + } + } + + @Test + public void testTargetLinesOpenAndClose() throws LineUnavailableException { + System.out.println("This test checks if source lines open and close"); + selectedMixer.open(); + + AudioFormat wantedFormat = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); + + Line.Info allLineInfo[] = selectedMixer.getTargetLineInfo(); + for (Line.Info lineInfo : allLineInfo) { + TargetDataLine targetDataLine = (TargetDataLine) selectedMixer + .getLine(lineInfo); + System.out.println("opening line"); + targetDataLine.open(wantedFormat); + System.out.println("closing line"); + targetDataLine.close(); } } @@ -203,7 +308,7 @@ public class PulseAudioMixerTest { assert (event.getType() == LineEvent.Type.OPEN); called++; // assert listener is called exactly once - Assert.assertEquals(1,called); + Assert.assertEquals(1, called); } }; From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-25 Omair Majid changeset 220882a984dd in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=220882a984dd description: 2008-08-25 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (getBufferSize): Return the default buffer size if not opened. (isActive): Removed method; parent class PulseAudioDataLine has this. (start): Call parent class' start. (stop): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Added isStarted and isEngagedInIo. Commented out isPaused. (open): Use the default format supplied in the constructor. (close): Set isOpen to false. (start): Commented out isPaused stuff, seems to work ok. Set isStarted to true. (stop): Commented out isPaused. Set isStarted to false. (isActive): New function. (isRunning): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (write): Added a check that the line has been open()ed. (getBufferSize): Return the default buffer size if the line hasnt been opened. (setDefaultFormat): Removed obsolete function. (isActive): Moved function to parent class (isRunning): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Removed duplicate variables isOpen and isPaused. (read): Added a check that the line has been open()ed. (isActive): Moved functino to parent class. (isRunning): Likewise. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java (testIsActiveAndIsOpen): New function. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java (testIsActiveAndIsOpen): New function. * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java (testOpenAndClose): New function. (testIsActiveAndIsOpen): Likewise. (testPlayLessThanFrameSize): Added calls to start() and stop(). (testBufferSizes): New function. (testHasADefaultFormat): Likewise. (testDefaultFormatWithGetLine): Likewise. (testDefaultBufferSize): Likewise. (messWithStreams): Likewise. diffstat: 7 files changed, 253 insertions(+), 82 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 14 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 72 +++++-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 27 -- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 17 - unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 67 +++++-- unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java | 43 +++- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 95 +++++++++- diffs (truncated from 641 to 500 lines): diff -r 2e4a2a022ffb -r 220882a984dd src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Aug 25 14:51:13 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Aug 25 17:27:52 2008 -0400 @@ -193,6 +193,9 @@ public class PulseAudioClip extends Puls @Override public int getBufferSize() { + if (!isOpen) { + return DEFAULT_BUFFER_SIZE; + } return bufferSize; } @@ -259,12 +262,6 @@ public class PulseAudioClip extends Puls synchronized (clipLock) { return framesSinceOpen / currentFormat.getFrameSize(); } - } - - @Override - public boolean isActive() { - // TODO Auto-generated method stub - return false; } @Override @@ -378,6 +375,8 @@ public class PulseAudioClip extends Puls @Override public void start() { + super.start(); + if (!clipThread.isAlive()) { synchronized (clipLock) { loopsLeft = 0; @@ -388,6 +387,7 @@ public class PulseAudioClip extends Puls } public void stop() { + if (clipThread.isAlive()) { clipThread.interrupt(); } @@ -400,6 +400,8 @@ public class PulseAudioClip extends Puls currentFrame = 0; loopsLeft = 0; } + + super.stop(); } } diff -r 2e4a2a022ffb -r 220882a984dd src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Mon Aug 25 14:51:13 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Mon Aug 25 17:27:52 2008 -0400 @@ -10,7 +10,6 @@ import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; -import javax.sound.sampled.AudioFormat.Encoding; public abstract class PulseAudioDataLine implements Line { @@ -19,14 +18,24 @@ public abstract class PulseAudioDataLine protected String streamName = "Java Stream"; + // true between open() and close(). ie represents when a line has acquire + // resources protected boolean isOpen = false; - private boolean isPaused = false; + + // true between start() and stop() + protected boolean isStarted = false; + + protected boolean isEngagedInIo = false; + + // true if a stream has been paused + // protected boolean isPaused = false; + protected AudioFormat[] supportedFormats = null; protected AudioFormat currentFormat = null; protected AudioFormat defaultFormat = null; protected int bufferSize = 0; - + protected List lineListeners = new ArrayList();; protected EventLoop eventLoop = null; @@ -103,16 +112,13 @@ public abstract class PulseAudioDataLine } public void open() throws LineUnavailableException { - // pick a random format - if (defaultFormat == null) { - defaultFormat = new AudioFormat(Encoding.PCM_UNSIGNED, 44100, 8, 2, - 2, AudioSystem.NOT_SPECIFIED, false); - } + assert (defaultFormat != null); open(defaultFormat, DEFAULT_BUFFER_SIZE); } public void close() { + // FIXME what should be done here assert (isOpen); synchronized (eventLoop.threadLock) { @@ -127,15 +133,19 @@ public abstract class PulseAudioDataLine // stream"); } + isOpen = false; + } public void start() { - if (isPaused) { - synchronized (eventLoop.threadLock) { - stream.cork(false); - } - isPaused = false; - } + // if (isPaused) { + // synchronized (eventLoop.threadLock) { + // stream.cork(false); + // } + // isPaused = false; + // } + + isStarted = true; /* * for(LineListener l :listeners) { l.update(new LineEvent(this, @@ -145,11 +155,35 @@ public abstract class PulseAudioDataLine } public void stop() { - synchronized (eventLoop.threadLock) { - stream.cork(true); - } - isPaused = true; - + // synchronized (eventLoop.threadLock) { + // stream.cork(true); + // } + // isPaused = true; + + isStarted = false; + + } + + /* + * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4791152 : + * + * a line is active in between calls to start() and stop(). In that sense, + * active means that the line is ready to take or give data. Running is + * tightly bound to data flow in the line. I.e. when you start a + * SourceDataLine but never write data to it, the line should not be + * running. This also means that a line should become not running on buffer + * underrun/overflow. + * + * + */ + + public boolean isActive() { + return isStarted; + } + + public boolean isRunning() { + // FIXME Auto-generated method stub + return false; } public void addLineListener(LineListener listener) { diff -r 2e4a2a022ffb -r 220882a984dd src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 25 14:51:13 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 25 17:27:52 2008 -0400 @@ -111,6 +111,9 @@ public class PulseAudioSourceDataLine ex @Override public int write(byte[] data, int offset, int length) { + if (!isStarted) { + throw new IllegalStateException("must call start() before write()"); + } int frameSize = currentFormat.getFrameSize(); if (length % frameSize != 0) { @@ -168,6 +171,9 @@ public class PulseAudioSourceDataLine ex }; public int getBufferSize() { + if (!isOpen) { + return DEFAULT_BUFFER_SIZE; + } return bufferSize; } @@ -176,14 +182,6 @@ public class PulseAudioSourceDataLine ex return defaultFormat; } return currentFormat; - } - - public void setDefaultFormat(AudioFormat format) { - for (AudioFormat aFormat : supportedFormats) { - if (format.matches(aFormat)) { - defaultFormat = format; - } - } } public int getFramePosition() { @@ -204,16 +202,6 @@ public class PulseAudioSourceDataLine ex float time = currentFramePosition / frameRate; // seconds long microseconds = (long) (time * 1000); return microseconds; - } - - public boolean isActive() { - // TODO Auto-generated method stub - return false; - } - - public boolean isRunning() { - // TODO Auto-generated method stub - return false; } public Control getControl(Type control) { @@ -240,7 +228,8 @@ public class PulseAudioSourceDataLine ex } public javax.sound.sampled.Line.Info getLineInfo() { - return new DataLine.Info(this.getClass(), supportedFormats, StreamBufferAttributes.MIN_VALUE, + return new DataLine.Info(this.getClass(), supportedFormats, + StreamBufferAttributes.MIN_VALUE, StreamBufferAttributes.MAX_VALUE); } diff -r 2e4a2a022ffb -r 220882a984dd src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 25 14:51:13 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 25 17:27:52 2008 -0400 @@ -50,9 +50,6 @@ public class PulseAudioTargetDataLine ex public class PulseAudioTargetDataLine extends PulseAudioDataLine implements TargetDataLine { - protected boolean isOpen = false; - protected boolean isPaused = false; - private long currentFramePosition = 0; @SuppressWarnings("unused") @@ -78,6 +75,10 @@ public class PulseAudioTargetDataLine ex @Override public int read(byte[] data, int offset, int length) { + if (!isStarted) { + throw new IllegalStateException("must call open before read()"); + } + int frameSize = currentFormat.getFrameSize(); if (length % frameSize != 0) { @@ -169,16 +170,6 @@ public class PulseAudioTargetDataLine ex return (long) (currentFramePosition / currentFormat.getFrameRate()); } - public boolean isActive() { - // TODO Auto-generated method stub - return false; - } - - public boolean isRunning() { - // TODO Auto-generated method stub - return false; - } - public Control getControl(Type control) { throw new IllegalArgumentException( "PulseAudioTargetDataLine does not support any controls"); diff -r 2e4a2a022ffb -r 220882a984dd unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Aug 25 14:51:13 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Aug 25 17:27:52 2008 -0400 @@ -40,12 +40,15 @@ import java.io.File; import java.io.File; import java.io.IOException; +import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; +import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; +import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; import junit.framework.JUnit4TestAdapter; @@ -58,6 +61,8 @@ public class PulseAudioClipTest { public class PulseAudioClipTest { Mixer mixer; + AudioFormat aSupportedFormat = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); public static junit.framework.Test suite() { return new JUnit4TestAdapter(PulseAudioClipTest.class); @@ -84,31 +89,33 @@ public class PulseAudioClipTest { Assert.assertNotNull(clip); } - - @Test (expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testClipOpen() throws LineUnavailableException { Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); clip.open(); } - + @Test - public void testClipOpens() throws LineUnavailableException, UnsupportedAudioFileException, IOException { + public void testClipOpens() throws LineUnavailableException, + UnsupportedAudioFileException, IOException { Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); File soundFile = new File("testsounds/startup.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); clip.open(audioInputStream); } - + @Test - public void testLoopStopStartClip() throws LineUnavailableException, IOException, UnsupportedAudioFileException { + public void testLoopStopStartClip() throws LineUnavailableException, + IOException, UnsupportedAudioFileException { Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); File soundFile = new File("testsounds/startup.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); clip.open(audioInputStream); - - clip.setLoopPoints((int) (clip.getFrameLength() / 4), (int) (clip.getFrameLength() / 2)); + + clip.setLoopPoints((int) (clip.getFrameLength() / 4), (int) (clip + .getFrameLength() / 2)); clip.loop(4); try { Thread.sleep(2000); @@ -124,16 +131,44 @@ public class PulseAudioClipTest { clip.start(); clip.close(); } - + @Test - public void testLoop0Clip() throws LineUnavailableException, IOException, UnsupportedAudioFileException { + public void testIsActiveAndIsOpen() throws LineUnavailableException, + UnsupportedAudioFileException, IOException { + + Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); + File soundFile = new File("testsounds/startup.wav"); + AudioInputStream audioInputStream = AudioSystem + .getAudioInputStream(soundFile); + + Assert.assertFalse(clip.isActive()); + Assert.assertFalse(clip.isOpen()); + clip.open(audioInputStream); + Assert.assertTrue(clip.isOpen()); + Assert.assertFalse(clip.isActive()); + clip.start(); + Assert.assertTrue(clip.isOpen()); + Assert.assertTrue(clip.isActive()); + clip.stop(); + Assert.assertTrue(clip.isOpen()); + Assert.assertFalse(clip.isActive()); + clip.close(); + Assert.assertFalse(clip.isOpen()); + Assert.assertFalse(clip.isActive()); + + } + + @Test + public void testLoop0Clip() throws LineUnavailableException, IOException, + UnsupportedAudioFileException { Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); File soundFile = new File("testsounds/startup.wav"); AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); clip.open(audioInputStream); - - clip.setLoopPoints((int) (clip.getFrameLength() / 4), (int) (clip.getFrameLength() / 2)); + + clip.setLoopPoints((int) (clip.getFrameLength() / 4), (int) (clip + .getFrameLength() / 2)); clip.loop(4); try { Thread.sleep(2000); @@ -143,14 +178,14 @@ public class PulseAudioClipTest { clip.loop(0); clip.close(); } - - @Test (expected=IllegalArgumentException.class) + + @Test(expected = IllegalArgumentException.class) public void testOpenWrongUse() throws LineUnavailableException { Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class)); clip.open(); - + } - + @After public void tearDown() { diff -r 2e4a2a022ffb -r 220882a984dd unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Mon Aug 25 14:51:13 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Mon Aug 25 17:27:52 2008 -0400 @@ -1,11 +1,14 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; +import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; +import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; import junit.framework.JUnit4TestAdapter; @@ -17,12 +20,15 @@ import org.junit.Test; public class PulseAudioTargetDataLineTest { + private Mixer mixer; + private TargetDataLine targetDataLine; + + AudioFormat aSupportedFormat = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); + public static junit.framework.Test suite() { return new JUnit4TestAdapter(PulseAudioTargetDataLineTest.class); } - - private Mixer mixer; - private TargetDataLine targetDataLine; @Before public void setUp() throws LineUnavailableException { @@ -50,6 +56,29 @@ public class PulseAudioTargetDataLineTes } @Test + public void testIsActiveAndIsOpen() throws LineUnavailableException { + + SourceDataLine line = (SourceDataLine) mixer.getLine(new DataLine.Info( + SourceDataLine.class, aSupportedFormat, 1000)); + + Assert.assertFalse(line.isActive()); + Assert.assertFalse(line.isOpen()); + line.open(); + Assert.assertTrue(line.isOpen()); + Assert.assertFalse(line.isActive()); + line.start(); + Assert.assertTrue(line.isOpen()); + Assert.assertTrue(line.isActive()); + line.stop(); + Assert.assertTrue(line.isOpen()); + Assert.assertFalse(line.isActive()); + line.close(); + Assert.assertFalse(line.isOpen()); + Assert.assertFalse(line.isActive()); + + } + + @Test public void testOpenEvents() throws LineUnavailableException { targetDataLine = (TargetDataLine) mixer.getLine(new Line.Info( TargetDataLine.class)); @@ -71,7 +100,7 @@ public class PulseAudioTargetDataLineTes targetDataLine.open(); targetDataLine.removeLineListener(openListener); targetDataLine.close(); - + } @Test @@ -92,15 +121,13 @@ public class PulseAudioTargetDataLineTes }; From omajid at redhat.com Wed Aug 27 09:05:25 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:25 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-19 Omair Majid changeset 6dd17faac024 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6dd17faac024 description: 2008-08-19 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (read): Improved output details of exceptions. currentFramePosition is now updated as read progresses. (getBufferSize): Return DEFAULT_BUFFER_SIZE isntead of 0. (getFramePosition): Return the current frame. (getLevel): Return AudioSystem.NOT_SPECIFIED isntead of 0. (getLongFramePosition): Return the frame position. (getMicrosecondPosition): Return the microsecond position based on estimate. (getControl): Throw an exception to indicate no controls is found instead. (getControls): Return an array of size 0. (getLineInfo): Return a DataLine.Info object instead of just Line.Info. diffstat: 1 file changed, 26 insertions(+), 22 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 48 +++++----- diffs (131 lines): diff -r 9a23cb09d073 -r 6dd17faac024 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 18 15:53:50 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Tue Aug 19 10:04:12 2008 -0400 @@ -37,9 +37,14 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; import java.util.ArrayList; -import javax.sound.sampled.*; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.Control; +import javax.sound.sampled.DataLine; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.TargetDataLine; import javax.sound.sampled.Control.Type; public class PulseAudioTargetDataLine extends PulseAudioDataLine implements @@ -47,6 +52,8 @@ public class PulseAudioTargetDataLine ex protected boolean isOpen = false; protected boolean isPaused = false; + + private long currentFramePosition = 0; @SuppressWarnings("unused") private long streamPointer; @@ -71,7 +78,7 @@ public class PulseAudioTargetDataLine ex if (length % frameSize != 0) { throw new IllegalArgumentException( - "amount of data to write does not represent an integral number of frames"); + "amount of data to read does not represent an integral number of frames"); } if (length < 0) { @@ -79,7 +86,8 @@ public class PulseAudioTargetDataLine ex } if (length + offset > data.length) { - throw new ArrayIndexOutOfBoundsException(length + offset); + throw new ArrayIndexOutOfBoundsException("index: " + + (length + offset) + " array size: " + data.length); } int position = offset; @@ -90,10 +98,13 @@ public class PulseAudioTargetDataLine ex synchronized (eventLoop.threadLock) { int bytesRead = stream.read(data, remainingLength, position); - + if (bytesRead < 0) { + return sizeRead; + } sizeRead += bytesRead; position += bytesRead; remainingLength -= bytesRead; + currentFramePosition = bytesRead / currentFormat.getFrameSize(); } } @@ -128,8 +139,7 @@ public class PulseAudioTargetDataLine ex } public int getBufferSize() { - // TODO Auto-generated method stub - return 0; + return DEFAULT_BUFFER_SIZE; } public AudioFormat getFormat() { @@ -137,23 +147,19 @@ public class PulseAudioTargetDataLine ex } public int getFramePosition() { - // TODO Auto-generated method stub - return 0; + return (int) currentFramePosition; } public float getLevel() { - // TODO Auto-generated method stub - return 0; + return AudioSystem.NOT_SPECIFIED; } public long getLongFramePosition() { - // TODO Auto-generated method stub - return 0; + return currentFramePosition; } public long getMicrosecondPosition() { - // TODO Auto-generated method stub - return 0; + return (long) (currentFramePosition / currentFormat.getFrameRate()); } public boolean isActive() { @@ -167,23 +173,21 @@ public class PulseAudioTargetDataLine ex } public Control getControl(Type control) { - // TODO Auto-generated method stub - return null; + throw new IllegalArgumentException( + "PulseAudioTargetDataLine does not support any controls"); } public Control[] getControls() { - // TODO Auto-generated method stub - return null; + return new Control[] {}; } public javax.sound.sampled.Line.Info getLineInfo() { - return new Line.Info(SourceDataLine.class); + return new DataLine.Info(TargetDataLine.class, supportedFormats, 0, + DEFAULT_BUFFER_SIZE); } public boolean isControlSupported(Type control) { - // TODO Auto-generated method stub return false; - } } \ No newline at end of file From omajid at redhat.com Wed Aug 27 09:05:25 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:25 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-18 Omair Majid changeset 9a23cb09d073 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=9a23cb09d073 description: 2008-08-18 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Stream.java (native_pa_stream_get_time): New function. (getTime): Return the time provided by PulseAudio. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1time): New function. diffstat: 2 files changed, 28 insertions(+), 11 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Stream.java | 21 ++++++++--------- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 18 ++++++++++++++ diffs (71 lines): diff -r 23ff317f0c99 -r 9a23cb09d073 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Aug 18 15:36:12 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Aug 18 15:53:50 2008 -0400 @@ -131,14 +131,11 @@ public class Stream { /* returns an operationPointer */ private native long native_pa_stream_set_name(String name); - /* - * Return the current playback/recording time private native int - * native_pa_stream_get_time (pa_usec_t r_usec); - */ + /* Return the current playback/recording time */ + private native long native_pa_stream_get_time(); /* Return the total stream latency */ - private native long native_pa_stream_get_latency(); - + private native long native_pa_stream_get_latency(); /* * const pa_timing_info * pa_stream_get_timing_info (pa_stream *s) Return @@ -574,14 +571,16 @@ public class Stream { return setNameOperation; } - public long getTimeInMicroseconds() { - return -1; - } - + public long getTime() { + return native_pa_stream_get_time(); + } + + + /** * @returns the total stream latency in microseconds */ - public long getLatency() { + public long getLatency() { return native_pa_stream_get_latency(); } diff -r 23ff317f0c99 -r 9a23cb09d073 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Aug 18 15:36:12 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Aug 18 15:53:50 2008 -0400 @@ -565,6 +565,24 @@ JNIEXPORT jlong JNICALL Java_org_classpa /* * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_get_time + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1time +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, "streamPointer"); + assert(stream); + + pa_usec_t time = 0; + int result = pa_stream_get_time (stream,&time); + assert(result == 0); + + return time; + +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_get_latency * Signature: ()J */ From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-25 Omair Majid changeset 9a4c1d255bc6 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=9a4c1d255bc6 description: 2008-08-25 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Operation.java (Operation): Added a check for value pointer * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Formatting fixes using eclipse's format (connectLine): Parameter bufferSize is now used to chose buffer attributes. (close): Added a synchronized block to protect shared variables. (flush): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PusleAudioDataLine.java (open): Synchronized stream operations. Pass buffer sizes to the connectLine function. Also added checks to ensure that the stream actually connected. (start): Syncrhonized stream operations. (connectLine): changed signature from connectLine() to connectLine(int bufferSize). * src/java/org/classpath/icedtea/pusleaudio/PulseAudioSourceDataLine.java (connectLine): Changed buffer values. Some buffer attributes now guessed from the max buffer size. Synchronized stream operations. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (connectLine): Likewise * src/java/org/classpath/icedtea/pulseaudio/Stream.java (native_pa_stream_connect_record): Added additional parameters for buffers. (addOverflowListener): Synchronized operation. (removeOverflowListener): Likewise. (addUnderflowListener): Likewise. (removeUnderflowListener): Likewise. (addPlaybackStartedListener): Likewise. (removePlaybackStartedListener): Likewise. (addLatencyUpdateListener): Likewise. (removeLatencyUpdateListener): Likewise. (addMovedListener): Likewise. (removeMovedListener): Likewise. (addSuspenedListener): Likewise. (removeSuspenedListener): Likewise. (connectForRecording): Added a paramter to pass in StreamBufferAttributes. * src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java Fixed SANE_DEFAULT to be a valid numer. Added extra variables to indicate max and min values. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (stream_state_callback): Commented out debug output. (stream_overflow_callback): Likewise. (stream_latency_update_callback): Likewise. (stream_moved_callback): Likewise. (stream_suspeneded_callback): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1connect_1playback): Using bufferAttributes passed in to connnect the stream. Commented out debug info. Added a check for return value. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1connect_1record): Likewise. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1get_1buffer_1attr): Fixed constructor method id. Added checks to fail if this happens again. (set_buffer_attr_callback): Checking the new buffer_attr (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1set_1buffer_1attr): Added tests to check if everything works. Added some debug info. * unittests/org/classpath/icedtea/pusleaudio/PulseSourceDataLineTest.java: (testPlay): Added some debug output for the test diffstat: 9 files changed, 297 insertions(+), 193 deletions(-) src/java/org/classpath/icedtea/pulseaudio/Operation.java | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 141 ++++------ src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 87 +++--- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 14 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 8 src/java/org/classpath/icedtea/pulseaudio/Stream.java | 70 +++- src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java | 8 src/native/org_classpath_icedtea_pulseaudio_Stream.c | 129 ++++++--- unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 32 +- diffs (truncated from 1008 to 500 lines): diff -r 23c52715cfb2 -r 9a4c1d255bc6 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Aug 20 14:27:45 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Aug 25 12:07:04 2008 -0400 @@ -77,6 +77,7 @@ public class Operation { private native int native_get_state(); public Operation(long operationPointer) { + assert(operationPointer != 0); this.operationPointer = operationPointer; this.eventLoop = EventLoop.getEventLoop(); } diff -r 23c52715cfb2 -r 9a4c1d255bc6 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 20 14:27:45 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Mon Aug 25 12:07:04 2008 -0400 @@ -71,68 +71,64 @@ public class PulseAudioClip extends Puls private static final AudioFormat DEFAULT_FORMAT = new AudioFormat( AudioFormat.Encoding.PCM_UNSIGNED, 22050, 8, 2, 2, 22050 / 2, false); - - private static final int DEFAULT_BUFFER_SIZE = 0; public static final String DEFAULT_CLIP_NAME = "Clip"; private Object clipLock = new Object(); private boolean clipThreadStarted; private int loopsLeft; - private Semaphore clipSemaphore= new Semaphore(1); + private Semaphore clipSemaphore = new Semaphore(1); private class ClipThread extends Thread { @Override public void run() { clipThreadStarted = true; - while(loopsLeft >= 0) { + while (loopsLeft >= 0) { writeFrames(currentFrame, endFrame + 1); - if(Thread.interrupted()) { + if (Thread.interrupted()) { //Thread.currentThread().interrupt(); clipThreadStarted = false; return; } - - - - try { - //if loop(0) has been called from the mainThread, - //wait until loopsLeft has been set - clipSemaphore.acquire(); - if(loopsLeft == 0){ + + try { + //if loop(0) has been called from the mainThread, + //wait until loopsLeft has been set + clipSemaphore.acquire(); + if (loopsLeft == 0) { System.out.println("Reading to the end of the file"); - writeFrames( endFrame, getFrameLength()); + writeFrames(endFrame, getFrameLength()); return; - } else { - synchronized (clipLock) { - currentFrame = startFrame; - loopsLeft--; + } else { + synchronized (clipLock) { + currentFrame = startFrame; + loopsLeft--; + } } + clipSemaphore.release(); + } catch (InterruptedException e) { + return; } - clipSemaphore.release(); - } catch (InterruptedException e) { - return; + } - - - } - } - } - - private ClipThread clipThread; - - + } + } + + private ClipThread clipThread; + private void writeFrames(int startingFrame, int lastFrame) { int remainingFrames = lastFrame - startingFrame - 1; - while(remainingFrames > 0) { + while (remainingFrames > 0) { synchronized (eventLoop.threadLock) { int availableSize = stream.getWritableSize(); - int framesToWrite = Math.min(remainingFrames, availableSize / getFormat().getFrameSize()); - stream.write(data, currentFrame * getFormat().getFrameSize(), framesToWrite * getFormat().getFrameSize()); + int framesToWrite = Math.min(remainingFrames, availableSize + / getFormat().getFrameSize()); + stream.write(data, currentFrame * getFormat().getFrameSize(), + framesToWrite * getFormat().getFrameSize()); remainingFrames -= framesToWrite; currentFrame += framesToWrite; - if(Thread.interrupted()) { + if (Thread.interrupted()) { Thread.currentThread().interrupt(); break; } @@ -141,7 +137,6 @@ public class PulseAudioClip extends Puls } } - static { try { String library = new java.io.File(".").getCanonicalPath() @@ -154,27 +149,23 @@ public class PulseAudioClip extends Puls } } - public PulseAudioClip(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { + public PulseAudioClip(EventLoop eventLoop, AudioFormat[] formats, + AudioFormat defaultFormat) { supportedFormats = formats; this.eventLoop = eventLoop; this.lineListeners = new ArrayList(); - this.defaultFormat = defaultFormat; + this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; clipThread = new ClipThread(); } - - protected void connectLine() { + + protected void connectLine(int bufferSize) { StreamBufferAttributes bufferAttributes = new StreamBufferAttributes( - StreamBufferAttributes.SANE_DEFAULT, - StreamBufferAttributes.SANE_DEFAULT, - StreamBufferAttributes.SANE_DEFAULT, - StreamBufferAttributes.SANE_DEFAULT, - StreamBufferAttributes.SANE_DEFAULT); - - stream.connectForPlayback(null, bufferAttributes); - } - + bufferSize, bufferSize / 2, bufferSize / 2, bufferSize / 2, 0); + + stream.connectForPlayback(Stream.DEFAULT_DEVICE, bufferAttributes); + } @Override public int available() { @@ -188,10 +179,12 @@ public class PulseAudioClip extends Puls } catch (InterruptedException e) { e.printStackTrace(); } - - stream.drain(); - stream.disconnect(); - isOpen = false; + + synchronized (eventLoop.threadLock) { + drain(); + stream.disconnect(); + isOpen = false; + } } @Override @@ -209,7 +202,9 @@ public class PulseAudioClip extends Puls @Override public void flush() { - stream.flush(); + synchronized (eventLoop.threadLock) { + stream.flush(); + } } @Override @@ -260,7 +255,7 @@ public class PulseAudioClip extends Puls @Override public long getLongFramePosition() { - synchronized(clipLock) { + synchronized (clipLock) { return framesSinceOpen; } } @@ -270,14 +265,14 @@ public class PulseAudioClip extends Puls if (!isOpen) { return AudioSystem.NOT_SPECIFIED; } - synchronized(clipLock) { + synchronized (clipLock) { return frameCount / currentFormat.getFrameSize(); } } @Override public long getMicrosecondPosition() { - synchronized(clipLock) { + synchronized (clipLock) { return framesSinceOpen / currentFormat.getFrameSize(); } } @@ -308,22 +303,22 @@ public class PulseAudioClip extends Puls @Override public void loop(int count) { System.out.println("Loop " + count + " called"); - if(clipThreadStarted && count != 0) { + if (clipThreadStarted && count != 0) { //Do nothing; behavior not specified by the Java API return; } - synchronized(clipLock) { - if(currentFrame > endFrame) { + synchronized (clipLock) { + if (currentFrame > endFrame) { loopsLeft = 0; } else { - loopsLeft = count; + loopsLeft = count; } } if (!clipThread.isAlive()) { clipThread = new ClipThread(); clipThread.start(); - } - + } + } @Override @@ -338,7 +333,7 @@ public class PulseAudioClip extends Puls super.open(format); this.data = new byte[bufferSize]; System.arraycopy(data, offset, this.data, 0, bufferSize); - frameCount = bufferSize / format.getFrameSize(); + frameCount = bufferSize / format.getFrameSize(); isOpen = true; } @@ -350,7 +345,6 @@ public class PulseAudioClip extends Puls stream.read(buffer, 0, buffer.length); open(stream.getFormat(), buffer, 0, buffer.length); - } @@ -365,8 +359,8 @@ public class PulseAudioClip extends Puls if (frames > frameCount) { throw new IllegalArgumentException("incorreft frame value"); } - - synchronized(clipLock) { + + synchronized (clipLock) { currentFrame = frames; } @@ -383,7 +377,7 @@ public class PulseAudioClip extends Puls "ending point must be greater than or equal to the starting point"); } - synchronized(clipLock) { + synchronized (clipLock) { startFrame = start; endFrame = end; } @@ -393,7 +387,7 @@ public class PulseAudioClip extends Puls @Override public void setMicrosecondPosition(long microseconds) { float frameIndex = microseconds * currentFormat.getFrameRate(); - synchronized(clipLock) { + synchronized (clipLock) { currentFrame = (int) frameIndex; } @@ -401,18 +395,17 @@ public class PulseAudioClip extends Puls @Override public void start() { - if(!clipThread.isAlive()) { - synchronized(clipLock) { + if (!clipThread.isAlive()) { + synchronized (clipLock) { loopsLeft = 0; } clipThread = new ClipThread(); clipThread.start(); } } - - + public void stop() { - if(clipThread.isAlive()) { + if (clipThread.isAlive()) { clipThread.interrupt(); } try { @@ -420,7 +413,7 @@ public class PulseAudioClip extends Puls } catch (InterruptedException e) { e.printStackTrace(); } - synchronized(clipLock) { + synchronized (clipLock) { currentFrame = 0; loopsLeft = 0; } diff -r 23c52715cfb2 -r 9a4c1d255bc6 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Aug 20 14:27:45 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Mon Aug 25 12:07:04 2008 -0400 @@ -14,40 +14,38 @@ import javax.sound.sampled.AudioFormat.E public abstract class PulseAudioDataLine implements Line { - protected static final int DEFAULT_BUFFER_SIZE = 1000; + protected static final int DEFAULT_BUFFER_SIZE = StreamBufferAttributes.SANE_DEFAULT; protected static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; protected String streamName = "Java Stream"; - + protected boolean isOpen = false; private boolean isPaused = false; protected AudioFormat[] supportedFormats = null; protected AudioFormat currentFormat = null; protected AudioFormat defaultFormat = null; - - + protected List lineListeners = new ArrayList();; - + protected EventLoop eventLoop = null; protected Semaphore semaphore = new Semaphore(0); protected Stream stream; - - - + public void open(AudioFormat format, int bufferSize) - throws LineUnavailableException { + throws LineUnavailableException { if (isOpen) { throw new IllegalStateException("Line is already open"); } - // ignore suggested buffer size - for (AudioFormat myFormat : supportedFormats) { if (format.matches(myFormat)) { - stream = new Stream(eventLoop.getContextPointer(), streamName, - Stream.Format.valueOf((String) myFormat - .getProperty(PULSEAUDIO_FORMAT_KEY)), - (int) format.getSampleRate(), format.getChannels()); + synchronized (eventLoop.threadLock) { + stream = new Stream(eventLoop.getContextPointer(), + streamName, Stream.Format.valueOf((String) myFormat + .getProperty(PULSEAUDIO_FORMAT_KEY)), + (int) format.getSampleRate(), format.getChannels()); + + } currentFormat = format; isOpen = true; } @@ -61,40 +59,47 @@ public abstract class PulseAudioDataLine @Override public void update() { - if (stream.getState() == Stream.State.READY) { - fireLineEvent(new LineEvent(PulseAudioDataLine.this, - LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); - semaphore.release(); - } else if (stream.getState() == Stream.State.TERMINATED - || stream.getState() == Stream.State.FAILED) { - fireLineEvent((new LineEvent(PulseAudioDataLine.this, - LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); - semaphore.release(); + synchronized (eventLoop.threadLock) { + if (stream.getState() == Stream.State.READY) { + fireLineEvent(new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED)); + semaphore.release(); + } else if (stream.getState() == Stream.State.TERMINATED + || stream.getState() == Stream.State.FAILED) { + fireLineEvent((new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.CLOSE, AudioSystem.NOT_SPECIFIED))); + semaphore.release(); + } } } - }; stream.addStateListener(openCloseListener); synchronized (eventLoop.threadLock) { - - connectLine(); + connectLine(bufferSize); } try { semaphore.acquire(); + synchronized (eventLoop.threadLock) { + if (stream.getState() != Stream.State.READY) { + stream.disconnect(); + throw new LineUnavailableException( + "unable to obtain a line"); + } + } } catch (InterruptedException e) { - // throw new LineUnavailableException("unable to prepare - // stream"); + throw new LineUnavailableException("unable to prepare stream"); } + } - + public void open(AudioFormat format) throws LineUnavailableException { open(format, DEFAULT_BUFFER_SIZE); } - + public void open() throws LineUnavailableException { // pick a random format if (defaultFormat == null) { @@ -105,12 +110,11 @@ public abstract class PulseAudioDataLine open(defaultFormat, DEFAULT_BUFFER_SIZE); } - public void close() { assert (isOpen); synchronized (eventLoop.threadLock) { - //drain(); + // drain(); stream.disconnect(); } @@ -122,10 +126,12 @@ public abstract class PulseAudioDataLine } } - + public void start() { if (isPaused) { - stream.cork(false); + synchronized (eventLoop.threadLock) { + stream.cork(false); + } isPaused = false; } @@ -143,7 +149,7 @@ public abstract class PulseAudioDataLine isPaused = true; } - + public void addLineListener(LineListener listener) { this.lineListeners.add(listener); } @@ -151,20 +157,19 @@ public abstract class PulseAudioDataLine public void removeLineListener(LineListener listener) { this.lineListeners.remove(listener); } - + private void fireLineEvent(LineEvent e) { for (LineListener lineListener : lineListeners) { lineListener.update(e); } } - abstract void connectLine(); + abstract void connectLine(int bufferSize); + abstract void drain(); - + public boolean isOpen() { return isOpen; } From omajid at redhat.com Wed Aug 27 09:05:26 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 16:05:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-27 Omair Majid changeset 548fa22ff716 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=548fa22ff716 description: 2008-08-27 Omair Majid * src/java/org/classpath/icedtea/pusleaudio/PulseAudioDataLine.java Inherit from DataLine instead of line. (isRunning): Return isEngagedInIo to indicate what the function is doing. (connectLine): changed modifier to protected. (drain): Made method public. * src/java/org/classapth/icedtea/pulseaudio/PulseAudioMixer.java (getSourceLines): Changed the call to the toArray function to fix the ClassCastException. (getTargetLines): Likewise. (addSourceDataLine): New function. (removeSourceDataLine): Likewise. (addTargetDataLine): Likewise. (removeTargetDataLine): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (open): Tell the mixer that the line has been opened. (close): Tell the mixer that the line has been closed. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (open): New function. Tell the mixer that the line has been opened. (closed): New function. Tell the mixer that the line has been closed. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java: Remove uneeded imports. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java (testMixerKnowsAboutOpenLines): New funtion. Tests if the mixer knows about open lines. (testAllTargetLinesClosed): New funciton. Tests if all the TargetLines have been closed. * unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java (testPlay): Drain instead of flush. (testPlayLessThanFrameSize): Added a finally clause to close the line. (testOpenFormat): Close the line. Fixes a resource leak. (testFindLineWithFormat): Likewise. (testFindLineWithWrongFormat): Likewise. (testVolumeAndMute): Likewise. (testVolumeChanging): Likewise. (testFramePosition): Likewise. (testMixerKnowsAboutOpenLines): New function. Tests if the mixer knows about open SourceDataLines. (testAllSourceLinesClosed): New function. Test if all SourceDataLines have been closed. (messWithStreams): Fixed resource leaks diffstat: 7 files changed, 117 insertions(+), 24 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 13 +- src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 22 +++- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 13 ++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 18 +++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 2 unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java | 20 +++ unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 53 +++++++--- diffs (321 lines): diff -r 220882a984dd -r 548fa22ff716 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Mon Aug 25 17:27:52 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Aug 27 12:04:55 2008 -0400 @@ -6,12 +6,12 @@ import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.Line; +import javax.sound.sampled.DataLine; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; -public abstract class PulseAudioDataLine implements Line { +public abstract class PulseAudioDataLine implements DataLine { protected static final int DEFAULT_BUFFER_SIZE = StreamBufferAttributes.SANE_DEFAULT; protected static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; @@ -182,8 +182,7 @@ public abstract class PulseAudioDataLine } public boolean isRunning() { - // FIXME Auto-generated method stub - return false; + return isEngagedInIo; } public void addLineListener(LineListener listener) { @@ -200,9 +199,9 @@ public abstract class PulseAudioDataLine } } - abstract void connectLine(int bufferSize); - - abstract void drain(); + protected abstract void connectLine(int bufferSize); + + public abstract void drain(); public boolean isOpen() { return isOpen; diff -r 220882a984dd -r 548fa22ff716 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Mon Aug 25 17:27:52 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 27 12:04:55 2008 -0400 @@ -364,8 +364,7 @@ public class PulseAudioMixer implements @Override public Line[] getSourceLines() { - // return (Line[]) _sourceLines.toArray(); - return null; + return (Line[]) sourceLines.toArray(new PulseAudioSourceDataLine[0]); } @@ -392,8 +391,7 @@ public class PulseAudioMixer implements @Override public Line[] getTargetLines() { - // return (Line[]) _targetLines.toArray(); - return null; + return (Line[]) targetLines.toArray(new TargetDataLine[0]); } @Override @@ -663,4 +661,20 @@ public class PulseAudioMixer implements } + void addSourceDataLine(PulseAudioSourceDataLine line) { + sourceLines.add(line); + } + + void removeSourceDataLine(PulseAudioSourceDataLine line) { + sourceLines.remove(line); + } + + void addTargetDataLine(PulseAudioTargetDataLine line) { + targetLines.add(line); + } + + void removeTargetDataLine(PulseAudioTargetDataLine line) { + targetLines.remove(line); + } + } diff -r 220882a984dd -r 548fa22ff716 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Aug 25 17:27:52 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 27 12:04:55 2008 -0400 @@ -97,6 +97,10 @@ public class PulseAudioSourceDataLine ex controls[0] = volumeControl; muteControl = new PulseAudioStreamMuteControl(this); controls[1] = muteControl; + + PulseAudioMixer parentMixer = PulseAudioMixer.getInstance(); + parentMixer.addSourceDataLine(this); + System.out.println("PulseAudioSourceDataLine: adding to mixer"); } @@ -275,4 +279,13 @@ public class PulseAudioSourceDataLine ex return stream; } + @Override + public void close() { + PulseAudioMixer parent = PulseAudioMixer.getInstance(); + parent.removeSourceDataLine(this); + System.out.println("PulseAudioSourceDataLine: removing from mixer"); + + super.close(); + } + } diff -r 220882a984dd -r 548fa22ff716 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Aug 25 17:27:52 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Wed Aug 27 12:04:55 2008 -0400 @@ -44,6 +44,7 @@ import javax.sound.sampled.Control; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.TargetDataLine; import javax.sound.sampled.Control.Type; @@ -63,6 +64,23 @@ public class PulseAudioTargetDataLine ex this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; + } + + @Override + public void close() { + PulseAudioMixer parentMixer = PulseAudioMixer.getInstance(); + parentMixer.removeTargetDataLine(this); + + super.close(); + } + + @Override + public void open(AudioFormat format, int bufferSize) + throws LineUnavailableException { + super.open(format, bufferSize); + + PulseAudioMixer parentMixer = PulseAudioMixer.getInstance(); + parentMixer.addTargetDataLine(this); } protected void connectLine(int bufferSize) { diff -r 220882a984dd -r 548fa22ff716 unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Mon Aug 25 17:27:52 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Wed Aug 27 12:04:55 2008 -0400 @@ -44,11 +44,9 @@ import javax.sound.sampled.AudioInputStr import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; -import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; -import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; import junit.framework.JUnit4TestAdapter; diff -r 220882a984dd -r 548fa22ff716 unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Mon Aug 25 17:27:52 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Wed Aug 27 12:04:55 2008 -0400 @@ -127,6 +127,26 @@ public class PulseAudioTargetDataLineTes targetDataLine.removeLineListener(closeListener); } + + + @Test + public void testMixerKnowsAboutOpenLines() throws LineUnavailableException { + targetDataLine = (TargetDataLine) mixer.getLine(new Line.Info( + TargetDataLine.class)); + + Assert.assertEquals(0, mixer.getTargetLines().length); + targetDataLine.open(); + Assert.assertEquals(1, mixer.getTargetLines().length); + targetDataLine.close(); + Assert.assertEquals(0, mixer.getTargetLines().length); + + } + + @Test + public void testAllTargetLinesClosed() { + Assert.assertEquals(0, mixer.getTargetLines().length); + + } @After public void tearDown() { diff -r 220882a984dd -r 548fa22ff716 unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Mon Aug 25 17:27:52 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java Wed Aug 27 12:04:55 2008 -0400 @@ -147,8 +147,9 @@ public class PulseSourceDataLineTest { } System.out.println("done"); - line.flush(); - System.out.println("flushed"); + line.drain(); + System.out.println("drained"); + line.stop(); line.close(); System.out.println("closed"); @@ -172,10 +173,13 @@ public class PulseSourceDataLineTest { line.open(); line.start(); - line.write(data, 0, 1); - line.stop(); - line.close(); - + try { + line.write(data, 0, 1); + } finally { + line.drain(); + line.stop(); + line.close(); + } } @Test @@ -198,6 +202,7 @@ public class PulseSourceDataLineTest { Assert.assertNotNull(line); line.open(); Assert.assertTrue(line.getFormat().matches(audioFormat)); + line.close(); } @Test @@ -211,6 +216,7 @@ public class PulseSourceDataLineTest { SourceDataLine.class, wantedFormat)); line.open(); System.out.println(line.getFormat()); + line.close(); } @@ -223,7 +229,7 @@ public class PulseSourceDataLineTest { AudioFormat.Encoding.PCM_UNSIGNED, 44100, 10000, 1, 13, 10, true))); line.open(); - + line.close(); } @Test @@ -263,7 +269,8 @@ public class PulseSourceDataLineTest { } } - line.flush(); + line.drain(); + line.close(); selectedMixer.close(); } @@ -302,7 +309,8 @@ public class PulseSourceDataLineTest { } } - line.flush(); + line.drain(); + line.close(); selectedMixer.close(); } @@ -421,7 +429,8 @@ public class PulseSourceDataLineTest { } } - line.flush(); + line.drain(); + line.stop(); System.out.println("time position: " + line.getMicrosecondPosition()); Assert.assertEquals(6199, line.getMicrosecondPosition()); line.close(); @@ -462,9 +471,28 @@ public class PulseSourceDataLineTest { } @Test + public void testMixerKnowsAboutOpenLines() throws LineUnavailableException { + SourceDataLine sourceDataLine = (SourceDataLine) mixer + .getLine(new Line.Info(SourceDataLine.class)); + + Assert.assertEquals(0, mixer.getSourceLines().length); + sourceDataLine.open(); + Assert.assertEquals(1, mixer.getSourceLines().length); + sourceDataLine.close(); + Assert.assertEquals(0, mixer.getSourceLines().length); + + } + + @Test + public void testAllSourceLinesClosed() { + Assert.assertEquals(0, mixer.getSourceLines().length); + + } + + @Test public void messWithStreams() throws LineUnavailableException { System.out - .println("This test tries to cork(false) a stream which hasnt been corked"); + .println("This test tries to unCork a stream which hasnt been corked"); PulseAudioSourceDataLine line = (PulseAudioSourceDataLine) mixer .getLine(new DataLine.Info(SourceDataLine.class, @@ -478,6 +506,9 @@ public class PulseSourceDataLineTest { o = s.unCork(); } o.waitForCompletion(); + o.releaseReference(); + line.stop(); + line.close(); } @After From omajid at redhat.com Wed Aug 27 11:22:44 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 27 Aug 2008 18:22:44 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-27 Omair Majid changeset 1a1a426b17cc in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=1a1a426b17cc description: 2008-08-27 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/Eventloop.java (run): Made the eventloop block when not doing anything. Saves cpu cycles greatly. Since blocking works, fixed the comments. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Removed duplicate variable currentFormat. Added a List of Controls. (getControl): Return Control[] when open. (loop): Added a call to super.start() to indicate that the loop has started. Fixes the problem when doing a loop() and then stop() would fail. (start): Added a check that the Clip hasnt already been started. (stop): Added a check that the Clip has been started. * src/native/jni-common.c (getLockObject): New function. Returns the Eventloop.threadLock object. (notifyWaitingOperations): Calls getLockObject to obtain the lock. * src/native/jni-common.h (getLockObject): New function. * src/native/org_classpath_icedtea_pulseaudio_EventLoop.c (poll_function): New function. This function calls poll but releases the lock on EventLoop.threadLock so that other threads dont have to wait for the poll to timeout before they can do anything. Allows native_iterate to block, which reduces needless loops. (Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1setup): Now sets the polling function to poll_function. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java (testLongWait): Changed the duration to 10000 to get a longer window to obtain the CPU usage when the program isnt doing anything. diffstat: 6 files changed, 55 insertions(+), 13 deletions(-) src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 6 -- src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 26 ++++++++-- src/native/jni-common.c | 12 +++- src/native/jni-common.h | 1 src/native/org_classpath_icedtea_pulseaudio_EventLoop.c | 21 +++++++- unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 2 diffs (211 lines): diff -r 548fa22ff716 -r 1a1a426b17cc src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 27 12:04:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 27 14:22:14 2008 -0400 @@ -145,11 +145,9 @@ public class EventLoop implements Runnab */ while (true) { synchronized (threadLock) { - // timeout is a funky parameter (in milliseconds) + // timeout is in milliseconds // timout = 0 means dont block - // setting it to even 1 makes the program crawl - // question is, why? - native_iterate(0); + native_iterate(100); if (Thread.interrupted()) { native_shutdown(); diff -r 548fa22ff716 -r 1a1a426b17cc src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 27 12:04:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 27 14:22:14 2008 -0400 @@ -39,6 +39,7 @@ package org.classpath.icedtea.pulseaudio import java.io.IOException; import java.util.ArrayList; +import java.util.List; import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; @@ -62,9 +63,9 @@ public class PulseAudioClip extends Puls private int endFrame = 0; private int framesSinceOpen = 0; - private AudioFormat currentFormat = null; - public static final String DEFAULT_CLIP_NAME = "Clip"; + + private List controls = null; private Object clipLock = new Object(); private boolean clipThreadStarted; @@ -201,13 +202,20 @@ public class PulseAudioClip extends Puls @Override public Control getControl(Type control) { + if (isOpen) { + + } throw new IllegalArgumentException(control.toString() + " not supported"); } @Override public Control[] getControls() { - return new Control[] {}; + if (!isOpen) { + return new Control[] {}; + } + + return (Control[]) controls.toArray(new Control[0]); } @Override @@ -282,11 +290,16 @@ public class PulseAudioClip extends Puls @Override public void loop(int count) { + System.out.println("Loop " + count + " called"); + if (clipThreadStarted && count != 0) { // Do nothing; behavior not specified by the Java API return; } + + super.start(); + synchronized (clipLock) { if (currentFrame > endFrame) { loopsLeft = 0; @@ -375,6 +388,10 @@ public class PulseAudioClip extends Puls @Override public void start() { + if (isStarted) { + throw new IllegalStateException("already started"); + } + super.start(); if (!clipThread.isAlive()) { @@ -387,6 +404,9 @@ public class PulseAudioClip extends Puls } public void stop() { + if (!isStarted) { + throw new IllegalStateException("not started, so cant stop"); + } if (clipThread.isAlive()) { clipThread.interrupt(); diff -r 548fa22ff716 -r 1a1a426b17cc src/native/jni-common.c --- a/src/native/jni-common.c Wed Aug 27 12:04:55 2008 -0400 +++ b/src/native/jni-common.c Wed Aug 27 14:22:14 2008 -0400 @@ -104,8 +104,8 @@ void callJavaVoidMethod(JNIEnv* env, job } -void notifyWaitingOperations(JNIEnv* env) { - +jobject getLockObject(JNIEnv* env) { + const char* eventLoopClassName = "Lorg/classpath/icedtea/pulseaudio/EventLoop;"; jclass eventLoopClass = (*env)->FindClass(env, eventLoopClassName); @@ -126,6 +126,12 @@ void notifyWaitingOperations(JNIEnv* env jobject lockObject = (*env)->GetObjectField(env, eventLoop, lockID); assert(lockObject); + return lockObject; + +} + +void notifyWaitingOperations(JNIEnv* env) { + jobject lockObject = getLockObject(env); (*env)->MonitorEnter(env, lockObject); @@ -139,8 +145,6 @@ void notifyWaitingOperations(JNIEnv* env (*env)->MonitorExit(env, lockObject); } - - /* * diff -r 548fa22ff716 -r 1a1a426b17cc src/native/jni-common.h --- a/src/native/jni-common.h Wed Aug 27 12:04:55 2008 -0400 +++ b/src/native/jni-common.h Wed Aug 27 14:22:14 2008 -0400 @@ -70,6 +70,7 @@ void throwByName(JNIEnv* const env, cons void throwByName(JNIEnv* const env, const char* const name, const char* const msg); +jobject getLockObject(JNIEnv* env); void notifyWaitingOperations(JNIEnv* env); void* getJavaPointer(JNIEnv* env, jobject obj, char* name); diff -r 548fa22ff716 -r 1a1a426b17cc src/native/org_classpath_icedtea_pulseaudio_EventLoop.c --- a/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c Wed Aug 27 12:04:55 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c Wed Aug 27 14:22:14 2008 -0400 @@ -40,6 +40,8 @@ #include "org_classpath_icedtea_pulseaudio_EventLoop.h" #include "jni-common.h" +#include + const int PA_ITERATE_BLOCK = 1; const int PA_ITERATE_NOBLOCK = 0; @@ -74,6 +76,20 @@ static void context_change_callback(pa_c (*env)->CallVoidMethod(env, obj, mid, pa_context_get_state(context)); return; +} + +static int poll_function(struct pollfd *ufds, unsigned long nfds, int timeout, + void *userdata) { + + JNIEnv* env = pulse_thread_env; + jobject lockObject = getLockObject(env); + + (*env)->MonitorExit(env, lockObject); + + int value = poll(ufds, nfds, timeout); + + (*env)->MonitorEnter(env, lockObject); + return value; } /* @@ -133,6 +149,9 @@ JNIEXPORT void JNICALL Java_org_classpat pa_context_connect(context, NULL, 0, NULL); } + // set polling function + pa_mainloop_set_poll_func(mainloop, poll_function, NULL); + setJavaPointer(env, obj, "mainloopPointer", mainloop); setJavaPointer(env, obj, "contextPointer", context); // printf("native_setup() returning\n"); @@ -181,7 +200,7 @@ JNIEXPORT void JNICALL Java_org_classpat JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_EventLoop_native_1shutdown (JNIEnv *env, jobject obj) { -// printf("native_shutdown() starting\n"); + // printf("native_shutdown() starting\n"); pa_mainloop* mainloop = (pa_mainloop*) getJavaPointer(env, obj, "mainloopPointer"); assert(mainloop != NULL); diff -r 548fa22ff716 -r 1a1a426b17cc unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Aug 27 12:04:55 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Aug 27 14:22:14 2008 -0400 @@ -343,7 +343,7 @@ public class PulseAudioMixerTest { public void testLongWait() throws LineUnavailableException { selectedMixer.open(); try { - Thread.sleep(1000); + Thread.sleep(10000); } catch (InterruptedException e) { System.out.println("thread interrupted"); } From martinrb at google.com Wed Aug 27 15:34:55 2008 From: martinrb at google.com (Martin Buchholz) Date: Wed, 27 Aug 2008 15:34:55 -0700 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <48B54D04.1000508@sun.com> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> Message-ID: <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> On Wed, Aug 27, 2008 at 5:48 AM, Anthony Petrov wrote: > This is not an ideal solution. Updating to a new libpng version would be > fine, however these should be some clean sources (i.e. vanilla libpng source > tarball, w/o any static <-> const swaps, etc.), and secondly it requires > some Sun-internal bureaucratic process to put these sources to the OpenJDK > source tree. I'm well acquainted with the Sun-internal bureaucratic process. I encourage the libpng upgrade to happen, but it's not high enough priority for me to do the work. > Currently I don't see the suggested change is justified since using the > standard build environment does not reproduce the problem. OpenJDK is a community effort, and no longer just a Sun effort. For us this is a P1 bug, since it is a compilation error in our environment. If we cannot get a fix for this accepted upstream, we would be forced to fork. However, you > might probably be interested in fixing the following CR: > http://bugs.sun.com/view_bug.do?bug_id=6565114 > This would eliminate this problem at once and forever. Diego 'Flameeyes' > Petten? didn't provide us with a working patch (please see the archives of > the awt-dev mailing list), hence the CR has been suspended. Adding options to use the system versions of these graphics libraries is integrated into IcedTea already. IcedTea and Sun AWT engineers should work together to put such changes into OpenJDK7. Martin From mark at klomp.org Thu Aug 28 01:51:11 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 28 Aug 2008 10:51:11 +0200 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> Message-ID: <1219913471.3325.17.camel@hermans.wildebeest.org> Hi, On Wed, 2008-08-27 at 15:34 -0700, Martin Buchholz wrote: > Adding options to use the system versions of these graphics libraries > is integrated into IcedTea already. IcedTea and Sun AWT engineers > should work together to put such changes into OpenJDK7. Yes, this would be great so we don't have to maintain so many extra external patches. The patch to do this in icedtea6 is at: http://icedtea.classpath.org/hg/icedtea6/file/tip/patches/icedtea-libraries.patch That makes sure the system versions of the png, jpeg and zlib libraries are used. Cheers, Mark From mark at klomp.org Thu Aug 28 02:27:46 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 28 Aug 2008 11:27:46 +0200 Subject: OpenJDK b33 and IcedTea In-Reply-To: <17c6771e0808260622w311b2b15m39432017c1595734@mail.gmail.com> References: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> <1219744258.3066.19.camel@dijkstra.wildebeest.org> <17c6771e0808260622w311b2b15m39432017c1595734@mail.gmail.com> Message-ID: <1219915666.4019.15.camel@dijkstra.wildebeest.org> Hi Jonathan (and hi CC compiler-dev, which I hope is the right mailinglist for these javah/jni questions), Maybe you saw these questions/discussion already around the openjdk javah JNI headers generated for static final constant fields. Which fields are eligible and which encoding is used in the generation. I was hoping you might know the answers since you recently worked on the openjdk javah implementation. It seems that either the openjdk javah version doesn't strictly follow the jni specification, or the jni specification/book (I never know which one is authoritative) isn't completely clear on the exact rules here since other javah implementations seem to differ on the details of which fields and how things get encoded. If someone could enlighten us that would be wonderful. Original context here for: - selection of fields to encode unclear http://mail.openjdk.java.net/pipermail/build-dev/2008-August/001427.html - encoding rules unclear http://mail.openjdk.java.net/pipermail/build-dev/2008-August/001426.html Thanks, Mark From Anthony.Petrov at Sun.COM Thu Aug 28 03:23:24 2008 From: Anthony.Petrov at Sun.COM (Anthony Petrov) Date: Thu, 28 Aug 2008 14:23:24 +0400 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <1219913471.3325.17.camel@hermans.wildebeest.org> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> Message-ID: <48B67C9C.9050502@sun.com> Hi Mark, Thanks for pointing this. Actually, the patch existing in the IcedTea seems to have two potential issues that we at Sun are worried about: 1. The patch cuts off the embedded versions of these libraries from OpenJDK source code. In fact, there may exist systems where these libraries are not installed. And currently OpenJDK runs perfectly on these systems since it have the libraries compiled in. 2. The system libraries may contain issues/errors/bugs/whatever which our code cannot deal with (I think Java2D folks may collaborate on this). Throwing the libraries away from the OpenJDK code may reveal some of the issues, but we obviously can't fix the libraries as fast as our code. And also, we do guarantee some behavior (like understanding file format versions or whatever) that we wouldn't be able to guarantee if we can't ship our copies of the libraries. So, it seems that a better patch would allow choosing whether the user wants to build the OpenJDK using the embedded versions of the libraries (with which the OpenJDK is guaranteed to behave as it should), or the user is brave enough to dynamically link to the system copies and the user is not going to redistribute the OpenJDK to systems that do not have these libraries installed. That actually was the main idea of the patch for http://bugs.sun.com/view_bug.do?bug_id=6565114. Could the IcedTea maintainers do some similar stuff and provide us with the patch? Thanks in advance! -- best regards, Anthony On 08/28/2008 12:51 PM Mark Wielaard wrote: > Hi, > > On Wed, 2008-08-27 at 15:34 -0700, Martin Buchholz wrote: >> Adding options to use the system versions of these graphics libraries >> is integrated into IcedTea already. IcedTea and Sun AWT engineers >> should work together to put such changes into OpenJDK7. > > Yes, this would be great so we don't have to maintain so many extra > external patches. The patch to do this in icedtea6 is at: > http://icedtea.classpath.org/hg/icedtea6/file/tip/patches/icedtea-libraries.patch > That makes sure the system versions of the png, jpeg and zlib libraries > are used. > > Cheers, > > Mark > > From Jonathan.Gibbons at Sun.COM Thu Aug 28 05:49:21 2008 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Thu, 28 Aug 2008 05:49:21 -0700 Subject: OpenJDK b33 and IcedTea In-Reply-To: <1219915666.4019.15.camel@dijkstra.wildebeest.org> References: <17c6771e0808251223u1667e8daw2d5fd5a93c6da8de@mail.gmail.com> <17c6771e0808251646l7ad9e747rb6423dc9731ed4f1@mail.gmail.com> <1219744258.3066.19.camel@dijkstra.wildebeest.org> <17c6771e0808260622w311b2b15m39432017c1595734@mail.gmail.com> <1219915666.4019.15.camel@dijkstra.wildebeest.org> Message-ID: Mark, I'll see what I can find out for you. -- Jon On Aug 28, 2008, at 2:27 AM, Mark Wielaard wrote: > Hi Jonathan (and hi CC compiler-dev, which I hope is the right > mailinglist for these javah/jni questions), > > Maybe you saw these questions/discussion already around the openjdk > javah JNI headers generated for static final constant fields. Which > fields are eligible and which encoding is used in the generation. I > was > hoping you might know the answers since you recently worked on the > openjdk javah implementation. It seems that either the openjdk javah > version doesn't strictly follow the jni specification, or the jni > specification/book (I never know which one is authoritative) isn't > completely clear on the exact rules here since other javah > implementations seem to differ on the details of which fields and how > things get encoded. If someone could enlighten us that would be > wonderful. > > Original context here for: > - selection of fields to encode unclear > http://mail.openjdk.java.net/pipermail/build-dev/2008-August/001427.html > - encoding rules unclear > http://mail.openjdk.java.net/pipermail/build-dev/2008-August/001426.html > > Thanks, > > Mark > From mark at klomp.org Thu Aug 28 06:42:10 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 28 Aug 2008 13:42:10 +0000 Subject: changeset in /hg/icedtea6: * patches/icedtea-clean-crypto.patch:... Message-ID: changeset 6b8458bc0aca in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6b8458bc0aca description: * patches/icedtea-clean-crypto.patch: New patch. * Makefile.am (ICEDTEA_PATCHES): Add icedtea-clean-crypto.patch. diffstat: 3 files changed, 616 insertions(+) ChangeLog | 5 Makefile.am | 1 patches/icedtea-clean-crypto.patch | 610 ++++++++++++++++++++++++++++++++++++ diffs (truncated from 637 to 500 lines): diff -r c1d1aca38209 -r 6b8458bc0aca ChangeLog --- a/ChangeLog Tue Aug 26 16:27:07 2008 -0400 +++ b/ChangeLog Thu Aug 28 15:41:42 2008 +0200 @@ -1,3 +1,8 @@ 2008-08-26 Deepak Bhole + + * patches/icedtea-clean-crypto.patch: New patch. + * Makefile.am (ICEDTEA_PATCHES): Add icedtea-clean-crypto.patch. + 2008-08-26 Deepak Bhole * IcedTeaPlugin.cc: Added JNI communication bridge, updated processing diff -r c1d1aca38209 -r 6b8458bc0aca Makefile.am --- a/Makefile.am Tue Aug 26 16:27:07 2008 -0400 +++ b/Makefile.am Thu Aug 28 15:41:42 2008 +0200 @@ -504,6 +504,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-jdk-use-ssize_t.patch \ patches/icedtea-hotspot-use-idx_t.patch \ patches/icedtea-hotspot-params-cast-size_t.patch \ + patches/icedtea-clean-crypto.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ patches/icedtea-arch.patch diff -r c1d1aca38209 -r 6b8458bc0aca patches/icedtea-clean-crypto.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-clean-crypto.patch Thu Aug 28 15:41:42 2008 +0200 @@ -0,0 +1,610 @@ +diff -ur openjdk.orig/jdk/make/javax/crypto/Makefile openjdk/jdk/make/javax/crypto/Makefile +--- openjdk.orig/jdk/make/javax/crypto/Makefile 2008-08-28 13:10:20.000000000 +0200 ++++ openjdk/jdk/make/javax/crypto/Makefile 2008-08-28 15:17:56.000000000 +0200 +@@ -155,7 +155,8 @@ + # + + ifdef OPENJDK +-all: build-jar install-jar build-policy install-limited ++# We don't need any policy files. ++all: build-jar install-jar + else # OPENJDK + ifeq ($(strip $(FILES_java)),) + all: +diff -ur openjdk.orig/jdk/src/share/classes/javax/crypto/Cipher.java openjdk/jdk/src/share/classes/javax/crypto/Cipher.java +--- openjdk.orig/jdk/src/share/classes/javax/crypto/Cipher.java 2008-08-28 12:06:23.000000000 +0200 ++++ openjdk/jdk/src/share/classes/javax/crypto/Cipher.java 2008-08-28 15:23:41.000000000 +0200 +@@ -144,12 +144,6 @@ + // The transformation + private String transformation; + +- // Crypto permission representing the maximum allowable cryptographic +- // strength that this Cipher object can be used for. (The cryptographic +- // strength is a function of the keysize and algorithm parameters encoded +- // in the crypto permission.) +- private CryptoPermission cryptoPerm; +- + // The exemption mechanism that needs to be enforced + private ExemptionMechanism exmech; + +@@ -190,16 +184,9 @@ + protected Cipher(CipherSpi cipherSpi, + Provider provider, + String transformation) { +- // See bug 4341369 & 4334690 for more info. +- // If the caller is trusted, then okey. +- // Otherwise throw a NullPointerException. +- if (!JceSecurityManager.INSTANCE.isCallerTrusted()) { +- throw new NullPointerException(); +- } + this.spi = cipherSpi; + this.provider = provider; + this.transformation = transformation; +- this.cryptoPerm = CryptoAllPermission.INSTANCE; + this.lock = null; + } + +@@ -212,7 +199,6 @@ + Cipher(CipherSpi cipherSpi, String transformation) { + this.spi = cipherSpi; + this.transformation = transformation; +- this.cryptoPerm = CryptoAllPermission.INSTANCE; + this.lock = null; + } + +@@ -603,7 +589,6 @@ + tr.setModePadding(spi); + Cipher cipher = new Cipher(spi, transformation); + cipher.provider = s.getProvider(); +- cipher.initCryptoPermission(); + return cipher; + } catch (Exception e) { + failure = e; +@@ -622,22 +607,6 @@ + ("No such algorithm: " + transformation, failure); + } + +- // If the requested crypto service is export-controlled, +- // determine the maximum allowable keysize. +- private void initCryptoPermission() throws NoSuchAlgorithmException { +- if (JceSecurity.isRestricted() == false) { +- cryptoPerm = CryptoAllPermission.INSTANCE; +- exmech = null; +- return; +- } +- cryptoPerm = getConfiguredPermission(transformation); +- // Instantiate the exemption mechanism (if required) +- String exmechName = cryptoPerm.getExemptionMechanism(); +- if (exmechName != null) { +- exmech = ExemptionMechanism.getInstance(exmechName); +- } +- } +- + // max number of debug warnings to print from chooseFirstProvider() + private static int warnCount = 10; + +@@ -699,7 +668,6 @@ + thisSpi = (CipherSpi)obj; + } + tr.setModePadding(thisSpi); +- initCryptoPermission(); + spi = thisSpi; + provider = s.getProvider(); + // not needed any more +@@ -731,19 +699,15 @@ + InvalidAlgorithmParameterException { + switch (type) { + case I_KEY: +- checkCryptoPerm(thisSpi, key); + thisSpi.engineInit(opmode, key, random); + break; + case I_PARAMSPEC: +- checkCryptoPerm(thisSpi, key, paramSpec); + thisSpi.engineInit(opmode, key, paramSpec, random); + break; + case I_PARAMS: +- checkCryptoPerm(thisSpi, key, params); + thisSpi.engineInit(opmode, key, params, random); + break; + case I_CERT: +- checkCryptoPerm(thisSpi, key); + thisSpi.engineInit(opmode, key, random); + break; + default: +@@ -793,7 +757,6 @@ + thisSpi = (CipherSpi)s.newInstance(null); + } + tr.setModePadding(thisSpi); +- initCryptoPermission(); + implInit(thisSpi, initType, opmode, key, paramSpec, + params, random); + provider = s.getProvider(); +@@ -939,107 +902,6 @@ + return exmech; + } + +- // +- // Crypto permission check code below +- // +- private void checkCryptoPerm(CipherSpi checkSpi, Key key) +- throws InvalidKeyException { +- if (cryptoPerm == CryptoAllPermission.INSTANCE) { +- return; +- } +- // Check if key size and default parameters are within legal limits +- AlgorithmParameterSpec params; +- try { +- params = getAlgorithmParameterSpec(checkSpi.engineGetParameters()); +- } catch (InvalidParameterSpecException ipse) { +- throw new InvalidKeyException +- ("Unsupported default algorithm parameters"); +- } +- if (!passCryptoPermCheck(checkSpi, key, params)) { +- throw new InvalidKeyException( +- "Illegal key size or default parameters"); +- } +- } +- +- private void checkCryptoPerm(CipherSpi checkSpi, Key key, +- AlgorithmParameterSpec params) throws InvalidKeyException, +- InvalidAlgorithmParameterException { +- if (cryptoPerm == CryptoAllPermission.INSTANCE) { +- return; +- } +- // Determine keysize and check if it is within legal limits +- if (!passCryptoPermCheck(checkSpi, key, null)) { +- throw new InvalidKeyException("Illegal key size"); +- } +- if ((params != null) && (!passCryptoPermCheck(checkSpi, key, params))) { +- throw new InvalidAlgorithmParameterException("Illegal parameters"); +- } +- } +- +- private void checkCryptoPerm(CipherSpi checkSpi, Key key, +- AlgorithmParameters params) +- throws InvalidKeyException, InvalidAlgorithmParameterException { +- if (cryptoPerm == CryptoAllPermission.INSTANCE) { +- return; +- } +- // Convert the specified parameters into specs and then delegate. +- AlgorithmParameterSpec pSpec; +- try { +- pSpec = getAlgorithmParameterSpec(params); +- } catch (InvalidParameterSpecException ipse) { +- throw new InvalidAlgorithmParameterException +- ("Failed to retrieve algorithm parameter specification"); +- } +- checkCryptoPerm(checkSpi, key, pSpec); +- } +- +- private boolean passCryptoPermCheck(CipherSpi checkSpi, Key key, +- AlgorithmParameterSpec params) +- throws InvalidKeyException { +- String em = cryptoPerm.getExemptionMechanism(); +- int keySize = checkSpi.engineGetKeySize(key); +- // Use the "algorithm" component of the cipher +- // transformation so that the perm check would +- // work when the key has the "aliased" algo. +- String algComponent; +- int index = transformation.indexOf('/'); +- if (index != -1) { +- algComponent = transformation.substring(0, index); +- } else { +- algComponent = transformation; +- } +- CryptoPermission checkPerm = +- new CryptoPermission(algComponent, keySize, params, em); +- +- if (!cryptoPerm.implies(checkPerm)) { +- if (debug != null) { +- debug.println("Crypto Permission check failed"); +- debug.println("granted: " + cryptoPerm); +- debug.println("requesting: " + checkPerm); +- } +- return false; +- } +- if (exmech == null) { +- return true; +- } +- try { +- if (!exmech.isCryptoAllowed(key)) { +- if (debug != null) { +- debug.println(exmech.getName() + " isn't enforced"); +- } +- return false; +- } +- } catch (ExemptionMechanismException eme) { +- if (debug != null) { +- debug.println("Cannot determine whether "+ +- exmech.getName() + " has been enforced"); +- eme.printStackTrace(); +- } +- return false; +- } +- return true; +- } +- + // check if opmode is one of the defined constants + // throw InvalidParameterExeption if not + private static void checkOpmode(int opmode) { +@@ -1144,7 +1006,6 @@ + checkOpmode(opmode); + + if (spi != null) { +- checkCryptoPerm(spi, key); + spi.engineInit(opmode, key, random); + } else { + try { +@@ -1270,7 +1131,6 @@ + checkOpmode(opmode); + + if (spi != null) { +- checkCryptoPerm(spi, key, params); + spi.engineInit(opmode, key, params, random); + } else { + chooseProvider(I_PARAMSPEC, opmode, key, params, null, random); +@@ -1391,7 +1251,6 @@ + checkOpmode(opmode); + + if (spi != null) { +- checkCryptoPerm(spi, key, params); + spi.engineInit(opmode, key, params, random); + } else { + chooseProvider(I_PARAMS, opmode, key, null, params, random); +@@ -1555,7 +1414,6 @@ + (certificate==null? null:certificate.getPublicKey()); + + if (spi != null) { +- checkCryptoPerm(spi, publicKey); + spi.engineInit(opmode, publicKey, random); + } else { + try { +diff -ur openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurity.java openjdk/jdk/src/share/classes/javax/crypto/JceSecurity.java +--- openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurity.java 2008-08-28 12:06:23.000000000 +0200 ++++ openjdk/jdk/src/share/classes/javax/crypto/JceSecurity.java 2008-08-28 15:17:56.000000000 +0200 +@@ -63,8 +63,8 @@ + // Map of the providers currently being verified + private final static Map verifyingProviders = new IdentityHashMap(); + +- // Set the default value. May be changed in the static initializer. +- private static boolean isRestricted = true; ++ // Set the default value. ++ private static final boolean isRestricted = false; + + /* + * Don't let anyone instantiate this. +@@ -72,26 +72,6 @@ + private JceSecurity() { + } + +- static { +- try { +- AccessController.doPrivileged(new PrivilegedExceptionAction() { +- public Object run() throws Exception { +- setupJurisdictionPolicies(); +- return null; +- } +- }); +- +- isRestricted = defaultPolicy.implies( +- CryptoAllPermission.INSTANCE) ? false : true; +- } catch (Exception e) { +- SecurityException se = +- new SecurityException( +- "Can not initialize cryptographic mechanism"); +- se.initCause(e); +- throw se; +- } +- } +- + static Instance getInstance(String type, Class clazz, String algorithm, + String provider) throws NoSuchAlgorithmException, + NoSuchProviderException { +@@ -239,93 +219,6 @@ + return (url == NULL_URL) ? null : url; + } + +- private static void setupJurisdictionPolicies() throws Exception { +- String javaHomeDir = System.getProperty("java.home"); +- String sep = File.separator; +- String pathToPolicyJar = javaHomeDir + sep + "lib" + sep + +- "security" + sep; +- +- File exportJar = new File(pathToPolicyJar, "US_export_policy.jar"); +- File importJar = new File(pathToPolicyJar, "local_policy.jar"); +- URL jceCipherURL = ClassLoader.getSystemResource +- ("javax/crypto/Cipher.class"); +- +- if ((jceCipherURL == null) || +- !exportJar.exists() || !importJar.exists()) { +- throw new SecurityException +- ("Cannot locate policy or framework files!"); +- } +- +- // Enforce the signer restraint, i.e. signer of JCE framework +- // jar should also be the signer of the two jurisdiction policy +- // jar files. +- JarVerifier.verifyFrameworkSigned(jceCipherURL); +- +- // Read jurisdiction policies. +- CryptoPermissions defaultExport = new CryptoPermissions(); +- CryptoPermissions exemptExport = new CryptoPermissions(); +- loadPolicies(exportJar, defaultExport, exemptExport); +- +- CryptoPermissions defaultImport = new CryptoPermissions(); +- CryptoPermissions exemptImport = new CryptoPermissions(); +- loadPolicies(importJar, defaultImport, exemptImport); +- +- // Merge the export and import policies for default applications. +- if (defaultExport.isEmpty() || defaultImport.isEmpty()) { +- throw new SecurityException("Missing mandatory jurisdiction " + +- "policy files"); +- } +- defaultPolicy = defaultExport.getMinimum(defaultImport); +- +- // Merge the export and import policies for exempt applications. +- if (exemptExport.isEmpty()) { +- exemptPolicy = exemptImport.isEmpty() ? null : exemptImport; +- } else { +- exemptPolicy = exemptExport.getMinimum(exemptImport); +- } +- } +- +- /** +- * Load the policies from the specified file. Also checks that the +- * policies are correctly signed. +- */ +- private static void loadPolicies(File jarPathName, +- CryptoPermissions defaultPolicy, +- CryptoPermissions exemptPolicy) +- throws Exception { +- +- JarFile jf = new JarFile(jarPathName); +- +- Enumeration entries = jf.entries(); +- while (entries.hasMoreElements()) { +- JarEntry je = (JarEntry)entries.nextElement(); +- InputStream is = null; +- try { +- if (je.getName().startsWith("default_")) { +- is = jf.getInputStream(je); +- defaultPolicy.load(is); +- } else if (je.getName().startsWith("exempt_")) { +- is = jf.getInputStream(je); +- exemptPolicy.load(is); +- } else { +- continue; +- } +- } finally { +- if (is != null) { +- is.close(); +- } +- } +- +- // Enforce the signer restraint, i.e. signer of JCE framework +- // jar should also be the signer of the two jurisdiction policy +- // jar files. +- JarVerifier.verifyPolicySigned(je.getCertificates()); +- } +- // Close and nullify the JarFile reference to help GC. +- jf.close(); +- jf = null; +- } +- + static CryptoPermissions getDefaultPolicy() { + return defaultPolicy; + } +diff -ur openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurityManager.java openjdk/jdk/src/share/classes/javax/crypto/JceSecurityManager.java +--- openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurityManager.java 2008-08-28 12:06:23.000000000 +0200 ++++ openjdk/jdk/src/share/classes/javax/crypto/JceSecurityManager.java 2008-08-28 15:17:56.000000000 +0200 +@@ -50,8 +50,6 @@ + private static final CryptoPermissions defaultPolicy; + private static final CryptoPermissions exemptPolicy; + private static final CryptoAllPermission allPerm; +- private static final Vector TrustedCallersCache = new Vector(2); +- private static final Map exemptCache = new HashMap(); + + // singleton instance + static final JceSecurityManager INSTANCE; +@@ -77,176 +75,6 @@ + * applet/application, for the given algorithm. + */ + CryptoPermission getCryptoPermission(String alg) { +- // Need to convert to uppercase since the crypto perm +- // lookup is case sensitive. +- alg = alg.toUpperCase(Locale.ENGLISH); +- +- // If CryptoAllPermission is granted by default, we return that. +- // Otherwise, this will be the permission we return if anything goes +- // wrong. +- CryptoPermission defaultPerm = getDefaultPermission(alg); +- if (defaultPerm == CryptoAllPermission.INSTANCE) { +- return defaultPerm; +- } +- +- // Determine the codebase of the caller of the JCE API. +- // This is the codebase of the first class which is not in +- // javax.crypto.* packages. +- // NOTE: javax.crypto.* package maybe subject to package +- // insertion, so need to check its classloader as well. +- Class[] context = getClassContext(); +- URL callerCodeBase = null; +- int i; +- for (i=0; i Hi, There is still a lot of cruft in the codebase for preventing the usage of certain crypto algorithms or key-sizes. And we were actually shipping restricted policies preventing people from using unlimted crypto. Oops. So if you saw: "java.securityInvalidKeyException: Illegal key size or default parameters" that was caused by wrongly installed security policy files. The code was actually there, just not properly activated. This patch cleans up the crypto code so it doesn't go out of its way to prevent usage of "restricted crypto" and makes sure no restricted crypto security policies are installed. 2008-08-28 Mark Wielaard * patches/icedtea-clean-crypto.patch: New patch. * Makefile.am (ICEDTEA_PATCHES): Add icedtea-clean-crypto.patch. This should enable all normal crypto usage by default. And now a make check-jdk makes sure the jtreg tests that are run and test "unlimited crypto". Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-clean-crypto.patch Type: text/x-patch Size: 24049 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080828/84f6a4f0/icedtea-clean-crypto.patch From martinrb at google.com Thu Aug 28 09:48:22 2008 From: martinrb at google.com (Martin Buchholz) Date: Thu, 28 Aug 2008 09:48:22 -0700 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <1219913471.3325.17.camel@hermans.wildebeest.org> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> Message-ID: <1ccfd1c10808280948v7074a85dve7723bcaf37b308f@mail.gmail.com> In its current form, the icedtea-libraries.patch would probably be rejected by Sun, because it unconditionally changes to using the system libraries. Instead it should be an option. Also, it appears that the changes introduce a run-time dependency on libpng that wasn't there before. This is fine for building packages as part of a Linux distro that manages such dependencies, but is unacceptable in other environments. A quick look at the changes suggests they are insufficiently portable (i.e. a quick hack): e.g. + void *handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL); Martin On Thu, Aug 28, 2008 at 1:51 AM, Mark Wielaard wrote: > Hi, > > On Wed, 2008-08-27 at 15:34 -0700, Martin Buchholz wrote: >> Adding options to use the system versions of these graphics libraries >> is integrated into IcedTea already. IcedTea and Sun AWT engineers >> should work together to put such changes into OpenJDK7. > > Yes, this would be great so we don't have to maintain so many extra > external patches. The patch to do this in icedtea6 is at: > http://icedtea.classpath.org/hg/icedtea6/file/tip/patches/icedtea-libraries.patch > That makes sure the system versions of the png, jpeg and zlib libraries > are used. > > Cheers, > > Mark > > From mark at klomp.org Thu Aug 28 10:35:32 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 28 Aug 2008 19:35:32 +0200 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <48B67C9C.9050502@sun.com> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> <48B67C9C.9050502@sun.com> Message-ID: <1219944932.23036.3.camel@hermans.wildebeest.org> Hi Anthony, On Thu, 2008-08-28 at 14:23 +0400, Anthony Petrov wrote: > 1. The patch cuts off the embedded versions of these libraries from > OpenJDK source code. In fact, there may exist systems where these > libraries are not installed. And currently OpenJDK runs perfectly on > these systems since it have the libraries compiled in. Yes it does remove the upstream sources. But I admit to be slightly confused about this practice of embedding upstream source code into your own code repository. If we want to support static linking of libraries wouldn't it be enough to configure and detect the static library .a versions and link against those? > 2. The system libraries may contain issues/errors/bugs/whatever which > our code cannot deal with (I think Java2D folks may collaborate on > this). Throwing the libraries away from the OpenJDK code may reveal some > of the issues, but we obviously can't fix the libraries as fast as our > code. And also, we do guarantee some behavior (like understanding file > format versions or whatever) that we wouldn't be able to guarantee if we > can't ship our copies of the libraries. It would be good to have a list of the guarantees so we can write tests and configure checks to make sure only correct libraries are linked in. Cheers, Mark From mark at klomp.org Thu Aug 28 10:41:59 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 28 Aug 2008 19:41:59 +0200 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <1ccfd1c10808280948v7074a85dve7723bcaf37b308f@mail.gmail.com> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> <1ccfd1c10808280948v7074a85dve7723bcaf37b308f@mail.gmail.com> Message-ID: <1219945319.23036.11.camel@hermans.wildebeest.org> On Thu, 2008-08-28 at 09:48 -0700, Martin Buchholz wrote: > In its current form, the icedtea-libraries.patch > would probably be rejected by Sun, because it > unconditionally changes to using the system libraries. > Instead it should be an option. Yeah, it would be interesting to look into that. Although I think the option should be between linking static or shared libraries. Embedding the sources seem a bit fragile and apparently hard to update inside openjdk because of sun legal issues. > A quick look at the changes suggests > they are insufficiently portable (i.e. a quick hack): > e.g. > + void *handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL); icedtea INSTALL explicitly mentions this version to use. But it would indeed be better if configure does explicitly check for this version of the library. Thanks, Mark From Dalibor.Topic at Sun.COM Thu Aug 28 12:14:27 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Thu, 28 Aug 2008 21:14:27 +0200 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <1219945319.23036.11.camel@hermans.wildebeest.org> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> <1ccfd1c10808280948v7074a85dve7723bcaf37b308f@mail.gmail.com> <1219945319.23036.11.camel@hermans.wildebeest.org> Message-ID: <48B6F913.4040402@Sun.COM> On 28.08.08 19:41, Mark Wielaard wrote: > Embedding > the sources seem a bit fragile and apparently hard to update inside > openjdk because of sun legal issues. > There is a legal review process associated with dragging in new external code, just like there is a process for that at the FSF - but it is necessarily not as lightweight as [1]. cheers, dalibor topic [1] http://www.gnu.org/prep/maintain/html_node/External-Libraries.html#External-Libraries -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From Phil.Race at Sun.COM Thu Aug 28 12:27:11 2008 From: Phil.Race at Sun.COM (Phil Race) Date: Thu, 28 Aug 2008 12:27:11 -0700 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <48B6F913.4040402@Sun.COM> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> <1ccfd1c10808280948v7074a85dve7723bcaf37b308f@mail.gmail.com> <1219945319.23036.11.camel@hermans.wildebeest.org> <48B6F913.4040402@Sun.COM> Message-ID: <48B6FC0F.7070809@sun.com> Bringing in an updated version is fairly lightweight. I recently did this for a fontconfig header file. There's a web-based form where you fill in the info, confirming the license hasn't changed, and it gets a short review by a lawyer and that's about it. Filling in the form takes about 20 mins max. Most of the time is waiting for a lawyer to be assigned and approve it. A little under 6 days elapsed time for me from submission to approval. -phil. Dalibor Topic wrote: > On 28.08.08 19:41, Mark Wielaard wrote: >> Embedding >> the sources seem a bit fragile and apparently hard to update inside >> openjdk because of sun legal issues. >> > > There is a legal review process associated with dragging in new external > code, just like > there is a process for that at the FSF - but it is necessarily not as > lightweight as [1]. > > cheers, > dalibor topic > > [1] > http://www.gnu.org/prep/maintain/html_node/External-Libraries.html#External-Libraries > > From iivan at town.yyz.redhat.com Thu Aug 28 12:57:02 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Thu, 28 Aug 2008 19:57:02 +0000 Subject: changeset in /hg/pulseaudio: ports added Message-ID: changeset f489a16be6f1 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=f489a16be6f1 description: ports added diffstat: 22 files changed, 642 insertions(+), 208 deletions(-) ChangeLog | 9 build.xml | 3 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 46 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 46 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 26 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java | 43 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 52 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java | 36 ++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java | 17 + src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 69 ++-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamMuteControl.java | 68 ---- src/java/org/classpath/icedtea/pulseaudio/PulseAudioStreamVolumeControl.java | 66 ---- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 140 ++++++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 67 ++++ src/java/org/classpath/icedtea/pulseaudio/Stream.java | 6 src/native/Makefile.am | 11 src/native/org_classpath_icedtea_pulseaudio_EventLoop.c | 38 ++ src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 1 src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c | 77 +++++ src/native/org_classpath_icedtea_pulseaudio_Stream.c | 17 + unittests/org/classpath/icedtea/pulseaudio/PulseSourceDataLineTest.java | 10 diffs (truncated from 1233 to 500 lines): diff -r 1a1a426b17cc -r f489a16be6f1 ChangeLog --- a/ChangeLog Wed Aug 27 14:22:14 2008 -0400 +++ b/ChangeLog Thu Aug 28 15:57:05 2008 -0400 @@ -1,3 +1,12 @@ 2008-08-13 Ioana Ivan + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java: + new class representing a targetport + * some refactoring in the control classes (controls for the target + port are now supported) + + + 2008-08-13 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java: diff -r 1a1a426b17cc -r f489a16be6f1 build.xml --- a/build.xml Wed Aug 27 14:22:14 2008 -0400 +++ b/build.xml Thu Aug 28 15:57:05 2008 -0400 @@ -41,6 +41,9 @@ + + + diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Aug 27 14:22:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Thu Aug 28 15:57:05 2008 -0400 @@ -71,6 +71,9 @@ public class EventLoop implements Runnab // private boolean eventLoopIsRunning = false; public Semaphore finished = new Semaphore(0); + + private List targetPortNameList = new ArrayList(); + private List sourcePortNameList = new ArrayList(); /* * JNI stuff @@ -240,5 +243,48 @@ public class EventLoop implements Runnab public long getMainLoopPointer() { return mainloopPointer; } + + private native int nativeUpdateTargetPortNameList(); + private native int nativeUpdateSourcePortNameList(); + + protected synchronized List updateTargetPortNameList() { + targetPortNameList = new ArrayList(); + Operation op; + synchronized (this.threadLock) { + op = new Operation(nativeUpdateTargetPortNameList()); + } + + op.waitForCompletion(); + + assert (op.getState() == Operation.State.Done); + + op.releaseReference(); + return targetPortNameList; + } + + protected synchronized List updateSourcePortNameList() { + sourcePortNameList = new ArrayList(); + Operation op; + synchronized (this.threadLock) { + op = new Operation(nativeUpdateSourcePortNameList()); + } + + op.waitForCompletion(); + + assert (op.getState() == Operation.State.Done); + + op.releaseReference(); + return sourcePortNameList; + } + + + public void source_callback(String name ) { + sourcePortNameList.add(name); + } + + + public void sink_callback(String name ) { + targetPortNameList.add(name); + } } diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Aug 27 14:22:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Aug 28 15:57:05 2008 -0400 @@ -45,16 +45,21 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.BooleanControl; import javax.sound.sampled.Clip; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; +import javax.sound.sampled.FloatControl; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Control.Type; -public class PulseAudioClip extends PulseAudioDataLine implements Clip { +public class PulseAudioClip extends PulseAudioDataLine implements Clip, PulseAudioPlaybackLine { private byte[] data = null; + + private boolean muted; + private float volume; // these are frame indices. so counted from 0 private int currentFrame = 0; @@ -138,6 +143,8 @@ public class PulseAudioClip extends Puls this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; clipThread = new ClipThread(); + this.volume = PulseAudioVolumeControl.MAX_VOLUME; + controls = new ArrayList(); } @@ -203,7 +210,13 @@ public class PulseAudioClip extends Puls @Override public Control getControl(Type control) { if (isOpen) { - + if (control.getClass() == BooleanControl.Type.MUTE.getClass()) { + return controls.get(1); + } + + if (control.getClass() == FloatControl.Type.VOLUME.getClass()) { + return controls.get(0); + } } throw new IllegalArgumentException(control.toString() + " not supported"); @@ -328,6 +341,35 @@ public class PulseAudioClip extends Puls System.arraycopy(data, offset, this.data, 0, bufferSize); frameCount = bufferSize / format.getFrameSize(); isOpen = true; + + PulseAudioVolumeControl volumeControl = new PulseAudioVolumeControl( + this, eventLoop); + PulseAudioMuteControl muteControl = new PulseAudioMuteControl( + this, volumeControl); + controls.add(volumeControl); + controls.add(muteControl); + + } + + public int native_setVolume(float value) { + return stream.native_setVolume(value); + } + + public boolean isMuted() { + return muted; + } + + public void setMuted(boolean value) { + muted = value; + } + + public float getVolume() { + return this.volume; + } + + public void setVolume(float value) { + this.volume = value; + } @Override diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Aug 27 14:22:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Thu Aug 28 15:57:05 2008 -0400 @@ -11,7 +11,7 @@ import javax.sound.sampled.LineListener; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; -public abstract class PulseAudioDataLine implements DataLine { +public abstract class PulseAudioDataLine extends PulseAudioLine implements DataLine { protected static final int DEFAULT_BUFFER_SIZE = StreamBufferAttributes.SANE_DEFAULT; protected static final String PULSEAUDIO_FORMAT_KEY = "PulseAudioFormatKey"; @@ -20,7 +20,7 @@ public abstract class PulseAudioDataLine // true between open() and close(). ie represents when a line has acquire // resources - protected boolean isOpen = false; + // true between start() and stop() protected boolean isStarted = false; @@ -35,8 +35,6 @@ public abstract class PulseAudioDataLine protected AudioFormat defaultFormat = null; protected int bufferSize = 0; - - protected List lineListeners = new ArrayList();; protected EventLoop eventLoop = null; protected Semaphore semaphore = new Semaphore(0); @@ -185,26 +183,16 @@ public abstract class PulseAudioDataLine return isEngagedInIo; } - public void addLineListener(LineListener listener) { - this.lineListeners.add(listener); - } - public void removeLineListener(LineListener listener) { - this.lineListeners.remove(listener); - } - - private void fireLineEvent(LineEvent e) { - for (LineListener lineListener : lineListeners) { - lineListener.update(e); - } - } protected abstract void connectLine(int bufferSize); public abstract void drain(); - public boolean isOpen() { - return isOpen; + + + public Stream getStream() { + return stream; } - + } diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java Thu Aug 28 15:57:05 2008 -0400 @@ -0,0 +1,43 @@ +package org.classpath.icedtea.pulseaudio; + +import java.util.ArrayList; +import java.util.List; + +import javax.sound.sampled.Control; +import javax.sound.sampled.Line; +import javax.sound.sampled.LineEvent; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.Control.Type; + + +abstract class PulseAudioLine { + + protected List lineListeners = new ArrayList(); + protected boolean isOpen = false; + + + public void addLineListener(LineListener listener) { + this.lineListeners.add(listener); + } + + public void removeLineListener(LineListener listener) { + this.lineListeners.remove(listener); + } + + protected void fireLineEvent(LineEvent e) { + for (LineListener lineListener : lineListeners) { + lineListener.update(e); + } + } + + public boolean isOpen() { + return isOpen; + } + + + + + + +} diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Aug 27 14:22:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Thu Aug 28 15:57:05 2008 -0400 @@ -52,15 +52,18 @@ import javax.sound.sampled.Clip; import javax.sound.sampled.Clip; import javax.sound.sampled.Control; import javax.sound.sampled.DataLine; +import javax.sound.sampled.FloatControl; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; +import javax.sound.sampled.Port; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.Control.Type; +import javax.sound.sampled.Port.Info; public class PulseAudioMixer implements javax.sound.sampled.Mixer { // singleton @@ -87,6 +90,11 @@ public class PulseAudioMixer implements private PulseAudioMixer() { AudioFormat[] formats = getSupportedFormats(); + List sourceLineInfoList = new ArrayList(); + sourceLineInfoList.add(new DataLine.Info( + SourceDataLine.class, formats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE)); sourceLineInfos = new Line.Info[] { new DataLine.Info( SourceDataLine.class, formats, StreamBufferAttributes.MIN_VALUE, @@ -327,6 +335,17 @@ public class PulseAudioMixer implements clips.add((PulseAudioClip) clip); return clip; } + + if ((info.getLineClass() == Port.class) ) { + Port.Info portInfo = (Port.Info) info; + if(portInfo.isSource()){ + return new PulseAudioSourcePort(portInfo.getName(), eventLoop); + } else { + return new PulseAudioTargetPort(portInfo.getName(), eventLoop); + } + } + + throw new IllegalArgumentException(); @@ -500,6 +519,23 @@ public class PulseAudioMixer implements @Override public void open() throws LineUnavailableException { openLocal(); + //the sourceLineInfo and targetLineInfo arrays need to be updated with + //port infos, which can only be obtained after EventLoop had started + + ArrayList sourceLineInfoList = new ArrayList(); + sourceLineInfoList.add(sourceLineInfos[0]); + for(String portName : eventLoop.updateSourcePortNameList()){ + sourceLineInfoList.add(new Port.Info(Port.class, portName, true)); + } + sourceLineInfos = sourceLineInfoList.toArray(new Line.Info[0]); + + ArrayList targetLineInfoList = new ArrayList(); + targetLineInfoList.add(targetLineInfos[0]); + for(String portName : eventLoop.updateTargetPortNameList()){ + targetLineInfoList.add(new Port.Info(Port.class, portName, false)); + } + targetLineInfos = targetLineInfoList.toArray(new Line.Info[0]); + } public void open(String appName, String host) throws UnknownHostException, @@ -650,16 +686,24 @@ public class PulseAudioMixer implements AudioInputStream audioInputStream = AudioSystem .getAudioInputStream(soundFile); AudioFormat audioFormat = audioInputStream.getFormat(); - + + SourceDataLine line; line = (SourceDataLine) mixer.getLine(new DataLine.Info( SourceDataLine.class, audioFormat)); line.open(); - System.out.println(line.getFormat().matches(audioFormat)); + Port.Info info = new Port.Info(Port.class, "alsa_output.pci_8086_24d5_sound_card_0_alsa_playback_0", false); + Port port = (Port) mixer.getLine(info); + FloatControl control = (FloatControl) port.getControl(FloatControl.Type.VOLUME); + control.getValue(); + control.setValue(0); + control.getValue(); + System.out.println(control.getValue()); mixer.close(); - - } + + } + void addSourceDataLine(PulseAudioSourceDataLine line) { sourceLines.add(line); diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java Wed Aug 27 14:22:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java Thu Aug 28 15:57:05 2008 -0400 @@ -39,10 +39,40 @@ package org.classpath.icedtea.pulseaudio import javax.sound.sampled.BooleanControl; -abstract class PulseAudioMuteControl extends BooleanControl { +class PulseAudioMuteControl extends BooleanControl { + + private PulseAudioVolumeControl volumeControl; + private PulseAudioPlaybackLine line; - protected PulseAudioMuteControl() { + protected PulseAudioMuteControl(PulseAudioPlaybackLine line, PulseAudioVolumeControl volumeControl) { super(BooleanControl.Type.MUTE, false, "Volume muted", "Volume on"); + this.volumeControl = volumeControl; + this.line = line; + } + + + + + + public synchronized void setValue(boolean value) { + if(!line.isOpen()) { + return; + } + + if (value == true) { + line.setMuted(true); + volumeControl.setStreamVolume(0); + } else { + line.setMuted(false); + float newValue = volumeControl.getValue(); + volumeControl.setStreamVolume(newValue); + } + } + + public synchronized boolean getValue() { + return line.isMuted(); + } + } -} + diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java Thu Aug 28 15:57:05 2008 -0400 @@ -0,0 +1,17 @@ +package org.classpath.icedtea.pulseaudio; + +interface PulseAudioPlaybackLine { + + public int native_setVolume(float value); + + boolean isMuted(); + + void setMuted(boolean mute); + + float getVolume(); + + void setVolume(float volume); + + boolean isOpen(); + +} diff -r 1a1a426b17cc -r f489a16be6f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Aug 27 14:22:14 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu Aug 28 15:57:05 2008 -0400 @@ -45,15 +45,16 @@ import javax.sound.sampled.DataLine; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.Port; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.Control.Type; public class PulseAudioSourceDataLine extends PulseAudioDataLine implements - SourceDataLine { + SourceDataLine, PulseAudioPlaybackLine{ private Control[] controls = null; - private PulseAudioStreamMuteControl muteControl; - private PulseAudioStreamVolumeControl volumeControl; + private PulseAudioMuteControl muteControl; + private PulseAudioVolumeControl volumeControl; private boolean muted; private float volume; @@ -65,44 +66,49 @@ public class PulseAudioSourceDataLine ex this.supportedFormats = formats; this.eventLoop = eventLoop; this.lineListeners = new ArrayList(); - this.volume = PulseAudioVolumeControl.MAX_VOLUME; this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; - - } - - protected boolean isMuted() { - return muted; - } - - protected void setMuted(boolean value) { - muted = value; - } - From iivan at town.yyz.redhat.com Thu Aug 28 13:16:30 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Thu, 28 Aug 2008 20:16:30 +0000 Subject: changeset in /hg/pulseaudio: added sourcePort Message-ID: changeset cf375df7c7b7 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=cf375df7c7b7 description: added sourcePort diffstat: 1 file changed, 92 insertions(+) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 92 ++++++++++ diffs (96 lines): diff -r f489a16be6f1 -r cf375df7c7b7 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Thu Aug 28 16:16:38 2008 -0400 @@ -0,0 +1,92 @@ +package org.classpath.icedtea.pulseaudio; + +import javax.sound.sampled.Control; +import javax.sound.sampled.LineListener; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.Port; +import javax.sound.sampled.Control.Type; + +public class PulseAudioSourcePort implements Port { + + private String name; + private long contextPointer; + private EventLoop eventLoop; + + public PulseAudioSourcePort(String name, EventLoop eventLoop) { + this.name = name; + this.contextPointer = eventLoop.getContextPointer(); + this.eventLoop = eventLoop; + System.out.println("Opened Source Port" + name); + } + + @Override + public void addLineListener(LineListener listener) { + // TODO Auto-generated method stub + } + + @Override + public void close() { + Operation operation; + + synchronized (eventLoop.threadLock) { + operation = new Operation(nativeClose()); + } + + operation.waitForCompletion(); + operation.releaseReference(); + + } + + private native int nativeClose(); + + @Override + public Control getControl(Type control) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Control[] getControls() { + // TODO Auto-generated method stub + return null; + } + + @Override + public javax.sound.sampled.Line.Info getLineInfo() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isControlSupported(Type control) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOpen() { + // TODO Auto-generated method stub + return false; + } + + @Override + public void open() throws LineUnavailableException { + Operation operation; + + synchronized (eventLoop.threadLock) { + operation = new Operation(nativeOpen()); + } + + operation.waitForCompletion(); + operation.releaseReference(); + } + + private native int nativeOpen(); + + @Override + public void removeLineListener(LineListener listener) { + // TODO Auto-generated method stub + + } + +} From mark at klomp.org Thu Aug 28 13:26:16 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 28 Aug 2008 22:26:16 +0200 Subject: changeset in /hg/pulseaudio: ports added In-Reply-To: References: Message-ID: <1219955176.23036.25.camel@hermans.wildebeest.org> Hi Ioana, On Thu, 2008-08-28 at 19:57 +0000, iivan at town.yyz.redhat.com wrote: > changeset f489a16be6f1 in /hg/pulseaudio > details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=f489a16be6f1 > description: > ports added Could you set "username" in your local ~/.hgrc file as follows under the [ui] section (or just add the below as is if you don't have a ~/.hgrc file yet)? That would help the icedtea hg server send correct emails and match your commits with your public address. ---- ~/.hgrc ---- [ui] username = Ioana Ivan ---- ---- See man hgrc (5) for lots and lots of other options to set. But the above should be enough. Thanks, Mark From Anthony.Petrov at Sun.COM Fri Aug 29 03:40:03 2008 From: Anthony.Petrov at Sun.COM (Anthony Petrov) Date: Fri, 29 Aug 2008 14:40:03 +0400 Subject: splashscreen.so is missing pnggccrd.c In-Reply-To: <1219944932.23036.3.camel@hermans.wildebeest.org> References: <1ccfd1c10808231744y3be4c6b9kd40f54d52c2d7102@mail.gmail.com> <48B28679.20900@sun.com> <1ccfd1c10808250917w1fd85e1ft58b73effb7bb8ec3@mail.gmail.com> <48B54D04.1000508@sun.com> <1ccfd1c10808271534u7d322619s2fd3682d70af3793@mail.gmail.com> <1219913471.3325.17.camel@hermans.wildebeest.org> <48B67C9C.9050502@sun.com> <1219944932.23036.3.camel@hermans.wildebeest.org> Message-ID: <48B7D203.6080607@sun.com> Hi Mark, On 08/28/2008 09:35 PM Mark Wielaard wrote: > On Thu, 2008-08-28 at 14:23 +0400, Anthony Petrov wrote: >> 1. The patch cuts off the embedded versions of these libraries from >> OpenJDK source code. In fact, there may exist systems where these >> libraries are not installed. And currently OpenJDK runs perfectly on >> these systems since it have the libraries compiled in. > Yes it does remove the upstream sources. But I admit to be slightly > confused about this practice of embedding upstream source code into your > own code repository. If we want to support static linking of libraries > wouldn't it be enough to configure and detect the static library .a > versions and link against those? This seems to be a very neat idea. I personally like it. But what about MS Windows builds? -- best regards, Anthony From omajid at redhat.com Fri Aug 29 13:26:28 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 29 Aug 2008 20:26:28 +0000 Subject: changeset in /hg/pulseaudio: 2008-08-29 Omair Majid changeset e99d53a7bcfa in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=e99d53a7bcfa description: 2008-08-29 Omair Majid * build.xml: Removed header generation for classes with no native methods. * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Parameterized {target,source}PortNameList. Gets rid of a few warnings. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (writeFrames): Commented out debug output. * src/java/org/claspath/icedtea/pulseaudio/PulseAudioSourcePort.java (addLineListener): Implemented method. (close): Commented out unimplemented stuff. (nativeClose): Changed return type to long (since it can return a 64 bit pointer). (getControl): Implemented function. (getControls): Likewise. (getName): New function. (isOpen): Implemented function. (open): Commented out unimplemented stuff. (nativeOpen): Changed return type to long. (removeLineListener): Implemented function. * src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c (Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_nativeClose): Added stub for future implementeation. (Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_nativeOpen): Likewise. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java (testPlayTwoClips): New function. Tests http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=173 . * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java (testSourceLinesExist): Fixed function to work with SourcePorts as well as SourceDataLines. (testTargetLinesExist): Fixed function to work with Target{Ports,DataLines}. (testSourceLinesOpenAndClose): Fixed to work with ports and sourcedatalines. (testTargetLinesOpenAndClose): Fixed to work with ports and target data lines. diffstat: 8 files changed, 148 insertions(+), 67 deletions(-) build.xml | 4 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 4 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 15 + src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 77 ++++++---- src/native/Makefile.am | 4 src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c | 25 +++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 31 ++++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 55 ++++--- diffs (417 lines): diff -r cf375df7c7b7 -r e99d53a7bcfa build.xml --- a/build.xml Thu Aug 28 16:16:38 2008 -0400 +++ b/build.xml Fri Aug 29 16:26:10 2008 -0400 @@ -38,12 +38,8 @@ - - - - diff -r cf375df7c7b7 -r e99d53a7bcfa src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Thu Aug 28 16:16:38 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Aug 29 16:26:10 2008 -0400 @@ -72,8 +72,8 @@ public class EventLoop implements Runnab public Semaphore finished = new Semaphore(0); - private List targetPortNameList = new ArrayList(); - private List sourcePortNameList = new ArrayList(); + private List targetPortNameList = new ArrayList(); + private List sourcePortNameList = new ArrayList(); /* * JNI stuff diff -r cf375df7c7b7 -r e99d53a7bcfa src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Aug 28 16:16:38 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Aug 29 16:26:10 2008 -0400 @@ -54,7 +54,8 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Control.Type; -public class PulseAudioClip extends PulseAudioDataLine implements Clip, PulseAudioPlaybackLine { +public class PulseAudioClip extends PulseAudioDataLine implements Clip, + PulseAudioPlaybackLine { private byte[] data = null; @@ -130,7 +131,7 @@ public class PulseAudioClip extends Puls Thread.currentThread().interrupt(); break; } - System.out.println("remaining frames" + remainingFrames); + // System.out.println("remaining frames" + remainingFrames); } } } @@ -213,7 +214,7 @@ public class PulseAudioClip extends Puls if (control.getClass() == BooleanControl.Type.MUTE.getClass()) { return controls.get(1); } - + if (control.getClass() == FloatControl.Type.VOLUME.getClass()) { return controls.get(0); } @@ -344,17 +345,17 @@ public class PulseAudioClip extends Puls PulseAudioVolumeControl volumeControl = new PulseAudioVolumeControl( this, eventLoop); - PulseAudioMuteControl muteControl = new PulseAudioMuteControl( - this, volumeControl); + PulseAudioMuteControl muteControl = new PulseAudioMuteControl(this, + volumeControl); controls.add(volumeControl); controls.add(muteControl); } - + public int native_setVolume(float value) { return stream.native_setVolume(value); } - + public boolean isMuted() { return muted; } diff -r cf375df7c7b7 -r e99d53a7bcfa src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Thu Aug 28 16:16:38 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Fri Aug 29 16:26:10 2008 -0400 @@ -1,4 +1,7 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; + +import java.util.LinkedList; +import java.util.List; import javax.sound.sampled.Control; import javax.sound.sampled.LineListener; @@ -7,48 +10,58 @@ import javax.sound.sampled.Control.Type; import javax.sound.sampled.Control.Type; public class PulseAudioSourcePort implements Port { - + private String name; + + @SuppressWarnings("unused") private long contextPointer; + private EventLoop eventLoop; - + + private boolean isOpen; + + private List lineListeners = new LinkedList(); + public PulseAudioSourcePort(String name, EventLoop eventLoop) { + System.out.println("new SourcePort constructed"); this.name = name; this.contextPointer = eventLoop.getContextPointer(); this.eventLoop = eventLoop; - System.out.println("Opened Source Port" + name); + System.out.println("Opened Source Port: " + name); } @Override public void addLineListener(LineListener listener) { - // TODO Auto-generated method stub + synchronized (lineListeners) { + lineListeners.add(listener); + } } @Override public void close() { Operation operation; - synchronized (eventLoop.threadLock) { - operation = new Operation(nativeClose()); - } +// synchronized (eventLoop.threadLock) { +// operation = new Operation(nativeClose()); +// } +// +// operation.waitForCompletion(); +// operation.releaseReference(); - operation.waitForCompletion(); - operation.releaseReference(); - + isOpen = false; } - - private native int nativeClose(); + + private native long nativeClose(); @Override public Control getControl(Type control) { - // TODO Auto-generated method stub - return null; + throw new IllegalArgumentException(control.toString() + + " not supported"); } @Override public Control[] getControls() { - // TODO Auto-generated method stub - return null; + return new Control[] {}; } @Override @@ -57,36 +70,44 @@ public class PulseAudioSourcePort implem return null; } + public String getName() { + return this.name; + + } + @Override public boolean isControlSupported(Type control) { - // TODO Auto-generated method stub return false; } @Override public boolean isOpen() { - // TODO Auto-generated method stub - return false; + return isOpen; } @Override public void open() throws LineUnavailableException { + System.out.println("SourcePort opened"); Operation operation; - synchronized (eventLoop.threadLock) { - operation = new Operation(nativeOpen()); - } +// synchronized (eventLoop.threadLock) { +// operation = new Operation(nativeOpen()); +// } +// +// operation.waitForCompletion(); +// operation.releaseReference(); - operation.waitForCompletion(); - operation.releaseReference(); + isOpen = true; } - - private native int nativeOpen(); + + private native long nativeOpen(); @Override public void removeLineListener(LineListener listener) { - // TODO Auto-generated method stub - + synchronized (lineListeners) { + lineListeners.remove(listener); + } + } } diff -r cf375df7c7b7 -r e99d53a7bcfa src/native/Makefile.am --- a/src/native/Makefile.am Thu Aug 28 16:16:38 2008 -0400 +++ b/src/native/Makefile.am Fri Aug 29 16:26:10 2008 -0400 @@ -9,10 +9,10 @@ libpulse_java_la_SOURCES = \ org_classpath_icedtea_pulseaudio_Operation.c \ org_classpath_icedtea_pulseaudio_Stream.c \ org_classpath_icedtea_pulseaudio_Stream.h \ + org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.h \ org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c \ - org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.h \ org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c \ - org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.h + org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.h diff -r cf375df7c7b7 -r e99d53a7bcfa src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c Fri Aug 29 16:26:10 2008 -0400 @@ -0,0 +1,25 @@ +#include "org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.h" + +#include "jni-common.h" + +/* + * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourcePort + * Method: nativeClose + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_nativeClose +(JNIEnv* env, jobject obj) { + return convertPointerToJavaLong(NULL); +} + +/* + * Class: org_classpath_icedtea_pulseaudio_PulseAudioSourcePort + * Method: nativeOpen + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioSourcePort_nativeOpen +(JNIEnv* env, jobject obj) { + return convertPointerToJavaLong(NULL); + +} + diff -r cf375df7c7b7 -r e99d53a7bcfa unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Thu Aug 28 16:16:38 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java Fri Aug 29 16:26:10 2008 -0400 @@ -184,6 +184,37 @@ public class PulseAudioClipTest { } + /* + * + * modified version of the sample code at + * http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=173 + * + */ + + @Test + public void testPlayTwoClips() { + try { + Clip clip1 = (Clip) mixer.getLine(new Line.Info(Clip.class)); + File soundFile1 = new File("testsounds/startup.wav"); + AudioInputStream audioInputStream1 = AudioSystem + .getAudioInputStream(soundFile1); + clip1.open(audioInputStream1); + + Clip clip2 = (Clip) mixer.getLine(new Line.Info(Clip.class)); + File soundFile2 = new File("testsounds/logout.wav"); + AudioInputStream audioInputStream2 = AudioSystem + .getAudioInputStream(soundFile2); + clip2.open(audioInputStream2); + + clip1.start(); + clip2.start(); + + } catch (Exception e) { + e.printStackTrace(); + } + + } + @After public void tearDown() { diff -r cf375df7c7b7 -r e99d53a7bcfa unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Thu Aug 28 16:16:38 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Fri Aug 29 16:26:10 2008 -0400 @@ -49,7 +49,6 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.Port; -import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; import junit.framework.JUnit4TestAdapter; @@ -62,6 +61,9 @@ public class PulseAudioMixerTest { public class PulseAudioMixerTest { PulseAudioMixer selectedMixer; + + AudioFormat aSupportedFormat = new AudioFormat( + AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); public static junit.framework.Test suite() { return new JUnit4TestAdapter(PulseAudioMixerTest.class); @@ -152,9 +154,8 @@ public class PulseAudioMixerTest { for (Line.Info lineInfo : allLineInfo) { System.out.println("Source Line " + j++ + ": " + lineInfo.getLineClass()); - SourceDataLine sourceDataLine = (SourceDataLine) selectedMixer - .getLine(lineInfo); - assertNotNull(sourceDataLine); + Line sourceLine = (Line) selectedMixer.getLine(lineInfo); + assertNotNull(sourceLine); } @@ -170,9 +171,8 @@ public class PulseAudioMixerTest { for (Line.Info lineInfo : allLineInfo) { System.out.println("Target Line " + j++ + ": " + lineInfo.getLineClass()); - TargetDataLine targetDataLine = (TargetDataLine) selectedMixer - .getLine(lineInfo); - assertNotNull(targetDataLine); + Line targetLine = (Line) selectedMixer.getLine(lineInfo); + assertNotNull(targetLine); } @@ -263,17 +263,17 @@ public class PulseAudioMixerTest { System.out.println("This test checks if source lines open and close"); selectedMixer.open(); - AudioFormat wantedFormat = new AudioFormat( - AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); - Line.Info allLineInfo[] = selectedMixer.getSourceLineInfo(); for (Line.Info lineInfo : allLineInfo) { - SourceDataLine sourceDataLine = (SourceDataLine) selectedMixer - .getLine(lineInfo); + Line sourceLine = (Line) selectedMixer.getLine(lineInfo); System.out.println("opening line"); - sourceDataLine.open(wantedFormat); - System.out.println("closing line"); - sourceDataLine.close(); + try { + sourceLine.open(); + System.out.println("closing line"); + sourceLine.close(); + } catch (IllegalArgumentException e) { + assert (sourceLine.getClass() == PulseAudioClip.class); + } } } @@ -282,17 +282,24 @@ public class PulseAudioMixerTest { System.out.println("This test checks if source lines open and close"); selectedMixer.open(); - AudioFormat wantedFormat = new AudioFormat( - AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 10, true); - Line.Info allLineInfo[] = selectedMixer.getTargetLineInfo(); for (Line.Info lineInfo : allLineInfo) { - TargetDataLine targetDataLine = (TargetDataLine) selectedMixer - .getLine(lineInfo); - System.out.println("opening line"); - targetDataLine.open(wantedFormat); - System.out.println("closing line"); - targetDataLine.close(); + try { + TargetDataLine targetLine = (TargetDataLine) selectedMixer + .getLine(lineInfo); + Assert.assertNotNull(targetLine); + System.out.println("opening line"); + targetLine.open(aSupportedFormat); + System.out.println("closing line"); + targetLine.close(); + } catch (ClassCastException cce) { + Port targetLine = (Port) selectedMixer.getLine(lineInfo); + Assert.assertNotNull(targetLine); + targetLine.open(); + System.out.println("closing line"); + targetLine.close(); + } + } } From gnu_andrew at member.fsf.org Fri Aug 29 18:39:12 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sat, 30 Aug 2008 02:39:12 +0100 Subject: Support BSD and Caciocavallo Message-ID: <17c6771e0808291839y2a26b031pd4cb226c8facb51c@mail.gmail.com> This patch adds support for downloading the BSD and Caciocavallo trees to IcedTea. You can choose a project using --with-project and a value of jdk7 (the default), closures, cvmi, caciocavallo and bsd to select a tree. It currently only makes a difference if you also add --enable-hg; the two are separated so additional project-specific rules can be added. I tried building the caciocavallo and closures trees but the IcedTea patches need some work to apply cleanly (presumably because these trees are based on older build drops). 2008-08-30 Andrew John Hughes * Makefile.am: Add BSD and Caciocavallo URLs. * acinclude.m4: (WITH_PROJECT): Added. (ENABLE_OTHER_PROJECTS): Converted to WITH_PROJECT. * configure.ac: Support building with BSD and Caciocavallo projects via --with-project. Note that jdk7 is now finally at b33, just as b34 comes out... Bedtime, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: projects-01.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080830/5c98ce41/projects-01.diff From cky944 at gmail.com Sat Aug 30 17:40:43 2008 From: cky944 at gmail.com (C. K. Jester-Young) Date: Sun, 31 Aug 2008 12:40:43 +1200 Subject: [patch] Support New NIO in IcedTea Message-ID: <20080831004043.GA19370@bamboo.destinee.acro.gen.nz> Attached is my patch for building New NIO [1] (aka NIO2) on IcedTea. Many thanks to Andrew John Hughes for the -b33 patches for IcedTea, and for the --with-project support; these helped cut down the size of my patch by two-thirds. :-) The main ``meat'' of the patch is icedtea-nio2-genfiles.patch; this patches up the pre-generated NIO files so that they reflect the changes made in the NIO2 repository. As I'm writing this, I'm currently building against nio2-b94; I have got these patches working with nio2-b93 in the past, so if the -b94 build breaks, I'll send more patches. Meanwhile, hopefully this gives readers something to play with. :-) I'm not entirely sure of the legal requirements for patches to be accepted into IcedTea. I have already signed the SCA, so if that's all that's needed, then that's great! Many thanks, ---Chris K. [1] http://openjdk.java.net/projects/nio/ -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-nio2-20080831.diff Type: text/x-diff Size: 11950 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080831/4038223c/icedtea-nio2-20080831.diff From gnu_andrew at member.fsf.org Sat Aug 30 19:23:55 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 31 Aug 2008 03:23:55 +0100 Subject: [patch] Support New NIO in IcedTea In-Reply-To: <20080831004043.GA19370@bamboo.destinee.acro.gen.nz> References: <20080831004043.GA19370@bamboo.destinee.acro.gen.nz> Message-ID: <17c6771e0808301923r4314d81bgc0a6ccc057da10fb@mail.gmail.com> On 31/08/2008, C. K. Jester-Young wrote: > Attached is my patch for building New NIO [1] (aka NIO2) on IcedTea. > Many thanks to Andrew John Hughes for the -b33 patches for IcedTea, and > for the --with-project support; these helped cut down the size of my > patch by two-thirds. :-) > Glad you found it useful! > The main ``meat'' of the patch is icedtea-nio2-genfiles.patch; this > patches up the pre-generated NIO files so that they reflect the changes > made in the NIO2 repository. > > As I'm writing this, I'm currently building against nio2-b94; I have got > these patches working with nio2-b93 in the past, so if the -b94 build > breaks, I'll send more patches. Meanwhile, hopefully this gives readers > something to play with. :-) > Great! The patch mostly looks good, but haven't had a chance to test it yet. Will try to tomorrow. > I'm not entirely sure of the legal requirements for patches to be > accepted into IcedTea. I have already signed the SCA, so if that's all > that's needed, then that's great! > Well the SCA is for OpenJDK + Sun, but its helpful for IcedTea hackers to also have this as patches can then be sent upstream more easily. I know myself and the RedHat hackers have signed, but not sure of some of the newer members of the IcedTea team. The main thing is to not break things and make the other IcedTea hackers cry ;) I'll leave you in the very capable hands of Mark Wielaard for the finer details... > Many thanks, > ---Chris K. > > [1] http://openjdk.java.net/projects/nio/ > > Cheers, -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Sun Aug 31 07:31:00 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 31 Aug 2008 16:31:00 +0200 Subject: Support BSD and Caciocavallo In-Reply-To: <17c6771e0808291839y2a26b031pd4cb226c8facb51c@mail.gmail.com> References: <17c6771e0808291839y2a26b031pd4cb226c8facb51c@mail.gmail.com> Message-ID: <1220193060.3524.12.camel@hermans.wildebeest.org> Hi Andrew, On Sat, 2008-08-30 at 02:39 +0100, Andrew John Hughes wrote: > This patch adds support for downloading the BSD and Caciocavallo trees > to IcedTea. > You can choose a project using --with-project and a value of jdk7 (the > default), closures, cvmi, caciocavallo and bsd to select a tree. Heay, that is super cool! > It currently only makes > a difference if you also add --enable-hg; the two are separated so > additional project-specific rules can be added. I immediately fell into the "--enable-hg trap" by forgetting it. I think it makes sense to either make that the default if --with-project=x is given and project x needs a hg repo pull, or at least fail the configure/build step. > I tried building the > caciocavallo and closures trees but the IcedTea patches need some work > to apply cleanly (presumably because these trees are based on older > build drops). Yeah, this might be a bit of a pain to keep current. Either the projects supported need to sync often enough or we need to differentiate our patches. Neither is really that attractive. The best thing would probably be for us to help these projects get pushed into the main jdk7 tree sooner. > 2008-08-30 Andrew John Hughes > > * Makefile.am: Add BSD and Caciocavallo URLs. > * acinclude.m4: > (WITH_PROJECT): Added. > (ENABLE_OTHER_PROJECTS): Converted to WITH_PROJECT. > * configure.ac: Support building with BSD > and Caciocavallo projects via --with-project. > > Note that jdk7 is now finally at b33, just as b34 comes out... You managed to push this without generating a commit message. I cannot figure out why that is. Do you have any idea how you got this commit in "under the hgext.notify radar"? Cheers, Mark From mark at klomp.org Sun Aug 31 07:41:33 2008 From: mark at klomp.org (Mark Wielaard) Date: Sun, 31 Aug 2008 16:41:33 +0200 Subject: [patch] Support New NIO in IcedTea In-Reply-To: <20080831004043.GA19370@bamboo.destinee.acro.gen.nz> References: <20080831004043.GA19370@bamboo.destinee.acro.gen.nz> Message-ID: <1220193693.3524.24.camel@hermans.wildebeest.org> Hi Chris, On Sun, 2008-08-31 at 12:40 +1200, C. K. Jester-Young wrote: > Attached is my patch for building New NIO [1] (aka NIO2) on IcedTea. > Many thanks to Andrew John Hughes for the -b33 patches for IcedTea, and > for the --with-project support; these helped cut down the size of my > patch by two-thirds. :-) > > The main ``meat'' of the patch is icedtea-nio2-genfiles.patch; this > patches up the pre-generated NIO files so that they reflect the changes > made in the NIO2 repository. Nice idea. I wasn't aware that NIO2 was progressing already. I now see that my ignorance was partly because it seems this work is done in the nio/nio forest instead of in the jdk7/nio2 forest. Do you know how they relate? Also, how do you keep track of which commits are really nio2 related and which ones are the commits that just sync with the master jdk7 repo? It would be nice to have an easy way to see just those changes/commits made for the new nio support. > As I'm writing this, I'm currently building against nio2-b94; I have got > these patches working with nio2-b93 in the past, so if the -b94 build > breaks, I'll send more patches. Meanwhile, hopefully this gives readers > something to play with. :-) Do you need any special tag to get that tag? While building with your patch applied and doing just: autoreconf --force --install \ && ./configure --enable-hg --with-project=nio2 \ && make I got: /home/mark/src/icedtea/bootstrap/jdk1.6.0/bin/javac -g \ -d lib/hotspot-tools \ -source 1.5 \ -sourcepath \ 'hotspot-tools:openjdk/jdk/src/share/classes:openjdk/jdk/src/solaris/classes:openjdk/langtools/src/share/classes:openjdk/jaxp/src/share/classes:openjdk/corba/src/share/classes:openjdk/jaxws/src/share/classes:/home/mark/src/icedtea/generated:/home/mark/src/icedtea/rt' \ -bootclasspath '' @hotspot-tools-source-files.txt ; \ fi incorrect classpath: hotspot-tools/com/sun/codemodel/internal/ClassType.java ---------- 1. ERROR in /home/mark/src/icedtea/openjdk/jdk/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java (at line 144) public void disableInterruptor(AbstractInterruptibleChannel ch) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method disableInterruptor(AbstractInterruptibleChannel) of type new JavaNioChannelsSpiAccess(){} must override a superclass method ---------- 1 problem (1 error)make: *** [stamps/hotspot-tools-class-files.stamp] Error 255 Did I get the wrong nio tree, or did I apply the patch wrongly? > I'm not entirely sure of the legal requirements for patches to be > accepted into IcedTea. I have already signed the SCA, so if that's all > that's needed, then that's great! There are no real legal requirements except for making sure every contribution is free software. But it is encouraged to push anything upstream into openjdk of course to keep divergence as low as possible. Thanks for working on this, nio2 is very exciting. Cheers, Mark From gnu_andrew at member.fsf.org Sun Aug 31 13:01:56 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 31 Aug 2008 21:01:56 +0100 Subject: Support BSD and Caciocavallo In-Reply-To: <1220193060.3524.12.camel@hermans.wildebeest.org> References: <17c6771e0808291839y2a26b031pd4cb226c8facb51c@mail.gmail.com> <1220193060.3524.12.camel@hermans.wildebeest.org> Message-ID: <17c6771e0808311301x7c7281a5od6ae9a8cbc35084a@mail.gmail.com> On 31/08/2008, Mark Wielaard wrote: > Hi Andrew, > > > On Sat, 2008-08-30 at 02:39 +0100, Andrew John Hughes wrote: > > This patch adds support for downloading the BSD and Caciocavallo trees > > to IcedTea. > > You can choose a project using --with-project and a value of jdk7 (the > > default), closures, cvmi, caciocavallo and bsd to select a tree. > > > Heay, that is super cool! > > :) > > It currently only makes > > a difference if you also add --enable-hg; the two are separated so > > additional project-specific rules can be added. > > > I immediately fell into the "--enable-hg trap" by forgetting it. I think > it makes sense to either make that the default if --with-project=x is > given and project x needs a hg repo pull, or at least fail the > configure/build step. > Attached patch fixes this: 2008-08-31 Andrew John Hughes * Makefile.am: Make enabling hg-only projects sufficient for downloading from hg. This does mean I had to separate out the hg forest check so it wasn't duplicated. > > > I tried building the > > caciocavallo and closures trees but the IcedTea patches need some work > > to apply cleanly (presumably because these trees are based on older > > build drops). > > > Yeah, this might be a bit of a pain to keep current. Either the projects > supported need to sync often enough or we need to differentiate our > patches. Neither is really that attractive. The best thing would > probably be for us to help these projects get pushed into the main jdk7 > tree sooner. > Some patches are more prone to this than others, or, in other words, there are some patches that break with just about every build drop as well. I'll try and clean some of them up so they are less prone to this. Notably, I think most of patches/icedtea-copy-plugs.patch should be part of icedtea-ecj.patch and the rest should be dropped. It would also be nice to split up icedtea-ecj as it covers a lot of issues at present, for which the only relationship is that they fix breakages that only occur with an ecj + GNU Classpath build. > > > 2008-08-30 Andrew John Hughes > > > > * Makefile.am: Add BSD and Caciocavallo URLs. > > * acinclude.m4: > > (WITH_PROJECT): Added. > > (ENABLE_OTHER_PROJECTS): Converted to WITH_PROJECT. > > * configure.ac: Support building with BSD > > and Caciocavallo projects via --with-project. > > > > Note that jdk7 is now finally at b33, just as b34 comes out... > > > You managed to push this without generating a commit message. I cannot > figure out why that is. Do you have any idea how you got this commit in > "under the hgext.notify radar"? > Something is broken: remote: added 1 changesets with 2 changes to 2 files remote: error: incoming.notify hook raised an exception: cannot concatenate 'str' and 'NoneType' objects But at least it means merges are quiet ;) > Cheers, > > > Mark > > -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: no_enable_hg.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080831/5b74448a/no_enable_hg.diff From cky944 at gmail.com Sun Aug 31 22:50:58 2008 From: cky944 at gmail.com (C. K. Jester-Young) Date: Mon, 1 Sep 2008 17:50:58 +1200 Subject: Support BSD and Caciocavallo In-Reply-To: <17c6771e0808311301x7c7281a5od6ae9a8cbc35084a@mail.gmail.com> References: <17c6771e0808291839y2a26b031pd4cb226c8facb51c@mail.gmail.com> <1220193060.3524.12.camel@hermans.wildebeest.org> <17c6771e0808311301x7c7281a5od6ae9a8cbc35084a@mail.gmail.com> Message-ID: <20080901055058.GB19370@bamboo.destinee.acro.gen.nz> Hi Andrew, On Sun, Aug 31, 2008 at 09:01:56PM +0100, Andrew John Hughes wrote: > 2008-08-31 Andrew John Hughes > > * Makefile.am: > Make enabling hg-only projects sufficient for > downloading from hg. > > This does mean I had to separate out the hg forest check so it wasn't > duplicated. I like the idea of the fix, though I think the way it's implemented doesn't do what's intended, and is additionally a maintenance hassle whenever new Mercurial repositories are added. Looking at the forest test, it only applies if !OPENJDK_SRC_DIR_FOUND && !USE_ALT_OPENJDK_SRC_ZIP && USE_HG && USE_CLOSURES && USE_CVMI && USE_CACIOCAVALLO && USE_BSD. In other words, this test will never be invoked. I propose an alternative patch, that simply turns --enable-hg on if --with-project != jdk7. The main caveat is now that the --with-project stuff must appear before the --enable-hg. But other than that, I think that this is more robust and easier to maintain, and I hope it works for you too. :-) Many thanks, ---Chris K. -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-implicit-enable-hg.diff Type: text/x-diff Size: 685 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20080901/c503d6d2/icedtea-implicit-enable-hg.diff From cky944 at gmail.com Sun Aug 31 23:49:00 2008 From: cky944 at gmail.com (C. K. Jester-Young) Date: Mon, 1 Sep 2008 18:49:00 +1200 Subject: [patch] Support New NIO in IcedTea In-Reply-To: <1220193693.3524.24.camel@hermans.wildebeest.org> References: <20080831004043.GA19370@bamboo.destinee.acro.gen.nz> <1220193693.3524.24.camel@hermans.wildebeest.org> Message-ID: <20080901064900.GC19370@bamboo.destinee.acro.gen.nz> Hi Mark, On Sun, Aug 31, 2008 at 04:41:33PM +0200, Mark Wielaard wrote: > Nice idea. I wasn't aware that NIO2 was progressing already. I now see > that my ignorance was partly because it seems this work is done in the > nio/nio forest instead of in the jdk7/nio2 forest. Do you know how they > relate? Looking at the jdk7/nio2, the last push was in February. The current nio2 stuff seemed to have been established in April (see, e.g., [1]), by different parties. But I'm not involved in NIO2 currently, let alone back then, so I can't really say anything. [1] http://mail.openjdk.java.net/pipermail/nio-dev/2008-April/000001.html > Also, how do you keep track of which commits are really nio2 related and > which ones are the commits that just sync with the master jdk7 repo? It > would be nice to have an easy way to see just those changes/commits made > for the new nio support. Yes, I'm much wondering about the same question myself. One of my aspirations is to have an IcedTea build that incorporates multiple projects simultaneously (NIO2, MLVM/Da Vinci Machine, and BGGA Closures are three of the ones I have an interest in), and being able to work with _just_ the diffs would be nice. On that note, the MLVM project works as a set of patches against the mainline jdk7 code (although I have had some success applying it against the NIO2 code too). It uses the Mercurial mq extension for doing all the patching, and patches can be marked as being for specific releases of jdk7, for example. > Do you need any special tag to get that tag? While building with your > patch applied and doing just: > autoreconf --force --install \ > && ./configure --enable-hg --with-project=nio2 \ > && make The tip revision is, at the time of writing, at -b94. I successfully built with the supplied patches on Ubuntu 8.04, on amd64. Just to test portability, I'm now building within a 32-bit chroot, just to see if it works correctly there too. (This process is a notorious PITA; I've had to write a fakeuname.so to ``convince'' the build tools that I'm building on a 32-bit machine, because some of the scripts don't respect the --build option that I sent to configure.) Here are the configure arguments I used: ./configure --with-openjdk --with-openjdk-home=/usr/lib/jvm/java-6-openjdk \ --enable-hg --with-project=nio2 In other words, I'm building with OpenJDK 6 as supplied with Ubuntu. (With the icedtea-implicit-enable-hg.diff I recently sent, that makes the --enable-hg option redundant. My patch is, by the way, designed to be applied to IcedTea revision 1158.) I noticed from your build output that you're also using 1.6 javac for bootstrapping; is that a Sun build, or from IcedTea? Should it make a difference? > I got: > /home/mark/src/icedtea/bootstrap/jdk1.6.0/bin/javac -g \ > -d lib/hotspot-tools \ > -source 1.5 \ > -sourcepath \ > 'hotspot-tools:openjdk/jdk/src/share/classes:openjdk/jdk/src/solaris/classes:openjdk/langtools/src/share/classes:openjdk/jaxp/src/share/classes:openjdk/corba/src/share/classes:openjdk/jaxws/src/share/classes:/home/mark/src/icedtea/generated:/home/mark/src/icedtea/rt' \ > -bootclasspath '' @hotspot-tools-source-files.txt ; \ > fi > incorrect classpath: hotspot-tools/com/sun/codemodel/internal/ClassType.java This is very odd. The first line in hotspot-tools-source-files.txt is indeed hotspot-tools/com/sun/codemodel/internal/ClassType.java, which means that whatever make system you have is not passing the '' argument before it. Either that, or the javac you have is disregarding it. > 1. ERROR in /home/mark/src/icedtea/openjdk/jdk/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java (at line 144) > public void disableInterruptor(AbstractInterruptibleChannel ch) { > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > The method disableInterruptor(AbstractInterruptibleChannel) of type new JavaNioChannelsSpiAccess(){} must override a superclass method This is to do with your javac too. Some compilers support the @Override annonation being applied to interface methods, it seems, whereas other ones don't. I haven't quite figured out which ones do/don't allow it. I remember seeing some IcedTea patches whose sole purpose is to remove @Override annotations that would choke some compilers. However, since I don't have such a compiler, working out which @Override annotation to remove would be difficult task, since I presume the best way to find them is by trial and error. :-) > Did I get the wrong nio tree, or did I apply the patch wrongly? No, and no, it seems. :-) > There are no real legal requirements except for making sure every > contribution is free software. But it is encouraged to push anything > upstream into openjdk of course to keep divergence as low as possible. Cool, thanks for the clarification! > Thanks for working on this, nio2 is very exciting. No worries, and yes, I'm totally keen to get this working on IcedTea! Many thanks, ---Chris K.