From mvfranz at gmail.com Sun Mar 1 07:38:46 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 1 Mar 2009 10:38:46 -0500 Subject: JAR_KNOWS_ATFILE for BSD Project on OS X Message-ID: Hi, I am having problems getting this to work when not building using an OpenJDK (Apples JDK 5). I have also not been able to find any documentation on this. Does anyone have a link for this? This is the only part of the build I have not been able to get to work cleanly when building Zero on the BSD-Port repo using OS X. One other issue I is getting /opt/local/include and /opt/local/lib into the build. I have defined CFLAGS/CXXFLAGS/CPPFLAGS/INCLUDES/LIBS (different combinations) and they all fix parts of the build but break others. What is the proper way to add and include and link directory? Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090301/fab27967/attachment.html From mvfranz at gmail.com Sun Mar 1 14:08:24 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 1 Mar 2009 17:08:24 -0500 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: References: Message-ID: Hi All, I have been able to compile IcedTea7 (changeset 1563 - January 28, 2009) using a modified version of the bsd-port repo (changeset 58 - January 22, 2009) with zero. I have used Apple's 1.5 JDK and parts of gcc 4.3 (gjavah). java version "1.7.0_0-bsd" IcedTea 1.9-pre-r70396cb4abf8 Runtime Environment (build 1.7.0_0-bsd-b44) OpenJDK Core VM (build 14.0-b10, interpreted mode) This is not a smooth process as I have some manual steps that I have not been able to figure out. What is the best way to integrate the necessary changes into IcedTea 7? Michael On Tue, Feb 3, 2009 at 9:27 PM, Michael Franz wrote: > Hi, > > Taking a different approach to getting IcedTea 7 to compile on OS X, I am > trying to get the bsd repo to compile on Linux (Fedora 10). In > investigating the patching problems closer, I wonder if this seems like a > sound plan. > > 1. Identify the patches that break > 2. move failing patches out of the main patch file into a project specific > patch file > 3. create equivalent patches for bsd > 4. change the patch process to use base patches and then the project > specific patches > > An example of this is icedtea-libraries.patch. > There are 8 patches within this file that fail on the bsd repo. I would > move these patches into icedtea-libraries-linux.patch (should this be jdk7?) > and create bsd specific patches that are then put into > icedtea-libraries-bsd.patch. > > The patch process can then apply the patches in icedtea-libraries.patch and > then icedtea-libraries-.patch. > > On a similar note, I have found that icedtea-libraries.patch and > icedtea-linker-options.patch are patching the same line in > jdk/make/common/Program.gmk. > > first > - LDFLAGS += -z origin > + LDFLAGS += -lz -z origin > > then > > - LDFLAGS += -lz -z origin > + LDFLAGS += -lz -Wl, -z -Wl,origin > > Is there a benefit to patching the same line twice (keeping logical changes > together)? > > Michael > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090301/96c77e3e/attachment.html From gnu_andrew at member.fsf.org Sun Mar 1 15:52:16 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 1 Mar 2009 23:52:16 +0000 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: References: Message-ID: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> 2009/3/1 Michael Franz : > Hi All, > > I have been able to compile IcedTea7 (changeset 1563 - January 28, 2009) > using a modified version of the bsd-port repo (changeset 58 - January 22, > 2009) with zero.? I have used Apple's 1.5 JDK and parts of gcc 4.3 > (gjavah). > > java version "1.7.0_0-bsd" > IcedTea 1.9-pre-r70396cb4abf8 Runtime Environment (build 1.7.0_0-bsd-b44) > OpenJDK Core VM (build 14.0-b10, interpreted mode) > > This is not a smooth process as I have some manual steps that I have not > been able to figure out. > > What is the best way to integrate the necessary changes into IcedTea 7? > > Michael > > On Tue, Feb 3, 2009 at 9:27 PM, Michael Franz wrote: >> >> Hi, >> >> Taking a different approach to getting IcedTea 7 to compile on OS X, I am >> trying to get the bsd repo to compile on Linux (Fedora 10).? In >> investigating the patching problems closer, I wonder if this seems like a >> sound plan. >> >> 1. Identify the patches that break >> 2. move failing patches out of the main patch file into a project specific >> patch file >> 3. create equivalent patches for bsd >> 4. change the patch process to use base patches and then the project >> specific patches >> >> An example of this is icedtea-libraries.patch. >> There are 8 patches within this file that fail on the bsd repo.? I would >> move these patches into icedtea-libraries-linux.patch (should this be jdk7?) >> and create bsd specific patches that are then put into >> icedtea-libraries-bsd.patch. >> >> The patch process can then apply the patches in icedtea-libraries.patch >> and then icedtea-libraries-.patch. >> >> On a similar note, I have found that icedtea-libraries.patch and >> icedtea-linker-options.patch are patching the same line in >> jdk/make/common/Program.gmk. >> >> first >> -???? LDFLAGS += -z origin >> +???? LDFLAGS += -lz -z origin >> >> then >> >> -???? LDFLAGS += -lz -z origin >> +???? LDFLAGS += -lz -Wl, -z -Wl,origin >> >> Is there a benefit to patching the same line twice (keeping logical >> changes together)? >> >> Michael >> > > Nice work! Start sending us patches for approval :) -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Sun Mar 1 15:53:13 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 1 Mar 2009 23:53:13 +0000 Subject: JAR_KNOWS_ATFILE for BSD Project on OS X In-Reply-To: References: Message-ID: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> 2009/3/1 Michael Franz : > Hi, > > I am having problems getting this to work when not building using an OpenJDK > (Apples JDK 5).? I have also not been able to find any documentation on > this.? Does anyone have a link for this?? This is the only part of the build > I have not been able to get to work cleanly when building Zero on the > BSD-Port repo using OS X. > > One other issue I is getting /opt/local/include and /opt/local/lib into the > build.? I have defined CFLAGS/CXXFLAGS/CPPFLAGS/INCLUDES/LIBS (different > combinations) and they all fix parts of the build but break others.? What is > the proper way to add and include and link directory? > > Michael > It was added by Matthias I believe, and is related to the configure check as to whether jar supports @file arguments or not. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Sun Mar 1 17:13:41 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 02 Mar 2009 01:13:41 +0000 Subject: [Bug 255] label display in swing ui elements needs (inappropriate) additional vertical space Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=255 carlos at memoriapersistente.pt changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlos at memoriapersistente.pt Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #7 from carlos at memoriapersistente.pt 2009-03-02 01:13 ------- As I reported at Launchpad (https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255983/comments/45) the bug persists in Jaunty (at least, with my locale settings: pt_PT.UTF-8). -- 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 mvfranz at gmail.com Sun Mar 1 17:13:59 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 1 Mar 2009 20:13:59 -0500 Subject: Patch to add BSD family to IcedTea7 configure Message-ID: Hi, Please apply the following patch to IcedTea7 to allow the initial support for bsd. Michael diff -r 5bda1b46a64f acinclude.m4 --- a/acinclude.m4 Fri Feb 20 14:50:00 2009 +0000 +++ b/acinclude.m4 Sun Mar 01 20:00:51 2009 -0500 @@ -77,6 +77,10 @@ BUILD_OS_DIR=solaris OS_PATH=/opt/SunStudioExpress/bin:/opt/SUNWpro/bin:/usr/gnu/bin ;; + *darwin*|*bsd*) + BUILD_OS_DIR=bsd + OS_PATH= + ;; *) AC_MSG_ERROR([unsupported operating system ${host_os}]) ;; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090301/5fe960d5/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: acinclude-m4.patch Type: application/octet-stream Size: 413 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090301/5fe960d5/acinclude-m4.patch From bugzilla-daemon at icedtea.classpath.org Sun Mar 1 17:25:09 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 02 Mar 2009 01:25:09 +0000 Subject: [Bug 255] label display in swing ui elements needs (inappropriate) additional vertical space Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=255 ------- Comment #8 from carlos at memoriapersistente.pt 2009-03-02 01:25 ------- Created an attachment (id=168) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=168&action=view) The look with Sun Java and OpenJDK See https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255983 -- 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 mvfranz at gmail.com Sun Mar 1 18:11:23 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 1 Mar 2009 21:11:23 -0500 Subject: JAR_KNOWS_ATFILE for BSD Project on OS X In-Reply-To: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> References: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> Message-ID: On Sun, Mar 1, 2009 at 6:53 PM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/3/1 Michael Franz : > > Hi, > > > > I am having problems getting this to work when not building using an > OpenJDK > > (Apples JDK 5). I have also not been able to find any documentation on > > this. Does anyone have a link for this? This is the only part of the > build > > I have not been able to get to work cleanly when building Zero on the > > BSD-Port repo using OS X. > > > > One other issue I is getting /opt/local/include and /opt/local/lib into > the > > build. I have defined CFLAGS/CXXFLAGS/CPPFLAGS/INCLUDES/LIBS (different > > combinations) and they all fix parts of the build but break others. What > is > > the proper way to add and include and link directory? > > > > Michael > > > > It was added by Matthias I believe, and is related to the configure > check as to whether jar supports @file arguments or not. > -- > Andrew :-) > > Which jar implementations support this? The man pages for OS X and Fedora do not mention this. I endup removing the '@' since it does not work Apple's jar and I don't think gjar supports it either. The problem then becomes that the arg list is too long. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090301/454f0b64/attachment.html From mark at klomp.org Mon Mar 2 01:35:39 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 02 Mar 2009 10:35:39 +0100 Subject: How to host HS14 stable? (Was: RFC: Change name of default HotSpot to 'default') In-Reply-To: <17c6771e0902200842l15c7b892rcd352de3286aafbd@mail.gmail.com> References: <20090212150029.GA1121@rivendell.middle-earth.co.uk> <17c6771e0902151453t523b15derfc243ffaa201264f@mail.gmail.com> <1234768690.24153.28.camel@localhost.localdomain> <1234772748.3612.3.camel@hermans.wildebeest.org> <1234774554.11228.3.camel@localhost.localdomain> <1234862105.4062.8.camel@fedora.wildebeest.org> <1234950462.2322.9.camel@fedora.wildebeest.org> <1234951783.5094.17.camel@localhost.localdomain> <1235035430.3597.14.camel@hermans.wildebeest.org> <17c6771e0902200842l15c7b892rcd352de3286aafbd@mail.gmail.com> Message-ID: <1235986539.2306.10.camel@fedora.wildebeest.org> Hi Andrew, On Fri, 2009-02-20 at 16:42 +0000, Andrew John Hughes wrote: > 2009/2/19 Mark Wielaard : > > On Wed, 2009-02-18 at 11:09 +0100, Christian Thalinger wrote: > >> On Wed, 2009-02-18 at 10:47 +0100, Mark Wielaard wrote: > >> > Yes, my plan was to branch at the commit just before the HS15 tag in > >> > jdk7/jdk7/hotspot appeared. But it would be good to get confirmation > >> > that is the right branch point. > >> > >> I can look that up again... The changeset right before the fork is: > >> > >> fc6a5ae3fef5 > >> > >> which bumps the HotSpot version to 14.0-b10. > > > > Thanks. I am waiting for Joe to reveal the open hs14 repo that he wants > > to base openjdk6 on first though before creating another one for now. > > Unless that takes too long of course, then we can always start tracking > > from that revision. > > > We can bump IcedTea6 to that revision now with a one-line change, then > wait for post-14 changes from a backported HotSpot tree. That seems like a good plan. There were some important fixes since the version we are using now. Attached is the proposed patch. Is that what you had in mind? (Still bootstrapping here...) > >> But I was also told that 14 isn't stable yet, it's just in the > >> stabilization phase. When you really want something rock solid you > >> should go with HS11. > > > > Yes, you can even get this with icedtea configure > > --with-hotspot-build=original but that needs more patches (e.g for sparc > > support) and for zero/shark it is too old, so it needs too much > > backporting to keep current in the long run. > > > Now we are post 1.4, the plan is to drop support for that, unless > someone is interested in maintaining it. Anyone? I suggest we remove support as soon as we have an official hs14 repo. Cheers, Mark diff -r 92c4cc753f06 hotspot.map --- a/hotspot.map Thu Feb 19 11:32:45 2009 +0100 +++ b/hotspot.map Mon Mar 02 10:31:33 2009 +0100 @@ -1,2 +1,2 @@ # version changeset md5sum -default f9d938ede196 c8f78d48ac83987bc2adebeebcd354e9 +default fc6a5ae3fef5 1c3510387dccdb4907d0fd2f1c58e372 From mark at klomp.org Mon Mar 2 01:43:07 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 02 Mar 2009 10:43:07 +0100 Subject: Mauve/JTreg testing In-Reply-To: <49A812B3.7050908@7gen.com> References: <49A6EE63.8030502@redhat.com> <1235729455.3310.35.camel@fedora.wildebeest.org> <49A7BCDA.1010503@ubuntu.com> <49A7E001.4030905@sun.com> <49A812B3.7050908@7gen.com> Message-ID: <1235986987.2306.15.camel@fedora.wildebeest.org> Hi David, On Fri, 2009-02-27 at 08:20 -0800, David Herron wrote: > I'm not sure you'll find anybody home in the quality group. :-( And I > don't have any idea if anybody at this time can be considered the > quality group leader. > > When I was at Sun I wanted to do something like this proposal. Having > a mailing list archive is a bare minimum. I had thought it would be > better to set up file/data storage somewhere. We can also do that. And even run some scripts. The bottleneck is having a full public build server, when we upgrade builder.classpath.org to Debian Lenny from Etch we can reuse that one. Although it is somewhat low on resources (and it isn't a permanent solution, sooner or later we will have to move to another server). The other bottleneck is bandwidth if we want to have people upload their full results. Especially a full jtreg JTWork and JTReport directory is so big that it becomes somewhat impractical. So some sort of script to preprocess the results and make it possible for people to upload the aggregated/compressed results would be necessary. Cheers, Mark From mark at klomp.org Mon Mar 2 01:57:53 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 02 Mar 2009 10:57:53 +0100 Subject: Mauve/JTreg testing In-Reply-To: <49A84F03.9040000@redhat.com> References: <49A6EE63.8030502@redhat.com> <1235729455.3310.35.camel@fedora.wildebeest.org> <49A84F03.9040000@redhat.com> Message-ID: <1235987873.2306.30.camel@fedora.wildebeest.org> Hi Lillian, On Fri, 2009-02-27 at 15:37 -0500, Lillian Angel wrote: > Mark Wielaard wrote: > > On Thu, 2009-02-26 at 14:32 -0500, Lillian Angel wrote: > >> Omair has been working on getting our internal nightly tester to display > >> graphs in Hudson for Mauve and JTreg. The plan is to write some sort of > >> script that will email out the regressions for these testsuites nightly, > >> as well as post the results nightly somewhere public (perhaps using > >> Hudson). > >> > >> Any thoughts on a good place to email and post these results? Also, is > >> there anything else people would like to see? > >> > > Nice! It would be good to have regular postings of different > > people/setups to get a feel for the current results and hopefully be > > able to compare them a bit to see if a difference in compiler/package > > version used to build has any impact on them. So, if the script could be > > made so that it could just be checked into the repository that would be > > great (although I suspect there will always be some tweaking needed for > > different setups). > > > I suspect we will have Hudson running the Mauve and JTreg runs, and > producing graphs for all the runs. Also, we have cgi scripts for the > Mauve/JTreg results that can be posted. Hudson can send an email for > failed tests, but I think if we have a script to only send an email if > there are regressions from one day to the next would be better. Yes, if you can detect regressions between runs that would be ideal. Bonus points for then sending the regression report also to the committers mentioned in the diff between the last good and first bad version (hg log -rgoodrev:badrev --template "{author}\n" should give you that). Although having full (failure) results is also good to have because that gives others a baseline to compare against their setups (then you can easily see if someone compiled against a certain compiler or library version and compare their results with yours). > So, I would like a place where we can run/display the Hudson runs, and > another for the cgi scripts. Hudson could probably be run on builder.classpath.org, but it needs an upgrade first and it would need more disk space. If you have scripts that could display the results from a run done on a separate server (so others can also run such tests) that would be nice. Then we can just show those results on the normal icedtea server and arrange for people to upload result sets (given they are not too big that is). > Any suggestions on the type of emails to send out? What would be most > helpful? Regression emails, assuming they should normally be sporadic because nobody ever breaks the build..., could probably go to the normal list (and probably CCed to any authors of possibly suspect commits). Full regular test result (failure) emails should imho go to a separate list to not clutter up this one. > > It might clutter up the list a bit if the test result mails go to the > > default discussion list. So I setup a separate one that can be used for > > that testresults at icedtea.classpath.org > > http://icedtea.classpath.org/mailman/listinfo/testresults > > > > Cheers, > > > > Mark From aph at redhat.com Mon Mar 2 02:01:30 2009 From: aph at redhat.com (Andrew Haley) Date: Mon, 02 Mar 2009 10:01:30 +0000 Subject: Mauve/JTreg testing In-Reply-To: <1235987873.2306.30.camel@fedora.wildebeest.org> References: <49A6EE63.8030502@redhat.com> <1235729455.3310.35.camel@fedora.wildebeest.org> <49A84F03.9040000@redhat.com> <1235987873.2306.30.camel@fedora.wildebeest.org> Message-ID: <49ABAE7A.8020801@redhat.com> Mark Wielaard wrote: > Hi Lillian, > > On Fri, 2009-02-27 at 15:37 -0500, Lillian Angel wrote: >> Any suggestions on the type of emails to send out? What would be most >> helpful? > > Regression emails, assuming they should normally be sporadic because > nobody ever breaks the build..., could probably go to the normal list > (and probably CCed to any authors of possibly suspect commits). Full > regular test result (failure) emails should imho go to a separate list > to not clutter up this one. No, that doesn't scale. Regression emails should go to the authors and a separate list. Andrew. From ahughes at redhat.com Mon Mar 2 09:57:35 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Mon, 02 Mar 2009 17:57:35 +0000 Subject: changeset in /hg/icedtea: Bump to b48. Message-ID: changeset ccd9a2a2c559 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ccd9a2a2c559 description: Bump to b48. 2009-02-24 Andrew John Hughes * patches/hotspot/original/icedtea-6791168.patch, * patches/hotspot/original/icedtea-format.patch, * patches/icedtea-awt-window-size.patch, * patches/icedtea-f2i-overflow.patch, * patches/icedtea-format-warnings.patch, * patches/icedtea-fortify-source.patch, * patches/icedtea-lib64.patch, * patches/icedtea-no-bcopy.patch: Removed, applied upstream. * HACKING: Updated. * Makefile.am: Bump to b48. * patches/hotspot/original/icedtea-includedb.patch, * patches/icedtea-libraries.patch: Recreated. diffstat: 13 files changed, 140 insertions(+), 786 deletions(-) ChangeLog | 16 + HACKING | 20 - Makefile.am | 24 -- patches/hotspot/original/icedtea-6791168.patch | 230 ---------------------- patches/hotspot/original/icedtea-format.patch | 48 ---- patches/hotspot/original/icedtea-includedb.patch | 93 -------- patches/icedtea-awt-window-size.patch | 67 ------ patches/icedtea-f2i-overflow.patch | 96 --------- patches/icedtea-format-warnings.patch | 30 -- patches/icedtea-fortify-source.patch | 60 ----- patches/icedtea-lib64.patch | 16 - patches/icedtea-libraries.patch | 206 +++++++++---------- patches/icedtea-no-bcopy.patch | 20 - diffs (truncated from 1636 to 500 lines): diff -r 5bda1b46a64f -r ccd9a2a2c559 ChangeLog --- a/ChangeLog Fri Feb 20 14:50:00 2009 +0000 +++ b/ChangeLog Fri Feb 27 15:39:11 2009 +0000 @@ -1,3 +1,19 @@ 2009-02-20 Andrew John Hughes + + * patches/hotspot/original/icedtea-6791168.patch, + * patches/hotspot/original/icedtea-format.patch, + * patches/icedtea-awt-window-size.patch, + * patches/icedtea-f2i-overflow.patch, + * patches/icedtea-format-warnings.patch, + * patches/icedtea-fortify-source.patch, + * patches/icedtea-lib64.patch, + * patches/icedtea-no-bcopy.patch: + Removed, applied upstream. + * HACKING: Updated. + * Makefile.am: Bump to b48. + * patches/hotspot/original/icedtea-includedb.patch, + * patches/icedtea-libraries.patch: Recreated. + 2009-02-20 Andrew John Hughes * overlays/nio2/openjdk/jdk/src/share/classes/java/io/File.java, diff -r 5bda1b46a64f -r ccd9a2a2c559 HACKING --- a/HACKING Fri Feb 20 14:50:00 2009 +0000 +++ b/HACKING Fri Feb 27 15:39:11 2009 +0000 @@ -35,11 +35,9 @@ The following patches are currently appl * icedtea-jpegclasses.patch: Add com.sun.image.codec.jpeg support. * icedtea-lcms-leak.patch: Fix LCMS memory leak. * icedtea-LCMS-setTagData.patch: Add support for setTagData to LCMS peer. -* icedtea-lib64.patch: Add support for building on platforms with /usr/lib64. * icedtea-libraries.patch: Use system JPEG and zlib libraries. * icedtea-linker-options.patch: Add -Xlinker option when linking. * icedtea-memory-limits.patch: Increase default memory limits. -* icedtea-no-bcopy.patch: Don't define local copies of bcopy, bzero and bcmp from BSD. * icedtea-override-redirect-metacity.patch: Enable override redirect for Metacity window manager. * icedtea-print-lsb-release.patch: Use information from Debian LSB file for crash reports. * icedtea-rhino.patch: Add support for Javascript. @@ -67,27 +65,28 @@ The following patches are currently appl divide by zero on tiny paths. * icedtea-alsa-default-device.patch: Fix problems with using the ALSA 'default' device. * icedtea-linker-libs-order.patch: When linking, put the referenced libraries after the object files (PR237). -* icedtea-f2i-overflow.patch: Replaces the code used by [fd]2[il] bytecodes to correctly handle overflows. (PR244) * icedtea-testenv.patch: Provide public reachable machines for net/nio tests. * icedtea-samejvm-safe.patch: Add samejvmsafe dirs to TEST.ROOT. * icedtea-6728542-epoll.patch: Make EPoll work on non-x86 platforms. (PR265) * icedtea-fortify-source.patch: Fix build failures with -D_FORTIFY_SOURCE=2. -* icedtea-format-warnings.patch: Fix build failures with -Wformat=1. * icedtea-cc-interp-jvmti.patch: Disable some JVMTI capabilities which are unsupported or do not work with the C++ interpreter. * icedtea-demo-swingapplet.patch: Add missing html file needed to run the demo. -* icedtea-6791168.patch: Fix build failure with GCC-4.4 (PR 38725) and compiler warnings. * icedtea-no-precompiled.patch: Don't use precompiled header files in hotspot. -* icedtea-includedb.patch: Add missing include files. -* icedtea-awt-window-size.patch: Fix X11 window size calculation (S6721088). * icedtea-java2d-dasher.patch: Fix interpretation of dash array elements in BasicStroke (S6793344). +* icedtea-includedb.patch: Add missing include files. (S6793825, mostly applied in b47) The following patches are only applied to OpenJDK6 in IcedTea6: +* icedtea-awt-window-size.patch: Fix X11 window size calculation (S6721088, applied in OpenJDK7 b48). * icedtea-corba.patch: Adds additional files to org.omg.CORBA Makefile. * icedtea-display-mode-changer.patch: Add extra test class. (applied in OpenJDK7 b43) * icedtea-enum-bug-181.patch: Fixes class type check (PR181/S6736248) +* icedtea-f2i-overflow.patch: Replaces the code used by [fd]2[il] bytecodes to correctly handle overflows. (PR244) +* icedtea-format-warnings.patch: Fix build failures with -Wformat=1. (S6781583, applied in b47). * icedtea-gcc-4.3.patch: Fix code to compile with GCC 4.3 and turn off -Werror. * icedtea-generated.patch: Force use of /bin/bash. +* icedtea-lib64.patch: Add support for building on platforms with /usr/lib64. (S6778662, applied in b47). +* icedtea-no-bcopy.patch: Don't define local copies of bcopy, bzero and bcmp from BSD (S6781583, applied in b47). * icedtea-nomotif.patch: Remove sanity and GrabShell.h dependency on Motif/Lesstif library. * icedtea-nomotif-6706121.patch: Remove Motif AWT peers (S6706121). * icedtea-sparc.patch: Add support for GNU/Linux on SPARC (version in IcedTea includes only minimal build changes). @@ -95,8 +94,9 @@ The following patches are only applied t * icedtea-lucene-crash.patch: Fix lucene bad code generation bug #6707044. * icedtea-6700047-loopopts.patch: Fix partial peeling issue, bug #6700047. * icedtea-6712835-ifnode.patch: Fix infinite loop in PhaseIterGVN::transform. -* icedtea-6761856-freetypescaler.patch: Fix IcedTea bug #227, OpenJDK bug - #6761856, swing TextLayout.getBounds() returns shifted bounds (applied in OpenJDK7 b43). +* icedtea-6761856-freetypescaler.patch: swing TextLayout.getBounds() returns shifted bounds + (PR 227, S6761856, applied in OpenJDK7 b43). +* icedtea-6791168.patch: Fix build failure with GCC-4.4 (PR 38725) and compiler warnings. (S6791168) * icedtea-timerqueue.patch: Fix setting of running variable (PR87/S6623943). * icedtea-version.patch: Fix (langtools) ant build to honor fcs MILESTONE setting (S6778493). * icedtea-io_util-overflow.patch: Replace some code to correctly handle overflows. (S6788196) @@ -110,7 +110,6 @@ The following patches are only applied t * icedtea-override.patch: Remove @Override annotation in javax.management.AttributeValueExp (unsupported by ecj < 3.4). * icedtea-snmp.patch: Remove proprietary SNMP support hooks. -* icedtea-sound.patch: Remove proprietary MIDI support hooks. The following patches are only applied to the icedtea-ecj bootstrap tree: @@ -196,3 +195,4 @@ XSL file (S6707485): Included upstream i (S6662775): Included upstream in OpenJDK6 b06 and OpenJDK7 b28. * icedtea-license-headers.patch: Generate GPL header from automulti tool (PR148/S6713083). * icedtea-cc-interp-no-fer.patch: Replaced with icedtea-cc-interp-jvmti.patch, of which it is a subset. +* icedtea-sound.patch: Remove proprietary MIDI support hooks. diff -r 5bda1b46a64f -r ccd9a2a2c559 Makefile.am --- a/Makefile.am Fri Feb 20 14:50:00 2009 +0000 +++ b/Makefile.am Fri Feb 27 15:39:11 2009 +0000 @@ -1,6 +1,6 @@ OPENJDK_DATE = 05_feb_2009 -OPENJDK_DATE = 05_feb_2009 -OPENJDK_MD5SUM = d5f92fec2f645d44437ab90e1dd2dbaf -OPENJDK_VERSION = b46 +OPENJDK_DATE = 19_feb_2009 +OPENJDK_MD5SUM = b9846275d2ac5b2f414aa527eaf523ed +OPENJDK_VERSION = b48 CACAO_VERSION = 0.99.3 CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 @@ -1752,7 +1752,6 @@ ICEDTEA_PATCHES = \ patches/hotspot/$(HSBUILD)/icedtea-core-build.patch \ patches/icedtea-linker-options.patch \ patches/hotspot/$(HSBUILD)/icedtea-static-libstdc++.patch \ - patches/icedtea-lib64.patch \ patches/icedtea-zero-build.patch \ patches/hotspot/$(HSBUILD)/icedtea-zero-build.patch \ patches/icedtea-print-lsb-release.patch \ @@ -1763,7 +1762,6 @@ ICEDTEA_PATCHES = \ patches/hotspot/$(HSBUILD)/icedtea-sparc-ptracefix.patch \ patches/hotspot/$(HSBUILD)/icedtea-sparc-trapsfix.patch \ patches/icedtea-override-redirect-metacity.patch \ - patches/icedtea-no-bcopy.patch \ patches/icedtea-shark-build.patch \ patches/hotspot/$(HSBUILD)/icedtea-shark-build.patch \ patches/icedtea-toolkit.patch \ @@ -1791,12 +1789,9 @@ ICEDTEA_PATCHES = \ patches/icedtea-stroker-finish.patch \ patches/icedtea-alsa-default-device.patch \ patches/icedtea-linker-libs-order.patch \ - patches/icedtea-f2i-overflow.patch \ patches/icedtea-testenv.patch \ patches/icedtea-pr261.patch \ patches/icedtea-doc-headers.patch \ - patches/icedtea-format-warnings.patch \ - patches/icedtea-fortify-source.patch \ $(ZERO_PATCHES_COND) \ patches/security/icedtea-6484091.patch \ patches/security/icedtea-6497740.patch \ @@ -1808,8 +1803,10 @@ ICEDTEA_PATCHES = \ patches/security/icedtea-6734167.patch \ patches/security/icedtea-6755943.patch \ patches/security/icedtea-6766136.patch \ - patches/hotspot/$(HSBUILD)/icedtea-6791168.patch \ - patches/hotspot/$(HSBUILD)/icedtea-includedb.patch + patches/hotspot/$(HSBUILD)/icedtea-includedb.patch \ + patches/icedtea-demo-swingapplet.patch \ + patches/icedtea-java2d-dasher.patch \ + $(DISTRIBUTION_PATCHES) if WITH_RHINO ICEDTEA_PATCHES += \ @@ -1844,13 +1841,6 @@ if ENABLE_NIO2 if ENABLE_NIO2 ICEDTEA_PATCHES += patches/icedtea-nio2.patch endif - -ICEDTEA_PATCHES += \ - $(DISTRIBUTION_PATCHES) \ - patches/icedtea-demo-swingapplet.patch \ - patches/icedtea-awt-window-size.patch \ - patches/icedtea-java2d-dasher.patch \ - patches/hotspot/$(HSBUILD)/icedtea-format.patch stamps/extract.stamp: stamps/download.stamp if OPENJDK_SRC_DIR_FOUND diff -r 5bda1b46a64f -r ccd9a2a2c559 patches/hotspot/original/icedtea-6791168.patch --- a/patches/hotspot/original/icedtea-6791168.patch Fri Feb 20 14:50:00 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ ---- openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp 2009-01-13 10:17:05.000000000 +0000 -@@ -594,7 +594,7 @@ - __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rax); - - // for c++ interpreter can rsi really be munged? -- __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); // restore state -+ __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); // restore state - __ movptr(rbx, Address(state, byte_offset_of(BytecodeInterpreter, _method))); // restore method - __ movptr(rdi, Address(state, byte_offset_of(BytecodeInterpreter, _locals))); // get locals pointer - -@@ -658,7 +658,7 @@ - const Address size_of_stack (rbx, methodOopDesc::max_stack_offset()); - // Always give one monitor to allow us to start interp if sync method. - // Any additional monitors need a check when moving the expression stack -- const one_monitor = frame::interpreter_frame_monitor_size() * wordSize; -+ const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize; - __ load_unsigned_word(rax, size_of_stack); // get size of expression stack in words - __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), one_monitor)); - __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size)); -@@ -1829,7 +1829,7 @@ - Label unwind_and_forward; - - // restore state pointer. -- __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); -+ __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); - - __ movptr(rbx, STATE(_method)); // get method - #ifdef _LP64 -@@ -1877,14 +1877,14 @@ - - // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases - if (UseSSE < 2) { -- __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); -+ __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); - __ movptr(rbx, STATE(_result._to_call._callee)); // get method just executed - __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset())); - __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT)); // Result stub address array index - __ jcc(Assembler::equal, do_float); - __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE)); // Result stub address array index - __ jcc(Assembler::equal, do_double); --#ifdef COMPILER2 -+#if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2) - __ empty_FPU_stack(); - #endif // COMPILER2 - __ jmp(done_conv); -@@ -1928,7 +1928,7 @@ - - // Restore rsi/r13 as compiled code may not preserve it - -- __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); -+ __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); - - // restore stack to what we had when we left (in case i2c extended it) - -@@ -1942,7 +1942,7 @@ - #else - __ movptr(rcx, STATE(_thread)); // get thread - __ cmpptr(Address(rcx, Thread::pending_exception_offset()), (int32_t)NULL_WORD); --#endif / __LP64 -+#endif // _LP64 - __ jcc(Assembler::notZero, return_with_exception); - - // get method just executed ---- openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp 2009-01-13 10:17:05.000000000 +0000 -@@ -139,7 +139,7 @@ - #ifdef CC_INTERP - - inline interpreterState frame::get_interpreterState() const { -- return ((interpreterState)addr_at( -sizeof(BytecodeInterpreter)/wordSize )); -+ return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize )); - } - - inline intptr_t* frame::sender_sp() const { ---- openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp 2009-01-13 10:17:05.000000000 +0000 -@@ -6943,29 +6943,32 @@ - - Label slow_case, done; - -- // x ?<= pi/4 -- fld_d(ExternalAddress((address)&pi_4)); -- fld_s(1); // Stack: X PI/4 X -- fabs(); // Stack: |X| PI/4 X -- fcmp(tmp); -- jcc(Assembler::above, slow_case); -- -- // fastest case: -pi/4 <= x <= pi/4 -- switch(trig) { -- case 's': -- fsin(); -- break; -- case 'c': -- fcos(); -- break; -- case 't': -- ftan(); -- break; -- default: -- assert(false, "bad intrinsic"); -- break; -+ ExternalAddress pi4_adr = (address)&pi_4; -+ if (reachable(pi4_adr)) { -+ // x ?<= pi/4 -+ fld_d(pi4_adr); // ExternalAddress((address)&pi_4)); -+ fld_s(1); // Stack: X PI/4 X -+ fabs(); // Stack: |X| PI/4 X -+ fcmp(tmp); -+ jcc(Assembler::above, slow_case); -+ -+ // fastest case: -pi/4 <= x <= pi/4 -+ switch(trig) { -+ case 's': -+ fsin(); -+ break; -+ case 'c': -+ fcos(); -+ break; -+ case 't': -+ ftan(); -+ break; -+ default: -+ assert(false, "bad intrinsic"); -+ break; -+ } -+ jmp(done); - } -- jmp(done); - - // slow case: runtime call - bind(slow_case); ---- openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp 2009-01-13 10:17:05.000000000 +0000 -@@ -2954,10 +2954,16 @@ - __ pushptr(Address(rcx, 0)); // Save return address - __ enter(); // Save old & set new rbp - __ subptr(rsp, rbx); // Prolog -+#ifdef CC_INTERP -+ __ movptr(Address(rbp, -+ -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), -+ sender_sp); // Make it walkable -+#else // CC_INTERP - __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), - sender_sp); // Make it walkable - // This value is corrected by layout_activation_impl - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); -+#endif // CC_INTERP - __ mov(sender_sp, rsp); // Pass sender_sp to next frame - __ addptr(rsi, wordSize); // Bump array pointer (sizes) - __ addptr(rcx, wordSize); // Bump array pointer (pcs) ---- openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp 2009-01-13 10:17:05.000000000 +0000 -@@ -213,7 +213,7 @@ - - inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) { - /* it's possible we could catch this special case implicitly */ -- if (op1 == 0x80000000 && op2 == -1) return op1; -+ if ((juint)op1 == 0x80000000 && op2 == -1) return op1; - else return op1 / op2; - } - -@@ -231,7 +231,7 @@ - - inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) { - /* it's possible we could catch this special case implicitly */ -- if (op1 == 0x80000000 && op2 == -1) return 0; -+ if ((juint)op1 == 0x80000000 && op2 == -1) return 0; - else return op1 % op2; - } - ---- openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp 2009-01-13 10:17:05.000000000 +0000 -@@ -30,7 +30,7 @@ - - #ifdef CC_INTERP - void InterpreterMacroAssembler::get_method(Register reg) { -- movptr(reg, Address(rbp, -(sizeof(BytecodeInterpreter) + 2 * wordSize))); -+ movptr(reg, Address(rbp, -((int)sizeof(BytecodeInterpreter) + 2 * wordSize))); - movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method))); - } - #endif // CC_INTERP ---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig 2009-01-13 10:16:45.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2009-01-13 10:17:05.000000000 +0000 -@@ -163,7 +163,7 @@ - #ifdef USELABELS - // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an - // initialization (which is is the initialization of the table pointer...) --#define DISPATCH(opcode) goto *dispatch_table[opcode] -+#define DISPATCH(opcode) goto *(void*)dispatch_table[opcode] - #define CONTINUE { \ - opcode = *pc; \ - DO_UPDATE_INSTRUCTION_COUNT(opcode); \ -@@ -341,7 +341,7 @@ - */ - #undef CHECK_NULL - #define CHECK_NULL(obj_) \ -- if ((obj_) == 0) { \ -+ if ((obj_) == NULL) { \ - VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), ""); \ - } - -@@ -1362,7 +1362,7 @@ - - #define NULL_COMPARISON_NOT_OP(name) \ - CASE(_if##name): { \ -- int skip = (!(STACK_OBJECT(-1) == 0)) \ -+ int skip = (!(STACK_OBJECT(-1) == NULL)) \ - ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ - address branch_pc = pc; \ - UPDATE_PC_AND_TOS(skip, -1); \ -@@ -1372,7 +1372,7 @@ - - #define NULL_COMPARISON_OP(name) \ - CASE(_if##name): { \ -- int skip = ((STACK_OBJECT(-1) == 0)) \ -+ int skip = ((STACK_OBJECT(-1) == NULL)) \ - ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ - address branch_pc = pc; \ - UPDATE_PC_AND_TOS(skip, -1); \ ---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp.orig 2009-01-13 10:15:42.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp 2009-01-13 10:17:05.000000000 +0000 -@@ -66,7 +66,6 @@ - friend class InterpreterGenerator; - friend class InterpreterMacroAssembler; - friend class frame; --friend class SharedRuntime; - friend class VMStructs; - - public: diff -r 5bda1b46a64f -r ccd9a2a2c559 patches/hotspot/original/icedtea-format.patch --- a/patches/hotspot/original/icedtea-format.patch Fri Feb 20 14:50:00 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2009-02-03 18:08:09.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-02-03 18:32:59.000000000 +0000 -@@ -1361,7 +1361,7 @@ - - // Feed the cache size setting into the JDK - char buffer[1024]; -- sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax); -+ sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax); - add_property(buffer); - } - if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) { -diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp 2009-01-29 15:03:07.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp 2009-02-03 18:30:55.000000000 +0000 -@@ -730,7 +730,7 @@ - if (DieOnSafepointTimeout) { - char msg[1024]; - VM_Operation *op = VMThread::vm_operation(); -- sprintf(msg, "Safepoint sync time longer than %d ms detected when executing %s.", -+ sprintf(msg, "Safepoint sync time longer than " INTX_FORMAT " ms detected when executing %s.", - SafepointTimeoutDelay, - op != NULL ? op->name() : "no vm operation"); - fatal(msg); -diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp 2009-01-29 15:03:07.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp 2009-02-03 19:32:30.000000000 +0000 -@@ -424,7 +424,7 @@ - // asserts is that error message -- often something about negative array - // indices -- is opaque. - --#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%X\n", tag); } -+#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%p\n", tag); } - - void ObjectMonitor::ctAsserts() { - CTASSERT(offset_of (ObjectMonitor, _header) == 0); -diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp ---- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp 2009-02-03 19:10:58.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2009-02-03 19:29:15.000000000 +0000 -@@ -307,7 +307,7 @@ - - strncpy(buf, file, buflen); - if (len + 10 < buflen) { -- sprintf(buf + len, ":" SIZE_FORMAT, _lineno); -+ sprintf(buf + len, ":%d", _lineno); - } - st->print(" (%s)", buf); - } else { diff -r 5bda1b46a64f -r ccd9a2a2c559 patches/hotspot/original/icedtea-includedb.patch --- a/patches/hotspot/original/icedtea-includedb.patch Fri Feb 20 14:50:00 2009 +0000 +++ b/patches/hotspot/original/icedtea-includedb.patch Fri Feb 27 15:39:11 2009 +0000 @@ -1,51 +1,7 @@ ---- openjdk/hotspot/src/share/vm/includeDB_compiler2.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/includeDB_compiler2 2009-01-13 10:11:17.000000000 +0000 -@@ -140,6 +140,7 @@ - c2_globals_.hpp macros.hpp - - c2_init_.cpp compile.hpp -+c2_init_.cpp node.hpp - - c2compiler.cpp ad_.hpp - c2compiler.cpp c2compiler.hpp -@@ -839,6 +840,7 @@ - phase.cpp compile.hpp - phase.cpp compileBroker.hpp - phase.cpp nmethod.hpp -+phase.cpp node.hpp - phase.cpp phase.hpp - - phase.hpp port.hpp ---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1.orig 2009-01-13 10:10:44.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 2009-01-13 10:11:17.000000000 +0000 -@@ -34,6 +34,7 @@ - collectionSetChooser.cpp g1CollectedHeap.hpp - collectionSetChooser.cpp g1CollectorPolicy.hpp - collectionSetChooser.cpp collectionSetChooser.hpp -+collectionSetChooser.cpp space.inline.hpp - - collectionSetChooser.hpp heapRegion.hpp - collectionSetChooser.hpp growableArray.hpp -@@ -44,6 +45,7 @@ - concurrentG1Refine.cpp copy.hpp - concurrentG1Refine.cpp g1CollectedHeap.hpp - concurrentG1Refine.cpp g1RemSet.hpp -+concurrentG1Refine.cpp space.inline.hpp - - concurrentG1Refine.hpp globalDefinitions.hpp - -@@ -264,7 +266,7 @@ - heapRegion.cpp iterator.hpp - heapRegion.cpp oop.inline.hpp - --heapRegion.hpp space.hpp -+heapRegion.hpp space.inline.hpp - heapRegion.hpp spaceDecorator.hpp - heapRegion.hpp g1BlockOffsetTable.inline.hpp From ahughes at redhat.com Mon Mar 2 09:57:36 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Mon, 02 Mar 2009 17:57:36 +0000 Subject: changeset in /hg/icedtea: Bump to b49. Message-ID: changeset 31f193267f48 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=31f193267f48 description: Bump to b49. 2009-02-27 Andrew John Hughes * Makefile.am: Bump to b49. diffstat: 2 files changed, 7 insertions(+), 3 deletions(-) ChangeLog | 4 ++++ Makefile.am | 6 +++--- diffs (24 lines): diff -r ccd9a2a2c559 -r 31f193267f48 ChangeLog --- a/ChangeLog Fri Feb 27 15:39:11 2009 +0000 +++ b/ChangeLog Mon Mar 02 17:56:43 2009 +0000 @@ -1,3 +1,7 @@ 2009-02-24 Andrew John Hughes + + * Makefile.am: Bump to b49. + 2009-02-24 Andrew John Hughes * patches/hotspot/original/icedtea-6791168.patch, diff -r ccd9a2a2c559 -r 31f193267f48 Makefile.am --- a/Makefile.am Fri Feb 27 15:39:11 2009 +0000 +++ b/Makefile.am Mon Mar 02 17:56:43 2009 +0000 @@ -1,6 +1,6 @@ OPENJDK_DATE = 19_feb_2009 -OPENJDK_DATE = 19_feb_2009 -OPENJDK_MD5SUM = b9846275d2ac5b2f414aa527eaf523ed -OPENJDK_VERSION = b48 +OPENJDK_DATE = 26_feb_2009 +OPENJDK_MD5SUM = 2401015f65b5c099acf87b3f0b9e8404 +OPENJDK_VERSION = b49 CACAO_VERSION = 0.99.3 CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 From gnu_andrew at member.fsf.org Mon Mar 2 10:07:02 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 2 Mar 2009 18:07:02 +0000 Subject: How to host HS14 stable? (Was: RFC: Change name of default HotSpot to 'default') In-Reply-To: <1235986539.2306.10.camel@fedora.wildebeest.org> References: <20090212150029.GA1121@rivendell.middle-earth.co.uk> <1234772748.3612.3.camel@hermans.wildebeest.org> <1234774554.11228.3.camel@localhost.localdomain> <1234862105.4062.8.camel@fedora.wildebeest.org> <1234950462.2322.9.camel@fedora.wildebeest.org> <1234951783.5094.17.camel@localhost.localdomain> <1235035430.3597.14.camel@hermans.wildebeest.org> <17c6771e0902200842l15c7b892rcd352de3286aafbd@mail.gmail.com> <1235986539.2306.10.camel@fedora.wildebeest.org> Message-ID: <17c6771e0903021007o3ebcc082taf8cdf869d3f42bc@mail.gmail.com> 2009/3/2 Mark Wielaard : > Hi Andrew, > > On Fri, 2009-02-20 at 16:42 +0000, Andrew John Hughes wrote: >> 2009/2/19 Mark Wielaard : >> > On Wed, 2009-02-18 at 11:09 +0100, Christian Thalinger wrote: >> >> On Wed, 2009-02-18 at 10:47 +0100, Mark Wielaard wrote: >> >> > Yes, my plan was to branch at the commit just before the HS15 tag in >> >> > jdk7/jdk7/hotspot appeared. But it would be good to get confirmation >> >> > that is the right branch point. >> >> >> >> I can look that up again... ?The changeset right before the fork is: >> >> >> >> fc6a5ae3fef5 >> >> >> >> which bumps the HotSpot version to 14.0-b10. >> > >> > Thanks. I am waiting for Joe to reveal the open hs14 repo that he wants >> > to base openjdk6 on first though before creating another one for now. >> > Unless that takes too long of course, then we can always start tracking >> > from that revision. >> > >> We can bump IcedTea6 to that revision now with a one-line change, then >> wait for post-14 changes from a backported HotSpot tree. > > That seems like a good plan. There were some important fixes since the > version we are using now. Attached is the proposed patch. Is that what > you had in mind? (Still bootstrapping here...) > Looks spot on to me. Thanks for doing this, and sorry for not doing it earlier myself. >> >> But I was also told that 14 isn't stable yet, it's just in the >> >> stabilization phase. ?When you really want something rock solid you >> >> should go with HS11. >> > >> > Yes, you can even get this with icedtea configure >> > --with-hotspot-build=original but that needs more patches (e.g for sparc >> > support) and for zero/shark it is too old, so it needs too much >> > backporting to keep current in the long run. >> > >> Now we are post 1.4, the plan is to drop support for that, unless >> someone is interested in maintaining it. ?Anyone? > > I suggest we remove support as soon as we have an official hs14 repo. > Sounds good, though I have no idea if hs11 currently builds... :( doko? > Cheers, > > Mark > > diff -r 92c4cc753f06 hotspot.map > --- a/hotspot.map ? ? ? Thu Feb 19 11:32:45 2009 +0100 > +++ b/hotspot.map ? ? ? Mon Mar 02 10:31:33 2009 +0100 > @@ -1,2 +1,2 @@ > ?# version changeset md5sum > -default ? ? ? ?f9d938ede196 c8f78d48ac83987bc2adebeebcd354e9 > +default ? ? ? ?fc6a5ae3fef5 1c3510387dccdb4907d0fd2f1c58e372 > > > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Mon Mar 2 13:19:37 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 02 Mar 2009 21:19:37 +0000 Subject: changeset in /hg/icedtea6: * hotspot.map (default): Set to rev f... Message-ID: changeset f03bf9944657 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f03bf9944657 description: * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ hotspot.map | 2 +- diffs (18 lines): diff -r f1cf5f359a35 -r f03bf9944657 ChangeLog --- a/ChangeLog Fri Feb 27 16:09:25 2009 +0000 +++ b/ChangeLog Mon Mar 02 22:19:24 2009 +0100 @@ -1,3 +1,7 @@ 2009-02-27 Gary Benson + + * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). + 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp diff -r f1cf5f359a35 -r f03bf9944657 hotspot.map --- a/hotspot.map Fri Feb 27 16:09:25 2009 +0000 +++ b/hotspot.map Mon Mar 02 22:19:24 2009 +0100 @@ -1,2 +1,2 @@ # version changeset md5sum -default f9d938ede196 c8f78d48ac83987bc2adebeebcd354e9 +default fc6a5ae3fef5 1c3510387dccdb4907d0fd2f1c58e372 From mark at klomp.org Mon Mar 2 13:21:38 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 02 Mar 2009 22:21:38 +0100 Subject: How to host HS14 stable? (Was: RFC: Change name of default HotSpot to 'default') In-Reply-To: <17c6771e0903021007o3ebcc082taf8cdf869d3f42bc@mail.gmail.com> References: <20090212150029.GA1121@rivendell.middle-earth.co.uk> <1234772748.3612.3.camel@hermans.wildebeest.org> <1234774554.11228.3.camel@localhost.localdomain> <1234862105.4062.8.camel@fedora.wildebeest.org> <1234950462.2322.9.camel@fedora.wildebeest.org> <1234951783.5094.17.camel@localhost.localdomain> <1235035430.3597.14.camel@hermans.wildebeest.org> <17c6771e0902200842l15c7b892rcd352de3286aafbd@mail.gmail.com> <1235986539.2306.10.camel@fedora.wildebeest.org> <17c6771e0903021007o3ebcc082taf8cdf869d3f42bc@mail.gmail.com> Message-ID: <1236028898.3592.1.camel@hermans.wildebeest.org> Hi Andrew, On Mon, 2009-03-02 at 18:07 +0000, Andrew John Hughes wrote: > 2009/3/2 Mark Wielaard : > > On Fri, 2009-02-20 at 16:42 +0000, Andrew John Hughes wrote: > >> We can bump IcedTea6 to that revision now with a one-line change, then > >> wait for post-14 changes from a backported HotSpot tree. > > > > That seems like a good plan. There were some important fixes since the > > version we are using now. Attached is the proposed patch. Is that what > > you had in mind? (Still bootstrapping here...) > > > Looks spot on to me. Thanks for doing this, and sorry for not doing > it earlier myself. Thanks. Committed as: 2009-03-02 Mark Wielaard * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). Cheers, Mark From mvfranz at gmail.com Mon Mar 2 19:23:35 2009 From: mvfranz at gmail.com (Michael Franz) Date: Mon, 2 Mar 2009 22:23:35 -0500 Subject: ICEDTEA_PATCHES - Multiple Sections in Makefile Message-ID: Hi, While trying to integrate my BSD changes into Makefile.am I found that there are two sections of assignment to ICEDTEA_PATCHES. What is the reason for the separation? Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090302/3fce6d8d/attachment.html From gbenson at redhat.com Tue Mar 3 01:18:45 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 03 Mar 2009 09:18:45 +0000 Subject: changeset in /hg/icedtea6: 2009-03-03 Gary Benson changeset 24cb346d989c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=24cb346d989c description: 2009-03-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: Removed. * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Removed references to the above. * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp (SharkRuntime::_trace_bytecode): Removed. (SharkRuntime::initialize): Remove initialization for the above. (SharkRuntime::trace_bytecode_C): Removed. * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp (SharkRuntime::_trace_bytecode): Likewise. (SharkRuntime::trace_bytecode): Likewise. (SharkRuntime::trace_bytecode_C): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse): Remove bytecode tracer code. diffstat: 7 files changed, 19 insertions(+), 214 deletions(-) ChangeLog | 19 ++ ports/hotspot/src/share/vm/includeDB_shark | 9 - ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 9 - ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp | 114 -------------- ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp | 49 ------ ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 24 -- ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 9 - diffs (323 lines): diff -r f03bf9944657 -r 24cb346d989c ChangeLog --- a/ChangeLog Mon Mar 02 22:19:24 2009 +0100 +++ b/ChangeLog Tue Mar 03 09:18:36 2009 +0000 @@ -1,3 +1,22 @@ 2009-03-02 Mark Wielaard + + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: + Removed. + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp: + Likewise. + * ports/hotspot/src/share/vm/includeDB_shark: + Removed references to the above. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_trace_bytecode): Removed. + (SharkRuntime::initialize): Remove initialization for the above. + (SharkRuntime::trace_bytecode_C): Removed. + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_trace_bytecode): Likewise. + (SharkRuntime::trace_bytecode): Likewise. + (SharkRuntime::trace_bytecode_C): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse): Remove bytecode tracer code. + 2009-03-02 Mark Wielaard * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Tue Mar 03 09:18:36 2009 +0000 @@ -74,7 +74,6 @@ sharkBlock.cpp sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp -sharkBlock.cpp sharkBytecodeTracer.hpp sharkBlock.cpp sharkConstantPool.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp @@ -113,14 +112,6 @@ sharkBuilder.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.inline.hpp sharkBuilder.hpp sharkEntry.hpp - -sharkBytecodeTracer.cpp sharkBytecodeTracer.hpp -sharkBytecodeTracer.cpp sharkState.inline.hpp -sharkBytecodeTracer.cpp sharkValue.hpp - -sharkBytecodeTracer.hpp allocation.hpp -sharkBytecodeTracer.hpp llvmHeaders.hpp -sharkBytecodeTracer.hpp sharkState.hpp sharkCacheDecache.cpp ciMethod.hpp sharkCacheDecache.cpp debugInfoRec.hpp diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Mar 03 09:18:36 2009 +0000 @@ -121,15 +121,6 @@ void SharkBlock::parse() while (iter()->next() != ciBytecodeStream::EOBC() && bci() < limit()) { NOT_PRODUCT(a = b = c = d = NULL); - if (TraceBytecodes) { - Value *tos, *tos2; - SharkBytecodeTracer::decode(builder(), current_state(), &tos, &tos2); - call_vm( - SharkRuntime::trace_bytecode(), - LLVMValue::jint_constant(bci()), - tos, tos2); - } - if (SharkTraceBytecodes) tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp Mon Mar 02 22:19:24 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008, 2009 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_sharkBytecodeTracer.cpp.incl" - -using namespace llvm; - -void SharkBytecodeTracer::decode(SharkBuilder* builder, - const SharkState* state, - Value** tos, - Value** tos2) -{ - if (state->stack_depth() == 0) { - // nothing on the stack - *tos = *tos2 = LLVMValue::intptr_constant(EMPTY_SLOT); - } - else if (state->stack_depth() == 1) { - // one item on the stack - decode_one_word(builder, state, 0, tos); - *tos2 = LLVMValue::intptr_constant(EMPTY_SLOT); - } - else if (state->stack(0) == NULL) { - // two words of a two-word type - decode_two_word(builder, state, 0, tos, tos2); - } - else if (state->stack(1) == NULL) { - // a one-word type followed by half of a two-word type - decode_one_word(builder, state, 0, tos); - decode_two_word(builder, state, 1, tos2, NULL); - } - else { - // two one-word types - decode_one_word(builder, state, 0, tos); - decode_one_word(builder, state, 1, tos2); - } -} - -void SharkBytecodeTracer::decode_one_word(SharkBuilder* builder, - const SharkState* state, - int index, - Value** dst) -{ - SharkValue *value = state->stack(index); - assert(value && value->is_one_word(), "should be"); - switch (value->basic_type()) { - case T_BOOLEAN: - case T_BYTE: - case T_CHAR: - case T_SHORT: - case T_INT: -#ifdef _LP64 - *dst = builder->CreateIntCast( - value->jint_value(), SharkType::intptr_type(), false); -#else - *dst = value->jint_value(); -#endif // _LP64 - break; - - case T_FLOAT: - *dst = LLVMValue::intptr_constant(UNDECODABLE_SLOT); - break; - - case T_OBJECT: - case T_ARRAY: - *dst = value->intptr_value(builder); - break; - - case T_ADDRESS: - *dst = builder->pointer_constant((const void*)value->returnAddress_value()); - break; - - default: - tty->print_cr("Unhandled type %s", type2name(value->basic_type())); - ShouldNotReachHere(); - } -} - -void SharkBytecodeTracer::decode_two_word(SharkBuilder* builder, - const SharkState* state, - int index, - Value** dst, - Value** dst2) -{ - assert(state->stack(index) == NULL, "should be"); - SharkValue *value = state->stack(index + 1); - assert(value && value->is_two_word(), "should be"); - - *dst = LLVMValue::intptr_constant(UNDECODABLE_SLOT); - if (dst2) - *dst2 = LLVMValue::intptr_constant(UNDECODABLE_SLOT); -} diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp Mon Mar 02 22:19:24 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright 1999-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 SharkBytecodeTracer : public AllStatic { - public: - static void decode(SharkBuilder* builder, - const SharkState* state, - llvm::Value** tos, - llvm::Value** tos2); - public: - static const intptr_t EMPTY_SLOT = - NOT_LP64(0x23232323) LP64_ONLY(0x2323232323232323); - - static const intptr_t UNDECODABLE_SLOT = - NOT_LP64(0xdeadbabe) LP64_ONLY(0xdeadbabedeadbabe); - - private: - static void decode_one_word(SharkBuilder* builder, - const SharkState* state, - int index, - llvm::Value** dst); - static void decode_two_word(SharkBuilder* builder, - const SharkState* state, - int index, - llvm::Value** dst, - llvm::Value** dst2); -}; diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Tue Mar 03 09:18:36 2009 +0000 @@ -42,7 +42,6 @@ Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_throw_ArrayIndexOutOfBoundsException; Constant* SharkRuntime::_throw_NullPointerException; -Constant* SharkRuntime::_trace_bytecode; Constant* SharkRuntime::_f2i; Constant* SharkRuntime::_f2l; @@ -161,16 +160,6 @@ void SharkRuntime::initialize(SharkBuild (intptr_t) throw_NullPointerException_C, FunctionType::get(Type::VoidTy, params, false), "SharkRuntime__throw_NullPointerException"); - - params.clear(); - params.push_back(SharkType::thread_type()); - params.push_back(SharkType::jint_type()); - params.push_back(SharkType::intptr_type()); - params.push_back(SharkType::intptr_type()); - _trace_bytecode = builder->make_function( - (intptr_t) trace_bytecode_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__trace_bytecode"); // Leaf calls params.clear(); @@ -525,19 +514,6 @@ JRT_ENTRY(void, SharkRuntime::throw_Null } JRT_END -JRT_ENTRY(void, SharkRuntime::trace_bytecode_C(JavaThread* thread, - int bci, - intptr_t tos, - intptr_t tos2)) -{ -#ifndef PRODUCT - methodHandle mh(thread, method(thread)); - //BytecodeCounter::_counter_value++; - BytecodeTracer::trace(mh, mh->code_base() + bci, tos, tos2); -#endif // !PRODUCT -} -JRT_END - // Non-VM calls // Nothing in these must ever GC! diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkRuntime.hpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Tue Mar 03 09:18:36 2009 +0000 @@ -43,7 +43,6 @@ class SharkRuntime : public AllStatic { static llvm::Constant* _safepoint; static llvm::Constant* _throw_ArrayIndexOutOfBoundsException; static llvm::Constant* _throw_NullPointerException; - static llvm::Constant* _trace_bytecode; public: static llvm::Constant* find_exception_handler() @@ -102,10 +101,6 @@ class SharkRuntime : public AllStatic { { return _throw_NullPointerException; } - static llvm::Constant* trace_bytecode() - { - return _trace_bytecode; - } private: static int find_exception_handler_C(JavaThread* thread, @@ -141,10 +136,6 @@ class SharkRuntime : public AllStatic { static void throw_NullPointerException_C(JavaThread* thread, const char* file, int line); - static void trace_bytecode_C(JavaThread* thread, - int bci, - intptr_t tos, - intptr_t tos2); // Helpers for VM calls private: From ahughes at redhat.com Tue Mar 3 01:32:18 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 03 Mar 2009 09:32:18 +0000 Subject: changeset in /hg/icedtea6: Add support for BSD (patch from Micha... Message-ID: changeset 1c13fc28bd88 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1c13fc28bd88 description: Add support for BSD (patch from Michael Franz). 2009-03-03 Andrew John Hughes * AUTHORS: Add Michael Franz. 2009-03-03 Michael Franz * acinclude.m4: Add support for BSD. diffstat: 3 files changed, 14 insertions(+) AUTHORS | 1 + ChangeLog | 9 +++++++++ acinclude.m4 | 4 ++++ diffs (41 lines): diff -r 24cb346d989c -r 1c13fc28bd88 AUTHORS --- a/AUTHORS Tue Mar 03 09:18:36 2009 +0000 +++ b/AUTHORS Tue Mar 03 09:31:37 2009 +0000 @@ -10,6 +10,7 @@ Pablo del Campo Pablo del Campo Thomas Fitzsimmons Matthew Flaschen +Michael Franz Kyle Galloway Dennis Gilmore Andrew Haley diff -r 24cb346d989c -r 1c13fc28bd88 ChangeLog --- a/ChangeLog Tue Mar 03 09:18:36 2009 +0000 +++ b/ChangeLog Tue Mar 03 09:31:37 2009 +0000 @@ -1,3 +1,12 @@ 2009-03-03 Gary Benson + + * AUTHORS: Add Michael Franz. + +2009-03-03 Michael Franz + + * acinclude.m4: + Add support for BSD. + 2009-03-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: diff -r 24cb346d989c -r 1c13fc28bd88 acinclude.m4 --- a/acinclude.m4 Tue Mar 03 09:18:36 2009 +0000 +++ b/acinclude.m4 Tue Mar 03 09:31:37 2009 +0000 @@ -77,6 +77,10 @@ AC_DEFUN([SET_OS_DIRS], BUILD_OS_DIR=solaris OS_PATH=/opt/SunStudioExpress/bin:/opt/SUNWpro/bin:/usr/gnu/bin ;; + *darwin*|*bsd*) + BUILD_OS_DIR=bsd + OS_PATH= + ;; *) AC_MSG_ERROR([unsupported operating system ${host_os}]) ;; From gnu_andrew at member.fsf.org Tue Mar 3 01:33:10 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 3 Mar 2009 09:33:10 +0000 Subject: Patch to add BSD family to IcedTea7 configure In-Reply-To: References: Message-ID: <17c6771e0903030133m46abeb93h4d5a4388ebd0a01b@mail.gmail.com> 2009/3/2 Michael Franz : > Hi, > > Please apply the following patch to IcedTea7 to allow the initial support > for bsd. > > Michael > > diff -r 5bda1b46a64f acinclude.m4 > --- a/acinclude.m4??? Fri Feb 20 14:50:00 2009 +0000 > +++ b/acinclude.m4??? Sun Mar 01 20:00:51 2009 -0500 > @@ -77,6 +77,10 @@ > ?????? BUILD_OS_DIR=solaris > ?????? OS_PATH=/opt/SunStudioExpress/bin:/opt/SUNWpro/bin:/usr/gnu/bin > ?????? ;; > +??? *darwin*|*bsd*) > +????? BUILD_OS_DIR=bsd > +????? OS_PATH= > +????? ;; > ???? *) > ?????? AC_MSG_ERROR([unsupported operating system ${host_os}]) > ?????? ;; > > > Applied to IcedTea6, will be ported over to 7 shortly. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 gbenson at redhat.com Tue Mar 3 08:32:04 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 3 Mar 2009 16:32:04 +0000 Subject: Attention Shark hackers Message-ID: <20090303163204.GA3241@redhat.com> Hi all, I'm working on a large change that is going to result in a lot of the code in sharkBlock.* and sharkState.* getting rearranged. If you're working on something in those files then please let me know so we can coordinate commits. Cheers, Gary -- http://gbenson.net/ From doko at ubuntu.com Tue Mar 3 09:34:13 2009 From: doko at ubuntu.com (Matthias Klose) Date: Tue, 03 Mar 2009 18:34:13 +0100 Subject: building cacao as an additional VM Message-ID: <49AD6A15.3080901@ubuntu.com> Triggered by archive administrators and security people who don't want to care about two copies of the OpenJDK code in a distribution, I tried to build cacao as additional VM in the same source package and avoiding separate builds. You can now call: $ java -version java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) OpenJDK Server VM (build 14.0-b08, mixed mode) $ java -cacao -version java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) CACAO (build 0.99.3+hg, compiled mode) The cacao bits are installed in /jre/lib//cacao, cacao is configured like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. The file jvm.cfg.in needs an additional line '-cacao KNOWN'. There is no configure/make stuff for IcedTea yet; I'm currently assembling this directly in the packaging. Doing the same with Zero and with Shark? Didn't check yet, but maybe this would need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for the latter only. Ok to checkin these patches (without applying them)? Matthias -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cacao-alternate-jvm.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090303/0d16aa56/cacao-alternate-jvm.diff -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cacao-jni-version.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090303/0d16aa56/cacao-jni-version.diff From gnu_andrew at member.fsf.org Tue Mar 3 09:48:28 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 3 Mar 2009 17:48:28 +0000 Subject: building cacao as an additional VM In-Reply-To: <49AD6A15.3080901@ubuntu.com> References: <49AD6A15.3080901@ubuntu.com> Message-ID: <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> 2009/3/3 Matthias Klose : > Triggered by archive administrators and security people who don't want to care > about two copies of the OpenJDK code in a distribution, I tried to build cacao > as additional VM in the same source package and avoiding separate builds. You > can now call: > > ?$ java -version > ?java version "1.6.0_0" > ?OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) > ?OpenJDK Server VM (build 14.0-b08, mixed mode) > > ?$ java -cacao -version > ?java version "1.6.0_0" > ?OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) > ?CACAO (build 0.99.3+hg, compiled mode) > > The cacao bits are installed in /jre/lib//cacao, cacao is configured > like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the > icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. > The file jvm.cfg.in needs an additional line '-cacao KNOWN'. > > There is no configure/make stuff for IcedTea yet; I'm currently assembling this > directly in the packaging. > > Doing the same with Zero and with Shark? Didn't check yet, but maybe this would > need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for > the latter only. > > Ok to checkin these patches (without applying them)? > > ?Matthias > > --- openjdk/jdk/src/solaris/bin/i586/jvm.cfg.orig ? ? ? 2009-03-02 23:21:31.000000000 +0000 > +++ openjdk/jdk/src/solaris/bin/i586/jvm.cfg ? ?2009-03-02 23:21:48.000000000 +0000 > @@ -36,3 +36,4 @@ > ?-classic WARN > ?-native ERROR > ?-green ERROR > +-cacao KNOWN > --- openjdk/jdk/src/solaris/bin/ia64/jvm.cfg.orig ? ? ? 2009-03-02 23:21:31.000000000 +0000 > +++ openjdk/jdk/src/solaris/bin/ia64/jvm.cfg ? ?2009-03-02 23:21:48.000000000 +0000 > @@ -41,3 +41,4 @@ > ?-client IGNORE > ?-native ERROR > ?-green ERROR > +-cacao KNOWN > --- openjdk/jdk/src/solaris/bin/amd64/jvm.cfg.orig ? ? ?2009-03-02 23:21:31.000000000 +0000 > +++ openjdk/jdk/src/solaris/bin/amd64/jvm.cfg ? 2009-03-02 23:21:48.000000000 +0000 > @@ -37,3 +37,4 @@ > ?-classic WARN > ?-native ERROR > ?-green ERROR > +-cacao KNOWN > --- openjdk/jdk/src/share/bin/java.c.orig ? ? ? 2009-03-02 23:21:31.000000000 +0000 > +++ openjdk/jdk/src/share/bin/java.c ? ?2009-03-02 23:23:53.000000000 +0000 > @@ -199,6 +199,8 @@ > ? InvocationFunctions ifn; > ?}; > > +#define JNI_VERSION_CACAO 0xCACA0000 > + > ?/* > ?* Entry point. > ?*/ > @@ -360,6 +389,8 @@ > > ? ? { /* Create a new thread to create JVM and invoke main method */ > ? ? ? struct JavaMainArgs args; > + ? ? ?struct JDK1_1InitArgs cacao_args; > + ? ? ?int jvm_init_rv; > > ? ? ? args.argc = argc; > ? ? ? args.argv = argv; > @@ -367,7 +398,17 @@ > ? ? ? args.classname = classname; > ? ? ? args.ifn = ifn; > > - ? ? ?return ContinueInNewThread(JavaMain, threadStackSize, (void*)&args, ret); > + ? ? ?memset((void*)&cacao_args, 0, sizeof(cacao_args)); > + ? ? ?cacao_args.version = JNI_VERSION_CACAO; > + > + ? ? ?jvm_init_rv = ifn.GetDefaultJavaVMInitArgs(&cacao_args); > + ? ? ?if (_launcher_debug) > + ? ? ? printf("using cacao as VM: %s\n", (jvm_init_rv == 0) ? "yes" : "no"); > + > + ? ? ?if (jvm_init_rv == 0) > + ? ? ? return JavaMain((void*)&args); > + ? ? ?else > + ? ? ? return ContinueInNewThread(JavaMain, threadStackSize, (void*)&args, ret); > ? ? } > ?} > > > --- cacao/cacao/src/native/jni.c~ ? ? ? 2008-09-10 18:42:21.000000000 +0200 > +++ cacao/cacao/src/native/jni.c ? ? ? ?2009-03-02 22:33:23.000000000 +0100 > @@ -4295,6 +4295,8 @@ > > ?*******************************************************************************/ > > +#define JNI_VERSION_CACAO 0xCACA0000 > + > ?jint JNI_GetDefaultJavaVMInitArgs(void *vm_args) > ?{ > ? ? ? ?JavaVMInitArgs *_vm_args; > @@ -4310,6 +4312,7 @@ > > ? ? case JNI_VERSION_1_2: > ? ? case JNI_VERSION_1_4: > + ? ?case JNI_VERSION_CACAO: > ? ? ? ? ? ? ? ?_vm_args->ignoreUnrecognized = JNI_FALSE; > ? ? ? ? ? ? ? ?_vm_args->options = NULL; > ? ? ? ? ? ? ? ?_vm_args->nOptions = 0; > > Nice :) Does this work on platforms where we would default to zero (ppc, arm, etc.)? i.e. do you get zero as the main VM and cacao as the option? I presume these are headed for the patches subdirectory? How about a cacao subdirectory of patches rather than the cacao prefix to make things easier? Cheers, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 theBohemian at gmx.net Tue Mar 3 09:55:42 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Tue, 03 Mar 2009 18:55:42 +0100 Subject: building cacao as an additional VM In-Reply-To: <49AD6A15.3080901@ubuntu.com> References: <49AD6A15.3080901@ubuntu.com> Message-ID: <49AD6F1E.2010909@gmx.net> Hi Matthias, this is very cool stuff indeed. In embedded land (ie. ARM) this would mean that one can have nice and JVMTI-having Hotspot and decent JIT-having Cacao at the same time without wasting tons of MiB. Regards Robert Matthias Klose schrieb: > Triggered by archive administrators and security people who don't want to care > about two copies of the OpenJDK code in a distribution, I tried to build cacao > as additional VM in the same source package and avoiding separate builds. You > can now call: > > $ java -version > java version "1.6.0_0" > OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) > OpenJDK Server VM (build 14.0-b08, mixed mode) > > $ java -cacao -version > java version "1.6.0_0" > OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) > CACAO (build 0.99.3+hg, compiled mode) > > The cacao bits are installed in /jre/lib//cacao, cacao is configured > like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the > icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. > The file jvm.cfg.in needs an additional line '-cacao KNOWN'. > > There is no configure/make stuff for IcedTea yet; I'm currently assembling this > directly in the packaging. > > Doing the same with Zero and with Shark? Didn't check yet, but maybe this would > need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for > the latter only. > > Ok to checkin these patches (without applying them)? > > Matthias > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090303/22dbc6d3/signature.asc From aph at redhat.com Tue Mar 3 09:55:42 2009 From: aph at redhat.com (Andrew Haley) Date: Tue, 03 Mar 2009 17:55:42 +0000 Subject: building cacao as an additional VM In-Reply-To: <49AD6A15.3080901@ubuntu.com> References: <49AD6A15.3080901@ubuntu.com> Message-ID: <49AD6F1E.30603@redhat.com> Matthias Klose wrote: > Triggered by archive administrators and security people who don't want to care > about two copies of the OpenJDK code in a distribution, I tried to build cacao > as additional VM in the same source package and avoiding separate builds. You > can now call: > > $ java -version > java version "1.6.0_0" > OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) > OpenJDK Server VM (build 14.0-b08, mixed mode) > > $ java -cacao -version > java version "1.6.0_0" > OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) > CACAO (build 0.99.3+hg, compiled mode) > > The cacao bits are installed in /jre/lib//cacao, cacao is configured > like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the > icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. > The file jvm.cfg.in needs an additional line '-cacao KNOWN'. > > There is no configure/make stuff for IcedTea yet; I'm currently assembling this > directly in the packaging. > > Doing the same with Zero and with Shark? Didn't check yet, but maybe this would > need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for > the latter only. > > Ok to checkin these patches (without applying them)? This is wrong. CACAO should report java version "1.6.0_0" IcedTea6 Runtime Environment (pre-1.5-r92c4cc753f06) (foo.b14.baz-123) CACAO (build 0.99.3, JIT mode) Andrew. From Christian.Thalinger at Sun.COM Tue Mar 3 09:58:03 2009 From: Christian.Thalinger at Sun.COM (Christian Thalinger) Date: Tue, 03 Mar 2009 18:58:03 +0100 Subject: building cacao as an additional VM In-Reply-To: <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> References: <49AD6A15.3080901@ubuntu.com> <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> Message-ID: <1236103083.2239.102.camel@localhost.localdomain> On Tue, 2009-03-03 at 17:48 +0000, Andrew John Hughes wrote: > I presume these are headed for the patches subdirectory? How about a > cacao subdirectory of patches rather than the cacao prefix to make > things easier? Ahh, no, let's push it upstream. -- Christian From doko at ubuntu.com Tue Mar 3 10:00:30 2009 From: doko at ubuntu.com (Matthias Klose) Date: Tue, 03 Mar 2009 19:00:30 +0100 Subject: building cacao as an additional VM In-Reply-To: <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> References: <49AD6A15.3080901@ubuntu.com> <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> Message-ID: <49AD703E.4020507@ubuntu.com> Andrew John Hughes schrieb: > 2009/3/3 Matthias Klose : > Does this work on platforms where we would default to zero (ppc, arm, etc.)? > i.e. do you get zero as the main VM and cacao as the option? yes, as long as you don't change the default in jvm.cfg. > I presume these are headed for the patches subdirectory? How about a > cacao subdirectory of patches rather than the cacao prefix to make > things easier? sure, I can do this. I'll look at version string for the runtime environment first. Matthias From michi at complang.tuwien.ac.at Tue Mar 3 10:16:50 2009 From: michi at complang.tuwien.ac.at (Michael Starzinger) Date: Tue, 3 Mar 2009 19:16:50 +0100 Subject: building cacao as an additional VM In-Reply-To: <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> References: <49AD6A15.3080901@ubuntu.com> <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> Message-ID: <17FD7751-A27B-4559-8215-DBE77DA2F731@complang.tuwien.ac.at> On 03.03.2009, at 18:48, Andrew John Hughes wrote: > 2009/3/3 Matthias Klose : >> Triggered by archive administrators and security people who don't >> want to care >> about two copies of the OpenJDK code in a distribution, I tried to >> build cacao >> as additional VM in the same source package and avoiding separate >> builds. This is quite cool! > I presume these are headed for the patches subdirectory? How about a > cacao subdirectory of patches rather than the cacao prefix to make > things easier? I don't expect a lot more Cacao-specific patches, so I would still stick to the prefix option. Best regards, Michael From gnu_andrew at member.fsf.org Tue Mar 3 10:20:57 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 3 Mar 2009 18:20:57 +0000 Subject: building cacao as an additional VM In-Reply-To: <1236103083.2239.102.camel@localhost.localdomain> References: <49AD6A15.3080901@ubuntu.com> <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> <1236103083.2239.102.camel@localhost.localdomain> Message-ID: <17c6771e0903031020m2267705nfe162909789b8a49@mail.gmail.com> 2009/3/3 Christian Thalinger : > On Tue, 2009-03-03 at 17:48 +0000, Andrew John Hughes wrote: >> I presume these are headed for the patches subdirectory? How about a >> cacao subdirectory of patches rather than the cacao prefix to make >> things easier? > > Ahh, no, let's push it upstream. > > -- Christian > > The OpenJDK one, the CACAO one or both? ;) -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Christian.Thalinger at Sun.COM Tue Mar 3 10:28:29 2009 From: Christian.Thalinger at Sun.COM (Christian Thalinger) Date: Tue, 03 Mar 2009 19:28:29 +0100 Subject: building cacao as an additional VM In-Reply-To: <17c6771e0903031020m2267705nfe162909789b8a49@mail.gmail.com> References: <49AD6A15.3080901@ubuntu.com> <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> <1236103083.2239.102.camel@localhost.localdomain> <17c6771e0903031020m2267705nfe162909789b8a49@mail.gmail.com> Message-ID: <1236104909.2239.106.camel@localhost.localdomain> On Tue, 2009-03-03 at 18:20 +0000, Andrew John Hughes wrote: > The OpenJDK one, the CACAO one or both? ;) Eh... right... the CACAO one :-) Michi will do that, I guess. -- Christian From michi at complang.tuwien.ac.at Tue Mar 3 10:40:26 2009 From: michi at complang.tuwien.ac.at (Michael Starzinger) Date: Tue, 3 Mar 2009 19:40:26 +0100 Subject: building cacao as an additional VM In-Reply-To: <1236104909.2239.106.camel@localhost.localdomain> References: <49AD6A15.3080901@ubuntu.com> <17c6771e0903030948t13266302y7330d08f23af38cd@mail.gmail.com> <1236103083.2239.102.camel@localhost.localdomain> <17c6771e0903031020m2267705nfe162909789b8a49@mail.gmail.com> <1236104909.2239.106.camel@localhost.localdomain> Message-ID: On 03.03.2009, at 19:28, Christian Thalinger wrote: > On Tue, 2009-03-03 at 18:20 +0000, Andrew John Hughes wrote: >> The OpenJDK one, the CACAO one or both? ;) > > Eh... right... the CACAO one :-) Michi will do that, I guess. Yes. Best regards, Michael From omajid at redhat.com Tue Mar 3 12:47:24 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 03 Mar 2009 15:47:24 -0500 Subject: IcedTea6 Testing Message-ID: <49AD975C.20001@redhat.com> Hi everyone, Nightly results for JTreg and Mauve for IcedTea6 are now available at [1]. You can also view the archives at [2]. I also have set up a nightly script to send out emails if there are any regressions in the tests. The email are currently being sent out to the Testresults list [3]. This is temporary; once OpenJDK has an appropriate list, emails will be sent there instead. Cheers, Omair [1] http://icedtea.classpath.org/~omajid/testing.html [2] http://icedtea.classpath.org/~omajid/icedtea6_logs/ [3] http://icedtea.classpath.org/mailman/listinfo/testresults/ From gnu_andrew at member.fsf.org Tue Mar 3 13:33:07 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 3 Mar 2009 21:33:07 +0000 Subject: IcedTea6 Testing In-Reply-To: <49AD975C.20001@redhat.com> References: <49AD975C.20001@redhat.com> Message-ID: <17c6771e0903031333j1018c4a4m20dfc05c2663f597@mail.gmail.com> 2009/3/3 Omair Majid : > Hi everyone, > > Nightly results for JTreg and Mauve for IcedTea6 are now available at [1]. > You can also view the archives at [2]. > > I also have set up a nightly script to send out emails if there are any > regressions in the tests. The email are currently being sent out to the > Testresults list [3]. This is temporary; once OpenJDK has an appropriate > list, emails will be sent there instead. > > Cheers, > Omair > > [1] http://icedtea.classpath.org/~omajid/testing.html > [2] http://icedtea.classpath.org/~omajid/icedtea6_logs/ > [3] http://icedtea.classpath.org/mailman/listinfo/testresults/ > Nice work. Couple of things: 1. We should exclude the com.sun.jmx.snmp tests. They're never going to pass (unless someone somewhere is working on a replacement for this binary plug...) 2. Similarly, the Mauve tests should be excluding some of the gnu.* on IcedTea. Did we have a way of doing this? 3. Any chance of getting 7 included? :D -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Tue Mar 3 13:49:28 2009 From: mark at klomp.org (Mark Wielaard) Date: Tue, 03 Mar 2009 22:49:28 +0100 Subject: IcedTea6 Testing In-Reply-To: <49AD975C.20001@redhat.com> References: <49AD975C.20001@redhat.com> Message-ID: <1236116968.3557.2.camel@hermans.wildebeest.org> Hi Omair, On Tue, 2009-03-03 at 15:47 -0500, Omair Majid wrote: > I also have set up a nightly script to send out emails if there are any > regressions in the tests. Nice, thanks for setting this up. Could you post the scripts that produce these emails so others can also run them? And could you include the hg revision number in the emails plus distro, architecture, etc. Probably the output of -version should have all that. That way it is easier to identify what the results correspond to and to compare them with other results being send in. Thanks, Mark From omajid at redhat.com Tue Mar 3 13:56:32 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 03 Mar 2009 16:56:32 -0500 Subject: IcedTea6 Testing In-Reply-To: <17c6771e0903031333j1018c4a4m20dfc05c2663f597@mail.gmail.com> References: <49AD975C.20001@redhat.com> <17c6771e0903031333j1018c4a4m20dfc05c2663f597@mail.gmail.com> Message-ID: <49ADA790.8020502@redhat.com> Hi Andrew, Andrew John Hughes wrote: > Nice work. Couple of things: > > 1. We should exclude the com.sun.jmx.snmp tests. They're never going > to pass (unless someone somewhere is working on a replacement for this > binary plug...) I have no problem with this, but I dont know how to get jtreg to ignore tests. There is a @ignore keyword, but that would mean patching the test itself. Are people ok with applying such a patch to openjdk/jdk/test/com/sun/jmx/snmp/* in IcedTea6? > 2. Similarly, the Mauve tests should be excluding some of the gnu.* on > IcedTea. Did we have a way of doing this? '-exclude gnu' should do the trick. I will add it to the nightly tester. > 3. Any chance of getting 7 included? :D /me adds that to his todo list. Cheers, Omair From gnu_andrew at member.fsf.org Tue Mar 3 14:03:55 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 3 Mar 2009 22:03:55 +0000 Subject: IcedTea6 Testing In-Reply-To: <49ADA790.8020502@redhat.com> References: <49AD975C.20001@redhat.com> <17c6771e0903031333j1018c4a4m20dfc05c2663f597@mail.gmail.com> <49ADA790.8020502@redhat.com> Message-ID: <17c6771e0903031403q7a7f36fbye2a69881ced9e9df@mail.gmail.com> 2009/3/3 Omair Majid : > Hi Andrew, > > Andrew John Hughes wrote: >> >> Nice work. ?Couple of things: >> >> 1. We should exclude the com.sun.jmx.snmp tests. ?They're never going >> to pass (unless someone somewhere is working on a replacement for this >> binary plug...) > > I have no problem with this, but I dont know how to get jtreg to ignore > tests. There is a @ignore keyword, but that would mean patching the test > itself. Are people ok with applying such a patch to > openjdk/jdk/test/com/sun/jmx/snmp/* in IcedTea6? > I experimented with this in IcedTea7. You add something like: -exclude:$(abs_top_srcdir)/test/jtreg/excludelist.langtools.jtx to the jtreg invocation, where excludelist.langtools.jtx is just a list of the tests to exclude. e.g. # Fail to compile javax/imageio/metadata/DOML3Node.java javax/swing/border/Test4856008.java IcedTea7 currently excludes all tests known to fail and the exclude lists describe why. >> 2. Similarly, the Mauve tests should be excluding some of the gnu.* on >> IcedTea. ?Did we have a way of doing this? > > '-exclude gnu' should do the trick. I will add it to the nightly tester. > :) >> 3. Any chance of getting 7 included? :D > > /me adds that to his todo list. > Thanks! > Cheers, > Omair > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 doko at ubuntu.com Tue Mar 3 22:12:53 2009 From: doko at ubuntu.com (Matthias Klose) Date: Wed, 04 Mar 2009 07:12:53 +0100 Subject: version number of prerelease/snapshots Message-ID: <49AE1BE5.4060504@ubuntu.com> The version of the current snapshot is pre1.5, while in the past we did use the 'pre' after the version number. Was there a reason for this change, or can we just change it back to 1.5pre? The order of version numbers like 1.4, 1.4.1, pre1.5 1.5 gets wrong. Matthias From doko at ubuntu.com Tue Mar 3 22:29:34 2009 From: doko at ubuntu.com (Matthias Klose) Date: Wed, 04 Mar 2009 07:29:34 +0100 Subject: building cacao as an additional VM In-Reply-To: <49AD6F1E.30603@redhat.com> References: <49AD6A15.3080901@ubuntu.com> <49AD6F1E.30603@redhat.com> Message-ID: <49AE1FCE.2060208@ubuntu.com> Andrew Haley schrieb: > Matthias Klose wrote: >> Triggered by archive administrators and security people who don't want to care >> about two copies of the OpenJDK code in a distribution, I tried to build cacao >> as additional VM in the same source package and avoiding separate builds. You >> can now call: >> >> $ java -version >> java version "1.6.0_0" >> OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) >> OpenJDK Server VM (build 14.0-b08, mixed mode) >> >> $ java -cacao -version >> java version "1.6.0_0" >> OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) >> CACAO (build 0.99.3+hg, compiled mode) >> >> The cacao bits are installed in /jre/lib//cacao, cacao is configured >> like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the >> icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. >> The file jvm.cfg.in needs an additional line '-cacao KNOWN'. >> >> There is no configure/make stuff for IcedTea yet; I'm currently assembling this >> directly in the packaging. >> >> Doing the same with Zero and with Shark? Didn't check yet, but maybe this would >> need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for >> the latter only. >> >> Ok to checkin these patches (without applying them)? > > This is wrong. CACAO should report > > java version "1.6.0_0" > IcedTea6 Runtime Environment (pre-1.5-r92c4cc753f06) (foo.b14.baz-123) > CACAO (build 0.99.3, JIT mode) this is only wrong for hotspot builds, not for zero builds. the runtime is hardcoded in the version template, using System.getProperty("java.runtime.name") to differentiate between the two just returns the hardcoded name, which is Hotspot for Hotspot builds. Any suggestions? Matthias From gbenson at redhat.com Tue Mar 3 23:57:22 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 4 Mar 2009 07:57:22 +0000 Subject: building cacao as an additional VM In-Reply-To: <49AD6A15.3080901@ubuntu.com> References: <49AD6A15.3080901@ubuntu.com> Message-ID: <20090304075722.GA3218@redhat.com> Matthias Klose wrote: > Doing the same with Zero and with Shark? I wouldn't have thought it would be as useful. If you're on x86 or Sparc then there's no reason to use Zero/Shark apart from testing, in which case you probably won't want it spending the time building client and server too. And if you're not on x86 or Sparc then your patch will build Zero/Shark and CACAO, right? So you'll have both. Cheers, Gary -- http://gbenson.net/ From mark at klomp.org Tue Mar 3 23:57:32 2009 From: mark at klomp.org (Mark Wielaard) Date: Wed, 04 Mar 2009 08:57:32 +0100 Subject: version number of prerelease/snapshots In-Reply-To: <49AE1BE5.4060504@ubuntu.com> References: <49AE1BE5.4060504@ubuntu.com> Message-ID: <1236153452.3584.1.camel@hermans.wildebeest.org> Hi Matthias, On Wed, 2009-03-04 at 07:12 +0100, Matthias Klose wrote: > The version of the current snapshot is pre1.5, while in the past we did use the > 'pre' after the version number. Was there a reason for this change, or can we > just change it back to 1.5pre? The order of version numbers like 1.4, 1.4.1, > pre1.5 1.5 gets wrong. 1.Xpre sounds good to me. Cheers, Mark From mark at klomp.org Wed Mar 4 00:21:55 2009 From: mark at klomp.org (Mark Wielaard) Date: Wed, 04 Mar 2009 09:21:55 +0100 Subject: building cacao as an additional VM In-Reply-To: <49AD6A15.3080901@ubuntu.com> References: <49AD6A15.3080901@ubuntu.com> Message-ID: <1236154915.3584.24.camel@hermans.wildebeest.org> Hi Matthias, On Tue, 2009-03-03 at 18:34 +0100, Matthias Klose wrote: > Triggered by archive administrators and security people who don't want to care > about two copies of the OpenJDK code in a distribution, I tried to build cacao > as additional VM in the same source package and avoiding separate builds. This is really convenient. Thanks! > The cacao bits are installed in /jre/lib//cacao, cacao is configured > like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the > icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. > The file jvm.cfg.in needs an additional line '-cacao KNOWN'. You are introducing a new JNI_VERSION, is that really necessary? Could you use jvmpath or the result of CheckJVMType () to select whether to run in an new thread or not? > Doing the same with Zero and with Shark? Didn't check yet, but maybe this would > need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for > the latter only. Having the same for zero would indeed be pretty cool. Then you can easily compare the same build between -client/-server/-cacao/-zero. I haven't looked yet how much work that would be. > There is no configure/make stuff for IcedTea yet; I'm currently assembling this > directly in the packaging. > > Ok to checkin these patches (without applying them)? I would like to see configure stuff to enable this. That makes it easier for everybody to compile and test it. Cheers, Mark From gbenson at redhat.com Wed Mar 4 00:45:59 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 4 Mar 2009 08:45:59 +0000 Subject: building cacao as an additional VM In-Reply-To: <1236154915.3584.24.camel@hermans.wildebeest.org> References: <49AD6A15.3080901@ubuntu.com> <1236154915.3584.24.camel@hermans.wildebeest.org> Message-ID: <20090304084558.GB3218@redhat.com> Mark Wielaard wrote: > Having the same for zero would indeed be pretty cool. Then you can > easily compare the same build between -client/-server/-cacao/-zero. > I haven't looked yet how much work that would be. The problem with that is that on non-x86, non-Sparc builds, there will be no j2re-image/lib/$ARCH/server/libjvm.so, and that causes all kinds of problems with the build. The old core-build patch used to put the build in j2re-image/lib/$ARCH/core/libjvm.so, and that needed so much patching and caused so many problems with the rpm that it seemed like the path of least resistance to put it in server even though it wasn't a server jit at all. Cheers, Gary -- http://gbenson.net/ From doko at ubuntu.com Wed Mar 4 02:05:13 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Wed, 04 Mar 2009 10:05:13 +0000 Subject: changeset in /hg/icedtea6: 2009-03-04 Matthias Klose changeset 22425c2ed9a9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=22425c2ed9a9 description: 2009-03-04 Matthias Klose * configure.ac: Set version to 1.5pre. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ configure.ac | 2 +- diffs (20 lines): diff -r 1c13fc28bd88 -r 22425c2ed9a9 ChangeLog --- a/ChangeLog Tue Mar 03 09:31:37 2009 +0000 +++ b/ChangeLog Wed Mar 04 11:01:54 2009 +0100 @@ -1,3 +1,7 @@ 2009-03-03 Andrew John Hughes + + * configure.ac: Set version to 1.5pre. + 2009-03-03 Andrew John Hughes * AUTHORS: Add Michael Franz. diff -r 1c13fc28bd88 -r 22425c2ed9a9 configure.ac --- a/configure.ac Tue Mar 03 09:31:37 2009 +0000 +++ b/configure.ac Wed Mar 04 11:01:54 2009 +0100 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [pre-1.5], [distro-p -AC_INIT([icedtea6], [pre-1.5], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.5pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.10 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) AC_CANONICAL_HOST From aph at redhat.com Wed Mar 4 02:27:51 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 04 Mar 2009 10:27:51 +0000 Subject: building cacao as an additional VM In-Reply-To: <49AE1FCE.2060208@ubuntu.com> References: <49AD6A15.3080901@ubuntu.com> <49AD6F1E.30603@redhat.com> <49AE1FCE.2060208@ubuntu.com> Message-ID: <49AE57A7.1060804@redhat.com> Matthias Klose wrote: > Andrew Haley schrieb: >> Matthias Klose wrote: >>> Triggered by archive administrators and security people who don't want to care >>> about two copies of the OpenJDK code in a distribution, I tried to build cacao >>> as additional VM in the same source package and avoiding separate builds. You >>> can now call: >>> >>> $ java -version >>> java version "1.6.0_0" >>> OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) >>> OpenJDK Server VM (build 14.0-b08, mixed mode) >>> >>> $ java -cacao -version >>> java version "1.6.0_0" >>> OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) >>> CACAO (build 0.99.3+hg, compiled mode) >>> >>> The cacao bits are installed in /jre/lib//cacao, cacao is configured >>> like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the >>> icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. >>> The file jvm.cfg.in needs an additional line '-cacao KNOWN'. >>> >>> There is no configure/make stuff for IcedTea yet; I'm currently assembling this >>> directly in the packaging. >>> >>> Doing the same with Zero and with Shark? Didn't check yet, but maybe this would >>> need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for >>> the latter only. >>> >>> Ok to checkin these patches (without applying them)? >> This is wrong. CACAO should report >> >> java version "1.6.0_0" >> IcedTea6 Runtime Environment (pre-1.5-r92c4cc753f06) (foo.b14.baz-123) >> CACAO (build 0.99.3, JIT mode) > > this is only wrong for hotspot builds, not for zero builds. It's wrong when running on CACAO, however it was built. > the runtime is hardcoded in the version template, using > System.getProperty("java.runtime.name") to differentiate between the two just > returns the hardcoded name, which is Hotspot for Hotspot builds. Any suggestions? There's no alternative but a runtime check for the VM that it's running on. Andrew. From gbenson at redhat.com Wed Mar 4 07:05:53 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 4 Mar 2009 15:05:53 +0000 Subject: Shark generic inliner Message-ID: <20090304150553.GA8263@redhat.com> Hi all, After messing around with inlining accessor methods and empty methods last week I realised there are a lot of methods that are generally inlinable. Over the last few days I've been experimenting with a more generic inliner, which I'm about to commit. Quick and dirty SPECjvm98 numbers (not produced in compliance with the SPECjvm98 run rules and so not comparable with SPECjvm98 metrics) look like this: Original Inlining Speedup compress 11.676 11.680 0.0% jess 8.907 8.438 5.3% db 16.604 16.300 1.8% javac 13.770 13.041 5.3% mpegaudio 8.137 7.857 3.4% mtrt 7.817 7.833 -0.2% jack 10.116 9.947 1.7% The numbers aren't great, but they're better than nothing. I suspect that's because the number of methods available for inlining is small compared with the number of methods in total. Partly this is down to the Java language itself -- a lot of calls are virtual or interface, and most of these can't be inlined -- and partly this is because of restrictions in Shark which I'm going to see if I can work around. I'm not going to attach a patch to this message. The inliner itself is small, 700 lines or so, but to make it work I needed to refactor a lot of SharkBlock and SharkState. The code is all the same, just in different places. The main part of the refactoring is that I split SharkBlock into three classes, one of them new. The new class heirachy is as follows: SharkBlock (in sharkBlock.[ch]pp) +- SharkTopLevelBlock (in sharkTopLevelBlock.[ch]pp) +- SharkInlineBlock (in sharkInliner.cpp) SharkBlock is all the common code, SharkTopLevelBlock extends that for non-inlined blocks, and SharkInlineBlock extends that for inlined blocks. The other part of the refactoring is that all the code in the slightly odd class SharkTrackingState is now in SharkState, and the two other subclasses of SharkState (SharkEntryState and SharkPHIState) have been moved into the files in which they're used (sharkFunction.cpp and sharkTopLevelBlock.cpp respectively). Enjoy! Cheers, Gary -- http://gbenson.net/ From gbenson at redhat.com Wed Mar 4 07:45:13 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 04 Mar 2009 15:45:13 +0000 Subject: changeset in /hg/icedtea6: 2009-03-04 Gary Benson changeset b593d3ef9dce in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b593d3ef9dce description: 2009-03-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Moved partly into... * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise into... * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: New file. * ports/hotspot/src/share/vm/shark/sharkState.hpp: Merged SharkTrackingState into SharkState, and moved SharkEntryState into sharkFunction.cpp and SharkPHIState into sharkTopLevelBlock.cpp. * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: s/SharkBlock/SharkTopLevelBlock/g * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. * ports/hotspot/src/share/vm/shark/shark_globals.hpp (SharkMaxInlineSize): New parameter. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::GetBlockInsertionPoint): New method. (SharkBuilder::CreateBlock): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 18 files changed, 3491 insertions(+), 2450 deletions(-) ChangeLog | 33 ports/hotspot/src/share/vm/includeDB_shark | 106 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 1904 +-------------- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 488 +-- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 29 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 6 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 74 ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 24 ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 761 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.hpp | 32 ports/hotspot/src/share/vm/shark/sharkMonitor.cpp | 4 ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 6 ports/hotspot/src/share/vm/shark/sharkState.cpp | 243 - ports/hotspot/src/share/vm/shark/sharkState.hpp | 104 ports/hotspot/src/share/vm/shark/sharkState.inline.hpp | 59 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 1716 +++++++++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 344 ++ ports/hotspot/src/share/vm/shark/shark_globals.hpp | 8 diffs (truncated from 6546 to 500 lines): diff -r 22425c2ed9a9 -r b593d3ef9dce ChangeLog --- a/ChangeLog Wed Mar 04 11:01:54 2009 +0100 +++ b/ChangeLog Wed Mar 04 10:41:13 2009 -0500 @@ -1,3 +1,36 @@ 2009-03-04 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Moved partly into... + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise into... + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: New file. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp: + Merged SharkTrackingState into SharkState, and moved + SharkEntryState into sharkFunction.cpp and SharkPHIState + into sharkTopLevelBlock.cpp. + * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: + s/SharkBlock/SharkTopLevelBlock/g + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/shark_globals.hpp + (SharkMaxInlineSize): New parameter. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::GetBlockInsertionPoint): New method. + (SharkBuilder::CreateBlock): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-04 Matthias Klose * configure.ac: Set version to 1.5pre. diff -r 22425c2ed9a9 -r b593d3ef9dce ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 04 11:01:54 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 04 10:41:13 2009 -0500 @@ -24,6 +24,25 @@ // // NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps! + +sharkBlock.cpp debug.hpp +sharkBlock.cpp bytecodes.hpp +sharkBlock.cpp llvmHeaders.hpp +sharkBlock.cpp shark_globals.hpp +sharkBlock.cpp sharkBlock.hpp +sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkRuntime.hpp +sharkBlock.cpp sharkState.inline.hpp +sharkBlock.cpp sharkValue.inline.hpp + +sharkBlock.hpp allocation.hpp +sharkBlock.hpp ciMethod.hpp +sharkBlock.hpp ciStreams.hpp +sharkBlock.hpp debug.hpp +sharkBlock.hpp llvmHeaders.hpp +sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkState.hpp +sharkBlock.hpp sharkValue.hpp ciMethod.cpp ciTypeFlow.hpp ciMethod.cpp methodOop.hpp @@ -63,33 +82,35 @@ shark_globals.hpp shark_globals.hpp shark_globals_.hpp shark_globals.hpp globals.hpp -sharkBlock.cpp allocation.hpp -sharkBlock.cpp bytecodes.hpp -sharkBlock.cpp ciField.hpp -sharkBlock.cpp ciStreams.hpp -sharkBlock.cpp ciType.hpp -sharkBlock.cpp ciTypeFlow.hpp -sharkBlock.cpp debug.hpp -sharkBlock.cpp llvmHeaders.hpp -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.inline.hpp - -sharkBlock.hpp allocation.hpp -sharkBlock.hpp bytecodes.hpp -sharkBlock.hpp ciStreams.hpp -sharkBlock.hpp ciType.hpp -sharkBlock.hpp ciTypeFlow.hpp -sharkBlock.hpp llvmHeaders.hpp -sharkBlock.hpp sharkBuilder.hpp -sharkBlock.hpp sharkFunction.hpp -sharkBlock.hpp sharkMonitor.hpp -sharkBlock.hpp sharkState.hpp -sharkBlock.hpp sharkValue.inline.hpp +sharkTopLevelBlock.cpp allocation.hpp +sharkTopLevelBlock.cpp bytecodes.hpp +sharkTopLevelBlock.cpp ciField.hpp +sharkTopLevelBlock.cpp ciStreams.hpp +sharkTopLevelBlock.cpp ciType.hpp +sharkTopLevelBlock.cpp ciTypeFlow.hpp +sharkTopLevelBlock.cpp debug.hpp +sharkTopLevelBlock.cpp llvmHeaders.hpp +sharkTopLevelBlock.cpp shark_globals.hpp +sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp +sharkTopLevelBlock.cpp sharkBuilder.hpp +sharkTopLevelBlock.cpp sharkConstantPool.hpp +sharkTopLevelBlock.cpp sharkInliner.hpp +sharkTopLevelBlock.cpp sharkRuntime.hpp +sharkTopLevelBlock.cpp sharkState.inline.hpp +sharkTopLevelBlock.cpp sharkValue.inline.hpp + +sharkTopLevelBlock.hpp allocation.hpp +sharkTopLevelBlock.hpp bytecodes.hpp +sharkTopLevelBlock.hpp ciStreams.hpp +sharkTopLevelBlock.hpp ciType.hpp +sharkTopLevelBlock.hpp ciTypeFlow.hpp +sharkTopLevelBlock.hpp llvmHeaders.hpp +sharkTopLevelBlock.hpp sharkBlock.hpp +sharkTopLevelBlock.hpp sharkBuilder.hpp +sharkTopLevelBlock.hpp sharkFunction.hpp +sharkTopLevelBlock.hpp sharkMonitor.hpp +sharkTopLevelBlock.hpp sharkState.inline.hpp +sharkTopLevelBlock.hpp sharkValue.inline.hpp sharkBuilder.cpp ciMethod.hpp sharkBuilder.cpp debug.hpp @@ -163,8 +184,8 @@ sharkConstantPool.cpp sharkConstantPool.hpp allocation.hpp sharkConstantPool.hpp llvmHeaders.hpp -sharkConstantPool.hpp sharkBlock.hpp sharkConstantPool.hpp sharkBuilder.hpp +sharkConstantPool.hpp sharkTopLevelBlock.hpp sharkEntry.cpp sharkEntry.hpp @@ -175,12 +196,12 @@ sharkFunction.cpp sharkFunction.cpp debug.hpp sharkFunction.cpp llvmHeaders.hpp sharkFunction.cpp shark_globals.hpp -sharkFunction.cpp sharkBlock.hpp sharkFunction.cpp sharkBuilder.hpp sharkFunction.cpp sharkEntry.hpp sharkFunction.cpp sharkFunction.hpp sharkFunction.cpp sharkMonitor.hpp sharkFunction.cpp sharkState.inline.hpp +sharkFunction.cpp sharkTopLevelBlock.hpp sharkFunction.hpp allocation.hpp sharkFunction.hpp ciEnv.hpp @@ -189,11 +210,25 @@ sharkFunction.hpp sharkFunction.hpp llvmHeaders.hpp sharkFunction.hpp sharkBuilder.hpp +sharkInliner.cpp allocation.hpp +sharkInliner.cpp bytecodes.hpp +sharkInliner.cpp ciField.hpp +sharkInliner.cpp ciMethod.hpp +sharkInliner.cpp ciStreams.hpp +sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkInliner.hpp +sharkInliner.cpp sharkState.inline.hpp +sharkInliner.cpp sharkValue.inline.hpp + +sharkInliner.hpp allocation.hpp +sharkInliner.hpp ciMethod.hpp +sharkInliner.hpp sharkState.inline.hpp + sharkMonitor.cpp llvmHeaders.hpp -sharkMonitor.cpp sharkBlock.hpp sharkMonitor.cpp sharkMonitor.hpp sharkMonitor.cpp sharkRuntime.hpp sharkMonitor.cpp sharkState.inline.hpp +sharkMonitor.cpp sharkTopLevelBlock.hpp sharkMonitor.hpp allocation.hpp sharkMonitor.hpp llvmHeaders.hpp @@ -218,21 +253,22 @@ sharkState.cpp sharkState.cpp allocation.hpp sharkState.cpp ciType.hpp sharkState.cpp ciTypeFlow.hpp -sharkState.cpp sharkBlock.hpp sharkState.cpp sharkBuilder.hpp +sharkState.cpp sharkCacheDecache.hpp sharkState.cpp sharkState.inline.hpp +sharkState.cpp sharkTopLevelBlock.hpp sharkState.cpp sharkType.hpp sharkState.cpp sharkValue.inline.hpp sharkState.hpp allocation.hpp +sharkState.hpp ciMethod.hpp +sharkState.hpp llvmHeaders.hpp sharkState.hpp sharkBuilder.hpp -sharkState.hpp sharkFunction.hpp -sharkState.hpp sharkValue.inline.hpp -sharkState.hpp vmreg.hpp +sharkState.hpp sharkValue.hpp sharkState.inline.hpp sharkBlock.hpp +sharkState.inline.hpp sharkBuilder.hpp sharkState.inline.hpp sharkState.hpp -sharkState.inline.hpp sharkCacheDecache.hpp sharkStateScanner.cpp sharkState.inline.hpp sharkStateScanner.cpp sharkStateScanner.hpp diff -r 22425c2ed9a9 -r b593d3ef9dce ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 04 11:01:54 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 04 10:41:13 2009 -0500 @@ -25,112 +25,26 @@ #include "incls/_precompiled.incl" #include "incls/_sharkBlock.cpp.incl" -#include "ciArrayKlass.hpp" // XXX fuck you makeDeps -#include "ciObjArrayKlass.hpp" // XXX likewise using namespace llvm; -void SharkBlock::enter(SharkBlock* predecessor, bool is_exception) -{ - // This block requires phis: - // - if it is entered more than once - // - if it is an exception handler, because in which - // case we assume it's entered more than once. - // - if the predecessor will be compiled after this - // block, in which case we can't simple propagate - // the state forward. - if (!needs_phis() && - (entered() || - is_exception || - (predecessor && predecessor->index() >= index()))) - _needs_phis = true; - - // Recurse into the tree - if (!entered()) { - _entered = true; - - if (!has_trap()) { - for (int i = 0; i < num_successors(); i++) { - successor(i)->enter(this, false); - } - for (int i = 0; i < num_exceptions(); i++) { - exception(i)->enter(this, true); - } - } - } -} - -void SharkBlock::initialize() -{ - char name[28]; - snprintf(name, sizeof(name), - "bci_%d%s", - start(), is_private_copy() ? "_private_copy" : ""); - _entry_block = function()->CreateBlock(name); -} - -void SharkBlock::acquire_method_lock() -{ - Value *object; - if (target()->is_static()) { - SharkConstantPool constants(this); - object = constants.java_mirror(); - } - else { - object = local(0)->jobject_value(); - } - iter()->force_bci(start()); // for the decache - function()->monitor(0)->acquire(this, object); - check_pending_exception(false); -} - -void SharkBlock::release_method_lock() -{ - function()->monitor(0)->release(this); - - // We neither need nor want to check for pending exceptions here. - // This method is only called by handle_return, which copes with - // them implicitly: - // - if a value is being returned then we just carry on as normal; - // the caller will see the pending exception and handle it. - // - if an exception is being thrown then that exception takes - // priority and ours will be ignored. -} - -void SharkBlock::parse() +void SharkBlock::parse_bytecode(int start, int limit) { SharkValue *a, *b, *c, *d; int i; - builder()->SetInsertPoint(entry_block()); - - if (has_trap()) { - iter()->force_bci(start()); - - current_state()->decache_for_trap(); - builder()->CreateCall2( - SharkRuntime::uncommon_trap(), - thread(), - LLVMValue::jint_constant(trap_index())); - builder()->CreateRetVoid(); - return; - } - - iter()->reset_to_bci(start()); - bool successors_done = false; - while (iter()->next() != ciBytecodeStream::EOBC() && bci() < limit()) { - NOT_PRODUCT(a = b = c = d = NULL); + iter()->reset_to_bci(start); + while (iter()->next_bci() < limit) { + NOT_PRODUCT(a = b = c = d = NULL); + iter()->next(); if (SharkTraceBytecodes) tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); - if(UseLoopSafepoints) { - int len; - + if (UseLoopSafepoints) { // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts // the safepoint before the lcmp rather than before the if. // Maybe we should do this too. See parse2.cpp for details. - switch (bc()) { case Bytecodes::_goto: case Bytecodes::_ifnull: @@ -164,15 +78,15 @@ void SharkBlock::parse() add_safepoint(); break; } - len = switch_table_length(); - for (i = 0; i < len; i++) { + int len = switch_table_length(); + for (int i = 0; i < len; i++) { if (switch_dest(i) <= bci()) { add_safepoint(); break; } } break; - } + } } switch (bc()) { @@ -809,19 +723,16 @@ void SharkBlock::parse() case Bytecodes::_goto: case Bytecodes::_goto_w: - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_goto(); break; case Bytecodes::_jsr: case Bytecodes::_jsr_w: - push(SharkValue::create_returnAddress(iter()->next_bci())); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_jsr(); break; case Bytecodes::_ret: - assert(local(iter()->get_index())->returnAddress_value() == - successor(ciTypeFlow::GOTO_TARGET)->start(), "should be"); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_ret(); break; case Bytecodes::_ifnull: @@ -831,11 +742,13 @@ void SharkBlock::parse() do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop()); break; case Bytecodes::_if_acmpeq: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_EQ, b, a); break; case Bytecodes::_if_acmpne: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_NE, b, a); break; case Bytecodes::_ifeq: @@ -857,34 +770,39 @@ void SharkBlock::parse() do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop()); break; case Bytecodes::_if_icmpeq: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_EQ, b, a); break; case Bytecodes::_if_icmpne: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_NE, b, a); break; case Bytecodes::_if_icmplt: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SLT, b, a); break; case Bytecodes::_if_icmple: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SLE, b, a); break; case Bytecodes::_if_icmpgt: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SGT, b, a); break; case Bytecodes::_if_icmpge: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SGE, b, a); break; case Bytecodes::_tableswitch: case Bytecodes::_lookupswitch: do_switch(); - successors_done = true; break; case Bytecodes::_invokestatic: @@ -923,533 +841,58 @@ void SharkBlock::parse() ShouldNotReachHere(); } } - - if (falls_through()) { - builder()->CreateBr(successor(ciTypeFlow::FALL_THROUGH)->entry_block()); - } - - if (!successors_done) { - for (int i = 0; i < num_successors(); i++) - successor(i)->add_incoming(current_state()); - } -} - -SharkBlock* SharkBlock::bci_successor(int bci) const -{ - // XXX now with Linear Search Technology (tm) - for (int i = 0; i < num_successors(); i++) { - ciTypeFlow::Block *successor = ciblock()->successors()->at(i); - if (successor->start() == bci) - return function()->block(successor->pre_order()); - } - ShouldNotReachHere(); -} - -void SharkBlock::check_zero(SharkValue *value) -{ - if (value->zero_checked()) - return; - - BasicBlock *zero = function()->CreateBlock("zero"); - BasicBlock *not_zero = function()->CreateBlock("not_zero"); - - Value *a, *b; - switch (value->basic_type()) { - case T_BYTE: - case T_CHAR: - case T_SHORT: - case T_INT: - a = value->jint_value(); - b = LLVMValue::jint_constant(0); - break; - case T_LONG: - a = value->jlong_value(); - b = LLVMValue::jlong_constant(0); - break; - case T_OBJECT: - case T_ARRAY: - a = value->jobject_value(); - b = LLVMValue::LLVMValue::null(); - break; +} + +SharkState* SharkBlock::initial_current_state() +{ + return new SharkState(entry_state()); +} + +int SharkBlock::switch_default_dest() +{ + return iter()->get_dest_table(0); From gnu_andrew at member.fsf.org Wed Mar 4 07:47:03 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 4 Mar 2009 15:47:03 +0000 Subject: Status of IcedTea7 Message-ID: <17c6771e0903040747q4bbf6ec2t765ffafe9fdb8300@mail.gmail.com> I'm about to push through a set of patches which will bump IcedTea7 to the latest build drop (b49) and merged the latest IcedTea6 patches in. For IcedTea6 this time round, I've been using the Mercurial transplant extension (http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension) mentioned by Mark Wielaard. This made it possible to just ignore quite a few patches that were irrelevant for 7, but it wasn't by any means simple. A lot of IcedTea6 patches generate merge conflicts and so the process would stall on these a lot. I basically got into a series of doing: 1. hg transplant -s $HOME/projects/openjdk/icedtea6 --log 2. Fix conflicts 3. hg resolve -m $(conflicted files) 3. hg transplant --continue If anyone knows a better way, let me know. The biggest issue was that unlike a direct merge it didn't spot that the plugin code moved on the 7 tree from rt to overlays (the same should probably happen on 6 so we don't piggyback the binary plug system any more and instead build with IMPORT_BINARY_PLUGS). I think it's also a case of there were a lot of patches that would not have merged cleanly either way e.g. the VisualVM stuff was never going to go in cleanly either way due to its extensive changes to Makefile.am. I've also been pushing patches to my new http://icedtea.classpath.org/people/andrew/icedtea branch as I go, and that seems to have worked without a hitch. If you spot any problems, let me know. Happy hacking, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Wed Mar 4 08:11:23 2009 From: mark at klomp.org (Mark Wielaard) Date: Wed, 04 Mar 2009 17:11:23 +0100 Subject: [Fwd: Re: Regression in IcedTea6 JTreg Results - hotspot] Message-ID: <1236183083.4825.16.camel@fedora.wildebeest.org> Fixed mailinglist address to distro-pkg-dev at openjdk.java.net -------------- next part -------------- An embedded message was scrubbed... From: Mark Wielaard Subject: Re: Regression in IcedTea6 JTreg Results - hotspot Date: Wed, 04 Mar 2009 17:02:49 +0100 Size: 5054 Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090304/08e7981c/attachment.nws From omajid at redhat.com Wed Mar 4 08:52:57 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 04 Mar 2009 11:52:57 -0500 Subject: Regression in IcedTea6 JTreg Results - hotspot In-Reply-To: <1236182569.4825.15.camel@fedora.wildebeest.org> References: <200903040455.n244tv13016052@ns3.rdu.redhat.com> <1236182569.4825.15.camel@fedora.wildebeest.org> Message-ID: <49AEB1E9.7040205@redhat.com> Hi Mark, Mark Wielaard wrote: > Hi Omair, > > On Tue, 2009-03-03 at 23:55 -0500, IcedTea6 JTreg wrote: >> Recent commiters: >> Mark Wielaard >> Andrew John Hughes >> Gary Benson >> >> Newly failing tests: >> compiler/6775880/Test.java > > And it is correct. I am the "guilty party". It would probably help to > have the full hg description of the changes with the above list. And > maybe add the suspects to the CC so they have a chance to defend > themselves :) Nice to see that the script actually works :) I will try and add the complete changelog to the emails. As for cc'ing the suspects, I would like to wait for a few days to iron out any bugs before I enable it. > > So, the full failure is: > > #section:main > ----------messages:(3/353)---------- > command: main -server -Xbatch -XX:+DoEscapeAnalysis -XX:+DeoptimizeALot -XX:CompileCommand=exclude,java.lang.AbstractStringBuilder::appendTest > reason: User specified action: run main/othervm -server -Xbatch -XX:+DoEscapeAnalysis -XX:+DeoptimizeALot -XX:CompileCommand=exclude,java.lang.AbstractStringBuilder::append Test > elapsed time (seconds): 0.059 > ----------System.out:(0/0)---------- > ----------System.err:(2/84)---------- > Unrecognized VM option '+DeoptimizeALot' > Could not create the Java virtual machine. > result: Failed. Unexpected exit from test [exit code: 1] > > This comes from: > > changeset: 1412:f03bf9944657 > user: Mark Wielaard > date: Mon Mar 02 22:19:24 2009 +0100 > files: ChangeLog hotspot.map > description: > * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). > > This has been "fixed" in HS15 with the following patch: > > changeset: 564:323728917cf4 > user: kvn > date: Thu Feb 05 13:38:52 2009 -0800 > files: src/share/vm/runtime/arguments.cpp > src/share/vm/runtime/globals.hpp > test/compiler/6775880/Test.java > description: > 6788376: allow to ignore unrecognized VM options > Summary: Add new product flag -XX:+IgnoreUnrecognizedVMOptions > Reviewed-by: ysr, xlu > > Will backport. > > Still looking where exactly the +DeoptimizeALot flag disappeared to, > cannot immediately pinpoint the exact hotspot patch. > > Thanks, > > Mark > Cheers, Omair From bugzilla-daemon at icedtea.classpath.org Thu Mar 5 00:39:30 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 05 Mar 2009 08:39:30 +0000 Subject: [Bug 221] javac.in and javah.in eat up white space arguments Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=221 ------- Comment #2 from doko at ubuntu.com 2009-03-05 08:39 ------- no, it's just hidden, because the Makefile now quotes the \' \' quotes. -- 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 Thu Mar 5 01:42:06 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 05 Mar 2009 09:42:06 +0000 Subject: changeset in /hg/icedtea6: 2009-03-05 Gary Benson changeset a737ec21e449 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a737ec21e449 description: 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInliner::may_be_inlinable): Bail out early on constructors. diffstat: 2 files changed, 13 insertions(+) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 8 ++++++++ diffs (31 lines): diff -r b593d3ef9dce -r a737ec21e449 ChangeLog --- a/ChangeLog Wed Mar 04 10:41:13 2009 -0500 +++ b/ChangeLog Thu Mar 05 09:41:58 2009 +0000 @@ -1,3 +1,8 @@ 2009-03-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInliner::may_be_inlinable): Bail out early on constructors. + 2009-03-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. diff -r b593d3ef9dce -r a737ec21e449 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Mar 04 10:41:13 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Mar 05 09:41:58 2009 +0000 @@ -226,7 +226,15 @@ bool SharkInliner::may_be_inlinable(ciMe if (target->has_exception_handlers() || target->has_jsrs()) return false; + // Don't try to inline constructors, as they must + // eventually call Object. which we can't inline. + // Note that this catches too, but why would + // we be compiling that? + if (target->is_initializer()) + return false; + // Mustn't inline Object. + // Should be caught by the above, but just in case... if (target->intrinsic_id() == vmIntrinsics::_Object_init) return false; From gbenson at redhat.com Thu Mar 5 05:45:11 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 05 Mar 2009 13:45:11 +0000 Subject: changeset in /hg/icedtea6: 2009-03-05 Gary Benson changeset c5a65faa56e2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c5a65faa56e2 description: 2009-03-05 Gary Benson * patches/hotspot/default/icedtea-shark.patch (ciInstanceKlass::is_cache_entry_resolved): New method. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp (SharkConstantPool::target): Likewise. * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp (SharkConstantPool::cache_entry_at): Don't emit code to resolve entry if the entry is resolved at compile time. diffstat: 4 files changed, 50 insertions(+), 2 deletions(-) ChangeLog | 10 +++++ patches/hotspot/default/icedtea-shark.patch | 31 ++++++++++++++++ ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp | 5 ++ ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 6 ++- diffs (98 lines): diff -r a737ec21e449 -r c5a65faa56e2 ChangeLog --- a/ChangeLog Thu Mar 05 09:41:58 2009 +0000 +++ b/ChangeLog Thu Mar 05 13:44:56 2009 +0000 @@ -1,3 +1,13 @@ 2009-03-05 Gary Benson + + * patches/hotspot/default/icedtea-shark.patch + (ciInstanceKlass::is_cache_entry_resolved): New method. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp + (SharkConstantPool::target): Likewise. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp + (SharkConstantPool::cache_entry_at): Don't emit code to + resolve entry if the entry is resolved at compile time. + 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp diff -r a737ec21e449 -r c5a65faa56e2 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Thu Mar 05 09:41:58 2009 +0000 +++ b/patches/hotspot/default/icedtea-shark.patch Thu Mar 05 13:44:56 2009 +0000 @@ -363,3 +363,34 @@ } // ------------------------------------------------------------------ +diff -r 5297ff20101d openjdk-ecj/hotspot/src/share/vm/ci/ciInstanceKlass.hpp +--- openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp Mon Dec 15 15:32:37 2008 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp Thu Mar 05 11:48:56 2009 +0000 +@@ -198,4 +198,9 @@ + // What kind of ciObject is this? + bool is_instance_klass() { return true; } + bool is_java_klass() { return true; } ++ ++#ifdef SHARK ++ // Is this entry in the constant pool cache resolved? ++ bool is_cache_entry_resolved(int index, Bytecodes::Code opcode); ++#endif // SHARK + }; +diff -r 5297ff20101d openjdk-ecj/hotspot/src/share/vm/ci/ciInstanceKlass.cpp +--- openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp Mon Dec 15 15:32:37 2008 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp Thu Mar 05 11:48:56 2009 +0000 +@@ -548,3 +548,14 @@ + } + return impl; + } ++ ++#ifdef SHARK ++// ------------------------------------------------------------------ ++// ciInstanceKlass::is_cache_entry_resolved ++// ++// Is this entry in the constant pool cache resolved? ++bool ciInstanceKlass::is_cache_entry_resolved(int index, Bytecodes::Code opcode) { ++ VM_ENTRY_MARK; ++ return get_instanceKlass()->constants()->cache()->entry_at(index)->is_resolved(opcode); ++} ++#endif // SHARK diff -r a737ec21e449 -r c5a65faa56e2 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Thu Mar 05 09:41:58 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Thu Mar 05 13:44:56 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 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 @@ -98,6 +98,9 @@ Value *SharkConstantPool::cache_entry_at SharkType::cpCacheEntry_type()); // Resolve the entry if necessary + if (target()->holder()->is_cache_entry_resolved(which, block()->bc())) + return entry; + int shift; switch (ConstantPoolCacheEntry::bytecode_number(block()->bc())) { case 1: diff -r a737ec21e449 -r c5a65faa56e2 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp Thu Mar 05 09:41:58 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp Thu Mar 05 13:44:56 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 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 @@ -43,6 +43,10 @@ class SharkConstantPool : public StackOb { return block()->builder(); } + ciMethod* target() const + { + return block()->target(); + } llvm::Value* method() const { return block()->method(); From gbenson at redhat.com Thu Mar 5 05:51:45 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 5 Mar 2009 13:51:45 +0000 Subject: Shark improved constant pool cache access Message-ID: <20090305135145.GA21669@redhat.com> Hi all, The patch I just pushed makes Shark omit the code to resolve constant pool cache entries for entries that are already resolved at compile time. This reduces both the compile time and native code size of many methods, and has a decent speedup too. (Numbers not produced in compliance with the SPECjvm98 run rules and so not comparable with SPECjvm98 metrics): Original Inlining Speedup compress 11.642 11.111 4.6% jess 8.478 8.401 0.9% db 16.426 16.223 1.2% javac 13.204 12.810 3.0% mpegaudio 7.859 6.992 11.0% mtrt 7.917 7.583 4.2% jack 9.958 9.462 5.0% Cheers, Gary -- http://gbenson.net/ From doko at ubuntu.com Thu Mar 5 05:52:37 2009 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 05 Mar 2009 14:52:37 +0100 Subject: building cacao as an additional VM In-Reply-To: <49AD6F1E.30603@redhat.com> References: <49AD6A15.3080901@ubuntu.com> <49AD6F1E.30603@redhat.com> Message-ID: <49AFD925.40706@ubuntu.com> Andrew Haley schrieb: > Matthias Klose wrote: >> Triggered by archive administrators and security people who don't want to care >> about two copies of the OpenJDK code in a distribution, I tried to build cacao >> as additional VM in the same source package and avoiding separate builds. You >> can now call: >> >> $ java -version >> java version "1.6.0_0" >> OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) >> OpenJDK Server VM (build 14.0-b08, mixed mode) >> >> $ java -cacao -version >> java version "1.6.0_0" >> OpenJDK Runtime Environment (IcedTea6 1.4) (6b14-0ubuntu18) >> CACAO (build 0.99.3+hg, compiled mode) >> >> The cacao bits are installed in /jre/lib//cacao, cacao is configured >> like for the cacao build in IcedTea, the cacao-alternate-vm patch replaces the >> icedtea-cacao patch, cacao-jni-version needs applied to the cacao sources. >> The file jvm.cfg.in needs an additional line '-cacao KNOWN'. >> >> There is no configure/make stuff for IcedTea yet; I'm currently assembling this >> directly in the packaging. >> >> Doing the same with Zero and with Shark? Didn't check yet, but maybe this would >> need a copy of openjdk/hotspot to openjdk/zero, so that patches are applied for >> the latter only. >> >> Ok to checkin these patches (without applying them)? > > This is wrong. CACAO should report > > java version "1.6.0_0" > IcedTea6 Runtime Environment (pre-1.5-r92c4cc753f06) (foo.b14.baz-123) > CACAO (build 0.99.3, JIT mode) with the attached patch, it does now: $ java -cacao -version java version "1.6.0_0" IcedTea Runtime Environment (IcedTea6 1.5pre) (6b15~pre1-0ubuntu1~ppa1) CACAO (build 0.99.3+hg, compiled mode) sun.misc.Version.java_runtime_name is still lying about the runtime name. I don't know how to fix this without changing the API. Setting java_runtime_name in print or other methods would only give valid results if one of the methods is called before accessing java_runtime_name. icedtea-version2.patch doesn't work, because initVersions isn't called before print, and calling initVersions in print leads to an unsatisfied link error, because libjava.so is not yet loaded. $ java -version Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.misc.Version.jvmIsCacao()Z at sun.misc.Version.jvmIsCacao(Native Method) at sun.misc.Version.initVersions(Version.java:321) at sun.misc.Version.print(Version.java:90) at sun.misc.Version.print(Version.java:80) -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-version.patch Type: text/x-diff Size: 3006 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090305/d3552daf/icedtea-version.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-version2.patch Type: text/x-diff Size: 3260 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090305/d3552daf/icedtea-version2.patch From gbenson at redhat.com Thu Mar 5 06:18:34 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 05 Mar 2009 14:18:34 +0000 Subject: changeset in /hg/icedtea6: 2009-03-05 Gary Benson changeset f51dcb5de1a9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f51dcb5de1a9 description: 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::_code_start): Renamed from start. (SharkEntry::_code_limit): Renamed from limit. (SharkEntry::set_bounds): Renamed from setBounds. (SharkEntry::print_pd_statistics): Removed. * ports/hotspot/src/share/vm/shark/sharkEntry.cpp (SharkEntry::print_pd_statistics): Likewise. (SharkEntry::print_statistics): Don't call the above. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::MyJITMemoryManager::endFunctionBody): Fix for setBounds rename. diffstat: 4 files changed, 36 insertions(+), 109 deletions(-) ChangeLog | 14 +++ ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 6 - ports/hotspot/src/share/vm/shark/sharkEntry.cpp | 89 --------------------- ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 36 ++++---- diffs (192 lines): diff -r c5a65faa56e2 -r f51dcb5de1a9 ChangeLog --- a/ChangeLog Thu Mar 05 13:44:56 2009 +0000 +++ b/ChangeLog Thu Mar 05 09:14:30 2009 -0500 @@ -1,3 +1,17 @@ 2009-03-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::_code_start): Renamed from start. + (SharkEntry::_code_limit): Renamed from limit. + (SharkEntry::set_bounds): Renamed from setBounds. + (SharkEntry::print_pd_statistics): Removed. + * ports/hotspot/src/share/vm/shark/sharkEntry.cpp + (SharkEntry::print_pd_statistics): Likewise. + (SharkEntry::print_statistics): Don't call the above. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::MyJITMemoryManager::endFunctionBody): + Fix for setBounds rename. + 2009-03-05 Gary Benson * patches/hotspot/default/icedtea-shark.patch diff -r c5a65faa56e2 -r f51dcb5de1a9 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Mar 05 13:44:56 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Mar 05 09:14:30 2009 -0500 @@ -184,8 +184,8 @@ void SharkBuilder::MyJITMemoryManager::e { mm->endFunctionBody(F, FunctionStart, FunctionEnd); - SharkEntry *e = sharkEntry[F]; - if (e) - e->setBounds(FunctionStart, FunctionEnd); + SharkEntry *entry = sharkEntry[F]; + if (entry) + entry->set_bounds((address) FunctionStart, (address) FunctionEnd); } diff -r c5a65faa56e2 -r f51dcb5de1a9 ports/hotspot/src/share/vm/shark/sharkEntry.cpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.cpp Thu Mar 05 13:44:56 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.cpp Thu Mar 05 09:14:30 2009 -0500 @@ -32,92 +32,7 @@ void SharkEntry::print_statistics(const address start = code_start(); address limit = code_limit(); - ttyLocker ttyl; - tty->print(" [%p-%p): %s (%d bytes code", start, limit, name, limit - start); - print_pd_statistics(start, limit); - tty->print_cr(")"); -} - -// Lots of the stuff down here is machine- and LLVM-specific. -// It's only debug stuff though, and none of it's critical. - -void SharkEntry::print_pd_statistics(address start, address limit) const -{ -#ifdef PPC - uint32_t *pc = (uint32_t *) start; - uint32_t instr; - - // Walk over the bit that allocates the frame - instr = *(pc++); - assert (instr == 0x7c0802a6, "expecting 'mflr r0'"); - - instr = *(pc++); - bool has_locals = (instr == NOT_LP64(0x93e1fffc) LP64_ONLY(0xf9e1fffc)); - if (has_locals) { - // 0xd04f3a60: mflr r0 - // 0xd04f3a64: stw r31,-4(r1) - // 0xd04f3a68: stw r0,4(r1) - // 0xd04f3a6c: stwu r1,-112(r1) - // 0xd04f3a70: mr r31,r1 - // 0xd04f3a74: stw r14,104(r31) - // ... - // 0xd04f3ab4: stw r30,40(r31) - return; - } - - assert (instr == NOT_LP64(0x90010004) LP64_ONLY(0xf8010004), - "expecting st" NOT_LP64("w") LP64_ONLY("d") " r0,4(r1)"); - - instr = *(pc++); - assert ((instr & 0xffff8001) == NOT_LP64(0x94218000) LP64_ONLY(0xf8218001), - "expecting st" NOT_LP64("w") LP64_ONLY("d") "u r1,-X(r1)"); - int frame_size = -((instr | 0xffff0000) LP64_ONLY(& 0xfffffffc)); - tty->print(", %d bytes stack", frame_size); - - // Walk over the bit that stores the non-volatile registers - int first_reg = -1; - int next_slot = frame_size - wordSize; - int last_reg = -1; - while (pc < (uint32_t *) limit) { - instr = *(pc++); - - // The opcode should be stw/std - int opcode = instr >> 26; - if (opcode != NOT_LP64(36) LP64_ONLY(62)) - break; - - // The destination should be next_slot(r1) - int ra = (instr & 0x001f0000) >> 16; - if (ra != 1) - break; - - int ds = instr & 0x0000ffff; - if (ds != next_slot) - break; - next_slot -= wordSize; - - // The source should be the next register after last_reg - int rs = (instr & 0x03e00000) >> 21; - if (first_reg == -1) { - assert(rs >= 13, "storing a non-volatile register?"); - first_reg = last_reg = rs; - } - else { - assert(rs == last_reg + 1, "register stores out of order?"); - last_reg = rs; - } - } - - if (first_reg == -1) { - tty->print(", 0 registers"); - } - else { - int num_registers = last_reg - first_reg + 1; - if (num_registers == 1) - tty->print(", 1 register"); - else - tty->print(", %d registers", num_registers); - } -#endif // PPC + tty->print_cr( + " [%p-%p): %s (%d bytes code)", start, limit, name, limit - start); } #endif // !PRODUCT diff -r c5a65faa56e2 -r f51dcb5de1a9 ports/hotspot/src/share/vm/shark/sharkEntry.hpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Thu Mar 05 13:44:56 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Thu Mar 05 09:14:30 2009 -0500 @@ -26,6 +26,8 @@ class SharkEntry : public ZeroEntry { class SharkEntry : public ZeroEntry { private: llvm::Function* _llvm_function; + address _code_start; + address _code_limit; public: llvm::Function* llvm_function() const @@ -38,6 +40,21 @@ class SharkEntry : public ZeroEntry { } public: + address code_start() const + { + return _code_start; + } + address code_limit() const + { + return _code_limit; + } + void set_bounds(address code_start, address code_limit) + { + _code_start = code_start; + _code_limit = code_limit; + } + + public: static ByteSize llvm_function_offset() { return byte_offset_of(SharkEntry, _llvm_function); @@ -45,23 +62,4 @@ class SharkEntry : public ZeroEntry { public: void print_statistics(const char* name) const PRODUCT_RETURN; - - address code_start() const - { - return start; - } - address code_limit() const - { - return limit; - } - void print_pd_statistics(address start, address limit) const; - - address start, limit; - -public: - void setBounds(unsigned char *FunctionStart, unsigned char *FunctionEnd) - { - start = (address)FunctionStart; - limit = (address)FunctionEnd; - } }; From doko at ubuntu.com Thu Mar 5 08:56:24 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 05 Mar 2009 16:56:24 +0000 Subject: changeset in /hg/icedtea6: 2009-03-05 Matthias Klose changeset 0507febca60d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0507febca60d description: 2009-03-05 Matthias Klose * Makefile.am (ICEDTEA_PATCHES): Make $(DISTRIBUTION_PATCHES) the last patches in the list. diffstat: 2 files changed, 7 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ Makefile.am | 4 ++-- diffs (31 lines): diff -r f51dcb5de1a9 -r 0507febca60d ChangeLog --- a/ChangeLog Thu Mar 05 09:14:30 2009 -0500 +++ b/ChangeLog Thu Mar 05 17:53:03 2009 +0100 @@ -1,3 +1,8 @@ 2009-03-05 Gary Benson + + * Makefile.am (ICEDTEA_PATCHES): Make $(DISTRIBUTION_PATCHES) the + last patches in the list. + 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp diff -r f51dcb5de1a9 -r 0507febca60d Makefile.am --- a/Makefile.am Thu Mar 05 09:14:30 2009 -0500 +++ b/Makefile.am Thu Mar 05 17:53:03 2009 +0100 @@ -656,13 +656,13 @@ endif endif ICEDTEA_PATCHES += \ - $(DISTRIBUTION_PATCHES) \ patches/icedtea-demo-swingapplet.patch \ patches/icedtea-awt-window-size.patch \ patches/icedtea-java2d-dasher.patch \ patches/hotspot/$(HSBUILD)/icedtea-format.patch \ patches/icedtea-cc-interp-backedge.patch \ - patches/icedtea-xml-encodinginfo.patch + patches/icedtea-xml-encodinginfo.patch \ + $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp if OPENJDK_SRC_DIR_FOUND From doko at ubuntu.com Fri Mar 6 02:37:10 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 06 Mar 2009 10:37:10 +0000 Subject: changeset in /hg/icedtea6: 2009-03-06 Matthias Klose changeset 52cac9f018fd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=52cac9f018fd description: 2009-03-06 Matthias Klose * Makefile.am (check-*): Pass $(ICEDTEA_JTREG_OPTIONS), unset by default. diffstat: 2 files changed, 8 insertions(+) ChangeLog | 5 +++++ Makefile.am | 3 +++ diffs (39 lines): diff -r 0507febca60d -r 52cac9f018fd ChangeLog --- a/ChangeLog Thu Mar 05 17:53:03 2009 +0100 +++ b/ChangeLog Fri Mar 06 11:33:48 2009 +0100 @@ -1,3 +1,8 @@ 2009-03-05 Matthias Klose + + * Makefile.am (check-*): Pass $(ICEDTEA_JTREG_OPTIONS), unset + by default. + 2009-03-05 Matthias Klose * Makefile.am (ICEDTEA_PATCHES): Make $(DISTRIBUTION_PATCHES) the diff -r 0507febca60d -r 52cac9f018fd Makefile.am --- a/Makefile.am Thu Mar 05 17:53:03 2009 +0100 +++ b/Makefile.am Fri Mar 06 11:33:48 2009 +0100 @@ -1710,6 +1710,7 @@ check-hotspot: stamps/jtreg.stamp $(ICEDTEA_BOOT_DIR)/bin/java -jar test/jtreg.jar -v1 -a -ignore:quiet \ -w:test/hotspot/JTwork -r:test/hotspot/JTreport \ -jdk:`pwd`/$(BUILD_OUTPUT_DIR)/j2sdk-image \ + $(ICEDTEA_JTREG_OPTIONS) \ `pwd`/openjdk/hotspot/test \ | tee test/$@.log @@ -1718,6 +1719,7 @@ check-langtools: stamps/jtreg.stamp $(ICEDTEA_BOOT_DIR)/bin/java -jar test/jtreg.jar -v1 -a -ignore:quiet \ -w:test/langtools/JTwork -r:test/langtools/JTreport \ -s -jdk:`pwd`/$(BUILD_OUTPUT_DIR)/j2sdk-image \ + $(ICEDTEA_JTREG_OPTIONS) \ `pwd`/openjdk/langtools/test \ | tee test/$@.log @@ -1726,6 +1728,7 @@ check-jdk: stamps/jtreg.stamp $(ICEDTEA_BOOT_DIR)/bin/java -jar test/jtreg.jar -v1 -a -ignore:quiet \ -w:test/jdk/JTwork -r:test/jdk/JTreport \ -s -jdk:`pwd`/$(BUILD_OUTPUT_DIR)/j2sdk-image \ + $(ICEDTEA_JTREG_OPTIONS) \ `pwd`/openjdk/jdk/test \ | tee test/$@.log From gbenson at redhat.com Fri Mar 6 03:50:35 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 6 Mar 2009 11:50:35 +0000 Subject: Attention Shark hackers (again) Message-ID: <20090306115035.GB3228@redhat.com> Hi all, I'm currently refactoring SharkCompiler and SharkBuilder. If you're working on something in those then please let me know so we can coordinate. Cheers, Gary -- http://gbenson.net/ From gbenson at redhat.com Fri Mar 6 06:47:38 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 06 Mar 2009 14:47:38 +0000 Subject: changeset in /hg/icedtea6: 2009-03-06 Gary Benson changeset 8228a1d1008b in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8228a1d1008b description: 2009-03-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::SharkBuilder): New argument. (SharkBuilder::_compiler): New field. (SharkBuilder::_module): Removed field. (SharkBuilder::_module_provider): Likewise. (SharkBuilder::_execution_engine): Likewise. (SharkBuilder::module): Rewritten. (SharkBuilder::execution_engine): Likewise. (SharkBuilder::MyJITMemoryManager): Moved to sharkMemoryManager.hpp. (SharkBuilder::sharkEntry): Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::SharkBuilder): New argument. (SharkBuilder::MyJITMemoryManager::endFunctionBody) Moved to sharkMemoryManager.cpp. (SharkBuilder::sharkEntry): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp (SharkCompiler::_module): New field. (SharkCompiler::_execution_engine): Likewise. (SharkCompiler::module): New method. (SharkCompiler::execution_engine): Likewise. (SharkCompiler::compile): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp (SharkCompiler::SharkCompiler): Initialize new fields. (SharkCompiler::compile): New method. * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::_code_start): Removed field. (SharkEntry::code_start): Rewritten. (SharkEntry::set_bounds): Replaced with... (SharkEntry::set_code_limit): New method. (SharkEntry::llvm_function_offset): Removed method. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::SharkFunction): Changed arguments. (SharkFunction::_builder): Removed field. (SharkFunction::_compiler): New field. (SharkFunction::compiler): New method. (SharkFunction::builder): Rewritten. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::initialize): Updated for new interfaces. * ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 12 files changed, 560 insertions(+), 375 deletions(-) ChangeLog | 49 + ports/hotspot/src/share/vm/includeDB_shark | 380 +++++++-------- ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 23 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 93 --- ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 45 + ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 36 + ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 15 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 33 - ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 90 +-- ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp | 92 +++ ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp | 77 +++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 2 diffs (truncated from 1151 to 500 lines): diff -r 52cac9f018fd -r 8228a1d1008b ChangeLog --- a/ChangeLog Fri Mar 06 11:33:48 2009 +0100 +++ b/ChangeLog Fri Mar 06 09:47:04 2009 -0500 @@ -1,3 +1,52 @@ 2009-03-06 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::SharkBuilder): New argument. + (SharkBuilder::_compiler): New field. + (SharkBuilder::_module): Removed field. + (SharkBuilder::_module_provider): Likewise. + (SharkBuilder::_execution_engine): Likewise. + (SharkBuilder::module): Rewritten. + (SharkBuilder::execution_engine): Likewise. + (SharkBuilder::MyJITMemoryManager): Moved to sharkMemoryManager.hpp. + (SharkBuilder::sharkEntry): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::SharkBuilder): New argument. + (SharkBuilder::MyJITMemoryManager::endFunctionBody) Moved to + sharkMemoryManager.cpp. + (SharkBuilder::sharkEntry): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::_module): New field. + (SharkCompiler::_execution_engine): Likewise. + (SharkCompiler::module): New method. + (SharkCompiler::execution_engine): Likewise. + (SharkCompiler::compile): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::SharkCompiler): Initialize new fields. + (SharkCompiler::compile): New method. + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::_code_start): Removed field. + (SharkEntry::code_start): Rewritten. + (SharkEntry::set_bounds): Replaced with... + (SharkEntry::set_code_limit): New method. + (SharkEntry::llvm_function_offset): Removed method. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::SharkFunction): Changed arguments. + (SharkFunction::_builder): Removed field. + (SharkFunction::_compiler): New field. + (SharkFunction::compiler): New method. + (SharkFunction::builder): Rewritten. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::initialize): Updated for new interfaces. + + * ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-06 Matthias Klose * Makefile.am (check-*): Pass $(ICEDTEA_JTREG_OPTIONS), unset diff -r 52cac9f018fd -r 8228a1d1008b ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Fri Mar 06 11:33:48 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Fri Mar 06 09:47:04 2009 -0500 @@ -24,25 +24,6 @@ // // NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps! - -sharkBlock.cpp debug.hpp -sharkBlock.cpp bytecodes.hpp -sharkBlock.cpp llvmHeaders.hpp -sharkBlock.cpp shark_globals.hpp -sharkBlock.cpp sharkBlock.hpp -sharkBlock.cpp sharkBuilder.hpp -sharkBlock.cpp sharkRuntime.hpp -sharkBlock.cpp sharkState.inline.hpp -sharkBlock.cpp sharkValue.inline.hpp - -sharkBlock.hpp allocation.hpp -sharkBlock.hpp ciMethod.hpp -sharkBlock.hpp ciStreams.hpp -sharkBlock.hpp debug.hpp -sharkBlock.hpp llvmHeaders.hpp -sharkBlock.hpp sharkBuilder.hpp -sharkBlock.hpp sharkState.hpp -sharkBlock.hpp sharkValue.hpp ciMethod.cpp ciTypeFlow.hpp ciMethod.cpp methodOop.hpp @@ -81,6 +62,202 @@ shark_globals.cpp shark_globals.hpp shark_globals_.hpp shark_globals.hpp globals.hpp + +sharkBlock.cpp debug.hpp +sharkBlock.cpp bytecodes.hpp +sharkBlock.cpp llvmHeaders.hpp +sharkBlock.cpp shark_globals.hpp +sharkBlock.cpp sharkBlock.hpp +sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkRuntime.hpp +sharkBlock.cpp sharkState.inline.hpp +sharkBlock.cpp sharkValue.inline.hpp + +sharkBlock.hpp allocation.hpp +sharkBlock.hpp ciMethod.hpp +sharkBlock.hpp ciStreams.hpp +sharkBlock.hpp debug.hpp +sharkBlock.hpp llvmHeaders.hpp +sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkState.hpp +sharkBlock.hpp sharkValue.hpp + +sharkBuilder.cpp ciMethod.hpp +sharkBuilder.cpp debug.hpp +sharkBuilder.cpp llvmHeaders.hpp +sharkBuilder.cpp methodOop.hpp +sharkBuilder.cpp os.hpp +sharkBuilder.cpp resourceArea.hpp +sharkBuilder.cpp llvmHeaders.hpp +sharkBuilder.cpp sharkBuilder.hpp +sharkBuilder.cpp sharkCompiler.hpp +sharkBuilder.cpp sharkRuntime.hpp +sharkBuilder.cpp synchronizer.hpp +sharkBuilder.cpp thread.hpp + +sharkBuilder.hpp barrierSet.hpp +sharkBuilder.hpp cardTableModRefBS.hpp +sharkBuilder.hpp ciType.hpp +sharkBuilder.hpp debug.hpp +sharkBuilder.hpp llvmHeaders.hpp +sharkBuilder.hpp sizes.hpp +sharkBuilder.hpp sharkCompiler.hpp +sharkBuilder.hpp sharkType.hpp +sharkBuilder.hpp sharkValue.inline.hpp +sharkBuilder.hpp sharkEntry.hpp + +sharkCacheDecache.cpp ciMethod.hpp +sharkCacheDecache.cpp debugInfoRec.hpp +sharkCacheDecache.cpp sharkBuilder.hpp +sharkCacheDecache.cpp sharkCacheDecache.hpp +sharkCacheDecache.cpp sharkFunction.hpp +sharkCacheDecache.cpp sharkState.inline.hpp + +sharkCacheDecache.hpp ciMethod.hpp +sharkCacheDecache.hpp debugInfoRec.hpp +sharkCacheDecache.hpp sharkBuilder.hpp +sharkCacheDecache.hpp sharkFunction.hpp +sharkCacheDecache.hpp sharkStateScanner.hpp + +sharkCompiler.cpp abstractCompiler.hpp +sharkCompiler.cpp ciEnv.hpp +sharkCompiler.cpp ciMethod.hpp +sharkCompiler.cpp codeBuffer.hpp +sharkCompiler.cpp debug.hpp +sharkCompiler.cpp debugInfoRec.hpp +sharkCompiler.cpp dependencies.hpp +sharkCompiler.cpp exceptionHandlerTable.hpp +sharkCompiler.cpp llvmHeaders.hpp +sharkCompiler.cpp oopMap.hpp +sharkCompiler.cpp oopRecorder.hpp +sharkCompiler.cpp shark_globals.hpp +sharkCompiler.cpp sharkBuilder.hpp +sharkCompiler.cpp sharkCompiler.hpp +sharkCompiler.cpp sharkEntry.hpp +sharkCompiler.cpp sharkFunction.hpp +sharkCompiler.cpp sharkMemoryManager.hpp +sharkCompiler.cpp sharkRuntime.hpp + +sharkCompiler.hpp abstractCompiler.hpp +sharkCompiler.hpp ciEnv.hpp +sharkCompiler.hpp ciMethod.hpp +sharkCompiler.hpp llvmHeaders.hpp +sharkCompiler.hpp sharkMemoryManager.hpp + +sharkConstantPool.cpp allocation.hpp +sharkConstantPool.cpp constantPoolOop.hpp +sharkConstantPool.cpp cpCacheOop.hpp +sharkConstantPool.cpp debug.hpp +sharkConstantPool.cpp llvmHeaders.hpp +sharkConstantPool.cpp methodOop.hpp +sharkConstantPool.cpp sharkBuilder.hpp +sharkConstantPool.cpp sharkConstantPool.hpp +sharkConstantPool.cpp sharkRuntime.hpp +sharkConstantPool.cpp sharkState.inline.hpp +sharkConstantPool.cpp sharkType.hpp +sharkConstantPool.cpp sharkValue.inline.hpp + +sharkConstantPool.hpp allocation.hpp +sharkConstantPool.hpp llvmHeaders.hpp +sharkConstantPool.hpp sharkBuilder.hpp +sharkConstantPool.hpp sharkTopLevelBlock.hpp + +sharkEntry.cpp sharkEntry.hpp + +sharkEntry.hpp llvmHeaders.hpp + +sharkFunction.cpp allocation.hpp +sharkFunction.cpp ciTypeFlow.hpp +sharkFunction.cpp debug.hpp +sharkFunction.cpp llvmHeaders.hpp +sharkFunction.cpp shark_globals.hpp +sharkFunction.cpp sharkBuilder.hpp +sharkFunction.cpp sharkEntry.hpp +sharkFunction.cpp sharkFunction.hpp +sharkFunction.cpp sharkMonitor.hpp +sharkFunction.cpp sharkState.inline.hpp +sharkFunction.cpp sharkTopLevelBlock.hpp + +sharkFunction.hpp allocation.hpp +sharkFunction.hpp ciEnv.hpp +sharkFunction.hpp ciStreams.hpp +sharkFunction.hpp ciTypeFlow.hpp +sharkFunction.hpp llvmHeaders.hpp +sharkFunction.hpp sharkBuilder.hpp + +sharkInliner.cpp allocation.hpp +sharkInliner.cpp bytecodes.hpp +sharkInliner.cpp ciField.hpp +sharkInliner.cpp ciMethod.hpp +sharkInliner.cpp ciStreams.hpp +sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkInliner.hpp +sharkInliner.cpp sharkState.inline.hpp +sharkInliner.cpp sharkValue.inline.hpp + +sharkInliner.hpp allocation.hpp +sharkInliner.hpp ciMethod.hpp +sharkInliner.hpp sharkState.inline.hpp + +sharkMemoryManager.hpp llvmHeaders.hpp +sharkMemoryManager.hpp sharkEntry.hpp + +sharkMemoryManager.cpp llvmHeaders.hpp +sharkMemoryManager.cpp sharkEntry.hpp +sharkMemoryManager.cpp sharkMemoryManager.hpp + +sharkMonitor.cpp llvmHeaders.hpp +sharkMonitor.cpp sharkMonitor.hpp +sharkMonitor.cpp sharkRuntime.hpp +sharkMonitor.cpp sharkState.inline.hpp +sharkMonitor.cpp sharkTopLevelBlock.hpp + +sharkMonitor.hpp allocation.hpp +sharkMonitor.hpp llvmHeaders.hpp +sharkMonitor.hpp sharkBuilder.hpp +sharkMonitor.hpp sharkFunction.hpp + +sharkRuntime.cpp biasedLocking.hpp +sharkRuntime.cpp deoptimization.hpp +sharkRuntime.cpp llvmHeaders.hpp +sharkRuntime.cpp klassOop.hpp +sharkRuntime.cpp sharkBuilder.hpp +sharkRuntime.cpp sharkRuntime.hpp +sharkRuntime.cpp sharkType.hpp +sharkRuntime.cpp thread.hpp + +sharkRuntime.hpp allocation.hpp +sharkRuntime.hpp llvmHeaders.hpp +sharkRuntime.hpp klassOop.hpp +sharkRuntime.hpp sharkBuilder.hpp +sharkRuntime.hpp thread.hpp + +sharkState.cpp allocation.hpp +sharkState.cpp ciType.hpp +sharkState.cpp ciTypeFlow.hpp +sharkState.cpp sharkBuilder.hpp +sharkState.cpp sharkCacheDecache.hpp +sharkState.cpp sharkState.inline.hpp +sharkState.cpp sharkTopLevelBlock.hpp +sharkState.cpp sharkType.hpp +sharkState.cpp sharkValue.inline.hpp + +sharkState.hpp allocation.hpp +sharkState.hpp ciMethod.hpp +sharkState.hpp llvmHeaders.hpp +sharkState.hpp sharkBuilder.hpp +sharkState.hpp sharkValue.hpp + +sharkState.inline.hpp sharkBlock.hpp +sharkState.inline.hpp sharkBuilder.hpp +sharkState.inline.hpp sharkState.hpp + +sharkStateScanner.cpp sharkState.inline.hpp +sharkStateScanner.cpp sharkStateScanner.hpp + +sharkStateScanner.hpp allocation.hpp +sharkStateScanner.hpp llvmHeaders.hpp +sharkStateScanner.hpp sharkFunction.hpp sharkTopLevelBlock.cpp allocation.hpp sharkTopLevelBlock.cpp bytecodes.hpp @@ -112,171 +289,6 @@ sharkTopLevelBlock.hpp sharkTopLevelBlock.hpp sharkState.inline.hpp sharkTopLevelBlock.hpp sharkValue.inline.hpp -sharkBuilder.cpp ciMethod.hpp -sharkBuilder.cpp debug.hpp -sharkBuilder.cpp llvmHeaders.hpp -sharkBuilder.cpp methodOop.hpp -sharkBuilder.cpp os.hpp -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.hpp barrierSet.hpp -sharkBuilder.hpp cardTableModRefBS.hpp -sharkBuilder.hpp ciType.hpp -sharkBuilder.hpp debug.hpp -sharkBuilder.hpp llvmHeaders.hpp -sharkBuilder.hpp sizes.hpp -sharkBuilder.hpp sharkType.hpp -sharkBuilder.hpp sharkValue.inline.hpp -sharkBuilder.hpp sharkEntry.hpp - -sharkCacheDecache.cpp ciMethod.hpp -sharkCacheDecache.cpp debugInfoRec.hpp -sharkCacheDecache.cpp sharkBuilder.hpp -sharkCacheDecache.cpp sharkCacheDecache.hpp -sharkCacheDecache.cpp sharkFunction.hpp -sharkCacheDecache.cpp sharkState.inline.hpp - -sharkCacheDecache.hpp ciMethod.hpp -sharkCacheDecache.hpp debugInfoRec.hpp -sharkCacheDecache.hpp sharkBuilder.hpp -sharkCacheDecache.hpp sharkFunction.hpp -sharkCacheDecache.hpp sharkStateScanner.hpp - -sharkCompiler.cpp ciEnv.hpp -sharkCompiler.cpp ciMethod.hpp -sharkCompiler.cpp codeBuffer.hpp -sharkCompiler.cpp debug.hpp -sharkCompiler.cpp debugInfoRec.hpp -sharkCompiler.cpp dependencies.hpp -sharkCompiler.cpp exceptionHandlerTable.hpp -sharkCompiler.cpp llvmHeaders.hpp -sharkCompiler.cpp oopMap.hpp -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 - -sharkCompiler.hpp abstractCompiler.hpp -sharkCompiler.hpp ciEnv.hpp -sharkCompiler.hpp ciMethod.hpp -sharkCompiler.hpp llvmHeaders.hpp -sharkCompiler.hpp sharkBuilder.hpp - -sharkConstantPool.cpp allocation.hpp -sharkConstantPool.cpp constantPoolOop.hpp -sharkConstantPool.cpp cpCacheOop.hpp -sharkConstantPool.cpp debug.hpp -sharkConstantPool.cpp llvmHeaders.hpp -sharkConstantPool.cpp methodOop.hpp -sharkConstantPool.cpp sharkBuilder.hpp -sharkConstantPool.cpp sharkConstantPool.hpp -sharkConstantPool.cpp sharkRuntime.hpp -sharkConstantPool.cpp sharkState.inline.hpp -sharkConstantPool.cpp sharkType.hpp -sharkConstantPool.cpp sharkValue.inline.hpp - -sharkConstantPool.hpp allocation.hpp -sharkConstantPool.hpp llvmHeaders.hpp -sharkConstantPool.hpp sharkBuilder.hpp -sharkConstantPool.hpp sharkTopLevelBlock.hpp - -sharkEntry.cpp sharkEntry.hpp - -sharkEntry.hpp llvmHeaders.hpp - -sharkFunction.cpp allocation.hpp -sharkFunction.cpp ciTypeFlow.hpp -sharkFunction.cpp debug.hpp -sharkFunction.cpp llvmHeaders.hpp -sharkFunction.cpp shark_globals.hpp -sharkFunction.cpp sharkBuilder.hpp -sharkFunction.cpp sharkEntry.hpp -sharkFunction.cpp sharkFunction.hpp -sharkFunction.cpp sharkMonitor.hpp -sharkFunction.cpp sharkState.inline.hpp -sharkFunction.cpp sharkTopLevelBlock.hpp - -sharkFunction.hpp allocation.hpp -sharkFunction.hpp ciEnv.hpp -sharkFunction.hpp ciStreams.hpp -sharkFunction.hpp ciTypeFlow.hpp -sharkFunction.hpp llvmHeaders.hpp -sharkFunction.hpp sharkBuilder.hpp - -sharkInliner.cpp allocation.hpp -sharkInliner.cpp bytecodes.hpp -sharkInliner.cpp ciField.hpp -sharkInliner.cpp ciMethod.hpp -sharkInliner.cpp ciStreams.hpp -sharkInliner.cpp shark_globals.hpp -sharkInliner.cpp sharkInliner.hpp -sharkInliner.cpp sharkState.inline.hpp -sharkInliner.cpp sharkValue.inline.hpp - -sharkInliner.hpp allocation.hpp -sharkInliner.hpp ciMethod.hpp -sharkInliner.hpp sharkState.inline.hpp - -sharkMonitor.cpp llvmHeaders.hpp -sharkMonitor.cpp sharkMonitor.hpp -sharkMonitor.cpp sharkRuntime.hpp -sharkMonitor.cpp sharkState.inline.hpp -sharkMonitor.cpp sharkTopLevelBlock.hpp - -sharkMonitor.hpp allocation.hpp -sharkMonitor.hpp llvmHeaders.hpp -sharkMonitor.hpp sharkBuilder.hpp -sharkMonitor.hpp sharkFunction.hpp - -sharkRuntime.cpp biasedLocking.hpp -sharkRuntime.cpp deoptimization.hpp -sharkRuntime.cpp llvmHeaders.hpp -sharkRuntime.cpp klassOop.hpp -sharkRuntime.cpp sharkBuilder.hpp -sharkRuntime.cpp sharkRuntime.hpp -sharkRuntime.cpp sharkType.hpp -sharkRuntime.cpp thread.hpp - -sharkRuntime.hpp allocation.hpp -sharkRuntime.hpp llvmHeaders.hpp -sharkRuntime.hpp klassOop.hpp -sharkRuntime.hpp sharkBuilder.hpp -sharkRuntime.hpp thread.hpp - -sharkState.cpp allocation.hpp -sharkState.cpp ciType.hpp -sharkState.cpp ciTypeFlow.hpp -sharkState.cpp sharkBuilder.hpp -sharkState.cpp sharkCacheDecache.hpp -sharkState.cpp sharkState.inline.hpp -sharkState.cpp sharkTopLevelBlock.hpp -sharkState.cpp sharkType.hpp -sharkState.cpp sharkValue.inline.hpp - -sharkState.hpp allocation.hpp -sharkState.hpp ciMethod.hpp -sharkState.hpp llvmHeaders.hpp -sharkState.hpp sharkBuilder.hpp -sharkState.hpp sharkValue.hpp - -sharkState.inline.hpp sharkBlock.hpp -sharkState.inline.hpp sharkBuilder.hpp -sharkState.inline.hpp sharkState.hpp - -sharkStateScanner.cpp sharkState.inline.hpp -sharkStateScanner.cpp sharkStateScanner.hpp - -sharkStateScanner.hpp allocation.hpp -sharkStateScanner.hpp llvmHeaders.hpp -sharkStateScanner.hpp sharkFunction.hpp - sharkType.cpp arrayOop.hpp sharkType.cpp globalDefinitions.hpp sharkType.cpp llvmHeaders.hpp diff -r 52cac9f018fd -r 8228a1d1008b ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Fri Mar 06 11:33:48 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Fri Mar 06 09:47:04 2009 -0500 @@ -28,15 +28,10 @@ using namespace llvm; -std::map SharkBuilder::sharkEntry; - -SharkBuilder::SharkBuilder() +SharkBuilder::SharkBuilder(SharkCompiler* compiler) : IRBuilder<>(), - _module("shark"), - _module_provider(module()), - _execution_engine(ExecutionEngine::createJIT - (&_module_provider, NULL, new MyJITMemoryManager(), - /* Fast */ false)) { + _compiler(compiler) +{ init_external_functions(); } @@ -177,15 +172,3 @@ CallInst *SharkBuilder::CreateMemoryBarr ConstantInt::get(Type::Int1Ty, 0)}; return CreateCall(llvm_memory_barrier_fn(), args, args + 5); } - -void SharkBuilder::MyJITMemoryManager::endFunctionBody - (const llvm::Function *F, unsigned char *FunctionStart, - unsigned char *FunctionEnd) -{ - mm->endFunctionBody(F, FunctionStart, FunctionEnd); - - SharkEntry *entry = sharkEntry[F]; - if (entry) - entry->set_bounds((address) FunctionStart, (address) FunctionEnd); -} - diff -r 52cac9f018fd -r 8228a1d1008b ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Fri Mar 06 11:33:48 2009 +0100 From bugzilla-daemon at icedtea.classpath.org Fri Mar 6 12:15:30 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 06 Mar 2009 20:15:30 +0000 Subject: [Bug 299] New: eclipse crashes during file download in a tomcat test scenario Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=299 Summary: eclipse crashes during file download in a tomcat test scenario Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: heidrun.meisel at t-online.de Recently I moved with a running java internet project from windows NT to Suse 11.1. Now I try to find out why a servlet doing XML download with Suse 11.1 delivers an servlet instantiation error. I commented out XML respectivly JDOM code and want to download a simple String ... I'm not longer getting an instatiation error. Now I get a popup asking for the filename and location on my PC. After pressing the OK button in this popup window, eclipse disappears. Afterwards I always find something like a dump with a filename hs_err_pid.log on my desktop. I would like to send you the latest version of these error log files. But how? -- 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 Mar 6 12:17:18 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 06 Mar 2009 20:17:18 +0000 Subject: [Bug 299] eclipse crashes during file download in a tomcat test scenario Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=299 ------- Comment #1 from heidrun.meisel at t-online.de 2009-03-06 20:17 ------- Created an attachment (id=169) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=169&action=view) hs_err_pid11059.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 bugzilla-daemon at icedtea.classpath.org Sat Mar 7 11:01:02 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 07 Mar 2009 19:01:02 +0000 Subject: [Bug 300] New: shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 Summary: shark fails to build Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com Currently shark fails to build with gcc-4_3-branch: /scratch/packages/openjdk/d/openjdk-6-6b14-1.5~pre1/build-zero/openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp: In constructor 'SharkCompiler::SharkCompiler()': /scratch/packages/openjdk/d/openjdk-6-6b14-1.5~pre1/build-zero/openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp:42: error: cannot allocate an object of abstract type 'SharkMemoryManager' /scratch/packages/openjdk/d/openjdk-6-6b14-1.5~pre1/build-zero/openjdk/hotspot/src/share/vm/shark/sharkMemoryManager.hpp:30: note: because the following virtual functions are pure within 'SharkMemoryManager': /usr/include/llvm/ExecutionEngine/JITMemoryManager.h:106: note: virtual unsigned char* llvm::JITMemoryManager::allocateSpace(intptr_t, unsigned int) make[7]: *** [sharkCompiler.o] Error 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 doko at ubuntu.com Sat Mar 7 11:44:58 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 07 Mar 2009 19:44:58 +0000 Subject: changeset in /hg/icedtea6: 2009-03-07 Matthias Klose changeset fb6a59ff8005 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fb6a59ff8005 description: 2009-03-07 Matthias Klose * Makefile.am (icedtea.stamp, icedtea-debug.stamp): Create target dirs. diffstat: 2 files changed, 12 insertions(+) ChangeLog | 4 ++++ Makefile.am | 8 ++++++++ diffs (36 lines): diff -r 8228a1d1008b -r fb6a59ff8005 ChangeLog --- a/ChangeLog Fri Mar 06 09:47:04 2009 -0500 +++ b/ChangeLog Sat Mar 07 20:41:34 2009 +0100 @@ -1,3 +1,7 @@ 2009-03-06 Gary Benson + + * Makefile.am (icedtea.stamp, icedtea-debug.stamp): Create target dirs. + 2009-03-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp diff -r 8228a1d1008b -r fb6a59ff8005 Makefile.am --- a/Makefile.am Fri Mar 06 09:47:04 2009 -0500 +++ b/Makefile.am Sat Mar 07 20:41:34 2009 +0100 @@ -1099,6 +1099,10 @@ stamps/icedtea.stamp: stamps/bootstrap-d $(ICEDTEA_ENV) \ -C openjdk/control/make/ \ $(ICEDTEA_BUILD_TARGET) + mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) + mkdir -p $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) + mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext + mkdir -p $(BUILD_OUTPUT_DIR)/j2re-image/lib/ext if ENABLE_GCJWEBPLUGIN cp -pPRf gcjwebplugin.so \ $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) @@ -1162,6 +1166,10 @@ stamps/icedtea-debug.stamp: stamps/boots $(ICEDTEA_ENV) \ -C openjdk/control/make \ $(ICEDTEA_DEBUG_BUILD_TARGET) + mkdir -p $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) + mkdir -p $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/$(INSTALL_ARCH_DIR) + mkdir -p $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/ext + mkdir -p $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/ext if ENABLE_GCJWEBPLUGIN cp -pPRf gcjwebplugin.so \ $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) From doko at ubuntu.com Sat Mar 7 11:46:51 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 07 Mar 2009 19:46:51 +0000 Subject: changeset in /hg/icedtea6: 2009-03-07 Matthias Klose changeset a912ddc51c0f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a912ddc51c0f description: 2009-03-07 Matthias Klose * patches/icedtea-version.patch: Identify as IcedTea when Cacao is used as JVM. diffstat: 2 files changed, 15 insertions(+), 3 deletions(-) ChangeLog | 2 ++ patches/icedtea-version.patch | 16 +++++++++++++--- diffs (51 lines): diff -r fb6a59ff8005 -r a912ddc51c0f ChangeLog --- a/ChangeLog Sat Mar 07 20:41:34 2009 +0100 +++ b/ChangeLog Sat Mar 07 20:43:28 2009 +0100 @@ -1,6 +1,8 @@ 2009-03-07 Matthias Klose * Makefile.am (icedtea.stamp, icedtea-debug.stamp): Create target dirs. + * patches/icedtea-version.patch: Identify as IcedTea when Cacao is used + as JVM. 2009-03-06 Gary Benson diff -r fb6a59ff8005 -r a912ddc51c0f patches/icedtea-version.patch --- a/patches/icedtea-version.patch Sat Mar 07 20:41:34 2009 +0100 +++ b/patches/icedtea-version.patch Sat Mar 07 20:43:28 2009 +0100 @@ -38,14 +38,21 @@ static { init(); } -@@ -82,8 +88,17 @@ +@@ -81,12 +87,26 @@ + /* First line: platform version. */ ps.println(launcher_name + " version \"" + java_version + "\""); ++ String java_vm_name = System.getProperty("java.vm.name"); ++ /* Second line: runtime version (ie, libraries). */ - ps.println(java_runtime_name + " (build " + - java_runtime_version + ")"); + StringBuilder sb = new StringBuilder(); -+ sb.append(java_runtime_name); ++ if (java_vm_name.toLowerCase().startsWith("cacao")) { ++ sb.append("IcedTea Runtime Environment"); ++ } else { ++ sb.append(java_runtime_name); ++ } + if (jdk_derivative_name.length() > 0) { + sb.append(" (").append(jdk_derivative_name).append(")"); + } @@ -57,7 +64,10 @@ + ps.println(sb.toString()); /* Third line: JVM information. */ - String java_vm_name = System.getProperty("java.vm.name"); +- String java_vm_name = System.getProperty("java.vm.name"); + String java_vm_version = System.getProperty("java.vm.version"); + String java_vm_info = System.getProperty("java.vm.info"); + ps.println(java_vm_name + " (build " + java_vm_version + ", " + --- openjdk/jdk/make/java/version/Makefile.~1~ 2008-11-25 01:01:15.000000000 -0800 +++ openjdk/jdk/make/java/version/Makefile 2009-02-20 09:03:56.000000000 -0800 @@ -39,6 +39,8 @@ From bugzilla-daemon at icedtea.classpath.org Sat Mar 7 12:07:14 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 07 Mar 2009 20:07:14 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #1 from aph at redhat.com 2009-03-07 20:07 ------- Works for me. Are you sure you're using the correct version of LLVM? There is no such function in LLVM 2.4, the only version that works with Shark. -- 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 Sat Mar 7 13:46:35 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 07 Mar 2009 21:46:35 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #2 from doko at ubuntu.com 2009-03-07 21:46 ------- ahh, ok. this is 2.5, which has the fixes to build on arm-linux-gnueabi -- 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 Sat Mar 7 14:06:01 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 07 Mar 2009 22:06:01 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 aph at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID -- 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 Sat Mar 7 14:09:38 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 07 Mar 2009 22:09:38 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 doko at ubuntu.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Status|RESOLVED |REOPENED Resolution|INVALID | ------- Comment #3 from doko at ubuntu.com 2009-03-07 22:09 ------- reopen, lower severity to enhancement, please update to work with 2.5. -- 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 Sat Mar 7 14:22:11 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 07 Mar 2009 22:22:11 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #4 from aph at redhat.com 2009-03-07 22:22 ------- llvm changes very fast, and every release is incompatible with previous releases. If we are always trying to be compatible with the latest llvm we will never be doing anything else but scrambling to keep up with the latest mess of API changes. And by doing so we will be continually breaking Shark for people with older releases. The only sane way we can develop Shark is to choose an llvm version and stick with it for a little while. -- 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 mvfranz at gmail.com Sun Mar 8 19:10:27 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 8 Mar 2009 21:10:27 -0500 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> Message-ID: Here are the patches against IcedTea7 changeset: 1623:5bda1b46a64f they allow Fedora 10 to build the bsd-port changeset: 65:72d04adc33f8. The build is not perfect and does not work as well as an older set of patches (the build fails with some genxx.sh script but finishes fine if re-run). Since my original attempt the nio2 was added so, this needs to be disabled. I have tested configured as: ./configure --without-rhino --disable-liveconnect --disable-xrender --with-hotspot-build --disable-nio2 --with-project=bsd This almost builds on OS X, but I have not figured out my issue with jar and how specify a new include directory and a new lib directory. These patches do not allow zero to build. I did have this working in the previous version. The ecj build requires gjavah as there are patches that assume gjavah is used instead of a standard javah, it seems gjavah generates code a little differently. bsd-Makefile.am.patch should indicate how I worked the patches into the build system. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090308/acaa63e6/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: bsd-Makefile.am.patch Type: application/octet-stream Size: 4595 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090308/acaa63e6/bsd-Makefile.am.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: bsd-patches-new-and-moved.patch Type: application/octet-stream Size: 58445 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090308/acaa63e6/bsd-patches-new-and-moved.patch From bugzilla-daemon at icedtea.classpath.org Mon Mar 9 01:56:15 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 09 Mar 2009 08:56:15 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #5 from gbenson at redhat.com 2009-03-09 08:56 ------- I didn't realise they'd made a release. It shouldn't be to onerous for us to track their releases, given that they only occur every few months... -- 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 Mar 9 04:37:01 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 9 Mar 2009 11:37:01 +0000 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> Message-ID: <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> 2009/3/9 Michael Franz : > Here are the patches against IcedTea7 changeset:?? 1623:5bda1b46a64f they > allow Fedora 10 to build the bsd-port? changeset:?? 65:72d04adc33f8.? The > build is not perfect and does not work as well as an older set of patches > (the build fails with some genxx.sh script but finishes fine if re-run). > > Since my original attempt the nio2 was added so, this needs to be disabled. > I have tested configured as: > ./configure --without-rhino --disable-liveconnect --disable-xrender > --with-hotspot-build --disable-nio2 --with-project=bsd > b50 on includes NIO2 so disabling it is no longer an option. The BSD tree should be synced to this. > This almost builds on OS X, but I have not figured out my issue with jar and > how specify a new include directory and a new lib directory.? These patches > do not allow zero to build.? I did have this working in the previous > version. > twisti added some support for additional lib directories IIRC, when adding OpenSolaris support. Check the bit where you added BSD support. > The ecj build requires gjavah as there are patches that assume gjavah is > used instead of a standard javah, it seems gjavah generates code a little > differently. > This is intentional. The ecj bootstrap is designed for GNU Classpath-based solutions and was designed around gcj. It probably should be split into individual tests for specific bits of missing functionality. > bsd-Makefile.am.patch should indicate how I worked the patches into the > build system. > > Michael > > > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Mar 9 04:40:43 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 9 Mar 2009 11:40:43 +0000 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> Message-ID: <17c6771e0903090440t2bad7814t36ba10ea4d2c36c7@mail.gmail.com> 2009/3/9 Andrew John Hughes : > 2009/3/9 Michael Franz : >> Here are the patches against IcedTea7 changeset:?? 1623:5bda1b46a64f they >> allow Fedora 10 to build the bsd-port? changeset:?? 65:72d04adc33f8.? The >> build is not perfect and does not work as well as an older set of patches >> (the build fails with some genxx.sh script but finishes fine if re-run). >> >> Since my original attempt the nio2 was added so, this needs to be disabled. >> I have tested configured as: >> ./configure --without-rhino --disable-liveconnect --disable-xrender >> --with-hotspot-build --disable-nio2 --with-project=bsd >> > > b50 on includes NIO2 so disabling it is no longer an option. ?The BSD > tree should be synced to this. > >> This almost builds on OS X, but I have not figured out my issue with jar and >> how specify a new include directory and a new lib directory.? These patches >> do not allow zero to build.? I did have this working in the previous >> version. >> > > twisti added some support for additional lib directories IIRC, when > adding OpenSolaris support. > Check the bit where you added BSD support. > >> The ecj build requires gjavah as there are patches that assume gjavah is >> used instead of a standard javah, it seems gjavah generates code a little >> differently. >> > > This is intentional. ?The ecj bootstrap is designed for GNU > Classpath-based solutions and was designed around gcj. ?It probably > should be split into individual tests for specific bits of missing > functionality. > >> bsd-Makefile.am.patch should indicate how I worked the patches into the >> build system. >> I'm not sure what this does. It seems to introduce a whole heap of duplicate patches which would be impossible to maintain. Note that we want most IcedTea patches to go upstream where possible, and some of those in your version of IcedTea have already. >> Michael >> >> >> > > -- > Andrew :-) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > 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 > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 mvfranz at gmail.com Mon Mar 9 05:02:46 2009 From: mvfranz at gmail.com (Michael Franz) Date: Mon, 9 Mar 2009 07:02:46 -0500 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: <17c6771e0903090440t2bad7814t36ba10ea4d2c36c7@mail.gmail.com> References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> <17c6771e0903090440t2bad7814t36ba10ea4d2c36c7@mail.gmail.com> Message-ID: On Mon, Mar 9, 2009 at 6:40 AM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/3/9 Andrew John Hughes : > > 2009/3/9 Michael Franz : > >> Here are the patches against IcedTea7 changeset: 1623:5bda1b46a64f > they > >> allow Fedora 10 to build the bsd-port changeset: 65:72d04adc33f8. > The > >> build is not perfect and does not work as well as an older set of > patches > >> (the build fails with some genxx.sh script but finishes fine if re-run). > >> > >> Since my original attempt the nio2 was added so, this needs to be > disabled. > >> I have tested configured as: > >> ./configure --without-rhino --disable-liveconnect --disable-xrender > >> --with-hotspot-build --disable-nio2 --with-project=bsd > >> > > > > b50 on includes NIO2 so disabling it is no longer an option. The BSD > > tree should be synced to this. > > > >> This almost builds on OS X, but I have not figured out my issue with jar > and > >> how specify a new include directory and a new lib directory. These > patches > >> do not allow zero to build. I did have this working in the previous > >> version. > >> > > > > twisti added some support for additional lib directories IIRC, when > > adding OpenSolaris support. > > Check the bit where you added BSD support. > > > >> The ecj build requires gjavah as there are patches that assume gjavah is > >> used instead of a standard javah, it seems gjavah generates code a > little > >> differently. > >> > > > > This is intentional. The ecj bootstrap is designed for GNU > > Classpath-based solutions and was designed around gcj. It probably > > should be split into individual tests for specific bits of missing > > functionality. > > > >> bsd-Makefile.am.patch should indicate how I worked the patches into the > >> build system. > >> > > I'm not sure what this does. It seems to introduce a whole heap of > duplicate patches which would be impossible to maintain. > What I did is determine which IcedTea patches fail on the BSD port and moved the failing parts into two files. The original failing part is in jdk7 directory which are applied when using IcedTea's normal build. The same patches are then applied to the bsd port and put into bsd directory. The failing parts are mostly where there are new conditionals around BSD and caused the files to be different enough that patch could not figure out how to apply them. If the FUZZ level is increased from 0 to 3 more of he patches apply without modification. > > Note that we want most IcedTea patches to go upstream where possible, > and some of those in your version of IcedTea have already. > I am not sure what you mean by this. The version I started with is not that old maybe 2 weeks. The BSD port is constantly merging in changes from up stream. Were there many patches in those two weeks? Is this more of a timing issue? Or is this a difference between IcedTea 6 and 7? > >> Michael > >> > >> > >> > > > > -- > > Andrew :-) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090309/e3fb879e/attachment.html From gbenson at redhat.com Mon Mar 9 07:26:54 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 09 Mar 2009 14:26:54 +0000 Subject: changeset in /hg/icedtea6: 2009-03-09 Gary Benson changeset a28649aea20f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a28649aea20f description: 2009-03-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::_trap_request): New field. (SharkTopLevelBlock::trap_request): New method. (SharkTopLevelBlock::scan_for_traps): Likewise. (SharkTopLevelBlock::has_trap): Rewritten. (SharkTopLevelBlock::trap_index): Removed method. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): New method. (SharkTopLevelBlock::emit_IR): s/trap_index/trap_request/. (SharkTopLevelBlock::get_virtual_callee): Removed slow case. * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp (SharkConstantPool::cache_entry_at): Removed slow case. * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp (SharkRuntime::_resolve_get_put): Removed. (SharkRuntime::_resolve_invoke): Likewise. (SharkRuntime::resolve_get_put): Likewise. (SharkRuntime::resolve_invoke): Likewise. (SharkRuntime::resolve_get_put_C): Likewise. (SharkRuntime::resolve_invoke_C): Likewise. (SharkRuntime::uncommon_trap_C): s/index/trap_request/. * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp (SharkRuntime::_resolve_get_put): Removed. (SharkRuntime::_resolve_invoke): Likewise. (SharkRuntime::initialize): Removed initialization for the above. (SharkRuntime::resolve_get_put_C): Removed. (SharkRuntime::resolve_invoke_C): Likewise. (SharkRuntime::uncommon_trap_C): s/index/trap_request/. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::do_field_access): Mismatch case now handled by trap. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 8 files changed, 168 insertions(+), 272 deletions(-) ChangeLog | 37 +++ ports/hotspot/src/share/vm/includeDB_shark | 2 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 5 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp | 72 ------- ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 152 --------------- ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 20 - ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 120 +++++++++-- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 32 ++- diffs (truncated from 624 to 500 lines): diff -r a912ddc51c0f -r a28649aea20f ChangeLog --- a/ChangeLog Sat Mar 07 20:43:28 2009 +0100 +++ b/ChangeLog Mon Mar 09 10:26:08 2009 -0400 @@ -1,3 +1,40 @@ 2009-03-07 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::_trap_request): New field. + (SharkTopLevelBlock::trap_request): New method. + (SharkTopLevelBlock::scan_for_traps): Likewise. + (SharkTopLevelBlock::has_trap): Rewritten. + (SharkTopLevelBlock::trap_index): Removed method. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): New method. + (SharkTopLevelBlock::emit_IR): s/trap_index/trap_request/. + (SharkTopLevelBlock::get_virtual_callee): Removed slow case. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp + (SharkConstantPool::cache_entry_at): Removed slow case. + + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_resolve_get_put): Removed. + (SharkRuntime::_resolve_invoke): Likewise. + (SharkRuntime::resolve_get_put): Likewise. + (SharkRuntime::resolve_invoke): Likewise. + (SharkRuntime::resolve_get_put_C): Likewise. + (SharkRuntime::resolve_invoke_C): Likewise. + (SharkRuntime::uncommon_trap_C): s/index/trap_request/. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_resolve_get_put): Removed. + (SharkRuntime::_resolve_invoke): Likewise. + (SharkRuntime::initialize): Removed initialization for the above. + (SharkRuntime::resolve_get_put_C): Removed. + (SharkRuntime::resolve_invoke_C): Likewise. + (SharkRuntime::uncommon_trap_C): s/index/trap_request/. + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::do_field_access): Mismatch case now handled by trap. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-07 Matthias Klose * Makefile.am (icedtea.stamp, icedtea-debug.stamp): Create target dirs. diff -r a912ddc51c0f -r a28649aea20f ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 09 10:26:08 2009 -0400 @@ -152,7 +152,6 @@ sharkConstantPool.cpp sharkConstantPool.cpp methodOop.hpp sharkConstantPool.cpp sharkBuilder.hpp sharkConstantPool.cpp sharkConstantPool.hpp -sharkConstantPool.cpp sharkRuntime.hpp sharkConstantPool.cpp sharkState.inline.hpp sharkConstantPool.cpp sharkType.hpp sharkConstantPool.cpp sharkValue.inline.hpp @@ -266,6 +265,7 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp ciType.hpp sharkTopLevelBlock.cpp ciTypeFlow.hpp sharkTopLevelBlock.cpp debug.hpp +sharkTopLevelBlock.cpp deoptimization.hpp sharkTopLevelBlock.cpp llvmHeaders.hpp sharkTopLevelBlock.cpp shark_globals.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp diff -r a912ddc51c0f -r a28649aea20f ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Mon Mar 09 10:26:08 2009 -0400 @@ -968,10 +968,7 @@ void SharkBlock::do_field_access(bool is bool will_link; ciField *field = iter()->get_field(will_link); assert(will_link, "typeflow responsibility"); - - // Check the bytecode matches the field - if (is_field == field->is_static()) - Unimplemented(); + assert(is_field != field->is_static(), "mismatch"); // Pop the value off the stack where necessary SharkValue *value = NULL; diff -r a912ddc51c0f -r a28649aea20f ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Mon Mar 09 10:26:08 2009 -0400 @@ -87,8 +87,10 @@ Value *SharkConstantPool::cache_entry_at // bizarre hack but it's the same as // constantPoolOopDesc::field_or_method_at(). which = Bytes::swap_u2(which); + assert(target()->holder()->is_cache_entry_resolved(which, block()->bc()), + "should be"); - Value *entry = builder()->CreateIntToPtr( + return builder()->CreateIntToPtr( builder()->CreateAdd( builder()->CreatePtrToInt( cache(), SharkType::intptr_type()), @@ -96,74 +98,6 @@ Value *SharkConstantPool::cache_entry_at in_bytes(constantPoolCacheOopDesc::base_offset()) + which * sizeof(ConstantPoolCacheEntry))), SharkType::cpCacheEntry_type()); - - // Resolve the entry if necessary - if (target()->holder()->is_cache_entry_resolved(which, block()->bc())) - return entry; - - int shift; - switch (ConstantPoolCacheEntry::bytecode_number(block()->bc())) { - case 1: - shift = 16; - break; - case 2: - shift = 24; - break; - default: - ShouldNotReachHere(); - } - - Value *opcode = builder()->CreateAnd( - builder()->CreateLShr( - builder()->CreateValueOfStructEntry( - entry, ConstantPoolCacheEntry::indices_offset(), - SharkType::intptr_type()), - LLVMValue::intptr_constant(shift)), - LLVMValue::intptr_constant(0xff)); - - BasicBlock *orig_block = builder()->GetInsertBlock(); - SharkState *orig_state = block()->current_state()->copy(); - - BasicBlock *resolve = block()->function()->CreateBlock("resolve"); - BasicBlock *resolved = block()->function()->CreateBlock("resolved"); - - builder()->CreateCondBr( - builder()->CreateICmpNE(opcode, LLVMValue::intptr_constant(block()->bc())), - resolve, resolved); - - builder()->SetInsertPoint(resolve); - Constant *resolver; - switch (block()->bc()) { - case Bytecodes::_invokestatic: - case Bytecodes::_invokespecial: - case Bytecodes::_invokevirtual: - case Bytecodes::_invokeinterface: - resolver = SharkRuntime::resolve_invoke(); - break; - - case Bytecodes::_getfield: - case Bytecodes::_getstatic: - case Bytecodes::_putfield: - case Bytecodes::_putstatic: - resolver = SharkRuntime::resolve_get_put(); - break; - - default: - ShouldNotReachHere(); - } - - block()->call_vm( - resolver, - entry, - LLVMValue::jint_constant(block()->bci()), - LLVMValue::jint_constant(block()->bc())); - BasicBlock *resolve_block = builder()->GetInsertBlock(); - builder()->CreateBr(resolved); - - builder()->SetInsertPoint(resolved); - block()->current_state()->merge(orig_state, orig_block, resolve_block); - - return entry; } Value *SharkConstantPool::java_mirror() diff -r a912ddc51c0f -r a28649aea20f ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Mon Mar 09 10:26:08 2009 -0400 @@ -36,8 +36,6 @@ Constant* SharkRuntime::_anewarray; Constant* SharkRuntime::_anewarray; Constant* SharkRuntime::_multianewarray; Constant* SharkRuntime::_register_finalizer; -Constant* SharkRuntime::_resolve_get_put; -Constant* SharkRuntime::_resolve_invoke; Constant* SharkRuntime::_resolve_klass; Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_throw_ArrayIndexOutOfBoundsException; @@ -120,20 +118,6 @@ void SharkRuntime::initialize(SharkBuild (intptr_t) register_finalizer_C, FunctionType::get(Type::VoidTy, params, false), "SharkRuntime__register_finalizer"); - - params.clear(); - params.push_back(SharkType::thread_type()); - params.push_back(SharkType::cpCacheEntry_type()); - params.push_back(SharkType::jint_type()); - params.push_back(SharkType::jint_type()); - _resolve_get_put = builder->make_function( - (intptr_t) resolve_get_put_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__resolve_get_put"); - _resolve_invoke = builder->make_function( - (intptr_t) resolve_invoke_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__resolve_invoke"); params.clear(); params.push_back(SharkType::thread_type()); @@ -349,138 +333,6 @@ JRT_ENTRY(void, SharkRuntime::register_f } JRT_END -JRT_ENTRY(void, SharkRuntime::resolve_get_put_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode)) -{ - // Resolve the field - FieldAccessInfo info; - { - constantPoolHandle pool(thread, method(thread)->constants()); - JvmtiHideSingleStepping jhss(thread); - LinkResolver::resolve_field( - info, pool, two_byte_index(thread, bci), bytecode, false, CHECK); - } - - // Check if link resolution caused the cache to be updated - if (entry->is_resolved(bytecode)) - return; - - // Compute auxiliary field attributes - TosState state = as_TosState(info.field_type()); - - // We need to delay resolving put instructions on final fields - // until we actually invoke one. This is required so we throw - // exceptions at the correct place. If we do not resolve completely - // in the current pass, leaving the put_code set to zero will - // cause the next put instruction to reresolve. - bool is_put = - (bytecode == Bytecodes::_putfield || bytecode == Bytecodes::_putstatic); - Bytecodes::Code put_code = (Bytecodes::Code) 0; - - // We also need to delay resolving getstatic instructions until the - // class is intitialized. This is required so that access to the - // static field will call the initialization function every time - // until the class is completely initialized as per 2.17.5 in JVM - // Specification. - instanceKlass *klass = instanceKlass::cast(info.klass()->as_klassOop()); - bool is_static = - (bytecode == Bytecodes::_getstatic || bytecode == Bytecodes::_putstatic); - bool uninitialized_static = (is_static && !klass->is_initialized()); - Bytecodes::Code get_code = (Bytecodes::Code) 0; - - if (!uninitialized_static) { - get_code = ((is_static) ? Bytecodes::_getstatic : Bytecodes::_getfield); - if (is_put || !info.access_flags().is_final()) { - put_code = ((is_static) ? Bytecodes::_putstatic : Bytecodes::_putfield); - } - } - - // Update the cache entry - entry->set_field( - get_code, - put_code, - info.klass(), - info.field_index(), - info.field_offset(), - state, - info.access_flags().is_final(), - info.access_flags().is_volatile()); -} -JRT_END - -JRT_ENTRY(void, SharkRuntime::resolve_invoke_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode)) -{ - // Find the receiver - Handle receiver(thread, NULL); - if (bytecode == Bytecodes::_invokevirtual || - bytecode == Bytecodes::_invokeinterface) { - ResourceMark rm(thread); - methodHandle mh(thread, method(thread)); - Bytecode_invoke *call = Bytecode_invoke_at(mh, bci); - symbolHandle signature(thread, call->signature()); - ArgumentSizeComputer asc(signature); - receiver = Handle(thread, (oop) tos_at(thread, asc.size())); - assert( - receiver.is_null() || - (Universe::heap()->is_in_reserved(receiver()) && - Universe::heap()->is_in_reserved(receiver->klass())), "sanity check"); - } - - // Resolve the method - CallInfo info; - { - constantPoolHandle pool(thread, method(thread)->constants()); - JvmtiHideSingleStepping jhss(thread); - LinkResolver::resolve_invoke( - info, receiver, pool, two_byte_index(thread, bci), bytecode, CHECK); - if (JvmtiExport::can_hotswap_or_post_breakpoint()) { - int retry_count = 0; - while (info.resolved_method()->is_old()) { - // It is very unlikely that method is redefined more than 100 - // times in the middle of resolve. If it is looping here more - // than 100 times means then there could be a bug here. - guarantee((retry_count++ < 100), - "Could not resolve to latest version of redefined method"); - // method is redefined in the middle of resolve so re-try. - LinkResolver::resolve_invoke( - info, receiver, pool, two_byte_index(thread, bci), bytecode, CHECK); - } - } - } - - // Check if link resolution caused the cache to be updated - if (entry->is_resolved(bytecode)) - return; - - // Update the cache entry - methodHandle rm = info.resolved_method(); - if (bytecode == Bytecodes::_invokeinterface) { - if (rm->method_holder() == SystemDictionary::object_klass()) { - // Workaround for the case where we encounter an invokeinterface, - // but should really have an invokevirtual since the resolved - // method is a virtual method in java.lang.Object. This is a - // corner case in the spec but is presumably legal, and while - // javac does not generate this code there's no reason it could - // not be produced by a compliant java compiler. See - // cpCacheOop.cpp for more details. - assert(rm->is_final() || info.has_vtable_index(), "should be set"); - entry->set_method(bytecode, rm, info.vtable_index()); - } - else { - entry->set_interface_call(rm, klassItable::compute_itable_index(rm())); - } - } - else { - entry->set_method(bytecode, rm, info.vtable_index()); - } -} -JRT_END - JRT_ENTRY(void, SharkRuntime::resolve_klass_C(JavaThread* thread, int index)) { klassOop klass = method(thread)->constants()->klass_at(index, CHECK); @@ -535,7 +387,7 @@ bool SharkRuntime::is_subtype_of_C(klass return object_klass->klass_part()->is_subtype_of(check_klass); } -void SharkRuntime::uncommon_trap_C(JavaThread* thread, int index) +void SharkRuntime::uncommon_trap_C(JavaThread* thread, int trap_request) { // In C2, uncommon_trap_blob creates a frame, so all the various // deoptimization functions expect to find the frame of the method @@ -547,7 +399,7 @@ void SharkRuntime::uncommon_trap_C(JavaT // Initiate the trap thread->set_last_Java_frame(); Deoptimization::UnrollBlock *urb = - Deoptimization::uncommon_trap(thread, index); + Deoptimization::uncommon_trap(thread, trap_request); thread->reset_last_Java_frame(); // Pop our dummy frame and the frame being deoptimized diff -r a912ddc51c0f -r a28649aea20f ports/hotspot/src/share/vm/shark/sharkRuntime.hpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Mon Mar 09 10:26:08 2009 -0400 @@ -37,8 +37,6 @@ class SharkRuntime : public AllStatic { static llvm::Constant* _anewarray; static llvm::Constant* _multianewarray; static llvm::Constant* _register_finalizer; - static llvm::Constant* _resolve_get_put; - static llvm::Constant* _resolve_invoke; static llvm::Constant* _resolve_klass; static llvm::Constant* _safepoint; static llvm::Constant* _throw_ArrayIndexOutOfBoundsException; @@ -76,14 +74,6 @@ class SharkRuntime : public AllStatic { static llvm::Constant* register_finalizer() { return _register_finalizer; - } - static llvm::Constant* resolve_get_put() - { - return _resolve_get_put; - } - static llvm::Constant* resolve_invoke() - { - return _resolve_invoke; } static llvm::Constant* resolve_klass() { @@ -120,14 +110,6 @@ class SharkRuntime : public AllStatic { static void register_finalizer_C(JavaThread* thread, oop object); - static void resolve_get_put_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode); - static void resolve_invoke_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode); static void resolve_klass_C(JavaThread* thread, int index); static void throw_ArrayIndexOutOfBoundsException_C(JavaThread* thread, const char* file, @@ -218,5 +200,5 @@ class SharkRuntime : public AllStatic { private: static void dump_C(const char *name, intptr_t value); static bool is_subtype_of_C(klassOop check_klass, klassOop object_klass); - static void uncommon_trap_C(JavaThread* thread, int index); + static void uncommon_trap_C(JavaThread* thread, int trap_request); }; diff -r a912ddc51c0f -r a28649aea20f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 09 10:26:08 2009 -0400 @@ -143,6 +143,99 @@ class SharkPHIState : public SharkState } }; +int SharkTopLevelBlock::scan_for_traps() +{ + // If typeflow got one then we're already done + if (ciblock()->has_trap()) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_unloaded, + Deoptimization::Action_reinterpret, + ciblock()->trap_index()); + } + + // Scan the bytecode + iter()->reset_to_bci(start()); + while (iter()->next_bci() < limit()) { + iter()->next(); + + ciField *field; + ciMethod *method; + bool will_link; + bool is_field; + + int index = -1; + + switch (bc()) { + case Bytecodes::_getfield: + case Bytecodes::_getstatic: + case Bytecodes::_putfield: + case Bytecodes::_putstatic: + field = iter()->get_field(will_link); + assert(will_link, "typeflow responsibility"); + is_field = (bc() == Bytecodes::_getfield || bc() == Bytecodes::_putfield); + + // If the bytecode does not match the field then bail out to + // the interpreter to throw an IncompatibleClassChangeError + if (is_field == field->is_static()) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_unhandled, + Deoptimization::Action_none); + } + + // If this is a getfield or putfield then there won't be a + // pool access and we're done + if (is_field) + break; + + // There won't be a pool access if this is a getstatic that + // resolves to a handled constant either + if (bc() == Bytecodes::_getstatic && field->is_constant()) { + if (SharkValue::from_ciConstant(field->constant_value())) + break; + } + + // Continue to the check + index = iter()->get_field_index(); + break; + + case Bytecodes::_invokespecial: + case Bytecodes::_invokestatic: + case Bytecodes::_invokevirtual: + case Bytecodes::_invokeinterface: + method = iter()->get_method(will_link); + assert(will_link, "typeflow responsibility"); + + // If this is a non-final invokevirtual then there won't + // be a pool access. We do need to check that its holder + // is linked, however, because its vtable won't have been + // set up otherwise. + if (bc() == Bytecodes::_invokevirtual && !method->is_final_method()) { + if (!method->holder()->is_linked()) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret); + } + break; + } + + // Continue to the check + index = iter()->get_method_index(); + break; + } + + // If we found a constant pool access on this bytecode then check it + if (index != -1) { + if (!target()->holder()->is_cache_entry_resolved( + Bytes::swap_u2(index), bc())) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, From gbenson at redhat.com Mon Mar 9 07:34:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 9 Mar 2009 14:34:18 +0000 Subject: Shark improved traps Message-ID: <20090309143418.GA25077@redhat.com> Hi all, Traps are a method of avoiding creating JITted code for complex and uncommon cases. The patch I just committed makes Shark able to trap on more stuff, namely unresolved direct and virtual calls, and unresolved static field accesses. This makes no difference to the overall execution speed, but it reduces compilation time and native code size, in some cases dramatically, and allows a bunch of complex and rarely-used code to be removed. Check out the number of lines in the patch that start with '-' :) Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r a912ddc51c0f ChangeLog --- a/ChangeLog Sat Mar 07 20:43:28 2009 +0100 +++ b/ChangeLog Mon Mar 09 10:24:39 2009 -0400 @@ -1,3 +1,40 @@ +2009-03-09 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::_trap_request): New field. + (SharkTopLevelBlock::trap_request): New method. + (SharkTopLevelBlock::scan_for_traps): Likewise. + (SharkTopLevelBlock::has_trap): Rewritten. + (SharkTopLevelBlock::trap_index): Removed method. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): New method. + (SharkTopLevelBlock::emit_IR): s/trap_index/trap_request/. + (SharkTopLevelBlock::get_virtual_callee): Removed slow case. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp + (SharkConstantPool::cache_entry_at): Removed slow case. + + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_resolve_get_put): Removed. + (SharkRuntime::_resolve_invoke): Likewise. + (SharkRuntime::resolve_get_put): Likewise. + (SharkRuntime::resolve_invoke): Likewise. + (SharkRuntime::resolve_get_put_C): Likewise. + (SharkRuntime::resolve_invoke_C): Likewise. + (SharkRuntime::uncommon_trap_C): s/index/trap_request/. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_resolve_get_put): Removed. + (SharkRuntime::_resolve_invoke): Likewise. + (SharkRuntime::initialize): Removed initialization for the above. + (SharkRuntime::resolve_get_put_C): Removed. + (SharkRuntime::resolve_invoke_C): Likewise. + (SharkRuntime::uncommon_trap_C): s/index/trap_request/. + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::do_field_access): Mismatch case now handled by trap. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-07 Matthias Klose * Makefile.am (icedtea.stamp, icedtea-debug.stamp): Create target dirs. diff -r a912ddc51c0f ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 09 10:24:39 2009 -0400 @@ -152,7 +152,6 @@ sharkConstantPool.cpp methodOop.hpp sharkConstantPool.cpp sharkBuilder.hpp sharkConstantPool.cpp sharkConstantPool.hpp -sharkConstantPool.cpp sharkRuntime.hpp sharkConstantPool.cpp sharkState.inline.hpp sharkConstantPool.cpp sharkType.hpp sharkConstantPool.cpp sharkValue.inline.hpp @@ -266,6 +265,7 @@ sharkTopLevelBlock.cpp ciType.hpp sharkTopLevelBlock.cpp ciTypeFlow.hpp sharkTopLevelBlock.cpp debug.hpp +sharkTopLevelBlock.cpp deoptimization.hpp sharkTopLevelBlock.cpp llvmHeaders.hpp sharkTopLevelBlock.cpp shark_globals.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp diff -r a912ddc51c0f ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Mon Mar 09 10:24:39 2009 -0400 @@ -968,10 +968,7 @@ bool will_link; ciField *field = iter()->get_field(will_link); assert(will_link, "typeflow responsibility"); - - // Check the bytecode matches the field - if (is_field == field->is_static()) - Unimplemented(); + assert(is_field != field->is_static(), "mismatch"); // Pop the value off the stack where necessary SharkValue *value = NULL; diff -r a912ddc51c0f ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Mon Mar 09 10:24:39 2009 -0400 @@ -87,8 +87,10 @@ // bizarre hack but it's the same as // constantPoolOopDesc::field_or_method_at(). which = Bytes::swap_u2(which); + assert(target()->holder()->is_cache_entry_resolved(which, block()->bc()), + "should be"); - Value *entry = builder()->CreateIntToPtr( + return builder()->CreateIntToPtr( builder()->CreateAdd( builder()->CreatePtrToInt( cache(), SharkType::intptr_type()), @@ -96,74 +98,6 @@ in_bytes(constantPoolCacheOopDesc::base_offset()) + which * sizeof(ConstantPoolCacheEntry))), SharkType::cpCacheEntry_type()); - - // Resolve the entry if necessary - if (target()->holder()->is_cache_entry_resolved(which, block()->bc())) - return entry; - - int shift; - switch (ConstantPoolCacheEntry::bytecode_number(block()->bc())) { - case 1: - shift = 16; - break; - case 2: - shift = 24; - break; - default: - ShouldNotReachHere(); - } - - Value *opcode = builder()->CreateAnd( - builder()->CreateLShr( - builder()->CreateValueOfStructEntry( - entry, ConstantPoolCacheEntry::indices_offset(), - SharkType::intptr_type()), - LLVMValue::intptr_constant(shift)), - LLVMValue::intptr_constant(0xff)); - - BasicBlock *orig_block = builder()->GetInsertBlock(); - SharkState *orig_state = block()->current_state()->copy(); - - BasicBlock *resolve = block()->function()->CreateBlock("resolve"); - BasicBlock *resolved = block()->function()->CreateBlock("resolved"); - - builder()->CreateCondBr( - builder()->CreateICmpNE(opcode, LLVMValue::intptr_constant(block()->bc())), - resolve, resolved); - - builder()->SetInsertPoint(resolve); - Constant *resolver; - switch (block()->bc()) { - case Bytecodes::_invokestatic: - case Bytecodes::_invokespecial: - case Bytecodes::_invokevirtual: - case Bytecodes::_invokeinterface: - resolver = SharkRuntime::resolve_invoke(); - break; - - case Bytecodes::_getfield: - case Bytecodes::_getstatic: - case Bytecodes::_putfield: - case Bytecodes::_putstatic: - resolver = SharkRuntime::resolve_get_put(); - break; - - default: - ShouldNotReachHere(); - } - - block()->call_vm( - resolver, - entry, - LLVMValue::jint_constant(block()->bci()), - LLVMValue::jint_constant(block()->bc())); - BasicBlock *resolve_block = builder()->GetInsertBlock(); - builder()->CreateBr(resolved); - - builder()->SetInsertPoint(resolved); - block()->current_state()->merge(orig_state, orig_block, resolve_block); - - return entry; } Value *SharkConstantPool::java_mirror() diff -r a912ddc51c0f ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Mon Mar 09 10:24:39 2009 -0400 @@ -36,8 +36,6 @@ Constant* SharkRuntime::_anewarray; Constant* SharkRuntime::_multianewarray; Constant* SharkRuntime::_register_finalizer; -Constant* SharkRuntime::_resolve_get_put; -Constant* SharkRuntime::_resolve_invoke; Constant* SharkRuntime::_resolve_klass; Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_throw_ArrayIndexOutOfBoundsException; @@ -120,20 +118,6 @@ (intptr_t) register_finalizer_C, FunctionType::get(Type::VoidTy, params, false), "SharkRuntime__register_finalizer"); - - params.clear(); - params.push_back(SharkType::thread_type()); - params.push_back(SharkType::cpCacheEntry_type()); - params.push_back(SharkType::jint_type()); - params.push_back(SharkType::jint_type()); - _resolve_get_put = builder->make_function( - (intptr_t) resolve_get_put_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__resolve_get_put"); - _resolve_invoke = builder->make_function( - (intptr_t) resolve_invoke_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__resolve_invoke"); params.clear(); params.push_back(SharkType::thread_type()); @@ -349,138 +333,6 @@ } JRT_END -JRT_ENTRY(void, SharkRuntime::resolve_get_put_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode)) -{ - // Resolve the field - FieldAccessInfo info; - { - constantPoolHandle pool(thread, method(thread)->constants()); - JvmtiHideSingleStepping jhss(thread); - LinkResolver::resolve_field( - info, pool, two_byte_index(thread, bci), bytecode, false, CHECK); - } - - // Check if link resolution caused the cache to be updated - if (entry->is_resolved(bytecode)) - return; - - // Compute auxiliary field attributes - TosState state = as_TosState(info.field_type()); - - // We need to delay resolving put instructions on final fields - // until we actually invoke one. This is required so we throw - // exceptions at the correct place. If we do not resolve completely - // in the current pass, leaving the put_code set to zero will - // cause the next put instruction to reresolve. - bool is_put = - (bytecode == Bytecodes::_putfield || bytecode == Bytecodes::_putstatic); - Bytecodes::Code put_code = (Bytecodes::Code) 0; - - // We also need to delay resolving getstatic instructions until the - // class is intitialized. This is required so that access to the - // static field will call the initialization function every time - // until the class is completely initialized as per 2.17.5 in JVM - // Specification. - instanceKlass *klass = instanceKlass::cast(info.klass()->as_klassOop()); - bool is_static = - (bytecode == Bytecodes::_getstatic || bytecode == Bytecodes::_putstatic); - bool uninitialized_static = (is_static && !klass->is_initialized()); - Bytecodes::Code get_code = (Bytecodes::Code) 0; - - if (!uninitialized_static) { - get_code = ((is_static) ? Bytecodes::_getstatic : Bytecodes::_getfield); - if (is_put || !info.access_flags().is_final()) { - put_code = ((is_static) ? Bytecodes::_putstatic : Bytecodes::_putfield); - } - } - - // Update the cache entry - entry->set_field( - get_code, - put_code, - info.klass(), - info.field_index(), - info.field_offset(), - state, - info.access_flags().is_final(), - info.access_flags().is_volatile()); -} -JRT_END - -JRT_ENTRY(void, SharkRuntime::resolve_invoke_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode)) -{ - // Find the receiver - Handle receiver(thread, NULL); - if (bytecode == Bytecodes::_invokevirtual || - bytecode == Bytecodes::_invokeinterface) { - ResourceMark rm(thread); - methodHandle mh(thread, method(thread)); - Bytecode_invoke *call = Bytecode_invoke_at(mh, bci); - symbolHandle signature(thread, call->signature()); - ArgumentSizeComputer asc(signature); - receiver = Handle(thread, (oop) tos_at(thread, asc.size())); - assert( - receiver.is_null() || - (Universe::heap()->is_in_reserved(receiver()) && - Universe::heap()->is_in_reserved(receiver->klass())), "sanity check"); - } - - // Resolve the method - CallInfo info; - { - constantPoolHandle pool(thread, method(thread)->constants()); - JvmtiHideSingleStepping jhss(thread); - LinkResolver::resolve_invoke( - info, receiver, pool, two_byte_index(thread, bci), bytecode, CHECK); - if (JvmtiExport::can_hotswap_or_post_breakpoint()) { - int retry_count = 0; - while (info.resolved_method()->is_old()) { - // It is very unlikely that method is redefined more than 100 - // times in the middle of resolve. If it is looping here more - // than 100 times means then there could be a bug here. - guarantee((retry_count++ < 100), - "Could not resolve to latest version of redefined method"); - // method is redefined in the middle of resolve so re-try. - LinkResolver::resolve_invoke( - info, receiver, pool, two_byte_index(thread, bci), bytecode, CHECK); - } - } - } - - // Check if link resolution caused the cache to be updated - if (entry->is_resolved(bytecode)) - return; - - // Update the cache entry - methodHandle rm = info.resolved_method(); - if (bytecode == Bytecodes::_invokeinterface) { - if (rm->method_holder() == SystemDictionary::object_klass()) { - // Workaround for the case where we encounter an invokeinterface, - // but should really have an invokevirtual since the resolved - // method is a virtual method in java.lang.Object. This is a - // corner case in the spec but is presumably legal, and while - // javac does not generate this code there's no reason it could - // not be produced by a compliant java compiler. See - // cpCacheOop.cpp for more details. - assert(rm->is_final() || info.has_vtable_index(), "should be set"); - entry->set_method(bytecode, rm, info.vtable_index()); - } - else { - entry->set_interface_call(rm, klassItable::compute_itable_index(rm())); - } - } - else { - entry->set_method(bytecode, rm, info.vtable_index()); - } -} -JRT_END - JRT_ENTRY(void, SharkRuntime::resolve_klass_C(JavaThread* thread, int index)) { klassOop klass = method(thread)->constants()->klass_at(index, CHECK); @@ -535,7 +387,7 @@ return object_klass->klass_part()->is_subtype_of(check_klass); } -void SharkRuntime::uncommon_trap_C(JavaThread* thread, int index) +void SharkRuntime::uncommon_trap_C(JavaThread* thread, int trap_request) { // In C2, uncommon_trap_blob creates a frame, so all the various // deoptimization functions expect to find the frame of the method @@ -547,7 +399,7 @@ // Initiate the trap thread->set_last_Java_frame(); Deoptimization::UnrollBlock *urb = - Deoptimization::uncommon_trap(thread, index); + Deoptimization::uncommon_trap(thread, trap_request); thread->reset_last_Java_frame(); // Pop our dummy frame and the frame being deoptimized diff -r a912ddc51c0f ports/hotspot/src/share/vm/shark/sharkRuntime.hpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Mon Mar 09 10:24:39 2009 -0400 @@ -37,8 +37,6 @@ static llvm::Constant* _anewarray; static llvm::Constant* _multianewarray; static llvm::Constant* _register_finalizer; - static llvm::Constant* _resolve_get_put; - static llvm::Constant* _resolve_invoke; static llvm::Constant* _resolve_klass; static llvm::Constant* _safepoint; static llvm::Constant* _throw_ArrayIndexOutOfBoundsException; @@ -77,14 +75,6 @@ { return _register_finalizer; } - static llvm::Constant* resolve_get_put() - { - return _resolve_get_put; - } - static llvm::Constant* resolve_invoke() - { - return _resolve_invoke; - } static llvm::Constant* resolve_klass() { return _resolve_klass; @@ -120,14 +110,6 @@ static void register_finalizer_C(JavaThread* thread, oop object); - static void resolve_get_put_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode); - static void resolve_invoke_C(JavaThread* thread, - ConstantPoolCacheEntry* entry, - int bci, - Bytecodes::Code bytecode); static void resolve_klass_C(JavaThread* thread, int index); static void throw_ArrayIndexOutOfBoundsException_C(JavaThread* thread, const char* file, @@ -218,5 +200,5 @@ private: static void dump_C(const char *name, intptr_t value); static bool is_subtype_of_C(klassOop check_klass, klassOop object_klass); - static void uncommon_trap_C(JavaThread* thread, int index); + static void uncommon_trap_C(JavaThread* thread, int trap_request); }; diff -r a912ddc51c0f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 09 10:24:39 2009 -0400 @@ -143,6 +143,99 @@ } }; +int SharkTopLevelBlock::scan_for_traps() +{ + // If typeflow got one then we're already done + if (ciblock()->has_trap()) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_unloaded, + Deoptimization::Action_reinterpret, + ciblock()->trap_index()); + } + + // Scan the bytecode + iter()->reset_to_bci(start()); + while (iter()->next_bci() < limit()) { + iter()->next(); + + ciField *field; + ciMethod *method; + bool will_link; + bool is_field; + + int index = -1; + + switch (bc()) { + case Bytecodes::_getfield: + case Bytecodes::_getstatic: + case Bytecodes::_putfield: + case Bytecodes::_putstatic: + field = iter()->get_field(will_link); + assert(will_link, "typeflow responsibility"); + is_field = (bc() == Bytecodes::_getfield || bc() == Bytecodes::_putfield); + + // If the bytecode does not match the field then bail out to + // the interpreter to throw an IncompatibleClassChangeError + if (is_field == field->is_static()) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_unhandled, + Deoptimization::Action_none); + } + + // If this is a getfield or putfield then there won't be a + // pool access and we're done + if (is_field) + break; + + // There won't be a pool access if this is a getstatic that + // resolves to a handled constant either + if (bc() == Bytecodes::_getstatic && field->is_constant()) { + if (SharkValue::from_ciConstant(field->constant_value())) + break; + } + + // Continue to the check + index = iter()->get_field_index(); + break; + + case Bytecodes::_invokespecial: + case Bytecodes::_invokestatic: + case Bytecodes::_invokevirtual: + case Bytecodes::_invokeinterface: + method = iter()->get_method(will_link); + assert(will_link, "typeflow responsibility"); + + // If this is a non-final invokevirtual then there won't + // be a pool access. We do need to check that its holder + // is linked, however, because its vtable won't have been + // set up otherwise. + if (bc() == Bytecodes::_invokevirtual && !method->is_final_method()) { + if (!method->holder()->is_linked()) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret); + } + break; + } + + // Continue to the check + index = iter()->get_method_index(); + break; + } + + // If we found a constant pool access on this bytecode then check it + if (index != -1) { + if (!target()->holder()->is_cache_entry_resolved( + Bytes::swap_u2(index), bc())) { + return Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret); + } + } + } + return TRAP_NO_TRAPS; +} + SharkState* SharkTopLevelBlock::entry_state() { if (_entry_state == NULL) { @@ -243,7 +336,7 @@ builder()->CreateCall2( SharkRuntime::uncommon_trap(), thread(), - LLVMValue::jint_constant(trap_index())); + LLVMValue::jint_constant(trap_request())); builder()->CreateRetVoid(); return; } @@ -860,8 +953,8 @@ } Value *SharkTopLevelBlock::get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver) + ciMethod* method, + SharkValue* receiver) { switch (call_type) { case CALL_DIRECT: @@ -901,34 +994,19 @@ SharkType::jobject_type(), "klass"); - Value *index; - if (!method->holder()->is_linked()) { - // Yuck, we have to do this one slow :( - // XXX should we trap on this? - NOT_PRODUCT(warning("unresolved invokevirtual in %s", function()->name())); - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - } - else { - index = LLVMValue::intptr_constant(method->vtable_index()); - } - return builder()->CreateLoad( builder()->CreateArrayAddress( klass, SharkType::methodOop_type(), vtableEntry::size() * wordSize, in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - index), + LLVMValue::intptr_constant(method->vtable_index())), "callee"); } // Interpreter-style virtual call lookup -Value* SharkTopLevelBlock::get_virtual_callee(Value *cache, SharkValue *receiver) +Value* SharkTopLevelBlock::get_virtual_callee(Value *cache, + SharkValue *receiver) { BasicBlock *final = function()->CreateBlock("final"); BasicBlock *not_final = function()->CreateBlock("not_final"); diff -r a912ddc51c0f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Sat Mar 07 20:43:28 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Mar 09 10:24:39 2009 -0400 @@ -29,6 +29,7 @@ : SharkBlock(function->builder(), function->target(), function->iter()), _function(function), _ciblock(ciblock), + _trap_request(TRAP_UNCHECKED), _entered(false), _needs_phis(false), _entry_state(NULL), @@ -59,14 +60,6 @@ int index() const { return ciblock()->pre_order(); - } - bool has_trap() const - { - return ciblock()->has_trap(); - } - int trap_index() const - { - return ciblock()->trap_index(); } bool is_private_copy() const { @@ -113,6 +106,29 @@ return function()->block(ciblock()->successors()->at(index)->pre_order()); } SharkTopLevelBlock* bci_successor(int bci) const; + + // Traps + private: + enum { + TRAP_UNCHECKED = 232323, // > any constant pool index + TRAP_NO_TRAPS + }; + int _trap_request; + + public: + int trap_request() + { + if (_trap_request == TRAP_UNCHECKED) + _trap_request = scan_for_traps(); + return _trap_request; + } + bool has_trap() + { + return trap_request() != TRAP_NO_TRAPS; + } + + private: + int scan_for_traps(); // Entry state private: From gnu_andrew at member.fsf.org Mon Mar 9 07:54:50 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 9 Mar 2009 14:54:50 +0000 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> <17c6771e0903090440t2bad7814t36ba10ea4d2c36c7@mail.gmail.com> Message-ID: <17c6771e0903090754y194a85e0u23f3413e64f2d647@mail.gmail.com> 2009/3/9 Michael Franz : > > > On Mon, Mar 9, 2009 at 6:40 AM, Andrew John Hughes > wrote: >> >> 2009/3/9 Andrew John Hughes : >> > 2009/3/9 Michael Franz : >> >> Here are the patches against IcedTea7 changeset:?? 1623:5bda1b46a64f >> >> they >> >> allow Fedora 10 to build the bsd-port? changeset:?? 65:72d04adc33f8. >> >> The >> >> build is not perfect and does not work as well as an older set of >> >> patches >> >> (the build fails with some genxx.sh script but finishes fine if >> >> re-run). >> >> >> >> Since my original attempt the nio2 was added so, this needs to be >> >> disabled. >> >> I have tested configured as: >> >> ./configure --without-rhino --disable-liveconnect --disable-xrender >> >> --with-hotspot-build --disable-nio2 --with-project=bsd >> >> >> > >> > b50 on includes NIO2 so disabling it is no longer an option. ?The BSD >> > tree should be synced to this. >> >../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c: In function 'Java_sun_nio_ch_FileDispatcherImpl_lock0': ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: error: 'sun_nio_ch_FileDispatcherImpl_NO_LOCK' undeclared (first use in this function) ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: error: (Each undeclared identifier is reported only once ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: error: for each function it appears in.) ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:197: error: 'sun_nio_ch_FileDispatcherImpl_INTERRUPTED' undeclared (first use in this function) >> >> This almost builds on OS X, but I have not figured out my issue with >> >> jar and >> >> how specify a new include directory and a new lib directory.? These >> >> patches >> >> do not allow zero to build.? I did have this working in the previous >> >> version. >> >> >> > >> > twisti added some support for additional lib directories IIRC, when >> > adding OpenSolaris support. >> > Check the bit where you added BSD support. >> > >> >> The ecj build requires gjavah as there are patches that assume gjavah >> >> is >> >> used instead of a standard javah, it seems gjavah generates code a >> >> little >> >> differently. >> >> >> > >> > This is intentional. ?The ecj bootstrap is designed for GNU >> > Classpath-based solutions and was designed around gcj. ?It probably >> > should be split into individual tests for specific bits of missing >> > functionality. >> > >> >> bsd-Makefile.am.patch should indicate how I worked the patches into the >> >> build system. >> >> >> >> I'm not sure what this does. ?It seems to introduce a whole heap of >> duplicate patches which would be impossible to maintain. > > What I did is determine which IcedTea patches fail on the BSD port and moved > the failing parts into two files.? The original failing part is in jdk7 > directory which are applied when using IcedTea's normal build. The same > patches are then applied to the bsd port and put into bsd directory. > > The failing parts are mostly where there are new conditionals around BSD and > caused the files to be different enough that patch could not figure out how > to apply them.? If the FUZZ level is increased from 0 to 3 more of he > patches apply without modification. > We don't really want to be maintaining about a dozen patches just for BSD, so we need to look at why the BSD versions differ and whether the changes could be pushed to the main tree instead. >> >> Note that we want most IcedTea patches to go upstream where possible, >> and some of those in your version of IcedTea have already. > > I am not sure what you mean by this. We don't want to be maintaining the 100+ patches in IcedTea forever :) Some have already gone upstream to OpenJDK, some since your patch. We also now have an IcedTea project within the OpenJDK space that can be used for patches submitted under the SCA, so hopefully most of the patches in IcedTea will start to disappear. It would be good to also get any relevant patches into the BSD tree too. As you'll have experienced, things change rapidly enough that maintaining all these patches is a major pain! The version I started with is not that > old maybe 2 weeks. 2 weeks is a long time with 7 -- the existence of icedtea-no-bcopy.patch suggests it's at least prior to b47, while IcedTea7 now supports b49 and I'm working on b50. The BSD port is constantly merging in changes from up > stream.? Were there many patches in those two weeks? There were changes to upstream OpenJDK7: http://download.java.net/jdk7/changes/jdk7-b47.html http://download.java.net/jdk7/changes/jdk7-b48.html http://download.java.net/jdk7/changes/jdk7-b49.html and I merged in the latest patches from IcedTea6 (which is about another 60 changesets but this was mostly plugin/Shark updates). >? Is this more of a > timing issue? It would be good to have a heads-up if you're working on something, as I don't want your work to be wasted. It would probably be better to send patches to the list as you go along. We can probably sort out commit access to IcedTea7 pretty easily, but patches need to be approved first anyway. > Or is this a difference between IcedTea 6 and 7? > Well they support a completely different OpenJDK tree :D So yes, that makes quite a difference and now changes to the upstream 7 tree seem to be happening much more rapidly, it's harder to keep up. Hence why I want to get as much as possible upstream and maintain most of it in our own forest - a lot of the patches then become one-time Mercurial merges. I didn't realise you were building on a GNU/Linux box (or rather, that the BSD port would build there). I could probably also test that. I've been meaning to set up a virtual image of FreeBSD to test, but not got round to it. I also have OSX, but that means I actually have to use it... :( But having IcedTea supporting PPC OSX would be kinda nice. >> >> >> Michael >> >> >> >> >> >> >> > >> > -- >> > Andrew :-) >> > > > > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Tomas.Hurka at Sun.COM Mon Mar 9 08:09:57 2009 From: Tomas.Hurka at Sun.COM (Tomas Hurka) Date: Mon, 09 Mar 2009 16:09:57 +0100 Subject: VisualVM 1.1.1 and IcedTea6 Message-ID: <383D6BB0-4584-4090-9198-47849B7684DB@sun.com> Hi All, attached is a simple patch to include new version (1.1.1) of VisualVM in IcedTea6. Can somebody commit these changes for me? Thanks, -- Tomas Hurka NetBeans Profiler http://profiler.netbeans.org VisualVM http://visualvm.dev.java.net Software Engineer, Developer Platforms Group Sun Microsystems, Praha Czech Republic -------------- next part -------------- A non-text attachment was scrubbed... Name: visualvm-111.patch Type: application/octet-stream Size: 881 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090309/aa18c2b0/visualvm-111.patch -------------- next part -------------- From mr at sun.com Mon Mar 9 09:06:22 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 09 Mar 2009 09:06:22 -0700 Subject: Setting up the OpenJDK IcedTea Project Message-ID: <20090309160622.263D728E0EE@eggemoggin.niobe.net> A few more-or-less standard questions for you ... - Mercurial configuration: What do you need? A single repository or two, or a forest or two (e.g., jdk6 and jdk7), or something else? - Mercurial users: Who needs push access? If they aren't already registered in the OpenJDK infrastructure then I'll arrange for invitations to be sent to them. - Mailing list: Do you want an icedtea-dev list, or do you just want to use distro-pkg-dev? Do you want hg push notices to be sent to whichever list you choose? - Do you have any initial content for your main Project web page? If so, please send it to me in simple XHTML. Dalibor, in his role as Moderator, can always update it later on. (We're working to allow any Project author to modify that Project's web content, but we're not quite there yet.) If you don't send me anything then I'll create something plain and simple for now. - Mark From langel at redhat.com Mon Mar 9 09:37:23 2009 From: langel at redhat.com (Lillian Angel) Date: Mon, 09 Mar 2009 16:37:23 +0000 Subject: changeset in /hg/icedtea6: 2009-03-09 Tomas Hurka changeset b7948732adf2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b7948732adf2 description: 2009-03-09 Tomas Hurka * Makefile.am: Updated visualvm to version 1.1.1. diffstat: 2 files changed, 7 insertions(+), 3 deletions(-) ChangeLog | 4 ++++ Makefile.am | 6 +++--- diffs (34 lines): diff -r a28649aea20f -r b7948732adf2 ChangeLog --- a/ChangeLog Mon Mar 09 10:26:08 2009 -0400 +++ b/ChangeLog Mon Mar 09 12:36:47 2009 -0400 @@ -1,3 +1,7 @@ 2009-03-09 Gary Benson + + * Makefile.am: Updated visualvm to version 1.1.1. + 2009-03-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r a28649aea20f -r b7948732adf2 Makefile.am --- a/Makefile.am Mon Mar 09 10:26:08 2009 -0400 +++ b/Makefile.am Mon Mar 09 12:36:47 2009 -0400 @@ -6,7 +6,7 @@ CACAO_MD5SUM = 80de3ad344c1a20c086ec5f13 CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 NETBEANS_PROFILER_MD5SUM = 786ab31817cbd902a7211cd6a6161750 -VISUALVM_MD5SUM = 1174486e82a65840b44c47166d79f212 +VISUALVM_MD5SUM = a289739f4a5bcdb9a2c642cfcc1e83fe if ENABLE_GCJWEBPLUGIN GCJWEBPLUGIN_CLEAN = clean-gcjwebplugin @@ -313,8 +313,8 @@ NETBEANS_PROFILER_URL = http://icedtea.c NETBEANS_PROFILER_URL = http://icedtea.classpath.org/visualvm/ NETBEANS_PROFILER_SRC_ZIP = netbeans-profiler-visualvm_release65_mod.tar.gz -VISUALVM_URL = https://visualvm.dev.java.net/files/documents/7163/127067/ -VISUALVM_SRC_ZIP = visualvm-11-src.tar.gz +VISUALVM_URL = https://visualvm.dev.java.net/files/documents/7163/127170/ +VISUALVM_SRC_ZIP = visualvm-111-src.tar.gz stamps/hgforest.stamp: From langel at redhat.com Mon Mar 9 09:37:14 2009 From: langel at redhat.com (Lillian Angel) Date: Mon, 09 Mar 2009 12:37:14 -0400 Subject: VisualVM 1.1.1 and IcedTea6 In-Reply-To: <383D6BB0-4584-4090-9198-47849B7684DB@sun.com> References: <383D6BB0-4584-4090-9198-47849B7684DB@sun.com> Message-ID: <49B545BA.3000508@redhat.com> Tomas Hurka wrote: > Hi All, > attached is a simple patch to include new version (1.1.1) of VisualVM > in IcedTea6. Can somebody commit these changes for me? Committed. Thanks! Lillian From keiths at redhat.com Mon Mar 9 11:18:28 2009 From: keiths at redhat.com (Keith Seitz) Date: Mon, 09 Mar 2009 11:18:28 -0700 Subject: Fwd: [PATCH] Several security issues in lcms In-Reply-To: <200903091652.28777.mvyskocil@suse.cz> References: <200903091652.28777.mvyskocil@suse.cz> Message-ID: <49B55D74.60600@redhat.com> Michal Vyskocil wrote: > Hi Keith, > > as I found [1] you're the original author of lcms integration in openjdk. As > there are some vulnerabilities in it, I used a patches created by SUSE > maintainer Standa Brabec [2] and applied them on openjdk-6-src- > b14-25_nov_2008.tar.gz [3]. > > Can you review those patches and add them to openjdk (or icedtea) mainline? > The CRD for lcms issues is March 19 (you can contact Tomas Hoger for more > detailed information). > > [1] http://mail.openjdk.java.net/pipermail/2d-dev/2008-April/000228.html > [2] http://pack.suse.cz/sbrabec/restricted/bnc479606/ > [3] http://pack.suse.cz/sbrabec/restricted/bnc479606/Michal_Vyskocil_OpenJDK/ > > Best regards > Michal Vyskocil From omajid at redhat.com Mon Mar 9 11:54:27 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 09 Mar 2009 14:54:27 -0400 Subject: IcedTea6 Testing In-Reply-To: <1236116968.3557.2.camel@hermans.wildebeest.org> References: <49AD975C.20001@redhat.com> <1236116968.3557.2.camel@hermans.wildebeest.org> Message-ID: <49B565E3.1050307@redhat.com> Mark Wielaard wrote: > Hi Omair, > > On Tue, 2009-03-03 at 15:47 -0500, Omair Majid wrote: >> I also have set up a nightly script to send out emails if there are any >> regressions in the tests. > > Nice, thanks for setting this up. Could you post the scripts that > produce these emails so others can also run them? And could you include > the hg revision number in the emails plus distro, architecture, etc. > Probably the output of -version should have all that. That way it is > easier to identify what the results correspond to and to compare them > with other results being send in. Sorry about taking so long. I have added the output of java -version for the builds to the emails. The sources for the scripts (and updated versions) should be at http://icedtea.classpath.org/~omajid/src/ > > Thanks, > > Mark > Cheers, Omair From gnu_andrew at member.fsf.org Mon Mar 9 15:48:58 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 9 Mar 2009 22:48:58 +0000 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: <20090309160622.263D728E0EE@eggemoggin.niobe.net> References: <20090309160622.263D728E0EE@eggemoggin.niobe.net> Message-ID: <17c6771e0903091548n75ad488dt7741ab1779800bd6@mail.gmail.com> 2009/3/9 Mark Reinhold : > A few more-or-less standard questions for you ... > Yes, think I've seen something similar before... ;) > ?- Mercurial configuration: What do you need? ?A single repository or > ? ?two, or a forest or two (e.g., jdk6 and jdk7), or something else? > I'd like a jdk7 forest for the work on IcedTea7. I didn't know we'd have the option of having more than one. I quite like the idea of having a forest for 6 too, but I'll let others on this list chime in on whether they would be interested in taking this route or not. > ?- Mercurial users: Who needs push access? ?If they aren't already > ? ?registered in the OpenJDK infrastructure then I'll arrange for > ? ?invitations to be sent to them. > Well, me to begin with :) I already have an OpenJDK username of 'andrew' from the challenge, assuming that's still active. For others, I'd like to wait for some feedback from those working on 6. > ?- Mailing list: Do you want an icedtea-dev list, or do you just want > ? ?to use distro-pkg-dev? ?Do you want hg push notices to be sent to > ? ?whichever list you choose? > I'm happy enough using distro-pkg-dev for discussion as we already do. An additional list for commits would be good (e.g. icedtea-commits) and we could then maybe also send traffic from the IcedTea repositories there too. > ?- Do you have any initial content for your main Project web page? > ? ?If so, please send it to me in simple XHTML. ?Dalibor, in his role > ? ?as Moderator, can always update it later on. ?(We're working to allow > ? ?any Project author to modify that Project's web content, but we're > ? ?not quite there yet.) ?If you don't send me anything then I'll create > ? ?something plain and simple for now. > I'll try and come up with something tomorrow, probably along the same lines as the proposal. It'll mainly point to http://icedtea.classpath.org/ as there's already a lot of information there. > - Mark > Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 mvfranz at gmail.com Mon Mar 9 17:30:09 2009 From: mvfranz at gmail.com (Michael Franz) Date: Mon, 9 Mar 2009 19:30:09 -0500 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: <17c6771e0903090754y194a85e0u23f3413e64f2d647@mail.gmail.com> References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> <17c6771e0903090440t2bad7814t36ba10ea4d2c36c7@mail.gmail.com> <17c6771e0903090754y194a85e0u23f3413e64f2d647@mail.gmail.com> Message-ID: On Mon, Mar 9, 2009 at 9:54 AM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/3/9 Michael Franz : > > > > > > On Mon, Mar 9, 2009 at 6:40 AM, Andrew John Hughes > > wrote: > >> > >> 2009/3/9 Andrew John Hughes : > >> > 2009/3/9 Michael Franz : > >> >> Here are the patches against IcedTea7 changeset: 1623:5bda1b46a64f > >> >> they > >> >> allow Fedora 10 to build the bsd-port changeset: 65:72d04adc33f8. > >> >> The > >> >> build is not perfect and does not work as well as an older set of > >> >> patches > >> >> (the build fails with some genxx.sh script but finishes fine if > >> >> re-run). > >> >> > >> >> Since my original attempt the nio2 was added so, this needs to be > >> >> disabled. > >> >> I have tested configured as: > >> >> ./configure --without-rhino --disable-liveconnect --disable-xrender > >> >> --with-hotspot-build --disable-nio2 --with-project=bsd > >> >> > >> > > >> > b50 on includes NIO2 so disabling it is no longer an option. The BSD > >> > tree should be synced to this. > >> >../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c: In > function 'Java_sun_nio_ch_FileDispatcherImpl_lock0': > ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: > error: 'sun_nio_ch_FileDispatcherImpl_NO_LOCK' undeclared (first use > in this function) > ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: > error: (Each undeclared identifier is reported only once > ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: > error: for each function it appears in.) > ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:197: > error: 'sun_nio_ch_FileDispatcherImpl_INTERRUPTED' undeclared (first > use in this function) > Looks like the BSD port was bumped to b50 on March 5 (I was using March 1) > > >> >> This almost builds on OS X, but I have not figured out my issue with > >> >> jar and > >> >> how specify a new include directory and a new lib directory. These > >> >> patches > >> >> do not allow zero to build. I did have this working in the previous > >> >> version. > >> >> > >> > > >> > twisti added some support for additional lib directories IIRC, when > >> > adding OpenSolaris support. > >> > Check the bit where you added BSD support. > >> > > >> >> The ecj build requires gjavah as there are patches that assume gjavah > >> >> is > >> >> used instead of a standard javah, it seems gjavah generates code a > >> >> little > >> >> differently. > >> >> > >> > > >> > This is intentional. The ecj bootstrap is designed for GNU > >> > Classpath-based solutions and was designed around gcj. It probably > >> > should be split into individual tests for specific bits of missing > >> > functionality. > >> > > >> >> bsd-Makefile.am.patch should indicate how I worked the patches into > the > >> >> build system. > >> >> > >> > >> I'm not sure what this does. It seems to introduce a whole heap of > >> duplicate patches which would be impossible to maintain. > > > > What I did is determine which IcedTea patches fail on the BSD port and > moved > > the failing parts into two files. The original failing part is in jdk7 > > directory which are applied when using IcedTea's normal build. The same > > patches are then applied to the bsd port and put into bsd directory. > > > > The failing parts are mostly where there are new conditionals around BSD > and > > caused the files to be different enough that patch could not figure out > how > > to apply them. If the FUZZ level is increased from 0 to 3 more of he > > patches apply without modification. > > > > We don't really want to be maintaining about a dozen patches just for > BSD, so we need to look at why the BSD versions differ and whether the > changes could be pushed to the main tree instead. > It would be nice to have a minimal set of patches to for BSD. Like I said, most of the patches deal with BSD conditional logic that is not in the main tree. > > >> > >> Note that we want most IcedTea patches to go upstream where possible, > >> and some of those in your version of IcedTea have already. > > > > I am not sure what you mean by this. > > We don't want to be maintaining the 100+ patches in IcedTea forever :) > Some have already gone upstream to OpenJDK, some since your patch. > We also now have an IcedTea project within the OpenJDK space that can > be used for patches submitted under the SCA, > so hopefully most of the patches in IcedTea will start to disappear. > > It would be good to also get any relevant patches into the BSD tree > too. As you'll have experienced, things change rapidly enough that > maintaining all these patches is a major pain! > Especially with limited time to spend on it. > > The version I started with is not that > > old maybe 2 weeks. > > 2 weeks is a long time with 7 -- the existence of > icedtea-no-bcopy.patch suggests it's at least prior to b47, while > IcedTea7 now supports b49 and I'm working on b50. > > The BSD port is constantly merging in changes from up > > stream. Were there many patches in those two weeks? > > There were changes to upstream OpenJDK7: > > http://download.java.net/jdk7/changes/jdk7-b47.html > http://download.java.net/jdk7/changes/jdk7-b48.html > http://download.java.net/jdk7/changes/jdk7-b49.html > > and I merged in the latest patches from IcedTea6 (which is about > another 60 changesets but this was mostly plugin/Shark updates). > > > Is this more of a > > timing issue? > > It would be good to have a heads-up if you're working on something, as > I don't want your work to be wasted. > It would probably be better to send patches to the list as you go > along. We can probably sort out commit access to IcedTea7 pretty > easily, but patches need to be approved first anyway. > I was not expecting all of my work to go in, I did expect some of it to be wasted. Finding a better way to waste less of it would be appreciated. If most of IcedTea is going to end up into the main tree, then maybe we can get the changes into the BSD tree first. > > Or is this a difference between IcedTea 6 and 7? > > > > Well they support a completely different OpenJDK tree :D > So yes, that makes quite a difference and now changes to the upstream > 7 tree seem to be happening much more rapidly, it's harder to keep up. > Hence why I want to get as much as possible upstream and maintain > most of it in our own forest - a lot of the patches then become > one-time Mercurial merges. > > I didn't realise you were building on a GNU/Linux box (or rather, that > the BSD port would build there). I could probably also test that. Well, since IcedTea is building the JDK7 repo and staying up-to-date, there is no reason it should not build on linux (assuming JDK7 builds on linux). Most of the patches (I think) are to deal with the bootstrap via gcj/ecj. > > I've been meaning to set up a virtual image of FreeBSD to test, but > not got round to it. I also have OSX, but that means I actually have > to use it... :( But having IcedTea supporting PPC OSX would be kinda > nice. Do you have a PowerPC or an Intel based Mac? I run linux in multiple VMs to help with testing. If I cannot build the BSD repo under linux, I don't have much hope figuring out how IcedTea builds. > > > >> > >> >> Michael > >> >> > >> >> > >> >> > >> > > >> > -- > >> > Andrew :-) > >> > > > > > > > > > > > -- > Andrew :-) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090309/586fb10c/attachment.html From mvfranz at gmail.com Mon Mar 9 17:42:39 2009 From: mvfranz at gmail.com (Michael Franz) Date: Mon, 9 Mar 2009 19:42:39 -0500 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> Message-ID: > > > > This almost builds on OS X, but I have not figured out my issue with jar > and > > how specify a new include directory and a new lib directory. These > patches > > do not allow zero to build. I did have this working in the previous > > version. > > > > twisti added some support for additional lib directories IIRC, when > adding OpenSolaris support. > Check the bit where you added BSD support. > What differentiates OpenSolaris from Solaris? What is the easiest thing to grep for? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090309/ee48ec23/attachment.html From mvfranz at gmail.com Mon Mar 9 20:06:19 2009 From: mvfranz at gmail.com (Michael Franz) Date: Mon, 9 Mar 2009 22:06:19 -0500 Subject: Possible bug in NIO2 patches Message-ID: Hi, while investigating the nio2 patches I noticed that there is a mistake (I think) in the patches to nio/Makefile. There are new java classes added to a section but the continuation character was not added. Below is the correction. Michael --- icedtea-nio2.patch.orig 2009-03-09 23:01:28.000000000 -0400 +++ icedtea-nio2.patch 2009-03-09 23:03:19.000000000 -0400 @@ -321,7 +321,7 @@ + sun/nio/ch/WindowsAsynchronousFileChannelImpl.java \ + sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java \ + sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java \ - sun/nio/ch/WindowsSelectorImpl.java + sun/nio/ch/WindowsSelectorImpl.java \ + sun/nio/fs/WindowsNativeDispatcher.java \ + sun/nio/fs/RegistryFileTypeDetector.java endif # PLATFORM = windows -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090309/6abe83b6/attachment.html From gnu_andrew at member.fsf.org Tue Mar 10 01:49:36 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 10 Mar 2009 08:49:36 +0000 Subject: Possible bug in NIO2 patches In-Reply-To: References: Message-ID: <17c6771e0903100149u5feef1bct6f7d62f74b23a27d@mail.gmail.com> 2009/3/10 Michael Franz : > Hi, > > while investigating the nio2 patches I noticed that there is a mistake (I > think) in the patches to nio/Makefile.? There are new java classes added to > a section but the continuation character was not added.? Below is the > correction. > > Michael > > --- icedtea-nio2.patch.orig??? 2009-03-09 23:01:28.000000000 -0400 > +++ icedtea-nio2.patch??? 2009-03-09 23:03:19.000000000 -0400 > @@ -321,7 +321,7 @@ > ?+??? sun/nio/ch/WindowsAsynchronousFileChannelImpl.java \ > ?+??? sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java \ > ?+??? sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java \ > - ??? sun/nio/ch/WindowsSelectorImpl.java > + ??? sun/nio/ch/WindowsSelectorImpl.java \ > ?+??? sun/nio/fs/WindowsNativeDispatcher.java \ > ?+??? sun/nio/fs/RegistryFileTypeDetector.java > ? endif # PLATFORM = windows > > Well spotted; unsurprisingly the Windows build hasn't been tested... ;) Most of this patch is gone now in my local copy with the move to b50. I'll push this once it builds. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Mar 10 03:19:22 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 10 Mar 2009 10:19:22 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #6 from gbenson at redhat.com 2009-03-10 10:19 ------- Doko, I can't see me having time to do the upgrade anytime soon, but if you want to make a patch I'll make the time to test 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 mvfranz at gmail.com Tue Mar 10 04:58:35 2009 From: mvfranz at gmail.com (Michael Franz) Date: Tue, 10 Mar 2009 07:58:35 -0400 Subject: Where does b46 come from in 'build 1.7.0_0-bsd-b46' Message-ID: Hi, I built the bsd-repo using IcedTea7, the java -version output is: OpenJDK (IcedTea 1.9-pre-r5bda1b46a64f) Runtime Environment (build 1.7.0_0-bsd-b46) OpenJDK Server VM (build 15.0-b02, mixed mode) Since the tags in the repo are are b50(all but) and b48 (jdk) where does the b46 come from? I thought it was the tag, but I am probably wrong. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090310/391b4a80/attachment.html From gnu_andrew at member.fsf.org Tue Mar 10 06:03:53 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 10 Mar 2009 13:03:53 +0000 Subject: Where does b46 come from in 'build 1.7.0_0-bsd-b46' In-Reply-To: References: Message-ID: <17c6771e0903100603y113a83f0r6b8bf7ce2ca21343@mail.gmail.com> 2009/3/10 Michael Franz : > Hi, > > I built the bsd-repo using IcedTea7, the java -version output is: > OpenJDK (IcedTea 1.9-pre-r5bda1b46a64f) Runtime Environment (build > 1.7.0_0-bsd-b46) > OpenJDK Server VM (build 15.0-b02, mixed mode) > > Since the tags in the repo are are b50(all but) and b48 (jdk) where does the > b46 come from?? I thought it was the tag, but I am probably wrong. > > Michael > Strange, have you grepped the BSD tree? Plain IcedTea has always had this change just fine when the upstream changes. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Tue Mar 10 07:36:06 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 10 Mar 2009 10:36:06 -0400 Subject: Has anyone run IcedTea7 jtreg tests recently? Message-ID: <49B67AD6.9000005@redhat.com> Hi, I have been trying to get IcedTea7 JTreg tests to run nightly so regressions can be identified. However, I have run across an issue where the jdk tests start producing an error message. Here is part of output of jtreg: Passed: com/sun/media/sound/SoftTuning/NewSoftTuningPatchByteArray.java Passed: com/sun/net/httpserver/bugs/B6339483.java Passed: com/sun/net/httpserver/bugs/B6341616.java Error: com/sun/net/httpserver/bugs/B6361557.java FAILED: com/sun/net/httpserver/bugs/B6373555.java Error: com/sun/net/httpserver/bugs/B6393710.java After this, all tests either error out or fail. The harness.trace file shows this: Test finished: com/sun/net/httpserver/bugs/B6341616.java: Passed. Execution successful Test starting: com/sun/net/httpserver/bugs/B6361557.java Test finished: com/sun/net/httpserver/bugs/B6361557.java: Error. Error while cleaning up threads after test Test starting: com/sun/net/httpserver/bugs/B6373555.java Test finished: com/sun/net/httpserver/bugs/B6373555.java: Failed. Compilation failed: Failed. Compilation failed Test starting: com/sun/net/httpserver/bugs/B6393710.java Test finished: com/sun/net/httpserver/bugs/B6393710.java: Error. Can't find source file: B6393710.java in directory-list: /notnfs/langel/nightly-testing/icedtea/openjdk/jdk/test/com/sun/net/httpserver/bugs The test run ends with output like this: Error: vm/verifier/VerifyProtectedConstructor.java Error: vm/verifier/VerifyStackForExceptionHandlers.java Test results: passed: 394; failed: 292; error: 3,038 Error while writing report: java.io.FileNotFoundException: /notnfs/langel/nightly-testing/icedtea/test/jdk/JTreport/html/index.html (Too many open files) Has anyone seen this before? Could someone point me to what the issue is? or a possible fix? Thanks, Omair From omajid at redhat.com Tue Mar 10 09:19:26 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 10 Mar 2009 12:19:26 -0400 Subject: Has anyone run IcedTea7 jtreg tests recently? In-Reply-To: <49B67AD6.9000005@redhat.com> References: <49B67AD6.9000005@redhat.com> Message-ID: <49B6930E.5090602@redhat.com> Hi, Omair Majid wrote: > The test run ends with output like this: > Error: vm/verifier/VerifyProtectedConstructor.java > Error: vm/verifier/VerifyStackForExceptionHandlers.java > Test results: passed: 394; failed: 292; error: 3,038 > Error while writing report: java.io.FileNotFoundException: > /notnfs/langel/nightly-testing/icedtea/test/jdk/JTreport/html/index.html > (Too many open files) > > Has anyone seen this before? Could someone point me to what the issue > is? or a possible fix? Changing ulimit -n to 4096 (from 1024) fixes the too many open files problem, but now I am getting a jvm crash. Here is the relevant part of the output: [snip] FAILED: demo/jvmti/waiters/WaitersTest.java FAILED: demo/nio/ZipFileSystem/sanity.sh FAILED: java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000000002000101, pid=3555, tid=140601982036304 # # JRE version: 7.0-b49 # Java VM: OpenJDK 64-Bit Server VM (15.0-b02 mixed mode linux-amd64 ) # Distribution: Built on Fedora release 10 (Cambridge) # Problematic frame: # C 0x0000000002000101 # # An error report file with more information is saved as: [snip] I have attached the error report. Omair -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid3555.log Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090310/9dcb3725/hs_err_pid3555.log From aph at redhat.com Tue Mar 10 10:06:56 2009 From: aph at redhat.com (Andrew Haley) Date: Tue, 10 Mar 2009 17:06:56 +0000 Subject: Has anyone run IcedTea7 jtreg tests recently? In-Reply-To: <49B6930E.5090602@redhat.com> References: <49B67AD6.9000005@redhat.com> <49B6930E.5090602@redhat.com> Message-ID: <49B69E30.3040702@redhat.com> Omair Majid wrote: > Hi, > > Omair Majid wrote: >> The test run ends with output like this: >> Error: vm/verifier/VerifyProtectedConstructor.java >> Error: vm/verifier/VerifyStackForExceptionHandlers.java >> Test results: passed: 394; failed: 292; error: 3,038 >> Error while writing report: java.io.FileNotFoundException: >> /notnfs/langel/nightly-testing/icedtea/test/jdk/JTreport/html/index.html >> (Too many open files) >> >> Has anyone seen this before? Could someone point me to what the issue >> is? or a possible fix? > > Changing ulimit -n to 4096 (from 1024) fixes the too many open files > problem, but now I am getting a jvm crash. Here is the relevant part of > the output: > > [snip] > FAILED: demo/jvmti/waiters/WaitersTest.java > FAILED: demo/nio/ZipFileSystem/sanity.sh > FAILED: > java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x0000000002000101, pid=3555, tid=140601982036304 > # > # JRE version: 7.0-b49 > # Java VM: OpenJDK 64-Bit Server VM (15.0-b02 mixed mode linux-amd64 ) > # Distribution: Built on Fedora release 10 (Cambridge) > # Problematic frame: > # C 0x0000000002000101 > # > # An error report file with more information is saved as: > [snip] > > I have attached the error report. Care to run that under gdb and tell us where the SEGV occurred? Andrew. From gnu_andrew at member.fsf.org Tue Mar 10 10:46:30 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 10 Mar 2009 17:46:30 +0000 Subject: IcedTea 7 Patches for with-project=bsd - A Plan In-Reply-To: References: <17c6771e0903011552u31976d3cr6c9d40a8fdb59e97@mail.gmail.com> <17c6771e0903090437r550d65cfr37eb11f6eb72ea4a@mail.gmail.com> <17c6771e0903090440t2bad7814t36ba10ea4d2c36c7@mail.gmail.com> <17c6771e0903090754y194a85e0u23f3413e64f2d647@mail.gmail.com> Message-ID: <17c6771e0903101046h312f113kcf000f33d0e734eb@mail.gmail.com> 2009/3/10 Michael Franz : > > > On Mon, Mar 9, 2009 at 9:54 AM, Andrew John Hughes > wrote: >> >> 2009/3/9 Michael Franz : >> > >> > >> > On Mon, Mar 9, 2009 at 6:40 AM, Andrew John Hughes >> > wrote: >> >> >> >> 2009/3/9 Andrew John Hughes : >> >> > 2009/3/9 Michael Franz : >> >> >> Here are the patches against IcedTea7 changeset:?? 1623:5bda1b46a64f >> >> >> they >> >> >> allow Fedora 10 to build the bsd-port? changeset:?? 65:72d04adc33f8. >> >> >> The >> >> >> build is not perfect and does not work as well as an older set of >> >> >> patches >> >> >> (the build fails with some genxx.sh script but finishes fine if >> >> >> re-run). >> >> >> >> >> >> Since my original attempt the nio2 was added so, this needs to be >> >> >> disabled. >> >> >> I have tested configured as: >> >> >> ./configure --without-rhino --disable-liveconnect --disable-xrender >> >> >> --with-hotspot-build --disable-nio2 --with-project=bsd >> >> >> >> >> > >> >> > b50 on includes NIO2 so disabling it is no longer an option. ?The BSD >> >> > tree should be synced to this. >> >> >../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c: In >> >> > function 'Java_sun_nio_ch_FileDispatcherImpl_lock0': >> ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: >> error: 'sun_nio_ch_FileDispatcherImpl_NO_LOCK' undeclared (first use >> in this function) >> ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: >> error: (Each undeclared identifier is reported only once >> ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: >> error: for each function it appears in.) >> ../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:197: >> error: 'sun_nio_ch_FileDispatcherImpl_INTERRUPTED' undeclared (first >> use in this function) > > Looks like the BSD port was bumped to b50 on March 5 (I was using March 1) > >> >> >> >> This almost builds on OS X, but I have not figured out my issue with >> >> >> jar and >> >> >> how specify a new include directory and a new lib directory.? These >> >> >> patches >> >> >> do not allow zero to build.? I did have this working in the previous >> >> >> version. >> >> >> >> >> > >> >> > twisti added some support for additional lib directories IIRC, when >> >> > adding OpenSolaris support. >> >> > Check the bit where you added BSD support. >> >> > In acinclude.m4: AC_DEFUN([SET_OS_DIRS], [ case "${host_os}" in *linux*) BUILD_OS_DIR=linux OS_PATH= ;; *solaris*) BUILD_OS_DIR=solaris OS_PATH=/opt/SunStudioExpress/bin:/opt/SUNWpro/bin:/usr/gnu/bin ;; *darwin*|*bsd*) BUILD_OS_DIR=bsd OS_PATH= ;; *) AC_MSG_ERROR([unsupported operating system ${host_os}]) ;; esac AC_SUBST(BUILD_OS_DIR) AC_SUBST(OS_PATH) ]) OS_PATH can be used for binaries. Something similar (a OS_LIBPATH) is probably needed for libraries. >> >> >> The ecj build requires gjavah as there are patches that assume >> >> >> gjavah >> >> >> is >> >> >> used instead of a standard javah, it seems gjavah generates code a >> >> >> little >> >> >> differently. >> >> >> b50 has another issue in this area which I'm working on now. >> >> > >> >> > This is intentional. ?The ecj bootstrap is designed for GNU >> >> > Classpath-based solutions and was designed around gcj. ?It probably >> >> > should be split into individual tests for specific bits of missing >> >> > functionality. >> >> > >> >> >> bsd-Makefile.am.patch should indicate how I worked the patches into >> >> >> the >> >> >> build system. >> >> >> >> >> >> >> I'm not sure what this does. ?It seems to introduce a whole heap of >> >> duplicate patches which would be impossible to maintain. >> > >> > What I did is determine which IcedTea patches fail on the BSD port and >> > moved >> > the failing parts into two files.? The original failing part is in jdk7 >> > directory which are applied when using IcedTea's normal build. The same >> > patches are then applied to the bsd port and put into bsd directory. >> > >> > The failing parts are mostly where there are new conditionals around BSD >> > and >> > caused the files to be different enough that patch could not figure out >> > how >> > to apply them.? If the FUZZ level is increased from 0 to 3 more of he >> > patches apply without modification. >> > >> >> We don't really want to be maintaining about a dozen patches just for >> BSD, so we need to look at why the BSD versions differ and whether the >> changes could be pushed to the main tree instead. > > It would be nice to have a minimal set of patches to for BSD.? Like I said, > most of the patches deal with BSD conditional logic that is not in the main > tree. Each patch really needs to be treated on a case-by-case basis i.e. finding out why they failed, why the files in BSD are different, whether the BSD changes are generally useful/could go upstream, etc. >> >> >> >> >> Note that we want most IcedTea patches to go upstream where possible, >> >> and some of those in your version of IcedTea have already. >> > >> > I am not sure what you mean by this. >> >> We don't want to be maintaining the 100+ patches in IcedTea forever :) >> Some have already gone upstream to OpenJDK, some since your patch. >> We also now have an IcedTea project within the OpenJDK space that can >> be used for patches submitted under the SCA, >> so hopefully most of the patches in IcedTea will start to disappear. >> >> It would be good to also get any relevant patches into the BSD tree >> too. ?As you'll have experienced, things change rapidly enough that >> maintaining all these patches is a major pain! > > Especially with limited time to spend on it. >> >> The version I started with is not that >> > old maybe 2 weeks. >> >> 2 weeks is a long time with 7 -- the existence of >> icedtea-no-bcopy.patch suggests it's at least prior to b47, while >> IcedTea7 now supports b49 and I'm working on b50. >> >> The BSD port is constantly merging in changes from up >> > stream.? Were there many patches in those two weeks? >> >> There were changes to upstream OpenJDK7: >> >> http://download.java.net/jdk7/changes/jdk7-b47.html >> http://download.java.net/jdk7/changes/jdk7-b48.html >> http://download.java.net/jdk7/changes/jdk7-b49.html >> >> and I merged in the latest patches from IcedTea6 (which is about >> another 60 changesets but this was mostly plugin/Shark updates). >> >> >? Is this more of a >> > timing issue? >> >> It would be good to have a heads-up if you're working on something, as >> I don't want your work to be wasted. >> It would probably be better to send patches to the list as you go >> along. ?We can probably sort out commit access to IcedTea7 pretty >> easily, but patches need to be approved first anyway. > > I was not expecting all of my work to go in, I did expect some of it to be > wasted.? Finding a better way to waste less of it would be appreciated.? If > most of IcedTea is going to end up into the main tree, then maybe we can get > the changes into the BSD tree first. But we don't really want any work to be wasted, and I don't think it is. At the very least, you've found which patches are problematic. The reason I don't want to accept things as is is simply because adding adjusted patches is more of a short term fix than a long-term solution. Not only is it hoped that most of the IcedTea patches will go upstream, but IcedTea should shortly have its own forest, like the BSD port. The BSD folks are more than welcome to apply the patches to their forest too. Of course, you could then use Mercurial to create a local hybrid of the BSD and IcedTea trees. > >> >> > Or is this a difference between IcedTea 6 and 7? >> > >> >> Well they support a completely different OpenJDK tree :D >> So yes, that makes quite a difference and now changes to the upstream >> 7 tree seem to be happening much more rapidly, it's harder to keep up. >> ?Hence why I want to get as much as possible upstream and maintain >> most of it in our own forest - a lot of the patches then become >> one-time Mercurial merges. >> >> I didn't realise you were building on a GNU/Linux box (or rather, that >> the BSD port would build there). I could probably also test that. > > Well, since IcedTea is building the JDK7 repo and staying up-to-date, there > is no reason it should not build on linux (assuming JDK7 builds on linux). > Most of the patches (I think) are to deal with the bootstrap via gcj/ecj. > Yes, the 7 repo, not the BSD one. But I suppose there isn't much difference on a non-BSD box. The patches for bootstrapping are just those in patches/ecj/*. There is a large number of other patches that do all sorts of build and bug fixes. Note that there are --with-openjdk/--with-icedtea options to build without the bootstrap stage. There are probably issues with using these with a proprietary JDK too (I'm thinking of Apple's JDK here, which you mentioned previously); that's because no-one works on such support. >> >> I've been meaning to set up a virtual image of FreeBSD to test, but >> not got round to it. ?I also have OSX, but that means I actually have >> to use it... :( But having IcedTea supporting PPC OSX would be kinda >> nice. > > Do you have a PowerPC or an Intel based Mac? > I have both, but both primarily run GNU/Linux. > I run linux in multiple VMs to help with testing.? If I cannot build the BSD > repo under linux, I don't have much hope figuring out how IcedTea builds. > IcedTea *should* be easier than raw OpenJDK :) >> >> >> >> >> >> Michael >> >> >> >> >> >> >> >> >> >> >> > >> >> > -- >> >> > Andrew :-) >> >> > >> > >> > >> > >> >> >> >> -- >> Andrew :-) >> > > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Tue Mar 10 14:00:35 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 10 Mar 2009 17:00:35 -0400 Subject: Has anyone run IcedTea7 jtreg tests recently? In-Reply-To: <49B69E30.3040702@redhat.com> References: <49B67AD6.9000005@redhat.com> <49B6930E.5090602@redhat.com> <49B69E30.3040702@redhat.com> Message-ID: <49B6D4F3.7010401@redhat.com> Andrew Haley wrote: > Omair Majid wrote: >> Changing ulimit -n to 4096 (from 1024) fixes the too many open files >> problem, but now I am getting a jvm crash. Here is the relevant part of >> the output: >> >> [snip] >> FAILED: demo/jvmti/waiters/WaitersTest.java >> FAILED: demo/nio/ZipFileSystem/sanity.sh >> FAILED: >> java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh >> >> # >> # A fatal error has been detected by the Java Runtime Environment: >> # >> # SIGSEGV (0xb) at pc=0x0000000002000101, pid=3555, tid=140601982036304 >> # >> # JRE version: 7.0-b49 >> # Java VM: OpenJDK 64-Bit Server VM (15.0-b02 mixed mode linux-amd64 ) >> # Distribution: Built on Fedora release 10 (Cambridge) >> # Problematic frame: >> # C 0x0000000002000101 >> # >> # An error report file with more information is saved as: >> [snip] >> >> I have attached the error report. > > Care to run that under gdb and tell us where the SEGV occurred? > > Andrew. > The segfault is not directly caused by java/awt/Component/isLightweightCrash/IsLightweightCrash.java as the hotspot log might indicate. It looks like com/sun/net/httpserver/bugs/ tests have to be run before the java/awt/ tests to reproduce the error. Infact, I can change where the crash happens by changing when I attach gdb to java. gdb backtrace and hotspot error log attached. Omair -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: gdb-backtrace Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090310/d847bad8/gdb-backtrace.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hs_err_pid24110.log Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090310/d847bad8/hs_err_pid24110.log From mvfranz at gmail.com Tue Mar 10 17:39:52 2009 From: mvfranz at gmail.com (Michael Franz) Date: Tue, 10 Mar 2009 20:39:52 -0400 Subject: Missing symbol for zero build on bsd port repo using Fedora Message-ID: Hi, I am trying to build zero using the latest bsd repo and getting the following error. I cannot figure out where it is coming from and thus what I am missing. /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: undefined reference to `__sync_val_compare_and_swap_4' /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: undefined reference to `__sync_add_and_fetch_4' collect2: ld returned 1 exit status Any pointers is appreciated. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090310/d03d07f1/attachment.html From gbenson at redhat.com Wed Mar 11 01:12:43 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 11 Mar 2009 08:12:43 +0000 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: References: Message-ID: <20090311081242.GB3217@redhat.com> Michael Franz wrote: > I am trying to build zero using the latest bsd repo and getting the > following error. I cannot figure out where it is coming from and > thus what I am missing. > > /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: > undefined reference to `__sync_val_compare_and_swap_4' > /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: > undefined reference to `__sync_add_and_fetch_4' > collect2: ld returned 1 exit status These come from the gcc atomic intrinsics in ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp (or its BSD equivalent). If gcc doesn't know how to generate inline assembly for your platform it drops in calls to functions like those. I'm guessing you're on x86 or ppc? gcc ought to be able to handle that, so maybe it's just a case of enabling something there, but I'm no expert. aph would know more... Cheers, Gary -- http://gbenson.net/ From aph at redhat.com Wed Mar 11 02:39:30 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 11 Mar 2009 09:39:30 +0000 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <20090311081242.GB3217@redhat.com> References: <20090311081242.GB3217@redhat.com> Message-ID: <49B786D2.5040200@redhat.com> Gary Benson wrote: > Michael Franz wrote: >> I am trying to build zero using the latest bsd repo and getting the >> following error. I cannot figure out where it is coming from and >> thus what I am missing. >> >> /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: >> undefined reference to `__sync_val_compare_and_swap_4' >> /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: >> undefined reference to `__sync_add_and_fetch_4' >> collect2: ld returned 1 exit status > > These come from the gcc atomic intrinsics in > ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp > (or its BSD equivalent). If gcc doesn't know how to generate inline > assembly for your platform it drops in calls to functions like those. > I'm guessing you're on x86 or ppc? gcc ought to be able to handle > that, so maybe it's just a case of enabling something there, but I'm > no expert. aph would know more... The most likely explanation is that the g++ being used is building for the i386 architecture, which doesn't have the atomic instructions. We need i486 or above. Andrew. From gbenson at redhat.com Wed Mar 11 06:04:25 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 11 Mar 2009 13:04:25 +0000 Subject: changeset in /hg/icedtea6: 2009-03-11 Gary Benson changeset 1eeb14582f5a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1eeb14582f5a description: 2009-03-11 Gary Benson * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp: Likewise. * ports/hotspot/src/share/vm/shark/shark_globals.hpp (SharkPerformanceWarnings): New flag. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::_llvm_cmpxchg_int_fn): New field. (SharkBuilder::_llvm_sin_fn): Likewise. (SharkBuilder::_llvm_cos_fn): Likewise. (SharkBuilder::_llvm_sqrt_fn): Likewise. (SharkBuilder::_llvm_log_fn): Likewise. (SharkBuilder::_llvm_log10_fn): Likewise. (SharkBuilder::_llvm_pow_fn): Likewise. (SharkBuilder::_llvm_exp_fn): Likewise. (SharkBuilder::set_llvm_cmpxchg_int_fn): New method. (SharkBuilder::set_llvm_sin_fn): Likewise. (SharkBuilder::set_llvm_cos_fn): Likewise. (SharkBuilder::set_llvm_sqrt_fn): Likewise. (SharkBuilder::set_llvm_log_fn): Likewise. (SharkBuilder::set_llvm_log10_fn): Likewise. (SharkBuilder::set_llvm_pow_fn): Likewise. (SharkBuilder::set_llvm_exp_fn): Likewise. (SharkBuilder::llvm_cmpxchg_int_fn): Likewise. (SharkBuilder::llvm_sin_fn): Likewise. (SharkBuilder::llvm_cos_fn): Likewise. (SharkBuilder::llvm_sqrt_fn): Likewise. (SharkBuilder::llvm_log_fn): Likewise. (SharkBuilder::llvm_log10_fn): Likewise. (SharkBuilder::llvm_pow_fn): Likewise. (SharkBuilder::llvm_exp_fn): Likewise. (SharkBuilder::CreateCmpxchgInt): Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::init_external_functions): Initialize new fields. (SharkBuilder::CreateCmpxchgInt): New method. * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp (SharkRuntime::_current_time_millis): New field. (SharkRuntime::_fabs): Likewise. (SharkRuntime::_tan): Likewise. (SharkRuntime::_atan2): Likewise. (SharkRuntime::_unsafe_field_offset_to_byte_offset): Likewise. (SharkRuntime::current_time_millis): New method. (SharkRuntime::fabs): Likewise. (SharkRuntime::tan): Likewise. (SharkRuntime::atan2): Likewise. (SharkRuntime::unsafe_field_offset_to_byte_offset): Likewise. * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp (SharkRuntime::_current_time_millis): New field. (SharkRuntime::_fabs): Likewise. (SharkRuntime::_tan): Likewise. (SharkRuntime::_atan2): Likewise. (SharkRuntime::_unsafe_field_offset_to_byte_offset): Likewise. (SharkRuntime::initialize): Initialize the above. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::SharkBlock): New thread argument. (SharkBlock::_thread): New field. (SharkBlock::thread): New method. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::SharkTopLevelBlock): Pass thread to super. (SharkTopLevelBlock::thread): Removed method. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_call): Pass thread to inliner. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Do the arguments before creating blocks. * ports/hotspot/src/share/vm/shark/sharkInliner.hpp (SharkInliner::attempt_inline): New thread argument. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlineBlock::SharkInlineBlock): Pass thread to super. (SharkInlinerHelper::SharkInlinerHelper): New thread argument. (SharkInlinerHelper::_thread): New field. (SharkInlinerHelper::thread): New method. (SharkInlinerHelper::do_inline): Pass thread to block constructor. (SharkInliner::attempt_inline): Attempt to inline intrinsics. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 15 files changed, 656 insertions(+), 29 deletions(-) ChangeLog | 83 ++++ ports/hotspot/src/share/vm/includeDB_shark | 15 ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 16 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 32 + ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 79 ++++ ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 18 ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 31 + ports/hotspot/src/share/vm/shark/sharkInliner.hpp | 4 ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp | 284 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp | 41 ++ ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 41 ++ ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 25 + ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 2 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 11 ports/hotspot/src/share/vm/shark/shark_globals.hpp | 3 diffs (truncated from 966 to 500 lines): diff -r b7948732adf2 -r 1eeb14582f5a ChangeLog --- a/ChangeLog Mon Mar 09 12:36:47 2009 -0400 +++ b/ChangeLog Wed Mar 11 09:03:27 2009 -0400 @@ -1,3 +1,86 @@ 2009-03-09 Tomas Hurka + + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/shark_globals.hpp + (SharkPerformanceWarnings): New flag. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::_llvm_cmpxchg_int_fn): New field. + (SharkBuilder::_llvm_sin_fn): Likewise. + (SharkBuilder::_llvm_cos_fn): Likewise. + (SharkBuilder::_llvm_sqrt_fn): Likewise. + (SharkBuilder::_llvm_log_fn): Likewise. + (SharkBuilder::_llvm_log10_fn): Likewise. + (SharkBuilder::_llvm_pow_fn): Likewise. + (SharkBuilder::_llvm_exp_fn): Likewise. + (SharkBuilder::set_llvm_cmpxchg_int_fn): New method. + (SharkBuilder::set_llvm_sin_fn): Likewise. + (SharkBuilder::set_llvm_cos_fn): Likewise. + (SharkBuilder::set_llvm_sqrt_fn): Likewise. + (SharkBuilder::set_llvm_log_fn): Likewise. + (SharkBuilder::set_llvm_log10_fn): Likewise. + (SharkBuilder::set_llvm_pow_fn): Likewise. + (SharkBuilder::set_llvm_exp_fn): Likewise. + (SharkBuilder::llvm_cmpxchg_int_fn): Likewise. + (SharkBuilder::llvm_sin_fn): Likewise. + (SharkBuilder::llvm_cos_fn): Likewise. + (SharkBuilder::llvm_sqrt_fn): Likewise. + (SharkBuilder::llvm_log_fn): Likewise. + (SharkBuilder::llvm_log10_fn): Likewise. + (SharkBuilder::llvm_pow_fn): Likewise. + (SharkBuilder::llvm_exp_fn): Likewise. + (SharkBuilder::CreateCmpxchgInt): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::init_external_functions): Initialize new fields. + (SharkBuilder::CreateCmpxchgInt): New method. + + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_current_time_millis): New field. + (SharkRuntime::_fabs): Likewise. + (SharkRuntime::_tan): Likewise. + (SharkRuntime::_atan2): Likewise. + (SharkRuntime::_unsafe_field_offset_to_byte_offset): Likewise. + (SharkRuntime::current_time_millis): New method. + (SharkRuntime::fabs): Likewise. + (SharkRuntime::tan): Likewise. + (SharkRuntime::atan2): Likewise. + (SharkRuntime::unsafe_field_offset_to_byte_offset): Likewise. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_current_time_millis): New field. + (SharkRuntime::_fabs): Likewise. + (SharkRuntime::_tan): Likewise. + (SharkRuntime::_atan2): Likewise. + (SharkRuntime::_unsafe_field_offset_to_byte_offset): Likewise. + (SharkRuntime::initialize): Initialize the above. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::SharkBlock): New thread argument. + (SharkBlock::_thread): New field. + (SharkBlock::thread): New method. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::SharkTopLevelBlock): Pass thread to super. + (SharkTopLevelBlock::thread): Removed method. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_call): Pass thread to inliner. + + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Do the arguments before creating blocks. + + * ports/hotspot/src/share/vm/shark/sharkInliner.hpp + (SharkInliner::attempt_inline): New thread argument. + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlineBlock::SharkInlineBlock): Pass thread to super. + (SharkInlinerHelper::SharkInlinerHelper): New thread argument. + (SharkInlinerHelper::_thread): New field. + (SharkInlinerHelper::thread): New method. + (SharkInlinerHelper::do_inline): Pass thread to block constructor. + (SharkInliner::attempt_inline): Attempt to inline intrinsics. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-09 Tomas Hurka * Makefile.am: Updated visualvm to version 1.1.1. diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 11 09:03:27 2009 -0400 @@ -191,12 +191,27 @@ sharkInliner.cpp sharkInliner.cpp ciStreams.hpp sharkInliner.cpp shark_globals.hpp sharkInliner.cpp sharkInliner.hpp +sharkInliner.cpp sharkIntrinsics.hpp sharkInliner.cpp sharkState.inline.hpp sharkInliner.cpp sharkValue.inline.hpp sharkInliner.hpp allocation.hpp sharkInliner.hpp ciMethod.hpp +sharkInliner.hpp llvmHeaders.hpp sharkInliner.hpp sharkState.inline.hpp + +sharkIntrinsics.cpp ciMethod.hpp +sharkIntrinsics.cpp llvmHeaders.hpp +sharkIntrinsics.cpp shark_globals.hpp +sharkIntrinsics.cpp sharkIntrinsics.hpp +sharkIntrinsics.cpp sharkRuntime.hpp +sharkIntrinsics.cpp sharkState.inline.hpp +sharkIntrinsics.cpp sharkValue.inline.hpp + +sharkIntrinsics.hpp allocation.hpp +sharkIntrinsics.hpp ciMethod.hpp +sharkIntrinsics.hpp llvmHeaders.hpp +sharkIntrinsics.hpp sharkState.hpp sharkMemoryManager.hpp llvmHeaders.hpp sharkMemoryManager.hpp sharkEntry.hpp diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Mar 11 09:03:27 2009 -0400 @@ -27,14 +27,22 @@ class SharkState; class SharkBlock : public ResourceObj { public: - SharkBlock(SharkBuilder* builder, ciMethod* target, ciBytecodeStream* iter) - : _builder(builder),_target(target),_iter(iter),_current_state(NULL) {} + SharkBlock(SharkBuilder* builder, + ciMethod* target, + ciBytecodeStream* iter, + llvm::Value* thread) + : _builder(builder), + _target(target), + _iter(iter), + _current_state(NULL), + _thread(thread) {} private: SharkBuilder* _builder; ciMethod* _target; ciBytecodeStream* _iter; SharkState* _current_state; + llvm::Value* _thread; public: SharkBuilder* builder() const @@ -48,6 +56,10 @@ class SharkBlock : public ResourceObj { ciBytecodeStream* iter() const { return _iter; + } + llvm::Value* thread() const + { + return _thread; } // Target properties diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Mar 11 09:03:27 2009 -0400 @@ -76,6 +76,14 @@ void SharkBuilder::init_external_functio set_llvm_memset_fn(module()->getOrInsertFunction("llvm.memset.i32", type)); params.clear(); + params.push_back(PointerType::getUnqual(SharkType::jint_type())); + params.push_back(SharkType::jint_type()); + params.push_back(SharkType::jint_type()); + type = FunctionType::get(SharkType::jint_type(), params, false); + set_llvm_cmpxchg_int_fn( + module()->getOrInsertFunction("llvm.atomic.cmp.swap.i32", type)); + + params.clear(); params.push_back(PointerType::getUnqual(SharkType::intptr_type())); params.push_back(SharkType::intptr_type()); params.push_back(SharkType::intptr_type()); @@ -90,6 +98,22 @@ void SharkBuilder::init_external_functio type = FunctionType::get(Type::VoidTy, params, false); set_llvm_memory_barrier_fn( module()->getOrInsertFunction("llvm.memory.barrier", type)); + + params.clear(); + params.push_back(SharkType::jdouble_type()); + type = FunctionType::get(SharkType::jdouble_type(), params, false); + set_llvm_sin_fn (module()->getOrInsertFunction("llvm.sin.f64", type)); + set_llvm_cos_fn (module()->getOrInsertFunction("llvm.cos.f64", type)); + set_llvm_sqrt_fn (module()->getOrInsertFunction("llvm.sqrt.f64", type)); + set_llvm_log_fn (module()->getOrInsertFunction("llvm.log.f64", type)); + set_llvm_log10_fn(module()->getOrInsertFunction("llvm.log10.f64", type)); + set_llvm_exp_fn (module()->getOrInsertFunction("llvm.exp.f64", type)); + + params.clear(); + params.push_back(SharkType::jdouble_type()); + params.push_back(SharkType::jdouble_type()); + type = FunctionType::get(SharkType::jdouble_type(), params, false); + set_llvm_pow_fn(module()->getOrInsertFunction("llvm.pow.f64", type)); } Function *SharkBuilder::CreateFunction(const char *name) @@ -130,6 +154,14 @@ CallInst* SharkBuilder::CreateDump(llvm: return CreateCall2(SharkRuntime::dump(), name, value); } +CallInst* SharkBuilder::CreateCmpxchgInt(Value* exchange_value, + Value* dst, + Value* compare_value) +{ + return CreateCall3( + llvm_cmpxchg_int_fn(), dst, compare_value, exchange_value); +} + CallInst* SharkBuilder::CreateCmpxchgPtr(Value* exchange_value, Value* dst, Value* compare_value) diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Mar 11 09:03:27 2009 -0400 @@ -197,10 +197,22 @@ class SharkBuilder : public llvm::IRBuil // External functions (and intrinsics) private: + llvm::Constant* _llvm_cmpxchg_int_fn; llvm::Constant* _llvm_cmpxchg_ptr_fn; llvm::Constant* _llvm_memory_barrier_fn; llvm::Constant* _llvm_memset_fn; - + llvm::Constant* _llvm_sin_fn; + llvm::Constant* _llvm_cos_fn; + llvm::Constant* _llvm_sqrt_fn; + llvm::Constant* _llvm_log_fn; + llvm::Constant* _llvm_log10_fn; + llvm::Constant* _llvm_pow_fn; + llvm::Constant* _llvm_exp_fn; + + void set_llvm_cmpxchg_int_fn(llvm::Constant* llvm_cmpxchg_int_fn) + { + _llvm_cmpxchg_int_fn = llvm_cmpxchg_int_fn; + } void set_llvm_cmpxchg_ptr_fn(llvm::Constant* llvm_cmpxchg_ptr_fn) { _llvm_cmpxchg_ptr_fn = llvm_cmpxchg_ptr_fn; @@ -213,10 +225,42 @@ class SharkBuilder : public llvm::IRBuil { _llvm_memset_fn = llvm_memset_fn; } + void set_llvm_sin_fn(llvm::Constant* llvm_sin_fn) + { + _llvm_sin_fn = llvm_sin_fn; + } + void set_llvm_cos_fn(llvm::Constant* llvm_cos_fn) + { + _llvm_cos_fn = llvm_cos_fn; + } + void set_llvm_sqrt_fn(llvm::Constant* llvm_sqrt_fn) + { + _llvm_sqrt_fn = llvm_sqrt_fn; + } + void set_llvm_log_fn(llvm::Constant* llvm_log_fn) + { + _llvm_log_fn = llvm_log_fn; + } + void set_llvm_log10_fn(llvm::Constant* llvm_log10_fn) + { + _llvm_log10_fn = llvm_log10_fn; + } + void set_llvm_pow_fn(llvm::Constant* llvm_pow_fn) + { + _llvm_pow_fn = llvm_pow_fn; + } + void set_llvm_exp_fn(llvm::Constant* llvm_exp_fn) + { + _llvm_exp_fn = llvm_exp_fn; + } void init_external_functions(); protected: + llvm::Constant* llvm_cmpxchg_int_fn() const + { + return _llvm_cmpxchg_int_fn; + } llvm::Constant* llvm_cmpxchg_ptr_fn() const { return _llvm_cmpxchg_ptr_fn; @@ -228,6 +272,36 @@ class SharkBuilder : public llvm::IRBuil llvm::Constant* llvm_memset_fn() const { return _llvm_memset_fn; + } + + public: + llvm::Constant* llvm_sin_fn() const + { + return _llvm_sin_fn; + } + llvm::Constant* llvm_cos_fn() const + { + return _llvm_cos_fn; + } + llvm::Constant* llvm_sqrt_fn() const + { + return _llvm_sqrt_fn; + } + llvm::Constant* llvm_log_fn() const + { + return _llvm_log_fn; + } + llvm::Constant* llvm_log10_fn() const + { + return _llvm_log10_fn; + } + llvm::Constant* llvm_pow_fn() const + { + return _llvm_pow_fn; + } + llvm::Constant* llvm_exp_fn() const + { + return _llvm_exp_fn; } public: @@ -236,6 +310,9 @@ class SharkBuilder : public llvm::IRBuil llvm::Value* value, llvm::Value* len, llvm::Value* align); + llvm::CallInst* CreateCmpxchgInt(llvm::Value* exchange_value, + llvm::Value* dst, + llvm::Value* compare_value); llvm::CallInst* CreateCmpxchgPtr(llvm::Value* exchange_value, llvm::Value* dst, llvm::Value* compare_value); diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Mar 11 09:03:27 2009 -0400 @@ -100,6 +100,15 @@ void SharkFunction::initialize() entry->set_llvm_function(function()); compiler()->memory_manager()->set_entry_for_function(function(), entry); + // Get our arguments + Function::arg_iterator ai = function()->arg_begin(); + Argument *method = ai++; + method->setName("method"); + _base_pc = ai++; + _base_pc->setName("base_pc"); + _thread = ai++; + _thread->setName("thread"); + // Create the list of blocks set_block_insertion_point(NULL); _blocks = NEW_RESOURCE_ARRAY(SharkTopLevelBlock*, flow()->block_count()); @@ -132,15 +141,6 @@ void SharkFunction::initialize() _monitor_count, block(i)->ciblock()->monitor_count()); } - // Get our arguments - Function::arg_iterator ai = function()->arg_begin(); - Argument *method = ai++; - method->setName("method"); - _base_pc = ai++; - _base_pc->setName("base_pc"); - _thread = ai++; - _thread->setName("thread"); - // Create the method preamble set_block_insertion_point(&function()->front()); builder()->SetInsertPoint(CreateBlock()); diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Mar 11 09:03:27 2009 -0400 @@ -32,8 +32,9 @@ class SharkInlineBlock : public SharkBlo public: SharkInlineBlock(ciMethod* target, SharkState* state, - ciBytecodeStream* iter) - : SharkBlock(state->builder(), target, iter), + ciBytecodeStream* iter, + Value* thread) + : SharkBlock(state->builder(), target, iter, thread), _outer_state(state), _entry_state(new SharkState(this)) { @@ -79,13 +80,17 @@ class SharkInlineBlock : public SharkBlo class SharkInlinerHelper : public StackObj { public: - SharkInlinerHelper(ciMethod* target, SharkState* entry_state) - : _target(target), _entry_state(entry_state), _iter(target) {} + SharkInlinerHelper(ciMethod* target, SharkState* entry_state, Value* thread) + : _target(target), + _entry_state(entry_state), + _iter(target), + _thread(thread) {} private: ciBytecodeStream _iter; SharkState* _entry_state; ciMethod* _target; + Value* _thread; public: ciBytecodeStream* iter() @@ -99,6 +104,10 @@ class SharkInlinerHelper : public StackO ciMethod* target() const { return _target; + } + Value* thread() const + { + return _thread; } public: @@ -198,7 +207,8 @@ class SharkInlinerHelper : public StackO public: void do_inline() { - (new SharkInlineBlock(target(), entry_state(), iter()))->emit_IR(); + (new SharkInlineBlock( + target(), entry_state(), iter(), thread()))->emit_IR(); } }; @@ -756,10 +766,17 @@ bool SharkInlinerHelper::do_field_access return true; } -bool SharkInliner::attempt_inline(ciMethod *target, SharkState *state) +bool SharkInliner::attempt_inline(ciMethod* target, + SharkState* state, + Value* thread) { + if (SharkIntrinsics::is_intrinsic(target)) { + SharkIntrinsics::inline_intrinsic(target, state, thread); + return true; + } + if (may_be_inlinable(target)) { - SharkInlinerHelper inliner(target, state); + SharkInlinerHelper inliner(target, state, thread); if (inliner.is_inlinable()) { inliner.do_inline(); return true; diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkInliner.hpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.hpp Wed Mar 11 09:03:27 2009 -0400 @@ -25,7 +25,9 @@ class SharkInliner : public AllStatic { public: - static bool attempt_inline(ciMethod* target, SharkState* state); + static bool attempt_inline(ciMethod* target, + SharkState* state, + llvm::Value* thread); private: static bool may_be_inlinable(ciMethod* target); diff -r b7948732adf2 -r 1eeb14582f5a ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp Wed Mar 11 09:03:27 2009 -0400 @@ -0,0 +1,284 @@ +/* + * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 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. + * + */ + +#include "incls/_precompiled.incl" +#include "incls/_sharkIntrinsics.cpp.incl" + +using namespace llvm; + +bool SharkIntrinsics::is_intrinsic(ciMethod *target) +{ + switch (target->intrinsic_id()) { + case vmIntrinsics::_none: + return false; + + // java.lang.Math + case vmIntrinsics::_min: From gbenson at redhat.com Wed Mar 11 07:18:08 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 11 Mar 2009 14:18:08 +0000 Subject: Shark inline intrinsics Message-ID: <20090311141808.GA10066@redhat.com> Hi all, HotSpot tags a load of methods as intrinsics at class load time. This patch makes Shark implement a few of those, and also adds a developer option, -XX:+SharkPerformanceWarnings, that prints out ones it misses. It gains 7% on the SPECjvm98 mtrt benchmark and 6% on the db one (times not produced in compliance with the SPECjvm98 run rules and so not comparable with SPECjvm98 metrics). Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r b7948732adf2 ChangeLog --- a/ChangeLog Mon Mar 09 12:36:47 2009 -0400 +++ b/ChangeLog Wed Mar 11 09:04:14 2009 -0400 @@ -1,3 +1,86 @@ +2009-03-11 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/shark_globals.hpp + (SharkPerformanceWarnings): New flag. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::_llvm_cmpxchg_int_fn): New field. + (SharkBuilder::_llvm_sin_fn): Likewise. + (SharkBuilder::_llvm_cos_fn): Likewise. + (SharkBuilder::_llvm_sqrt_fn): Likewise. + (SharkBuilder::_llvm_log_fn): Likewise. + (SharkBuilder::_llvm_log10_fn): Likewise. + (SharkBuilder::_llvm_pow_fn): Likewise. + (SharkBuilder::_llvm_exp_fn): Likewise. + (SharkBuilder::set_llvm_cmpxchg_int_fn): New method. + (SharkBuilder::set_llvm_sin_fn): Likewise. + (SharkBuilder::set_llvm_cos_fn): Likewise. + (SharkBuilder::set_llvm_sqrt_fn): Likewise. + (SharkBuilder::set_llvm_log_fn): Likewise. + (SharkBuilder::set_llvm_log10_fn): Likewise. + (SharkBuilder::set_llvm_pow_fn): Likewise. + (SharkBuilder::set_llvm_exp_fn): Likewise. + (SharkBuilder::llvm_cmpxchg_int_fn): Likewise. + (SharkBuilder::llvm_sin_fn): Likewise. + (SharkBuilder::llvm_cos_fn): Likewise. + (SharkBuilder::llvm_sqrt_fn): Likewise. + (SharkBuilder::llvm_log_fn): Likewise. + (SharkBuilder::llvm_log10_fn): Likewise. + (SharkBuilder::llvm_pow_fn): Likewise. + (SharkBuilder::llvm_exp_fn): Likewise. + (SharkBuilder::CreateCmpxchgInt): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::init_external_functions): Initialize new fields. + (SharkBuilder::CreateCmpxchgInt): New method. + + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_current_time_millis): New field. + (SharkRuntime::_fabs): Likewise. + (SharkRuntime::_tan): Likewise. + (SharkRuntime::_atan2): Likewise. + (SharkRuntime::_unsafe_field_offset_to_byte_offset): Likewise. + (SharkRuntime::current_time_millis): New method. + (SharkRuntime::fabs): Likewise. + (SharkRuntime::tan): Likewise. + (SharkRuntime::atan2): Likewise. + (SharkRuntime::unsafe_field_offset_to_byte_offset): Likewise. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_current_time_millis): New field. + (SharkRuntime::_fabs): Likewise. + (SharkRuntime::_tan): Likewise. + (SharkRuntime::_atan2): Likewise. + (SharkRuntime::_unsafe_field_offset_to_byte_offset): Likewise. + (SharkRuntime::initialize): Initialize the above. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::SharkBlock): New thread argument. + (SharkBlock::_thread): New field. + (SharkBlock::thread): New method. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::SharkTopLevelBlock): Pass thread to super. + (SharkTopLevelBlock::thread): Removed method. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_call): Pass thread to inliner. + + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Do the arguments before creating blocks. + + * ports/hotspot/src/share/vm/shark/sharkInliner.hpp + (SharkInliner::attempt_inline): New thread argument. + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlineBlock::SharkInlineBlock): Pass thread to super. + (SharkInlinerHelper::SharkInlinerHelper): New thread argument. + (SharkInlinerHelper::_thread): New field. + (SharkInlinerHelper::thread): New method. + (SharkInlinerHelper::do_inline): Pass thread to block constructor. + (SharkInliner::attempt_inline): Attempt to inline intrinsics. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-09 Tomas Hurka * Makefile.am: Updated visualvm to version 1.1.1. diff -r b7948732adf2 Makefile.am --- a/Makefile.am Mon Mar 09 12:36:47 2009 -0400 +++ b/Makefile.am Wed Mar 11 09:04:14 2009 -0400 @@ -512,6 +512,13 @@ endif ICEDTEA_FSG_PATCHES = + +# Build with assertions and lowered optimization +DISTRIBUTION_PATCHES = \ + patches/mixtec-assertions.patch \ + patches/mixtec-no-log-vm-output.patch \ + patches/mixtec-no-print-vm-options.patch \ + patches/mixtec-optimization.patch ICEDTEA_PATCHES = \ $(ZERO_PATCHES_COND) \ diff -r b7948732adf2 generated/sun/awt/X11/generator/sizer.32 Binary file generated/sun/awt/X11/generator/sizer.32 has changed diff -r b7948732adf2 generated/sun/misc/Version.java --- a/generated/sun/misc/Version.java Mon Mar 09 12:36:47 2009 -0400 +++ b/generated/sun/misc/Version.java Wed Mar 11 09:04:14 2009 -0400 @@ -39,7 +39,13 @@ "OpenJDK Runtime Environment"; private static final String java_runtime_version = - "1.6.0_0-b12"; + "1.6.0_0-b14"; + + private static final String jdk_derivative_name = + "IcedTea6 1.5pre-rb593d3ef9dce"; + + private static final String distro_package_version = + ""; static { init(); @@ -82,8 +88,17 @@ ps.println(launcher_name + " version \"" + java_version + "\""); /* Second line: runtime version (ie, libraries). */ - ps.println(java_runtime_name + " (build " + - java_runtime_version + ")"); + StringBuilder sb = new StringBuilder(); + sb.append(java_runtime_name); + if (jdk_derivative_name.length() > 0) { + sb.append(" (").append(jdk_derivative_name).append(")"); + } + if (distro_package_version.length() > 0) { + sb.append(" (").append(distro_package_version).append(")"); + } else { + sb.append(" (build ").append(java_runtime_version).append(")"); + } + ps.println(sb.toString()); /* Third line: JVM information. */ String java_vm_name = System.getProperty("java.vm.name"); diff -r b7948732adf2 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 11 09:04:14 2009 -0400 @@ -191,12 +191,27 @@ sharkInliner.cpp ciStreams.hpp sharkInliner.cpp shark_globals.hpp sharkInliner.cpp sharkInliner.hpp +sharkInliner.cpp sharkIntrinsics.hpp sharkInliner.cpp sharkState.inline.hpp sharkInliner.cpp sharkValue.inline.hpp sharkInliner.hpp allocation.hpp sharkInliner.hpp ciMethod.hpp +sharkInliner.hpp llvmHeaders.hpp sharkInliner.hpp sharkState.inline.hpp + +sharkIntrinsics.cpp ciMethod.hpp +sharkIntrinsics.cpp llvmHeaders.hpp +sharkIntrinsics.cpp shark_globals.hpp +sharkIntrinsics.cpp sharkIntrinsics.hpp +sharkIntrinsics.cpp sharkRuntime.hpp +sharkIntrinsics.cpp sharkState.inline.hpp +sharkIntrinsics.cpp sharkValue.inline.hpp + +sharkIntrinsics.hpp allocation.hpp +sharkIntrinsics.hpp ciMethod.hpp +sharkIntrinsics.hpp llvmHeaders.hpp +sharkIntrinsics.hpp sharkState.hpp sharkMemoryManager.hpp llvmHeaders.hpp sharkMemoryManager.hpp sharkEntry.hpp diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -27,14 +27,22 @@ class SharkBlock : public ResourceObj { public: - SharkBlock(SharkBuilder* builder, ciMethod* target, ciBytecodeStream* iter) - : _builder(builder),_target(target),_iter(iter),_current_state(NULL) {} + SharkBlock(SharkBuilder* builder, + ciMethod* target, + ciBytecodeStream* iter, + llvm::Value* thread) + : _builder(builder), + _target(target), + _iter(iter), + _current_state(NULL), + _thread(thread) {} private: SharkBuilder* _builder; ciMethod* _target; ciBytecodeStream* _iter; SharkState* _current_state; + llvm::Value* _thread; public: SharkBuilder* builder() const @@ -48,6 +56,10 @@ ciBytecodeStream* iter() const { return _iter; + } + llvm::Value* thread() const + { + return _thread; } // Target properties diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Mar 11 09:04:14 2009 -0400 @@ -76,6 +76,14 @@ set_llvm_memset_fn(module()->getOrInsertFunction("llvm.memset.i32", type)); params.clear(); + params.push_back(PointerType::getUnqual(SharkType::jint_type())); + params.push_back(SharkType::jint_type()); + params.push_back(SharkType::jint_type()); + type = FunctionType::get(SharkType::jint_type(), params, false); + set_llvm_cmpxchg_int_fn( + module()->getOrInsertFunction("llvm.atomic.cmp.swap.i32", type)); + + params.clear(); params.push_back(PointerType::getUnqual(SharkType::intptr_type())); params.push_back(SharkType::intptr_type()); params.push_back(SharkType::intptr_type()); @@ -90,6 +98,22 @@ type = FunctionType::get(Type::VoidTy, params, false); set_llvm_memory_barrier_fn( module()->getOrInsertFunction("llvm.memory.barrier", type)); + + params.clear(); + params.push_back(SharkType::jdouble_type()); + type = FunctionType::get(SharkType::jdouble_type(), params, false); + set_llvm_sin_fn (module()->getOrInsertFunction("llvm.sin.f64", type)); + set_llvm_cos_fn (module()->getOrInsertFunction("llvm.cos.f64", type)); + set_llvm_sqrt_fn (module()->getOrInsertFunction("llvm.sqrt.f64", type)); + set_llvm_log_fn (module()->getOrInsertFunction("llvm.log.f64", type)); + set_llvm_log10_fn(module()->getOrInsertFunction("llvm.log10.f64", type)); + set_llvm_exp_fn (module()->getOrInsertFunction("llvm.exp.f64", type)); + + params.clear(); + params.push_back(SharkType::jdouble_type()); + params.push_back(SharkType::jdouble_type()); + type = FunctionType::get(SharkType::jdouble_type(), params, false); + set_llvm_pow_fn(module()->getOrInsertFunction("llvm.pow.f64", type)); } Function *SharkBuilder::CreateFunction(const char *name) @@ -128,6 +152,14 @@ Value *args[] = {name, value}; return CreateCall2(SharkRuntime::dump(), name, value); +} + +CallInst* SharkBuilder::CreateCmpxchgInt(Value* exchange_value, + Value* dst, + Value* compare_value) +{ + return CreateCall3( + llvm_cmpxchg_int_fn(), dst, compare_value, exchange_value); } CallInst* SharkBuilder::CreateCmpxchgPtr(Value* exchange_value, diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -197,10 +197,22 @@ // External functions (and intrinsics) private: + llvm::Constant* _llvm_cmpxchg_int_fn; llvm::Constant* _llvm_cmpxchg_ptr_fn; llvm::Constant* _llvm_memory_barrier_fn; llvm::Constant* _llvm_memset_fn; + llvm::Constant* _llvm_sin_fn; + llvm::Constant* _llvm_cos_fn; + llvm::Constant* _llvm_sqrt_fn; + llvm::Constant* _llvm_log_fn; + llvm::Constant* _llvm_log10_fn; + llvm::Constant* _llvm_pow_fn; + llvm::Constant* _llvm_exp_fn; + void set_llvm_cmpxchg_int_fn(llvm::Constant* llvm_cmpxchg_int_fn) + { + _llvm_cmpxchg_int_fn = llvm_cmpxchg_int_fn; + } void set_llvm_cmpxchg_ptr_fn(llvm::Constant* llvm_cmpxchg_ptr_fn) { _llvm_cmpxchg_ptr_fn = llvm_cmpxchg_ptr_fn; @@ -213,10 +225,42 @@ { _llvm_memset_fn = llvm_memset_fn; } + void set_llvm_sin_fn(llvm::Constant* llvm_sin_fn) + { + _llvm_sin_fn = llvm_sin_fn; + } + void set_llvm_cos_fn(llvm::Constant* llvm_cos_fn) + { + _llvm_cos_fn = llvm_cos_fn; + } + void set_llvm_sqrt_fn(llvm::Constant* llvm_sqrt_fn) + { + _llvm_sqrt_fn = llvm_sqrt_fn; + } + void set_llvm_log_fn(llvm::Constant* llvm_log_fn) + { + _llvm_log_fn = llvm_log_fn; + } + void set_llvm_log10_fn(llvm::Constant* llvm_log10_fn) + { + _llvm_log10_fn = llvm_log10_fn; + } + void set_llvm_pow_fn(llvm::Constant* llvm_pow_fn) + { + _llvm_pow_fn = llvm_pow_fn; + } + void set_llvm_exp_fn(llvm::Constant* llvm_exp_fn) + { + _llvm_exp_fn = llvm_exp_fn; + } void init_external_functions(); protected: + llvm::Constant* llvm_cmpxchg_int_fn() const + { + return _llvm_cmpxchg_int_fn; + } llvm::Constant* llvm_cmpxchg_ptr_fn() const { return _llvm_cmpxchg_ptr_fn; @@ -231,11 +275,44 @@ } public: + llvm::Constant* llvm_sin_fn() const + { + return _llvm_sin_fn; + } + llvm::Constant* llvm_cos_fn() const + { + return _llvm_cos_fn; + } + llvm::Constant* llvm_sqrt_fn() const + { + return _llvm_sqrt_fn; + } + llvm::Constant* llvm_log_fn() const + { + return _llvm_log_fn; + } + llvm::Constant* llvm_log10_fn() const + { + return _llvm_log10_fn; + } + llvm::Constant* llvm_pow_fn() const + { + return _llvm_pow_fn; + } + llvm::Constant* llvm_exp_fn() const + { + return _llvm_exp_fn; + } + + public: llvm::CallInst* CreateDump(llvm::Value* value); llvm::CallInst* CreateMemset(llvm::Value* dst, llvm::Value* value, llvm::Value* len, llvm::Value* align); + llvm::CallInst* CreateCmpxchgInt(llvm::Value* exchange_value, + llvm::Value* dst, + llvm::Value* compare_value); llvm::CallInst* CreateCmpxchgPtr(llvm::Value* exchange_value, llvm::Value* dst, llvm::Value* compare_value); diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Mar 11 09:04:14 2009 -0400 @@ -100,6 +100,15 @@ entry->set_llvm_function(function()); compiler()->memory_manager()->set_entry_for_function(function(), entry); + // Get our arguments + Function::arg_iterator ai = function()->arg_begin(); + Argument *method = ai++; + method->setName("method"); + _base_pc = ai++; + _base_pc->setName("base_pc"); + _thread = ai++; + _thread->setName("thread"); + // Create the list of blocks set_block_insertion_point(NULL); _blocks = NEW_RESOURCE_ARRAY(SharkTopLevelBlock*, flow()->block_count()); @@ -132,15 +141,6 @@ _monitor_count, block(i)->ciblock()->monitor_count()); } - // Get our arguments - Function::arg_iterator ai = function()->arg_begin(); - Argument *method = ai++; - method->setName("method"); - _base_pc = ai++; - _base_pc->setName("base_pc"); - _thread = ai++; - _thread->setName("thread"); - // Create the method preamble set_block_insertion_point(&function()->front()); builder()->SetInsertPoint(CreateBlock()); diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Mar 11 09:04:14 2009 -0400 @@ -32,8 +32,9 @@ public: SharkInlineBlock(ciMethod* target, SharkState* state, - ciBytecodeStream* iter) - : SharkBlock(state->builder(), target, iter), + ciBytecodeStream* iter, + Value* thread) + : SharkBlock(state->builder(), target, iter, thread), _outer_state(state), _entry_state(new SharkState(this)) { @@ -79,13 +80,17 @@ class SharkInlinerHelper : public StackObj { public: - SharkInlinerHelper(ciMethod* target, SharkState* entry_state) - : _target(target), _entry_state(entry_state), _iter(target) {} + SharkInlinerHelper(ciMethod* target, SharkState* entry_state, Value* thread) + : _target(target), + _entry_state(entry_state), + _iter(target), + _thread(thread) {} private: ciBytecodeStream _iter; SharkState* _entry_state; ciMethod* _target; + Value* _thread; public: ciBytecodeStream* iter() @@ -99,6 +104,10 @@ ciMethod* target() const { return _target; + } + Value* thread() const + { + return _thread; } public: @@ -198,7 +207,8 @@ public: void do_inline() { - (new SharkInlineBlock(target(), entry_state(), iter()))->emit_IR(); + (new SharkInlineBlock( + target(), entry_state(), iter(), thread()))->emit_IR(); } }; @@ -756,10 +766,17 @@ return true; } -bool SharkInliner::attempt_inline(ciMethod *target, SharkState *state) +bool SharkInliner::attempt_inline(ciMethod* target, + SharkState* state, + Value* thread) { + if (SharkIntrinsics::is_intrinsic(target)) { + SharkIntrinsics::inline_intrinsic(target, state, thread); + return true; + } + if (may_be_inlinable(target)) { - SharkInlinerHelper inliner(target, state); + SharkInlinerHelper inliner(target, state, thread); if (inliner.is_inlinable()) { inliner.do_inline(); return true; diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkInliner.hpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -25,7 +25,9 @@ class SharkInliner : public AllStatic { public: - static bool attempt_inline(ciMethod* target, SharkState* state); + static bool attempt_inline(ciMethod* target, + SharkState* state, + llvm::Value* thread); private: static bool may_be_inlinable(ciMethod* target); diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp Wed Mar 11 09:04:14 2009 -0400 @@ -0,0 +1,284 @@ +/* + * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 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. + * + */ + +#include "incls/_precompiled.incl" +#include "incls/_sharkIntrinsics.cpp.incl" + +using namespace llvm; + +bool SharkIntrinsics::is_intrinsic(ciMethod *target) +{ + switch (target->intrinsic_id()) { + case vmIntrinsics::_none: + return false; + + // java.lang.Math + case vmIntrinsics::_min: + case vmIntrinsics::_max: + case vmIntrinsics::_dabs: + case vmIntrinsics::_dsin: + case vmIntrinsics::_dcos: + case vmIntrinsics::_dtan: + case vmIntrinsics::_datan2: + case vmIntrinsics::_dsqrt: + case vmIntrinsics::_dlog: + case vmIntrinsics::_dlog10: + case vmIntrinsics::_dpow: + case vmIntrinsics::_dexp: + return true; + + // java.lang.Object + case vmIntrinsics::_getClass: + return true; + + // java.lang.System + case vmIntrinsics::_currentTimeMillis: + return true; + + // java.lang.Thread + case vmIntrinsics::_currentThread: + return true; + + // sun.misc.Unsafe + case vmIntrinsics::_compareAndSwapInt: + return true; + + default: + if (SharkPerformanceWarnings) { + warning( + "unhandled intrinsic vmIntrinsic::%s", + vmIntrinsics::name_at(target->intrinsic_id())); + } + } + return false; +} + +void SharkIntrinsics::inline_intrinsic(ciMethod* target, + SharkState* state, + Value* thread) +{ + switch (target->intrinsic_id()) { + // java.lang.Math + case vmIntrinsics::_min: + do_Math_minmax(state, llvm::ICmpInst::ICMP_SLE); + break; + case vmIntrinsics::_max: + do_Math_minmax(state, llvm::ICmpInst::ICMP_SGE); + break; + case vmIntrinsics::_dabs: + do_Math_1to1(state, SharkRuntime::fabs()); + break; + case vmIntrinsics::_dsin: + do_Math_1to1(state, state->builder()->llvm_sin_fn()); + break; + case vmIntrinsics::_dcos: + do_Math_1to1(state, state->builder()->llvm_cos_fn()); + break; + case vmIntrinsics::_dtan: + do_Math_1to1(state, SharkRuntime::tan()); + break; + case vmIntrinsics::_datan2: + do_Math_2to1(state, SharkRuntime::atan2()); + break; + case vmIntrinsics::_dsqrt: + do_Math_1to1(state, state->builder()->llvm_sqrt_fn()); + break; + case vmIntrinsics::_dlog: + do_Math_1to1(state, state->builder()->llvm_log_fn()); + break; + case vmIntrinsics::_dlog10: + do_Math_1to1(state, state->builder()->llvm_log10_fn()); + break; + case vmIntrinsics::_dpow: + do_Math_2to1(state, state->builder()->llvm_pow_fn()); + break; + case vmIntrinsics::_dexp: + do_Math_1to1(state, state->builder()->llvm_exp_fn()); + break; + + // java.lang.Object + case vmIntrinsics::_getClass: + do_Object_getClass(state); + break; + + // java.lang.System + case vmIntrinsics::_currentTimeMillis: + do_System_currentTimeMillis(state); + break; + + // java.lang.Thread + case vmIntrinsics::_currentThread: + do_Thread_currentThread(state, thread); + break; + + // sun.misc.Unsafe + case vmIntrinsics::_compareAndSwapInt: + do_Unsafe_compareAndSwapInt(state); + break; + + default: + ShouldNotReachHere(); + } +} + +void SharkIntrinsics::do_Math_minmax(SharkState *state, ICmpInst::Predicate p) +{ + SharkBuilder *builder = state->builder(); + + // Pop the arguments + SharkValue *sb = state->pop(); + SharkValue *sa = state->pop(); + Value *a = sa->jint_value(); + Value *b = sb->jint_value(); + + // Perform the test + BasicBlock *ip = builder->GetBlockInsertionPoint(); + BasicBlock *return_a = builder->CreateBlock(ip, "return_a"); + BasicBlock *return_b = builder->CreateBlock(ip, "return_b"); + BasicBlock *done = builder->CreateBlock(ip, "done"); + + builder->CreateCondBr(builder->CreateICmp(p, a, b), return_a, return_b); + + builder->SetInsertPoint(return_a); + builder->CreateBr(done); + + builder->SetInsertPoint(return_b); + builder->CreateBr(done); + + builder->SetInsertPoint(done); + PHINode *phi = builder->CreatePHI(a->getType(), "result"); + phi->addIncoming(a, return_a); + phi->addIncoming(b, return_b); + + // Push the result + SharkValue *result = SharkValue::create_jint(phi); + if (sa->zero_checked() && sb->zero_checked()) + result->set_zero_checked(true); + state->push(result); +} + +void SharkIntrinsics::do_Math_1to1(SharkState *state, Constant *function) +{ + SharkValue *empty = state->pop(); + assert(empty == NULL, "should be"); + state->push( + SharkValue::create_jdouble( + state->builder()->CreateCall(function, state->pop()->jdouble_value()))); + state->push(NULL); +} + +void SharkIntrinsics::do_Math_2to1(SharkState *state, Constant *function) +{ + SharkValue *empty = state->pop(); + assert(empty == NULL, "should be"); + Value *y = state->pop()->jdouble_value(); + empty = state->pop(); + assert(empty == NULL, "should be"); + Value *x = state->pop()->jdouble_value(); + + state->push( + SharkValue::create_jdouble(state->builder()->CreateCall2(function, x, y))); + state->push(NULL); +} + +void SharkIntrinsics::do_Object_getClass(SharkState *state) +{ + SharkBuilder *builder = state->builder(); + + Value *klass = builder->CreateValueOfStructEntry( + state->pop()->jobject_value(), + in_ByteSize(oopDesc::klass_offset_in_bytes()), + SharkType::jobject_type(), + "klass"); + + Value *klass_part = builder->CreateAddressOfStructEntry( + klass, + in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), + SharkType::klass_type(), + "klass_part"); + + SharkValue *result = SharkValue::create_jobject( + builder->CreateValueOfStructEntry( + klass_part, + in_ByteSize(Klass::java_mirror_offset_in_bytes()), + SharkType::oop_type(), + "java_mirror")); + + result->set_zero_checked(true); + state->push(result); +} + +void SharkIntrinsics::do_System_currentTimeMillis(SharkState *state) +{ + state->push( + SharkValue::create_jlong( + state->builder()->CreateCall(SharkRuntime::current_time_millis()))); + state->push(NULL); +} + +void SharkIntrinsics::do_Thread_currentThread(SharkState *state, Value *thread) +{ + SharkValue *result = SharkValue::create_jobject( + state->builder()->CreateValueOfStructEntry( + thread, JavaThread::threadObj_offset(), + SharkType::jobject_type(), + "threadObj")); + result->set_zero_checked(true); + state->push(result); +} + +void SharkIntrinsics::do_Unsafe_compareAndSwapInt(SharkState *state) +{ + SharkBuilder *builder = state->builder(); + + // Pop the arguments + Value *x = state->pop()->jint_value(); + Value *e = state->pop()->jint_value(); + SharkValue *empty = state->pop(); + assert(empty == NULL, "should be"); + Value *offset = state->pop()->jlong_value(); + Value *object = state->pop()->jobject_value(); + Value *unsafe = state->pop()->jobject_value(); + + // Convert the offset + offset = builder->CreateCall( + SharkRuntime::unsafe_field_offset_to_byte_offset(), + offset); + + // Locate the field + Value *addr = builder->CreateIntToPtr( + builder->CreateAdd( + builder->CreatePtrToInt(object, SharkType::intptr_type()), + builder->CreateIntCast(offset, SharkType::intptr_type(), true)), + PointerType::getUnqual(SharkType::jint_type()), + "addr"); + + // Perform the operation + Value *result = builder->CreateCmpxchgInt(x, addr, e); + + // Push the result + state->push(SharkValue::create_jint(builder->CreateIntCast( + builder->CreateICmpEQ(result, e), SharkType::jint_type(), true))); +} diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -0,0 +1,41 @@ +/* + * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 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 SharkIntrinsics : public AllStatic { + public: + static bool is_intrinsic(ciMethod* target); + static void inline_intrinsic(ciMethod* target, + SharkState* state, + llvm::Value* thread); + + private: + static void do_Math_minmax(SharkState* state, llvm::ICmpInst::Predicate p); + static void do_Math_1to1(SharkState* state, llvm::Constant* function); + static void do_Math_2to1(SharkState* state, llvm::Constant* function); + static void do_Object_getClass(SharkState* state); + static void do_System_currentTimeMillis(SharkState* state); + static void do_Thread_currentThread(SharkState* state, llvm::Value* thread); + static void do_Unsafe_compareAndSwapInt(SharkState* state); +}; diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Wed Mar 11 09:04:14 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 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 @@ -28,6 +28,7 @@ using namespace llvm; +// VM calls Constant* SharkRuntime::_find_exception_handler; Constant* SharkRuntime::_monitorenter; Constant* SharkRuntime::_monitorexit; @@ -41,16 +42,25 @@ Constant* SharkRuntime::_throw_ArrayIndexOutOfBoundsException; Constant* SharkRuntime::_throw_NullPointerException; +// Leaf calls Constant* SharkRuntime::_f2i; Constant* SharkRuntime::_f2l; Constant* SharkRuntime::_d2i; Constant* SharkRuntime::_d2l; +// Non-VM calls Constant* SharkRuntime::_dump; Constant* SharkRuntime::_is_subtype_of; Constant* SharkRuntime::_should_not_reach_here; Constant* SharkRuntime::_unimplemented; Constant* SharkRuntime::_uncommon_trap; +Constant* SharkRuntime::_current_time_millis; +Constant* SharkRuntime::_fabs; +Constant* SharkRuntime::_tan; +Constant* SharkRuntime::_atan2; +Constant* SharkRuntime::_unsafe_field_offset_to_byte_offset; + +extern jlong Unsafe_field_offset_to_byte_offset(jlong field_offset); void SharkRuntime::initialize(SharkBuilder* builder) { @@ -205,6 +215,35 @@ (intptr_t) uncommon_trap_C, FunctionType::get(Type::VoidTy, params, false), "SharkRuntime__uncommon_trap"); + + params.clear(); + _current_time_millis = builder->make_function( + (intptr_t) os::javaTimeMillis, + FunctionType::get(SharkType::jlong_type(), params, false), + "os__javaTimeMillis"); + + params.clear(); + params.push_back(SharkType::jdouble_type()); + _fabs = builder->make_function( + (intptr_t) ::fabs, + FunctionType::get(SharkType::jdouble_type(), params, false), + "fabs"); + _tan = builder->make_function( + (intptr_t) ::tan, + FunctionType::get(SharkType::jdouble_type(), params, false), + "tan"); + params.push_back(SharkType::jdouble_type()); + _atan2 = builder->make_function( + (intptr_t) ::atan2, + FunctionType::get(SharkType::jdouble_type(), params, false), + "atan2"); + + params.clear(); + params.push_back(SharkType::jlong_type()); + _unsafe_field_offset_to_byte_offset = builder->make_function( + (intptr_t) Unsafe_field_offset_to_byte_offset, + FunctionType::get(SharkType::jlong_type(), params, false), + "Unsafe_field_offset_to_byte_offset"); } JRT_ENTRY(int, SharkRuntime::find_exception_handler_C(JavaThread* thread, diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkRuntime.hpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -174,6 +174,11 @@ static llvm::Constant* _should_not_reach_here; static llvm::Constant* _unimplemented; static llvm::Constant* _uncommon_trap; + static llvm::Constant* _current_time_millis; + static llvm::Constant* _fabs; + static llvm::Constant* _tan; + static llvm::Constant* _atan2; + static llvm::Constant* _unsafe_field_offset_to_byte_offset; public: static llvm::Constant* dump() @@ -196,6 +201,26 @@ { return _uncommon_trap; } + static llvm::Constant* current_time_millis() + { + return _current_time_millis; + } + static llvm::Constant* fabs() + { + return _fabs; + } + static llvm::Constant* tan() + { + return _tan; + } + static llvm::Constant* atan2() + { + return _atan2; + } + static llvm::Constant* unsafe_field_offset_to_byte_offset() + { + return _unsafe_field_offset_to_byte_offset; + } private: static void dump_C(const char *name, intptr_t value); diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Mar 11 09:04:14 2009 -0400 @@ -1244,7 +1244,7 @@ // Try to inline the call if (call_type == CALL_DIRECT) { - if (SharkInliner::attempt_inline(method, current_state())) + if (SharkInliner::attempt_inline(method, current_state(), thread())) return; } diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -26,7 +26,10 @@ class SharkTopLevelBlock : public SharkBlock { public: SharkTopLevelBlock(SharkFunction* function, ciTypeFlow::Block* ciblock) - : SharkBlock(function->builder(), function->target(), function->iter()), + : SharkBlock(function->builder(), + function->target(), + function->iter(), + function->thread()), _function(function), _ciblock(ciblock), _trap_request(TRAP_UNCHECKED), @@ -47,12 +50,6 @@ ciTypeFlow::Block* ciblock() const { return _ciblock; - } - - public: - llvm::Value* thread() const - { - return function()->thread(); } // Typeflow properties diff -r b7948732adf2 ports/hotspot/src/share/vm/shark/shark_globals.hpp --- a/ports/hotspot/src/share/vm/shark/shark_globals.hpp Mon Mar 09 12:36:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/shark_globals.hpp Wed Mar 11 09:04:14 2009 -0400 @@ -60,5 +60,8 @@ \ develop(bool, SharkTraceInstalls, false, \ "Trace method installation") \ + \ + develop(bool, SharkPerformanceWarnings, false, \ + "Warn about things that could be made faster") \ SHARK_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG) From doko at ubuntu.com Wed Mar 11 07:19:28 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Wed, 11 Mar 2009 14:19:28 +0000 Subject: changeset in /hg/icedtea6: 2009-03-11 Matthias Klose changeset 0040fb0dcaf8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0040fb0dcaf8 description: 2009-03-11 Matthias Klose * patches/hotspot/default/icedtea-includedb.patch: Add missing include in openjdk/hotspot/src/share/vm/includeDB_core. diffstat: 2 files changed, 15 insertions(+) ChangeLog | 5 +++++ patches/hotspot/default/icedtea-includedb.patch | 10 ++++++++++ diffs (29 lines): diff -r 1eeb14582f5a -r 0040fb0dcaf8 ChangeLog --- a/ChangeLog Wed Mar 11 09:03:27 2009 -0400 +++ b/ChangeLog Wed Mar 11 15:15:58 2009 +0100 @@ -1,3 +1,8 @@ 2009-03-11 Gary Benson + + * patches/hotspot/default/icedtea-includedb.patch: Add missing include in + openjdk/hotspot/src/share/vm/includeDB_core. + 2009-03-11 Gary Benson * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: New file. diff -r 1eeb14582f5a -r 0040fb0dcaf8 patches/hotspot/default/icedtea-includedb.patch --- a/patches/hotspot/default/icedtea-includedb.patch Wed Mar 11 09:03:27 2009 -0400 +++ b/patches/hotspot/default/icedtea-includedb.patch Wed Mar 11 15:15:58 2009 +0100 @@ -95,3 +95,13 @@ forte.cpp collectedHeap.inline.hpp forte.cpp debugInfoRec.hpp +--- openjdk/hotspot/src/share/vm/includeDB_core.orig 2009-03-11 13:14:45.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/includeDB_core 2009-03-11 13:15:59.000000000 +0000 +@@ -1311,6 +1311,7 @@ + cppInterpreter_.cpp debug.hpp + cppInterpreter_.cpp deoptimization.hpp + cppInterpreter_.cpp frame.inline.hpp ++cppInterpreter_.cpp interfaceSupport.hpp + cppInterpreter_.cpp interpreterRuntime.hpp + cppInterpreter_.cpp interpreter.hpp + cppInterpreter_.cpp interpreterGenerator.hpp From mr at sun.com Wed Mar 11 08:48:24 2009 From: mr at sun.com (Mark Reinhold) Date: Wed, 11 Mar 2009 08:48:24 -0700 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: gnu_andrew@member.fsf.org; Mon, 09 Mar 2009 22:48:58 -0000; <17c6771e0903091548n75ad488dt7741ab1779800bd6@mail.gmail.com> Message-ID: <20090311154824.2912D28CFE3@eggemoggin.niobe.net> > Date: Mon, 09 Mar 2009 22:48:58 +0000 > From: Andrew John Hughes > I'd like a jdk7 forest for the work on IcedTea7. I didn't know we'd > have the option of having more than one. I quite like the idea of > having a forest for 6 too, but I'll let others on this list chime in > on whether they would be interested in taking this route or not. Okay, I'll just create a jdk7 forest for now. I'll create it as a clone of the current 7 master forest, unless you want something else. >> - Mercurial users: Who needs push access? If they aren't already >> registered in the OpenJDK infrastructure then I'll arrange for >> invitations to be sent to them. > > Well, me to begin with :) I already have an OpenJDK username of > 'andrew' from the challenge, assuming that's still active. Yes, it's still active. > For others, I'd like to wait for some feedback from those working on 6. > >> - Mailing list: Do you want an icedtea-dev list, or do you just want >> to use distro-pkg-dev? Do you want hg push notices to be sent to >> whichever list you choose? > > I'm happy enough using distro-pkg-dev for discussion as we already do. > An additional list for commits would be good (e.g. icedtea-commits) and > we could then maybe also send traffic from the IcedTea repositories > there too. Okay, I'll create icedtea-changes for this purpose. >> - Do you have any initial content for your main Project web page? >> If so, please send it to me in simple XHTML. Dalibor, in his role >> as Moderator, can always update it later on. (We're working to allow >> any Project author to modify that Project's web content, but we're >> not quite there yet.) If you don't send me anything then I'll create >> something plain and simple for now. > > I'll try and come up with something tomorrow, probably along the same > lines as the proposal. It'll mainly point to > http://icedtea.classpath.org/ as there's already a lot of information > there. Please send your initial content to Dalibor and he'll add the page. Once that's done then I'll announce the creation of the Project. - Mark From gnu_andrew at member.fsf.org Wed Mar 11 08:58:45 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 11 Mar 2009 15:58:45 +0000 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: <17c6771e0903091548n75ad488dt7741ab1779800bd6@mail.gmail.com> References: <20090309160622.263D728E0EE@eggemoggin.niobe.net> <17c6771e0903091548n75ad488dt7741ab1779800bd6@mail.gmail.com> Message-ID: <17c6771e0903110858t5437a67fvfc95906800886ba2@mail.gmail.com> 2009/3/9 Andrew John Hughes : > 2009/3/9 Mark Reinhold : >> A few more-or-less standard questions for you ... >> > > Yes, think I've seen something similar before... ;) > >> ?- Mercurial configuration: What do you need? ?A single repository or >> ? ?two, or a forest or two (e.g., jdk6 and jdk7), or something else? >> > > I'd like a jdk7 forest for the work on IcedTea7. ?I didn't know we'd > have the option of having more than one. ?I quite like the idea of > having a forest for 6 too, but I'll let others on this list chime in > on whether they would be interested in taking this route or not. > We'll just go with one for jdk7 and see how that works out. After thinking about this more and discussing it with a few IcedTea hackers, there doesn't seem to be much advantage for 6 given there's only one existing jdk6 repository and changes to it are much slower. We'd also prefer not to upset the status quo too much :) >> ?- Mercurial users: Who needs push access? ?If they aren't already >> ? ?registered in the OpenJDK infrastructure then I'll arrange for >> ? ?invitations to be sent to them. >> > > Well, me to begin with :) I already have an OpenJDK username of > 'andrew' from the challenge, assuming that's still active. > For others, I'd like to wait for some feedback from those working on 6. Yeah so just me for now unless anyone else wants to work on IcedTea7. > >> ?- Mailing list: Do you want an icedtea-dev list, or do you just want >> ? ?to use distro-pkg-dev? ?Do you want hg push notices to be sent to >> ? ?whichever list you choose? >> > > I'm happy enough using distro-pkg-dev for discussion as we already do. > ?An additional list for commits would be good (e.g. icedtea-commits) > and > we could then maybe also send traffic from the IcedTea repositories there too. > We'll go with this: discussion to distro-pkg-dev and a new list, icedtea-commits for commit traffic. >> ?- Do you have any initial content for your main Project web page? >> ? ?If so, please send it to me in simple XHTML. ?Dalibor, in his role >> ? ?as Moderator, can always update it later on. ?(We're working to allow >> ? ?any Project author to modify that Project's web content, but we're >> ? ?not quite there yet.) ?If you don't send me anything then I'll create >> ? ?something plain and simple for now. >> > > I'll try and come up with something tomorrow, probably along the same > lines as the proposal. ?It'll mainly point to > http://icedtea.classpath.org/ as there's already a lot of information > there. > Attached (based on the one for Zero). >> - Mark >> > > Thanks, > -- > Andrew :-) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > 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 > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 -------------- A non-text attachment was scrubbed... Name: index.xhtml Type: application/xhtml+xml Size: 2401 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090311/f8c39ed5/index.xhtml From gnu_andrew at member.fsf.org Wed Mar 11 09:00:44 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 11 Mar 2009 16:00:44 +0000 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: <20090311154824.2912D28CFE3@eggemoggin.niobe.net> References: <17c6771e0903091548n75ad488dt7741ab1779800bd6@mail.gmail.com> <20090311154824.2912D28CFE3@eggemoggin.niobe.net> Message-ID: <17c6771e0903110900g73ba74c5o2e9753c69d6c892d@mail.gmail.com> Looks like we just crossed mails... :) 2009/3/11 Mark Reinhold : >> Date: Mon, 09 Mar 2009 22:48:58 +0000 >> From: Andrew John Hughes > >> I'd like a jdk7 forest for the work on IcedTea7. ?I didn't know we'd >> have the option of having more than one. ?I quite like the idea of >> having a forest for 6 too, but I'll let others on this list chime in >> on whether they would be interested in taking this route or not. > > Okay, I'll just create a jdk7 forest for now. ?I'll create it as a clone > of the current 7 master forest, unless you want something else. > Yes, sounds good - I meant to mention that I wanted it prepopulated but forgot... >>> - Mercurial users: Who needs push access? If they aren't already >>> ?registered in the OpenJDK infrastructure then I'll arrange for >>> ?invitations to be sent to them. >> >> Well, me to begin with :) I already have an OpenJDK username of >> 'andrew' from the challenge, assuming that's still active. > > Yes, it's still active. > Confirmed - I've updated the CVMI project over the last few days. >> For others, I'd like to wait for some feedback from those working on 6. >> >>> - Mailing list: Do you want an icedtea-dev list, or do you just want >>> ?to use distro-pkg-dev? Do you want hg push notices to be sent to >>> ?whichever list you choose? >> >> I'm happy enough using distro-pkg-dev for discussion as we already do. >> An additional list for commits would be good (e.g. icedtea-commits) and >> we could then maybe also send traffic from the IcedTea repositories >> there too. > > Okay, I'll create icedtea-changes for this purpose. > Thanks. >>> - Do you have any initial content for your main Project web page? >>> ?If so, please send it to me in simple XHTML. Dalibor, in his role >>> ?as Moderator, can always update it later on. (We're working to allow >>> ?any Project author to modify that Project's web content, but we're >>> ?not quite there yet.) If you don't send me anything then I'll create >>> ?something plain and simple for now. >> >> I'll try and come up with something tomorrow, probably along the same >> lines as the proposal. ?It'll mainly point to >> http://icedtea.classpath.org/ as there's already a lot of information >> there. > > Please send your initial content to Dalibor and he'll add the page. > > Once that's done then I'll announce the creation of the Project. > Attached to my last mail. I'll point Dalibor to it. > - Mark > Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Dalibor.Topic at Sun.COM Wed Mar 11 09:50:06 2009 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Wed, 11 Mar 2009 17:50:06 +0100 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: <17c6771e0903110900g73ba74c5o2e9753c69d6c892d@mail.gmail.com> References: <17c6771e0903091548n75ad488dt7741ab1779800bd6@mail.gmail.com> <20090311154824.2912D28CFE3@eggemoggin.niobe.net> <17c6771e0903110900g73ba74c5o2e9753c69d6c892d@mail.gmail.com> Message-ID: <49B7EBBE.50408@sun.com> Andrew John Hughes wrote: >>>> - Do you have any initial content for your main Project web page? >>>> If so, please send it to me in simple XHTML. Dalibor, in his role >>>> as Moderator, can always update it later on. (We're working to allow >>>> any Project author to modify that Project's web content, but we're >>>> not quite there yet.) If you don't send me anything then I'll create >>>> something plain and simple for now. >>> I'll try and come up with something tomorrow, probably along the same >>> lines as the proposal. It'll mainly point to >>> http://icedtea.classpath.org/ as there's already a lot of information >>> there. >> Please send your initial content to Dalibor and he'll add the page. >> >> Once that's done then I'll announce the creation of the Project. >> > > Attached to my last mail. I'll point Dalibor to it. I'm on it, should be up within 30 minutes. 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 mr at sun.com Wed Mar 11 13:26:49 2009 From: mr at sun.com (Mark Reinhold) Date: Wed, 11 Mar 2009 13:26:49 -0700 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: gnu_andrew@member.fsf.org; Wed, 11 Mar 2009 16:00:44 -0000; <17c6771e0903110900g73ba74c5o2e9753c69d6c892d@mail.gmail.com> Message-ID: <20090311202649.21FBD28E0EF@eggemoggin.niobe.net> I think you're good to go. I've created and populated your jdk7 forest [1], created the icedtea-changes list, and Dalibor has posted your Project page. If you need anything else, just let us know. - Mark [1] http://hg.openjdk.java.net/icedtea/jdk7 From doko at ubuntu.com Wed Mar 11 14:47:25 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Wed, 11 Mar 2009 21:47:25 +0000 Subject: changeset in /hg/icedtea6: 2009-03-11 Matthias Klose changeset 66f144a0dbee in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=66f144a0dbee description: 2009-03-11 Matthias Klose * patches/hotspot/default/icedtea-params-cast-size_t.patch: Update for recent hotspot. * patches/hotspot/default/icedtea-use-idx_t.patch: Likewise. diffstat: 3 files changed, 279 insertions(+), 83 deletions(-) ChangeLog | 6 patches/hotspot/default/icedtea-params-cast-size_t.patch | 288 ++++++++++---- patches/hotspot/default/icedtea-use-idx_t.patch | 68 +++ diffs (426 lines): diff -r 0040fb0dcaf8 -r 66f144a0dbee ChangeLog --- a/ChangeLog Wed Mar 11 15:15:58 2009 +0100 +++ b/ChangeLog Wed Mar 11 22:43:53 2009 +0100 @@ -1,3 +1,9 @@ 2009-03-11 Matthias Klose + + * patches/hotspot/default/icedtea-params-cast-size_t.patch: Update for + recent hotspot. + * patches/hotspot/default/icedtea-use-idx_t.patch: Likewise. + 2009-03-11 Matthias Klose * patches/hotspot/default/icedtea-includedb.patch: Add missing include in diff -r 0040fb0dcaf8 -r 66f144a0dbee patches/hotspot/default/icedtea-params-cast-size_t.patch --- a/patches/hotspot/default/icedtea-params-cast-size_t.patch Wed Mar 11 15:15:58 2009 +0100 +++ b/patches/hotspot/default/icedtea-params-cast-size_t.patch Wed Mar 11 22:43:53 2009 +0100 @@ -1,37 +1,17 @@ diff -Nru openjdk.orig/hotspot/src/share -diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-09-01 01:47:18.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-09-01 01:53:31.000000000 +0100 -@@ -938,7 +938,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) { -@@ -6044,7 +6044,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() && -@@ -6332,7 +6332,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( -diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-08-14 08:40:10.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-09-01 01:49:59.000000000 +0100 -@@ -904,8 +904,8 @@ +--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -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.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -864,8 +864,8 @@ void PSParallelCompact::initialize_dead_wood_limiter() { const size_t max = 100; @@ -42,46 +22,116 @@ diff -Nru openjdk.orig/hotspot/src/share _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); DEBUG_ONLY(_dwl_initialized = true;) _dwl_adjustment = normal_distribution(1.0); -diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp ---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-08-14 08:40:10.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-09-01 01:52:42.000000000 +0100 -@@ -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: -diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp ---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-08-14 08:40:10.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-09-01 02:58:03.000000000 +0100 -@@ -287,7 +287,7 @@ - // yield a size that is too small) and bound it by MaxNewSize above. - // Ergonomics plays here by previously calculating the desired - // NewSize and MaxNewSize. -- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize); -+ max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize); - } - assert(max_new_size > 0, "All paths should set max_new_size"); - -diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp ---- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-08-14 08:40:11.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-09-01 01:49:59.000000000 +0100 -@@ -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 -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2008-09-01 01:47:17.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-09-01 01:58:01.000000000 +0100 -@@ -1025,7 +1025,7 @@ +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -72,7 +72,7 @@ + } + + size_t DirtyCardQueueSet::num_par_ids() { +- return MAX2(ParallelGCThreads, (size_t)2); ++ return MAX2((size_t)ParallelGCThreads, (size_t)2); + } + + +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -1061,7 +1061,7 @@ + int HeapRegionRemSet::num_par_rem_sets() { + // We always have at least two, so that a mutator thread can claim an + // id and add to a rem set. +- return (int) MAX2(ParallelGCThreads, (size_t)2); ++ return (int) MAX2((size_t)ParallelGCThreads, (size_t)2); + } + + HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig 2009-03-11 21:52:00.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -412,7 +412,7 @@ + _regionStack(), + // _finger set in set_non_marking_state + +- _max_task_num(MAX2(ParallelGCThreads, (size_t)1)), ++ _max_task_num(MAX2((size_t)ParallelGCThreads, (size_t)1)), + // _active_tasks set in set_non_marking_state + // _tasks set inside the constructor + _task_queues(new CMTaskQueueSet((int) _max_task_num)), +@@ -463,7 +463,7 @@ + SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set(); + satb_qs.set_buffer_size(G1SATBLogBufferSize); + +- int size = (int) MAX2(ParallelGCThreads, (size_t)1); ++ int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1); + _par_cleanup_thread_state = NEW_C_HEAP_ARRAY(ParCleanupThreadState*, size); + for (int i = 0 ; i < size; i++) { + _par_cleanup_thread_state[i] = new ParCleanupThreadState; +@@ -521,7 +521,7 @@ + _sleep_factor = sleep_factor; + _marking_task_overhead = marking_task_overhead; + } else { +- _parallel_marking_threads = MAX2((ParallelGCThreads + 2) / 4, (size_t)1); ++ _parallel_marking_threads = MAX2((size_t)((ParallelGCThreads + 2) / 4), (size_t)1); + _sleep_factor = 0.0; + _marking_task_overhead = 1.0; + } +@@ -648,7 +648,7 @@ + } + + ConcurrentMark::~ConcurrentMark() { +- int size = (int) MAX2(ParallelGCThreads, (size_t)1); ++ int size = (int) MAX2((size_t)ParallelGCThreads, (size_t)1); + for (int i = 0; i < size; i++) delete _par_cleanup_thread_state[i]; + FREE_C_HEAP_ARRAY(ParCleanupThreadState*, + _par_cleanup_thread_state); +@@ -1746,7 +1746,7 @@ + if (has_aborted()) return; + + int first = 0; +- int last = (int)MAX2(ParallelGCThreads, (size_t)1); ++ int last = (int)MAX2((size_t)ParallelGCThreads, (size_t)1); + for (int t = 0; t < last; t++) { + UncleanRegionList* list = &_par_cleanup_thread_state[t]->list; + assert(list->well_formed(), "Inv"); +@@ -3199,7 +3199,7 @@ + // of things to do) or totally (at the very end). + size_t target_size; + if (partially) +- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize); ++ target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize); + else + target_size = 0; + +--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -939,7 +939,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) { +@@ -6054,7 +6054,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() && +@@ -6342,7 +6342,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.orig 2009-03-11 21:45:27.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -1051,7 +1051,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 @@ -90,7 +140,7 @@ diff -Nru openjdk.orig/hotspot/src/share } else { FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size); } -@@ -1038,7 +1038,7 @@ +@@ -1064,7 +1064,7 @@ // Old to Young gen size so as to shift the collection load // to the old generation concurrent collector if (FLAG_IS_DEFAULT(NewRatio)) { @@ -99,7 +149,7 @@ diff -Nru openjdk.orig/hotspot/src/share size_t min_new = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size()); size_t prev_initial_size = initial_heap_size(); -@@ -1067,8 +1067,8 @@ +@@ -1093,8 +1093,8 @@ // Unless explicitly requested otherwise, make young gen // at least min_new, and at most preferred_max_new_size. if (FLAG_IS_DEFAULT(NewSize)) { @@ -110,7 +160,7 @@ diff -Nru openjdk.orig/hotspot/src/share if(PrintGCDetails && Verbose) { // Too early to use gclog_or_tty tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize); -@@ -1079,7 +1079,7 @@ +@@ -1105,7 +1105,7 @@ // later NewRatio will decide how it grows; see above. if (FLAG_IS_DEFAULT(OldSize)) { if (max_heap > NewSize) { @@ -119,3 +169,87 @@ diff -Nru openjdk.orig/hotspot/src/share if(PrintGCDetails && Verbose) { // Too early to use gclog_or_tty tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize); +--- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2009-03-11 21:54:11.000000000 +0100 +@@ -221,7 +221,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(); +--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2009-03-11 21:55:31.000000000 +0100 +@@ -281,7 +281,7 @@ + // yield a size that is too small) and bound it by MaxNewSize above. + // Ergonomics plays here by previously calculating the desired + // NewSize and MaxNewSize. +- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize); ++ max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize); + } + assert(max_new_size > 0, "All paths should set max_new_size"); + +@@ -308,7 +308,7 @@ + // generally small compared to the NewRatio calculation. + _min_gen0_size = NewSize; + desired_new_size = NewSize; +- max_new_size = MAX2(max_new_size, NewSize); ++ max_new_size = MAX2(max_new_size, (size_t) NewSize); + } else { + // For the case where NewSize is the default, use NewRatio + // to size the minimum and initial generation sizes. +@@ -316,10 +316,10 @@ + // NewRatio is overly large, the resulting sizes can be too + // small. + _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()), +- NewSize); ++ (size_t) NewSize); + desired_new_size = + MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()), +- NewSize); ++ (size_t) NewSize); + } + + assert(_min_gen0_size > 0, "Sanity check"); +@@ -374,14 +374,14 @@ + // Adjust gen0 down to accomodate OldSize + *gen0_size_ptr = heap_size - min_gen0_size; + *gen0_size_ptr = +- MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()), ++ MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()), + min_alignment()); + assert(*gen0_size_ptr > 0, "Min gen0 is too large"); + result = true; + } else { + *gen1_size_ptr = heap_size - *gen0_size_ptr; + *gen1_size_ptr = +- MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()), ++ MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()), + min_alignment()); + } + } +@@ -405,7 +405,7 @@ + // for setting the gen1 maximum. + _max_gen1_size = max_heap_byte_size() - _max_gen0_size; + _max_gen1_size = +- MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()), ++ MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()), + min_alignment()); + // If no explicit command line flag has been set for the + // gen1 size, use what is left for gen1. +@@ -419,11 +419,11 @@ + "gen0 has an unexpected minimum size"); + set_min_gen1_size(min_heap_byte_size() - min_gen0_size()); + set_min_gen1_size( +- MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()), ++ MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()), + min_alignment())); + set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size()); + set_initial_gen1_size( +- MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()), ++ MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()), + min_alignment())); + + } else { diff -r 0040fb0dcaf8 -r 66f144a0dbee patches/hotspot/default/icedtea-use-idx_t.patch --- a/patches/hotspot/default/icedtea-use-idx_t.patch Wed Mar 11 15:15:58 2009 +0100 +++ b/patches/hotspot/default/icedtea-use-idx_t.patch Wed Mar 11 22:43:53 2009 +0100 @@ -1,6 +1,14 @@ diff -Nru openjdk.orig/hotspot/src/share -diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp ---- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-11-06 08:40:55.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-11-10 00:55:09.000000000 +0000 +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2009-03-11 21:49:08.000000000 +0100 +@@ -468,7 +468,7 @@ + bci = 0; + } + +- MethodLivenessResult answer((uintptr_t*)NULL,0); ++ MethodLivenessResult answer((size_t*)NULL,0); + + if (_block_count > 0) { + if (TimeLivenessAnalysis) _time_total.start(); @@ -567,15 +567,15 @@ @@ -31,9 +39,17 @@ diff -Nru openjdk.orig/hotspot/src/share _analyzer->bit_map_size_bits()); answer.set_is_valid(); -diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp ---- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp 2008-11-06 08:40:58.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2008-11-10 00:57:20.000000000 +0000 +--- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2009-03-11 21:48:18.000000000 +0100 +@@ -33,7 +33,7 @@ + + public: + typedef size_t idx_t; // Type used for bit and word indices. +- typedef uintptr_t bm_word_t; // Element type of array that represents ++ typedef size_t bm_word_t; // Element type of array that represents + // the bitmap. + + // Hints for range sizes. @@ -73,7 +73,7 @@ // Set a word to a specified value or to all ones; clear a word. @@ -43,3 +59,43 @@ diff -Nru openjdk.orig/hotspot/src/share void clear_word(idx_t word) { _map[word] = 0; } // Utilities for ranges of bits. Ranges are half-open [beg, end). +--- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp 2009-03-11 21:48:18.000000000 +0100 +@@ -35,7 +35,7 @@ + + inline bool BitMap::par_set_bit(idx_t bit) { + verify_index(bit); +- volatile idx_t* const addr = word_addr(bit); ++ volatile idx_t* const addr = (idx_t *) word_addr(bit); + const idx_t mask = bit_mask(bit); + idx_t old_val = *addr; + +@@ -56,7 +56,7 @@ + + inline bool BitMap::par_clear_bit(idx_t bit) { + verify_index(bit); +- volatile idx_t* const addr = word_addr(bit); ++ volatile idx_t* const addr = (idx_t *) word_addr(bit); + const idx_t mask = ~bit_mask(bit); + idx_t old_val = *addr; + +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig 2008-12-20 18:59:01.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2009-03-11 21:48:47.000000000 +0100 +@@ -29,7 +29,7 @@ + // CMS Bit Map Wrapper + + CMBitMapRO::CMBitMapRO(ReservedSpace rs, int shifter): +- _bm((uintptr_t*)NULL,0), ++ _bm((size_t*)NULL,0), + _shifter(shifter) { + _bmStartWord = (HeapWord*)(rs.base()); + _bmWordSize = rs.size()/HeapWordSize; // rs.size() is in bytes +@@ -43,7 +43,7 @@ + "couldn't reseve backing store for CMS bit map"); + 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); From mvfranz at gmail.com Wed Mar 11 15:52:10 2009 From: mvfranz at gmail.com (Michael Franz) Date: Wed, 11 Mar 2009 18:52:10 -0400 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <49B786D2.5040200@redhat.com> References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> Message-ID: Andrew, I tried to build using the standard jdk7 (not bsd project) and got the same errors. Since this is a stock Fedora 10,this does not seem to be an issue with the source tree, but with my compiler. How do I get my gcc to generate i486 instead of i386? Michael On Wed, Mar 11, 2009 at 5:39 AM, Andrew Haley wrote: > Gary Benson wrote: > > Michael Franz wrote: > >> I am trying to build zero using the latest bsd repo and getting the > >> following error. I cannot figure out where it is coming from and > >> thus what I am missing. > >> > >> > /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: > >> undefined reference to `__sync_val_compare_and_swap_4' > >> > /home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product/libjvm.so: > >> undefined reference to `__sync_add_and_fetch_4' > >> collect2: ld returned 1 exit status > > > > These come from the gcc atomic intrinsics in > > ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp > > (or its BSD equivalent). If gcc doesn't know how to generate inline > > assembly for your platform it drops in calls to functions like those. > > I'm guessing you're on x86 or ppc? gcc ought to be able to handle > > that, so maybe it's just a case of enabling something there, but I'm > > no expert. aph would know more... > > The most likely explanation is that the g++ being used is building for the > i386 architecture, which doesn't have the atomic instructions. We need > i486 or above. > > Andrew. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090311/27264116/attachment.html From gnu_andrew at member.fsf.org Wed Mar 11 17:33:56 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 12 Mar 2009 00:33:56 +0000 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: <20090311202649.21FBD28E0EF@eggemoggin.niobe.net> References: <17c6771e0903110900g73ba74c5o2e9753c69d6c892d@mail.gmail.com> <20090311202649.21FBD28E0EF@eggemoggin.niobe.net> Message-ID: <17c6771e0903111733k4c40ee6aj48288bd1b3216d3d@mail.gmail.com> 2009/3/11 Mark Reinhold : > I think you're good to go. ?I've created and populated your jdk7 > forest [1], created the icedtea-changes list, and Dalibor has > posted your Project page. > > If you need anything else, just let us know. > > - Mark > > > [1] http://hg.openjdk.java.net/icedtea/jdk7 > There are a couple of (hopefully minor) things I just spotted: * Could you change the mail address for the hg repository from my personal one to distro-pkg-dev? * On that note, my OpenJDK mail address should probably now be ahughes at redhat.com. Can I change that? Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Wed Mar 11 17:53:39 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 12 Mar 2009 00:53:39 +0000 Subject: [Bug 302] New: JRE fatal error Problematic frame Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=302 Summary: JRE fatal error Problematic frame Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: dgahling at hotmail.com Core Initializing took 2081ms UIFunctions/ImageLoad took 20ms new shell took 26ms new shell setup took 343ms skinlisteners init took 26ms skin init took 853ms MainMenu init took 577ms createWindow init took 0ms skin layout took 56ms pre skin widgets init took 90ms hooks init took 75ms WARNING: already added UIUpdatable com.aelitis.azureus.ui.swt.views.skin.sidebar.SideBar at 24a09e41 skin widgets (1/2) init took 450ms skin widgets init took 425ms pre SWTInstance init took 0ms Init Core Columns took 376ms Loading configuration loaded type=2,uid=2/uuid:7ed2b407-3137-14c9-982f-4c2acaf24c07::upnp:rootdevice,name=Vuze on mail (Vuze Media Server) SWTInstance init took 623ms shell.layout took 576ms ---------READY AT 1236819008833 shell.open took 622ms processStartupDMS took 7ms vuzeactivities init took 33ms # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f10fec9f2f2, pid=12778, tid=139711198177616 # # Java VM: OpenJDK 64-Bit Server VM (14.0-b08 mixed mode linux-amd64 ) # Distribution: Custom build (Tue Mar 3 15:01:05 UTC 2009) # Problematic frame: # C [libxul.so+0x3c82f2] _ZN19nsACString_internal6AppendEPKcj+0x28 # # An error report file with more information is saved as: # /home/dan/hs_err_pid12778.log # # If you would like to submit a bug report, please include # instructions how to reproduce the bug and 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. # Aborted -- 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 Mar 11 17:57:51 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 12 Mar 2009 00:57:51 +0000 Subject: [Bug 302] JRE fatal error Problematic frame Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=302 ------- Comment #1 from dgahling at hotmail.com 2009-03-12 00:57 ------- Created an attachment (id=170) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=170&action=view) log file referred to in error message -- 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 mr at sun.com Wed Mar 11 20:40:37 2009 From: mr at sun.com (Mark Reinhold) Date: Wed, 11 Mar 2009 20:40:37 -0700 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: gnu_andrew@member.fsf.org; Thu, 12 Mar 2009 00:33:56 -0000; <17c6771e0903111733k4c40ee6aj48288bd1b3216d3d@mail.gmail.com> Message-ID: <20090312034037.E78C79F78@callebaut.niobe.net> > Date: Thu, 12 Mar 2009 00:33:56 +0000 > From: Andrew John Hughes > There are a couple of (hopefully minor) things I just spotted: > > * Could you change the mail address for the hg repository from my > personal one to distro-pkg-dev? Sure. Done. > * On that note, my OpenJDK mail address should probably now be > ahughes at redhat.com. Can I change that? No, but I can. Done. (Yes, we need a web UI for that. So much to do, so little time ...) Should I also change your organizational affiliation to "Red Hat"? It's currently "University of Sheffield". - Mark From gnu_andrew at member.fsf.org Thu Mar 12 02:23:41 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 12 Mar 2009 09:23:41 +0000 Subject: Setting up the OpenJDK IcedTea Project In-Reply-To: <20090312034037.E78C79F78@callebaut.niobe.net> References: <17c6771e0903111733k4c40ee6aj48288bd1b3216d3d@mail.gmail.com> <20090312034037.E78C79F78@callebaut.niobe.net> Message-ID: <17c6771e0903120223i19ddee9bub1ebf0b54ed16d43@mail.gmail.com> 2009/3/12 Mark Reinhold : >> Date: Thu, 12 Mar 2009 00:33:56 +0000 >> From: Andrew John Hughes > >> There are a couple of (hopefully minor) things I just spotted: >> >> * Could you change the mail address for the hg repository from my >> personal one to distro-pkg-dev? > > Sure. ?Done. > >> * On that note, my OpenJDK mail address should probably now be >> ahughes at redhat.com. ?Can I change that? > > No, but I can. ?Done. ?(Yes, we need a web UI for that. ?So much > to do, so little time ...) > > Should I also change your organizational affiliation to "Red Hat"? > It's currently "University of Sheffield". > Yes, that'd be great, thanks. > - Mark > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 aph at redhat.com Thu Mar 12 02:32:13 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 12 Mar 2009 09:32:13 +0000 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> Message-ID: <49B8D69D.5020705@redhat.com> Michael Franz wrote: > I tried to build using the standard jdk7 (not bsd project) and got the same > errors. Since this is a stock Fedora 10,this does not seem to be an issue > with the source tree, but with my compiler. How do I get > my gcc to generate i486 instead of i386? -march=i486. It's in the gcc docs. The openjdk makefiles set COMMON_FLAGS and FLAGS in a few places, you just have to search and find them. Andrew. From gbenson at redhat.com Thu Mar 12 04:09:11 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 12 Mar 2009 11:09:11 +0000 Subject: changeset in /hg/icedtea6: 2009-03-12 Gary Benson changeset 832443ed76f7 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=832443ed76f7 description: 2009-03-12 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Ensure that state setup code is the first code for the block. diffstat: 2 files changed, 11 insertions(+) ChangeLog | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 5 +++++ diffs (28 lines): diff -r 66f144a0dbee -r 832443ed76f7 ChangeLog --- a/ChangeLog Wed Mar 11 22:43:53 2009 +0100 +++ b/ChangeLog Thu Mar 12 07:08:14 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-11 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Ensure that state setup + code is the first code for the block. + 2009-03-11 Matthias Klose * patches/hotspot/default/icedtea-params-cast-size_t.patch: Update for diff -r 66f144a0dbee -r 832443ed76f7 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 11 22:43:53 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Mar 12 07:08:14 2009 -0400 @@ -33,6 +33,11 @@ void SharkBlock::parse_bytecode(int star SharkValue *a, *b, *c, *d; int i; + // Ensure the current state is initialized before we emit any code, + // so that any setup code for the state is at the start of the block + current_state(); + + // Parse the bytecodes iter()->reset_to_bci(start); while (iter()->next_bci() < limit) { NOT_PRODUCT(a = b = c = d = NULL); From mvfranz at gmail.com Thu Mar 12 04:50:49 2009 From: mvfranz at gmail.com (Michael Franz) Date: Thu, 12 Mar 2009 07:50:49 -0400 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <49B8D69D.5020705@redhat.com> References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> <49B8D69D.5020705@redhat.com> Message-ID: Andrew, On Thu, Mar 12, 2009 at 5:32 AM, Andrew Haley wrote: > Michael Franz wrote: > > > I tried to build using the standard jdk7 (not bsd project) and got the > same > > errors. Since this is a stock Fedora 10,this does not seem to be an > issue > > with the source tree, but with my compiler. How do I get > > my gcc to generate i486 instead of i386? > > -march=i486. It's in the gcc docs. The openjdk makefiles set COMMON_FLAGS > and FLAGS in a few places, you just have to search and find them. > I was able to find that. I added it to the zero.make file, but that caused other errors during the code generation phase[1]. I will try adding it to the COMMON_FLAGS. I have had problems adding values to CFLAGS/CXXFLAGS/LDFLAGS within the build process. It seems that the whole process is inconsistent in how these are set and the ability to add values. If I pass a value fo CFLAGS to make, CLAGS does not get created correctly and the build fails. I think there was a project that was working on the Windows build to clean it up, is there anything similar for the *nix family? Thanks Michael 1. ../generated/incls/_precompiled.incl:1: error: bad value (486) for -march= switch > > Andrew. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090312/b6b24797/attachment.html From aph at redhat.com Thu Mar 12 06:56:37 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 12 Mar 2009 13:56:37 +0000 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> <49B8D69D.5020705@redhat.com> Message-ID: <49B91495.7060208@redhat.com> Michael Franz wrote: > On Thu, Mar 12, 2009 at 5:32 AM, Andrew Haley wrote: > >> Michael Franz wrote: >>> I tried to build using the standard jdk7 (not bsd project) and got >>> the same errors. Since this is a stock Fedora 10,this does not >>> seem to be an issue with the source tree, but with my compiler. >>> How do I get my gcc to generate i486 instead of i386? >> -march=i486. It's in the gcc docs. The openjdk makefiles set >> COMMON_FLAGS and FLAGS in a few places, you just have to search and >> find them. > > I was able to find that. I added it to the zero.make file, but that > caused other errors during the code generation phase[1]. I will try > adding it to the COMMON_FLAGS. > I have had problems adding values to CFLAGS/CXXFLAGS/LDFLAGS within > the build process. It seems that the whole process is inconsistent > in how these are set and the ability to add values. If I pass a > value fo CFLAGS to make, CLAGS does not get created correctly and > the build fails. That's right. You have to edit the makefiles. > I think there was a project that was working on the Windows build to > clean it up, is there anything similar for the *nix family? No idea, sorry. > 1. ../generated/incls/_precompiled.incl:1: error: bad value (486) > for -march= switch For what command? Andrew. From gbenson at redhat.com Thu Mar 12 07:24:37 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 12 Mar 2009 14:24:37 +0000 Subject: changeset in /hg/icedtea6: 2009-03-12 Gary Benson changeset 1caf618d2b4c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1caf618d2b4c description: 2009-03-12 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp (LLVMValue): Moved to llvmValue.hpp (SharkValue::create_generic): Moved from sharkInline.hpp. (SharkValue::create_returnAddress): Likewise. * ports/hotspot/src/share/vm/shark/llvmValue.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkValue.inline.hpp: Removed. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 5 files changed, 103 insertions(+), 81 deletions(-) ChangeLog | 13 +++ ports/hotspot/src/share/vm/includeDB_shark | 35 ++++++--- ports/hotspot/src/share/vm/shark/llvmValue.hpp | 58 ++++++++++++++++ ports/hotspot/src/share/vm/shark/sharkValue.hpp | 44 ++---------- ports/hotspot/src/share/vm/shark/sharkValue.inline.hpp | 34 --------- diffs (350 lines): diff -r 832443ed76f7 -r 1caf618d2b4c ChangeLog --- a/ChangeLog Thu Mar 12 07:08:14 2009 -0400 +++ b/ChangeLog Thu Mar 12 10:23:39 2009 -0400 @@ -1,3 +1,16 @@ 2009-03-12 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (LLVMValue): Moved to llvmValue.hpp + (SharkValue::create_generic): Moved from sharkInline.hpp. + (SharkValue::create_returnAddress): Likewise. + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp: New file. + + * ports/hotspot/src/share/vm/shark/sharkValue.inline.hpp: Removed. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-12 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp diff -r 832443ed76f7 -r 1caf618d2b4c ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Thu Mar 12 07:08:14 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Mar 12 10:23:39 2009 -0400 @@ -56,6 +56,9 @@ globals.hpp globals.cpp shark_globals.hpp +llvmValue.hpp llvmHeaders.hpp +llvmValue.hpp sharkType.hpp + methodOop.cpp sharkEntry.hpp shark_globals.cpp shark_globals.hpp @@ -66,12 +69,13 @@ sharkBlock.cpp sharkBlock.cpp debug.hpp sharkBlock.cpp bytecodes.hpp sharkBlock.cpp llvmHeaders.hpp +sharkBlock.cpp llvmValue.hpp sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp -sharkBlock.cpp sharkValue.inline.hpp +sharkBlock.cpp sharkValue.hpp sharkBlock.hpp allocation.hpp sharkBlock.hpp ciMethod.hpp @@ -85,6 +89,7 @@ sharkBuilder.cpp sharkBuilder.cpp ciMethod.hpp sharkBuilder.cpp debug.hpp sharkBuilder.cpp llvmHeaders.hpp +sharkBuilder.cpp llvmValue.hpp sharkBuilder.cpp methodOop.hpp sharkBuilder.cpp os.hpp sharkBuilder.cpp resourceArea.hpp @@ -100,14 +105,16 @@ sharkBuilder.hpp sharkBuilder.hpp ciType.hpp sharkBuilder.hpp debug.hpp sharkBuilder.hpp llvmHeaders.hpp +sharkBuilder.hpp llvmValue.hpp sharkBuilder.hpp sizes.hpp sharkBuilder.hpp sharkCompiler.hpp sharkBuilder.hpp sharkType.hpp -sharkBuilder.hpp sharkValue.inline.hpp +sharkBuilder.hpp sharkValue.hpp sharkBuilder.hpp sharkEntry.hpp sharkCacheDecache.cpp ciMethod.hpp sharkCacheDecache.cpp debugInfoRec.hpp +sharkCacheDecache.cpp llvmValue.hpp sharkCacheDecache.cpp sharkBuilder.hpp sharkCacheDecache.cpp sharkCacheDecache.hpp sharkCacheDecache.cpp sharkFunction.hpp @@ -149,12 +156,13 @@ sharkConstantPool.cpp sharkConstantPool.cpp cpCacheOop.hpp sharkConstantPool.cpp debug.hpp sharkConstantPool.cpp llvmHeaders.hpp +sharkConstantPool.cpp llvmValue.hpp sharkConstantPool.cpp methodOop.hpp sharkConstantPool.cpp sharkBuilder.hpp sharkConstantPool.cpp sharkConstantPool.hpp sharkConstantPool.cpp sharkState.inline.hpp sharkConstantPool.cpp sharkType.hpp -sharkConstantPool.cpp sharkValue.inline.hpp +sharkConstantPool.cpp sharkValue.hpp sharkConstantPool.hpp allocation.hpp sharkConstantPool.hpp llvmHeaders.hpp @@ -169,6 +177,7 @@ sharkFunction.cpp sharkFunction.cpp ciTypeFlow.hpp sharkFunction.cpp debug.hpp sharkFunction.cpp llvmHeaders.hpp +sharkFunction.cpp llvmValue.hpp sharkFunction.cpp shark_globals.hpp sharkFunction.cpp sharkBuilder.hpp sharkFunction.cpp sharkEntry.hpp @@ -182,6 +191,7 @@ sharkFunction.hpp sharkFunction.hpp ciStreams.hpp sharkFunction.hpp ciTypeFlow.hpp sharkFunction.hpp llvmHeaders.hpp +sharkFunction.hpp llvmValue.hpp sharkFunction.hpp sharkBuilder.hpp sharkInliner.cpp allocation.hpp @@ -193,7 +203,7 @@ sharkInliner.cpp sharkInliner.cpp sharkInliner.hpp sharkInliner.cpp sharkIntrinsics.hpp sharkInliner.cpp sharkState.inline.hpp -sharkInliner.cpp sharkValue.inline.hpp +sharkInliner.cpp sharkValue.hpp sharkInliner.hpp allocation.hpp sharkInliner.hpp ciMethod.hpp @@ -206,7 +216,7 @@ sharkIntrinsics.cpp sharkIntrinsics.cpp sharkIntrinsics.hpp sharkIntrinsics.cpp sharkRuntime.hpp sharkIntrinsics.cpp sharkState.inline.hpp -sharkIntrinsics.cpp sharkValue.inline.hpp +sharkIntrinsics.cpp sharkValue.hpp sharkIntrinsics.hpp allocation.hpp sharkIntrinsics.hpp ciMethod.hpp @@ -221,6 +231,7 @@ sharkMemoryManager.cpp sharkMemoryManager.cpp sharkMemoryManager.hpp sharkMonitor.cpp llvmHeaders.hpp +sharkMonitor.cpp llvmValue.hpp sharkMonitor.cpp sharkMonitor.hpp sharkMonitor.cpp sharkRuntime.hpp sharkMonitor.cpp sharkState.inline.hpp @@ -228,6 +239,7 @@ sharkMonitor.cpp sharkMonitor.hpp allocation.hpp sharkMonitor.hpp llvmHeaders.hpp +sharkMonitor.hpp llvmValue.hpp sharkMonitor.hpp sharkBuilder.hpp sharkMonitor.hpp sharkFunction.hpp @@ -254,7 +266,7 @@ sharkState.cpp sharkState.cpp sharkState.inline.hpp sharkState.cpp sharkTopLevelBlock.hpp sharkState.cpp sharkType.hpp -sharkState.cpp sharkValue.inline.hpp +sharkState.cpp sharkValue.hpp sharkState.hpp allocation.hpp sharkState.hpp ciMethod.hpp @@ -282,6 +294,7 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp debug.hpp sharkTopLevelBlock.cpp deoptimization.hpp sharkTopLevelBlock.cpp llvmHeaders.hpp +sharkTopLevelBlock.cpp llvmValue.hpp sharkTopLevelBlock.cpp shark_globals.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp @@ -289,7 +302,7 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp sharkTopLevelBlock.cpp sharkState.inline.hpp -sharkTopLevelBlock.cpp sharkValue.inline.hpp +sharkTopLevelBlock.cpp sharkValue.hpp sharkTopLevelBlock.hpp allocation.hpp sharkTopLevelBlock.hpp bytecodes.hpp @@ -302,7 +315,7 @@ sharkTopLevelBlock.hpp sharkTopLevelBlock.hpp sharkFunction.hpp sharkTopLevelBlock.hpp sharkMonitor.hpp sharkTopLevelBlock.hpp sharkState.inline.hpp -sharkTopLevelBlock.hpp sharkValue.inline.hpp +sharkTopLevelBlock.hpp sharkValue.hpp sharkType.cpp arrayOop.hpp sharkType.cpp globalDefinitions.hpp @@ -319,9 +332,5 @@ sharkValue.hpp sharkValue.hpp allocation.hpp sharkValue.hpp ciType.hpp sharkValue.hpp llvmHeaders.hpp +sharkValue.hpp llvmValue.hpp sharkValue.hpp sharkType.hpp - -sharkValue.inline.hpp ciType.hpp -sharkValue.inline.hpp llvmHeaders.hpp -sharkValue.inline.hpp sharkValue.hpp - diff -r 832443ed76f7 -r 1caf618d2b4c ports/hotspot/src/share/vm/shark/llvmValue.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Thu Mar 12 10:23:39 2009 -0400 @@ -0,0 +1,58 @@ +/* + * Copyright 1999-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 LLVMValue : public AllStatic { + public: + static llvm::ConstantInt* jbyte_constant(jbyte value) + { + return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); + } + static llvm::ConstantInt* jint_constant(jint value) + { + return llvm::ConstantInt::get(SharkType::jint_type(), value, true); + } + static llvm::ConstantInt* jlong_constant(jlong value) + { + return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); + } + static llvm::ConstantFP* jfloat_constant(jfloat value) + { + return llvm::ConstantFP::get(SharkType::jfloat_type(), value); + } + static llvm::ConstantFP* jdouble_constant(jdouble value) + { + return llvm::ConstantFP::get(SharkType::jdouble_type(), value); + } + static llvm::ConstantPointerNull* null() + { + return llvm::ConstantPointerNull::get(SharkType::jobject_type()); + } + + public: + static llvm::ConstantInt* intptr_constant(intptr_t value) + { + return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); + } +}; diff -r 832443ed76f7 -r 1caf618d2b4c ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Mar 12 07:08:14 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Mar 12 10:23:39 2009 -0400 @@ -22,40 +22,6 @@ * have any questions. * */ - -class LLVMValue : public AllStatic { - public: - static llvm::ConstantInt* jbyte_constant(jbyte value) - { - return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); - } - static llvm::ConstantInt* jint_constant(jint value) - { - return llvm::ConstantInt::get(SharkType::jint_type(), value, true); - } - static llvm::ConstantInt* jlong_constant(jlong value) - { - return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); - } - static llvm::ConstantFP* jfloat_constant(jfloat value) - { - return llvm::ConstantFP::get(SharkType::jfloat_type(), value); - } - static llvm::ConstantFP* jdouble_constant(jdouble value) - { - return llvm::ConstantFP::get(SharkType::jdouble_type(), value); - } - static llvm::ConstantPointerNull* null() - { - return llvm::ConstantPointerNull::get(SharkType::jobject_type()); - } - - public: - static llvm::ConstantInt* intptr_constant(intptr_t value) - { - return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); - } -}; class SharkValue : public ResourceObj { protected: @@ -403,6 +369,11 @@ class SharkComputableValue : public Shar } }; +inline SharkValue* SharkValue::create_generic(ciType* type, llvm::Value* value) +{ + return new SharkComputableValue(type, value); +} + class SharkReturnAddressValue : public SharkValue { friend class SharkValue; @@ -451,3 +422,8 @@ class SharkReturnAddressValue : public S assert(_bci == value->returnAddress_value(), "should be"); } }; + +inline SharkValue* SharkValue::create_returnAddress(int bci) +{ + return new SharkReturnAddressValue(bci); +} diff -r 832443ed76f7 -r 1caf618d2b4c ports/hotspot/src/share/vm/shark/sharkValue.inline.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.inline.hpp Thu Mar 12 07:08:14 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* - * Copyright 1999-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. - * - */ - -inline SharkValue* SharkValue::create_generic(ciType* type, llvm::Value* value) -{ - return new SharkComputableValue(type, value); -} - -inline SharkValue* SharkValue::create_returnAddress(int bci) -{ - return new SharkReturnAddressValue(bci); -} From omajid at redhat.com Thu Mar 12 14:33:28 2009 From: omajid at redhat.com (Omair Majid) Date: Thu, 12 Mar 2009 17:33:28 -0400 Subject: [RFC] Remove outdated postscript test from icedtea6 Message-ID: <49B97FA8.2030601@redhat.com> Hi, This patch removes the javax/print/attribute/PSCopiesFlavorTest.java jtreg (jdk) test from IcedTea6. The test was written for a CUPS/postscript bug[1]. There are several issues with this test. It cant handle the case where there is no default printer; it throws a NullPointerException without actually testing what it's supposed to. The bug that this test checks for has become obsolete. The issue was that when a postscript file specified the number of copies, and the user asked for a certain number of copies, the number of copies in the postscript file would generally take precedence. This meant that from a user's point of view, there was no way to set the number of copies. This is no longer true for modern version of CUPS. The JRE has already been fixed so that it returns Copies as a valid attribute for postscript documents, making this test incorrect. Cheers Omair [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527316 -------------- next part -------------- A non-text attachment was scrubbed... Name: remove-postscript-jtreg-test.patch Type: text/x-patch Size: 3553 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090312/406b96f5/remove-postscript-jtreg-test.patch From gnu_andrew at member.fsf.org Thu Mar 12 15:25:58 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 12 Mar 2009 22:25:58 +0000 Subject: [RFC] Remove outdated postscript test from icedtea6 In-Reply-To: <49B97FA8.2030601@redhat.com> References: <49B97FA8.2030601@redhat.com> Message-ID: <17c6771e0903121525j2e365f0er3f0792c934318b19@mail.gmail.com> 2009/3/12 Omair Majid : > Hi, > > This patch removes the javax/print/attribute/PSCopiesFlavorTest.java jtreg > (jdk) test from IcedTea6. The test was written for a CUPS/postscript bug[1]. > > There are several issues with this test. It cant handle the case where there > is no default printer; it throws a NullPointerException without actually > testing what it's supposed to. The bug that this test checks for has become > obsolete. The issue was that when a postscript file specified the number of > copies, and the user asked for a certain number of copies, the number of > copies in the postscript file would generally take precedence. This meant > that from a user's point of view, there was no way to set the number of > copies. This is no longer true for modern version of CUPS. The JRE has > already been fixed so that it returns Copies as a valid attribute for > postscript documents, making this test incorrect. > > Cheers > Omair > > [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527316 > You should file an OpenJDK bug for this patch as well: https://bugs.openjdk.java.net/ I can see the logic, but for the time being it might be better to just exclude it from the JTReg tests in IcedTea and wait for feedback from Sun on complete removal. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 mvfranz at gmail.com Thu Mar 12 16:24:17 2009 From: mvfranz at gmail.com (Michael Franz) Date: Thu, 12 Mar 2009 19:24:17 -0400 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <49B91495.7060208@redhat.com> References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> <49B8D69D.5020705@redhat.com> <49B91495.7060208@redhat.com> Message-ID: Andew, > > > 1. ../generated/incls/_precompiled.incl:1: error: bad value (486) > > for -march= switch > > For what command? > Sorry, This is the command. make[7]: Entering directory `/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product' echo Generating precompiled header incls/_precompiled.incl.gch Generating precompiled header incls/_precompiled.incl.gch mkdir -p ./incls g++ -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DIA32 -DZERO_LIBARCH=\"i386\" -DPRODUCT -I. -I../generated/adfiles -I../generated/jvmtifiles -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/asm -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/c1 -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/ci -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/classfile -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/code -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/compiler -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parNew -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/g1 -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/shared -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_interface -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/interpreter -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/memory -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/oops -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/prims -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/runtime -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/services -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/shark -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/utilities -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/cpu/zero/vm -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/os/linux/vm -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"14.0-b10\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"mfranz\"" -DHOTSPOT_LIB_ARCH=\"i386\" -DJRE_RELEASE_VERSION="\"1.7.0_0-b46\"" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -I/usr/lib/libffi-3.0.5/include -fpic -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -g -m32 -pipe -O3 -fno-strict-aliasing -march=486 -DVM_LITTLE_ENDIAN -Werror -Wpointer-arith -Wsign-compare -c -x c++-header -c ../generated/incls/_precompiled.incl -o incls/_precompiled.incl.gch ../generated/incls/_precompiled.incl:1: error: bad value (486) for -march= switch ../generated/incls/_precompiled.incl:1: error: bad value (486) for -mtune= switch make[7]: *** [incls/_precompiled.incl.gch] Error 1 make[7]: Leaving directory `/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product' Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090312/8fca6bfb/attachment.html From doko at ubuntu.com Thu Mar 12 16:26:44 2009 From: doko at ubuntu.com (Matthias Klose) Date: Fri, 13 Mar 2009 00:26:44 +0100 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> <49B8D69D.5020705@redhat.com> <49B91495.7060208@redhat.com> Message-ID: <49B99A34.1040803@ubuntu.com> Michael Franz schrieb: > Andew, > > >>> 1. ../generated/incls/_precompiled.incl:1: error: bad value (486) >>> for -march= switch >> For what command? >> > Sorry, This is the command. > make[7]: Entering directory > `/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product' > echo Generating precompiled header incls/_precompiled.incl.gch > Generating precompiled header incls/_precompiled.incl.gch > mkdir -p ./incls > g++ -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DIA32 -DZERO_LIBARCH=\"i386\" > -DPRODUCT -I. -I../generated/adfiles -I../generated/jvmtifiles > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/asm > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/c1 > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/ci > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/classfile > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/code > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/compiler > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parNew > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/g1 > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/shared > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/gc_interface > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/interpreter > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/memory > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/oops > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/prims > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/runtime > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/services > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/shark > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/share/vm/utilities > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/cpu/zero/vm > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/os/linux/vm > -I/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm > -I../generated -DHOTSPOT_RELEASE_VERSION="\"14.0-b10\"" > -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"mfranz\"" > -DHOTSPOT_LIB_ARCH=\"i386\" -DJRE_RELEASE_VERSION="\"1.7.0_0-b46\"" > -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -I/usr/lib/libffi-3.0.5/include -fpic > -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -g -m32 -pipe -O3 > -fno-strict-aliasing -march=486 -DVM_LITTLE_ENDIAN -Werror -Wpointer-arith > -Wsign-compare -c -x c++-header -c ../generated/incls/_precompiled.incl > -o incls/_precompiled.incl.gch > ../generated/incls/_precompiled.incl:1: error: bad value (486) for -march= > switch > ../generated/incls/_precompiled.incl:1: error: bad value (486) for -mtune= > switch > make[7]: *** [incls/_precompiled.incl.gch] Error 1 > make[7]: Leaving directory > `/home/mfranz/developer/icedtea/IcedTea7-Tip/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_core/product' the switch should be -march=i486, not -march=486. I assume there is a typo in one of the patches you apply. Matthias From bugzilla-daemon at icedtea.classpath.org Thu Mar 12 19:43:28 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 13 Mar 2009 02:43:28 +0000 Subject: [Bug 303] New: qt-integration plugin in eclipse crashes while opening ui file Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=303 Summary: qt-integration plugin in eclipse crashes while opening ui file Product: IcedTea Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: wildshekhar at gmail.com qt-integration in eclipse crashes while creating the project. especially when trying to open an .ui file to edit the ui file in eclipse. here is the log: http://wildnux.pastebin.com/f58080941 -- 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 mvfranz at gmail.com Thu Mar 12 19:56:59 2009 From: mvfranz at gmail.com (Michael Franz) Date: Thu, 12 Mar 2009 22:56:59 -0400 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <49B99A34.1040803@ubuntu.com> References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> <49B8D69D.5020705@redhat.com> <49B91495.7060208@redhat.com> <49B99A34.1040803@ubuntu.com> Message-ID: Matthias, That was it. Thanks! Michael > the switch should be -march=i486, not -march=486. I assume there is a typo > in > one of the patches you apply. > > Matthias > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090312/bb716378/attachment.html From gbenson at redhat.com Fri Mar 13 02:08:06 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 09:08:06 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Gary Benson changeset 4d70fcddd403 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4d70fcddd403 description: 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkValue): Moved virtual method bodies to sharkValue.cpp. (SharkValue::is_address): Renamed from is_returnAddress. (SharkValue::address_value): Renamed from returnAddress_value. (SharkValue::address_constant): Renamed from create_returnAddress. (SharkNormalValue): Renamed from SharkComputableValue, and moved virtual method bodies to sharkValue.cpp. (SharkAddressValue): Renamed from SharkReturnAddressValue, and moved virtual method bodies to sharkValue.cpp. (SharkAddressValue::is_address): Renamed from is_returnAddress. (SharkAddressValue::address_value): Renamed from returnAddress_value. * ports/hotspot/src/share/vm/shark/sharkValue.cpp: New file. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkPHIState::SharkPHIState): s/create_returnAddress/address_constant/ (SharkTopLevelBlock::do_jsr): Likewise. (SharkTopLevelBlock::do_ret): s/returnAddress_value/address_value/ * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 5 files changed, 389 insertions(+), 274 deletions(-) ChangeLog | 22 ports/hotspot/src/share/vm/includeDB_shark | 6 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 10 ports/hotspot/src/share/vm/shark/sharkValue.cpp | 235 +++++++++ ports/hotspot/src/share/vm/shark/sharkValue.hpp | 390 ++++----------- diffs (truncated from 804 to 500 lines): diff -r 1caf618d2b4c -r 4d70fcddd403 ChangeLog --- a/ChangeLog Thu Mar 12 10:23:39 2009 -0400 +++ b/ChangeLog Fri Mar 13 05:07:05 2009 -0400 @@ -1,3 +1,25 @@ 2009-03-12 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue): Moved virtual method bodies to sharkValue.cpp. + (SharkValue::is_address): Renamed from is_returnAddress. + (SharkValue::address_value): Renamed from returnAddress_value. + (SharkValue::address_constant): Renamed from create_returnAddress. + (SharkNormalValue): Renamed from SharkComputableValue, and moved + virtual method bodies to sharkValue.cpp. + (SharkAddressValue): Renamed from SharkReturnAddressValue, and + moved virtual method bodies to sharkValue.cpp. + (SharkAddressValue::is_address): Renamed from is_returnAddress. + (SharkAddressValue::address_value): Renamed from returnAddress_value. + * ports/hotspot/src/share/vm/shark/sharkValue.cpp: New file. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkPHIState::SharkPHIState): s/create_returnAddress/address_constant/ + (SharkTopLevelBlock::do_jsr): Likewise. + (SharkTopLevelBlock::do_ret): s/returnAddress_value/address_value/ + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-12 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp diff -r 1caf618d2b4c -r 4d70fcddd403 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Thu Mar 12 10:23:39 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Fri Mar 13 05:07:05 2009 -0400 @@ -329,6 +329,12 @@ sharkType.hpp sharkType.hpp globalDefinitions.hpp sharkType.hpp llvmHeaders.hpp +sharkValue.cpp ciType.hpp +sharkValue.cpp llvmHeaders.hpp +sharkValue.cpp llvmValue.hpp +sharkValue.cpp sharkBuilder.hpp +sharkValue.cpp sharkValue.hpp + sharkValue.hpp allocation.hpp sharkValue.hpp ciType.hpp sharkValue.hpp llvmHeaders.hpp diff -r 1caf618d2b4c -r 4d70fcddd403 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Mar 12 10:23:39 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 05:07:05 2009 -0400 @@ -62,8 +62,7 @@ class SharkPHIState : public SharkState break; case T_ADDRESS: - value = SharkValue::create_returnAddress( - type->as_return_address()->bci()); + value = SharkValue::address_constant(type->as_return_address()->bci()); break; case ciTypeFlow::StateVector::T_BOTTOM: @@ -101,8 +100,7 @@ class SharkPHIState : public SharkState break; case T_ADDRESS: - value = SharkValue::create_returnAddress( - type->as_return_address()->bci()); + value = SharkValue::address_constant(type->as_return_address()->bci()); break; case ciTypeFlow::StateVector::T_LONG2: @@ -888,13 +886,13 @@ void SharkTopLevelBlock::do_goto() void SharkTopLevelBlock::do_jsr() { - push(SharkValue::create_returnAddress(iter()->next_bci())); + push(SharkValue::address_constant(iter()->next_bci())); builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); } void SharkTopLevelBlock::do_ret() { - assert(local(iter()->get_index())->returnAddress_value() == + assert(local(iter()->get_index())->address_value() == successor(ciTypeFlow::GOTO_TARGET)->start(), "should be"); builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); } diff -r 1caf618d2b4c -r 4d70fcddd403 ports/hotspot/src/share/vm/shark/sharkValue.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.cpp Fri Mar 13 05:07:05 2009 -0400 @@ -0,0 +1,235 @@ +/* + * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008, 2009 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. + * + */ + +#include "incls/_precompiled.incl" +#include "incls/_sharkValue.cpp.incl" + +using namespace llvm; + +// Type access + +ciType* SharkValue::type() const +{ + ShouldNotCallThis(); +} +ciType* SharkNormalValue::type() const +{ + return _type; +} + +BasicType SharkNormalValue::basic_type() const +{ + return type()->basic_type(); +} +BasicType SharkAddressValue::basic_type() const +{ + return T_ADDRESS; +} + +int SharkNormalValue::size() const +{ + return type()->size(); +} +int SharkAddressValue::size() const +{ + return 1; +} + +bool SharkValue::is_jint() const +{ + return false; +} +bool SharkValue::is_jlong() const +{ + return false; +} +bool SharkValue::is_jfloat() const +{ + return false; +} +bool SharkValue::is_jdouble() const +{ + return false; +} +bool SharkValue::is_jobject() const +{ + return false; +} +bool SharkValue::is_jarray() const +{ + return false; +} +bool SharkValue::is_address() const +{ + return false; +} + +bool SharkNormalValue::is_jint() const +{ + return llvm_value()->getType() == SharkType::jint_type(); +} +bool SharkNormalValue::is_jlong() const +{ + return llvm_value()->getType() == SharkType::jlong_type(); +} +bool SharkNormalValue::is_jfloat() const +{ + return llvm_value()->getType() == SharkType::jfloat_type(); +} +bool SharkNormalValue::is_jdouble() const +{ + return llvm_value()->getType() == SharkType::jdouble_type(); +} +bool SharkNormalValue::is_jobject() const +{ + return llvm_value()->getType() == SharkType::jobject_type(); +} +bool SharkNormalValue::is_jarray() const +{ + return basic_type() == T_ARRAY; +} +bool SharkAddressValue::is_address() const +{ + return true; +} + +// Typed conversions from SharkValues + +Value* SharkValue::jint_value() const +{ + ShouldNotCallThis(); +} +Value* SharkValue::jlong_value() const +{ + ShouldNotCallThis(); +} +Value* SharkValue::jfloat_value() const +{ + ShouldNotCallThis(); +} +Value* SharkValue::jdouble_value() const +{ + ShouldNotCallThis(); +} +Value* SharkValue::jobject_value() const +{ + ShouldNotCallThis(); +} +Value* SharkValue::jarray_value() const +{ + ShouldNotCallThis(); +} +int SharkValue::address_value() const +{ + ShouldNotCallThis(); +} + +Value* SharkNormalValue::jint_value() const +{ + assert(is_jint(), "should be"); + return llvm_value(); +} +Value* SharkNormalValue::jlong_value() const +{ + assert(is_jlong(), "should be"); + return llvm_value(); +} +Value* SharkNormalValue::jfloat_value() const +{ + assert(is_jfloat(), "should be"); + return llvm_value(); +} +Value* SharkNormalValue::jdouble_value() const +{ + assert(is_jdouble(), "should be"); + return llvm_value(); +} +Value* SharkNormalValue::jobject_value() const +{ + assert(is_jobject(), "should be"); + return llvm_value(); +} +Value* SharkNormalValue::jarray_value() const +{ + assert(is_jarray(), "should be"); + return llvm_value(); +} +int SharkAddressValue::address_value() const +{ + return _bci; +} + +// Type-losing conversions -- use with care! + +Value* SharkNormalValue::generic_value() const +{ + return llvm_value(); +} +Value* SharkAddressValue::generic_value() const +{ + return LLVMValue::intptr_constant(_bci); +} + +Value* SharkValue::intptr_value(SharkBuilder* builder) const +{ + ShouldNotCallThis(); +} +Value* SharkNormalValue::intptr_value(SharkBuilder* builder) const +{ + return builder->CreatePtrToInt(jobject_value(), SharkType::intptr_type()); +} + +// Phi-style stuff + +void SharkNormalValue::addIncoming(SharkValue *value, BasicBlock* block) +{ + assert(llvm::isa(generic_value()), "should be"); + ((llvm::PHINode *) generic_value())->addIncoming( + value->generic_value(), block); +} +void SharkAddressValue::addIncoming(SharkValue *value, BasicBlock* block) +{ + assert(_bci == value->address_value(), "should be"); +} + +// Repeated null and divide-by-zero check removal + +bool SharkValue::zero_checked() const +{ + ShouldNotCallThis(); +} +void SharkValue::set_zero_checked(bool zero_checked) +{ + ShouldNotCallThis(); +} + +bool SharkNormalValue::zero_checked() const +{ + return _zero_checked; +} +void SharkNormalValue::set_zero_checked(bool zero_checked) +{ + _zero_checked = zero_checked; +} diff -r 1caf618d2b4c -r 4d70fcddd403 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Mar 12 10:23:39 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 05:07:05 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 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 @@ -23,25 +23,37 @@ * */ +// Items on the stack and in local variables are tracked using +// SharkValue objects. There are two types, SharkNormalValue +// and SharkAddressValue, but no code outside this file should +// ever refer to those directly. The split is because of the +// way JSRs are handled: the typeflow pass expands them into +// multiple copies, so the return addresses pushed by jsr and +// popped by ret only exist at compile time. Having separate +// classes for these allows us to check that our jsr handling +// is correct, via assertions. + +class SharkBuilder; + class SharkValue : public ResourceObj { protected: SharkValue() {} // Type access public: - virtual ciType* type() const - { - ShouldNotCallThis(); - } - - virtual BasicType basic_type() const - { - ShouldNotCallThis(); - } - virtual int size() const - { - ShouldNotCallThis(); - } + virtual BasicType basic_type() const = 0; + virtual ciType* type() const; + + virtual bool is_jint() const; + virtual bool is_jlong() const; + virtual bool is_jfloat() const; + virtual bool is_jdouble() const; + virtual bool is_jobject() const; + virtual bool is_jarray() const; + virtual bool is_address() const; + + virtual int size() const = 0; + bool is_one_word() const { return size() == 1; @@ -51,67 +63,45 @@ class SharkValue : public ResourceObj { return size() == 2; } - virtual bool is_jint() const - { - return false; - } - virtual bool is_jlong() const - { - return false; - } - virtual bool is_jfloat() const - { - return false; - } - virtual bool is_jdouble() const - { - return false; - } - virtual bool is_jobject() const - { - return false; - } - virtual bool is_jarray() const - { - return false; - } - virtual bool is_returnAddress() const - { - return false; - } - - // Typed conversions to LLVM values - public: - virtual llvm::Value* jint_value() const - { - ShouldNotCallThis(); - } - virtual llvm::Value* jlong_value() const - { - ShouldNotCallThis(); - } - virtual llvm::Value* jfloat_value() const - { - ShouldNotCallThis(); - } - virtual llvm::Value* jdouble_value() const - { - ShouldNotCallThis(); - } - virtual llvm::Value* jobject_value() const - { - ShouldNotCallThis(); - } - virtual llvm::Value* jarray_value() const - { - ShouldNotCallThis(); - } - virtual int returnAddress_value() const - { - ShouldNotCallThis(); - } - - // Constants of various types + // Typed conversion from SharkValues + public: + virtual llvm::Value* jint_value() const; + virtual llvm::Value* jlong_value() const; + virtual llvm::Value* jfloat_value() const; + virtual llvm::Value* jdouble_value() const; + virtual llvm::Value* jobject_value() const; + virtual llvm::Value* jarray_value() const; + virtual int address_value() const; + + // Typed conversion to SharkValues + public: + static SharkValue* create_jint(llvm::Value* value) + { + assert(value->getType() == SharkType::jint_type(), "should be"); + return create_generic(ciType::make(T_INT), value); + } + static SharkValue* create_jlong(llvm::Value* value) + { + assert(value->getType() == SharkType::jlong_type(), "should be"); + return create_generic(ciType::make(T_LONG), value); + } + static SharkValue* create_jfloat(llvm::Value* value) + { + assert(value->getType() == SharkType::jfloat_type(), "should be"); + return create_generic(ciType::make(T_FLOAT), value); + } + static SharkValue* create_jdouble(llvm::Value* value) + { + assert(value->getType() == SharkType::jdouble_type(), "should be"); + return create_generic(ciType::make(T_DOUBLE), value); + } + static SharkValue* create_jobject(llvm::Value* value) + { + assert(value->getType() == SharkType::jobject_type(), "should be"); + return create_generic(ciType::make(T_OBJECT), value); + } + + // Typed conversion from constants of various types public: static SharkValue* jint_constant(jint value) { @@ -139,34 +129,7 @@ class SharkValue : public ResourceObj { { return create_jobject(LLVMValue::null()); } - - // Typed conversion from LLVM values - public: - static SharkValue* create_jint(llvm::Value* value) From gbenson at redhat.com Fri Mar 13 02:44:37 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 09:44:37 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Gary Benson changeset 8ad9d28381c5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8ad9d28381c5 description: 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkEntryState): Moved from sharkFunction.cpp. (SharkPHIState): Moved from sharkTopLevelBlock.cpp. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkEntryState::SharkEntryState): Moved from sharkFunction.cpp. (SharkPHIState::SharkPHIState): Moved from sharkTopLevelBlock.cpp. (SharkPHIState::add_incoming): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkEntryState): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkPHIState): Likewise. diffstat: 5 files changed, 199 insertions(+), 172 deletions(-) ChangeLog | 15 + ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 59 ----- ports/hotspot/src/share/vm/shark/sharkState.cpp | 165 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkState.hpp | 19 + ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 113 ---------- diffs (419 lines): diff -r 4d70fcddd403 -r 8ad9d28381c5 ChangeLog --- a/ChangeLog Fri Mar 13 05:07:05 2009 -0400 +++ b/ChangeLog Fri Mar 13 05:43:37 2009 -0400 @@ -1,3 +1,18 @@ 2009-03-13 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkEntryState): Moved from sharkFunction.cpp. + (SharkPHIState): Moved from sharkTopLevelBlock.cpp. + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkEntryState::SharkEntryState): Moved from sharkFunction.cpp. + (SharkPHIState::SharkPHIState): Moved from sharkTopLevelBlock.cpp. + (SharkPHIState::add_incoming): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkEntryState): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkPHIState): Likewise. + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp diff -r 4d70fcddd403 -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Mar 13 05:07:05 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Mar 13 05:43:37 2009 -0400 @@ -29,65 +29,6 @@ #include using namespace llvm; - -class SharkEntryState : public SharkState { - public: - SharkEntryState(SharkTopLevelBlock* block, llvm::Value* method) - : SharkState(block, block->function(), method) - { - char name[18]; - - // Local variables - for (int i = 0; i < max_locals(); i++) { - ciType *type = block->local_type_at_entry(i); - - SharkValue *value = NULL; - switch (type->basic_type()) { - case T_INT: - case T_LONG: - case T_FLOAT: - case T_DOUBLE: - case T_OBJECT: - case T_ARRAY: - if (i < function()->arg_size()) { - snprintf(name, sizeof(name), "local_%d_", i); - value = SharkValue::create_generic( - type, - builder()->CreateLoad( - function()->CreateAddressOfFrameEntry( - function()->locals_slots_offset() - + max_locals() - type->size() - i, - SharkType::to_stackType(type)), - name)); - } - else { - Unimplemented(); - } - break; - - case ciTypeFlow::StateVector::T_BOTTOM: - break; - - case ciTypeFlow::StateVector::T_LONG2: - case ciTypeFlow::StateVector::T_DOUBLE2: - break; - - default: - ShouldNotReachHere(); - } - set_local(i, value); - } - - // Non-static methods have a guaranteed non-null receiver - if (!function()->target()->is_static()) { - assert(local(0)->is_jobject(), "should be"); - local(0)->set_zero_checked(true); - } - - // Expression stack - assert(!block->stack_depth_at_entry(), "entry block shouldn't have stack"); - } -}; void SharkFunction::initialize() { diff -r 4d70fcddd403 -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 05:07:05 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 05:43:37 2009 -0400 @@ -167,3 +167,168 @@ void SharkState::decache_for_trap() assert(function() && method(), "you cannot decache here"); SharkTrapDecacher(function(), block()->bci()).scan(this); } + +SharkEntryState::SharkEntryState(SharkTopLevelBlock* block, Value* method) + : SharkState(block, block->function(), method) +{ + char name[18]; + + // Local variables + for (int i = 0; i < max_locals(); i++) { + ciType *type = block->local_type_at_entry(i); + + SharkValue *value = NULL; + switch (type->basic_type()) { + case T_INT: + case T_LONG: + case T_FLOAT: + case T_DOUBLE: + case T_OBJECT: + case T_ARRAY: + if (i < function()->arg_size()) { + snprintf(name, sizeof(name), "local_%d_", i); + value = SharkValue::create_generic( + type, + builder()->CreateLoad( + function()->CreateAddressOfFrameEntry( + function()->locals_slots_offset() + + max_locals() - type->size() - i, + SharkType::to_stackType(type)), + name)); + } + else { + Unimplemented(); + } + break; + + case ciTypeFlow::StateVector::T_BOTTOM: + break; + + case ciTypeFlow::StateVector::T_LONG2: + case ciTypeFlow::StateVector::T_DOUBLE2: + break; + + default: + ShouldNotReachHere(); + } + set_local(i, value); + } + + // Non-static methods have a guaranteed non-null receiver + if (!function()->target()->is_static()) { + assert(local(0)->is_jobject(), "should be"); + local(0)->set_zero_checked(true); + } + + // Expression stack + assert(!block->stack_depth_at_entry(), "entry block shouldn't have stack"); +} + +SharkPHIState::SharkPHIState(SharkTopLevelBlock* block) + : SharkState(block, block->function()) +{ + BasicBlock *saved_insert_point = builder()->GetInsertBlock(); + builder()->SetInsertPoint(block->entry_block()); + char name[18]; + + // Method + set_method(builder()->CreatePHI(SharkType::methodOop_type(), "method")); + + // Local variables + for (int i = 0; i < max_locals(); i++) { + ciType *type = block->local_type_at_entry(i); + if (type->basic_type() == (BasicType) ciTypeFlow::StateVector::T_NULL) { + // XXX we could do all kinds of clever stuff here + type = ciType::make(T_OBJECT); // XXX what about T_ARRAY? + } + + SharkValue *value = NULL; + switch (type->basic_type()) { + case T_INT: + case T_LONG: + case T_FLOAT: + case T_DOUBLE: + case T_OBJECT: + case T_ARRAY: + snprintf(name, sizeof(name), "local_%d_", i); + value = SharkValue::create_generic( + type, builder()->CreatePHI(SharkType::to_stackType(type), name)); + break; + + case T_ADDRESS: + value = SharkValue::address_constant(type->as_return_address()->bci()); + break; + + case ciTypeFlow::StateVector::T_BOTTOM: + break; + + case ciTypeFlow::StateVector::T_LONG2: + case ciTypeFlow::StateVector::T_DOUBLE2: + break; + + default: + ShouldNotReachHere(); + } + set_local(i, value); + } + + // Expression stack + for (int i = 0; i < block->stack_depth_at_entry(); i++) { + ciType *type = block->stack_type_at_entry(i); + if (type->basic_type() == (BasicType) ciTypeFlow::StateVector::T_NULL) { + // XXX we could do all kinds of clever stuff here + type = ciType::make(T_OBJECT); // XXX what about T_ARRAY? + } + + SharkValue *value = NULL; + switch (type->basic_type()) { + case T_INT: + case T_LONG: + case T_FLOAT: + case T_DOUBLE: + case T_OBJECT: + case T_ARRAY: + snprintf(name, sizeof(name), "stack_%d_", i); + value = SharkValue::create_generic( + type, builder()->CreatePHI(SharkType::to_stackType(type), name)); + break; + + case T_ADDRESS: + value = SharkValue::address_constant(type->as_return_address()->bci()); + break; + + case ciTypeFlow::StateVector::T_LONG2: + case ciTypeFlow::StateVector::T_DOUBLE2: + break; + + default: + ShouldNotReachHere(); + } + push(value); + } + + builder()->SetInsertPoint(saved_insert_point); +} + +void SharkPHIState::add_incoming(SharkState* incoming_state) +{ + BasicBlock *predecessor = builder()->GetInsertBlock(); + + // Method + ((PHINode *) method())->addIncoming(incoming_state->method(), predecessor); + + // Local variables + for (int i = 0; i < max_locals(); i++) { + if (local(i) != NULL) + local(i)->addIncoming(incoming_state->local(i), predecessor); + } + + // Expression stack + int stack_depth = ((SharkTopLevelBlock *) block())->stack_depth_at_entry(); + assert(stack_depth == incoming_state->stack_depth(), "should be"); + for (int i = 0; i < stack_depth; i++) { + assert((stack(i) == NULL) == (incoming_state->stack(i) == NULL), "oops"); + if (stack(i)) + stack(i)->addIncoming(incoming_state->stack(i), predecessor); + } +} diff -r 4d70fcddd403 -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Mar 13 05:07:05 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Mar 13 05:43:37 2009 -0400 @@ -25,6 +25,7 @@ class SharkBlock; class SharkFunction; +class SharkTopLevelBlock; class SharkState : public ResourceObj { public: @@ -145,3 +146,21 @@ class SharkState : public ResourceObj { void cache_after_VM_call(); void decache_for_trap(); }; + +// SharkEntryState objects are used to manage the state +// that the method will be entered with. +class SharkEntryState : public SharkState { + public: + SharkEntryState(SharkTopLevelBlock* block, llvm::Value* method); +}; + +// SharkPHIState objects are used to manage the entry state +// for blocks with more than one entry path or for blocks +// entered from blocks that will be compiled later. +class SharkPHIState : public SharkState { + public: + SharkPHIState(SharkTopLevelBlock* block); + + public: + void add_incoming(SharkState* incoming_state); +}; diff -r 4d70fcddd403 -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 05:07:05 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 05:43:37 2009 -0400 @@ -28,119 +28,6 @@ using namespace llvm; -class SharkPHIState : public SharkState { - public: - SharkPHIState(SharkTopLevelBlock* block) - : SharkState(block, block->function()) - { - BasicBlock *saved_insert_point = builder()->GetInsertBlock(); - builder()->SetInsertPoint(block->entry_block()); - char name[18]; - - // Method - set_method(builder()->CreatePHI(SharkType::methodOop_type(), "method")); - - // Local variables - for (int i = 0; i < max_locals(); i++) { - ciType *type = block->local_type_at_entry(i); - if (type->basic_type() == (BasicType) ciTypeFlow::StateVector::T_NULL) { - // XXX we could do all kinds of clever stuff here - type = ciType::make(T_OBJECT); // XXX what about T_ARRAY? - } - - SharkValue *value = NULL; - switch (type->basic_type()) { - case T_INT: - case T_LONG: - case T_FLOAT: - case T_DOUBLE: - case T_OBJECT: - case T_ARRAY: - snprintf(name, sizeof(name), "local_%d_", i); - value = SharkValue::create_generic( - type, builder()->CreatePHI(SharkType::to_stackType(type), name)); - break; - - case T_ADDRESS: - value = SharkValue::address_constant(type->as_return_address()->bci()); - break; - - case ciTypeFlow::StateVector::T_BOTTOM: - break; - - case ciTypeFlow::StateVector::T_LONG2: - case ciTypeFlow::StateVector::T_DOUBLE2: - break; - - default: - ShouldNotReachHere(); - } - set_local(i, value); - } - - // Expression stack - for (int i = 0; i < block->stack_depth_at_entry(); i++) { - ciType *type = block->stack_type_at_entry(i); - if (type->basic_type() == (BasicType) ciTypeFlow::StateVector::T_NULL) { - // XXX we could do all kinds of clever stuff here - type = ciType::make(T_OBJECT); // XXX what about T_ARRAY? - } - - SharkValue *value = NULL; - switch (type->basic_type()) { - case T_INT: - case T_LONG: - case T_FLOAT: - case T_DOUBLE: - case T_OBJECT: - case T_ARRAY: - snprintf(name, sizeof(name), "stack_%d_", i); - value = SharkValue::create_generic( - type, builder()->CreatePHI(SharkType::to_stackType(type), name)); - break; - - case T_ADDRESS: - value = SharkValue::address_constant(type->as_return_address()->bci()); - break; - - case ciTypeFlow::StateVector::T_LONG2: - case ciTypeFlow::StateVector::T_DOUBLE2: - break; - - default: - ShouldNotReachHere(); - } - push(value); - } - - builder()->SetInsertPoint(saved_insert_point); - } - - public: - void add_incoming(SharkState* incoming_state) - { - BasicBlock *predecessor = builder()->GetInsertBlock(); - - // Method - ((PHINode *) method())->addIncoming(incoming_state->method(), predecessor); - - // Local variables - for (int i = 0; i < max_locals(); i++) { - if (local(i) != NULL) - local(i)->addIncoming(incoming_state->local(i), predecessor); - } - - // Expression stack - int stack_depth = ((SharkTopLevelBlock *) block())->stack_depth_at_entry(); - assert(stack_depth == incoming_state->stack_depth(), "should be"); - for (int i = 0; i < stack_depth; i++) { - assert((stack(i) == NULL) == (incoming_state->stack(i) == NULL), "oops"); - if (stack(i)) - stack(i)->addIncoming(incoming_state->stack(i), predecessor); - } - } -}; - int SharkTopLevelBlock::scan_for_traps() { // If typeflow got one then we're already done From gbenson at redhat.com Fri Mar 13 04:42:11 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 11:42:11 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Gary Benson changeset 3ef3b5ede304 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3ef3b5ede304 description: 2009-03-13 Gary Benson PR icedtea/296: * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_branch): New method, to handle state propagation for blocks with one successor. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::emit_IR): Move state propagation to the individual instructions. (SharkTopLevelBlock::do_branch): New method, to handle state propagation for blocks with one successor. (SharkTopLevelBlock::do_goto): Use do_branch. (SharkTopLevelBlock::do_jsr): Likewise. (SharkTopLevelBlock::do_ret): Likewise. (SharkTopLevelBlock::do_if): Add state propagation. (SharkTopLevelBlock::do_switch): Copy the state for all cases except the default. (SharkTopLevelBlock::handle_exception): Copy the state for all cases except the default (ie catch all/no handler). (SharkTopLevelBlock::add_incoming): Fix up assertion. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState::equal_to): New method. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::equal_to): Likewise. (SharkState::initialize): Clone values in locals and stack rather than simply copying the pointers. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkValue::clone): New method. (SharkValue::equal_to): Likewise. (SharkNormalValue::clone): Likewise. (SharkNormalValue::equal_to): Likewise. (SharkAddressValue::clone): Likewise. (SharkAddressValue::equal_to): Likewise. (SharkValue::create_generic): Add a zero_checked argument. (SharkNormalValue::SharkNormalValue): Likewise. * ports/hotspot/src/share/vm/shark/sharkValue.cpp (SharkValue::clone): New method. (SharkValue::equal_to): Likewise. (SharkNormalValue::clone): Likewise. (SharkNormalValue::equal_to): Likewise. (SharkAddressValue::clone): Likewise. (SharkAddressValue::equal_to): Likewise. diffstat: 7 files changed, 221 insertions(+), 46 deletions(-) ChangeLog | 45 +++++++ ports/hotspot/src/share/vm/shark/sharkState.cpp | 85 +++++++++++++-- ports/hotspot/src/share/vm/shark/sharkState.hpp | 5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 65 ++++++----- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkValue.cpp | 28 ++++ ports/hotspot/src/share/vm/shark/sharkValue.hpp | 38 +++++- diffs (441 lines): diff -r 8ad9d28381c5 -r 3ef3b5ede304 ChangeLog --- a/ChangeLog Fri Mar 13 05:43:37 2009 -0400 +++ b/ChangeLog Fri Mar 13 07:41:08 2009 -0400 @@ -1,3 +1,48 @@ 2009-03-13 Gary Benson + + PR icedtea/296: + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_branch): New method, to handle + state propagation for blocks with one successor. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::emit_IR): Move state propagation to + the individual instructions. + (SharkTopLevelBlock::do_branch): New method, to handle + state propagation for blocks with one successor. + (SharkTopLevelBlock::do_goto): Use do_branch. + (SharkTopLevelBlock::do_jsr): Likewise. + (SharkTopLevelBlock::do_ret): Likewise. + (SharkTopLevelBlock::do_if): Add state propagation. + (SharkTopLevelBlock::do_switch): Copy the state for all + cases except the default. + (SharkTopLevelBlock::handle_exception): Copy the state for + all cases except the default (ie catch all/no handler). + (SharkTopLevelBlock::add_incoming): Fix up assertion. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::equal_to): New method. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::equal_to): Likewise. + (SharkState::initialize): Clone values in locals and stack + rather than simply copying the pointers. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::clone): New method. + (SharkValue::equal_to): Likewise. + (SharkNormalValue::clone): Likewise. + (SharkNormalValue::equal_to): Likewise. + (SharkAddressValue::clone): Likewise. + (SharkAddressValue::equal_to): Likewise. + (SharkValue::create_generic): Add a zero_checked argument. + (SharkNormalValue::SharkNormalValue): Likewise. + * ports/hotspot/src/share/vm/shark/sharkValue.cpp + (SharkValue::clone): New method. + (SharkValue::equal_to): Likewise. + (SharkNormalValue::clone): Likewise. + (SharkNormalValue::equal_to): Likewise. + (SharkAddressValue::clone): Likewise. + (SharkAddressValue::equal_to): Likewise. + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.hpp diff -r 8ad9d28381c5 -r 3ef3b5ede304 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 07:41:08 2009 -0400 @@ -51,18 +51,81 @@ void SharkState::initialize(const SharkS _locals = NEW_RESOURCE_ARRAY(SharkValue*, max_locals()); _stack = NEW_RESOURCE_ARRAY(SharkValue*, max_stack()); + NOT_PRODUCT(memset(_locals, 23, max_locals() * sizeof(SharkValue *))); + NOT_PRODUCT(memset(_stack, 23, max_stack() * sizeof(SharkValue *))); + _sp = _stack; + if (state) { - memcpy(_locals, state->_locals, max_locals() * sizeof(SharkValue *)); - memcpy(_stack, state->_stack, max_stack() * sizeof(SharkValue *)); - _sp = _stack + state->stack_depth(); - } - else { - _sp = _stack; - - NOT_PRODUCT(memset(_locals, 23, max_locals() * sizeof(SharkValue *))); - NOT_PRODUCT(memset(_stack, 23, max_stack() * sizeof(SharkValue *))); - } -} + for (int i = 0; i < max_locals(); i++) { + SharkValue *value = state->local(i); + if (value) + value = value->clone(); + set_local(i, value); + } + + for (int i = state->stack_depth() - 1; i >= 0; i--) { + SharkValue *value = state->stack(i); + if (value) + value = value->clone(); + push(value); + } + } +} + +bool SharkState::equal_to(SharkState *other) +{ + if (block() != other->block()) + return false; + + if (function() != other->function()) + return false; + + if (method() != other->method()) + return false; + + if (max_locals() != other->max_locals()) + return false; + + if (stack_depth() != other->stack_depth()) + return false; + + for (int i = 0; i < max_locals(); i++) { + SharkValue *value = local(i); + SharkValue *other_value = other->local(i); + + if (value == NULL) { + if (other_value != NULL) + return false; + } + else { + if (other_value == NULL) + return false; + + if (!value->equal_to(other_value)) + return false; + } + } + + for (int i = 0; i < stack_depth(); i++) { + SharkValue *value = stack(i); + SharkValue *other_value = other->stack(i); + + if (value == NULL) { + if (other_value != NULL) + return false; + } + else { + if (other_value == NULL) + return false; + + if (!value->equal_to(other_value)) + return false; + } + } + + return true; +} + void SharkState::merge(SharkState* other, BasicBlock* other_block, BasicBlock* this_block) diff -r 8ad9d28381c5 -r 3ef3b5ede304 ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Mar 13 07:41:08 2009 -0400 @@ -70,6 +70,7 @@ class SharkState : public ResourceObj { { return _method; } + protected: void set_method(llvm::Value* method) { _method = method; @@ -128,6 +129,10 @@ class SharkState : public ResourceObj { _sp -= slots; } + // Comparison + public: + bool equal_to(SharkState* other); + // Copy and merge public: SharkState* copy() const diff -r 8ad9d28381c5 -r 3ef3b5ede304 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 07:41:08 2009 -0400 @@ -135,9 +135,11 @@ void SharkTopLevelBlock::add_incoming(Sh if (needs_phis()) { ((SharkPHIState *) entry_state())->add_incoming(incoming_state); } - else if (_entry_state != incoming_state) { - assert(_entry_state == NULL, "should be"); + else if (_entry_state == NULL) { _entry_state = incoming_state; + } + else { + assert(entry_state()->equal_to(incoming_state), "should be"); } } @@ -231,21 +233,8 @@ void SharkTopLevelBlock::emit_IR() // If this block falls through to the next then it won't have been // terminated by a bytecode and we have to add the branch ourselves - if (falls_through()) { - builder()->CreateBr(successor(ciTypeFlow::FALL_THROUGH)->entry_block()); - } - - // Process the successor states if not already done - switch (bc()) { - case Bytecodes::_tableswitch: - case Bytecodes::_lookupswitch: - // done by do_switch() - break; - - default: - for (int i = 0; i < num_successors(); i++) - successor(i)->add_incoming(current_state()); - } + if (falls_through()) + do_branch(ciTypeFlow::FALL_THROUGH); } SharkTopLevelBlock* SharkTopLevelBlock::bci_successor(int bci) const @@ -413,7 +402,7 @@ void SharkTopLevelBlock::handle_exceptio LLVMValue::jint_constant(i), handler->entry_block()); - handler->add_incoming(current_state()); + handler->add_incoming(current_state()->copy()); } builder()->SetInsertPoint(no_handler); @@ -768,23 +757,38 @@ void SharkTopLevelBlock::do_athrow() void SharkTopLevelBlock::do_goto() { - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_branch(ciTypeFlow::GOTO_TARGET); } void SharkTopLevelBlock::do_jsr() { push(SharkValue::address_constant(iter()->next_bci())); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_branch(ciTypeFlow::GOTO_TARGET); } void SharkTopLevelBlock::do_ret() { assert(local(iter()->get_index())->address_value() == successor(ciTypeFlow::GOTO_TARGET)->start(), "should be"); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); -} - -void SharkTopLevelBlock::do_if(ICmpInst::Predicate p, SharkValue *b, SharkValue *a) + do_branch(ciTypeFlow::GOTO_TARGET); +} + +// All propagation of state from one block to the next (via +// dest->add_incoming) is handled by the next three methods +// (do_branch, do_if and do_switch) and by handle_exception. +// Where control flow forks, each successor must have its +// own copy of the state. + +void SharkTopLevelBlock::do_branch(int successor_index) +{ + SharkTopLevelBlock *dest = successor(successor_index); + builder()->CreateBr(dest->entry_block()); + dest->add_incoming(current_state()); +} + +void SharkTopLevelBlock::do_if(ICmpInst::Predicate p, + SharkValue* b, + SharkValue* a) { Value *llvm_a, *llvm_b; if (a->is_jobject()) { @@ -795,11 +799,16 @@ void SharkTopLevelBlock::do_if(ICmpInst: llvm_a = a->jint_value(); llvm_b = b->jint_value(); } - + + SharkTopLevelBlock *if_taken = successor(ciTypeFlow::IF_TAKEN); + SharkTopLevelBlock *not_taken = successor(ciTypeFlow::IF_NOT_TAKEN); + builder()->CreateCondBr( builder()->CreateICmp(p, llvm_a, llvm_b), - successor(ciTypeFlow::IF_TAKEN)->entry_block(), - successor(ciTypeFlow::IF_NOT_TAKEN)->entry_block()); + if_taken->entry_block(), not_taken->entry_block()); + + if_taken->add_incoming(current_state()); + not_taken->add_incoming(current_state()->copy()); } void SharkTopLevelBlock::do_switch() @@ -818,7 +827,7 @@ void SharkTopLevelBlock::do_switch() switchinst->addCase( LLVMValue::jint_constant(switch_key(i)), dest_block->entry_block()); - dest_block->add_incoming(current_state()); + dest_block->add_incoming(current_state()->copy()); } } } diff -r 8ad9d28381c5 -r 3ef3b5ede304 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Mar 13 07:41:08 2009 -0400 @@ -188,6 +188,7 @@ class SharkTopLevelBlock : public SharkB void do_zero_check(SharkValue* value); llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); + void do_branch(int successor_index); // VM calls private: diff -r 8ad9d28381c5 -r 3ef3b5ede304 ports/hotspot/src/share/vm/shark/sharkValue.cpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.cpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.cpp Fri Mar 13 07:41:08 2009 -0400 @@ -28,6 +28,30 @@ using namespace llvm; +// Cloning + +SharkValue* SharkNormalValue::clone() const +{ + return SharkValue::create_generic(type(), generic_value(), zero_checked()); +} +SharkValue* SharkAddressValue::clone() const +{ + return SharkValue::address_constant(address_value()); +} + +// Comparison + +bool SharkNormalValue::equal_to(SharkValue *other) const +{ + return (this->type() == other->type() && + this->generic_value() == other->generic_value() && + this->zero_checked() == other->zero_checked()); +} +bool SharkAddressValue::equal_to(SharkValue *other) const +{ + return (this->address_value() == other->address_value()); +} + // Type access ciType* SharkValue::type() const @@ -189,7 +213,7 @@ Value* SharkNormalValue::generic_value() } Value* SharkAddressValue::generic_value() const { - return LLVMValue::intptr_constant(_bci); + return LLVMValue::intptr_constant(address_value()); } Value* SharkValue::intptr_value(SharkBuilder* builder) const @@ -211,7 +235,7 @@ void SharkNormalValue::addIncoming(Shark } void SharkAddressValue::addIncoming(SharkValue *value, BasicBlock* block) { - assert(_bci == value->address_value(), "should be"); + assert(this->equal_to(value), "should be"); } // Repeated null and divide-by-zero check removal diff -r 8ad9d28381c5 -r 3ef3b5ede304 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 07:41:08 2009 -0400 @@ -38,6 +38,14 @@ class SharkValue : public ResourceObj { class SharkValue : public ResourceObj { protected: SharkValue() {} + + // Cloning + public: + virtual SharkValue* clone() const = 0; + + // Comparison + public: + virtual bool equal_to(SharkValue* other) const = 0; // Type access public: @@ -175,7 +183,9 @@ class SharkValue : public ResourceObj { virtual llvm::Value* generic_value() const = 0; virtual llvm::Value* intptr_value(SharkBuilder* builder) const; - static inline SharkValue* create_generic(ciType* type, llvm::Value* value); + static inline SharkValue* create_generic(ciType* type, + llvm::Value* value, + bool zero_checked = false); // Phi-style stuff public: @@ -191,8 +201,8 @@ class SharkNormalValue : public SharkVal friend class SharkValue; protected: - SharkNormalValue(ciType* type, llvm::Value* value) - : _type(type), _llvm_value(value), _zero_checked(false) {} + SharkNormalValue(ciType* type, llvm::Value* value, bool zero_checked) + : _type(type), _llvm_value(value), _zero_checked(zero_checked) {} private: ciType* _type; @@ -204,6 +214,14 @@ class SharkNormalValue : public SharkVal { return _llvm_value; } + + // Cloning + public: + SharkValue* clone() const; + + // Comparison + public: + bool equal_to(SharkValue* other) const; // Type access public: @@ -243,9 +261,11 @@ class SharkNormalValue : public SharkVal void set_zero_checked(bool zero_checked); }; -inline SharkValue* SharkValue::create_generic(ciType* type, llvm::Value* value) +inline SharkValue* SharkValue::create_generic(ciType* type, + llvm::Value* value, + bool zero_checked) { - return new SharkNormalValue(type, value); + return new SharkNormalValue(type, value, zero_checked); } class SharkAddressValue : public SharkValue { @@ -257,6 +277,14 @@ class SharkAddressValue : public SharkVa private: int _bci; + + // Cloning + public: + SharkValue* clone() const; + + // Comparison + public: + bool equal_to(SharkValue* other) const; // Type access public: From gbenson at redhat.com Fri Mar 13 04:46:26 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 11:46:26 +0000 Subject: Shark zero-check elimination bugfix Message-ID: <20090313114626.GA3241@redhat.com> Hi all, Shark's zero-check elimination code had a bug where checks could be falsely omitted. This patch fixes. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 8ad9d28381c5 ChangeLog --- a/ChangeLog Fri Mar 13 05:43:37 2009 -0400 +++ b/ChangeLog Fri Mar 13 07:40:54 2009 -0400 @@ -1,3 +1,48 @@ +2009-03-13 Gary Benson + + PR icedtea/296: + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_branch): New method, to handle + state propagation for blocks with one successor. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::emit_IR): Move state propagation to + the individual instructions. + (SharkTopLevelBlock::do_branch): New method, to handle + state propagation for blocks with one successor. + (SharkTopLevelBlock::do_goto): Use do_branch. + (SharkTopLevelBlock::do_jsr): Likewise. + (SharkTopLevelBlock::do_ret): Likewise. + (SharkTopLevelBlock::do_if): Add state propagation. + (SharkTopLevelBlock::do_switch): Copy the state for all + cases except the default. + (SharkTopLevelBlock::handle_exception): Copy the state for + all cases except the default (ie catch all/no handler). + (SharkTopLevelBlock::add_incoming): Fix up assertion. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::equal_to): New method. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::equal_to): Likewise. + (SharkState::initialize): Clone values in locals and stack + rather than simply copying the pointers. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::clone): New method. + (SharkValue::equal_to): Likewise. + (SharkNormalValue::clone): Likewise. + (SharkNormalValue::equal_to): Likewise. + (SharkAddressValue::clone): Likewise. + (SharkAddressValue::equal_to): Likewise. + (SharkValue::create_generic): Add a zero_checked argument. + (SharkNormalValue::SharkNormalValue): Likewise. + * ports/hotspot/src/share/vm/shark/sharkValue.cpp + (SharkValue::clone): New method. + (SharkValue::equal_to): Likewise. + (SharkNormalValue::clone): Likewise. + (SharkNormalValue::equal_to): Likewise. + (SharkAddressValue::clone): Likewise. + (SharkAddressValue::equal_to): Likewise. + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.hpp diff -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 07:40:54 2009 -0400 @@ -51,18 +51,81 @@ _locals = NEW_RESOURCE_ARRAY(SharkValue*, max_locals()); _stack = NEW_RESOURCE_ARRAY(SharkValue*, max_stack()); + NOT_PRODUCT(memset(_locals, 23, max_locals() * sizeof(SharkValue *))); + NOT_PRODUCT(memset(_stack, 23, max_stack() * sizeof(SharkValue *))); + _sp = _stack; + if (state) { - memcpy(_locals, state->_locals, max_locals() * sizeof(SharkValue *)); - memcpy(_stack, state->_stack, max_stack() * sizeof(SharkValue *)); - _sp = _stack + state->stack_depth(); + for (int i = 0; i < max_locals(); i++) { + SharkValue *value = state->local(i); + if (value) + value = value->clone(); + set_local(i, value); + } + + for (int i = state->stack_depth() - 1; i >= 0; i--) { + SharkValue *value = state->stack(i); + if (value) + value = value->clone(); + push(value); + } + } +} + +bool SharkState::equal_to(SharkState *other) +{ + if (block() != other->block()) + return false; + + if (function() != other->function()) + return false; + + if (method() != other->method()) + return false; + + if (max_locals() != other->max_locals()) + return false; + + if (stack_depth() != other->stack_depth()) + return false; + + for (int i = 0; i < max_locals(); i++) { + SharkValue *value = local(i); + SharkValue *other_value = other->local(i); + + if (value == NULL) { + if (other_value != NULL) + return false; + } + else { + if (other_value == NULL) + return false; + + if (!value->equal_to(other_value)) + return false; + } } - else { - _sp = _stack; - NOT_PRODUCT(memset(_locals, 23, max_locals() * sizeof(SharkValue *))); - NOT_PRODUCT(memset(_stack, 23, max_stack() * sizeof(SharkValue *))); + for (int i = 0; i < stack_depth(); i++) { + SharkValue *value = stack(i); + SharkValue *other_value = other->stack(i); + + if (value == NULL) { + if (other_value != NULL) + return false; + } + else { + if (other_value == NULL) + return false; + + if (!value->equal_to(other_value)) + return false; + } } + + return true; } + void SharkState::merge(SharkState* other, BasicBlock* other_block, BasicBlock* this_block) diff -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Mar 13 07:40:54 2009 -0400 @@ -70,6 +70,7 @@ { return _method; } + protected: void set_method(llvm::Value* method) { _method = method; @@ -128,6 +129,10 @@ _sp -= slots; } + // Comparison + public: + bool equal_to(SharkState* other); + // Copy and merge public: SharkState* copy() const diff -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 07:40:54 2009 -0400 @@ -135,9 +135,11 @@ if (needs_phis()) { ((SharkPHIState *) entry_state())->add_incoming(incoming_state); } - else if (_entry_state != incoming_state) { - assert(_entry_state == NULL, "should be"); + else if (_entry_state == NULL) { _entry_state = incoming_state; + } + else { + assert(entry_state()->equal_to(incoming_state), "should be"); } } @@ -231,21 +233,8 @@ // If this block falls through to the next then it won't have been // terminated by a bytecode and we have to add the branch ourselves - if (falls_through()) { - builder()->CreateBr(successor(ciTypeFlow::FALL_THROUGH)->entry_block()); - } - - // Process the successor states if not already done - switch (bc()) { - case Bytecodes::_tableswitch: - case Bytecodes::_lookupswitch: - // done by do_switch() - break; - - default: - for (int i = 0; i < num_successors(); i++) - successor(i)->add_incoming(current_state()); - } + if (falls_through()) + do_branch(ciTypeFlow::FALL_THROUGH); } SharkTopLevelBlock* SharkTopLevelBlock::bci_successor(int bci) const @@ -413,7 +402,7 @@ LLVMValue::jint_constant(i), handler->entry_block()); - handler->add_incoming(current_state()); + handler->add_incoming(current_state()->copy()); } builder()->SetInsertPoint(no_handler); @@ -768,23 +757,38 @@ void SharkTopLevelBlock::do_goto() { - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_branch(ciTypeFlow::GOTO_TARGET); } void SharkTopLevelBlock::do_jsr() { push(SharkValue::address_constant(iter()->next_bci())); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_branch(ciTypeFlow::GOTO_TARGET); } void SharkTopLevelBlock::do_ret() { assert(local(iter()->get_index())->address_value() == successor(ciTypeFlow::GOTO_TARGET)->start(), "should be"); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_branch(ciTypeFlow::GOTO_TARGET); } - -void SharkTopLevelBlock::do_if(ICmpInst::Predicate p, SharkValue *b, SharkValue *a) + +// All propagation of state from one block to the next (via +// dest->add_incoming) is handled by the next three methods +// (do_branch, do_if and do_switch) and by handle_exception. +// Where control flow forks, each successor must have its +// own copy of the state. + +void SharkTopLevelBlock::do_branch(int successor_index) +{ + SharkTopLevelBlock *dest = successor(successor_index); + builder()->CreateBr(dest->entry_block()); + dest->add_incoming(current_state()); +} + +void SharkTopLevelBlock::do_if(ICmpInst::Predicate p, + SharkValue* b, + SharkValue* a) { Value *llvm_a, *llvm_b; if (a->is_jobject()) { @@ -795,11 +799,16 @@ llvm_a = a->jint_value(); llvm_b = b->jint_value(); } - + + SharkTopLevelBlock *if_taken = successor(ciTypeFlow::IF_TAKEN); + SharkTopLevelBlock *not_taken = successor(ciTypeFlow::IF_NOT_TAKEN); + builder()->CreateCondBr( builder()->CreateICmp(p, llvm_a, llvm_b), - successor(ciTypeFlow::IF_TAKEN)->entry_block(), - successor(ciTypeFlow::IF_NOT_TAKEN)->entry_block()); + if_taken->entry_block(), not_taken->entry_block()); + + if_taken->add_incoming(current_state()); + not_taken->add_incoming(current_state()->copy()); } void SharkTopLevelBlock::do_switch() @@ -818,7 +827,7 @@ switchinst->addCase( LLVMValue::jint_constant(switch_key(i)), dest_block->entry_block()); - dest_block->add_incoming(current_state()); + dest_block->add_incoming(current_state()->copy()); } } } diff -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Mar 13 07:40:54 2009 -0400 @@ -188,6 +188,7 @@ void do_zero_check(SharkValue* value); llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); + void do_branch(int successor_index); // VM calls private: diff -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkValue.cpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.cpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.cpp Fri Mar 13 07:40:54 2009 -0400 @@ -27,6 +27,30 @@ #include "incls/_sharkValue.cpp.incl" using namespace llvm; + +// Cloning + +SharkValue* SharkNormalValue::clone() const +{ + return SharkValue::create_generic(type(), generic_value(), zero_checked()); +} +SharkValue* SharkAddressValue::clone() const +{ + return SharkValue::address_constant(address_value()); +} + +// Comparison + +bool SharkNormalValue::equal_to(SharkValue *other) const +{ + return (this->type() == other->type() && + this->generic_value() == other->generic_value() && + this->zero_checked() == other->zero_checked()); +} +bool SharkAddressValue::equal_to(SharkValue *other) const +{ + return (this->address_value() == other->address_value()); +} // Type access @@ -189,7 +213,7 @@ } Value* SharkAddressValue::generic_value() const { - return LLVMValue::intptr_constant(_bci); + return LLVMValue::intptr_constant(address_value()); } Value* SharkValue::intptr_value(SharkBuilder* builder) const @@ -211,7 +235,7 @@ } void SharkAddressValue::addIncoming(SharkValue *value, BasicBlock* block) { - assert(_bci == value->address_value(), "should be"); + assert(this->equal_to(value), "should be"); } // Repeated null and divide-by-zero check removal diff -r 8ad9d28381c5 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 05:43:37 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 07:40:54 2009 -0400 @@ -38,6 +38,14 @@ class SharkValue : public ResourceObj { protected: SharkValue() {} + + // Cloning + public: + virtual SharkValue* clone() const = 0; + + // Comparison + public: + virtual bool equal_to(SharkValue* other) const = 0; // Type access public: @@ -175,7 +183,9 @@ virtual llvm::Value* generic_value() const = 0; virtual llvm::Value* intptr_value(SharkBuilder* builder) const; - static inline SharkValue* create_generic(ciType* type, llvm::Value* value); + static inline SharkValue* create_generic(ciType* type, + llvm::Value* value, + bool zero_checked = false); // Phi-style stuff public: @@ -191,8 +201,8 @@ friend class SharkValue; protected: - SharkNormalValue(ciType* type, llvm::Value* value) - : _type(type), _llvm_value(value), _zero_checked(false) {} + SharkNormalValue(ciType* type, llvm::Value* value, bool zero_checked) + : _type(type), _llvm_value(value), _zero_checked(zero_checked) {} private: ciType* _type; @@ -204,6 +214,14 @@ { return _llvm_value; } + + // Cloning + public: + SharkValue* clone() const; + + // Comparison + public: + bool equal_to(SharkValue* other) const; // Type access public: @@ -243,9 +261,11 @@ void set_zero_checked(bool zero_checked); }; -inline SharkValue* SharkValue::create_generic(ciType* type, llvm::Value* value) +inline SharkValue* SharkValue::create_generic(ciType* type, + llvm::Value* value, + bool zero_checked) { - return new SharkNormalValue(type, value); + return new SharkNormalValue(type, value, zero_checked); } class SharkAddressValue : public SharkValue { @@ -257,6 +277,14 @@ private: int _bci; + + // Cloning + public: + SharkValue* clone() const; + + // Comparison + public: + bool equal_to(SharkValue* other) const; // Type access public: From gbenson at redhat.com Fri Mar 13 06:40:48 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 13:40:48 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Gary Benson changeset 5a1daec06e6d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5a1daec06e6d description: 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlinerHelper::is_inlinable): An ior or lor of two known non-zero values creates a known non-zero value. diffstat: 2 files changed, 22 insertions(+), 8 deletions(-) ChangeLog | 6 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 24 ++++++++++++++------- diffs (62 lines): diff -r 3ef3b5ede304 -r 5a1daec06e6d ChangeLog --- a/ChangeLog Fri Mar 13 07:41:08 2009 -0400 +++ b/ChangeLog Fri Mar 13 09:39:47 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-13 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::is_inlinable): An ior or lor of two + known non-zero values creates a known non-zero value. + 2009-03-13 Gary Benson PR icedtea/296: diff -r 3ef3b5ede304 -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Fri Mar 13 07:41:08 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Fri Mar 13 09:39:47 2009 -0400 @@ -513,7 +513,6 @@ bool SharkInlinerHelper::is_inlinable() case Bytecodes::_isub: case Bytecodes::_imul: case Bytecodes::_iand: - case Bytecodes::_ior: case Bytecodes::_ixor: case Bytecodes::_ishl: case Bytecodes::_ishr: @@ -521,6 +520,11 @@ bool SharkInlinerHelper::is_inlinable() pop(); pop(); push(false); + break; + case Bytecodes::_ior: + a = pop(); + b = pop(); + push(a && b); break; case Bytecodes::_idiv: case Bytecodes::_irem: @@ -536,14 +540,18 @@ bool SharkInlinerHelper::is_inlinable() case Bytecodes::_lsub: case Bytecodes::_lmul: case Bytecodes::_land: + case Bytecodes::_lxor: + pop(); + pop(); + pop(); + pop(); + push(false); + push(false); + break; case Bytecodes::_lor: - case Bytecodes::_lxor: - pop(); - pop(); - pop(); - pop(); - push(false); - push(false); + a = pop(); + b = pop(); + push(a && b); break; case Bytecodes::_ldiv: case Bytecodes::_lrem: From gbenson at redhat.com Fri Mar 13 06:56:23 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 13:56:23 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Gary Benson changeset 96d1de001c8d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=96d1de001c8d description: 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkValue::create_generic): Make zero_checked argument mandatory. (SharkValue::create_jint): Fixups for the above. (SharkValue::create_jlong): Likewise. (SharkValue::create_jfloat): Likewise. (SharkValue::create_jdouble): Likewise. (SharkValue::create_jobject): Likewise. (SharkValue::jint_constant): Likewise. (SharkValue::jlong_constant): Likewise. (SharkValue::null): Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::merge): Likewise. (SharkState::cache_after_Java_call): Likewise. (SharkEntryState::SharkEntryState): Likewise. (SharkPHIState::SharkPHIState): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::do_ldc): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Likewise. (SharkBlock::do_div_or_rem): Likewise. (SharkBlock::do_field_access): Likewise. (SharkBlock::do_lcmp): Likewise. (SharkBlock::do_fcmp): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::handle_exception): Likewise. (SharkTopLevelBlock::do_arraylength): Likewise. (SharkTopLevelBlock::do_aload): Likewise. (SharkTopLevelBlock::do_instance_check): Likewise. (SharkTopLevelBlock::do_new): Likewise. (SharkTopLevelBlock::do_newarray): Likewise. (SharkTopLevelBlock::do_anewarray): Likewise. (SharkTopLevelBlock::do_multianewarray): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkCacher::process_stack_slot): Likewise. (SharkCacher::process_local_slot): Likewise. * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp (SharkIntrinsics::do_Math_minmax): Likewise. (SharkIntrinsics::do_Object_getClass): Likewise. (SharkIntrinsics::do_System_currentTimeMillis): Likewise. (SharkIntrinsics::do_Thread_currentThread): Likewise. (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. diffstat: 8 files changed, 163 insertions(+), 119 deletions(-) ChangeLog | 44 +++++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 73 +++++++-------- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 2 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 12 +- ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp | 51 +++++----- ports/hotspot/src/share/vm/shark/sharkState.cpp | 29 +++-- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 37 +++---- ports/hotspot/src/share/vm/shark/sharkValue.hpp | 34 ++---- diffs (truncated from 748 to 500 lines): diff -r 5a1daec06e6d -r 96d1de001c8d ChangeLog --- a/ChangeLog Fri Mar 13 09:39:47 2009 -0400 +++ b/ChangeLog Fri Mar 13 09:55:22 2009 -0400 @@ -1,3 +1,47 @@ 2009-03-13 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::create_generic): Make zero_checked argument mandatory. + (SharkValue::create_jint): Fixups for the above. + (SharkValue::create_jlong): Likewise. + (SharkValue::create_jfloat): Likewise. + (SharkValue::create_jdouble): Likewise. + (SharkValue::create_jobject): Likewise. + (SharkValue::jint_constant): Likewise. + (SharkValue::jlong_constant): Likewise. + (SharkValue::null): Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::merge): Likewise. + (SharkState::cache_after_Java_call): Likewise. + (SharkEntryState::SharkEntryState): Likewise. + (SharkPHIState::SharkPHIState): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::do_ldc): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Likewise. + (SharkBlock::do_div_or_rem): Likewise. + (SharkBlock::do_field_access): Likewise. + (SharkBlock::do_lcmp): Likewise. + (SharkBlock::do_fcmp): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::do_arraylength): Likewise. + (SharkTopLevelBlock::do_aload): Likewise. + (SharkTopLevelBlock::do_instance_check): Likewise. + (SharkTopLevelBlock::do_new): Likewise. + (SharkTopLevelBlock::do_newarray): Likewise. + (SharkTopLevelBlock::do_anewarray): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkCacher::process_stack_slot): Likewise. + (SharkCacher::process_local_slot): Likewise. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp + (SharkIntrinsics::do_Math_minmax): Likewise. + (SharkIntrinsics::do_Object_getClass): Likewise. + (SharkIntrinsics::do_System_currentTimeMillis): Likewise. + (SharkIntrinsics::do_Thread_currentThread): Likewise. + (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp diff -r 5a1daec06e6d -r 96d1de001c8d ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Mar 13 09:55:22 2009 -0400 @@ -369,19 +369,19 @@ void SharkBlock::parse_bytecode(int star b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateAdd(a->jint_value(), b->jint_value()))); + builder()->CreateAdd(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_isub: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateSub(a->jint_value(), b->jint_value()))); + builder()->CreateSub(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_imul: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateMul(a->jint_value(), b->jint_value()))); + builder()->CreateMul(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_idiv: do_idiv(); @@ -392,7 +392,7 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_ineg: a = pop(); push(SharkValue::create_jint( - builder()->CreateNeg(a->jint_value()))); + builder()->CreateNeg(a->jint_value()), a->zero_checked())); break; case Bytecodes::_ishl: b = pop(); @@ -401,7 +401,7 @@ void SharkBlock::parse_bytecode(int star builder()->CreateShl( a->jint_value(), builder()->CreateAnd( - b->jint_value(), LLVMValue::jint_constant(0x1f))))); + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); break; case Bytecodes::_ishr: b = pop(); @@ -410,7 +410,7 @@ void SharkBlock::parse_bytecode(int star builder()->CreateAShr( a->jint_value(), builder()->CreateAnd( - b->jint_value(), LLVMValue::jint_constant(0x1f))))); + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); break; case Bytecodes::_iushr: b = pop(); @@ -419,44 +419,45 @@ void SharkBlock::parse_bytecode(int star builder()->CreateLShr( a->jint_value(), builder()->CreateAnd( - b->jint_value(), LLVMValue::jint_constant(0x1f))))); + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); break; case Bytecodes::_iand: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateAnd(a->jint_value(), b->jint_value()))); + builder()->CreateAnd(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_ior: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateOr(a->jint_value(), b->jint_value()))); + builder()->CreateOr(a->jint_value(), b->jint_value()), + a->zero_checked() && b->zero_checked())); break; case Bytecodes::_ixor: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateXor(a->jint_value(), b->jint_value()))); + builder()->CreateXor(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_ladd: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateAdd(a->jlong_value(), b->jlong_value()))); + builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_lsub: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateSub(a->jlong_value(), b->jlong_value()))); + builder()->CreateSub(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_lmul: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateMul(a->jlong_value(), b->jlong_value()))); + builder()->CreateMul(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_ldiv: do_ldiv(); @@ -467,7 +468,7 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_lneg: a = pop(); push(SharkValue::create_jlong( - builder()->CreateNeg(a->jlong_value()))); + builder()->CreateNeg(a->jlong_value()), a->zero_checked())); break; case Bytecodes::_lshl: b = pop(); @@ -478,7 +479,7 @@ void SharkBlock::parse_bytecode(int star builder()->CreateIntCast( builder()->CreateAnd( b->jint_value(), LLVMValue::jint_constant(0x3f)), - SharkType::jlong_type(), true)))); + SharkType::jlong_type(), true)), false)); break; case Bytecodes::_lshr: b = pop(); @@ -489,7 +490,7 @@ void SharkBlock::parse_bytecode(int star builder()->CreateIntCast( builder()->CreateAnd( b->jint_value(), LLVMValue::jint_constant(0x3f)), - SharkType::jlong_type(), true)))); + SharkType::jlong_type(), true)), false)); break; case Bytecodes::_lushr: b = pop(); @@ -500,25 +501,26 @@ void SharkBlock::parse_bytecode(int star builder()->CreateIntCast( builder()->CreateAnd( b->jint_value(), LLVMValue::jint_constant(0x3f)), - SharkType::jlong_type(), true)))); + SharkType::jlong_type(), true)), false)); break; case Bytecodes::_land: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateAnd(a->jlong_value(), b->jlong_value()))); + builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_lor: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateOr(a->jlong_value(), b->jlong_value()))); + builder()->CreateOr(a->jlong_value(), b->jlong_value()), + a->zero_checked() && b->zero_checked())); break; case Bytecodes::_lxor: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateXor(a->jlong_value(), b->jlong_value()))); + builder()->CreateXor(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_fadd: @@ -600,7 +602,7 @@ void SharkBlock::parse_bytecode(int star SharkValue::create_jint( builder()->CreateAdd( LLVMValue::jint_constant(iter()->get_iinc_con()), - local(i)->jint_value()))); + local(i)->jint_value()), false)); break; case Bytecodes::_lcmp: @@ -621,9 +623,10 @@ void SharkBlock::parse_bytecode(int star break; case Bytecodes::_i2l: + a = pop(); push(SharkValue::create_jlong( builder()->CreateIntCast( - pop()->jint_value(), SharkType::jlong_type(), true))); + a->jint_value(), SharkType::jlong_type(), true), a->zero_checked())); break; case Bytecodes::_i2f: push(SharkValue::create_jfloat( @@ -639,7 +642,7 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_l2i: push(SharkValue::create_jint( builder()->CreateIntCast( - pop()->jlong_value(), SharkType::jint_type(), true))); + pop()->jlong_value(), SharkType::jint_type(), true), false)); break; case Bytecodes::_l2f: push(SharkValue::create_jfloat( @@ -654,11 +657,11 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_f2i: push(SharkValue::create_jint( - call_vm_leaf(SharkRuntime::f2i(), pop()->jfloat_value()))); + call_vm_leaf(SharkRuntime::f2i(), pop()->jfloat_value()), false)); break; case Bytecodes::_f2l: push(SharkValue::create_jlong( - call_vm_leaf(SharkRuntime::f2l(), pop()->jfloat_value()))); + call_vm_leaf(SharkRuntime::f2l(), pop()->jfloat_value()), false)); break; case Bytecodes::_f2d: push(SharkValue::create_jdouble( @@ -668,11 +671,11 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_d2i: push(SharkValue::create_jint( - call_vm_leaf(SharkRuntime::d2i(), pop()->jdouble_value()))); + call_vm_leaf(SharkRuntime::d2i(), pop()->jdouble_value()), false)); break; case Bytecodes::_d2l: push(SharkValue::create_jlong( - call_vm_leaf(SharkRuntime::d2l(), pop()->jdouble_value()))); + call_vm_leaf(SharkRuntime::d2l(), pop()->jdouble_value()), false)); break; case Bytecodes::_d2f: push(SharkValue::create_jfloat( @@ -686,13 +689,13 @@ void SharkBlock::parse_bytecode(int star builder()->CreateShl( pop()->jint_value(), LLVMValue::jint_constant(24)), - LLVMValue::jint_constant(24)))); + LLVMValue::jint_constant(24)), false)); break; case Bytecodes::_i2c: push(SharkValue::create_jint( builder()->CreateAnd( pop()->jint_value(), - LLVMValue::jint_constant(0xffff)))); + LLVMValue::jint_constant(0xffff)), false)); break; case Bytecodes::_i2s: push(SharkValue::create_jint( @@ -700,7 +703,7 @@ void SharkBlock::parse_bytecode(int star builder()->CreateShl( pop()->jint_value(), LLVMValue::jint_constant(16)), - LLVMValue::jint_constant(16)))); + LLVMValue::jint_constant(16)), false)); break; case Bytecodes::_return: @@ -963,9 +966,9 @@ void SharkBlock::do_div_or_rem(bool is_l result->addIncoming(general_result, general_case); if (is_long) - push(SharkValue::create_jlong(result)); + push(SharkValue::create_jlong(result, false)); else - push(SharkValue::create_jint(result)); + push(SharkValue::create_jint(result, false)); } void SharkBlock::do_field_access(bool is_get, bool is_field) @@ -1011,7 +1014,7 @@ void SharkBlock::do_field_access(bool is field_value = builder()->CreateIntCast( field_value, stack_type, basic_type != T_CHAR); - value = SharkValue::create_generic(field->type(), field_value); + value = SharkValue::create_generic(field->type(), field_value, false); } else { Value *field_value = value->generic_value(); @@ -1064,7 +1067,7 @@ void SharkBlock::do_lcmp() result->addIncoming(LLVMValue::jint_constant(0), eq); result->addIncoming(LLVMValue::jint_constant(1), gt); - push(SharkValue::create_jint(result)); + push(SharkValue::create_jint(result, false)); } void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) @@ -1112,7 +1115,7 @@ void SharkBlock::do_fcmp(bool is_double, result->addIncoming(LLVMValue::jint_constant(0), eq); result->addIncoming(LLVMValue::jint_constant(1), gt); - push(SharkValue::create_jint(result)); + push(SharkValue::create_jint(result, false)); } void SharkBlock::emit_IR() diff -r 5a1daec06e6d -r 96d1de001c8d ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Mar 13 09:55:22 2009 -0400 @@ -239,7 +239,7 @@ class SharkBlock : public ResourceObj { { SharkValue *value = SharkValue::from_ciConstant(iter()->get_constant()); if (value == NULL) - value = SharkValue::create_jobject(lookup_for_ldc()); + value = SharkValue::create_jobject(lookup_for_ldc(), true); push(value); } diff -r 5a1daec06e6d -r 96d1de001c8d ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Fri Mar 13 09:55:22 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 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 @@ -180,7 +180,8 @@ void SharkCacher::process_stack_slot(int builder()->CreateLoad( function()->CreateAddressOfFrameEntry( adjusted_offset(value, offset), - SharkType::to_stackType(value->basic_type())))); + SharkType::to_stackType(value->basic_type()))), + value->zero_checked()); } } @@ -206,6 +207,7 @@ void SharkCacher::process_local_slot(int builder()->CreateLoad( function()->CreateAddressOfFrameEntry( adjusted_offset(value, offset), - SharkType::to_stackType(value->basic_type())))); - } -} + SharkType::to_stackType(value->basic_type()))), + value->zero_checked()); + } +} diff -r 5a1daec06e6d -r 96d1de001c8d ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp --- a/ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp Fri Mar 13 09:55:22 2009 -0400 @@ -173,10 +173,10 @@ void SharkIntrinsics::do_Math_minmax(Sha phi->addIncoming(b, return_b); // Push the result - SharkValue *result = SharkValue::create_jint(phi); - if (sa->zero_checked() && sb->zero_checked()) - result->set_zero_checked(true); - state->push(result); + state->push( + SharkValue::create_jint( + phi, + sa->zero_checked() && sb->zero_checked())); } void SharkIntrinsics::do_Math_1to1(SharkState *state, Constant *function) @@ -219,34 +219,34 @@ void SharkIntrinsics::do_Object_getClass SharkType::klass_type(), "klass_part"); - SharkValue *result = SharkValue::create_jobject( - builder->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror")); - - result->set_zero_checked(true); - state->push(result); + state->push( + SharkValue::create_jobject( + builder->CreateValueOfStructEntry( + klass_part, + in_ByteSize(Klass::java_mirror_offset_in_bytes()), + SharkType::oop_type(), + "java_mirror"), + true)); } void SharkIntrinsics::do_System_currentTimeMillis(SharkState *state) { state->push( SharkValue::create_jlong( - state->builder()->CreateCall(SharkRuntime::current_time_millis()))); + state->builder()->CreateCall(SharkRuntime::current_time_millis()), + false)); state->push(NULL); } void SharkIntrinsics::do_Thread_currentThread(SharkState *state, Value *thread) { - SharkValue *result = SharkValue::create_jobject( - state->builder()->CreateValueOfStructEntry( - thread, JavaThread::threadObj_offset(), - SharkType::jobject_type(), - "threadObj")); - result->set_zero_checked(true); - state->push(result); + state->push( + SharkValue::create_jobject( + state->builder()->CreateValueOfStructEntry( + thread, JavaThread::threadObj_offset(), + SharkType::jobject_type(), + "threadObj"), + true)); } void SharkIntrinsics::do_Unsafe_compareAndSwapInt(SharkState *state) @@ -279,6 +279,9 @@ void SharkIntrinsics::do_Unsafe_compareA Value *result = builder->CreateCmpxchgInt(x, addr, e); // Push the result - state->push(SharkValue::create_jint(builder->CreateIntCast( - builder->CreateICmpEQ(result, e), SharkType::jint_type(), true))); -} + state->push( + SharkValue::create_jint( + builder->CreateIntCast( + builder->CreateICmpEQ(result, e), SharkType::jint_type(), true), + false)); +} diff -r 5a1daec06e6d -r 96d1de001c8d ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 09:55:22 2009 -0400 @@ -155,11 +155,14 @@ void SharkState::merge(SharkState* other ciType *this_type = this_value->type(); assert(this_type == other_value->type(), "should be"); + bool this_checked = this_value->zero_checked(); + assert(this_checked == other_value->zero_checked(), "should be"); + snprintf(name, sizeof(name), "local_%d_", i); phi = builder()->CreatePHI(SharkType::to_stackType(this_type), name); phi->addIncoming(this_value->generic_value(), this_block); phi->addIncoming(other_value->generic_value(), other_block); - set_local(i, SharkValue::create_generic(this_type, phi)); + set_local(i, SharkValue::create_generic(this_type, phi, this_checked)); } // Expression stack @@ -174,11 +177,14 @@ void SharkState::merge(SharkState* other ciType *this_type = this_value->type(); assert(this_type == other_value->type(), "should be"); + bool this_checked = this_value->zero_checked(); + assert(this_checked == other_value->zero_checked(), "should be"); + snprintf(name, sizeof(name), "stack_%d_", i); phi = builder()->CreatePHI(SharkType::to_stackType(this_type), name); phi->addIncoming(this_value->generic_value(), this_block); phi->addIncoming(other_value->generic_value(), other_block); - set_stack(i, SharkValue::create_generic(this_type, phi)); + set_stack(i, SharkValue::create_generic(this_type, phi, this_checked)); } } @@ -206,7 +212,7 @@ void SharkState::cache_after_Java_call(c From gbenson at redhat.com Fri Mar 13 07:01:00 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 13 Mar 2009 14:01:00 +0000 Subject: Minor improvement to Shark's zero-check eliminator Message-ID: <20090313140059.GD3241@redhat.com> Hi all, This massive and unwieldy patch is actually really simple. It adds a mandatory "zero_checked" parameter to the SharkValue methods that create jint, jlong and jobject values. This will hopefully mean that anyone writing code that creates such things will be forced to think about whether the object they are creating is guaranteed non- zero or not. This patch probably eliminates a few checks already, but I haven't benchmarked it because I have another trick up my sleeve which, when combined with this patch, should eliminate a whole lot more. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 5a1daec06e6d ChangeLog --- a/ChangeLog Fri Mar 13 09:39:47 2009 -0400 +++ b/ChangeLog Fri Mar 13 09:54:21 2009 -0400 @@ -1,3 +1,47 @@ +2009-03-13 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::create_generic): Make zero_checked argument mandatory. + (SharkValue::create_jint): Fixups for the above. + (SharkValue::create_jlong): Likewise. + (SharkValue::create_jfloat): Likewise. + (SharkValue::create_jdouble): Likewise. + (SharkValue::create_jobject): Likewise. + (SharkValue::jint_constant): Likewise. + (SharkValue::jlong_constant): Likewise. + (SharkValue::null): Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::merge): Likewise. + (SharkState::cache_after_Java_call): Likewise. + (SharkEntryState::SharkEntryState): Likewise. + (SharkPHIState::SharkPHIState): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::do_ldc): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Likewise. + (SharkBlock::do_div_or_rem): Likewise. + (SharkBlock::do_field_access): Likewise. + (SharkBlock::do_lcmp): Likewise. + (SharkBlock::do_fcmp): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::do_arraylength): Likewise. + (SharkTopLevelBlock::do_aload): Likewise. + (SharkTopLevelBlock::do_instance_check): Likewise. + (SharkTopLevelBlock::do_new): Likewise. + (SharkTopLevelBlock::do_newarray): Likewise. + (SharkTopLevelBlock::do_anewarray): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkCacher::process_stack_slot): Likewise. + (SharkCacher::process_local_slot): Likewise. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp + (SharkIntrinsics::do_Math_minmax): Likewise. + (SharkIntrinsics::do_Object_getClass): Likewise. + (SharkIntrinsics::do_System_currentTimeMillis): Likewise. + (SharkIntrinsics::do_Thread_currentThread): Likewise. + (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Mar 13 09:54:21 2009 -0400 @@ -369,19 +369,19 @@ b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateAdd(a->jint_value(), b->jint_value()))); + builder()->CreateAdd(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_isub: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateSub(a->jint_value(), b->jint_value()))); + builder()->CreateSub(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_imul: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateMul(a->jint_value(), b->jint_value()))); + builder()->CreateMul(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_idiv: do_idiv(); @@ -392,7 +392,7 @@ case Bytecodes::_ineg: a = pop(); push(SharkValue::create_jint( - builder()->CreateNeg(a->jint_value()))); + builder()->CreateNeg(a->jint_value()), a->zero_checked())); break; case Bytecodes::_ishl: b = pop(); @@ -401,7 +401,7 @@ builder()->CreateShl( a->jint_value(), builder()->CreateAnd( - b->jint_value(), LLVMValue::jint_constant(0x1f))))); + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); break; case Bytecodes::_ishr: b = pop(); @@ -410,7 +410,7 @@ builder()->CreateAShr( a->jint_value(), builder()->CreateAnd( - b->jint_value(), LLVMValue::jint_constant(0x1f))))); + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); break; case Bytecodes::_iushr: b = pop(); @@ -419,44 +419,45 @@ builder()->CreateLShr( a->jint_value(), builder()->CreateAnd( - b->jint_value(), LLVMValue::jint_constant(0x1f))))); + b->jint_value(), LLVMValue::jint_constant(0x1f))), false)); break; case Bytecodes::_iand: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateAnd(a->jint_value(), b->jint_value()))); + builder()->CreateAnd(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_ior: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateOr(a->jint_value(), b->jint_value()))); + builder()->CreateOr(a->jint_value(), b->jint_value()), + a->zero_checked() && b->zero_checked())); break; case Bytecodes::_ixor: b = pop(); a = pop(); push(SharkValue::create_jint( - builder()->CreateXor(a->jint_value(), b->jint_value()))); + builder()->CreateXor(a->jint_value(), b->jint_value()), false)); break; case Bytecodes::_ladd: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateAdd(a->jlong_value(), b->jlong_value()))); + builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_lsub: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateSub(a->jlong_value(), b->jlong_value()))); + builder()->CreateSub(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_lmul: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateMul(a->jlong_value(), b->jlong_value()))); + builder()->CreateMul(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_ldiv: do_ldiv(); @@ -467,7 +468,7 @@ case Bytecodes::_lneg: a = pop(); push(SharkValue::create_jlong( - builder()->CreateNeg(a->jlong_value()))); + builder()->CreateNeg(a->jlong_value()), a->zero_checked())); break; case Bytecodes::_lshl: b = pop(); @@ -478,7 +479,7 @@ builder()->CreateIntCast( builder()->CreateAnd( b->jint_value(), LLVMValue::jint_constant(0x3f)), - SharkType::jlong_type(), true)))); + SharkType::jlong_type(), true)), false)); break; case Bytecodes::_lshr: b = pop(); @@ -489,7 +490,7 @@ builder()->CreateIntCast( builder()->CreateAnd( b->jint_value(), LLVMValue::jint_constant(0x3f)), - SharkType::jlong_type(), true)))); + SharkType::jlong_type(), true)), false)); break; case Bytecodes::_lushr: b = pop(); @@ -500,25 +501,26 @@ builder()->CreateIntCast( builder()->CreateAnd( b->jint_value(), LLVMValue::jint_constant(0x3f)), - SharkType::jlong_type(), true)))); + SharkType::jlong_type(), true)), false)); break; case Bytecodes::_land: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateAnd(a->jlong_value(), b->jlong_value()))); + builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_lor: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateOr(a->jlong_value(), b->jlong_value()))); + builder()->CreateOr(a->jlong_value(), b->jlong_value()), + a->zero_checked() && b->zero_checked())); break; case Bytecodes::_lxor: b = pop(); a = pop(); push(SharkValue::create_jlong( - builder()->CreateXor(a->jlong_value(), b->jlong_value()))); + builder()->CreateXor(a->jlong_value(), b->jlong_value()), false)); break; case Bytecodes::_fadd: @@ -600,7 +602,7 @@ SharkValue::create_jint( builder()->CreateAdd( LLVMValue::jint_constant(iter()->get_iinc_con()), - local(i)->jint_value()))); + local(i)->jint_value()), false)); break; case Bytecodes::_lcmp: @@ -621,9 +623,10 @@ break; case Bytecodes::_i2l: + a = pop(); push(SharkValue::create_jlong( builder()->CreateIntCast( - pop()->jint_value(), SharkType::jlong_type(), true))); + a->jint_value(), SharkType::jlong_type(), true), a->zero_checked())); break; case Bytecodes::_i2f: push(SharkValue::create_jfloat( @@ -639,7 +642,7 @@ case Bytecodes::_l2i: push(SharkValue::create_jint( builder()->CreateIntCast( - pop()->jlong_value(), SharkType::jint_type(), true))); + pop()->jlong_value(), SharkType::jint_type(), true), false)); break; case Bytecodes::_l2f: push(SharkValue::create_jfloat( @@ -654,11 +657,11 @@ case Bytecodes::_f2i: push(SharkValue::create_jint( - call_vm_leaf(SharkRuntime::f2i(), pop()->jfloat_value()))); + call_vm_leaf(SharkRuntime::f2i(), pop()->jfloat_value()), false)); break; case Bytecodes::_f2l: push(SharkValue::create_jlong( - call_vm_leaf(SharkRuntime::f2l(), pop()->jfloat_value()))); + call_vm_leaf(SharkRuntime::f2l(), pop()->jfloat_value()), false)); break; case Bytecodes::_f2d: push(SharkValue::create_jdouble( @@ -668,11 +671,11 @@ case Bytecodes::_d2i: push(SharkValue::create_jint( - call_vm_leaf(SharkRuntime::d2i(), pop()->jdouble_value()))); + call_vm_leaf(SharkRuntime::d2i(), pop()->jdouble_value()), false)); break; case Bytecodes::_d2l: push(SharkValue::create_jlong( - call_vm_leaf(SharkRuntime::d2l(), pop()->jdouble_value()))); + call_vm_leaf(SharkRuntime::d2l(), pop()->jdouble_value()), false)); break; case Bytecodes::_d2f: push(SharkValue::create_jfloat( @@ -686,13 +689,13 @@ builder()->CreateShl( pop()->jint_value(), LLVMValue::jint_constant(24)), - LLVMValue::jint_constant(24)))); + LLVMValue::jint_constant(24)), false)); break; case Bytecodes::_i2c: push(SharkValue::create_jint( builder()->CreateAnd( pop()->jint_value(), - LLVMValue::jint_constant(0xffff)))); + LLVMValue::jint_constant(0xffff)), false)); break; case Bytecodes::_i2s: push(SharkValue::create_jint( @@ -700,7 +703,7 @@ builder()->CreateShl( pop()->jint_value(), LLVMValue::jint_constant(16)), - LLVMValue::jint_constant(16)))); + LLVMValue::jint_constant(16)), false)); break; case Bytecodes::_return: @@ -963,9 +966,9 @@ result->addIncoming(general_result, general_case); if (is_long) - push(SharkValue::create_jlong(result)); + push(SharkValue::create_jlong(result, false)); else - push(SharkValue::create_jint(result)); + push(SharkValue::create_jint(result, false)); } void SharkBlock::do_field_access(bool is_get, bool is_field) @@ -1011,7 +1014,7 @@ field_value = builder()->CreateIntCast( field_value, stack_type, basic_type != T_CHAR); - value = SharkValue::create_generic(field->type(), field_value); + value = SharkValue::create_generic(field->type(), field_value, false); } else { Value *field_value = value->generic_value(); @@ -1064,7 +1067,7 @@ result->addIncoming(LLVMValue::jint_constant(0), eq); result->addIncoming(LLVMValue::jint_constant(1), gt); - push(SharkValue::create_jint(result)); + push(SharkValue::create_jint(result, false)); } void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) @@ -1112,7 +1115,7 @@ result->addIncoming(LLVMValue::jint_constant(0), eq); result->addIncoming(LLVMValue::jint_constant(1), gt); - push(SharkValue::create_jint(result)); + push(SharkValue::create_jint(result, false)); } void SharkBlock::emit_IR() diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Mar 13 09:54:21 2009 -0400 @@ -239,7 +239,7 @@ { SharkValue *value = SharkValue::from_ciConstant(iter()->get_constant()); if (value == NULL) - value = SharkValue::create_jobject(lookup_for_ldc()); + value = SharkValue::create_jobject(lookup_for_ldc(), true); push(value); } diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Fri Mar 13 09:54:21 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 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 @@ -180,7 +180,8 @@ builder()->CreateLoad( function()->CreateAddressOfFrameEntry( adjusted_offset(value, offset), - SharkType::to_stackType(value->basic_type())))); + SharkType::to_stackType(value->basic_type()))), + value->zero_checked()); } } @@ -206,6 +207,7 @@ builder()->CreateLoad( function()->CreateAddressOfFrameEntry( adjusted_offset(value, offset), - SharkType::to_stackType(value->basic_type())))); + SharkType::to_stackType(value->basic_type()))), + value->zero_checked()); } } diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp --- a/ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp Fri Mar 13 09:54:21 2009 -0400 @@ -173,10 +173,10 @@ phi->addIncoming(b, return_b); // Push the result - SharkValue *result = SharkValue::create_jint(phi); - if (sa->zero_checked() && sb->zero_checked()) - result->set_zero_checked(true); - state->push(result); + state->push( + SharkValue::create_jint( + phi, + sa->zero_checked() && sb->zero_checked())); } void SharkIntrinsics::do_Math_1to1(SharkState *state, Constant *function) @@ -219,34 +219,34 @@ SharkType::klass_type(), "klass_part"); - SharkValue *result = SharkValue::create_jobject( - builder->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror")); - - result->set_zero_checked(true); - state->push(result); + state->push( + SharkValue::create_jobject( + builder->CreateValueOfStructEntry( + klass_part, + in_ByteSize(Klass::java_mirror_offset_in_bytes()), + SharkType::oop_type(), + "java_mirror"), + true)); } void SharkIntrinsics::do_System_currentTimeMillis(SharkState *state) { state->push( SharkValue::create_jlong( - state->builder()->CreateCall(SharkRuntime::current_time_millis()))); + state->builder()->CreateCall(SharkRuntime::current_time_millis()), + false)); state->push(NULL); } void SharkIntrinsics::do_Thread_currentThread(SharkState *state, Value *thread) { - SharkValue *result = SharkValue::create_jobject( - state->builder()->CreateValueOfStructEntry( - thread, JavaThread::threadObj_offset(), - SharkType::jobject_type(), - "threadObj")); - result->set_zero_checked(true); - state->push(result); + state->push( + SharkValue::create_jobject( + state->builder()->CreateValueOfStructEntry( + thread, JavaThread::threadObj_offset(), + SharkType::jobject_type(), + "threadObj"), + true)); } void SharkIntrinsics::do_Unsafe_compareAndSwapInt(SharkState *state) @@ -279,6 +279,9 @@ Value *result = builder->CreateCmpxchgInt(x, addr, e); // Push the result - state->push(SharkValue::create_jint(builder->CreateIntCast( - builder->CreateICmpEQ(result, e), SharkType::jint_type(), true))); + state->push( + SharkValue::create_jint( + builder->CreateIntCast( + builder->CreateICmpEQ(result, e), SharkType::jint_type(), true), + false)); } diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 09:54:21 2009 -0400 @@ -155,11 +155,14 @@ ciType *this_type = this_value->type(); assert(this_type == other_value->type(), "should be"); + bool this_checked = this_value->zero_checked(); + assert(this_checked == other_value->zero_checked(), "should be"); + snprintf(name, sizeof(name), "local_%d_", i); phi = builder()->CreatePHI(SharkType::to_stackType(this_type), name); phi->addIncoming(this_value->generic_value(), this_block); phi->addIncoming(other_value->generic_value(), other_block); - set_local(i, SharkValue::create_generic(this_type, phi)); + set_local(i, SharkValue::create_generic(this_type, phi, this_checked)); } // Expression stack @@ -174,11 +177,14 @@ ciType *this_type = this_value->type(); assert(this_type == other_value->type(), "should be"); + bool this_checked = this_value->zero_checked(); + assert(this_checked == other_value->zero_checked(), "should be"); + snprintf(name, sizeof(name), "stack_%d_", i); phi = builder()->CreatePHI(SharkType::to_stackType(this_type), name); phi->addIncoming(this_value->generic_value(), this_block); phi->addIncoming(other_value->generic_value(), other_block); - set_stack(i, SharkValue::create_generic(this_type, phi)); + set_stack(i, SharkValue::create_generic(this_type, phi, this_checked)); } } @@ -206,7 +212,7 @@ type = callee->return_type(); } - push(SharkValue::create_generic(type, NULL)); + push(SharkValue::create_generic(type, NULL, false)); if (type->is_two_word()) push(NULL); } @@ -257,7 +263,8 @@ function()->locals_slots_offset() + max_locals() - type->size() - i, SharkType::to_stackType(type)), - name)); + name), + i == 0 && !function()->target()->is_static()); } else { Unimplemented(); @@ -275,12 +282,6 @@ ShouldNotReachHere(); } set_local(i, value); - } - - // Non-static methods have a guaranteed non-null receiver - if (!function()->target()->is_static()) { - assert(local(0)->is_jobject(), "should be"); - local(0)->set_zero_checked(true); } // Expression stack @@ -315,7 +316,9 @@ case T_ARRAY: snprintf(name, sizeof(name), "local_%d_", i); value = SharkValue::create_generic( - type, builder()->CreatePHI(SharkType::to_stackType(type), name)); + type, + builder()->CreatePHI(SharkType::to_stackType(type), name), + false); break; case T_ADDRESS: @@ -353,7 +356,9 @@ case T_ARRAY: snprintf(name, sizeof(name), "stack_%d_", i); value = SharkValue::create_generic( - type, builder()->CreatePHI(SharkType::to_stackType(type), name)); + type, + builder()->CreatePHI(SharkType::to_stackType(type), name), + false); break; case T_ADDRESS: diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 09:54:21 2009 -0400 @@ -351,7 +351,7 @@ // we may be about to make. while (xstack_depth()) pop(); - push(SharkValue::create_jobject(exception)); + push(SharkValue::create_jobject(exception, true)); int *indexes = NEW_RESOURCE_ARRAY(int, num_exceptions()); bool has_catch_all = false; @@ -625,7 +625,7 @@ SharkValue *array = pop(); check_null(array); Value *length = builder()->CreateArrayLength(array->jarray_value()); - push(SharkValue::create_jint(length)); + push(SharkValue::create_jint(length, false)); } void SharkTopLevelBlock::do_aload(BasicType basic_type) @@ -655,11 +655,11 @@ case T_CHAR: case T_SHORT: case T_INT: - push(SharkValue::create_jint(value)); + push(SharkValue::create_jint(value, false)); break; case T_LONG: - push(SharkValue::create_jlong(value)); + push(SharkValue::create_jlong(value, false)); break; case T_FLOAT: @@ -671,7 +671,7 @@ break; case T_OBJECT: - push(SharkValue::create_generic(element_type, value)); + push(SharkValue::create_generic(element_type, value, false)); break; default: @@ -1307,7 +1307,7 @@ builder()->CreateUnreachable(); builder()->SetInsertPoint(success); - push(SharkValue::create_generic(klass, object)); + push(SharkValue::create_generic(klass, object, false)); } else { push( @@ -1315,7 +1315,7 @@ builder()->CreateIntCast( builder()->CreateICmpEQ( result, LLVMValue::jint_constant(IC_IS_INSTANCE)), - SharkType::jint_type(), false))); + SharkType::jint_type(), false), false)); } } @@ -1504,9 +1504,7 @@ object = slow_object; } - SharkValue *result = SharkValue::create_jobject(object); - result->set_zero_checked(true); - push(result); + push(SharkValue::create_jobject(object, true)); } void SharkTopLevelBlock::do_newarray() @@ -1518,11 +1516,10 @@ LLVMValue::jint_constant(type), pop()->jint_value()); - SharkValue *result = SharkValue::create_generic( + push(SharkValue::create_generic( ciArrayKlass::make(ciType::make(type)), - function()->CreateGetVMResult()); - result->set_zero_checked(true); - push(result); + function()->CreateGetVMResult(), + true)); } void SharkTopLevelBlock::do_anewarray() @@ -1541,10 +1538,8 @@ LLVMValue::jint_constant(iter()->get_klass_index()), pop()->jint_value()); - SharkValue *result = SharkValue::create_generic( - array_klass, function()->CreateGetVMResult()); - result->set_zero_checked(true); - push(result); + push(SharkValue::create_generic( + array_klass, function()->CreateGetVMResult(), true)); } void SharkTopLevelBlock::do_multianewarray() @@ -1579,10 +1574,8 @@ for (int i = 0; i < ndims; i++) pop(); - SharkValue *result = SharkValue::create_generic( - array_klass, function()->CreateGetVMResult()); - result->set_zero_checked(true); - push(result); + push(SharkValue::create_generic( + array_klass, function()->CreateGetVMResult(), true)); } void SharkTopLevelBlock::do_monitorenter() diff -r 5a1daec06e6d ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 09:39:47 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Mar 13 09:54:21 2009 -0400 @@ -83,47 +83,41 @@ // Typed conversion to SharkValues public: - static SharkValue* create_jint(llvm::Value* value) + static SharkValue* create_jint(llvm::Value* value, bool zero_checked) { assert(value->getType() == SharkType::jint_type(), "should be"); - return create_generic(ciType::make(T_INT), value); + return create_generic(ciType::make(T_INT), value, zero_checked); } - static SharkValue* create_jlong(llvm::Value* value) + static SharkValue* create_jlong(llvm::Value* value, bool zero_checked) { assert(value->getType() == SharkType::jlong_type(), "should be"); - return create_generic(ciType::make(T_LONG), value); + return create_generic(ciType::make(T_LONG), value, zero_checked); } static SharkValue* create_jfloat(llvm::Value* value) { assert(value->getType() == SharkType::jfloat_type(), "should be"); - return create_generic(ciType::make(T_FLOAT), value); + return create_generic(ciType::make(T_FLOAT), value, false); } static SharkValue* create_jdouble(llvm::Value* value) { assert(value->getType() == SharkType::jdouble_type(), "should be"); - return create_generic(ciType::make(T_DOUBLE), value); + return create_generic(ciType::make(T_DOUBLE), value, false); } - static SharkValue* create_jobject(llvm::Value* value) + static SharkValue* create_jobject(llvm::Value* value, bool zero_checked) { assert(value->getType() == SharkType::jobject_type(), "should be"); - return create_generic(ciType::make(T_OBJECT), value); + return create_generic(ciType::make(T_OBJECT), value, zero_checked); } // Typed conversion from constants of various types public: static SharkValue* jint_constant(jint value) { - SharkValue *result = create_jint(LLVMValue::jint_constant(value)); - if (value != 0) - result->set_zero_checked(true); - return result; + return create_jint(LLVMValue::jint_constant(value), value != 0); } static SharkValue* jlong_constant(jlong value) { - SharkValue *result = create_jlong(LLVMValue::jlong_constant(value)); - if (value != 0) - result->set_zero_checked(true); - return result; + return create_jlong(LLVMValue::jlong_constant(value), value != 0); } static SharkValue* jfloat_constant(jfloat value) { @@ -135,7 +129,7 @@ } static SharkValue* null() { - return create_jobject(LLVMValue::null()); + return create_jobject(LLVMValue::null(), false); } static inline SharkValue* address_constant(int bci); @@ -185,7 +179,7 @@ static inline SharkValue* create_generic(ciType* type, llvm::Value* value, - bool zero_checked = false); + bool zero_checked); // Phi-style stuff public: From omajid at redhat.com Fri Mar 13 08:59:11 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 11:59:11 -0400 Subject: [FYI] Exclude broken tests from jtreg Message-ID: <49BA82CF.9030502@redhat.com> Hi, The attached patch adds an exclude list for JTreg tests to IcedTea6. These tests either require binary plugs to pass, or are incorrect. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: exclude-tests.patch Type: text/x-patch Size: 1084 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/b37f70f4/exclude-tests.patch From theuserbl at hotmail.com Fri Mar 13 09:09:53 2009 From: theuserbl at hotmail.com (theUser BL) Date: Fri, 13 Mar 2009 16:09:53 +0000 Subject: The old Metal-Swing bug Message-ID: Hi all! I have for years also saif it in the Forum of java.net and on the classpath-Mailinglist (they have for example reimplemented the bug, to look like the original Java). There are bugs in Metal JScrollBar, when it stands alone. This bug exists since the beginning of Swing, where it was a seperate package for Java 1.1. With the Metal Steel-Skin it is much more apparent then with the Metal Ocean-Skin. But in both cases the bugs exists. At first look at Horizontal JScrollBar of the JFileChooser http://img17.imageshack.us/my.php?image=jfilechooser.png There is no bug. This Scroobar is perfect drawn. Now have a look at JScrollBars placed in an Window http://img5.imageshack.us/my.php?image=beforeq.png Differ the horizontal Scrollbar with this of the JFileChooser. You will see, that there are some bugs in it. The most obviously bug is the wrog shadow under the Scrollbar. I have tried to eleminate it with two possibilities (where comments with "my bugfix" begins, I have something changed): In javax.swing.plaf.metal.MetalScrollBarUI.java ----------------------------------------------------- else // HORIZONTAL { if ( !isFreeStanding ) { trackBounds.height += 2; } if ( c.isEnabled() ) { g.setColor( darkShadowColor ); g.drawLine( 0, 0, trackBounds.width - 1, 0 ); // top g.drawLine( 0, 2, 0, trackBounds.height - 2 ); // left g.drawLine( 0, trackBounds.height - 2, trackBounds.width - 1, trackBounds.height - 2 ); // bottom g.drawLine( trackBounds.width - 1, 2, trackBounds.width - 1, trackBounds.height - 1 ); // right g.setColor( shadowColor ); // g.setColor( Color.red); g.drawLine( 1, 1, trackBounds.width - 2, 1 ); // top g.drawLine( 1, 1, 1, trackBounds.height - 3 ); // left g.setColor( highlightColor ); // my bugfix: this added g.drawLine( 0, trackBounds.height - 1, trackBounds.width - 1, trackBounds.height - 1 ); // bottom g.setColor( shadowColor ); // my bugfix: this added if (scrollbar.getValue() != scrollbar.getMaximum()) { // thumb shadow int x = thumbRect.x + thumbRect.width - trackBounds.x; // g.drawLine( x, 1, x, trackBounds.height-1); g.drawLine( x, 1, x, trackBounds.height-2); // my bugfix: this instead the out commented } } else { MetalUtils.drawDisabledBorder(g, 0, 0, trackBounds.width, trackBounds.height ); } if ( !isFreeStanding ) { trackBounds.height -= 2; } } ----------------------------------------------------- and a second solution I have ----------------------------------------------------- else // HORIZONTAL { if ( !isFreeStanding ) { trackBounds.height += 2; } if ( c.isEnabled() ) { g.setColor( darkShadowColor ); g.drawLine( 0, 0, trackBounds.width - 1, 0 ); // top g.drawLine( 0, 2, 0, trackBounds.height - 2 ); // left g.drawLine( 0, trackBounds.height - 2, trackBounds.width - 1, trackBounds.height - 2 ); // bottom g.drawLine( trackBounds.width - 1, 2, trackBounds.width - 1, trackBounds.height - 1 ); // right g.setColor( shadowColor ); // g.setColor( Color.red); g.drawLine( 1, 1, trackBounds.width - 2, 1 ); // top g.drawLine( 1, 1, 1, trackBounds.height - 3 ); // left // g.drawLine( 0, trackBounds.height - 1, trackBounds.width - 1, trackBounds.height - 1 ); // bottom // my bugfix: here out commented and insert later if (scrollbar.getValue() != scrollbar.getMaximum()) { // thumb shadow int x = thumbRect.x + thumbRect.width - trackBounds.x; g.drawLine( x, 1, x, trackBounds.height-1); } g.setColor( highlightColor ); // my bugfix: this added g.drawLine( 0, trackBounds.height - 1, trackBounds.width - 1, trackBounds.height - 1 ); // bottom // my bugfix: Now here integrated g.setColor( shadowColor ); // my bugfix: this added } else { MetalUtils.drawDisabledBorder(g, 0, 0, trackBounds.width, trackBounds.height ); } if ( !isFreeStanding ) { trackBounds.height -= 2; } } ----------------------------------------------------- After that it looks like http://img19.imageshack.us/my.php?image=afterq.png It is still not completly correct. As you can see, the one vertical lice of the horizontal scrollbar goes to far. It would help to write intead g.drawLine( x, 1, x, trackBounds.height-1); an g.drawLine( x, 1, x, trackBounds.height-3); But in this case the Vertical ScrollBar have the same bug and there it must also be fixed. Hope that this bug will be in any time eleminated from Java. As I said, it exists since the first Swing-version! Greatings theuserbl _________________________________________________________________ http://redirect.gimas.net/?n=M0903xIMTicTacToe Kostenlose Spannung? Spiel jetzt mit Freunden TIC TAC TOE in 3D! From omajid at redhat.com Fri Mar 13 09:10:02 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 16:10:02 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Omair Majid changeset 36bef6593176 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=36bef6593176 description: 2009-03-13 Omair Majid * Makefile.am (check-jdk): Add an exclude list. * test/jtreg/excludelist.jdk.jtx: Exclude list for jdk tests diffstat: 3 files changed, 24 insertions(+) ChangeLog | 5 +++++ Makefile.am | 1 + test/jtreg/excludelist.jdk.jtx | 18 ++++++++++++++++++ diffs (45 lines): diff -r 96d1de001c8d -r 36bef6593176 ChangeLog --- a/ChangeLog Fri Mar 13 09:55:22 2009 -0400 +++ b/ChangeLog Fri Mar 13 12:09:01 2009 -0400 @@ -1,3 +1,8 @@ 2009-03-13 Gary Benson + + * Makefile.am (check-jdk): Add an exclude list. + * test/jtreg/excludelist.jdk.jtx: Exclude list for jdk tests + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp diff -r 96d1de001c8d -r 36bef6593176 Makefile.am --- a/Makefile.am Fri Mar 13 09:55:22 2009 -0400 +++ b/Makefile.am Fri Mar 13 12:09:01 2009 -0400 @@ -1736,6 +1736,7 @@ check-jdk: stamps/jtreg.stamp $(ICEDTEA_BOOT_DIR)/bin/java -jar test/jtreg.jar -v1 -a -ignore:quiet \ -w:test/jdk/JTwork -r:test/jdk/JTreport \ -s -jdk:`pwd`/$(BUILD_OUTPUT_DIR)/j2sdk-image \ + -exclude:$(abs_top_srcdir)/test/jtreg/excludelist.jdk.jtx \ $(ICEDTEA_JTREG_OPTIONS) \ `pwd`/openjdk/jdk/test \ | tee test/$@.log diff -r 96d1de001c8d -r 36bef6593176 test/jtreg/excludelist.jdk.jtx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/jtreg/excludelist.jdk.jtx Fri Mar 13 12:09:01 2009 -0400 @@ -0,0 +1,18 @@ +# Exclude list for jdk tests. These tests require binary plugs to pass, or are +# incorrect/obsolete + +# +# Binary plugs +# + +# snmp is not available in openjdk6 +com/sun/jmx/snmp/SnmpOidHashCode.java +com/sun/jmx/snmp/TimeTicksWrapping.java + +# +# Obsolete +# + +# test checks a bug in CUPS/PostScript that has been fixed +# see https://bugs.openjdk.java.net/show_bug.cgi?id=100022 +javax/print/attribute/PSCopiesFlavorTest.java From omajid at redhat.com Fri Mar 13 09:11:08 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 12:11:08 -0400 Subject: [RFC] Remove outdated postscript test from icedtea6 In-Reply-To: <17c6771e0903121525j2e365f0er3f0792c934318b19@mail.gmail.com> References: <49B97FA8.2030601@redhat.com> <17c6771e0903121525j2e365f0er3f0792c934318b19@mail.gmail.com> Message-ID: <49BA859C.5050503@redhat.com> Andrew John Hughes wrote: > 2009/3/12 Omair Majid : >> Hi, >> >> This patch removes the javax/print/attribute/PSCopiesFlavorTest.java jtreg >> (jdk) test from IcedTea6. The test was written for a CUPS/postscript bug[1]. >> >> There are several issues with this test. It cant handle the case where there >> is no default printer; it throws a NullPointerException without actually >> testing what it's supposed to. The bug that this test checks for has become >> obsolete. The issue was that when a postscript file specified the number of >> copies, and the user asked for a certain number of copies, the number of >> copies in the postscript file would generally take precedence. This meant >> that from a user's point of view, there was no way to set the number of >> copies. This is no longer true for modern version of CUPS. The JRE has >> already been fixed so that it returns Copies as a valid attribute for >> postscript documents, making this test incorrect. >> >> Cheers >> Omair >> >> [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6527316 >> > > You should file an OpenJDK bug for this patch as well: > > https://bugs.openjdk.java.net/ Done: https://bugs.openjdk.java.net/show_bug.cgi?id=100022 > > I can see the logic, but for the time being it might be better to just > exclude it from the JTReg tests in IcedTea and wait for feedback from > Sun on complete removal. Done: http://icedtea.classpath.org/hg/icedtea6/rev/36bef6593176 Thanks, Omair From doko at ubuntu.com Fri Mar 13 09:17:36 2009 From: doko at ubuntu.com (Matthias Klose) Date: Fri, 13 Mar 2009 17:17:36 +0100 Subject: problems with zero on s390 Message-ID: <49BA8720.7040004@ubuntu.com> current icedtea fails in corba and jdk with: /home/doko/openjdk/openjdk-6-6b14-1.5~pre1/build/bootstrap/jdk1.6.0/bin/javac -J-XX:ThreadStackSize=768 -J-client -J-Xmx873m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii -d /home/doko/openjdk/openjdk-6-6b14-1.5~pre1/build/openjdk/control/build/linux-s390/corba/btclasses \ -sourcepath ../../tools/src ../../tools/src/build/tools/stripproperties/StripProperties.java Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. There is already a work around for ia64, extending this to s390 lets the build succeed, but the VM still crashes in the jtreg testsuite. # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (os_linux_zero.cpp:223), pid=32683, tid=1734728608 # Error: caught unhandled signal 11 # -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: s390.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/8655c8aa/s390.diff From matthew.flaschen at gatech.edu Fri Mar 13 10:01:26 2009 From: matthew.flaschen at gatech.edu (Matthew Flaschen) Date: Fri, 13 Mar 2009 13:01:26 -0400 Subject: The old Metal-Swing bug In-Reply-To: References: Message-ID: <49BA9166.7010207@gatech.edu> theUser BL wrote: > Hi all! > > I have for years also saif it in the Forum of java.net and on the > classpath-Mailinglist (they have for example reimplemented the bug, > to look like the original Java). > > There are bugs in Metal JScrollBar, when it stands alone. This bug > exists since the beginning of Swing, where it was a seperate package > for Java 1.1. Assuming you're right that it's a bug since the first version (I don't know the documented appearance), it should be filed at http://bugs.sun.com/ . Reporting it at sundry forums and downstream projects is not going to help. Matt Flaschen From omajid at redhat.com Fri Mar 13 13:29:45 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 16:29:45 -0400 Subject: [FYI] Add a JTreg test for the XML Encoder StackOverflow bug Message-ID: <49BAC239.7010902@redhat.com> Hi, This patch adds a JTreg test for the XML StackOverflow bug that was fixed earlier. Changelog: 2009-03-13 Omair Majid * patches/icedtea-xml-encodinginfo.patch: Added a jtreg test for this bug. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: email-fyi.patch Type: text/x-patch Size: 2699 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/63a43da2/email-fyi.patch From omajid at redhat.com Fri Mar 13 13:32:31 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 20:32:31 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Omair Majid changeset d2194a80a7b6 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d2194a80a7b6 description: 2009-03-13 Omair Majid * patches/icedtea-xml-encodinginfo.patch: Added a jtreg test for this bug. diffstat: 2 files changed, 65 insertions(+) ChangeLog | 4 ++ patches/icedtea-xml-encodinginfo.patch | 61 ++++++++++++++++++++++++++++++++ diffs (79 lines): diff -r 36bef6593176 -r d2194a80a7b6 ChangeLog --- a/ChangeLog Fri Mar 13 12:09:01 2009 -0400 +++ b/ChangeLog Fri Mar 13 16:30:29 2009 -0400 @@ -1,3 +1,7 @@ 2009-03-13 Omair Majid + + * patches/icedtea-xml-encodinginfo.patch: Added a jtreg test for this bug. + 2009-03-13 Omair Majid * Makefile.am (check-jdk): Add an exclude list. diff -r 36bef6593176 -r d2194a80a7b6 patches/icedtea-xml-encodinginfo.patch --- a/patches/icedtea-xml-encodinginfo.patch Fri Mar 13 12:09:01 2009 -0400 +++ b/patches/icedtea-xml-encodinginfo.patch Fri Mar 13 16:30:29 2009 -0400 @@ -16,3 +16,64 @@ m_encoding = encoding; +--- /dev/null 2009-03-12 10:05:36.797002285 -0400 ++++ openjdk/jdk/test/com/sun/org/apache/xml/internal/serializer/XMLStackOverflowBug.java 2009-03-13 16:10:05.000000000 -0400 +@@ -0,0 +1,58 @@ ++/* ++ * Copyright 2009 Red Hat, Inc. All Rights Reserved. ++ * 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. ++ */ ++ ++/* ++ * @test ++ * @summary Check that the xml encoder doesnt cause a StackOverflowError ++ * ++ */ ++ ++import java.io.IOException; ++ ++import javax.xml.transform.TransformerConfigurationException; ++import javax.xml.transform.TransformerFactory; ++import javax.xml.transform.sax.SAXTransformerFactory; ++import javax.xml.transform.sax.TransformerHandler; ++import javax.xml.transform.stream.StreamResult; ++ ++import org.xml.sax.SAXException; ++ ++public class XMLStackOverflowBug { ++ ++ public static void main(String[] args) ++ throws TransformerConfigurationException, IOException, SAXException { ++ ++ SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory ++ .newInstance(); ++ TransformerHandler ser = stf.newTransformerHandler(); ++ ser.setResult(new StreamResult(System.out)); ++ ++ StringBuilder sb = new StringBuilder(4096); ++ for (int x = 4096; x > 0; x--) { ++ sb.append((char)x); ++ } ++ ser.characters(sb.toString().toCharArray(), 0, sb.toString().toCharArray().length); ++ ser.endDocument(); ++ } ++} ++ From omajid at redhat.com Fri Mar 13 14:11:36 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 17:11:36 -0400 Subject: [FYI] Patch to get com/sun/org/apache/xml/internal/ws/server/Test.java to compile Message-ID: <49BACC08.70504@redhat.com> Hi, The attached patch adds -XDignore.symbol.file=true to the test's compilation options to get the test to compile. Thanks to Andrew Haley for finding the fix [1]. Changelog: 2009-03-13 Omair Majid * patches/icedtea-jtreg-6592792.patch: New file. Makes the com/sun/org/apache/xml/internal/ws/server/Test.java test compile. * Makefile.am (ICEDTEA_PATCHES): Apply the patch. * HACKING: Document the patch. Cheers, Omair [1] http://andrew-haley.livejournal.com/695.html -------------- next part -------------- A non-text attachment was scrubbed... Name: test-compile.patch Type: text/x-patch Size: 1909 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/5b6e9f83/test-compile.patch From omajid at redhat.com Fri Mar 13 14:12:29 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 13 Mar 2009 21:12:29 +0000 Subject: changeset in /hg/icedtea6: 2009-03-13 Omair Majid changeset ebdc89c68af2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ebdc89c68af2 description: 2009-03-13 Omair Majid * patches/icedtea-jtreg-6592792.patch: New file. Makes the com/sun/org/apache/xml/internal/ws/server/Test.java test compile. * Makefile.am (ICEDTEA_PATCHES): Apply the patch. * HACKING: Document the patch. diffstat: 4 files changed, 22 insertions(+) ChangeLog | 7 +++++++ HACKING | 1 + Makefile.am | 1 + patches/icedtea-jtreg-6592792.patch | 13 +++++++++++++ diffs (53 lines): diff -r d2194a80a7b6 -r ebdc89c68af2 ChangeLog --- a/ChangeLog Fri Mar 13 16:30:29 2009 -0400 +++ b/ChangeLog Fri Mar 13 17:02:59 2009 -0400 @@ -1,3 +1,10 @@ 2009-03-13 Omair Majid + + * patches/icedtea-jtreg-6592792.patch: New file. Makes the + com/sun/org/apache/xml/internal/ws/server/Test.java test compile. + * Makefile.am (ICEDTEA_PATCHES): Apply the patch. + * HACKING: Document the patch. + 2009-03-13 Omair Majid * patches/icedtea-xml-encodinginfo.patch: Added a jtreg test for this bug. diff -r d2194a80a7b6 -r ebdc89c68af2 HACKING --- a/HACKING Fri Mar 13 16:30:29 2009 -0400 +++ b/HACKING Fri Mar 13 17:02:59 2009 -0400 @@ -85,6 +85,7 @@ The following patches are currently appl * icedtea-java2d-dasher.patch: Fix interpretation of dash array elements in BasicStroke (S6793344). * icedtea-cc-interp-backedge.patch: Remove some duplicated code in DO_BACKEDGE_CHECKS. * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295). +* icedtea-jtreg-6592792.patch: Fix jtreg test for bug 6592792 so that it compiles. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r d2194a80a7b6 -r ebdc89c68af2 Makefile.am --- a/Makefile.am Fri Mar 13 16:30:29 2009 -0400 +++ b/Makefile.am Fri Mar 13 17:02:59 2009 -0400 @@ -662,6 +662,7 @@ ICEDTEA_PATCHES += \ patches/hotspot/$(HSBUILD)/icedtea-format.patch \ patches/icedtea-cc-interp-backedge.patch \ patches/icedtea-xml-encodinginfo.patch \ + patches/icedtea-jtreg-6592792.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r d2194a80a7b6 -r ebdc89c68af2 patches/icedtea-jtreg-6592792.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jtreg-6592792.patch Fri Mar 13 17:02:59 2009 -0400 @@ -0,0 +1,13 @@ +--- openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server.bak/Test6592792.sh 2009-03-13 15:08:37.000000000 -0400 ++++ openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test6592792.sh 2009-03-13 15:57:46.000000000 -0400 +@@ -52,7 +52,9 @@ + + ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version + +-${TESTJAVA}${FS}bin${FS}javac ${BIT_FLAG} -d . -cp ${TESTJAVA}${FS}jre${FS}lib${FS}rt.jar ${TESTSRC}${FS}Test.java ++# the package com.sun.xml.internal.ws.server rt.jar is filtered by the symbol ++# file; so ignore it ++${TESTJAVA}${FS}bin${FS}javac ${BIT_FLAG} -XDignore.symbol.file=true -d . ${TESTSRC}${FS}Test.java + + ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -cp . Test + From dbhole at redhat.com Fri Mar 13 14:55:03 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Fri, 13 Mar 2009 17:55:03 -0400 Subject: RFC: Proxy support for IcedTea Java Plugin Message-ID: <20090313215503.GA9518@redhat.com> Hi, Attached patch adds proxy support to the IcedTea plugin. With this patch, the plugin can now read proxy settings from the browser and use those to connect to the remote server for fetching jars, applet communication (SOCKS proxy), etc. The patch also adds support for proxy (and web) servers that require http authentication by displaying a credential input dialog to the user. Initially I also started adding support for fetching cached authentication information from mozilla directly, but then I decided to disable it as it felt like a security risk to pass usernames/passwords over a FIFO pipe. If the communication system is changed in the future, that code can be enabled again. It is about 80% done. In addition, there are a few minor fixes here and there -- see ChangeLog diff for more details. Please let me know if you find any problems. Thanks! Deepak -------------- next part -------------- diff -r ebdc89c68af2 ChangeLog --- a/ChangeLog Fri Mar 13 17:02:59 2009 -0400 +++ b/ChangeLog Fri Mar 13 17:44:03 2009 -0400 @@ -1,3 +1,26 @@ +2009-03-13 Deepak Bhole + + * IcedTeaPlugin.cc: Incremented timeout to 3 minutes. Added functions to + process proxy and auth info requests (the latter is unused). + * plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java: New file. + Displays a username/password input dialog to users for sites and proxies + requiring http auth. + * plugin/icedtea/sun/applet/PluginAppletViewer.java: Fix wait mechanism to + detect applet initialization failures correctly. Add support for + requesting proxy information from the browser. + * plugin/icedtea/sun/applet/PluginCallRequestFactory.java: Add support for + PluginProxyInfoRequest objects. + * plugin/icedtea/sun/applet/PluginMain.java: Wire in custom authenticator + and proxy selector. + * plugin/icedtea/sun/applet/PluginProxyInfoRequest.java: New file. Object + representing proxy information request from browser. + * plugin/icedtea/sun/applet/PluginProxySelector.java: Custom proxy + selector that requests information from browser and uses it. + * plugin/icedtea/sun/applet/PluginStreamHandler.java: Improve handling + code for "plugin specific" messages on the wire. + * rt/net/sourceforge/jnlp/NetxPanel.java: Add support for improved + initialization failure detection. + 2009-03-13 Omair Majid * patches/icedtea-jtreg-6592792.patch: New file. Makes the diff -r ebdc89c68af2 IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Fri Mar 13 17:02:59 2009 -0400 +++ b/IcedTeaPlugin.cc Fri Mar 13 17:44:04 2009 -0400 @@ -85,7 +85,7 @@ // #14 0x0153fdbf in ProxyJNIEnv::CallObjectMethod (env=0xa8b8040, obj=0x9dad690, methodID=0xa0ed070) at ProxyJNI.cpp:641 // timeout (in seconds) for various calls to java side -#define TIMEOUT 20 +#define TIMEOUT 180 #define NOT_IMPLEMENTED() \ PLUGIN_DEBUG_1ARG ("NOT IMPLEMENTED: %s\n", __PRETTY_FUNCTION__) @@ -1007,6 +1007,8 @@ nsresult StartAppletviewer (); void ProcessMessage(); void ConsumeMsgFromJVM(); + nsresult GetAuthInfo(const char* scheme, const char* host, PRUint32 port, const char* type, const char* realm, char** user, char** pass); + nsresult GetProxyInfo(const char* siteAddr, char** proxyScheme, char** proxyHost, char** proxyPort); nsCOMPtr sink; nsCOMPtr transport; nsCOMPtr applet_viewer_process; @@ -1792,7 +1794,7 @@ NS_IMETHODIMP IcedTeaPluginFactory::Show (void) { - nsCString msg("showconsole"); + nsCString msg("plugin showconsole"); this->SendMessageToAppletViewer(msg); return NS_OK; } @@ -1800,7 +1802,7 @@ NS_IMETHODIMP IcedTeaPluginFactory::Hide (void) { - nsCString msg("hideconsole"); + nsCString msg("plugin hideconsole"); this->SendMessageToAppletViewer(msg); return NS_OK; } @@ -2658,6 +2660,130 @@ return factory->GetJavaObject (instance_identifier, object); } +#include +#include +#include +#include +#include +#include +#include + +/** + * + * Returns the proxy information for the given url + * + * The proxy query part of this function can be made much smaller by using + * nsIPluginManager2::FindProxyForURL() .. however, because we need to parse + * the return components in various ways, it is easier to query + * nsIProtocolProxyService directly + * + * @param siteAddr The URL to check + * @param proxyScheme Return parameter containing the proxy URI scheme (http/socks/etc.) + * @param proxyHost Return parameter containing the proxy host + * @param proxyPort Return parameter containing the proxy port + */ + +NS_IMETHODIMP +IcedTeaPluginFactory::GetProxyInfo(const char* siteAddr, char** proxyScheme, char** proxyHost, char** proxyPort) +{ + nsresult rv; + + // Initialize service variables + nsCOMPtr proxy_svc = do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &rv); + + if (!proxy_svc) { + printf("Cannot initialize proxy service\n"); + return rv; + } + + nsCOMPtr io_svc = do_GetService(NS_IOSERVICE_CONTRACTID, &rv); + + if (NS_FAILED(rv) || !io_svc) { + printf("Cannot initialize io service\n"); + return NS_ERROR_FAILURE; + } + + // uri which needs to be accessed + nsCOMPtr uri; + io_svc->NewURI(nsCString(siteAddr), NULL, NULL, getter_AddRefs(uri)); + + // find the proxy address if any + nsCOMPtr info; + proxy_svc->Resolve(uri, 0, getter_AddRefs(info)); + + // if there is no proxy found, return immediately + if (!info) { + PLUGIN_DEBUG_1ARG("%s does not need a proxy\n", siteAddr); + return NS_ERROR_FAILURE; + } + + // if proxy info is available, extract it + nsCString phost; + PRInt32 pport; + nsCString ptype; + + info->GetHost(phost); + info->GetPort(&pport); + info->GetType(ptype); + + // resolve the proxy address to an IP + nsCOMPtr dns_svc = do_GetService(NS_DNSSERVICE_CONTRACTID, &rv); + + if (!dns_svc) { + printf("Cannot initialize DNS service\n"); + return rv; + } + + nsCOMPtr record; + dns_svc->Resolve(phost, 0U, getter_AddRefs(record)); + + // TODO: Add support for multiple ips + nsDependentCString ipAddr; + record->GetNextAddrAsString(ipAddr); + + // pack information in return variables + snprintf(*proxyScheme, sizeof(char)*32, "%s", ptype.get()); + snprintf(*proxyHost, sizeof(char)*64, "%s", ipAddr.get()); + snprintf(*proxyPort, sizeof(char)*8, "%d", pport); + + PLUGIN_DEBUG_4ARG("Proxy info for %s: %s %s %s\n", siteAddr, *proxyScheme, *proxyHost, *proxyPort); + + return NS_OK; +} + +/** + * Returns cached http auth info for given URL + * + * This function is currently unused due to possible security issues with + * passing auth info to java over a FIFO pipe + * + * @param scheme Scheme of the site being accessed + * @param host Host of the site + * @param type Type of authentication used (basic, digest, etc.) + * @param realm The authentication realm + * @param user Return paramater with username for the site + * @param pass Return paramater with password for the site + * + */ + +NS_IMETHODIMP +IcedTeaPluginFactory::GetAuthInfo(const char* scheme, const char* host, PRUint32 port, const char *type, const char* realm, char** user, char** pass) +{ + nsresult rv; + nsCOMPtr http_auth_man = do_GetService(NS_HTTPAUTHMANAGER_CONTRACTID, &rv); + nsDependentCString schemeStr(scheme); + nsDependentCString hostStr(host); + nsDependentCString typeStr(type); + nsDependentCString realmStr(realm); + nsDependentCString pathStr(""); + nsAutoString domainString, username, password; + + http_auth_man->GetAuthIdentity ( schemeStr , hostStr , port , typeStr , realmStr , pathStr , domainString, username, password ); + + *user = ToNewUTF8String(username); + *pass = ToNewUTF8String(password); + PLUGIN_DEBUG_3ARG("Authinfo: %s %s %s\n", domainString.get(), ToNewUTF8String(username), ToNewUTF8String(password)); +} NS_IMETHODIMP IcedTeaPluginInstance::GetCookie(const char* siteAddr, char** cookieString) @@ -2677,8 +2803,8 @@ return NS_ERROR_FAILURE; } - nsIURI *uri; - io_svc->NewURI(nsCString(siteAddr), NULL, NULL, &uri); + nsCOMPtr uri; + io_svc->NewURI(nsCString(siteAddr), NULL, NULL, getter_AddRefs(uri)); nsCOMPtr cookie_svc = do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv); @@ -2902,6 +3028,13 @@ nsDependentCSubstring prefix(pch, strlen(pch)); pch = strtok (NULL, " "); PRUint32 identifier = nsDependentCSubstring(pch, strlen(pch)).ToInteger (&conversionResult); + + /* Certain prefixes may not have an identifier. if they don't. we have a command here */ + nsDependentCSubstring command; + if (NS_FAILED(conversionResult)) { + command.Rebind(pch, strlen(pch)); + } + PRUint32 reference = -1; if (strstr(message.get(), "reference") != NULL) { @@ -2910,8 +3043,11 @@ reference = nsDependentCSubstring(pch, strlen(pch)).ToInteger (&conversionResult); } - pch = strtok (NULL, " "); - nsDependentCSubstring command(pch, strlen(pch)); + if (command.Length() == 0) { + pch = strtok (NULL, " "); + command.Rebind(pch, strlen(pch)); + } + pch = strtok (NULL, " "); nsDependentCSubstring rest("", 0); @@ -3344,6 +3480,134 @@ // Do nothing for: SetStaticField, SetField, ExceptionClear, // DeleteGlobalRef, DeleteLocalRef } + else if (prefix == "plugin") + { + + /* This is currently unimplemented on the java side due to potential security implications of passing user info over a FIFO */ + + if (command == "GetAuthInfo") { + + // First, decode the info (it arrives encoded in UTF-8 from java side) + nsCString authRequest(""); + + // Read byte stream into return value. + PRUint32 offset = 0; + PRUint32 previousOffset = 0; + + // decode the message + offset = rest.FindChar (' '); + int length = Substring (rest, 0, + offset).ToInteger (&conversionResult); + PLUGIN_CHECK ("parse integer", conversionResult); + + for (int i = 0; i < length; i++) + { + previousOffset = offset + 1; + offset = rest.FindChar (' ', previousOffset); + authRequest += static_cast + (Substring (rest, previousOffset, + offset - previousOffset).ToInteger (&conversionResult, 16)); + if (NS_FAILED(conversionResult)) + PLUGIN_DEBUG_0ARG("Integer parse failed for authinfo request"); + } + + PLUGIN_DEBUG_1ARG ("PLUGIN GOT RETURN UTF-8 STRING: %s\n", authRequest.get ()); + + // parse decoded request + char msg[authRequest.Length()]; + strcpy(msg, authRequest.get()); + + pch = strtok (msg, " "); + nsDependentCSubstring scheme(pch, strlen(pch)); + pch = strtok (NULL, " "); + nsDependentCSubstring host(pch, strlen(pch)); + pch = strtok (NULL, " "); + PRUint32 port = nsDependentCSubstring(pch, strlen(pch)).ToInteger(&conversionResult); + pch = strtok (NULL, " "); + nsDependentCSubstring type(pch, strlen(pch)); + pch = strtok (NULL, " "); + + nsDependentCSubstring realm("", 0); + while (pch != NULL) { + realm += pch; + pch = strtok (NULL, " "); + + if (pch != NULL) + realm += " "; + } + + // fetch the information + char* user; + char* pw; + + GetAuthInfo(((nsCString) scheme).get(), ((nsCString) host).get(), port, ((nsCString) type).get(), ((nsCString) realm).get(), &user, &pw); + + PLUGIN_DEBUG_2ARG("Auth info acquired: %s %s", user, pw); + + nsCString authInfo; + authInfo += scheme; + authInfo += "://"; + authInfo += user; + authInfo += ":"; + authInfo += pw; + authInfo += "@"; + authInfo += host; + + nsresult rv; + nsCOMPtr net_util = do_GetService(NS_NETUTIL_CONTRACTID, &rv); + + if (!net_util) + printf("Error instantiating NetUtil service.\n"); + + // FIXME: We should probably use byte encoding instead of encoding as a URL + nsCString encodedAuthInfo; + net_util->EscapeString(authInfo, 0, encodedAuthInfo); + + nsCString toSend("plugin AuthInfo"); + toSend += encodedAuthInfo; + + SendMessageToAppletViewer(toSend); + + } else if (command == "PluginProxyInfo") { + + nsresult rv; + nsCOMPtr net_util = do_GetService(NS_NETUTIL_CONTRACTID, &rv); + + if (!net_util) + printf("Error instantiating NetUtil service.\n"); + + // decode the url + nsDependentCSubstring url; + net_util->UnescapeString(rest, 0, url); + + char* proxyScheme = (char*) malloc(sizeof(char)*32); + char* proxyHost = (char*) malloc(sizeof(char)*64); + char* proxyPort = (char*) malloc(sizeof(char)*8); + + nsCString proxyInfo("plugin PluginProxyInfo "); + + // get proxy info + if (GetProxyInfo(((nsCString) url).get(), &proxyScheme, &proxyHost, &proxyPort) == NS_OK) + { + proxyInfo += proxyScheme; + proxyInfo += " "; + proxyInfo += proxyHost; + proxyInfo += " "; + proxyInfo += proxyPort; + + PLUGIN_DEBUG_4ARG("Proxy for %s is %s %s %s\n", ((nsCString) url).get(), proxyScheme, proxyHost, proxyPort); + } else { + PLUGIN_DEBUG_1ARG("No suitable proxy found for %s\n", ((nsCString) url).get()); + } + + // send back what we found + SendMessageToAppletViewer (proxyInfo); + + // free allocated memory + delete proxyScheme, proxyHost, proxyPort; + + } + } } void IcedTeaPluginFactory::ProcessMessage () diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java Fri Mar 13 17:44:04 2009 -0400 @@ -0,0 +1,241 @@ +/* PasswordAuthenticationDialog -- requests authentication information from users + Copyright (C) 2009 Red Hat + +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; either version 2, or (at your option) +any later version. + +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 sun.applet; + +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.net.PasswordAuthentication; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.SwingUtilities; + +/** + * Modal non-minimizable dialog to request http authentication credentials + */ + +public class PasswordAuthenticationDialog extends JDialog { + + private JLabel jlInfo = new JLabel(""); + private JTextField jtfUserName = new JTextField(); + private JPasswordField jpfPassword = new JPasswordField(); + private boolean userCancelled; + + public PasswordAuthenticationDialog() { + initialize(); + } + + /** + * Initialized the dialog components + */ + + public void initialize() { + + setTitle("IcedTea Java Plugin - Authorization needed to proceed"); + + setLayout(new GridBagLayout()); + + JLabel jlUserName = new JLabel("Username: "); + JLabel jlPassword = new JLabel("Password: "); + JButton jbOK = new JButton("OK"); + JButton jbCancel = new JButton("Cancel"); + + jtfUserName.setSize(20, 10); + jpfPassword.setSize(20, 10); + + GridBagConstraints c; + + c = new GridBagConstraints(); + c.fill = c.HORIZONTAL; + c.gridx = 0; + c.gridy = 0; + c.gridwidth = 2; + c.insets = new Insets(10, 5, 3, 3); + add(jlInfo, c); + + c = new GridBagConstraints(); + c.gridx = 0; + c.gridy = 1; + c.insets = new Insets(10, 5, 3, 3); + add(jlUserName, c); + + c = new GridBagConstraints(); + c.fill = c.HORIZONTAL; + c.gridx = 1; + c.gridy = 1; + c.insets = new Insets(10, 5, 3, 3); + c.weightx = 1.0; + add(jtfUserName, c); + + + c = new GridBagConstraints(); + c.gridx = 0; + c.gridy = 2; + c.insets = new Insets(5, 5, 3, 3); + add(jlPassword, c); + + c = new GridBagConstraints(); + c.fill = c.HORIZONTAL; + c.gridx = 1; + c.gridy = 2; + c.insets = new Insets(5, 5, 3, 3); + c.weightx = 1.0; + add(jpfPassword, c); + + c = new GridBagConstraints(); + c.anchor = c.SOUTHEAST; + c.gridx = 1; + c.gridy = 3; + c.insets = new Insets(5, 5, 3, 70); + c.weightx = 0.0; + add(jbCancel, c); + + c = new GridBagConstraints(); + c.anchor = c.SOUTHEAST; + c.gridx = 1; + c.gridy = 3; + c.insets = new Insets(5, 5, 3, 3); + c.weightx = 0.0; + add(jbOK, c); + + setMinimumSize(new Dimension(400,150)); + setMaximumSize(new Dimension(1024,150)); + setAlwaysOnTop(true); + + setSize(400,150); + setLocationRelativeTo(null); + + // OK => read supplied info and pass it on + jbOK.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = false; + dispose(); + } + }); + + // Cancel => discard supplied info and pass on an empty auth + jbCancel.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = true; + dispose(); + } + }); + + // "return" key in either user or password field => OK + + jtfUserName.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = false; + dispose(); + } + }); + + jpfPassword.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = false; + dispose(); + } + }); + } + + /** + * Present a dialog to the user asking them for authentication information + * + * @param hostThe host for with authentication is needed + * @param port The port being accessed + * @param prompt The prompt (realm) as presented by the server + * @param type The type of server (proxy/web) + * @return PasswordAuthentication containing the credentials (empty credentials if user cancelled) + */ + protected PasswordAuthentication askUser(String host, int port, String prompt, String type) { + PasswordAuthentication auth = null; + + host += port != -1 ? ":" + port : ""; + + // This frame is reusable. So reset everything first. + userCancelled = true; + jlInfo.setText("The " + type + " server at " + host + " is requesting authentication. It says \"" + prompt + "\""); + + try { + SwingUtilities.invokeAndWait( new Runnable() { + public void run() { + // show dialog to user + setVisible(true); + } + }); + + PluginDebug.debug("password dialog shown"); + + // wait until dialog is gone + while (this.isShowing()) { + try { + Thread.sleep(200); + } catch (InterruptedException ie) { + } + } + + PluginDebug.debug("password dialog closed"); + + if (!userCancelled) { + auth = new PasswordAuthentication(jtfUserName.getText(), jpfPassword.getText().toCharArray()); + } + } catch (Exception e) { + e.printStackTrace(); + + // Nothing else we can do. Empty auth will be returned + } + + return auth; + } + + public static void main(String[] args) { + PasswordAuthenticationDialog frame = new PasswordAuthenticationDialog(); + + PasswordAuthentication auth = frame.askUser("127.0.0.1", 3128, "Password for local proxy", "proxy"); + + System.err.println("Auth info: " + auth.getUserName() + ":" + new String(auth.getPassword())); + System.exit(0); + } +} diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginAppletViewer.java --- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Fri Mar 13 17:44:04 2009 -0400 @@ -87,6 +87,7 @@ import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.SocketPermission; +import java.net.URI; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; @@ -99,14 +100,14 @@ import javax.swing.SwingUtilities; -import com.sun.jndi.toolkit.url.UrlUtil; - import net.sourceforge.jnlp.NetxPanel; import net.sourceforge.jnlp.runtime.JNLPClassLoader; import sun.awt.AppContext; import sun.awt.SunToolkit; import sun.awt.X11.XEmbeddedFrame; import sun.misc.Ref; + +import com.sun.jndi.toolkit.url.UrlUtil; /** * Lets us construct one using unix-style one shot behaviors @@ -177,7 +178,7 @@ private static PluginCallRequestFactory requestFactory; private static HashMap siteCookies = new HashMap(); - + private double proposedHeightFactor; private double proposedWidthFactor; @@ -309,7 +310,7 @@ // Wait for the panel to initialize // (happens in a separate thread) Applet a; - while ((a = panel.getApplet()) == null && panel.getAppletHandlerThread().isAlive()) { + while ((a = panel.getApplet()) == null && ((NetxPanel) panel).isAlive()) { try { Thread.sleep(2000); PluginDebug.debug("Waiting for applet to initialize... "); @@ -493,7 +494,7 @@ // Wait for the panel to initialize // (happens in a separate thread) - while ((o = panel.getApplet()) == null && panel.getAppletHandlerThread().isAlive()) { + while ((o = panel.getApplet()) == null && ((NetxPanel) panel).isAlive()) { try { Thread.sleep(2000); PluginDebug.debug("Waiting for applet to initialize..."); @@ -1005,6 +1006,49 @@ return request.getObject(); } + public static Object requestPluginProxyInfo(URI uri) { + + String requestURI = null; + + try { + + // there is no easy way to get SOCKS proxy info. So, we tell mozilla that we want proxy for + // an HTTP uri in case of non http/ftp protocols. If we get back a SOCKS proxy, we can + // use that, if we get back an http proxy, we fallback to DIRECT connect + + String scheme = uri.getScheme(); + String port = uri.getPort() != -1 ? ":" + uri.getPort() : ""; + if (!uri.getScheme().startsWith("http") && !uri.getScheme().equals("ftp")) + scheme = "http"; + + requestURI = UrlUtil.encode(scheme + "://" + uri.getHost() + port + "/" + uri.getPath(), "UTF-8"); + } catch (Exception e) { + PluginDebug.debug("Cannot construct URL from " + uri.toString() + " ... falling back to DIRECT proxy"); + e.printStackTrace(); + return null; + } + + PluginCallRequest request = requestFactory.getPluginCallRequest("proxyinfo", + "plugin PluginProxyInfo " + requestURI, + "plugin"); + streamhandler.postCallRequest(request); + streamhandler.write(request.getMessage()); + try { + PluginDebug.debug ("wait call request 1"); + synchronized(request) { + PluginDebug.debug ("wait call request 2"); + while (request.isDone() == false) + request.wait(); + PluginDebug.debug ("wait call request 3"); + } + } catch (InterruptedException e) { + throw new RuntimeException("Interrupted waiting for call request.", + e); + } + PluginDebug.debug (" Call DONE"); + return request.getObject(); + } + public static void JavaScriptFinalize(long internal) { // Prefix with dummy instance for convenience. diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginCallRequestFactory.java --- a/plugin/icedtea/sun/applet/PluginCallRequestFactory.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginCallRequestFactory.java Fri Mar 13 17:44:04 2009 -0400 @@ -49,7 +49,9 @@ return new VoidPluginCallRequest(message, returnString); } else if (id == "window") { return new GetWindowPluginCallRequest(message, returnString); - } else { + } else if (id == "proxyinfo") { + return new PluginProxyInfoRequest(message, returnString); + } else { throw new RuntimeException ("Unknown plugin call request type requested from factory"); } diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginMain.java --- a/plugin/icedtea/sun/applet/PluginMain.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginMain.java Fri Mar 13 17:44:04 2009 -0400 @@ -67,15 +67,17 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.net.Socket; +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.net.ProxySelector; import java.util.Enumeration; +import java.util.HashMap; import java.util.Properties; +import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; - -import javax.net.ssl.HttpsURLConnection; import net.sourceforge.jnlp.security.VariableX509TrustManager; @@ -212,6 +214,10 @@ System.err.println("Unable to set SSLSocketfactory (may _prevent_ access to sites that should be trusted)! Continuing anyway..."); e.printStackTrace(); } + + // plug in a custom authenticator and proxy selector + Authenticator.setDefault(new CustomAuthenticator()); + ProxySelector.setDefault(new PluginProxySelector()); } static boolean messageAvailable() { @@ -220,6 +226,67 @@ static String getMessage() { return streamHandler.getMessage(); + } + + static class CustomAuthenticator extends Authenticator { + + public PasswordAuthentication getPasswordAuthentication() { + + // No security check is required here, because the only way to + // set parameters for which auth info is needed + // (Authenticator:requestPasswordAuthentication()), has a security + // check + + String type = this.getRequestorType() == RequestorType.PROXY ? "proxy" : "web"; + + // request auth info from user + PasswordAuthenticationDialog pwDialog = new PasswordAuthenticationDialog(); + PasswordAuthentication auth = pwDialog.askUser(this.getRequestingHost(), this.getRequestingPort(), this.getRequestingPrompt(), type); + + // send it along + return auth; + + /* + * The below was intended to fetch authinfo from mozilla directly. + * However, it has been temporarily disabled due to the security + * implications of passing sensitive info over a FIFO pipe. Should + * the transfer mechanism become more secure in the future, the + * code can be uncommented and completed (it is 80% done, with + * full support on the c++ side -- only the authinfo + * reception/processing needs to be added on Java side) + * + */ + + /* + + PasswordAuthentication proxyAuth = new PasswordAuthentication("", new char[] {}); + + try { + String msg = "plugin GetAuthInfo "; + + byte[] b = null; + + String msgToEncode = this.getRequestingProtocol() + " " + this.getRequestingHost() + " " + this.getRequestingPort() + " " + this.getRequestingScheme() + " " + this.getRequestingPrompt(); + + b = msgToEncode.getBytes("UTF-8"); + + StringBuffer buf = new StringBuffer(b.length * 2); + buf.append(b.length); + + for (int i = 0; i < b.length; i++) { + buf.append(" " + Integer.toString(((int) b[i]) & 0x0ff, 16)); + } + + msg += buf.toString(); + + streamHandler.write(msg); + + return proxyAuth; + } catch (UnsupportedEncodingException uee) { + return proxyAuth; + } + */ + } } /** @@ -264,7 +331,9 @@ @Override public void write(byte[] buf, int off, int len) { logFile.write(buf, off, len); - super.write(buf, off, len); + + if (!redirectStreams) + super.write(buf, off, len); } @Override diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginProxyInfoRequest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PluginProxyInfoRequest.java Fri Mar 13 17:44:04 2009 -0400 @@ -0,0 +1,85 @@ +/* PluginProxyInfoRequest -- Object representing a request for proxy information from the browser + Copyright (C) 2009 Red Hat + +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; either version 2, or (at your option) +any later version. + +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 sun.applet; + +import java.net.MalformedURLException; +import java.net.URI; + +/** + * This class represents a request object for proxy information for a given URI + */ + +public class PluginProxyInfoRequest extends PluginCallRequest { + + URI internal = null; + + public PluginProxyInfoRequest(String message, String returnString) { + super(message, returnString); + } + + public void parseReturn(String proxyInfo) { + + // try to parse the proxy information. If things go wrong, do nothing .. + // this will keep internal = null which forces a direct connection + + PluginDebug.debug ("PluginProxyInfoRequest GOT: " + proxyInfo); + String[] messageComponents = proxyInfo.split(" "); + + try { + internal = new URI(messageComponents[2], null, messageComponents[3], Integer.parseInt(messageComponents[4]), null, null, null); + } catch (Exception e) { + // do nothing + } + + setDone(true); + } + + /** + * Returns whether the given message is serviceable by this object + * + * @param message The message to service + * @return boolean indicating if message is serviceable + */ + public boolean serviceable(String message) { + return message.startsWith("plugin ProxyInfo"); + } + + public URI getObject() { + return this.internal; + } +} diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginProxySelector.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PluginProxySelector.java Fri Mar 13 17:44:04 2009 -0400 @@ -0,0 +1,195 @@ +/* PluginProxySelector -- proxy selector for all connections from applets and the plugin + Copyright (C) 2009 Red Hat + +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; either version 2, or (at your option) +any later version. + +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 sun.applet; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.Proxy; +import java.net.ProxySelector; +import java.net.SocketAddress; +import java.net.URI; +import java.util.Date; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Proxy selector implementation for plugin network functions. + * + * This class fetches proxy information from the web browser and + * uses that information in the context of all network connection + * (plugin specific and applet connections) as applicable + * + */ + +public class PluginProxySelector extends ProxySelector { + + private TimedHashMap proxyCache = new TimedHashMap(); + + + @Override + public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { + // If the connection fails, there is little we can do here. Just print the exception + ioe.printStackTrace(); + } + + /** + * Selects the appropriate proxy (or DIRECT connection method) for the given URI + * + * @param uri The URI being accessed + * @return A list of Proxy objects that are usable for this URI + */ + @Override + public List select(URI uri) { + + List proxyList = new ArrayList(); + + // check cache first + Proxy cachedProxy = checkCache(uri); + if (cachedProxy != null) { + proxyList.add(cachedProxy); + return proxyList; + } + + // Nothing usable in cache. Fetch info from browser + Proxy proxy = Proxy.NO_PROXY; + Object o = PluginAppletViewer.requestPluginProxyInfo(uri); + + // If the browser returned anything, try to parse it. If anything in the try block fails, the fallback is direct connection + try { + if (o != null) { + PluginDebug.debug("Proxy URI = " + o); + URI proxyURI = (URI) o; + + // If origin uri is http/ftp, we're good. If origin uri is not that, the proxy _must_ be socks, else we fallback to direct + if (uri.getScheme().startsWith("http") || uri.getScheme().equals("ftp") || proxyURI.getScheme().startsWith("socks")) { + + Proxy.Type type = proxyURI.getScheme().equals("http") ? Proxy.Type.HTTP : Proxy.Type.SOCKS; + InetSocketAddress socketAddr = new InetSocketAddress(proxyURI.getHost(), proxyURI.getPort()); + + proxy = new Proxy(type, socketAddr); + + String uriKey = uri.getScheme() + "://" + uri.getHost(); + proxyCache.put(uriKey, proxy); + } else { + PluginDebug.debug("Proxy " + proxyURI + " cannot be used for " + uri + ". Falling back to DIRECT"); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + proxyList.add(proxy); + + PluginDebug.debug("Proxy for " + uri.toString() + " is " + proxy); + + return proxyList; + } + + /** + * Checks to see if proxy information is already cached. + * + * @param uri The URI to check + * @return The cached Proxy. null if there is no suitable cached proxy. + */ + private Proxy checkCache(URI uri) { + + String uriKey = uri.getScheme() + "://" + uri.getHost(); + if (proxyCache.get(uriKey) != null) { + return proxyCache.get(uriKey); + } + + return null; + } + + /** + * Simple utility class that extends HashMap by adding an expiry to the entries. + * + * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds + * + * @param The key type + * @param The Object type + */ + + private class TimedHashMap extends HashMap { + + HashMap timeStamps = new HashMap(); + Long expiry = 10000L; + + /** + * Store the item in the map and associate a timestamp with it + * + * @param key The key + * @param value The value to store + */ + public V put(K key, V value) { + timeStamps.put(key, new Date().getTime()); + return super.put(key, value); + } + + /** + * Return cached item if it has not already expired. + * + * Before returning, this method also resets the "last accessed" + * time for this entry, so it is good for another 10 seconds + * + * @param key The key + */ + public V get(Object key) { + + Long now = new Date().getTime(); + + if (super.containsKey(key)) { + Long age = now - timeStamps.get(key); + + // Item exists. If it has not expired, renew its access time and return it + if (age <= expiry) { + PluginDebug.debug("Returning proxy " + super.get(key) + " from cache for " + key); + timeStamps.put((K) key, (new Date()).getTime()); + return super.get(key); + } else { + PluginDebug.debug("Proxy cache for " + key + " has expired (age=" + age/1000.0 + " seconds)"); + } + } + + return null; + } + } + +} diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginStreamHandler.java --- a/plugin/icedtea/sun/applet/PluginStreamHandler.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginStreamHandler.java Fri Mar 13 17:44:04 2009 -0400 @@ -134,7 +134,7 @@ long b4 = new Date().getTime(); String s = read(); - + long after = new Date().getTime(); totalWait += (after - b4); @@ -228,7 +228,12 @@ if (msgComponents.length < 2) return; - + + if (msgComponents[0].startsWith("plugin")) { + handlePluginMessage(message); + return; + } + // type and identifier are guaranteed to be there String type = msgComponents[0]; final int identifier = Integer.parseInt(msgComponents[1]); @@ -295,6 +300,17 @@ } catch (Exception e) { throw new PluginException(this, identifier, reference, e); } + } + + private void handlePluginMessage(String message) { + if (message.equals("plugin showconsole")) { + showConsole(); + } else if (message.equals("plugin hideconsole")) { + hideConsole(); + } else { + // else this is something that was specifically requested + finishCallRequest(message); + } } public void postCallRequest(PluginCallRequest request) { @@ -382,10 +398,6 @@ AppletSecurityContextManager.dumpStore(0); PluginDebug.debug("APPLETVIEWER: exiting appletviewer"); System.exit(0); - } else if (message.equals("showconsole")) { - showConsole(); - } else if (message.equals("hideconsole")) { - hideConsole(); } } catch (IOException e) { e.printStackTrace(); diff -r ebdc89c68af2 rt/net/sourceforge/jnlp/JNLPFile.java --- a/rt/net/sourceforge/jnlp/JNLPFile.java Fri Mar 13 17:02:59 2009 -0400 +++ b/rt/net/sourceforge/jnlp/JNLPFile.java Fri Mar 13 17:44:04 2009 -0400 @@ -106,7 +106,7 @@ // null values will still work, and app can set defaults later } } - + /** * Empty stub, allowing child classes to override the constructor */ diff -r ebdc89c68af2 rt/net/sourceforge/jnlp/NetxPanel.java --- a/rt/net/sourceforge/jnlp/NetxPanel.java Fri Mar 13 17:02:59 2009 -0400 +++ b/rt/net/sourceforge/jnlp/NetxPanel.java Fri Mar 13 17:44:04 2009 -0400 @@ -42,6 +42,7 @@ private boolean exitOnFailure = true; private AppletInstance appInst = null; private String cookieStr; + private boolean appletAlive; public NetxPanel(URL documentURL, Hashtable atts) { @@ -54,6 +55,7 @@ this(documentURL, atts); this.exitOnFailure = exitOnFailure; this.cookieStr = cookieStr; + this.appletAlive = true; } //Overriding to use Netx classloader. You might need to relax visibility @@ -121,10 +123,11 @@ validate(); } } catch (Exception e) { + this.appletAlive = false; e.printStackTrace(); } } - + // Reminder: Relax visibility in sun.applet.AppletPanel protected synchronized void createAppletThread() { handler = new Thread(this); @@ -139,5 +142,9 @@ public ClassLoader getAppletClassLoader() { return appInst.getClassLoader(); } + + public boolean isAlive() { + return handler.isAlive() && this.appletAlive; + } } From mvfranz at gmail.com Fri Mar 13 15:36:51 2009 From: mvfranz at gmail.com (Michael Franz) Date: Fri, 13 Mar 2009 18:36:51 -0400 Subject: JAR_KNOWS_ATFILE for BSD Project on OS X In-Reply-To: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> References: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> Message-ID: Hi, I think part of my problem is the current ecj patch (patches/ecj/icedtea.patch). The first section has 3 parts to the if, the second only has 2. The second ifneq (,$(JAR_KNOWS_ATFILE) has cm0f@ that is what causes my problem. The documenation I found does not say that jar understand @ as a parameter, but that you can use it to pass commands via a file using @. Is this really a bad patch or do I not understand how @ works? Removing @ allows the build to continue, but the rt.jar is not created correctly (I will investigate). Michael @@ -651,10 +651,23 @@ $(RES_JAR_ARGLIST): $(RES_JAR_FILELIST) $(prep-target) $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ -$(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE) +$(RESOURCES_JAR): \ + $(if $(JAR_KNOWS_ATFILE),$(RES_JAR_FILELIST),$(RES_JAR_ARGLIST)) \ + $(JAR_MANIFEST_FILE) $(prep-target) +ifneq (,$(JAR_KNOWS_ATFILE)) + (cd $(CLASSBINDIR) && \ $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ - @$(RES_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) + $(JAR_JFLAGS) @$(RES_JAR_FILELIST)) +else ifneq (,$(JAR_ACCEPTS_STDIN_LIST)) + (cd $(CLASSBINDIR) && $(CAT) $(RES_JAR_FILELIST) | \ + $(BOOT_JAR_CMD) c0mf@ $(JAR_MANIFEST_FILE) $@ \ + $(JAR_JFLAGS)) +else + (cd $(CLASSBINDIR) && \ + $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(JAR_JFLAGS) `cat $(RES_JAR_FILELIST)`) +endif @$(java-vm-cleanup) # Create jsse.jar containing SunJSSE implementation classes @@ -710,10 +723,18 @@ $(RT_JAR_ARGLIST): $(RT_JAR_FILELIST) $(prep-target) $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ -$(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE) +$(RT_JAR): $(if $(JAR_KNOWS_ATFILE),$(RT_JAR_FILELIST),$(RT_JAR_ARGLIST)) \ + $(JAR_MANIFEST_FILE) $(prep-target) +ifneq (,$(JAR_KNOWS_ATFILE)) + (cd $(CLASSBINDIR) && $(CAT) $(RT_JAR_FILELIST) | \ + $(BOOT_JAR_CMD) c0mf@ $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_JFLAGS)) +else + (cd $(CLASSBINDIR) && \ $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ - @$(RT_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) + $(BOOT_JAR_JFLAGS) `$(CAT) $(RT_JAR_FILELIST)`) +endif @$(java-vm-cleanup) # Meta-index construction to make core class loaders lazier On Sun, Mar 1, 2009 at 7:53 PM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/3/1 Michael Franz : > > Hi, > > > > I am having problems getting this to work when not building using an > OpenJDK > > (Apples JDK 5). I have also not been able to find any documentation on > > this. Does anyone have a link for this? This is the only part of the > build > > I have not been able to get to work cleanly when building Zero on the > > BSD-Port repo using OS X. > > > > One other issue I is getting /opt/local/include and /opt/local/lib into > the > > build. I have defined CFLAGS/CXXFLAGS/CPPFLAGS/INCLUDES/LIBS (different > > combinations) and they all fix parts of the build but break others. What > is > > the proper way to add and include and link directory? > > > > Michael > > > > It was added by Matthias I believe, and is related to the configure > check as to whether jar supports @file arguments or not. > -- > Andrew :-) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > 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 HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/c9ad5b5f/attachment.html From gnu_andrew at member.fsf.org Fri Mar 13 16:07:14 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 13 Mar 2009 23:07:14 +0000 Subject: RFC: Proxy support for IcedTea Java Plugin In-Reply-To: <20090313215503.GA9518@redhat.com> References: <20090313215503.GA9518@redhat.com> Message-ID: <17c6771e0903131607x388a1398lb416527d2ef8ff43@mail.gmail.com> 2009/3/13 Deepak Bhole : > Hi, > > Attached patch adds proxy support to the IcedTea plugin. > > With this patch, the plugin can now read proxy settings from the browser > and use those to connect to the remote server for fetching jars, > applet communication (SOCKS proxy), etc. The patch also adds support > for proxy (and web) servers that require http authentication by > displaying a credential input dialog to the user. > Haven't tested this so these comments are just from reading the code. Someone else should (maybe the user who reported this issue?), and I hope you have! Generally looks ok. Main issue I can see is that the password is being output several times to the console. This should be removed. Few other minor issues: * Use a StringBuilder rather than a StringBuffer to construct the String in CustomAuthenticator. StringBuffer has unnecessary synchronisation. * A few lines are a bit too long and should have line breaks to make the code easier to read. > Initially I also started adding support for fetching cached authentication > information from mozilla directly, but then I decided to disable it as > it felt like a security risk to pass usernames/passwords over a FIFO > pipe. If the communication system is changed in the future, that code > can be enabled again. It is about 80% done. > Can you remove this dead code from the patch and keep it to one-side separately? It's a bad idea to have dead code hanging around, and worse when it's potentially open for exploit like this. > In addition, there are a few minor fixes here and there -- see ChangeLog > diff for more details. > Please do these in a separate patch. It's easier to track down bugs later if each changeset only makes one change. They are trivial enough to just go straight in. As Andrew already mentioned, you don't include the ChangeLog in the patch itself but rather in the email, as it generally won't apply locally for other users. > Please let me know if you find any problems. > > Thanks! > Deepak > Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Fri Mar 13 16:19:55 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 13 Mar 2009 23:19:55 +0000 Subject: JAR_KNOWS_ATFILE for BSD Project on OS X In-Reply-To: References: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> Message-ID: <17c6771e0903131619o66021c56t9398095ee4cc629d@mail.gmail.com> 2009/3/13 Michael Franz : > Hi, > > I think part of my problem is the current ecj patch > (patches/ecj/icedtea.patch).? The first section has 3 parts to the if, the > second only has 2.? The second ifneq (,$(JAR_KNOWS_ATFILE) has cm0f@ that is > what causes my problem. The documenation I found does not say that jar > understand @ as a parameter, but that you can use it to pass commands via a > file using @.? Is this really a bad patch or do I not understand how @ > works?? Removing @ allows the build to continue, but the rt.jar is not > created correctly (I will investigate). > > Michael > > @@ -651,10 +651,23 @@ > ?$(RES_JAR_ARGLIST): $(RES_JAR_FILELIST) > ??????? $(prep-target) > ??????? $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ > -$(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE) > +$(RESOURCES_JAR): \ > +??? $(if $(JAR_KNOWS_ATFILE),$(RES_JAR_FILELIST),$(RES_JAR_ARGLIST)) \ > +??? $(JAR_MANIFEST_FILE) > ??????? $(prep-target) > +ifneq (,$(JAR_KNOWS_ATFILE)) > +?????? (cd $(CLASSBINDIR) && \ > ??????? $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ > -?????????? @$(RES_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) > +?????????? $(JAR_JFLAGS) @$(RES_JAR_FILELIST)) > +else ifneq (,$(JAR_ACCEPTS_STDIN_LIST)) > +?????? (cd $(CLASSBINDIR) && $(CAT) $(RES_JAR_FILELIST) | \ > +?????? $(BOOT_JAR_CMD) c0mf@ $(JAR_MANIFEST_FILE) $@ \ > +?????????? $(JAR_JFLAGS)) > +else > +?????? (cd $(CLASSBINDIR) && \ > +?????? $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ > +?????????? $(JAR_JFLAGS) `cat $(RES_JAR_FILELIST)`) > +endif > ??????? @$(java-vm-cleanup) > > ?# Create jsse.jar containing SunJSSE implementation classes > @@ -710,10 +723,18 @@ > ?$(RT_JAR_ARGLIST): $(RT_JAR_FILELIST) > ??????? $(prep-target) > ??????? $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ > -$(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE) > +$(RT_JAR): $(if $(JAR_KNOWS_ATFILE),$(RT_JAR_FILELIST),$(RT_JAR_ARGLIST)) \ > +???? $(JAR_MANIFEST_FILE) > ??????? $(prep-target) > +ifneq (,$(JAR_KNOWS_ATFILE)) > +?????? (cd $(CLASSBINDIR) && $(CAT) $(RT_JAR_FILELIST) | \ > +?????? $(BOOT_JAR_CMD) c0mf@ $(JAR_MANIFEST_FILE) $@ \ > +?????????? $(BOOT_JAR_JFLAGS)) > +else > +?????? (cd $(CLASSBINDIR) && \ > ??????? $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ > -?????????? @$(RT_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) > +?????????? $(BOOT_JAR_JFLAGS) `$(CAT) $(RT_JAR_FILELIST)`) > +endif > ??????? @$(java-vm-cleanup) > > ?# Meta-index construction to make core class loaders lazier > > > > On Sun, Mar 1, 2009 at 7:53 PM, Andrew John Hughes > wrote: >> >> 2009/3/1 Michael Franz : >> > Hi, >> > >> > I am having problems getting this to work when not building using an >> > OpenJDK >> > (Apples JDK 5).? I have also not been able to find any documentation on >> > this.? Does anyone have a link for this?? This is the only part of the >> > build >> > I have not been able to get to work cleanly when building Zero on the >> > BSD-Port repo using OS X. >> > >> > One other issue I is getting /opt/local/include and /opt/local/lib into >> > the >> > build.? I have defined CFLAGS/CXXFLAGS/CPPFLAGS/INCLUDES/LIBS (different >> > combinations) and they all fix parts of the build but break others. >> > What is >> > the proper way to add and include and link directory? >> > >> > Michael >> > >> >> It was added by Matthias I believe, and is related to the configure >> check as to whether jar supports @file arguments or not. >> -- >> Andrew :-) >> >> Free Java Software Engineer >> Red Hat, Inc. (http://www.redhat.com) >> >> 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 > > gjar understands @ as an option to read from stdin. OpenJDK jar doesn't but does understand @. Older versions of gjar don't understand @file so the @ option is used. configure should pick the right one for your setup. That's where you need to look for why the wrong thing is being picked. It sets: JAR_KNOWS_ATFILE - jar supports @file JAR_ACCEPTS_STDIN_LIST - jar supports reading from stdin with the @ option If neither is set, then the list is expanded, which runs into argument length issues. This is one of the cleaner examples... there are quite a few assumptions made by IcedTea that I would like to slowly unpick and correctly change into appropriate configure checks. The current plan is to release what we currently have, based on b50, and then do this as part of the cleanup process of moving to the new IcedTea forest - http://hg.openjdk.java.net/icedtea/jdk7 How do you fare with straight OpenJDK from Mercurial? The best target might to be work against the new forest and see what patches are needed there to get a working build. IcedTea has to deal with old bugs in the GNU tools which aren't relevant for new versions (but are for those in distros), which makes the process unnecessarily hairier. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Fri Mar 13 18:56:00 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 14 Mar 2009 01:56:00 +0000 Subject: [Bug 302] JRE fatal error Problematic frame Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=302 dgahling at hotmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical Priority|P2 |P1 -- 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 mvfranz at gmail.com Fri Mar 13 20:56:32 2009 From: mvfranz at gmail.com (Michael Franz) Date: Fri, 13 Mar 2009 23:56:32 -0400 Subject: JAR_KNOWS_ATFILE for BSD Project on OS X In-Reply-To: <17c6771e0903131619o66021c56t9398095ee4cc629d@mail.gmail.com> References: <17c6771e0903011553i6dd7e132kff477a8d2d3c8365@mail.gmail.com> <17c6771e0903131619o66021c56t9398095ee4cc629d@mail.gmail.com> Message-ID: On Fri, Mar 13, 2009 at 7:19 PM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/3/13 Michael Franz : > > Hi, > > > > I think part of my problem is the current ecj patch > > (patches/ecj/icedtea.patch). The first section has 3 parts to the if, > the > > second only has 2. The second ifneq (,$(JAR_KNOWS_ATFILE) has cm0f at that is > > what causes my problem. The documenation I found does not say that jar > > understand @ as a parameter, but that you can use it to pass commands via > a > > file using @. Is this really a bad patch or do I not understand how @ > > works? Removing @ allows the build to continue, but the rt.jar is not > > created correctly (I will investigate). > > > > Michael > > > > @@ -651,10 +651,23 @@ > > $(RES_JAR_ARGLIST): $(RES_JAR_FILELIST) > > $(prep-target) > > $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ > > -$(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE) > > +$(RESOURCES_JAR): \ > > + $(if $(JAR_KNOWS_ATFILE),$(RES_JAR_FILELIST),$(RES_JAR_ARGLIST)) \ > > + $(JAR_MANIFEST_FILE) > > $(prep-target) > > +ifneq (,$(JAR_KNOWS_ATFILE)) > > + (cd $(CLASSBINDIR) && \ > > $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ > > - @$(RES_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) > > + $(JAR_JFLAGS) @$(RES_JAR_FILELIST)) > > +else ifneq (,$(JAR_ACCEPTS_STDIN_LIST)) > > + (cd $(CLASSBINDIR) && $(CAT) $(RES_JAR_FILELIST) | \ > > + $(BOOT_JAR_CMD) c0mf@ $(JAR_MANIFEST_FILE) $@ \ > > + $(JAR_JFLAGS)) > > +else > > + (cd $(CLASSBINDIR) && \ > > + $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ > > + $(JAR_JFLAGS) `cat $(RES_JAR_FILELIST)`) > > +endif > > @$(java-vm-cleanup) > > > > # Create jsse.jar containing SunJSSE implementation classes > > @@ -710,10 +723,18 @@ > > $(RT_JAR_ARGLIST): $(RT_JAR_FILELIST) > > $(prep-target) > > $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ > > -$(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE) > > +$(RT_JAR): $(if > $(JAR_KNOWS_ATFILE),$(RT_JAR_FILELIST),$(RT_JAR_ARGLIST)) \ > > + $(JAR_MANIFEST_FILE) > > $(prep-target) > > +ifneq (,$(JAR_KNOWS_ATFILE)) > > + (cd $(CLASSBINDIR) && $(CAT) $(RT_JAR_FILELIST) | \ > > + $(BOOT_JAR_CMD) c0mf@ $(JAR_MANIFEST_FILE) $@ \ > > + $(BOOT_JAR_JFLAGS)) > > +else > > + (cd $(CLASSBINDIR) && \ > > $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ > > - @$(RT_JAR_ARGLIST) $(BOOT_JAR_JFLAGS) > > + $(BOOT_JAR_JFLAGS) `$(CAT) $(RT_JAR_FILELIST)`) > > +endif > > @$(java-vm-cleanup) > > > > # Meta-index construction to make core class loaders lazier > > > > > > > > On Sun, Mar 1, 2009 at 7:53 PM, Andrew John Hughes > > wrote: > >> > >> 2009/3/1 Michael Franz : > >> > Hi, > >> > > >> > I am having problems getting this to work when not building using an > >> > OpenJDK > >> > (Apples JDK 5). I have also not been able to find any documentation > on > >> > this. Does anyone have a link for this? This is the only part of the > >> > build > >> > I have not been able to get to work cleanly when building Zero on the > >> > BSD-Port repo using OS X. > >> > > >> > One other issue I is getting /opt/local/include and /opt/local/lib > into > >> > the > >> > build. I have defined CFLAGS/CXXFLAGS/CPPFLAGS/INCLUDES/LIBS > (different > >> > combinations) and they all fix parts of the build but break others. > >> > What is > >> > the proper way to add and include and link directory? > >> > > >> > Michael > >> > > >> > >> It was added by Matthias I believe, and is related to the configure > >> check as to whether jar supports @file arguments or not. > >> -- > >> Andrew :-) > >> > >> Free Java Software Engineer > >> Red Hat, Inc. (http://www.redhat.com) > >> > >> 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 > > > > > > gjar understands @ as an option to read from stdin. OpenJDK jar > doesn't but does understand @. Older versions of gjar don't > understand @file so the @ option is used. > > configure should pick the right one for your setup. That's where you > need to look for why the wrong thing is being picked. > It picks the path where ifneq (,$(JAR_KNOWS_ATFILE)), however, what is in this block is different for resources.jar and rt.jar. The rt.jar block has no stdin choice. I have attached a patch that seems to solve my problem (adds the correct logic for JAR_KNOWS_ATFILE). I have not tested on Fedora, but I don't see why it would not work there as well. I will try to test tomorrow. > > It sets: > > JAR_KNOWS_ATFILE - jar supports @file > JAR_ACCEPTS_STDIN_LIST - jar supports reading from stdin with the @ option > > If neither is set, then the list is expanded, which runs into argument > length issues. > > This is one of the cleaner examples... there are quite a few > assumptions made by IcedTea that I would like to slowly unpick and > correctly change into appropriate configure checks. > The current plan is to release what we currently have, based on b50, > and then do this as part of the cleanup process of moving to the new > IcedTea forest - http://hg.openjdk.java.net/icedtea/jdk7 > > How do you fare with straight OpenJDK from Mercurial? The best target > might to be work against the new forest and see what patches are > needed there to get a working build. > IcedTea has to deal with old bugs in the GNU tools which aren't > relevant for new versions (but are for those in distros), which makes > the process unnecessarily hairier. When I build from the bsd-port repo, I build using an existing OpenJDK7 jdk, that process works fine (when the build is not broken). The non-bsd version of OpenJDK will not build for obvious reasons. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/dbcaaaba/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-jar-knows-atfile.patch Type: application/octet-stream Size: 1690 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090313/dbcaaaba/icedtea-jar-knows-atfile.patch From mvfranz at gmail.com Fri Mar 13 21:01:38 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sat, 14 Mar 2009 00:01:38 -0400 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <49B786D2.5040200@redhat.com> References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> Message-ID: HI, This patch adds the CFLAGS += -march=i486 to zero.make to allow Fedora x86 to force gcc to generate the correct i486 atomic instructions. I hope I picked a suitable variable to check. Michael > > The most likely explanation is that the g++ being used is building for the > i386 architecture, which doesn't have the atomic instructions. We need > i486 or above. > > Andrew. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090314/d6906dac/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: zero-i486.patch Type: application/octet-stream Size: 525 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090314/d6906dac/zero-i486.patch From bugzilla-daemon at icedtea.classpath.org Sat Mar 14 01:53:33 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 14 Mar 2009 08:53:33 +0000 Subject: [Bug 305] New: eclipse crashes if I try to configure PyDev plugin Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=305 Summary: eclipse crashes if I try to configure PyDev plugin Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: nikita.manovich at gmail.com On my machine I can reproduce crash regularly using the following steps: 1. Open Windows->Preference 2. Choose PyDev->Interpreter Python 3. Click "New..." and write "/usr/bin/python" 4. In dialog "Selection Needed" clicks OK. 5. In dalog "Preferences" clicks OK. -- 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 Sat Mar 14 01:54:39 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 14 Mar 2009 08:54:39 +0000 Subject: [Bug 305] eclipse crashes if I try to configure PyDev plugin Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=305 ------- Comment #1 from nikita.manovich at gmail.com 2009-03-14 08:54 ------- Created an attachment (id=171) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=171&action=view) crash report -- 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 doko at ubuntu.com Sat Mar 14 09:16:58 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 14 Mar 2009 16:16:58 +0000 Subject: changeset in /hg/icedtea6: 2009-03-14 Matthias Klose changeset 1b405ec97753 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1b405ec97753 description: 2009-03-14 Matthias Klose * patches/icedtea-s390-noinline.patch: Add special flags for javac on s390 to work around a VM problem with bad code generation during inlining. * Makefile.am: Apply. * HACKING: Document the above. diffstat: 4 files changed, 32 insertions(+) ChangeLog | 8 ++++++++ HACKING | 1 + Makefile.am | 1 + patches/icedtea-s390-noinline.patch | 22 ++++++++++++++++++++++ diffs (63 lines): diff -r ebdc89c68af2 -r 1b405ec97753 ChangeLog --- a/ChangeLog Fri Mar 13 17:02:59 2009 -0400 +++ b/ChangeLog Sat Mar 14 17:13:20 2009 +0100 @@ -1,3 +1,11 @@ 2009-03-13 Omair Majid + + * patches/icedtea-s390-noinline.patch: Add special flags for javac on + s390 to work around a VM problem with bad code generation during + inlining. + * Makefile.am: Apply. + * HACKING: Document the above. + 2009-03-13 Omair Majid * patches/icedtea-jtreg-6592792.patch: New file. Makes the diff -r ebdc89c68af2 -r 1b405ec97753 HACKING --- a/HACKING Fri Mar 13 17:02:59 2009 -0400 +++ b/HACKING Sat Mar 14 17:13:20 2009 +0100 @@ -86,6 +86,7 @@ The following patches are currently appl * icedtea-cc-interp-backedge.patch: Remove some duplicated code in DO_BACKEDGE_CHECKS. * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295). * icedtea-jtreg-6592792.patch: Fix jtreg test for bug 6592792 so that it compiles. +* icedtea-s390-noinline.patch: Add special flags for javac on s390 to work around a VM problem with bad code generation during inlining. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r ebdc89c68af2 -r 1b405ec97753 Makefile.am --- a/Makefile.am Fri Mar 13 17:02:59 2009 -0400 +++ b/Makefile.am Sat Mar 14 17:13:20 2009 +0100 @@ -663,6 +663,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-cc-interp-backedge.patch \ patches/icedtea-xml-encodinginfo.patch \ patches/icedtea-jtreg-6592792.patch \ + patches/icedtea-s390-noinline.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r ebdc89c68af2 -r 1b405ec97753 patches/icedtea-s390-noinline.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-s390-noinline.patch Sat Mar 14 17:13:20 2009 +0100 @@ -0,0 +1,22 @@ +--- openjdk/corba/make/common/shared/Defs-java.gmk.orig 2009-03-13 06:30:44.000000000 +0100 ++++ openjdk/corba/make/common/shared/Defs-java.gmk 2009-03-13 06:30:04.000000000 +0100 +@@ -32,7 +32,7 @@ + # Memory related -J flags that all uses of java tools should use. + # + JAVA_MEM_FLAGS = -Xmx$(MAX_VM_MEMORY)m +-ifeq ($(ARCH), ia64) ++ifneq (,$(filter $(ARCH), ia64 s390)) + # Special flags for javac on ia64 to work around a VM problem with + # bad code generation during inlining (what version had this problem?): + # Suspect this may not be needed anymore. +--- openjdk/jdk/make/common/shared/Defs-java.gmk.orig 2009-03-13 00:07:32.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2009-03-13 07:40:42.000000000 +0100 +@@ -36,7 +36,7 @@ + # Memory related -J flags that all uses of java tools should use. + # + JAVA_MEM_FLAGS = -Xmx$(MAX_VM_MEMORY)m +-ifeq ($(ARCH), ia64) ++ifneq (,$(filter $(ARCH), ia64 s390)) + # Special flags for javac on ia64 to work around a VM problem with + # bad code generation during inlining (what version had this problem?): + # Suspect this may not be needed anymore. From gbenson at redhat.com Mon Mar 16 01:12:44 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 16 Mar 2009 08:12:44 +0000 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> Message-ID: <20090316081243.GA3281@redhat.com> Hi Michael, Looks Good. Cheers, Gary Michael Franz wrote: > HI, > > This patch adds the CFLAGS += -march=i486 to zero.make to allow Fedora x86 > to force gcc to generate the correct i486 atomic instructions. I hope I > picked a suitable variable to check. > > Michael > > > The most likely explanation is that the g++ being used is building for the > > i386 architecture, which doesn't have the atomic instructions. We need > > i486 or above. > > > > Andrew. -- http://gbenson.net/ From doko at ubuntu.com Mon Mar 16 01:17:01 2009 From: doko at ubuntu.com (Matthias Klose) Date: Mon, 16 Mar 2009 09:17:01 +0100 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> Message-ID: <49BE0AFD.2010909@ubuntu.com> It looks like this patch overrides any other -march setting. Wouldn't it better to detect this in the configure? afaiu linux distributions have either the compiler default to i486 or higher, or propagate this in build flags. Matthias Michael Franz schrieb: > HI, > > This patch adds the CFLAGS += -march=i486 to zero.make to allow Fedora x86 > to force gcc to generate the correct i486 atomic instructions. I hope I > picked a suitable variable to check. > > Michael > > >> The most likely explanation is that the g++ being used is building for the >> i386 architecture, which doesn't have the atomic instructions. We need >> i486 or above. >> >> Andrew. >> > From aph at redhat.com Mon Mar 16 03:09:50 2009 From: aph at redhat.com (Andrew Haley) Date: Mon, 16 Mar 2009 10:09:50 +0000 Subject: Missing symbol for zero build on bsd port repo using Fedora In-Reply-To: <49BE0AFD.2010909@ubuntu.com> References: <20090311081242.GB3217@redhat.com> <49B786D2.5040200@redhat.com> <49BE0AFD.2010909@ubuntu.com> Message-ID: <49BE256E.9040605@redhat.com> Matthias Klose wrote: > It looks like this patch overrides any other -march setting. Wouldn't it better > to detect this in the configure? Yes, this is problematic. It seems that the configury sets INSTALL_ARCH_DIR and then ZERO_LIBARCH to i386 for any 32-bit x86 target: i?86-*-*) BUILD_ARCH_DIR=i586 INSTALL_ARCH_DIR=i386 JRE_ARCH_DIR=i386 ... if test "x${use_zero}" = xyes; then ZERO_LIBARCH="${INSTALL_ARCH_DIR}" Thus patch effectively downgrades the compiler from i586. We should be building for the actual machine we're configuring for. I think we need to pass the actual arch name down to CFLAGS. > afaiu linux distributions have either the > compiler default to i486 or higher, or propagate this in build flags. Not all of them. Andrew. From michi at complang.tuwien.ac.at Mon Mar 16 05:15:05 2009 From: michi at complang.tuwien.ac.at (Michael Starzinger) Date: Mon, 16 Mar 2009 13:15:05 +0100 Subject: CACAO 0.99.4 released. Message-ID: CACAO 0.99.4 released. This is a bug-fix release. Here is a short list of the most important changes: * New subtype checking code fixes unexpected class cast exceptions and no longer needs critical sections in JIT code. * Fixed race condition in patcher subsystem which caused illegal instructions and segmentation faults (PR85). * Fixed PR112, PR116, PR118, PR122. CACAO uses GNU Classpath as default Java runtime library and supports upstream releases or CVS snapshots. This release requires GNU Classpath 0.96 or higher to build and was tested against GNU Classpath 0.97.2 on a number of various platforms. CACAO's ./configure has some options for Java runtime configuration, namely: --with-java-runtime-library= --with-java-runtime-library-prefix= --with-java-runtime-library-classes= --with-java-runtime-library-libdir= For detailed information, use ./configure --help. Currently supported JIT compiler architectures are: * alpha * arm * i386 * m68k (broken) * mips * powerpc * powerpc64 * s390 * sparc64 * x86_64 Information about working applications and some screenshots can be found on http://www.cacaovm.org/. The CACAO wiki can be found here: http://c1.complang.tuwien.ac.at/cacaowiki/ The CACAO mailing lists can be found here: http://c1.complang.tuwien.ac.at/mailman/listinfo/ Nightly test runs with CACAO Mercurial tip, GNU Classpath CVS head and Mauve CVS head can be found on http://www.complang.tuwien.ac.at/cacaojvm/jvmtester/. CACAO 0.99.4 can be downloaded from http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.99.4/ File : cacao-0.99.4.tar.gz md5sum : c5e6525c5212ddbb6026e4a7cde37ca6 sha1sum: d9d159f8f905a9fa53ea7ae0f50a442dbd6b5e84 File : cacao-0.99.4.tar.bz2 md5sum : 63220327925ace13756ae334c55a3baa sha1sum: e786a21c0f3f8fc1394e5a2a7a3e5607116760ec Enjoy! CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO cacao at cacaovm.org From omajid at redhat.com Mon Mar 16 11:27:09 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 16 Mar 2009 14:27:09 -0400 Subject: [RFC] Change file permissions on JTreg test files Message-ID: <49BE99FD.7050802@redhat.com> Hi, To get openjdk/jdk/test/sun/tools/native2ascii/NativeErrors.java to pass requires changing file permissions on openjdk/jdk/test/sun/tools/native2ascii/test{2,3}. These files are supposed to be read-only. The attached patch attempt to do that. Is there a better way to do this? Changelog: 2009-03-16 Omair Majid * Makefile.am (stamps/jtreg.stamp): Change permissions on test input files as required by the native2ascii jtreg tests. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: jtreg-test-permissions.patch Type: text/x-patch Size: 499 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090316/7aa054fc/jtreg-test-permissions.patch From dbhole at redhat.com Mon Mar 16 12:34:13 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 16 Mar 2009 15:34:13 -0400 Subject: RFC: Proxy support for IcedTea Java Plugin In-Reply-To: <17c6771e0903131607x388a1398lb416527d2ef8ff43@mail.gmail.com> References: <20090313215503.GA9518@redhat.com> <17c6771e0903131607x388a1398lb416527d2ef8ff43@mail.gmail.com> Message-ID: <20090316193413.GC9093@redhat.com> * Andrew John Hughes [2009-03-13 19:07]: > 2009/3/13 Deepak Bhole : > > Hi, > > > > Attached patch adds proxy support to the IcedTea plugin. > > > > With this patch, the plugin can now read proxy settings from the browser > > and use those to connect to the remote server for fetching jars, > > applet communication (SOCKS proxy), etc. The patch also adds support > > for proxy (and web) servers that require http authentication by > > displaying a credential input dialog to the user. > > > > Haven't tested this so these comments are just from reading the code. > Someone else should (maybe the user who reported this issue?), and I > hope you have! Generally looks ok. Main issue I can see is that the > password is being output several times to the console. This should be > removed. That was only in inactive WIP code. I removed all print lines for credentials from live code. Since the unused code is gone, this is no longer an issue. Auth info is now printed from the Main method of PasswordAuthenticationDialog only, which is never called from plugin code. PasswordAuthenticationDialog::main() is a testing only function, so it is okay there. > Few other minor issues: > * Use a StringBuilder rather than a StringBuffer to construct the > String in CustomAuthenticator. StringBuffer has unnecessary > synchronisation. This was in the unused part of the code, so it is gone now. Good to know about StringBuffer vs Builder though.. I'll use that in the future :) > * A few lines are a bit too long and should have line breaks to make > the code easier to read. Very little of the plugin code is line wrapped and I didn't want to mix wrapped/unwrapped, so I did not wrap at all. Is the 80 char limit part of the general guidelines? I don't mind doing it... just didn't seem like something worth going out of the way for. > > > Initially I also started adding support for fetching cached authentication > > information from mozilla directly, but then I decided to disable it as > > it felt like a security risk to pass usernames/passwords over a FIFO > > pipe. If the communication system is changed in the future, that code > > can be enabled again. It is about 80% done. > > > > Can you remove this dead code from the patch and keep it to one-side > separately? It's a bad idea to have dead code hanging around, and > worse when it's potentially open for exploit like this. > Sure, I have removed it all. > > In addition, there are a few minor fixes here and there -- see ChangeLog > > diff for more details. > > > > Please do these in a separate patch. It's easier to track down bugs > later if each changeset only makes one change. They are trivial > enough to just go straight in. > Normally that is what I'd do, but in this case they are needed for proxy support to work properly (e.g. removing the time wait fix will cause the browser to hang if one cancels plugin auth dialog..). > As Andrew already mentioned, you don't include the ChangeLog in the > patch itself but rather in the email, as it generally won't apply > locally for other users. > Oops, will keep it in mind next time. New patch (sans changelog and dead code) attached. Thanks for reviewing! Cheers, Deepak -------------- next part -------------- diff -r ebdc89c68af2 IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Fri Mar 13 17:02:59 2009 -0400 +++ b/IcedTeaPlugin.cc Mon Mar 16 15:22:19 2009 -0400 @@ -85,7 +85,7 @@ // #14 0x0153fdbf in ProxyJNIEnv::CallObjectMethod (env=0xa8b8040, obj=0x9dad690, methodID=0xa0ed070) at ProxyJNI.cpp:641 // timeout (in seconds) for various calls to java side -#define TIMEOUT 20 +#define TIMEOUT 180 #define NOT_IMPLEMENTED() \ PLUGIN_DEBUG_1ARG ("NOT IMPLEMENTED: %s\n", __PRETTY_FUNCTION__) @@ -1007,6 +1007,7 @@ nsresult StartAppletviewer (); void ProcessMessage(); void ConsumeMsgFromJVM(); + nsresult GetProxyInfo(const char* siteAddr, char** proxyScheme, char** proxyHost, char** proxyPort); nsCOMPtr sink; nsCOMPtr transport; nsCOMPtr applet_viewer_process; @@ -1792,7 +1793,7 @@ NS_IMETHODIMP IcedTeaPluginFactory::Show (void) { - nsCString msg("showconsole"); + nsCString msg("plugin showconsole"); this->SendMessageToAppletViewer(msg); return NS_OK; } @@ -1800,7 +1801,7 @@ NS_IMETHODIMP IcedTeaPluginFactory::Hide (void) { - nsCString msg("hideconsole"); + nsCString msg("plugin hideconsole"); this->SendMessageToAppletViewer(msg); return NS_OK; } @@ -2658,6 +2659,96 @@ return factory->GetJavaObject (instance_identifier, object); } +#include +#include +#include +#include +#include +#include +#include + +/** + * + * Returns the proxy information for the given url + * + * The proxy query part of this function can be made much smaller by using + * nsIPluginManager2::FindProxyForURL() .. however, because we need to parse + * the return components in various ways, it is easier to query + * nsIProtocolProxyService directly + * + * @param siteAddr The URL to check + * @param proxyScheme Return parameter containing the proxy URI scheme (http/socks/etc.) + * @param proxyHost Return parameter containing the proxy host + * @param proxyPort Return parameter containing the proxy port + */ + +NS_IMETHODIMP +IcedTeaPluginFactory::GetProxyInfo(const char* siteAddr, char** proxyScheme, char** proxyHost, char** proxyPort) +{ + nsresult rv; + + // Initialize service variables + nsCOMPtr proxy_svc = do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &rv); + + if (!proxy_svc) { + printf("Cannot initialize proxy service\n"); + return rv; + } + + nsCOMPtr io_svc = do_GetService(NS_IOSERVICE_CONTRACTID, &rv); + + if (NS_FAILED(rv) || !io_svc) { + printf("Cannot initialize io service\n"); + return NS_ERROR_FAILURE; + } + + // uri which needs to be accessed + nsCOMPtr uri; + io_svc->NewURI(nsCString(siteAddr), NULL, NULL, getter_AddRefs(uri)); + + // find the proxy address if any + nsCOMPtr info; + proxy_svc->Resolve(uri, 0, getter_AddRefs(info)); + + // if there is no proxy found, return immediately + if (!info) { + PLUGIN_DEBUG_1ARG("%s does not need a proxy\n", siteAddr); + return NS_ERROR_FAILURE; + } + + // if proxy info is available, extract it + nsCString phost; + PRInt32 pport; + nsCString ptype; + + info->GetHost(phost); + info->GetPort(&pport); + info->GetType(ptype); + + // resolve the proxy address to an IP + nsCOMPtr dns_svc = do_GetService(NS_DNSSERVICE_CONTRACTID, &rv); + + if (!dns_svc) { + printf("Cannot initialize DNS service\n"); + return rv; + } + + nsCOMPtr record; + dns_svc->Resolve(phost, 0U, getter_AddRefs(record)); + + // TODO: Add support for multiple ips + nsDependentCString ipAddr; + record->GetNextAddrAsString(ipAddr); + + // pack information in return variables + snprintf(*proxyScheme, sizeof(char)*32, "%s", ptype.get()); + snprintf(*proxyHost, sizeof(char)*64, "%s", ipAddr.get()); + snprintf(*proxyPort, sizeof(char)*8, "%d", pport); + + PLUGIN_DEBUG_4ARG("Proxy info for %s: %s %s %s\n", siteAddr, *proxyScheme, *proxyHost, *proxyPort); + + return NS_OK; +} NS_IMETHODIMP IcedTeaPluginInstance::GetCookie(const char* siteAddr, char** cookieString) @@ -2677,8 +2768,8 @@ return NS_ERROR_FAILURE; } - nsIURI *uri; - io_svc->NewURI(nsCString(siteAddr), NULL, NULL, &uri); + nsCOMPtr uri; + io_svc->NewURI(nsCString(siteAddr), NULL, NULL, getter_AddRefs(uri)); nsCOMPtr cookie_svc = do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv); @@ -2902,6 +2993,13 @@ nsDependentCSubstring prefix(pch, strlen(pch)); pch = strtok (NULL, " "); PRUint32 identifier = nsDependentCSubstring(pch, strlen(pch)).ToInteger (&conversionResult); + + /* Certain prefixes may not have an identifier. if they don't. we have a command here */ + nsDependentCSubstring command; + if (NS_FAILED(conversionResult)) { + command.Rebind(pch, strlen(pch)); + } + PRUint32 reference = -1; if (strstr(message.get(), "reference") != NULL) { @@ -2910,8 +3008,11 @@ reference = nsDependentCSubstring(pch, strlen(pch)).ToInteger (&conversionResult); } - pch = strtok (NULL, " "); - nsDependentCSubstring command(pch, strlen(pch)); + if (command.Length() == 0) { + pch = strtok (NULL, " "); + command.Rebind(pch, strlen(pch)); + } + pch = strtok (NULL, " "); nsDependentCSubstring rest("", 0); @@ -3344,6 +3445,49 @@ // Do nothing for: SetStaticField, SetField, ExceptionClear, // DeleteGlobalRef, DeleteLocalRef } + else if (prefix == "plugin") + { + + if (command == "PluginProxyInfo") { + + nsresult rv; + nsCOMPtr net_util = do_GetService(NS_NETUTIL_CONTRACTID, &rv); + + if (!net_util) + printf("Error instantiating NetUtil service.\n"); + + // decode the url + nsDependentCSubstring url; + net_util->UnescapeString(rest, 0, url); + + char* proxyScheme = (char*) malloc(sizeof(char)*32); + char* proxyHost = (char*) malloc(sizeof(char)*64); + char* proxyPort = (char*) malloc(sizeof(char)*8); + + nsCString proxyInfo("plugin PluginProxyInfo "); + + // get proxy info + if (GetProxyInfo(((nsCString) url).get(), &proxyScheme, &proxyHost, &proxyPort) == NS_OK) + { + proxyInfo += proxyScheme; + proxyInfo += " "; + proxyInfo += proxyHost; + proxyInfo += " "; + proxyInfo += proxyPort; + + PLUGIN_DEBUG_4ARG("Proxy for %s is %s %s %s\n", ((nsCString) url).get(), proxyScheme, proxyHost, proxyPort); + } else { + PLUGIN_DEBUG_1ARG("No suitable proxy found for %s\n", ((nsCString) url).get()); + } + + // send back what we found + SendMessageToAppletViewer (proxyInfo); + + // free allocated memory + delete proxyScheme, proxyHost, proxyPort; + + } + } } void IcedTeaPluginFactory::ProcessMessage () diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java Mon Mar 16 15:22:19 2009 -0400 @@ -0,0 +1,241 @@ +/* PasswordAuthenticationDialog -- requests authentication information from users + Copyright (C) 2009 Red Hat + +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; either version 2, or (at your option) +any later version. + +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 sun.applet; + +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.net.PasswordAuthentication; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.SwingUtilities; + +/** + * Modal non-minimizable dialog to request http authentication credentials + */ + +public class PasswordAuthenticationDialog extends JDialog { + + private JLabel jlInfo = new JLabel(""); + private JTextField jtfUserName = new JTextField(); + private JPasswordField jpfPassword = new JPasswordField(); + private boolean userCancelled; + + public PasswordAuthenticationDialog() { + initialize(); + } + + /** + * Initialized the dialog components + */ + + public void initialize() { + + setTitle("IcedTea Java Plugin - Authorization needed to proceed"); + + setLayout(new GridBagLayout()); + + JLabel jlUserName = new JLabel("Username: "); + JLabel jlPassword = new JLabel("Password: "); + JButton jbOK = new JButton("OK"); + JButton jbCancel = new JButton("Cancel"); + + jtfUserName.setSize(20, 10); + jpfPassword.setSize(20, 10); + + GridBagConstraints c; + + c = new GridBagConstraints(); + c.fill = c.HORIZONTAL; + c.gridx = 0; + c.gridy = 0; + c.gridwidth = 2; + c.insets = new Insets(10, 5, 3, 3); + add(jlInfo, c); + + c = new GridBagConstraints(); + c.gridx = 0; + c.gridy = 1; + c.insets = new Insets(10, 5, 3, 3); + add(jlUserName, c); + + c = new GridBagConstraints(); + c.fill = c.HORIZONTAL; + c.gridx = 1; + c.gridy = 1; + c.insets = new Insets(10, 5, 3, 3); + c.weightx = 1.0; + add(jtfUserName, c); + + + c = new GridBagConstraints(); + c.gridx = 0; + c.gridy = 2; + c.insets = new Insets(5, 5, 3, 3); + add(jlPassword, c); + + c = new GridBagConstraints(); + c.fill = c.HORIZONTAL; + c.gridx = 1; + c.gridy = 2; + c.insets = new Insets(5, 5, 3, 3); + c.weightx = 1.0; + add(jpfPassword, c); + + c = new GridBagConstraints(); + c.anchor = c.SOUTHEAST; + c.gridx = 1; + c.gridy = 3; + c.insets = new Insets(5, 5, 3, 70); + c.weightx = 0.0; + add(jbCancel, c); + + c = new GridBagConstraints(); + c.anchor = c.SOUTHEAST; + c.gridx = 1; + c.gridy = 3; + c.insets = new Insets(5, 5, 3, 3); + c.weightx = 0.0; + add(jbOK, c); + + setMinimumSize(new Dimension(400,150)); + setMaximumSize(new Dimension(1024,150)); + setAlwaysOnTop(true); + + setSize(400,150); + setLocationRelativeTo(null); + + // OK => read supplied info and pass it on + jbOK.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = false; + dispose(); + } + }); + + // Cancel => discard supplied info and pass on an empty auth + jbCancel.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = true; + dispose(); + } + }); + + // "return" key in either user or password field => OK + + jtfUserName.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = false; + dispose(); + } + }); + + jpfPassword.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + userCancelled = false; + dispose(); + } + }); + } + + /** + * Present a dialog to the user asking them for authentication information + * + * @param hostThe host for with authentication is needed + * @param port The port being accessed + * @param prompt The prompt (realm) as presented by the server + * @param type The type of server (proxy/web) + * @return PasswordAuthentication containing the credentials (empty credentials if user cancelled) + */ + protected PasswordAuthentication askUser(String host, int port, String prompt, String type) { + PasswordAuthentication auth = null; + + host += port != -1 ? ":" + port : ""; + + // This frame is reusable. So reset everything first. + userCancelled = true; + jlInfo.setText("The " + type + " server at " + host + " is requesting authentication. It says \"" + prompt + "\""); + + try { + SwingUtilities.invokeAndWait( new Runnable() { + public void run() { + // show dialog to user + setVisible(true); + } + }); + + PluginDebug.debug("password dialog shown"); + + // wait until dialog is gone + while (this.isShowing()) { + try { + Thread.sleep(200); + } catch (InterruptedException ie) { + } + } + + PluginDebug.debug("password dialog closed"); + + if (!userCancelled) { + auth = new PasswordAuthentication(jtfUserName.getText(), jpfPassword.getText().toCharArray()); + } + } catch (Exception e) { + e.printStackTrace(); + + // Nothing else we can do. Empty auth will be returned + } + + return auth; + } + + public static void main(String[] args) { + PasswordAuthenticationDialog frame = new PasswordAuthenticationDialog(); + + PasswordAuthentication auth = frame.askUser("127.0.0.1", 3128, "Password for local proxy", "proxy"); + + System.err.println("Auth info: " + auth.getUserName() + ":" + new String(auth.getPassword())); + System.exit(0); + } +} diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginAppletViewer.java --- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Mon Mar 16 15:22:19 2009 -0400 @@ -87,6 +87,7 @@ import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.SocketPermission; +import java.net.URI; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; @@ -99,14 +100,14 @@ import javax.swing.SwingUtilities; -import com.sun.jndi.toolkit.url.UrlUtil; - import net.sourceforge.jnlp.NetxPanel; import net.sourceforge.jnlp.runtime.JNLPClassLoader; import sun.awt.AppContext; import sun.awt.SunToolkit; import sun.awt.X11.XEmbeddedFrame; import sun.misc.Ref; + +import com.sun.jndi.toolkit.url.UrlUtil; /** * Lets us construct one using unix-style one shot behaviors @@ -177,7 +178,7 @@ private static PluginCallRequestFactory requestFactory; private static HashMap siteCookies = new HashMap(); - + private double proposedHeightFactor; private double proposedWidthFactor; @@ -309,7 +310,7 @@ // Wait for the panel to initialize // (happens in a separate thread) Applet a; - while ((a = panel.getApplet()) == null && panel.getAppletHandlerThread().isAlive()) { + while ((a = panel.getApplet()) == null && ((NetxPanel) panel).isAlive()) { try { Thread.sleep(2000); PluginDebug.debug("Waiting for applet to initialize... "); @@ -493,7 +494,7 @@ // Wait for the panel to initialize // (happens in a separate thread) - while ((o = panel.getApplet()) == null && panel.getAppletHandlerThread().isAlive()) { + while ((o = panel.getApplet()) == null && ((NetxPanel) panel).isAlive()) { try { Thread.sleep(2000); PluginDebug.debug("Waiting for applet to initialize..."); @@ -1005,6 +1006,49 @@ return request.getObject(); } + public static Object requestPluginProxyInfo(URI uri) { + + String requestURI = null; + + try { + + // there is no easy way to get SOCKS proxy info. So, we tell mozilla that we want proxy for + // an HTTP uri in case of non http/ftp protocols. If we get back a SOCKS proxy, we can + // use that, if we get back an http proxy, we fallback to DIRECT connect + + String scheme = uri.getScheme(); + String port = uri.getPort() != -1 ? ":" + uri.getPort() : ""; + if (!uri.getScheme().startsWith("http") && !uri.getScheme().equals("ftp")) + scheme = "http"; + + requestURI = UrlUtil.encode(scheme + "://" + uri.getHost() + port + "/" + uri.getPath(), "UTF-8"); + } catch (Exception e) { + PluginDebug.debug("Cannot construct URL from " + uri.toString() + " ... falling back to DIRECT proxy"); + e.printStackTrace(); + return null; + } + + PluginCallRequest request = requestFactory.getPluginCallRequest("proxyinfo", + "plugin PluginProxyInfo " + requestURI, + "plugin"); + streamhandler.postCallRequest(request); + streamhandler.write(request.getMessage()); + try { + PluginDebug.debug ("wait call request 1"); + synchronized(request) { + PluginDebug.debug ("wait call request 2"); + while (request.isDone() == false) + request.wait(); + PluginDebug.debug ("wait call request 3"); + } + } catch (InterruptedException e) { + throw new RuntimeException("Interrupted waiting for call request.", + e); + } + PluginDebug.debug (" Call DONE"); + return request.getObject(); + } + public static void JavaScriptFinalize(long internal) { // Prefix with dummy instance for convenience. diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginCallRequestFactory.java --- a/plugin/icedtea/sun/applet/PluginCallRequestFactory.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginCallRequestFactory.java Mon Mar 16 15:22:19 2009 -0400 @@ -49,7 +49,9 @@ return new VoidPluginCallRequest(message, returnString); } else if (id == "window") { return new GetWindowPluginCallRequest(message, returnString); - } else { + } else if (id == "proxyinfo") { + return new PluginProxyInfoRequest(message, returnString); + } else { throw new RuntimeException ("Unknown plugin call request type requested from factory"); } diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginMain.java --- a/plugin/icedtea/sun/applet/PluginMain.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginMain.java Mon Mar 16 15:22:19 2009 -0400 @@ -67,15 +67,17 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.net.Socket; +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.net.ProxySelector; import java.util.Enumeration; +import java.util.HashMap; import java.util.Properties; +import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; - -import javax.net.ssl.HttpsURLConnection; import net.sourceforge.jnlp.security.VariableX509TrustManager; @@ -212,6 +214,10 @@ System.err.println("Unable to set SSLSocketfactory (may _prevent_ access to sites that should be trusted)! Continuing anyway..."); e.printStackTrace(); } + + // plug in a custom authenticator and proxy selector + Authenticator.setDefault(new CustomAuthenticator()); + ProxySelector.setDefault(new PluginProxySelector()); } static boolean messageAvailable() { @@ -220,6 +226,26 @@ static String getMessage() { return streamHandler.getMessage(); + } + + static class CustomAuthenticator extends Authenticator { + + public PasswordAuthentication getPasswordAuthentication() { + + // No security check is required here, because the only way to + // set parameters for which auth info is needed + // (Authenticator:requestPasswordAuthentication()), has a security + // check + + String type = this.getRequestorType() == RequestorType.PROXY ? "proxy" : "web"; + + // request auth info from user + PasswordAuthenticationDialog pwDialog = new PasswordAuthenticationDialog(); + PasswordAuthentication auth = pwDialog.askUser(this.getRequestingHost(), this.getRequestingPort(), this.getRequestingPrompt(), type); + + // send it along + return auth; + } } /** @@ -264,7 +290,9 @@ @Override public void write(byte[] buf, int off, int len) { logFile.write(buf, off, len); - super.write(buf, off, len); + + if (!redirectStreams) + super.write(buf, off, len); } @Override diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginProxyInfoRequest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PluginProxyInfoRequest.java Mon Mar 16 15:22:19 2009 -0400 @@ -0,0 +1,85 @@ +/* PluginProxyInfoRequest -- Object representing a request for proxy information from the browser + Copyright (C) 2009 Red Hat + +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; either version 2, or (at your option) +any later version. + +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 sun.applet; + +import java.net.MalformedURLException; +import java.net.URI; + +/** + * This class represents a request object for proxy information for a given URI + */ + +public class PluginProxyInfoRequest extends PluginCallRequest { + + URI internal = null; + + public PluginProxyInfoRequest(String message, String returnString) { + super(message, returnString); + } + + public void parseReturn(String proxyInfo) { + + // try to parse the proxy information. If things go wrong, do nothing .. + // this will keep internal = null which forces a direct connection + + PluginDebug.debug ("PluginProxyInfoRequest GOT: " + proxyInfo); + String[] messageComponents = proxyInfo.split(" "); + + try { + internal = new URI(messageComponents[2], null, messageComponents[3], Integer.parseInt(messageComponents[4]), null, null, null); + } catch (Exception e) { + // do nothing + } + + setDone(true); + } + + /** + * Returns whether the given message is serviceable by this object + * + * @param message The message to service + * @return boolean indicating if message is serviceable + */ + public boolean serviceable(String message) { + return message.startsWith("plugin ProxyInfo"); + } + + public URI getObject() { + return this.internal; + } +} diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginProxySelector.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PluginProxySelector.java Mon Mar 16 15:22:19 2009 -0400 @@ -0,0 +1,195 @@ +/* PluginProxySelector -- proxy selector for all connections from applets and the plugin + Copyright (C) 2009 Red Hat + +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; either version 2, or (at your option) +any later version. + +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 sun.applet; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.Proxy; +import java.net.ProxySelector; +import java.net.SocketAddress; +import java.net.URI; +import java.util.Date; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Proxy selector implementation for plugin network functions. + * + * This class fetches proxy information from the web browser and + * uses that information in the context of all network connection + * (plugin specific and applet connections) as applicable + * + */ + +public class PluginProxySelector extends ProxySelector { + + private TimedHashMap proxyCache = new TimedHashMap(); + + + @Override + public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { + // If the connection fails, there is little we can do here. Just print the exception + ioe.printStackTrace(); + } + + /** + * Selects the appropriate proxy (or DIRECT connection method) for the given URI + * + * @param uri The URI being accessed + * @return A list of Proxy objects that are usable for this URI + */ + @Override + public List select(URI uri) { + + List proxyList = new ArrayList(); + + // check cache first + Proxy cachedProxy = checkCache(uri); + if (cachedProxy != null) { + proxyList.add(cachedProxy); + return proxyList; + } + + // Nothing usable in cache. Fetch info from browser + Proxy proxy = Proxy.NO_PROXY; + Object o = PluginAppletViewer.requestPluginProxyInfo(uri); + + // If the browser returned anything, try to parse it. If anything in the try block fails, the fallback is direct connection + try { + if (o != null) { + PluginDebug.debug("Proxy URI = " + o); + URI proxyURI = (URI) o; + + // If origin uri is http/ftp, we're good. If origin uri is not that, the proxy _must_ be socks, else we fallback to direct + if (uri.getScheme().startsWith("http") || uri.getScheme().equals("ftp") || proxyURI.getScheme().startsWith("socks")) { + + Proxy.Type type = proxyURI.getScheme().equals("http") ? Proxy.Type.HTTP : Proxy.Type.SOCKS; + InetSocketAddress socketAddr = new InetSocketAddress(proxyURI.getHost(), proxyURI.getPort()); + + proxy = new Proxy(type, socketAddr); + + String uriKey = uri.getScheme() + "://" + uri.getHost(); + proxyCache.put(uriKey, proxy); + } else { + PluginDebug.debug("Proxy " + proxyURI + " cannot be used for " + uri + ". Falling back to DIRECT"); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + proxyList.add(proxy); + + PluginDebug.debug("Proxy for " + uri.toString() + " is " + proxy); + + return proxyList; + } + + /** + * Checks to see if proxy information is already cached. + * + * @param uri The URI to check + * @return The cached Proxy. null if there is no suitable cached proxy. + */ + private Proxy checkCache(URI uri) { + + String uriKey = uri.getScheme() + "://" + uri.getHost(); + if (proxyCache.get(uriKey) != null) { + return proxyCache.get(uriKey); + } + + return null; + } + + /** + * Simple utility class that extends HashMap by adding an expiry to the entries. + * + * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds + * + * @param The key type + * @param The Object type + */ + + private class TimedHashMap extends HashMap { + + HashMap timeStamps = new HashMap(); + Long expiry = 10000L; + + /** + * Store the item in the map and associate a timestamp with it + * + * @param key The key + * @param value The value to store + */ + public V put(K key, V value) { + timeStamps.put(key, new Date().getTime()); + return super.put(key, value); + } + + /** + * Return cached item if it has not already expired. + * + * Before returning, this method also resets the "last accessed" + * time for this entry, so it is good for another 10 seconds + * + * @param key The key + */ + public V get(Object key) { + + Long now = new Date().getTime(); + + if (super.containsKey(key)) { + Long age = now - timeStamps.get(key); + + // Item exists. If it has not expired, renew its access time and return it + if (age <= expiry) { + PluginDebug.debug("Returning proxy " + super.get(key) + " from cache for " + key); + timeStamps.put((K) key, (new Date()).getTime()); + return super.get(key); + } else { + PluginDebug.debug("Proxy cache for " + key + " has expired (age=" + age/1000.0 + " seconds)"); + } + } + + return null; + } + } + +} diff -r ebdc89c68af2 plugin/icedtea/sun/applet/PluginStreamHandler.java --- a/plugin/icedtea/sun/applet/PluginStreamHandler.java Fri Mar 13 17:02:59 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginStreamHandler.java Mon Mar 16 15:22:19 2009 -0400 @@ -134,7 +134,7 @@ long b4 = new Date().getTime(); String s = read(); - + long after = new Date().getTime(); totalWait += (after - b4); @@ -228,7 +228,12 @@ if (msgComponents.length < 2) return; - + + if (msgComponents[0].startsWith("plugin")) { + handlePluginMessage(message); + return; + } + // type and identifier are guaranteed to be there String type = msgComponents[0]; final int identifier = Integer.parseInt(msgComponents[1]); @@ -295,6 +300,17 @@ } catch (Exception e) { throw new PluginException(this, identifier, reference, e); } + } + + private void handlePluginMessage(String message) { + if (message.equals("plugin showconsole")) { + showConsole(); + } else if (message.equals("plugin hideconsole")) { + hideConsole(); + } else { + // else this is something that was specifically requested + finishCallRequest(message); + } } public void postCallRequest(PluginCallRequest request) { @@ -382,10 +398,6 @@ AppletSecurityContextManager.dumpStore(0); PluginDebug.debug("APPLETVIEWER: exiting appletviewer"); System.exit(0); - } else if (message.equals("showconsole")) { - showConsole(); - } else if (message.equals("hideconsole")) { - hideConsole(); } } catch (IOException e) { e.printStackTrace(); diff -r ebdc89c68af2 rt/net/sourceforge/jnlp/JNLPFile.java --- a/rt/net/sourceforge/jnlp/JNLPFile.java Fri Mar 13 17:02:59 2009 -0400 +++ b/rt/net/sourceforge/jnlp/JNLPFile.java Mon Mar 16 15:22:19 2009 -0400 @@ -106,7 +106,7 @@ // null values will still work, and app can set defaults later } } - + /** * Empty stub, allowing child classes to override the constructor */ diff -r ebdc89c68af2 rt/net/sourceforge/jnlp/NetxPanel.java --- a/rt/net/sourceforge/jnlp/NetxPanel.java Fri Mar 13 17:02:59 2009 -0400 +++ b/rt/net/sourceforge/jnlp/NetxPanel.java Mon Mar 16 15:22:19 2009 -0400 @@ -42,6 +42,7 @@ private boolean exitOnFailure = true; private AppletInstance appInst = null; private String cookieStr; + private boolean appletAlive; public NetxPanel(URL documentURL, Hashtable atts) { @@ -54,6 +55,7 @@ this(documentURL, atts); this.exitOnFailure = exitOnFailure; this.cookieStr = cookieStr; + this.appletAlive = true; } //Overriding to use Netx classloader. You might need to relax visibility @@ -121,10 +123,11 @@ validate(); } } catch (Exception e) { + this.appletAlive = false; e.printStackTrace(); } } - + // Reminder: Relax visibility in sun.applet.AppletPanel protected synchronized void createAppletThread() { handler = new Thread(this); @@ -139,5 +142,9 @@ public ClassLoader getAppletClassLoader() { return appInst.getClassLoader(); } + + public boolean isAlive() { + return handler.isAlive() && this.appletAlive; + } } From omajid at redhat.com Mon Mar 16 14:16:26 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 16 Mar 2009 17:16:26 -0400 Subject: [FYI] Fix sun/tools/jhat/HatHeapDump1Test.java Message-ID: <49BEC1AA.3050105@redhat.com> Hi, This patch fixes the sun/tools/jhat/HatHeapDump1Test.java test by passing the current classpath to the jvm spawned in HatRun.java Changelog: 2009-03-16 Omair Majid * patches/icedtea-jtreg-hatrun.patch: New patch. Fixes sun/tools/jhat/HatHeapDump1Test.java by passing the classpath to the new jvm. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: hatrun.patch Type: text/x-patch Size: 3069 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090316/55316575/hatrun.patch From omajid at redhat.com Mon Mar 16 14:19:00 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 16 Mar 2009 21:19:00 +0000 Subject: changeset in /hg/icedtea6: 2009-03-16 Omair Majid changeset 33c8fa162aae in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=33c8fa162aae description: 2009-03-16 Omair Majid * patches/icedtea-jtreg-hatrun.patch: New patch. Fixes sun/tools/jhat/HatHeapDump1Test.java by passing the classpath to the new jvm. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. diffstat: 4 files changed, 53 insertions(+) ChangeLog | 8 ++++++ HACKING | 1 Makefile.am | 1 patches/icedtea-jtreg-hatrun.patch | 43 ++++++++++++++++++++++++++++++++++++ diffs (84 lines): diff -r 1b405ec97753 -r 33c8fa162aae ChangeLog --- a/ChangeLog Sat Mar 14 17:13:20 2009 +0100 +++ b/ChangeLog Mon Mar 16 17:17:23 2009 -0400 @@ -1,3 +1,11 @@ 2009-03-14 Matthias Klose + + * patches/icedtea-jtreg-hatrun.patch: New patch. Fixes + sun/tools/jhat/HatHeapDump1Test.java by passing the classpath to the new + jvm. + * Makefile.am (ICEDTEA_PATCHES): Apply the above. + * HACKING: Document the above. + 2009-03-14 Matthias Klose * patches/icedtea-s390-noinline.patch: Add special flags for javac on diff -r 1b405ec97753 -r 33c8fa162aae HACKING --- a/HACKING Sat Mar 14 17:13:20 2009 +0100 +++ b/HACKING Mon Mar 16 17:17:23 2009 -0400 @@ -87,6 +87,7 @@ The following patches are currently appl * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295). * icedtea-jtreg-6592792.patch: Fix jtreg test for bug 6592792 so that it compiles. * icedtea-s390-noinline.patch: Add special flags for javac on s390 to work around a VM problem with bad code generation during inlining. +* icedtea-jtreg-hatrun.patch: Fix jhat test by passing the classpath to the new jvm in HatRun.java. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r 1b405ec97753 -r 33c8fa162aae Makefile.am --- a/Makefile.am Sat Mar 14 17:13:20 2009 +0100 +++ b/Makefile.am Mon Mar 16 17:17:23 2009 -0400 @@ -664,6 +664,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-xml-encodinginfo.patch \ patches/icedtea-jtreg-6592792.patch \ patches/icedtea-s390-noinline.patch \ + patches/icedtea-jtreg-hatrun.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r 1b405ec97753 -r 33c8fa162aae patches/icedtea-jtreg-hatrun.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jtreg-hatrun.patch Mon Mar 16 17:17:23 2009 -0400 @@ -0,0 +1,43 @@ +--- openjdk/jdk/test/sun/tools/jhat/HatRun.java.orig 2009-03-16 15:01:45.000000000 -0400 ++++ openjdk/jdk/test/sun/tools/jhat/HatRun.java 2009-03-16 15:05:06.000000000 -0400 +@@ -161,6 +161,7 @@ + public void runit(String class_name, String vm_options[]) + { + String jre_home = System.getProperty("java.home"); ++ String classpath = System.getProperty("java.class.path"); + String sdk_home = (jre_home.endsWith("jre") ? + (jre_home + File.separator + "..") : + jre_home ); +@@ -176,21 +177,25 @@ + + File.separator + "jhat"; + /* Array of strings to be passed in for exec: + * 1. java +- * 2. -Dtest.classes=. +- * 3. -d64 (optional) +- * 4. -Xcheck:jni (Just because it finds bugs) +- * 5. -Xverify:all (Make sure verification is on full blast) +- * 6. -agent ++ * 2. -cp ++ * 3. classpath ++ * 4. -Dtest.classes=. ++ * 5. -d64 (optional) ++ * 6. -Xcheck:jni (Just because it finds bugs) ++ * 7. -Xverify:all (Make sure verification is on full blast) ++ * 8. -agent + * vm_options +- * 7+i. classname ++ * 9+i. classname + */ + int nvm_options = 0; + if ( vm_options != null ) nvm_options = vm_options.length; +- String cmd[] = new String[1 + (d64?1:0) + 5 + nvm_options]; ++ String cmd[] = new String[1 + (d64?1:0) + 7 + nvm_options]; + int i,j; + + i = 0; + cmd[i++] = java; ++ cmd[i++] = "-cp"; ++ cmd[i++] = classpath; + cmd[i++] = "-Dtest.classes=" + cdir; + if ( d64 ) { + cmd[i++] = "-d64"; From gnu_andrew at member.fsf.org Mon Mar 16 16:17:39 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 16 Mar 2009 23:17:39 +0000 Subject: RFC: Proxy support for IcedTea Java Plugin In-Reply-To: <20090316193413.GC9093@redhat.com> References: <20090313215503.GA9518@redhat.com> <17c6771e0903131607x388a1398lb416527d2ef8ff43@mail.gmail.com> <20090316193413.GC9093@redhat.com> Message-ID: <17c6771e0903161617r117c4e0ew315df45c3c7ec0f9@mail.gmail.com> 2009/3/16 Deepak Bhole : > * Andrew John Hughes [2009-03-13 19:07]: >> 2009/3/13 Deepak Bhole : >> > Hi, >> > >> > Attached patch adds proxy support to the IcedTea plugin. >> > >> > With this patch, the plugin can now read proxy settings from the browser >> > and use those to connect to the remote server for fetching jars, >> > applet communication (SOCKS proxy), etc. The patch also adds support >> > for proxy (and web) servers that require http authentication by >> > displaying a credential input dialog to the user. >> > >> >> Haven't tested this so these comments are just from reading the code. >> Someone else should (maybe the user who reported this issue?), and I >> hope you have! Generally looks ok. ?Main issue I can see is that the >> password is being output several times to the console. ?This should be >> removed. > > That was only in inactive WIP code. I removed all print lines for > credentials from live code. Since the unused code is gone, this is no > longer an issue. Auth info is now printed from the Main method of > PasswordAuthenticationDialog only, which is never called from plugin code. > PasswordAuthenticationDialog::main() is a testing only function, so it is > okay there. > Ah good. I wasn't sure which bits were active and inactive before, so the dead code was also making it a bit harder to review! Much easier this time :) >> Few other minor issues: >> * Use a StringBuilder rather than a StringBuffer to construct the >> String in CustomAuthenticator. ?StringBuffer has unnecessary >> synchronisation. > > This was in the unused part of the code, so it is gone now. Good to know > about StringBuffer vs Builder though.. I'll use that in the future :) > I imagine HotSpot is clever enough to use escape analysis and get rid of the synchronisation, but it's more reliable to just StringBuilder. >> * A few lines are a bit too long and should have line breaks to make >> the code easier to read. > > Very little of the plugin code is line wrapped and I didn't want > to mix wrapped/unwrapped, so I did not wrap at all. Is the 80 char > limit part of the general guidelines? I don't mind doing it... just > didn't seem like something worth going out of the way for. > I don't think we have any official guidelines for IcedTea as such... I tend to go by the GNU Classpath ones, which do include an 80 char limit. But as I said, these are just minor things - I certainly wouldn't go to the length of changing all the plugin code unless you have a lot of time on your hands! That said, making it worse doesn't help either and there were just one or two places in this code that had an issue. >> >> > Initially I also started adding support for fetching cached authentication >> > information from mozilla directly, but then I decided to disable it as >> > it felt like a security risk to pass usernames/passwords over a FIFO >> > pipe. If the communication system is changed in the future, that code >> > can be enabled again. It is about 80% done. >> > >> >> Can you remove this dead code from the patch and keep it to one-side >> separately? ?It's a bad idea to have dead code hanging around, and >> worse when it's potentially open for exploit like this. >> > > Sure, I have removed it all. > Thanks! >> > In addition, there are a few minor fixes here and there -- see ChangeLog >> > diff for more details. >> > >> >> Please do these in a separate patch. ?It's easier to track down bugs >> later if each changeset only makes one change. ?They are trivial >> enough to just go straight in. >> > > Normally that is what I'd do, but in this case they are needed for > proxy support to work properly (e.g. removing the time wait fix will > cause the browser to hang if one cancels plugin auth dialog..). > That's fine, then. That wasn't clear from your original mail. >> As Andrew already mentioned, you don't include the ChangeLog in the >> patch itself but rather in the email, as it generally won't apply >> locally for other users. >> > > Oops, will keep it in mind next time. > You'll get used to doing it ;) > New patch (sans changelog and dead code) attached. > Looks ok, just spotted one minor issue: + Long now = new Date().getTime(); + + if (super.containsKey(key)) { + Long age = now - timeStamps.get(key); Why Long and not long? This would seem to do an unnecessary amount of boxing and unboxing: Long now = Long.valueOf(new Date().getTime()); if (super.containsKey(key)) { Long age = Long.valueOf(now.longValue() - timeStamps.get(key).longValue()); whereas with a long you'd only be using longValue() on the return value of timeStamps.get(key). > Thanks for reviewing! > No problem! :) > Cheers, > Deepak > Cheers, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) 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 Mon Mar 16 19:34:57 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 17 Mar 2009 02:34:57 +0000 Subject: [Bug 306] New: Azureus crashed after resuming from hibernate Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=306 Summary: Azureus crashed after resuming from hibernate Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: icedtea-bugs at cryptobitch.de Well, Azureus crashes often right after resuming from hibernate. # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fd64abec31f, pid=7754, tid=140555991669072 # # Java VM: OpenJDK 64-Bit Server VM (14.0-b08 mixed mode linux-amd64 ) # Distribution: Custom build (Mon Feb 2 07:40:49 EST 2009) # Problematic frame: # V [libjvm.so+0x25731f] # # An error report file with more information is saved as: # /home/muelli/hs_err_pid7754.log # # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # Stack: [0x00007fd5bde45000,0x00007fd5bdf46000], sp=0x00007fd5bdf43320, free space=1016k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x25731f] V [libjvm.so+0x25861f] V [libjvm.so+0x258e77] V [libjvm.so+0x258f51] V [libjvm.so+0x243d0d] V [libjvm.so+0x5683bd] V [libjvm.so+0x223e48] V [libjvm.so+0x2908a5] V [libjvm.so+0x222cfb] V [libjvm.so+0x2952ed] V [libjvm.so+0x2958ef] V [libjvm.so+0x6361ad] V [libjvm.so+0x54bb50] Current CompileTask: C2: 76% ! com.aelitis.net.udp.uc.impl.PRUDPPacketHandlerImpl$5.runSupport()V @ 36 (385 bytes) I'll attach the whole file ASAP -- 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 Mon Mar 16 19:35:31 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 17 Mar 2009 02:35:31 +0000 Subject: [Bug 306] Azureus crashed after resuming from hibernate Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=306 ------- Comment #1 from icedtea-bugs at cryptobitch.de 2009-03-17 02:35 ------- Created an attachment (id=172) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=172&action=view) crash report -- 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 Mon Mar 16 19:36:19 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 17 Mar 2009 02:36:19 +0000 Subject: [Bug 306] Azureus crashed after resuming from hibernate Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=306 ------- Comment #2 from icedtea-bugs at cryptobitch.de 2009-03-17 02:36 ------- oh, I have tons of those files lying around in my home folder, so it crashes often, but not everytime I hibernate/resume. -- 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 Mar 17 06:24:07 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 17 Mar 2009 13:24:07 +0000 Subject: [Bug 307] New: StackOverflowError building xom-1.1 on ix86 hotspot (server & client) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=307 Summary: StackOverflowError building xom-1.1 on ix86 hotspot (server & client) Product: IcedTea Version: unspecified Platform: PC URL: https://launchpad.net/bugs/329903 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com seen with IcedTea 1.4.1 on ix86, works on amd64, works on ix86 using the Cacao JVM. compile-core: [javac] Compiling 239 source files to /build/buildd/xom-1.1/build/classes [javac] [javac] [javac] The system is out of resources. [javac] Consult the following stack trace for details. [javac] java.lang.StackOverflowError [javac] at com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:792) [javac] at com.sun.tools.javac.parser.Parser.term3(Parser.java:883) [javac] at com.sun.tools.javac.parser.Parser.term2(Parser.java:699) [javac] at com.sun.tools.javac.parser.Parser.term1(Parser.java:670) [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:626) [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:608) [javac] at com.sun.tools.javac.parser.Parser.expression(Parser.java:598) [javac] at com.sun.tools.javac.parser.Parser.arguments(Parser.java:1172) [javac] at com.sun.tools.javac.parser.Parser.arguments(Parser.java:1187) [javac] at com.sun.tools.javac.parser.Parser.term3(Parser.java:1003) [javac] at com.sun.tools.javac.parser.Parser.term2(Parser.java:699) [javac] at com.sun.tools.javac.parser.Parser.term1(Parser.java:670) [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:626) [javac] at com.sun.tools.javac.parser.Parser.term(Parser.java:608) [javac] at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1580) [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1497) [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1511) [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1641) [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1645) [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1649) [javac] at com.sun.tools.javac.parser.Parser.statement(Parser.java:1649) repeated some hundred times [javac] at com.sun.tools.javac.parser.Parser.blockStatements(Parser.java:1534) [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1497) [javac] at com.sun.tools.javac.parser.Parser.block(Parser.java:1511) [javac] at com.sun.tools.javac.parser.Parser.methodDeclaratorRest(Parser.java:2566) [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceBodyDeclaration(Parser.java:2515) [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceBody(Parser.java:2442) [javac] at com.sun.tools.javac.parser.Parser.classDeclaration(Parser.java:2287) [javac] at com.sun.tools.javac.parser.Parser.classOrInterfaceOrEnumDeclaration(Parser.java:2225) [javac] at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2214) [javac] at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2160) [javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:523) [javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:564) [javac] at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:815) [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:741) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:380) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:306) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:297) [javac] at com.sun.tools.javac.Main.compile(Main.java:82) [javac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [javac] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [javac] at java.lang.reflect.Method.invoke(Method.java:616) [javac] at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56) [javac] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1065) [javac] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882) [javac] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [javac] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [javac] at java.lang.reflect.Method.invoke(Method.java:616) [javac] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [javac] at org.apache.tools.ant.Task.perform(Task.java:348) [javac] at org.apache.tools.ant.Target.execute(Target.java:357) [javac] at org.apache.tools.ant.Target.performTasks(Target.java:385) [javac] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) [javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [javac] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [javac] at org.apache.tools.ant.Project.executeTargets(Project.java:1189) [javac] at org.apache.tools.ant.Main.runBuild(Main.java:758) [javac] at org.apache.tools.ant.Main.startAnt(Main.java:217) [javac] at org.apache.tools.ant.Main.start(Main.java:179) [javac] at org.apache.tools.ant.Main.main(Main.java:268) BUILD FAILED /build/buildd/xom-1.1/build.xml:201: Compile failed; see the compiler error output for details. -- 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 Mar 17 06:39:35 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 17 Mar 2009 13:39:35 +0000 Subject: [Bug 307] StackOverflowError building xom-1.1 on ix86 hotspot (server & client) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=307 ------- Comment #1 from doko at ubuntu.com 2009-03-17 13:39 ------- sources, including used jar files at http://people.ubuntu.com/~doko/tmp/xom.tar.bz2 adjust and call the do-build.sh -- 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 Mar 17 14:20:31 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 17 Mar 2009 17:20:31 -0400 Subject: [FYI] Exclude more tests from IcedTea6 Message-ID: <49C0141F.3070500@redhat.com> Hi, This patch adds more tests to the exclude list. ChangeLog: 2009-03-17 Omair Majid * test/jtreg/excludelist.jdk.jtx: Add java/nio/channels/DatagramChannel/AdaptDatagramSocket.java and sun/net/idn/TestStringPrep.java to exclude list. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: exclude-tests.patch Type: text/x-patch Size: 871 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090317/b9148c73/exclude-tests.patch From omajid at redhat.com Tue Mar 17 14:21:42 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 17 Mar 2009 21:21:42 +0000 Subject: changeset in /hg/icedtea6: 2009-03-17 Omair Majid changeset 3e8846035a79 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3e8846035a79 description: 2009-03-17 Omair Majid * test/jtreg/excludelist.jdk.jtx: Add java/nio/channels/DatagramChannel/AdaptDatagramSocket.java and sun/net/idn/TestStringPrep.java to exclude list. diffstat: 2 files changed, 18 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ test/jtreg/excludelist.jdk.jtx | 13 ++++++++++++- diffs (41 lines): diff -r 33c8fa162aae -r 3e8846035a79 ChangeLog --- a/ChangeLog Mon Mar 16 17:17:23 2009 -0400 +++ b/ChangeLog Tue Mar 17 17:21:01 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-16 Omair Majid + + * test/jtreg/excludelist.jdk.jtx: Add + java/nio/channels/DatagramChannel/AdaptDatagramSocket.java and + sun/net/idn/TestStringPrep.java to exclude list. + 2009-03-16 Omair Majid * patches/icedtea-jtreg-hatrun.patch: New patch. Fixes diff -r 33c8fa162aae -r 3e8846035a79 test/jtreg/excludelist.jdk.jtx --- a/test/jtreg/excludelist.jdk.jtx Mon Mar 16 17:17:23 2009 -0400 +++ b/test/jtreg/excludelist.jdk.jtx Tue Mar 17 17:21:01 2009 -0400 @@ -1,5 +1,5 @@ # Exclude list for jdk tests. These tests require binary plugs to pass, or are -# incorrect/obsolete +# incorrect/obsolete, or require special setup. # # Binary plugs @@ -8,6 +8,17 @@ # snmp is not available in openjdk6 com/sun/jmx/snmp/SnmpOidHashCode.java com/sun/jmx/snmp/TimeTicksWrapping.java +# requires missing input files nfscsi.spp, nfscss.spp, nfscis.spp, nfsmxp.spp, +# and nfsmxs.spp +sun/net/idn/TestStringPrep.java + +# +# Special setup required +# + +# this test sends udp packets and requires the name of a remote host with a +# tcp (not icmp) echo server running +java/nio/channels/DatagramChannel/AdaptDatagramSocket.java # # Obsolete From bugzilla-daemon at icedtea.classpath.org Wed Mar 18 13:31:31 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 18 Mar 2009 20:31:31 +0000 Subject: [Bug 307] StackOverflowError building xom-1.1 on ix86 hotspot (server & client) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=307 ------- Comment #2 from omajid at redhat.com 2009-03-18 20:31 ------- Created an attachment (id=173) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=173&action=view) Script to build a simpler test case javac uses recursion to parse the source file; the large number of 'else' statements in /src/nu/xom/UnicodeUtil.java cause a StackOverflowError in the jvm. The attached script produces a simpler testcase. -- 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 Mar 18 14:16:31 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 18 Mar 2009 21:16:31 +0000 Subject: [Bug 307] StackOverflowError building xom-1.1 on ix86 hotspot (server & client) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=307 ------- Comment #3 from omajid at redhat.com 2009-03-18 21:16 ------- doing a $ export ANT_OPTS=-Xss1024k and then running ant fixes the problem for me -- 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 Mar 18 14:38:03 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 18 Mar 2009 21:38:03 +0000 Subject: [Bug 307] StackOverflowError building xom-1.1 on ix86 hotspot (server & client) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=307 ------- Comment #4 from mark at klomp.org 2009-03-18 21:38 ------- UnicodeUtil.java is a classic compiler torture test. From: http://cafe.elharo.com/blogroll/eclipse-classpath-insanity/ Eclipse failed to compile one file in nu.xom, UnicodeUtil. That one file is extremely challenging and a real torture test for various tools. It includes some huge lookup tables that cause stack overflows in weak compilers and analyzers. It is legal Java code, and it fits within the bounds of maximum method size, but just barely. Eclipse used to be able to compile it, but it?s been weakening from milestone to milestone. A lot of tools can?t handle this class, and it looks likes between 3.2M4 or thereabouts and 3.2 final Eclipse joined that number. Previously it couldn?t analyze that class, but at least it could compile it. Now it can?t even compile 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 gbenson at redhat.com Thu Mar 19 03:48:20 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:20 +0000 Subject: changeset in /hg/icedtea: 2009-02-27 Gary Benson changeset f1cf5f359a35 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f1cf5f359a35 description: 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::maybe_inline_call): Ensure the holder is linked before trying to inline accessors. diffstat: 2 files changed, 10 insertions(+) ChangeLog | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 4 ++++ diffs (27 lines): diff -r 073c27894e5d -r f1cf5f359a35 ChangeLog --- a/ChangeLog Fri Feb 27 10:58:54 2009 -0500 +++ b/ChangeLog Fri Feb 27 16:09:25 2009 +0000 @@ -1,3 +1,9 @@ 2009-02-27 Tomas Hurka + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_inline_call): Ensure the holder is + linked before trying to inline accessors. + 2009-02-27 Tomas Hurka * Makefile.am: Removed redundant creation of netbeans dir. diff -r 073c27894e5d -r f1cf5f359a35 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 10:58:54 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 16:09:25 2009 +0000 @@ -2095,6 +2095,10 @@ bool SharkBlock::maybe_inline_call(ciMet // now if the method is too big if (method->code_size() > 5) return false; + + // If the holder isn't linked then there isn't a lot we can do + if (!method->holder()->is_linked()) + return false; // Inspect the method's code to see if we can inline it. We // don't use method->is_accessor() because that only spots From dbhole at redhat.com Thu Mar 19 03:48:18 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 19 Mar 2009 10:48:18 +0000 Subject: changeset in /hg/icedtea: - Escape URL before passing it from Ja... Message-ID: changeset 29fdac532dd0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=29fdac532dd0 description: - Escape URL before passing it from Java to Mozilla - Reduce delay on the "waiting for applet to initialize" message - Fix parser to handle "java:" in code attributes - rhbz# 487452 - Send stdout/stderr messages to console only in non-debug mode diffstat: 4 files changed, 59 insertions(+), 24 deletions(-) ChangeLog | 9 +++ IcedTeaPlugin.cc | 13 ++++- plugin/icedtea/sun/applet/PluginAppletViewer.java | 53 ++++++++++++--------- plugin/icedtea/sun/applet/PluginMain.java | 8 ++- diffs (174 lines): diff -r ecbd78fe74dc -r 29fdac532dd0 ChangeLog --- a/ChangeLog Thu Feb 26 14:12:08 2009 -0500 +++ b/ChangeLog Thu Feb 26 15:40:28 2009 -0500 @@ -1,3 +1,12 @@ 2009-02-26 Omair Majid + + * IcedTeaPlugin.cc: Decode url via nsINetUtil::UnescapeString() + * plugin/icedtea/sun/applet/PluginAppletViewer.java: Encode URL before + sending it to mozilla. Increment timeout for initialization message. Fix + parser to handle "java:" in code attribute. + * plugin/icedtea/sun/applet/PluginMain.java: Tee outputstream only if not + in debug mode. + 2009-02-26 Omair Majid * patches/icedtea-xml-encodinginfo.patch: New file. Fix possible diff -r ecbd78fe74dc -r 29fdac532dd0 IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Thu Feb 26 14:12:08 2009 -0500 +++ b/IcedTeaPlugin.cc Thu Feb 26 15:40:28 2009 -0500 @@ -2885,6 +2885,7 @@ IcedTeaPluginFactory::OnInputStreamReady } #include +#include void IcedTeaPluginFactory::HandleMessage (nsCString const& message) @@ -2968,7 +2969,17 @@ IcedTeaPluginFactory::HandleMessage (nsC if (instance != 0) { space = rest.FindChar (' '); - nsDependentCSubstring url = Substring (rest, 0, space); + nsDependentCSubstring escapedUrl = Substring (rest, 0, space); + + nsresult rv; + nsCOMPtr net_util = do_GetService(NS_NETUTIL_CONTRACTID, &rv); + + if (!net_util) + printf("Error instantiating NetUtil service.\n"); + + nsDependentCSubstring url; + net_util->UnescapeString(escapedUrl, 0, url); + nsDependentCSubstring target = Substring (rest, space + 1); nsCOMPtr ownerGetter = do_QueryInterface (instance->peer); diff -r ecbd78fe74dc -r 29fdac532dd0 plugin/icedtea/sun/applet/PluginAppletViewer.java --- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Thu Feb 26 14:12:08 2009 -0500 +++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Thu Feb 26 15:40:28 2009 -0500 @@ -99,6 +99,8 @@ import java.util.Vector; import javax.swing.SwingUtilities; +import com.sun.jndi.toolkit.url.UrlUtil; + import net.sourceforge.jnlp.NetxPanel; import net.sourceforge.jnlp.runtime.JNLPClassLoader; import sun.awt.AppContext; @@ -309,7 +311,7 @@ import sun.misc.Ref; Applet a; while ((a = panel.getApplet()) == null && panel.getAppletHandlerThread().isAlive()) { try { - Thread.sleep(100); + Thread.sleep(2000); PluginDebug.debug("Waiting for applet to initialize... "); } catch (InterruptedException ie) { ie.printStackTrace(); @@ -493,7 +495,7 @@ import sun.misc.Ref; // (happens in a separate thread) while ((o = panel.getApplet()) == null && panel.getAppletHandlerThread().isAlive()) { try { - Thread.sleep(100); + Thread.sleep(2000); PluginDebug.debug("Waiting for applet to initialize..."); } catch (InterruptedException ie) { ie.printStackTrace(); @@ -765,7 +767,7 @@ import sun.misc.Ref; public void showDocument(URL url, String target) { try { // FIXME: change to postCallRequest - write("url " + url + " " + target); + write("url " + UrlUtil.encode(url.toString(), "UTF-8") + " " + target); } catch (IOException exception) { // Deliberately ignore IOException. showDocument may be // called from threads other than the main thread after @@ -1606,12 +1608,15 @@ import sun.misc.Ref; isAppletTag = true; atts = scanTag(in); - // If there is a classid present, transform it to code tag - if (atts.get("code") == null && atts.get("classid") != null && - ((String) atts.get("classid")).startsWith("java:")) { - //skip "java:" - atts.put("code", ((String) atts.get("classid")).substring(5)); - } + // If there is a classid and no code tag present, transform it to code tag + if (atts.get("code") == null && atts.get("classid") != null) { + atts.put("code", atts.get("classid")); + } + + // remove java: from code tag + if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) { + atts.put("code", ((String) atts.get("code")).substring(5)); + } if (atts.get("code") == null && atts.get("object") == null) { statusMsgStream.println(appletRequiresCodeWarning); @@ -1640,12 +1645,15 @@ import sun.misc.Ref; isObjectTag = true; atts = scanTag(in); - // If there is a classid present, transform it to code tag - if (atts.get("code") == null && atts.get("classid") != null && - ((String) atts.get("classid")).startsWith("java:")) { - //skip "java:" - atts.put("code", ((String) atts.get("classid")).substring(5)); - } + // If there is a classid and no code tag present, transform it to code tag + if (atts.get("code") == null && atts.get("classid") != null) { + atts.put("code", atts.get("classid")); + } + + // remove java: from code tag + if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) { + atts.put("code", ((String) atts.get("code")).substring(5)); + } // java_* aliases override older names: // http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-ie @@ -1698,12 +1706,15 @@ import sun.misc.Ref; isEmbedTag = true; atts = scanTag(in); - // If there is a classid present, transform it to code tag - if (atts.get("code") == null && atts.get("classid") != null && - ((String) atts.get("classid")).startsWith("java:")) { - //skip "java:" - atts.put("code", ((String) atts.get("classid")).substring(5)); - } + // If there is a classid and no code tag present, transform it to code tag + if (atts.get("code") == null && atts.get("classid") != null) { + atts.put("code", atts.get("classid")); + } + + // remove java: from code tag + if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) { + atts.put("code", ((String) atts.get("code")).substring(5)); + } // java_* aliases override older names: // http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-nav diff -r ecbd78fe74dc -r 29fdac532dd0 plugin/icedtea/sun/applet/PluginMain.java --- a/plugin/icedtea/sun/applet/PluginMain.java Thu Feb 26 14:12:08 2009 -0500 +++ b/plugin/icedtea/sun/applet/PluginMain.java Thu Feb 26 15:40:28 2009 -0500 @@ -270,13 +270,17 @@ public class PluginMain @Override public void write(int b) { logFile.write(b); - super.write(b); + + if (!redirectStreams) + super.write(b); } @Override public void write(byte[] b) throws IOException { logFile.write(b); - super.write(b); + + if (!redirectStreams) + super.write(b); } } From ahughes at redhat.com Thu Mar 19 03:48:28 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:28 +0000 Subject: changeset in /hg/icedtea: Patch FileDispatcherImpl when PR39408 ... Message-ID: changeset 839024180a41 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=839024180a41 description: Patch FileDispatcherImpl when PR39408 is present in gjavah. 2009-03-18 Andrew John Hughes * Makefile.am: Enable new PR39408 patch when bug is found in gjavah by configure. * acinclude.m4: (IT_CP39408_JAVAH): Add classpath specification to JAVAC invocation to handle buggy ecjs. * patches/ecj/icedtea-pr39408.patch: New patch to fix build failure when PR39408 is present in gjavah. diffstat: 4 files changed, 35 insertions(+), 1 deletion(-) ChangeLog | 12 ++++++++++++ Makefile.am | 4 ++++ acinclude.m4 | 2 +- patches/ecj/icedtea-pr39408.patch | 18 ++++++++++++++++++ diffs (67 lines): diff -r b60e655cb130 -r 839024180a41 ChangeLog --- a/ChangeLog Wed Mar 18 04:33:56 2009 +0000 +++ b/ChangeLog Wed Mar 18 18:58:02 2009 +0000 @@ -1,3 +1,15 @@ 2009-03-17 Andrew John Hughes + + * Makefile.am: + Enable new PR39408 patch when bug is + found in gjavah by configure. + * acinclude.m4: + (IT_CP39408_JAVAH): Add classpath specification + to JAVAC invocation to handle buggy ecjs. + * patches/ecj/icedtea-pr39408.patch: + New patch to fix build failure when PR39408 + is present in gjavah. + 2009-03-17 Andrew John Hughes * acinclude.m4: diff -r b60e655cb130 -r 839024180a41 Makefile.am --- a/Makefile.am Wed Mar 18 04:33:56 2009 +0000 +++ b/Makefile.am Wed Mar 18 18:58:02 2009 +0000 @@ -2164,6 +2164,10 @@ ICEDTEA_ECJ_PATCHES = patches/ecj/icedte patches/ecj/icedtea-jopt.patch \ patches/ecj/icedtea-sbcs.patch +if CP39408_JAVAH +ICEDTEA_ECJ_PATCHES += patches/ecj/icedtea-pr39408.patch +endif + stamps/patch-ecj.stamp: stamps/clone-ecj.stamp mkdir -p stamps; \ rm -f stamps/patch-ecj.stamp.tmp ; \ diff -r b60e655cb130 -r 839024180a41 acinclude.m4 --- a/acinclude.m4 Wed Mar 18 04:33:56 2009 +0000 +++ b/acinclude.m4 Wed Mar 18 18:58:02 2009 +0000 @@ -1196,7 +1196,7 @@ public class TestImpl public native void doStuff(); } EOF -if $JAVAC $JAVACFLAGS $SUBCLASS >/dev/null 2>&1; then +if $JAVAC -cp . $JAVACFLAGS $SUBCLASS >/dev/null 2>&1; then if $JAVAH -classpath . $SUB > /dev/null 2>&1; then if cat $SUBHEADER | grep POTATO > /dev/null 2>&1; then it_cv_cp39408_javah=no; diff -r b60e655cb130 -r 839024180a41 patches/ecj/icedtea-pr39408.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ecj/icedtea-pr39408.patch Wed Mar 18 18:58:02 2009 +0000 @@ -0,0 +1,18 @@ +diff -Nru openjdk.orig/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c openjdk/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c +--- openjdk-ecj.orig/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2009-03-18 16:25:52.000000000 +0000 ++++ openjdk-ecj/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2009-03-18 16:27:03.000000000 +0000 +@@ -36,6 +36,14 @@ + #include "nio.h" + #include "nio_util.h" + ++#undef sun_nio_ch_FileDispatcherImpl_NO_LOCK ++#define sun_nio_ch_FileDispatcherImpl_NO_LOCK -1L ++#undef sun_nio_ch_FileDispatcherImpl_LOCKED ++#define sun_nio_ch_FileDispatcherImpl_LOCKED 0L ++#undef sun_nio_ch_FileDispatcherImpl_RET_EX_LOCK ++#define sun_nio_ch_FileDispatcherImpl_RET_EX_LOCK 1L ++#undef sun_nio_ch_FileDispatcherImpl_INTERRUPTED ++#define sun_nio_ch_FileDispatcherImpl_INTERRUPTED 2L + + static int preCloseFD = -1; /* File descriptor to which we dup other fd's + before closing them for real */ From ahughes at redhat.com Thu Mar 19 03:48:22 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:22 +0000 Subject: changeset in /hg/icedtea: Add support for BSD (patch from Michae... Message-ID: changeset 1c13fc28bd88 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1c13fc28bd88 description: Add support for BSD (patch from Michael Franz). 2009-03-03 Andrew John Hughes * AUTHORS: Add Michael Franz. 2009-03-03 Michael Franz * acinclude.m4: Add support for BSD. diffstat: 3 files changed, 14 insertions(+) AUTHORS | 1 + ChangeLog | 9 +++++++++ acinclude.m4 | 4 ++++ diffs (41 lines): diff -r 24cb346d989c -r 1c13fc28bd88 AUTHORS --- a/AUTHORS Tue Mar 03 09:18:36 2009 +0000 +++ b/AUTHORS Tue Mar 03 09:31:37 2009 +0000 @@ -10,6 +10,7 @@ Pablo del Campo Pablo del Campo Thomas Fitzsimmons Matthew Flaschen +Michael Franz Kyle Galloway Dennis Gilmore Andrew Haley diff -r 24cb346d989c -r 1c13fc28bd88 ChangeLog --- a/ChangeLog Tue Mar 03 09:18:36 2009 +0000 +++ b/ChangeLog Tue Mar 03 09:31:37 2009 +0000 @@ -1,3 +1,12 @@ 2009-03-03 Gary Benson + + * AUTHORS: Add Michael Franz. + +2009-03-03 Michael Franz + + * acinclude.m4: + Add support for BSD. + 2009-03-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: diff -r 24cb346d989c -r 1c13fc28bd88 acinclude.m4 --- a/acinclude.m4 Tue Mar 03 09:18:36 2009 +0000 +++ b/acinclude.m4 Tue Mar 03 09:31:37 2009 +0000 @@ -77,6 +77,10 @@ AC_DEFUN([SET_OS_DIRS], BUILD_OS_DIR=solaris OS_PATH=/opt/SunStudioExpress/bin:/opt/SUNWpro/bin:/usr/gnu/bin ;; + *darwin*|*bsd*) + BUILD_OS_DIR=bsd + OS_PATH= + ;; *) AC_MSG_ERROR([unsupported operating system ${host_os}]) ;; From gbenson at redhat.com Thu Mar 19 03:48:23 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:23 +0000 Subject: changeset in /hg/icedtea: 2009-03-04 Gary Benson changeset b593d3ef9dce in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b593d3ef9dce description: 2009-03-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Moved partly into... * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise into... * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: New file. * ports/hotspot/src/share/vm/shark/sharkState.hpp: Merged SharkTrackingState into SharkState, and moved SharkEntryState into sharkFunction.cpp and SharkPHIState into sharkTopLevelBlock.cpp. * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: s/SharkBlock/SharkTopLevelBlock/g * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. * ports/hotspot/src/share/vm/shark/shark_globals.hpp (SharkMaxInlineSize): New parameter. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::GetBlockInsertionPoint): New method. (SharkBuilder::CreateBlock): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 18 files changed, 3491 insertions(+), 2450 deletions(-) ChangeLog | 33 ports/hotspot/src/share/vm/includeDB_shark | 106 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 1904 +-------------- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 488 +-- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 29 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 6 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 74 ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 24 ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 761 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.hpp | 32 ports/hotspot/src/share/vm/shark/sharkMonitor.cpp | 4 ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 6 ports/hotspot/src/share/vm/shark/sharkState.cpp | 243 - ports/hotspot/src/share/vm/shark/sharkState.hpp | 104 ports/hotspot/src/share/vm/shark/sharkState.inline.hpp | 59 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 1716 +++++++++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 344 ++ ports/hotspot/src/share/vm/shark/shark_globals.hpp | 8 diffs (truncated from 6546 to 500 lines): diff -r 22425c2ed9a9 -r b593d3ef9dce ChangeLog --- a/ChangeLog Wed Mar 04 11:01:54 2009 +0100 +++ b/ChangeLog Wed Mar 04 10:41:13 2009 -0500 @@ -1,3 +1,36 @@ 2009-03-04 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Moved partly into... + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise into... + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: New file. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp: + Merged SharkTrackingState into SharkState, and moved + SharkEntryState into sharkFunction.cpp and SharkPHIState + into sharkTopLevelBlock.cpp. + * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: + s/SharkBlock/SharkTopLevelBlock/g + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/shark_globals.hpp + (SharkMaxInlineSize): New parameter. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::GetBlockInsertionPoint): New method. + (SharkBuilder::CreateBlock): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-04 Matthias Klose * configure.ac: Set version to 1.5pre. diff -r 22425c2ed9a9 -r b593d3ef9dce ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 04 11:01:54 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 04 10:41:13 2009 -0500 @@ -24,6 +24,25 @@ // // NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps! + +sharkBlock.cpp debug.hpp +sharkBlock.cpp bytecodes.hpp +sharkBlock.cpp llvmHeaders.hpp +sharkBlock.cpp shark_globals.hpp +sharkBlock.cpp sharkBlock.hpp +sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkRuntime.hpp +sharkBlock.cpp sharkState.inline.hpp +sharkBlock.cpp sharkValue.inline.hpp + +sharkBlock.hpp allocation.hpp +sharkBlock.hpp ciMethod.hpp +sharkBlock.hpp ciStreams.hpp +sharkBlock.hpp debug.hpp +sharkBlock.hpp llvmHeaders.hpp +sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkState.hpp +sharkBlock.hpp sharkValue.hpp ciMethod.cpp ciTypeFlow.hpp ciMethod.cpp methodOop.hpp @@ -63,33 +82,35 @@ shark_globals.hpp shark_globals.hpp shark_globals_.hpp shark_globals.hpp globals.hpp -sharkBlock.cpp allocation.hpp -sharkBlock.cpp bytecodes.hpp -sharkBlock.cpp ciField.hpp -sharkBlock.cpp ciStreams.hpp -sharkBlock.cpp ciType.hpp -sharkBlock.cpp ciTypeFlow.hpp -sharkBlock.cpp debug.hpp -sharkBlock.cpp llvmHeaders.hpp -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.inline.hpp - -sharkBlock.hpp allocation.hpp -sharkBlock.hpp bytecodes.hpp -sharkBlock.hpp ciStreams.hpp -sharkBlock.hpp ciType.hpp -sharkBlock.hpp ciTypeFlow.hpp -sharkBlock.hpp llvmHeaders.hpp -sharkBlock.hpp sharkBuilder.hpp -sharkBlock.hpp sharkFunction.hpp -sharkBlock.hpp sharkMonitor.hpp -sharkBlock.hpp sharkState.hpp -sharkBlock.hpp sharkValue.inline.hpp +sharkTopLevelBlock.cpp allocation.hpp +sharkTopLevelBlock.cpp bytecodes.hpp +sharkTopLevelBlock.cpp ciField.hpp +sharkTopLevelBlock.cpp ciStreams.hpp +sharkTopLevelBlock.cpp ciType.hpp +sharkTopLevelBlock.cpp ciTypeFlow.hpp +sharkTopLevelBlock.cpp debug.hpp +sharkTopLevelBlock.cpp llvmHeaders.hpp +sharkTopLevelBlock.cpp shark_globals.hpp +sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp +sharkTopLevelBlock.cpp sharkBuilder.hpp +sharkTopLevelBlock.cpp sharkConstantPool.hpp +sharkTopLevelBlock.cpp sharkInliner.hpp +sharkTopLevelBlock.cpp sharkRuntime.hpp +sharkTopLevelBlock.cpp sharkState.inline.hpp +sharkTopLevelBlock.cpp sharkValue.inline.hpp + +sharkTopLevelBlock.hpp allocation.hpp +sharkTopLevelBlock.hpp bytecodes.hpp +sharkTopLevelBlock.hpp ciStreams.hpp +sharkTopLevelBlock.hpp ciType.hpp +sharkTopLevelBlock.hpp ciTypeFlow.hpp +sharkTopLevelBlock.hpp llvmHeaders.hpp +sharkTopLevelBlock.hpp sharkBlock.hpp +sharkTopLevelBlock.hpp sharkBuilder.hpp +sharkTopLevelBlock.hpp sharkFunction.hpp +sharkTopLevelBlock.hpp sharkMonitor.hpp +sharkTopLevelBlock.hpp sharkState.inline.hpp +sharkTopLevelBlock.hpp sharkValue.inline.hpp sharkBuilder.cpp ciMethod.hpp sharkBuilder.cpp debug.hpp @@ -163,8 +184,8 @@ sharkConstantPool.cpp sharkConstantPool.hpp allocation.hpp sharkConstantPool.hpp llvmHeaders.hpp -sharkConstantPool.hpp sharkBlock.hpp sharkConstantPool.hpp sharkBuilder.hpp +sharkConstantPool.hpp sharkTopLevelBlock.hpp sharkEntry.cpp sharkEntry.hpp @@ -175,12 +196,12 @@ sharkFunction.cpp sharkFunction.cpp debug.hpp sharkFunction.cpp llvmHeaders.hpp sharkFunction.cpp shark_globals.hpp -sharkFunction.cpp sharkBlock.hpp sharkFunction.cpp sharkBuilder.hpp sharkFunction.cpp sharkEntry.hpp sharkFunction.cpp sharkFunction.hpp sharkFunction.cpp sharkMonitor.hpp sharkFunction.cpp sharkState.inline.hpp +sharkFunction.cpp sharkTopLevelBlock.hpp sharkFunction.hpp allocation.hpp sharkFunction.hpp ciEnv.hpp @@ -189,11 +210,25 @@ sharkFunction.hpp sharkFunction.hpp llvmHeaders.hpp sharkFunction.hpp sharkBuilder.hpp +sharkInliner.cpp allocation.hpp +sharkInliner.cpp bytecodes.hpp +sharkInliner.cpp ciField.hpp +sharkInliner.cpp ciMethod.hpp +sharkInliner.cpp ciStreams.hpp +sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkInliner.hpp +sharkInliner.cpp sharkState.inline.hpp +sharkInliner.cpp sharkValue.inline.hpp + +sharkInliner.hpp allocation.hpp +sharkInliner.hpp ciMethod.hpp +sharkInliner.hpp sharkState.inline.hpp + sharkMonitor.cpp llvmHeaders.hpp -sharkMonitor.cpp sharkBlock.hpp sharkMonitor.cpp sharkMonitor.hpp sharkMonitor.cpp sharkRuntime.hpp sharkMonitor.cpp sharkState.inline.hpp +sharkMonitor.cpp sharkTopLevelBlock.hpp sharkMonitor.hpp allocation.hpp sharkMonitor.hpp llvmHeaders.hpp @@ -218,21 +253,22 @@ sharkState.cpp sharkState.cpp allocation.hpp sharkState.cpp ciType.hpp sharkState.cpp ciTypeFlow.hpp -sharkState.cpp sharkBlock.hpp sharkState.cpp sharkBuilder.hpp +sharkState.cpp sharkCacheDecache.hpp sharkState.cpp sharkState.inline.hpp +sharkState.cpp sharkTopLevelBlock.hpp sharkState.cpp sharkType.hpp sharkState.cpp sharkValue.inline.hpp sharkState.hpp allocation.hpp +sharkState.hpp ciMethod.hpp +sharkState.hpp llvmHeaders.hpp sharkState.hpp sharkBuilder.hpp -sharkState.hpp sharkFunction.hpp -sharkState.hpp sharkValue.inline.hpp -sharkState.hpp vmreg.hpp +sharkState.hpp sharkValue.hpp sharkState.inline.hpp sharkBlock.hpp +sharkState.inline.hpp sharkBuilder.hpp sharkState.inline.hpp sharkState.hpp -sharkState.inline.hpp sharkCacheDecache.hpp sharkStateScanner.cpp sharkState.inline.hpp sharkStateScanner.cpp sharkStateScanner.hpp diff -r 22425c2ed9a9 -r b593d3ef9dce ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 04 11:01:54 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 04 10:41:13 2009 -0500 @@ -25,112 +25,26 @@ #include "incls/_precompiled.incl" #include "incls/_sharkBlock.cpp.incl" -#include "ciArrayKlass.hpp" // XXX fuck you makeDeps -#include "ciObjArrayKlass.hpp" // XXX likewise using namespace llvm; -void SharkBlock::enter(SharkBlock* predecessor, bool is_exception) -{ - // This block requires phis: - // - if it is entered more than once - // - if it is an exception handler, because in which - // case we assume it's entered more than once. - // - if the predecessor will be compiled after this - // block, in which case we can't simple propagate - // the state forward. - if (!needs_phis() && - (entered() || - is_exception || - (predecessor && predecessor->index() >= index()))) - _needs_phis = true; - - // Recurse into the tree - if (!entered()) { - _entered = true; - - if (!has_trap()) { - for (int i = 0; i < num_successors(); i++) { - successor(i)->enter(this, false); - } - for (int i = 0; i < num_exceptions(); i++) { - exception(i)->enter(this, true); - } - } - } -} - -void SharkBlock::initialize() -{ - char name[28]; - snprintf(name, sizeof(name), - "bci_%d%s", - start(), is_private_copy() ? "_private_copy" : ""); - _entry_block = function()->CreateBlock(name); -} - -void SharkBlock::acquire_method_lock() -{ - Value *object; - if (target()->is_static()) { - SharkConstantPool constants(this); - object = constants.java_mirror(); - } - else { - object = local(0)->jobject_value(); - } - iter()->force_bci(start()); // for the decache - function()->monitor(0)->acquire(this, object); - check_pending_exception(false); -} - -void SharkBlock::release_method_lock() -{ - function()->monitor(0)->release(this); - - // We neither need nor want to check for pending exceptions here. - // This method is only called by handle_return, which copes with - // them implicitly: - // - if a value is being returned then we just carry on as normal; - // the caller will see the pending exception and handle it. - // - if an exception is being thrown then that exception takes - // priority and ours will be ignored. -} - -void SharkBlock::parse() +void SharkBlock::parse_bytecode(int start, int limit) { SharkValue *a, *b, *c, *d; int i; - builder()->SetInsertPoint(entry_block()); - - if (has_trap()) { - iter()->force_bci(start()); - - current_state()->decache_for_trap(); - builder()->CreateCall2( - SharkRuntime::uncommon_trap(), - thread(), - LLVMValue::jint_constant(trap_index())); - builder()->CreateRetVoid(); - return; - } - - iter()->reset_to_bci(start()); - bool successors_done = false; - while (iter()->next() != ciBytecodeStream::EOBC() && bci() < limit()) { - NOT_PRODUCT(a = b = c = d = NULL); + iter()->reset_to_bci(start); + while (iter()->next_bci() < limit) { + NOT_PRODUCT(a = b = c = d = NULL); + iter()->next(); if (SharkTraceBytecodes) tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); - if(UseLoopSafepoints) { - int len; - + if (UseLoopSafepoints) { // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts // the safepoint before the lcmp rather than before the if. // Maybe we should do this too. See parse2.cpp for details. - switch (bc()) { case Bytecodes::_goto: case Bytecodes::_ifnull: @@ -164,15 +78,15 @@ void SharkBlock::parse() add_safepoint(); break; } - len = switch_table_length(); - for (i = 0; i < len; i++) { + int len = switch_table_length(); + for (int i = 0; i < len; i++) { if (switch_dest(i) <= bci()) { add_safepoint(); break; } } break; - } + } } switch (bc()) { @@ -809,19 +723,16 @@ void SharkBlock::parse() case Bytecodes::_goto: case Bytecodes::_goto_w: - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_goto(); break; case Bytecodes::_jsr: case Bytecodes::_jsr_w: - push(SharkValue::create_returnAddress(iter()->next_bci())); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_jsr(); break; case Bytecodes::_ret: - assert(local(iter()->get_index())->returnAddress_value() == - successor(ciTypeFlow::GOTO_TARGET)->start(), "should be"); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_ret(); break; case Bytecodes::_ifnull: @@ -831,11 +742,13 @@ void SharkBlock::parse() do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop()); break; case Bytecodes::_if_acmpeq: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_EQ, b, a); break; case Bytecodes::_if_acmpne: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_NE, b, a); break; case Bytecodes::_ifeq: @@ -857,34 +770,39 @@ void SharkBlock::parse() do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop()); break; case Bytecodes::_if_icmpeq: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_EQ, b, a); break; case Bytecodes::_if_icmpne: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_NE, b, a); break; case Bytecodes::_if_icmplt: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SLT, b, a); break; case Bytecodes::_if_icmple: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SLE, b, a); break; case Bytecodes::_if_icmpgt: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SGT, b, a); break; case Bytecodes::_if_icmpge: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SGE, b, a); break; case Bytecodes::_tableswitch: case Bytecodes::_lookupswitch: do_switch(); - successors_done = true; break; case Bytecodes::_invokestatic: @@ -923,533 +841,58 @@ void SharkBlock::parse() ShouldNotReachHere(); } } - - if (falls_through()) { - builder()->CreateBr(successor(ciTypeFlow::FALL_THROUGH)->entry_block()); - } - - if (!successors_done) { - for (int i = 0; i < num_successors(); i++) - successor(i)->add_incoming(current_state()); - } -} - -SharkBlock* SharkBlock::bci_successor(int bci) const -{ - // XXX now with Linear Search Technology (tm) - for (int i = 0; i < num_successors(); i++) { - ciTypeFlow::Block *successor = ciblock()->successors()->at(i); - if (successor->start() == bci) - return function()->block(successor->pre_order()); - } - ShouldNotReachHere(); -} - -void SharkBlock::check_zero(SharkValue *value) -{ - if (value->zero_checked()) - return; - - BasicBlock *zero = function()->CreateBlock("zero"); - BasicBlock *not_zero = function()->CreateBlock("not_zero"); - - Value *a, *b; - switch (value->basic_type()) { - case T_BYTE: - case T_CHAR: - case T_SHORT: - case T_INT: - a = value->jint_value(); - b = LLVMValue::jint_constant(0); - break; - case T_LONG: - a = value->jlong_value(); - b = LLVMValue::jlong_constant(0); - break; - case T_OBJECT: - case T_ARRAY: - a = value->jobject_value(); - b = LLVMValue::LLVMValue::null(); - break; +} + +SharkState* SharkBlock::initial_current_state() +{ + return new SharkState(entry_state()); +} + +int SharkBlock::switch_default_dest() +{ + return iter()->get_dest_table(0); From ahughes at redhat.com Thu Mar 19 03:48:28 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:28 +0000 Subject: changeset in /hg/icedtea: Name it IcedTea7! Message-ID: changeset 5c9a214071b9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5c9a214071b9 description: Name it IcedTea7! 2009-03-18 Andrew John Hughes * Makefile.am: Replace IcedTea6 with IcedTea7. diffstat: 2 files changed, 7 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ Makefile.am | 4 ++-- diffs (28 lines): diff -r 839024180a41 -r 5c9a214071b9 ChangeLog --- a/ChangeLog Wed Mar 18 18:58:02 2009 +0000 +++ b/ChangeLog Wed Mar 18 19:01:30 2009 +0000 @@ -1,3 +1,8 @@ 2009-03-18 Andrew John Hughes + + * Makefile.am: + Replace IcedTea6 with IcedTea7. + 2009-03-18 Andrew John Hughes * Makefile.am: diff -r 839024180a41 -r 5c9a214071b9 Makefile.am --- a/Makefile.am Wed Mar 18 18:58:02 2009 +0000 +++ b/Makefile.am Wed Mar 18 19:01:30 2009 +0000 @@ -2094,10 +2094,10 @@ stamps/overlay.stamp: stamps/patch.stamp if ! test "x$(WITH_CACAO)" = "xno"; then \ echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ - echo "PRODUCT_NAME=IcedTea6" \ + echo "PRODUCT_NAME=IcedTea7" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ else \ - echo "JDK_DERIVATIVE_NAME=IcedTea6 $${icedtea_version}" \ + echo "JDK_DERIVATIVE_NAME=IcedTea7 $${icedtea_version}" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ fi if [ -n "$(PKGVERSION)" ]; then \ From ahughes at redhat.com Thu Mar 19 03:48:29 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:29 +0000 Subject: changeset in /hg/icedtea: Fix make distcheck. Message-ID: changeset 017b63ad6962 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=017b63ad6962 description: Fix make distcheck. 2009-03-19 Andrew John Hughes * Makefile.am: Fix issues that break make distcheck. diffstat: 2 files changed, 13 insertions(+), 29 deletions(-) ChangeLog | 5 +++++ Makefile.am | 37 ++++++++----------------------------- diffs (76 lines): diff -r 5c9a214071b9 -r 017b63ad6962 ChangeLog --- a/ChangeLog Wed Mar 18 19:01:30 2009 +0000 +++ b/ChangeLog Thu Mar 19 10:20:51 2009 +0000 @@ -1,3 +1,8 @@ 2009-03-18 Andrew John Hughes + + * Makefile.am: + Fix issues that break make distcheck. + 2009-03-18 Andrew John Hughes * Makefile.am: diff -r 5c9a214071b9 -r 017b63ad6962 Makefile.am --- a/Makefile.am Wed Mar 18 19:01:30 2009 +0000 +++ b/Makefile.am Thu Mar 19 10:20:51 2009 +0000 @@ -1295,33 +1295,8 @@ JTREG_SRCS = $(top_srcdir)/test/jtreg/co PULSEAUDIO_SRCS = $(top_srcdir)/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/*.java \ $(top_srcdir)/pulseaudio/src/java/META-INF/services/javax.sound.sampled.spi.MixerProvider \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_UnderflowListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_PlaybackStartedListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_OverflowListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_StateListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_MovedListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_WriteListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_ReadListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_State.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_CorkListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation_State.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_LatencyUpdateListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.h \ - $(top_srcdir)/pulseaudio/src/native/jni-common.c \ - $(top_srcdir)/pulseaudio/src/native/jni-common.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_Format.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_SuspendedListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream_UpdateTimingInfoListener.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation.c \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation.h \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c \ - $(top_srcdir)/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.h \ + $(top_srcdir)/pulseaudio/src/native/*.h \ + $(top_srcdir)/pulseaudio/src/native/*.c \ $(top_srcdir)/pulseaudio/TODO \ $(top_srcdir)/pulseaudio/README \ $(top_srcdir)/pulseaudio/testsounds/README \ @@ -1332,7 +1307,11 @@ PULSEAUDIO_SRCS = $(top_srcdir)/pulseaud $(top_srcdir)/pulseaudio/AUTHORS \ $(top_srcdir)/pulseaudio/COPYING -EXTRA_DIST = $(GENERATED_FILES) $(top_srcdir)/patches/icedtea-*.patch \ +EXTRA_DIST = $(GENERATED_FILES) $(top_srcdir)/patches/*.patch \ + $(top_srcdir)/patches/hotspot/default/*.patch \ + $(top_srcdir)/patches/ecj/*.patch \ + $(top_srcdir)/patches/security/*.patch \ + $(top_srcdir)/patches/xrender/*.patch \ tools-copy contrib ports extra overlays \ javaws.png javaws.desktop visualvm.desktop \ jconsole.desktop policytool.desktop \ @@ -2114,10 +2093,10 @@ stamps/overlay.stamp: stamps/patch.stamp sed -i "s#BUILD_VARIANT_RELEASE)#BUILD_VARIANT_RELEASE)$${proj_suffix}$${ver_suffix}#" \ openjdk/jdk/make/common/shared/Defs.gmk; \ cp -r $(abs_top_srcdir)/overlays/openjdk/* openjdk/ - chmod -R ug+w openjdk if ENABLE_NIO2 cp -r $(abs_top_srcdir)/overlays/nio2/openjdk/* openjdk/ endif + chmod -R ug+w openjdk touch stamps/overlay.stamp # OpenJDK ecj Source Preparation Targets From langel at redhat.com Thu Mar 19 03:48:20 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 19 Mar 2009 10:48:20 +0000 Subject: changeset in /hg/icedtea: 2009-02-27 Tomas Hurka changeset 073c27894e5d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=073c27894e5d description: 2009-02-27 Tomas Hurka * Makefile.am: Removed redundant creation of netbeans dir. diffstat: 2 files changed, 4 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 1 - diffs (22 lines): diff -r ffde78306a6a -r 073c27894e5d ChangeLog --- a/ChangeLog Fri Feb 27 14:55:51 2009 +0000 +++ b/ChangeLog Fri Feb 27 10:58:54 2009 -0500 @@ -1,3 +1,7 @@ 2009-02-27 Gary Benson + + * Makefile.am: Removed redundant creation of netbeans dir. + 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp diff -r ffde78306a6a -r 073c27894e5d Makefile.am --- a/Makefile.am Fri Feb 27 14:55:51 2009 +0000 +++ b/Makefile.am Fri Feb 27 10:58:54 2009 -0500 @@ -1790,7 +1790,6 @@ stamps/nbplatform.stamp: $(BOOTSTRAP_DIR stamps/nbplatform.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/extract.stamp \ stamps/download.stamp if WITH_VISUALVM - mkdir netbeans ; \ cd netbeans ; \ rm nbbuild/external/binaries-list ; \ mkdir -p lib.profiler/release/lib/deployed/jdk15/linux ; \ From doko at ubuntu.com Thu Mar 19 03:48:22 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 19 Mar 2009 10:48:22 +0000 Subject: changeset in /hg/icedtea: 2009-03-04 Matthias Klose changeset 22425c2ed9a9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=22425c2ed9a9 description: 2009-03-04 Matthias Klose * configure.ac: Set version to 1.5pre. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ configure.ac | 2 +- diffs (20 lines): diff -r 1c13fc28bd88 -r 22425c2ed9a9 ChangeLog --- a/ChangeLog Tue Mar 03 09:31:37 2009 +0000 +++ b/ChangeLog Wed Mar 04 11:01:54 2009 +0100 @@ -1,3 +1,7 @@ 2009-03-03 Andrew John Hughes + + * configure.ac: Set version to 1.5pre. + 2009-03-03 Andrew John Hughes * AUTHORS: Add Michael Franz. diff -r 1c13fc28bd88 -r 22425c2ed9a9 configure.ac --- a/configure.ac Tue Mar 03 09:31:37 2009 +0000 +++ b/configure.ac Wed Mar 04 11:01:54 2009 +0100 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [pre-1.5], [distro-p -AC_INIT([icedtea6], [pre-1.5], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.5pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.10 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) AC_CANONICAL_HOST From ahughes at redhat.com Thu Mar 19 03:48:28 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:28 +0000 Subject: changeset in /hg/icedtea: Add a test for the Classpath 39408 bug... Message-ID: changeset b60e655cb130 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b60e655cb130 description: Add a test for the Classpath 39408 bug in gjavah. 2009-03-17 Andrew John Hughes * acinclude.m4: (IT_CP39408_JAVAH): New test for Classpath bug 39408. * configure.ac: Enable new test. Result as yet unused. diffstat: 3 files changed, 58 insertions(+), 2 deletions(-) ChangeLog | 8 ++++++++ acinclude.m4 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- configure.ac | 1 + diffs (88 lines): diff -r e6d83e63e8e3 -r b60e655cb130 ChangeLog --- a/ChangeLog Tue Mar 17 00:44:07 2009 +0000 +++ b/ChangeLog Wed Mar 18 04:33:56 2009 +0000 @@ -1,3 +1,11 @@ 2009-03-17 Andrew John Hughes + + * acinclude.m4: + (IT_CP39408_JAVAH): New test for Classpath + bug 39408. + * configure.ac: Enable new test. Result + as yet unused. + 2009-03-17 Andrew John Hughes * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/NamedAttributeView.java, diff -r e6d83e63e8e3 -r b60e655cb130 acinclude.m4 --- a/acinclude.m4 Tue Mar 17 00:44:07 2009 +0000 +++ b/acinclude.m4 Wed Mar 18 04:33:56 2009 +0000 @@ -1,4 +1,4 @@ AC_DEFUN([SET_ARCH_DIRS], -AC_DEFUN([SET_ARCH_DIRS], + AC_DEFUN([SET_ARCH_DIRS], [ case "${host}" in x86_64-*-*) @@ -1172,4 +1172,51 @@ AC_DEFUN([AC_CHECK_FOR_ICEDTEA], AC_SUBST(SYSTEM_ICEDTEA_DIR) ]) - +AC_DEFUN([IT_CP39408_JAVAH],[ +AC_CACHE_CHECK([if $JAVAH exhibits Classpath bug 39408], it_cv_cp39408_javah, [ +SUPERCLASS=Test.java +SUBCLASS=TestImpl.java +SUB=$(echo $SUBCLASS|sed 's#\.java##') +SUBHEADER=$(echo $SUBCLASS|sed 's#\.java#.h#') +mkdir tmp.$$ +cd tmp.$$ +cat << \EOF > $SUPERCLASS +/* [#]line __oline__ "configure" */ +public class Test +{ + public static final int POTATO = 0; + public static final int CABBAGE = 1; +} +EOF +cat << \EOF > $SUBCLASS +/* [#]line __oline__ "configure" */ +public class TestImpl + extends Test +{ + public native void doStuff(); +} +EOF +if $JAVAC $JAVACFLAGS $SUBCLASS >/dev/null 2>&1; then + if $JAVAH -classpath . $SUB > /dev/null 2>&1; then + if cat $SUBHEADER | grep POTATO > /dev/null 2>&1; then + it_cv_cp39408_javah=no; + else + it_cv_cp39408_javah=yes; + fi + else + AC_MSG_ERROR([The Java header generator $JAVAH failed]) + echo "configure: failed program was:" >&AC_FD_CC + cat $SUBCLASS >&AC_FD_CC + fi +else + AC_MSG_ERROR([The Java compiler $JAVAC failed]) + echo "configure: failed program was:" >&AC_FD_CC + cat $SUBCLASS >&AC_FD_CC +fi +rm -f $SUBCLASS $SUPERCLASS $SUBHEADER *.class +cd .. +rmdir tmp.$$ +]) +AM_CONDITIONAL([CP39408_JAVAH], test x"${it_cv_cp39408_javah}" = "xyes") +AC_PROVIDE([$0])dnl +]) diff -r e6d83e63e8e3 -r b60e655cb130 configure.ac --- a/configure.ac Tue Mar 17 00:44:07 2009 +0000 +++ b/configure.ac Wed Mar 18 04:33:56 2009 +0000 @@ -269,6 +269,7 @@ else AC_CONFIG_FILES([javap], [chmod +x javap]) fi fi +IT_CP39408_JAVAH FIND_RHINO_JAR WITH_OPENJDK_SRC_ZIP WITH_HOTSPOT_SRC_ZIP From gbenson at redhat.com Thu Mar 19 03:48:19 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:19 +0000 Subject: changeset in /hg/icedtea: 2009-02-27 Gary Benson changeset 9f1c16638724 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9f1c16638724 description: 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkEntryState::initialize): Mark the receiver as zero-checked for non-static methods. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkValue::jint_constant): Mark non-zero constants as zero-checked. (SharkValue::jlong_constant): Likewise. diffstat: 3 files changed, 25 insertions(+), 2 deletions(-) ChangeLog | 11 +++++++++++ ports/hotspot/src/share/vm/shark/sharkState.cpp | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkValue.hpp | 10 ++++++++-- diffs (57 lines): diff -r fd98e848b25c -r 9f1c16638724 ChangeLog --- a/ChangeLog Fri Feb 27 04:08:04 2009 -0500 +++ b/ChangeLog Fri Feb 27 14:52:57 2009 +0000 @@ -1,3 +1,14 @@ 2009-02-27 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkEntryState::initialize): Mark the receiver as + zero-checked for non-static methods. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::jint_constant): Mark non-zero constants + as zero-checked. + (SharkValue::jlong_constant): Likewise. + 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp diff -r fd98e848b25c -r 9f1c16638724 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Feb 27 04:08:04 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Feb 27 14:52:57 2009 +0000 @@ -94,6 +94,12 @@ void SharkEntryState::initialize(Value* set_local(i, value); } + // Non-static methods have a guaranteed non-null receiver + if (!function()->target()->is_static()) { + assert(local(0)->is_jobject(), "should be"); + local(0)->set_zero_checked(true); + } + // Expression stack assert(!stack_depth_at_entry(), "entry block shouldn't have stack"); } diff -r fd98e848b25c -r 9f1c16638724 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Feb 27 04:08:04 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Feb 27 14:52:57 2009 +0000 @@ -149,11 +149,17 @@ class SharkValue : public ResourceObj { public: static SharkValue* jint_constant(jint value) { - return create_jint(LLVMValue::jint_constant(value)); + SharkValue *result = create_jint(LLVMValue::jint_constant(value)); + if (value != 0) + result->set_zero_checked(true); + return result; } static SharkValue* jlong_constant(jlong value) { - return create_jlong(LLVMValue::jlong_constant(value)); + SharkValue *result = create_jlong(LLVMValue::jlong_constant(value)); + if (value != 0) + result->set_zero_checked(true); + return result; } static SharkValue* jfloat_constant(jfloat value) { From gbenson at redhat.com Thu Mar 19 03:48:23 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:23 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Gary Benson changeset a737ec21e449 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a737ec21e449 description: 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInliner::may_be_inlinable): Bail out early on constructors. diffstat: 2 files changed, 13 insertions(+) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 8 ++++++++ diffs (31 lines): diff -r b593d3ef9dce -r a737ec21e449 ChangeLog --- a/ChangeLog Wed Mar 04 10:41:13 2009 -0500 +++ b/ChangeLog Thu Mar 05 09:41:58 2009 +0000 @@ -1,3 +1,8 @@ 2009-03-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInliner::may_be_inlinable): Bail out early on constructors. + 2009-03-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. diff -r b593d3ef9dce -r a737ec21e449 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Mar 04 10:41:13 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Mar 05 09:41:58 2009 +0000 @@ -226,7 +226,15 @@ bool SharkInliner::may_be_inlinable(ciMe if (target->has_exception_handlers() || target->has_jsrs()) return false; + // Don't try to inline constructors, as they must + // eventually call Object. which we can't inline. + // Note that this catches too, but why would + // we be compiling that? + if (target->is_initializer()) + return false; + // Mustn't inline Object. + // Should be caught by the above, but just in case... if (target->intrinsic_id() == vmIntrinsics::_Object_init) return false; From mark at klomp.org Thu Mar 19 03:48:21 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 19 Mar 2009 10:48:21 +0000 Subject: changeset in /hg/icedtea: * hotspot.map (default): Set to rev fc... Message-ID: changeset f03bf9944657 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f03bf9944657 description: * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ hotspot.map | 2 +- diffs (18 lines): diff -r f1cf5f359a35 -r f03bf9944657 ChangeLog --- a/ChangeLog Fri Feb 27 16:09:25 2009 +0000 +++ b/ChangeLog Mon Mar 02 22:19:24 2009 +0100 @@ -1,3 +1,7 @@ 2009-02-27 Gary Benson + + * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). + 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp diff -r f1cf5f359a35 -r f03bf9944657 hotspot.map --- a/hotspot.map Fri Feb 27 16:09:25 2009 +0000 +++ b/hotspot.map Mon Mar 02 22:19:24 2009 +0100 @@ -1,2 +1,2 @@ # version changeset md5sum -default f9d938ede196 c8f78d48ac83987bc2adebeebcd354e9 +default fc6a5ae3fef5 1c3510387dccdb4907d0fd2f1c58e372 From ahughes at redhat.com Thu Mar 19 03:48:26 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:26 +0000 Subject: changeset in /hg/icedtea: Bump to b50. Message-ID: changeset a0f00c50a187 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a0f00c50a187 description: Bump to b50. 2009-03-06 Andrew John Hughes * overlays/nio2/openjdk/jdk/make/mksample/nio/file/Makefile, * overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedCopyOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedOpenOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousByteChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousFileChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/CompletionHandler.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/SeekableByteChannel.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AccessDeniedException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AccessMode.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AtomicMoveNotSupportedException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedDirectoryStreamException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedFileSystemException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedWatchServiceException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/CopyOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryNotEmptyException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryStream.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryStreamFilters.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileAction.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileAlreadyExistsException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileRef.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileStore.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystem.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemAlreadyExistsException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemNotFoundException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystems.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileTreeWalker.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitResult.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitor.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Files.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/InvalidPathException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/LinkOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/LinkPermission.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NoSuchFileException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NotDirectoryException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NotLinkException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/OpenOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Path.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/PathMatcher.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Paths.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ProviderMismatchException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ProviderNotFoundException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ReadOnlyFileSystemException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardCopyOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardOpenOption.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardWatchEventKind.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchEvent.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchKey.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchService.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Watchable.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntry.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryFlag.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryPermission.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryType.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/Attributes.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/DosFileAttributes.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileAttribute.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributes.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/GroupPrincipal.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFileAttributes.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFilePermission.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFilePermissions.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipal.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/package-info.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/package-info.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/AbstractPath.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/FileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/FileTypeDetector.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/package-info.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AbstractFuture.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileChannelImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Cancellable.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/FileLockTable.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Groupable.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Invoker.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/PendingFuture.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/ThreadPool.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractFileStoreSpaceAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractFileTypeDetector.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractPoller.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractWatchKey.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractWatchService.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Cancellable.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Globs.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/MimeType.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/NativeBuffer.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/NativeBuffers.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/PollingWatchService.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Reflect.java, * overlays/nio2/openjdk/jdk/src/share/native/sun/nio/ch/genSocketOptionRegistry.c, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/AclEdit.java, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Chmod.java, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Copy.java, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/DiskUsage.java, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/FileType.java, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/WatchDir.java, * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Xdd.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/EPollPort.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/LinuxAsynchronousChannelProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/Port.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/SolarisAsynchronousChannelProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/SolarisEventPort.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileTypeDetector.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxNativeDispatcher.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileStore.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisNativeDispatcher.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixException.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileKey.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileModeAttribute.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileStoreAttributes.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixMountEntry.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixSecureDirectoryStream.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixUriUtils.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixUserPrincipals.java, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/EPollPort.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/SolarisEventPort.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/UnixAsynchronousSocketChannelImpl.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/SolarisNativeDispatcher.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/SolarisWatchService.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/UnixCopyFile.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c, * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/DefaultSelectorProvider.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/Iocp.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousChannelProvider.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/DefaultFileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/DefaultFileTypeDetector.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsAclFileAttributeView.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsChannelFactory.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsConstants.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsException.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributes.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsLinkSupport.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPathType.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsSecurity.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsUriSupport.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsUserPrincipals.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java, * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/Iocp.c, * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c, * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.c, * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c, * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c, * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/Channels/Basic2.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Filters.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/SecureDS.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/FileStore/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/FileSystem/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ContentType.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/CreateFileTree.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ForceLoad.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/Misc.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/PrintFileTree.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SimpleFileTypeDetector.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SkipSiblings.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/TerminateWalk.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/content_type.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/walk_file_tree.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/CopyAndMove.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/DeleteOnClose.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/InterruptCopy.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Links.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Misc.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/PathOps.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/SBC.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/TemporaryFiles.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/UriImportExport.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/delete_on_close.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/temporary_files.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/PathMatcher/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/TestUtil.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/FileTreeModifier.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/WithSecurityManager.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/denyAll.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndOneLevel.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndTree.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirOnly.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/Attributes/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/FileStoreAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/SetDefaultProvider.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/TestProvider.java: Removed; in b50. * Makefile.am: Bump to b50. diffstat: 293 files changed, 299 insertions(+), 60619 deletions(-) ChangeLog | 296 + Makefile.am | 6 overlays/nio2/openjdk/jdk/make/mksample/nio/file/Makefile | 56 overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedCopyOption.java | 43 overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedOpenOption.java | 50 overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java | 43 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousByteChannel.java | 206 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousChannel.java | 118 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java | 317 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java | 707 ---- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousFileChannel.java | 777 ---- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java | 305 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java | 672 ---- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/CompletionHandler.java | 78 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/SeekableByteChannel.java | 170 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java | 284 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AccessDeniedException.java | 69 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AccessMode.java | 50 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AtomicMoveNotSupportedException.java | 57 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedDirectoryStreamException.java | 46 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedFileSystemException.java | 44 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedWatchServiceException.java | 44 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/CopyOption.java | 42 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryNotEmptyException.java | 50 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryStream.java | 139 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryStreamFilters.java | 211 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileAction.java | 65 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileAlreadyExistsException.java | 64 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileRef.java | 425 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileStore.java | 173 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystem.java | 426 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemAlreadyExistsException.java | 54 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemException.java | 126 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemNotFoundException.java | 53 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystems.java | 415 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileTreeWalker.java | 247 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitOption.java | 46 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitResult.java | 63 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitor.java | 177 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Files.java | 405 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/InvalidPathException.java | 131 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/LinkOption.java | 44 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/LinkPermission.java | 108 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NoSuchFileException.java | 64 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NotDirectoryException.java | 50 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NotLinkException.java | 64 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/OpenOption.java | 46 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Path.java | 1575 ---------- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/PathMatcher.java | 50 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Paths.java | 126 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ProviderMismatchException.java | 54 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ProviderNotFoundException.java | 53 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ReadOnlyFileSystemException.java | 44 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java | 327 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java | 123 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardCopyOption.java | 48 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardOpenOption.java | 126 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardWatchEventKind.java | 95 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchEvent.java | 117 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchKey.java | 138 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchService.java | 179 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Watchable.java | 128 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntry.java | 395 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryFlag.java | 66 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryPermission.java | 131 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryType.java | 57 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java | 211 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AttributeView.java | 119 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/Attributes.java | 714 ---- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java | 185 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java | 164 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java | 180 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/DosFileAttributes.java | 85 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileAttribute.java | 51 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileAttributeView.java | 44 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java | 102 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreAttributeView.java | 39 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributeView.java | 94 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributes.java | 67 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/GroupPrincipal.java | 43 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java | 196 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFileAttributes.java | 78 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFilePermission.java | 87 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFilePermissions.java | 190 - overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipal.java | 55 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java | 105 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java | 65 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/package-info.java | 120 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/package-info.java | 116 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/AbstractPath.java | 542 --- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/FileSystemProvider.java | 441 -- overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/FileTypeDetector.java | 102 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/package-info.java | 39 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AbstractFuture.java | 64 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java | 359 -- overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileChannelImpl.java | 169 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java | 223 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java | 546 --- overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Cancellable.java | 39 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java | 114 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/FileLockTable.java | 287 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Groupable.java | 35 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Invoker.java | 274 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/PendingFuture.java | 259 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java | 425 -- overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java | 437 -- overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/ThreadPool.java | 168 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java | 113 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java | 210 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractFileStoreSpaceAttributeView.java | 121 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractFileTypeDetector.java | 70 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractPoller.java | 296 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractWatchKey.java | 179 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractWatchService.java | 166 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Cancellable.java | 137 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java | 116 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Globs.java | 155 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/MimeType.java | 73 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/NativeBuffer.java | 87 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/NativeBuffers.java | 140 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/PollingWatchService.java | 454 -- overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Reflect.java | 63 overlays/nio2/openjdk/jdk/src/share/native/sun/nio/ch/genSocketOptionRegistry.c | 129 overlays/nio2/openjdk/jdk/src/share/sample/nio/file/AclEdit.java | 301 - overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Chmod.java | 363 -- overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Copy.java | 227 - overlays/nio2/openjdk/jdk/src/share/sample/nio/file/DiskUsage.java | 78 overlays/nio2/openjdk/jdk/src/share/sample/nio/file/FileType.java | 62 overlays/nio2/openjdk/jdk/src/share/sample/nio/file/WatchDir.java | 204 - overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Xdd.java | 119 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java | 57 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java | 76 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/EPollPort.java | 362 -- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/LinuxAsynchronousChannelProvider.java | 100 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/Port.java | 170 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/SolarisAsynchronousChannelProvider.java | 103 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/SolarisEventPort.java | 243 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java | 320 -- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java | 685 ---- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java | 74 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileTypeDetector.java | 36 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java | 99 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java | 300 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java | 102 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java | 186 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java | 41 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxNativeDispatcher.java | 126 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java | 469 -- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java | 408 -- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileStore.java | 102 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java | 178 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java | 41 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisNativeDispatcher.java | 56 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java | 771 ---- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java | 289 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java | 615 --- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java | 270 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixException.java | 117 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java | 401 -- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java | 312 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileKey.java | 60 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileModeAttribute.java | 86 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java | 289 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileStoreAttributes.java | 59 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java | 375 -- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java | 151 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixMountEntry.java | 82 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java | 556 --- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java | 1201 ------- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixSecureDirectoryStream.java | 664 ---- overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixUriUtils.java | 216 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixUserPrincipals.java | 179 - overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/EPollPort.c | 173 - overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/SolarisEventPort.c | 155 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.c | 47 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/UnixAsynchronousSocketChannelImpl.c | 53 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c | 205 - overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c | 160 - overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c | 156 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/SolarisNativeDispatcher.c | 70 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/SolarisWatchService.c | 141 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/UnixCopyFile.c | 85 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c | 1078 ------ overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c | 104 overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c | 129 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java | 43 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/DefaultSelectorProvider.java | 49 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/Iocp.java | 435 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java | 161 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousChannelProvider.java | 96 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java | 736 ---- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java | 367 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java | 911 ----- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/DefaultFileSystemProvider.java | 38 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/DefaultFileTypeDetector.java | 36 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java | 82 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsAclFileAttributeView.java | 226 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsChannelFactory.java | 348 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsConstants.java | 191 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java | 225 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsException.java | 109 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java | 296 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributes.java | 296 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java | 527 --- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java | 324 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java | 318 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java | 148 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsLinkSupport.java | 466 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java | 1131 ------- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java | 1312 -------- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java | 225 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPathType.java | 38 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsSecurity.java | 123 overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java | 392 -- overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsUriSupport.java | 167 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsUserPrincipals.java | 169 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java | 581 --- overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/Iocp.c | 144 overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c | 132 overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.c | 142 overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c | 222 - overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c | 62 overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c | 1328 -------- overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java | 84 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java | 63 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java | 261 - overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java | 137 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java | 167 - overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java | 50 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java | 134 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java | 120 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh | 52 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java | 377 -- overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java | 585 --- overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java | 67 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java | 340 -- overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java | 49 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java | 136 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java | 76 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow | 3 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny | 3 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java | 805 ----- overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java | 104 overlays/nio2/openjdk/jdk/test/java/nio/channels/Channels/Basic2.java | 172 - overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java | 38 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider | 1 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java | 62 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java | 62 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh | 71 overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Basic.java | 153 overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Filters.java | 241 - overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/SecureDS.java | 370 -- overlays/nio2/openjdk/jdk/test/java/nio/file/FileStore/Basic.java | 79 overlays/nio2/openjdk/jdk/test/java/nio/file/FileSystem/Basic.java | 82 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ContentType.java | 91 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/CreateFileTree.java | 96 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ForceLoad.java | 38 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector | 1 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/Misc.java | 126 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/PrintFileTree.java | 78 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SimpleFileTypeDetector.java | 47 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SkipSiblings.java | 85 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/TerminateWalk.java | 70 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/content_type.sh | 70 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/walk_file_tree.sh | 86 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/CopyAndMove.java | 983 ------ overlays/nio2/openjdk/jdk/test/java/nio/file/Path/DeleteOnClose.java | 77 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/InterruptCopy.java | 119 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Links.java | 143 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Misc.java | 349 -- overlays/nio2/openjdk/jdk/test/java/nio/file/Path/PathOps.java | 646 ---- overlays/nio2/openjdk/jdk/test/java/nio/file/Path/SBC.java | 468 -- overlays/nio2/openjdk/jdk/test/java/nio/file/Path/TemporaryFiles.java | 76 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/UriImportExport.java | 80 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/delete_on_close.sh | 61 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/temporary_files.sh | 65 overlays/nio2/openjdk/jdk/test/java/nio/file/PathMatcher/Basic.java | 163 - overlays/nio2/openjdk/jdk/test/java/nio/file/TestUtil.java | 117 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/Basic.java | 493 --- overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/FileTreeModifier.java | 148 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/WithSecurityManager.java | 83 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/denyAll.policy | 3 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndOneLevel.policy | 5 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndTree.policy | 5 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirOnly.policy | 4 overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java | 166 - overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/Attributes/Basic.java | 254 - overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java | 150 overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java | 155 overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/FileStoreAttributeView/Basic.java | 170 - overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java | 398 -- overlays/nio2/openjdk/jdk/test/java/nio/file/spi/SetDefaultProvider.java | 44 overlays/nio2/openjdk/jdk/test/java/nio/file/spi/TestProvider.java | 128 diffs (truncated from 62096 to 500 lines): diff -r ab30fa9f3e55 -r a0f00c50a187 ChangeLog --- a/ChangeLog Fri Mar 06 12:26:40 2009 +0000 +++ b/ChangeLog Fri Mar 06 13:04:03 2009 +0000 @@ -1,3 +1,299 @@ 2009-03-06 Andrew John Hughes + + * overlays/nio2/openjdk/jdk/make/mksample/nio/file/Makefile, + * overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedCopyOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedOpenOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousByteChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousFileChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/CompletionHandler.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/SeekableByteChannel.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AccessDeniedException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AccessMode.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/AtomicMoveNotSupportedException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedDirectoryStreamException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedFileSystemException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ClosedWatchServiceException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/CopyOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryNotEmptyException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryStream.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/DirectoryStreamFilters.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileAction.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileAlreadyExistsException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileRef.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileStore.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystem.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemAlreadyExistsException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystemNotFoundException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileSystems.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileTreeWalker.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitResult.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/FileVisitor.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Files.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/InvalidPathException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/LinkOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/LinkPermission.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NoSuchFileException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NotDirectoryException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/NotLinkException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/OpenOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Path.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/PathMatcher.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Paths.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ProviderMismatchException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ProviderNotFoundException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/ReadOnlyFileSystemException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardCopyOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardOpenOption.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/StandardWatchEventKind.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchEvent.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchKey.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/WatchService.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/Watchable.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntry.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryFlag.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryPermission.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclEntryType.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/AttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/Attributes.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/DosFileAttributes.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileAttribute.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributes.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/GroupPrincipal.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFileAttributes.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFilePermission.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/PosixFilePermissions.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipal.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/package-info.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/package-info.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/AbstractPath.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/FileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/FileTypeDetector.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/spi/package-info.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AbstractFuture.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Cancellable.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/CompletedFuture.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/FileLockTable.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Groupable.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/Invoker.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/PendingFuture.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/ThreadPool.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractFileStoreSpaceAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractPoller.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractWatchKey.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractWatchService.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Cancellable.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Globs.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/MimeType.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/NativeBuffer.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/NativeBuffers.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/PollingWatchService.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/Reflect.java, + * overlays/nio2/openjdk/jdk/src/share/native/sun/nio/ch/genSocketOptionRegistry.c, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/AclEdit.java, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Chmod.java, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Copy.java, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/DiskUsage.java, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/FileType.java, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/WatchDir.java, + * overlays/nio2/openjdk/jdk/src/share/sample/nio/file/Xdd.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/EPollPort.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/LinuxAsynchronousChannelProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/Port.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/SolarisAsynchronousChannelProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/SolarisEventPort.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxNativeDispatcher.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileStore.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisNativeDispatcher.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixException.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileKey.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileModeAttribute.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileStoreAttributes.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixMountEntry.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixSecureDirectoryStream.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixUriUtils.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/UnixUserPrincipals.java, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/EPollPort.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/SolarisEventPort.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/UnixAsynchronousSocketChannelImpl.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/SolarisNativeDispatcher.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/SolarisWatchService.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/UnixCopyFile.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c, + * overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/DefaultSelectorProvider.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/Iocp.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousChannelProvider.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/DefaultFileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/DefaultFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsAclFileAttributeView.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsChannelFactory.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsConstants.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsException.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributes.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsLinkSupport.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsPathType.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsSecurity.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsUriSupport.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsUserPrincipals.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java, + * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/Iocp.c, + * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c, + * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.c, + * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c, + * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c, + * overlays/nio2/openjdk/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/Channels/Basic2.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Filters.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/SecureDS.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/FileStore/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/FileSystem/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ContentType.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/CreateFileTree.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ForceLoad.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/Misc.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/PrintFileTree.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SimpleFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SkipSiblings.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/TerminateWalk.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/content_type.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/walk_file_tree.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/CopyAndMove.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/DeleteOnClose.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/InterruptCopy.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Links.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Misc.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/PathOps.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/SBC.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/TemporaryFiles.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/UriImportExport.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/delete_on_close.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/temporary_files.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/PathMatcher/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/TestUtil.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/FileTreeModifier.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/WithSecurityManager.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/denyAll.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndOneLevel.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndTree.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirOnly.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/Attributes/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/FileStoreAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/SetDefaultProvider.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/TestProvider.java: + Removed; in b50. + * Makefile.am: Bump to b50. + 2009-03-06 Andrew John Hughes * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/io/Inputs/Basic.java, diff -r ab30fa9f3e55 -r a0f00c50a187 Makefile.am --- a/Makefile.am Fri Mar 06 12:26:40 2009 +0000 +++ b/Makefile.am Fri Mar 06 13:04:03 2009 +0000 @@ -1,6 +1,6 @@ OPENJDK_DATE = 26_feb_2009 -OPENJDK_DATE = 26_feb_2009 -OPENJDK_MD5SUM = 2401015f65b5c099acf87b3f0b9e8404 -OPENJDK_VERSION = b49 +OPENJDK_DATE = 05_mar_2009 +OPENJDK_MD5SUM = a451251ebdd9a219b16429369fa72e2a +OPENJDK_VERSION = b50 CACAO_VERSION = 0.99.3 CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 diff -r ab30fa9f3e55 -r a0f00c50a187 overlays/nio2/openjdk/jdk/make/mksample/nio/file/Makefile --- a/overlays/nio2/openjdk/jdk/make/mksample/nio/file/Makefile Fri Mar 06 12:26:40 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -# -# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. -# 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. Sun designates this -# particular file as subject to the "Classpath" exception as provided -# by Sun in the LICENSE file that accompanied this code. -# -# 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. -# - -# -# Makefile for the nio/file sample code -# - -BUILDDIR = ../../.. - -PRODUCT = java - -include $(BUILDDIR)/common/Defs.gmk - -SAMPLE_SRC_DIR = $(SHARE_SRC)/sample/nio/file -SAMPLE_DST_DIR = $(SAMPLEDIR)/nio/file - -SAMPLE_FILES = \ - $(SAMPLE_DST_DIR)/AclEdit.java \ - $(SAMPLE_DST_DIR)/Chmod.java \ - $(SAMPLE_DST_DIR)/Copy.java \ - $(SAMPLE_DST_DIR)/DiskUsage.java \ - $(SAMPLE_DST_DIR)/FileType.java \ - $(SAMPLE_DST_DIR)/WatchDir.java \ - $(SAMPLE_DST_DIR)/Xdd.java - -all build: $(SAMPLE_FILES) - -$(SAMPLE_DST_DIR)/%: $(SAMPLE_SRC_DIR)/% - $(install-file) - -clean clobber: - $(RM) -r $(SAMPLE_DST_DIR) - -.PHONY: all build clean clobber diff -r ab30fa9f3e55 -r a0f00c50a187 overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedCopyOption.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedCopyOption.java Fri Mar 06 12:26:40 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. - * 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. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.nio.file; - -import java.nio.file.CopyOption; - -/** - * Defines extended copy options supported on some platforms - * by Sun's provider implementation. - * - * @since 1.7 - */ - -public enum ExtendedCopyOption implements CopyOption { - /** - * The copy may be interrupted by the {@link Thread#interrupt interrupt} - * method. - */ - INTERRUPTIBLE, -} diff -r ab30fa9f3e55 -r a0f00c50a187 overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedOpenOption.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedOpenOption.java Fri Mar 06 12:26:40 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* - * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. - * 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. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * 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. - */ - -package com.sun.nio.file; - -import java.nio.file.OpenOption; - -/** - * Defines extended open options supported on some platforms - * by Sun's provider implementation. - * - * @since 1.7 - */ - -public enum ExtendedOpenOption implements OpenOption { - /** - * Prevent operations on the file that request read access. - */ - NOSHARE_READ, - /** - * Prevent operations on the file that request write access. - */ - NOSHARE_WRITE, - /** - * Prevent operations on the file that request delete access. - */ - NOSHARE_DELETE; -} diff -r ab30fa9f3e55 -r a0f00c50a187 overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java Fri Mar 06 12:26:40 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. - * 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. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * 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. From ahughes at redhat.com Thu Mar 19 03:48:25 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:25 +0000 Subject: changeset in /hg/icedtea: Move NIO2 tests to right directory. Message-ID: changeset ab30fa9f3e55 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ab30fa9f3e55 description: Move NIO2 tests to right directory. 2009-03-06 Andrew John Hughes * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/io/Inputs/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Attack.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Identity.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Restart.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Unbounded.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousDatagramChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/Lock.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousSocketChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousSocketChannel/Leaky.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/Channels/Basic2.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/Filters.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/SecureDS.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/FileStore/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/FileSystem/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/ContentType.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/CreateFileTree.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/ForceLoad.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/Misc.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/PrintFileTree.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/SimpleFileTypeDetector.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/SkipSiblings.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/TerminateWalk.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/content_type.sh, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/walk_file_tree.sh, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/CopyAndMove.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/DeleteOnClose.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/InterruptCopy.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/Links.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/Misc.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/PathOps.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/SBC.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/TemporaryFiles.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/UriImportExport.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/delete_on_close.sh, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/temporary_files.sh, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/PathMatcher/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/TestUtil.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/FileTreeModifier.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/WithSecurityManager.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/denyAll.policy, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirAndOneLevel.policy, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirAndTree.policy, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirOnly.policy, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/AclFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/Attributes/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/BasicFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/DosFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/FileStoreAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/NamedAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/PosixFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/spi/SetDefaultProvider.java, * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/spi/TestProvider.java: Moved to... * overlays/nio2/openjdk/jdk/test/java/io/Inputs/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/Channels/Basic2.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java, * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Filters.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/SecureDS.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/FileStore/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/FileSystem/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ContentType.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/CreateFileTree.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ForceLoad.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/Misc.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/PrintFileTree.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SimpleFileTypeDetector.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SkipSiblings.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/TerminateWalk.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/content_type.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/walk_file_tree.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/CopyAndMove.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/DeleteOnClose.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/InterruptCopy.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Links.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Misc.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/PathOps.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/SBC.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/TemporaryFiles.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/UriImportExport.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/delete_on_close.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/temporary_files.sh, * overlays/nio2/openjdk/jdk/test/java/nio/file/PathMatcher/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/TestUtil.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/FileTreeModifier.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/WithSecurityManager.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/denyAll.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndOneLevel.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndTree.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirOnly.policy, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/Attributes/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/FileStoreAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/NamedAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/SetDefaultProvider.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/TestProvider.java: here. diffstat: 145 files changed, 11923 insertions(+), 11776 deletions(-) ChangeLog | 147 + overlays/nio2/openjdk/jdk/test/java/io/Inputs/Basic.java | 218 ++ overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java | 84 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java | 63 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java | 261 ++ overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java | 137 + overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java | 167 + overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java | 50 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java | 134 + overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java | 120 + overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh | 52 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java | 377 +++ overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java | 585 +++++ overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java | 67 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java | 340 +++ overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java | 49 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java | 136 + overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java | 76 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow | 3 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny | 3 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java | 805 ++++++++ overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java | 104 + overlays/nio2/openjdk/jdk/test/java/nio/channels/Channels/Basic2.java | 172 + overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java | 38 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider | 1 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java | 62 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java | 62 overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh | 71 overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Basic.java | 153 + overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Filters.java | 241 ++ overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/SecureDS.java | 370 +++ overlays/nio2/openjdk/jdk/test/java/nio/file/FileStore/Basic.java | 79 overlays/nio2/openjdk/jdk/test/java/nio/file/FileSystem/Basic.java | 82 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ContentType.java | 91 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/CreateFileTree.java | 96 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ForceLoad.java | 38 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector | 1 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/Misc.java | 126 + overlays/nio2/openjdk/jdk/test/java/nio/file/Files/PrintFileTree.java | 78 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SimpleFileTypeDetector.java | 47 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SkipSiblings.java | 85 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/TerminateWalk.java | 70 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/content_type.sh | 70 overlays/nio2/openjdk/jdk/test/java/nio/file/Files/walk_file_tree.sh | 86 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/CopyAndMove.java | 983 ++++++++++ overlays/nio2/openjdk/jdk/test/java/nio/file/Path/DeleteOnClose.java | 77 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/InterruptCopy.java | 119 + overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Links.java | 143 + overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Misc.java | 349 +++ overlays/nio2/openjdk/jdk/test/java/nio/file/Path/PathOps.java | 646 ++++++ overlays/nio2/openjdk/jdk/test/java/nio/file/Path/SBC.java | 468 ++++ overlays/nio2/openjdk/jdk/test/java/nio/file/Path/TemporaryFiles.java | 76 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/UriImportExport.java | 80 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/delete_on_close.sh | 61 overlays/nio2/openjdk/jdk/test/java/nio/file/Path/temporary_files.sh | 65 overlays/nio2/openjdk/jdk/test/java/nio/file/PathMatcher/Basic.java | 163 + overlays/nio2/openjdk/jdk/test/java/nio/file/TestUtil.java | 117 + overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/Basic.java | 493 +++++ overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/FileTreeModifier.java | 148 + overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/WithSecurityManager.java | 83 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/denyAll.policy | 3 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndOneLevel.policy | 5 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndTree.policy | 5 overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirOnly.policy | 4 overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java | 166 + overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/Attributes/Basic.java | 254 ++ overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java | 150 + overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java | 155 + overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/FileStoreAttributeView/Basic.java | 170 + overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/NamedAttributeView/Basic.java | 273 ++ overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java | 398 ++++ overlays/nio2/openjdk/jdk/test/java/nio/file/spi/SetDefaultProvider.java | 44 overlays/nio2/openjdk/jdk/test/java/nio/file/spi/TestProvider.java | 128 + overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/io/Inputs/Basic.java | 218 -- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java | 84 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Attack.java | 63 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Basic.java | 261 -- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java | 137 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Identity.java | 167 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java | 50 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Restart.java | 134 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Unbounded.java | 120 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh | 52 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousDatagramChannel/Basic.java | 377 --- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/Basic.java | 585 ----- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java | 67 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/Lock.java | 340 --- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java | 49 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/Basic.java | 136 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java | 76 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow | 3 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny | 3 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousSocketChannel/Basic.java | 805 -------- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousSocketChannel/Leaky.java | 104 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/Channels/Basic2.java | 172 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java | 38 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider | 1 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java | 62 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java | 62 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh | 71 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/Basic.java | 153 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/Filters.java | 241 -- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/SecureDS.java | 370 --- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/FileStore/Basic.java | 79 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/FileSystem/Basic.java | 82 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/ContentType.java | 91 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/CreateFileTree.java | 96 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/ForceLoad.java | 38 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector | 1 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/Misc.java | 126 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/PrintFileTree.java | 78 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/SimpleFileTypeDetector.java | 47 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/SkipSiblings.java | 85 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/TerminateWalk.java | 70 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/content_type.sh | 70 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/walk_file_tree.sh | 86 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/CopyAndMove.java | 983 ---------- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/DeleteOnClose.java | 77 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/InterruptCopy.java | 119 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/Links.java | 143 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/Misc.java | 349 --- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/PathOps.java | 646 ------ overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/SBC.java | 468 ---- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/TemporaryFiles.java | 76 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/UriImportExport.java | 80 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/delete_on_close.sh | 61 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/temporary_files.sh | 65 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/PathMatcher/Basic.java | 163 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/TestUtil.java | 117 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/Basic.java | 493 ----- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/FileTreeModifier.java | 148 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/WithSecurityManager.java | 83 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/denyAll.policy | 3 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirAndOneLevel.policy | 5 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirAndTree.policy | 5 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirOnly.policy | 4 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/AclFileAttributeView/Basic.java | 166 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/Attributes/Basic.java | 254 -- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/BasicFileAttributeView/Basic.java | 150 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/DosFileAttributeView/Basic.java | 155 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/FileStoreAttributeView/Basic.java | 170 - overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/NamedAttributeView/Basic.java | 273 -- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/PosixFileAttributeView/Basic.java | 398 ---- overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/spi/SetDefaultProvider.java | 44 overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/spi/TestProvider.java | 128 - diffs (truncated from 24282 to 500 lines): diff -r e6271aa33a0c -r ab30fa9f3e55 ChangeLog --- a/ChangeLog Thu Mar 05 09:41:58 2009 +0000 +++ b/ChangeLog Fri Mar 06 12:26:40 2009 +0000 @@ -1,3 +1,150 @@ 2009-03-05 Gary Benson + + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/io/Inputs/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Attack.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Identity.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Restart.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/Unbounded.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousDatagramChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/Lock.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousSocketChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/AsynchronousSocketChannel/Leaky.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/Channels/Basic2.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/Filters.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/DirectoryStream/SecureDS.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/FileStore/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/FileSystem/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/ContentType.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/CreateFileTree.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/ForceLoad.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/Misc.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/PrintFileTree.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/SimpleFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/SkipSiblings.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/TerminateWalk.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/content_type.sh, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Files/walk_file_tree.sh, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/CopyAndMove.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/DeleteOnClose.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/InterruptCopy.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/Links.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/Misc.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/PathOps.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/SBC.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/TemporaryFiles.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/UriImportExport.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/delete_on_close.sh, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/Path/temporary_files.sh, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/PathMatcher/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/TestUtil.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/FileTreeModifier.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/WithSecurityManager.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/denyAll.policy, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirAndOneLevel.policy, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirAndTree.policy, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/WatchService/grantDirOnly.policy, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/AclFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/Attributes/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/BasicFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/DosFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/FileStoreAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/NamedAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/attribute/PosixFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/spi/SetDefaultProvider.java, + * overlays/nio2/openjdk/jdk/test/org/classpath/icedtea/java/nio/file/spi/TestProvider.java: Moved to... + * overlays/nio2/openjdk/jdk/test/java/io/Inputs/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/Channels/Basic2.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java, + * overlays/nio2/openjdk/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/Filters.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/DirectoryStream/SecureDS.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/FileStore/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/FileSystem/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ContentType.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/CreateFileTree.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/ForceLoad.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/Misc.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/PrintFileTree.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SimpleFileTypeDetector.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/SkipSiblings.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/TerminateWalk.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/content_type.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Files/walk_file_tree.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/CopyAndMove.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/DeleteOnClose.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/InterruptCopy.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Links.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/Misc.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/PathOps.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/SBC.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/TemporaryFiles.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/UriImportExport.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/delete_on_close.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/Path/temporary_files.sh, + * overlays/nio2/openjdk/jdk/test/java/nio/file/PathMatcher/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/TestUtil.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/FileTreeModifier.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/WithSecurityManager.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/denyAll.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndOneLevel.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirAndTree.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/WatchService/grantDirOnly.policy, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/Attributes/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/FileStoreAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/NamedAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/SetDefaultProvider.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/spi/TestProvider.java: here. + 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp diff -r e6271aa33a0c -r ab30fa9f3e55 overlays/nio2/openjdk/jdk/test/java/io/Inputs/Basic.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/overlays/nio2/openjdk/jdk/test/java/io/Inputs/Basic.java Fri Mar 06 12:26:40 2009 +0000 @@ -0,0 +1,218 @@ +/* + * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. + * 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. + */ + +/* @test + * @summary Basic unit test for java.io.Inputs class + */ + +import java.io.*; +import java.util.*; +import java.nio.charset.UnsupportedCharsetException; +import java.nio.charset.MalformedInputException; + +import java.io.Inputs; + +import java.nio.file.Path; + +public class Basic { + static final Random rand = new Random(); + + public static void main(String[] args) throws IOException { + Path dir = createTempDir(); + try { + testReadAllBytesMethods(dir); + testReadAllLinesMethods(dir); + } finally { + dir.delete(); + } + } + + static void testReadAllBytesMethods(Path dir) throws IOException { + // create file with random bytes + byte[] bytes = new byte[1 + rand.nextInt(64*1024)]; + rand.nextBytes(bytes); + Path file = dir.resolve("foo"); + Outputs.write(file, bytes); + + try { + byte[] result; + + // check all bytes are read + result = Inputs.readAllBytes(file); + if (!Arrays.equals(bytes, result)) + throw new RuntimeException("Unexpected bytes"); + result = Inputs.readAllBytes(new File(file.toString())); + if (!Arrays.equals(bytes, result)) + throw new RuntimeException("Unexpected bytes"); + + // via URL connection + InputStream in = file.toUri().toURL().openConnection().getInputStream(); + try { + result = Inputs.readAllBytes(in); + if (!Arrays.equals(bytes, result)) + throw new RuntimeException("Unexpected bytes"); + } finally { + in.close(); + } + + // test zero-length file + Outputs.write(file, new byte[0]); + if (Inputs.readAllBytes(file).length != 0) + throw new RuntimeException("Unexpected bytes"); + + // NullPointerException + try { + Inputs.readAllBytes((FileRef)null); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException npe) { } + + try { + Inputs.readAllBytes((File)null); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException npe) { } + + try { + Inputs.readAllBytes((InputStream)null); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException npe) { } + + } finally { + file.delete(); + } + } + + static void testReadAllLinesMethods(Path dir) throws IOException { + String[] poem = { "I met a traveler from an antique land", + "Who said: Two vast and trunkless legs of stone", + "Stand in the desert. Near them, on the sand", + "Half sunk, a shattered visage lies, whose frown,", + "And wrinkled lip, and sneer of cold command,", + "Tell that its sculptor well those passions read", + "Which yet survive, stamped on these lifeless things,", + "The hand that mocked them, and the heart that fed;", + "And on the pedestal these words appear:", + "My name is Ozymandias, king of kings:", + "Look upon my works, ye Mighty, and despair!", + "Nothing beside remains. Round the decay", + "Of that colossal wreck, boundless and bare", + "The lone and level sands stretch far away." }; + List poemAsList = Arrays.asList(poem); + + Path file = dir.resolve("Shelley"); + try { + Outputs.writeLines(file, poem); + + checkEquals(poemAsList, Inputs.readAllLines(file)); + checkEquals(poemAsList, Inputs.readAllLines(file, "UTF-8")); + checkEquals(poemAsList, Inputs.readAllLines(new File(file.toString()))); + checkEquals(poemAsList, + Inputs.readAllLines(new File(file.toString()), "UTF-8")); + InputStream in = file.newInputStream(); + try { + checkEquals(poemAsList, Inputs.readAllLines(in)); + } finally { + in.close(); + } + InputStreamReader reader = new InputStreamReader(file.newInputStream()); + try { + checkEquals(poemAsList, Inputs.readAllLines(reader)); + } finally { + reader.close(); + } + + // IOException + try { + Inputs.readAllLines(dir.resolve("doesNotExist")); + throw new RuntimeException("IOException expected"); + } catch (IOException ignore) { } + + // MalformedInputException + OutputStream out = file.newOutputStream(); + try { + out.write((byte)0xC2); // malformed 2-byte sequence + out.write((byte)0x00); + } finally { + out.close(); + } + try { + Inputs.readAllLines(file, "UTF-8"); + throw new RuntimeException("MalformedInputException expected"); + } catch (MalformedInputException ignore) { } + + // UnsupportedCharsetException + try { + Inputs.readAllLines(file, "BAD-CHARSET"); + throw new RuntimeException("UnsupportedCharsetException expected"); + } catch (UnsupportedCharsetException ignore) { } + + try { + Inputs.readAllLines(new File(file.toString()), "BAD-CHARSET"); + throw new RuntimeException("UnsupportedCharsetException expected"); + } catch (UnsupportedCharsetException ignore) { } + in = file.newInputStream(); + try { + try { + Inputs.readAllLines(in, "BAD-CHARSET"); + throw new RuntimeException("UnsupportedCharsetException expected"); + } catch (UnsupportedCharsetException ignore) { } + } finally { + in.close(); + } + + // NulPointerException + try { + Inputs.readAllLines((FileRef)null); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException npe) { } + try { + Inputs.readAllLines((FileRef)null, "UTF-8"); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException npe) { } + + try { + Inputs.readAllLines(file, null); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException npe) { } + + } finally { + file.delete(); + } + } + + static void checkEquals(List expected, List actual) { + if (!actual.equals(expected)) + throw new RuntimeException(); + } + + + static Path createTempDir() throws IOException { + Path tmpdir = Paths.get(System.getProperty("java.io.tmpdir")); + Random r = new Random(); + + Path dir; + do { + dir = tmpdir.resolve("name" + r.nextInt()); + } while (dir.exists()); + return dir.createDirectory(); + } +} diff -r e6271aa33a0c -r ab30fa9f3e55 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java Fri Mar 06 12:26:40 2009 +0000 @@ -0,0 +1,84 @@ +/* + * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. + * 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. + */ + +import java.util.concurrent.*; + +import java.nio.channels.AsynchronousChannelGroup; + +/** + * Test that arbitrary tasks can be submitted to a channel group's thread pool. + */ + +public class AsExecutor { + + public static void main(String[] args) throws Exception { + // create channel groups + ThreadFactory factory = new PrivilegedThreadFactory(); + int nThreads = 5; + ExecutorService pool = Executors.newFixedThreadPool(5, factory); + AsynchronousChannelGroup group1 = AsynchronousChannelGroup + .withFixedThreadPool(pool, nThreads); + AsynchronousChannelGroup group2 = AsynchronousChannelGroup + .withCachedThreadPool(Executors.newCachedThreadPool(factory), 0); + + try { + // execute simple tasks + testSimpleTask(group1); + testSimpleTask(group2); + + // install security manager and test again + System.setSecurityManager( new SecurityManager() ); + testSimpleTask(group1); + testSimpleTask(group2); + + // attempt to execute tasks that run with only frames from boot + // class loader on the stack. + testAttackingTask(group1); + testAttackingTask(group2); + } finally { + group1.shutdown(); + group2.shutdown(); + } + } + + static void testSimpleTask(AsynchronousChannelGroup group) throws Exception { + Executor executor = (Executor)group; + final CountDownLatch latch = new CountDownLatch(1); + executor.execute(new Runnable() { + public void run() { + latch.countDown(); + } + }); + latch.await(); + } + + static void testAttackingTask(AsynchronousChannelGroup group) throws Exception { + Executor executor = (Executor)group; + Attack task = new Attack(); + executor.execute(task); + task.waitUntilDone(); + if (!task.failedDueToSecurityException()) + throw new RuntimeException("SecurityException expected"); + } + +} diff -r e6271aa33a0c -r ab30fa9f3e55 overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/overlays/nio2/openjdk/jdk/test/java/nio/channels/AsynchronousChannelGroup/Attack.java Fri Mar 06 12:26:40 2009 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. + * 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. + */ + +import java.net.*; +import java.io.IOException; +import java.util.concurrent.CountDownLatch; + +/** + * A task that attempts to attack the current host. + */ + +public class Attack implements Runnable { From gbenson at redhat.com Thu Mar 19 03:48:17 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:17 +0000 Subject: changeset in /hg/icedtea: 2009-03-04 Gary Benson changeset c8fd76f04b59 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=c8fd76f04b59 description: 2009-03-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Moved partly into... * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise into... * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: New file. * ports/hotspot/src/share/vm/shark/sharkState.hpp: Merged SharkTrackingState into SharkState, and moved SharkEntryState into sharkFunction.cpp and SharkPHIState into sharkTopLevelBlock.cpp. * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: s/SharkBlock/SharkTopLevelBlock/g * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. * ports/hotspot/src/share/vm/shark/shark_globals.hpp (SharkMaxInlineSize): New parameter. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::GetBlockInsertionPoint): New method. (SharkBuilder::CreateBlock): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. (transplanted from b593d3ef9dce396c5355ea00592750acbd9337a7) diffstat: 18 files changed, 3491 insertions(+), 2450 deletions(-) ChangeLog | 33 ports/hotspot/src/share/vm/includeDB_shark | 106 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 1904 +-------------- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 488 +-- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 29 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 6 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 74 ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 24 ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 761 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.hpp | 32 ports/hotspot/src/share/vm/shark/sharkMonitor.cpp | 4 ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 6 ports/hotspot/src/share/vm/shark/sharkState.cpp | 243 - ports/hotspot/src/share/vm/shark/sharkState.hpp | 104 ports/hotspot/src/share/vm/shark/sharkState.inline.hpp | 59 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 1716 +++++++++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 344 ++ ports/hotspot/src/share/vm/shark/shark_globals.hpp | 8 diffs (truncated from 6546 to 500 lines): diff -r 474e0f80ba58 -r c8fd76f04b59 ChangeLog --- a/ChangeLog Tue Mar 03 23:58:43 2009 +0000 +++ b/ChangeLog Wed Mar 04 10:41:13 2009 -0500 @@ -1,3 +1,36 @@ 2009-03-03 Andrew John Hughes + + * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Moved partly into... + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise into... + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: New file. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp: + Merged SharkTrackingState into SharkState, and moved + SharkEntryState into sharkFunction.cpp and SharkPHIState + into sharkTopLevelBlock.cpp. + * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: + s/SharkBlock/SharkTopLevelBlock/g + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/shark_globals.hpp + (SharkMaxInlineSize): New parameter. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::GetBlockInsertionPoint): New method. + (SharkBuilder::CreateBlock): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-03-03 Andrew John Hughes * AUTHORS: Add Michael Franz. diff -r 474e0f80ba58 -r c8fd76f04b59 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Tue Mar 03 23:58:43 2009 +0000 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 04 10:41:13 2009 -0500 @@ -24,6 +24,25 @@ // // NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps! + +sharkBlock.cpp debug.hpp +sharkBlock.cpp bytecodes.hpp +sharkBlock.cpp llvmHeaders.hpp +sharkBlock.cpp shark_globals.hpp +sharkBlock.cpp sharkBlock.hpp +sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkRuntime.hpp +sharkBlock.cpp sharkState.inline.hpp +sharkBlock.cpp sharkValue.inline.hpp + +sharkBlock.hpp allocation.hpp +sharkBlock.hpp ciMethod.hpp +sharkBlock.hpp ciStreams.hpp +sharkBlock.hpp debug.hpp +sharkBlock.hpp llvmHeaders.hpp +sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkState.hpp +sharkBlock.hpp sharkValue.hpp ciMethod.cpp ciTypeFlow.hpp ciMethod.cpp methodOop.hpp @@ -63,33 +82,35 @@ shark_globals.hpp shark_globals.hpp shark_globals_.hpp shark_globals.hpp globals.hpp -sharkBlock.cpp allocation.hpp -sharkBlock.cpp bytecodes.hpp -sharkBlock.cpp ciField.hpp -sharkBlock.cpp ciStreams.hpp -sharkBlock.cpp ciType.hpp -sharkBlock.cpp ciTypeFlow.hpp -sharkBlock.cpp debug.hpp -sharkBlock.cpp llvmHeaders.hpp -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.inline.hpp - -sharkBlock.hpp allocation.hpp -sharkBlock.hpp bytecodes.hpp -sharkBlock.hpp ciStreams.hpp -sharkBlock.hpp ciType.hpp -sharkBlock.hpp ciTypeFlow.hpp -sharkBlock.hpp llvmHeaders.hpp -sharkBlock.hpp sharkBuilder.hpp -sharkBlock.hpp sharkFunction.hpp -sharkBlock.hpp sharkMonitor.hpp -sharkBlock.hpp sharkState.hpp -sharkBlock.hpp sharkValue.inline.hpp +sharkTopLevelBlock.cpp allocation.hpp +sharkTopLevelBlock.cpp bytecodes.hpp +sharkTopLevelBlock.cpp ciField.hpp +sharkTopLevelBlock.cpp ciStreams.hpp +sharkTopLevelBlock.cpp ciType.hpp +sharkTopLevelBlock.cpp ciTypeFlow.hpp +sharkTopLevelBlock.cpp debug.hpp +sharkTopLevelBlock.cpp llvmHeaders.hpp +sharkTopLevelBlock.cpp shark_globals.hpp +sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp +sharkTopLevelBlock.cpp sharkBuilder.hpp +sharkTopLevelBlock.cpp sharkConstantPool.hpp +sharkTopLevelBlock.cpp sharkInliner.hpp +sharkTopLevelBlock.cpp sharkRuntime.hpp +sharkTopLevelBlock.cpp sharkState.inline.hpp +sharkTopLevelBlock.cpp sharkValue.inline.hpp + +sharkTopLevelBlock.hpp allocation.hpp +sharkTopLevelBlock.hpp bytecodes.hpp +sharkTopLevelBlock.hpp ciStreams.hpp +sharkTopLevelBlock.hpp ciType.hpp +sharkTopLevelBlock.hpp ciTypeFlow.hpp +sharkTopLevelBlock.hpp llvmHeaders.hpp +sharkTopLevelBlock.hpp sharkBlock.hpp +sharkTopLevelBlock.hpp sharkBuilder.hpp +sharkTopLevelBlock.hpp sharkFunction.hpp +sharkTopLevelBlock.hpp sharkMonitor.hpp +sharkTopLevelBlock.hpp sharkState.inline.hpp +sharkTopLevelBlock.hpp sharkValue.inline.hpp sharkBuilder.cpp ciMethod.hpp sharkBuilder.cpp debug.hpp @@ -163,8 +184,8 @@ sharkConstantPool.cpp sharkConstantPool.hpp allocation.hpp sharkConstantPool.hpp llvmHeaders.hpp -sharkConstantPool.hpp sharkBlock.hpp sharkConstantPool.hpp sharkBuilder.hpp +sharkConstantPool.hpp sharkTopLevelBlock.hpp sharkEntry.cpp sharkEntry.hpp @@ -175,12 +196,12 @@ sharkFunction.cpp sharkFunction.cpp debug.hpp sharkFunction.cpp llvmHeaders.hpp sharkFunction.cpp shark_globals.hpp -sharkFunction.cpp sharkBlock.hpp sharkFunction.cpp sharkBuilder.hpp sharkFunction.cpp sharkEntry.hpp sharkFunction.cpp sharkFunction.hpp sharkFunction.cpp sharkMonitor.hpp sharkFunction.cpp sharkState.inline.hpp +sharkFunction.cpp sharkTopLevelBlock.hpp sharkFunction.hpp allocation.hpp sharkFunction.hpp ciEnv.hpp @@ -189,11 +210,25 @@ sharkFunction.hpp sharkFunction.hpp llvmHeaders.hpp sharkFunction.hpp sharkBuilder.hpp +sharkInliner.cpp allocation.hpp +sharkInliner.cpp bytecodes.hpp +sharkInliner.cpp ciField.hpp +sharkInliner.cpp ciMethod.hpp +sharkInliner.cpp ciStreams.hpp +sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkInliner.hpp +sharkInliner.cpp sharkState.inline.hpp +sharkInliner.cpp sharkValue.inline.hpp + +sharkInliner.hpp allocation.hpp +sharkInliner.hpp ciMethod.hpp +sharkInliner.hpp sharkState.inline.hpp + sharkMonitor.cpp llvmHeaders.hpp -sharkMonitor.cpp sharkBlock.hpp sharkMonitor.cpp sharkMonitor.hpp sharkMonitor.cpp sharkRuntime.hpp sharkMonitor.cpp sharkState.inline.hpp +sharkMonitor.cpp sharkTopLevelBlock.hpp sharkMonitor.hpp allocation.hpp sharkMonitor.hpp llvmHeaders.hpp @@ -218,21 +253,22 @@ sharkState.cpp sharkState.cpp allocation.hpp sharkState.cpp ciType.hpp sharkState.cpp ciTypeFlow.hpp -sharkState.cpp sharkBlock.hpp sharkState.cpp sharkBuilder.hpp +sharkState.cpp sharkCacheDecache.hpp sharkState.cpp sharkState.inline.hpp +sharkState.cpp sharkTopLevelBlock.hpp sharkState.cpp sharkType.hpp sharkState.cpp sharkValue.inline.hpp sharkState.hpp allocation.hpp +sharkState.hpp ciMethod.hpp +sharkState.hpp llvmHeaders.hpp sharkState.hpp sharkBuilder.hpp -sharkState.hpp sharkFunction.hpp -sharkState.hpp sharkValue.inline.hpp -sharkState.hpp vmreg.hpp +sharkState.hpp sharkValue.hpp sharkState.inline.hpp sharkBlock.hpp +sharkState.inline.hpp sharkBuilder.hpp sharkState.inline.hpp sharkState.hpp -sharkState.inline.hpp sharkCacheDecache.hpp sharkStateScanner.cpp sharkState.inline.hpp sharkStateScanner.cpp sharkStateScanner.hpp diff -r 474e0f80ba58 -r c8fd76f04b59 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Mar 03 23:58:43 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 04 10:41:13 2009 -0500 @@ -25,112 +25,26 @@ #include "incls/_precompiled.incl" #include "incls/_sharkBlock.cpp.incl" -#include "ciArrayKlass.hpp" // XXX fuck you makeDeps -#include "ciObjArrayKlass.hpp" // XXX likewise using namespace llvm; -void SharkBlock::enter(SharkBlock* predecessor, bool is_exception) -{ - // This block requires phis: - // - if it is entered more than once - // - if it is an exception handler, because in which - // case we assume it's entered more than once. - // - if the predecessor will be compiled after this - // block, in which case we can't simple propagate - // the state forward. - if (!needs_phis() && - (entered() || - is_exception || - (predecessor && predecessor->index() >= index()))) - _needs_phis = true; - - // Recurse into the tree - if (!entered()) { - _entered = true; - - if (!has_trap()) { - for (int i = 0; i < num_successors(); i++) { - successor(i)->enter(this, false); - } - for (int i = 0; i < num_exceptions(); i++) { - exception(i)->enter(this, true); - } - } - } -} - -void SharkBlock::initialize() -{ - char name[28]; - snprintf(name, sizeof(name), - "bci_%d%s", - start(), is_private_copy() ? "_private_copy" : ""); - _entry_block = function()->CreateBlock(name); -} - -void SharkBlock::acquire_method_lock() -{ - Value *object; - if (target()->is_static()) { - SharkConstantPool constants(this); - object = constants.java_mirror(); - } - else { - object = local(0)->jobject_value(); - } - iter()->force_bci(start()); // for the decache - function()->monitor(0)->acquire(this, object); - check_pending_exception(false); -} - -void SharkBlock::release_method_lock() -{ - function()->monitor(0)->release(this); - - // We neither need nor want to check for pending exceptions here. - // This method is only called by handle_return, which copes with - // them implicitly: - // - if a value is being returned then we just carry on as normal; - // the caller will see the pending exception and handle it. - // - if an exception is being thrown then that exception takes - // priority and ours will be ignored. -} - -void SharkBlock::parse() +void SharkBlock::parse_bytecode(int start, int limit) { SharkValue *a, *b, *c, *d; int i; - builder()->SetInsertPoint(entry_block()); - - if (has_trap()) { - iter()->force_bci(start()); - - current_state()->decache_for_trap(); - builder()->CreateCall2( - SharkRuntime::uncommon_trap(), - thread(), - LLVMValue::jint_constant(trap_index())); - builder()->CreateRetVoid(); - return; - } - - iter()->reset_to_bci(start()); - bool successors_done = false; - while (iter()->next() != ciBytecodeStream::EOBC() && bci() < limit()) { - NOT_PRODUCT(a = b = c = d = NULL); + iter()->reset_to_bci(start); + while (iter()->next_bci() < limit) { + NOT_PRODUCT(a = b = c = d = NULL); + iter()->next(); if (SharkTraceBytecodes) tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); - if(UseLoopSafepoints) { - int len; - + if (UseLoopSafepoints) { // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts // the safepoint before the lcmp rather than before the if. // Maybe we should do this too. See parse2.cpp for details. - switch (bc()) { case Bytecodes::_goto: case Bytecodes::_ifnull: @@ -164,15 +78,15 @@ void SharkBlock::parse() add_safepoint(); break; } - len = switch_table_length(); - for (i = 0; i < len; i++) { + int len = switch_table_length(); + for (int i = 0; i < len; i++) { if (switch_dest(i) <= bci()) { add_safepoint(); break; } } break; - } + } } switch (bc()) { @@ -809,19 +723,16 @@ void SharkBlock::parse() case Bytecodes::_goto: case Bytecodes::_goto_w: - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_goto(); break; case Bytecodes::_jsr: case Bytecodes::_jsr_w: - push(SharkValue::create_returnAddress(iter()->next_bci())); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_jsr(); break; case Bytecodes::_ret: - assert(local(iter()->get_index())->returnAddress_value() == - successor(ciTypeFlow::GOTO_TARGET)->start(), "should be"); - builder()->CreateBr(successor(ciTypeFlow::GOTO_TARGET)->entry_block()); + do_ret(); break; case Bytecodes::_ifnull: @@ -831,11 +742,13 @@ void SharkBlock::parse() do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop()); break; case Bytecodes::_if_acmpeq: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_EQ, b, a); break; case Bytecodes::_if_acmpne: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_NE, b, a); break; case Bytecodes::_ifeq: @@ -857,34 +770,39 @@ void SharkBlock::parse() do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop()); break; case Bytecodes::_if_icmpeq: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_EQ, b, a); break; case Bytecodes::_if_icmpne: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_NE, b, a); break; case Bytecodes::_if_icmplt: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SLT, b, a); break; case Bytecodes::_if_icmple: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SLE, b, a); break; case Bytecodes::_if_icmpgt: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SGT, b, a); break; case Bytecodes::_if_icmpge: - b = pop(); a = pop(); + b = pop(); + a = pop(); do_if(ICmpInst::ICMP_SGE, b, a); break; case Bytecodes::_tableswitch: case Bytecodes::_lookupswitch: do_switch(); - successors_done = true; break; case Bytecodes::_invokestatic: @@ -923,533 +841,58 @@ void SharkBlock::parse() ShouldNotReachHere(); } } - - if (falls_through()) { - builder()->CreateBr(successor(ciTypeFlow::FALL_THROUGH)->entry_block()); - } - - if (!successors_done) { - for (int i = 0; i < num_successors(); i++) - successor(i)->add_incoming(current_state()); - } -} - -SharkBlock* SharkBlock::bci_successor(int bci) const -{ - // XXX now with Linear Search Technology (tm) - for (int i = 0; i < num_successors(); i++) { - ciTypeFlow::Block *successor = ciblock()->successors()->at(i); - if (successor->start() == bci) - return function()->block(successor->pre_order()); - } - ShouldNotReachHere(); -} - -void SharkBlock::check_zero(SharkValue *value) -{ - if (value->zero_checked()) - return; - - BasicBlock *zero = function()->CreateBlock("zero"); - BasicBlock *not_zero = function()->CreateBlock("not_zero"); - - Value *a, *b; - switch (value->basic_type()) { - case T_BYTE: - case T_CHAR: - case T_SHORT: - case T_INT: - a = value->jint_value(); - b = LLVMValue::jint_constant(0); - break; - case T_LONG: - a = value->jlong_value(); - b = LLVMValue::jlong_constant(0); - break; - case T_OBJECT: - case T_ARRAY: - a = value->jobject_value(); - b = LLVMValue::LLVMValue::null(); - break; +} + +SharkState* SharkBlock::initial_current_state() +{ + return new SharkState(entry_state()); +} + +int SharkBlock::switch_default_dest() +{ + return iter()->get_dest_table(0); From gbenson at redhat.com Thu Mar 19 03:48:24 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:24 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Gary Benson changeset e6271aa33a0c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=e6271aa33a0c description: 2009-03-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInliner::may_be_inlinable): Bail out early on constructors. (transplanted from a737ec21e449424b3ffc8fe24896afcda34f36f3) diffstat: 2 files changed, 13 insertions(+) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 8 ++++++++ diffs (31 lines): diff -r a28f5ad21234 -r e6271aa33a0c ChangeLog --- a/ChangeLog Wed Mar 04 10:41:13 2009 -0500 +++ b/ChangeLog Thu Mar 05 09:41:58 2009 +0000 @@ -1,3 +1,8 @@ 2009-03-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInliner::may_be_inlinable): Bail out early on constructors. + 2009-03-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInliner.hpp: New file. diff -r a28f5ad21234 -r e6271aa33a0c ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Mar 04 10:41:13 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Mar 05 09:41:58 2009 +0000 @@ -226,7 +226,15 @@ bool SharkInliner::may_be_inlinable(ciMe if (target->has_exception_handlers() || target->has_jsrs()) return false; + // Don't try to inline constructors, as they must + // eventually call Object. which we can't inline. + // Note that this catches too, but why would + // we be compiling that? + if (target->is_initializer()) + return false; + // Mustn't inline Object. + // Should be caught by the above, but just in case... if (target->intrinsic_id() == vmIntrinsics::_Object_init) return false; From gbenson at redhat.com Thu Mar 19 03:48:21 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 19 Mar 2009 10:48:21 +0000 Subject: changeset in /hg/icedtea: 2009-03-03 Gary Benson changeset 24cb346d989c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=24cb346d989c description: 2009-03-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: Removed. * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Removed references to the above. * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp (SharkRuntime::_trace_bytecode): Removed. (SharkRuntime::initialize): Remove initialization for the above. (SharkRuntime::trace_bytecode_C): Removed. * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp (SharkRuntime::_trace_bytecode): Likewise. (SharkRuntime::trace_bytecode): Likewise. (SharkRuntime::trace_bytecode_C): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse): Remove bytecode tracer code. diffstat: 7 files changed, 19 insertions(+), 214 deletions(-) ChangeLog | 19 ++ ports/hotspot/src/share/vm/includeDB_shark | 9 - ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 9 - ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp | 114 -------------- ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp | 49 ------ ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 24 -- ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 9 - diffs (323 lines): diff -r f03bf9944657 -r 24cb346d989c ChangeLog --- a/ChangeLog Mon Mar 02 22:19:24 2009 +0100 +++ b/ChangeLog Tue Mar 03 09:18:36 2009 +0000 @@ -1,3 +1,22 @@ 2009-03-02 Mark Wielaard + + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: + Removed. + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp: + Likewise. + * ports/hotspot/src/share/vm/includeDB_shark: + Removed references to the above. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_trace_bytecode): Removed. + (SharkRuntime::initialize): Remove initialization for the above. + (SharkRuntime::trace_bytecode_C): Removed. + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_trace_bytecode): Likewise. + (SharkRuntime::trace_bytecode): Likewise. + (SharkRuntime::trace_bytecode_C): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse): Remove bytecode tracer code. + 2009-03-02 Mark Wielaard * hotspot.map (default): Set to rev fc6a5ae3fef5 (14.0-b10). diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Tue Mar 03 09:18:36 2009 +0000 @@ -74,7 +74,6 @@ sharkBlock.cpp sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp -sharkBlock.cpp sharkBytecodeTracer.hpp sharkBlock.cpp sharkConstantPool.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp @@ -113,14 +112,6 @@ sharkBuilder.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.inline.hpp sharkBuilder.hpp sharkEntry.hpp - -sharkBytecodeTracer.cpp sharkBytecodeTracer.hpp -sharkBytecodeTracer.cpp sharkState.inline.hpp -sharkBytecodeTracer.cpp sharkValue.hpp - -sharkBytecodeTracer.hpp allocation.hpp -sharkBytecodeTracer.hpp llvmHeaders.hpp -sharkBytecodeTracer.hpp sharkState.hpp sharkCacheDecache.cpp ciMethod.hpp sharkCacheDecache.cpp debugInfoRec.hpp diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Mar 03 09:18:36 2009 +0000 @@ -121,15 +121,6 @@ void SharkBlock::parse() while (iter()->next() != ciBytecodeStream::EOBC() && bci() < limit()) { NOT_PRODUCT(a = b = c = d = NULL); - if (TraceBytecodes) { - Value *tos, *tos2; - SharkBytecodeTracer::decode(builder(), current_state(), &tos, &tos2); - call_vm( - SharkRuntime::trace_bytecode(), - LLVMValue::jint_constant(bci()), - tos, tos2); - } - if (SharkTraceBytecodes) tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp Mon Mar 02 22:19:24 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008, 2009 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_sharkBytecodeTracer.cpp.incl" - -using namespace llvm; - -void SharkBytecodeTracer::decode(SharkBuilder* builder, - const SharkState* state, - Value** tos, - Value** tos2) -{ - if (state->stack_depth() == 0) { - // nothing on the stack - *tos = *tos2 = LLVMValue::intptr_constant(EMPTY_SLOT); - } - else if (state->stack_depth() == 1) { - // one item on the stack - decode_one_word(builder, state, 0, tos); - *tos2 = LLVMValue::intptr_constant(EMPTY_SLOT); - } - else if (state->stack(0) == NULL) { - // two words of a two-word type - decode_two_word(builder, state, 0, tos, tos2); - } - else if (state->stack(1) == NULL) { - // a one-word type followed by half of a two-word type - decode_one_word(builder, state, 0, tos); - decode_two_word(builder, state, 1, tos2, NULL); - } - else { - // two one-word types - decode_one_word(builder, state, 0, tos); - decode_one_word(builder, state, 1, tos2); - } -} - -void SharkBytecodeTracer::decode_one_word(SharkBuilder* builder, - const SharkState* state, - int index, - Value** dst) -{ - SharkValue *value = state->stack(index); - assert(value && value->is_one_word(), "should be"); - switch (value->basic_type()) { - case T_BOOLEAN: - case T_BYTE: - case T_CHAR: - case T_SHORT: - case T_INT: -#ifdef _LP64 - *dst = builder->CreateIntCast( - value->jint_value(), SharkType::intptr_type(), false); -#else - *dst = value->jint_value(); -#endif // _LP64 - break; - - case T_FLOAT: - *dst = LLVMValue::intptr_constant(UNDECODABLE_SLOT); - break; - - case T_OBJECT: - case T_ARRAY: - *dst = value->intptr_value(builder); - break; - - case T_ADDRESS: - *dst = builder->pointer_constant((const void*)value->returnAddress_value()); - break; - - default: - tty->print_cr("Unhandled type %s", type2name(value->basic_type())); - ShouldNotReachHere(); - } -} - -void SharkBytecodeTracer::decode_two_word(SharkBuilder* builder, - const SharkState* state, - int index, - Value** dst, - Value** dst2) -{ - assert(state->stack(index) == NULL, "should be"); - SharkValue *value = state->stack(index + 1); - assert(value && value->is_two_word(), "should be"); - - *dst = LLVMValue::intptr_constant(UNDECODABLE_SLOT); - if (dst2) - *dst2 = LLVMValue::intptr_constant(UNDECODABLE_SLOT); -} diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp Mon Mar 02 22:19:24 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright 1999-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 SharkBytecodeTracer : public AllStatic { - public: - static void decode(SharkBuilder* builder, - const SharkState* state, - llvm::Value** tos, - llvm::Value** tos2); - public: - static const intptr_t EMPTY_SLOT = - NOT_LP64(0x23232323) LP64_ONLY(0x2323232323232323); - - static const intptr_t UNDECODABLE_SLOT = - NOT_LP64(0xdeadbabe) LP64_ONLY(0xdeadbabedeadbabe); - - private: - static void decode_one_word(SharkBuilder* builder, - const SharkState* state, - int index, - llvm::Value** dst); - static void decode_two_word(SharkBuilder* builder, - const SharkState* state, - int index, - llvm::Value** dst, - llvm::Value** dst2); -}; diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Tue Mar 03 09:18:36 2009 +0000 @@ -42,7 +42,6 @@ Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_throw_ArrayIndexOutOfBoundsException; Constant* SharkRuntime::_throw_NullPointerException; -Constant* SharkRuntime::_trace_bytecode; Constant* SharkRuntime::_f2i; Constant* SharkRuntime::_f2l; @@ -161,16 +160,6 @@ void SharkRuntime::initialize(SharkBuild (intptr_t) throw_NullPointerException_C, FunctionType::get(Type::VoidTy, params, false), "SharkRuntime__throw_NullPointerException"); - - params.clear(); - params.push_back(SharkType::thread_type()); - params.push_back(SharkType::jint_type()); - params.push_back(SharkType::intptr_type()); - params.push_back(SharkType::intptr_type()); - _trace_bytecode = builder->make_function( - (intptr_t) trace_bytecode_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__trace_bytecode"); // Leaf calls params.clear(); @@ -525,19 +514,6 @@ JRT_ENTRY(void, SharkRuntime::throw_Null } JRT_END -JRT_ENTRY(void, SharkRuntime::trace_bytecode_C(JavaThread* thread, - int bci, - intptr_t tos, - intptr_t tos2)) -{ -#ifndef PRODUCT - methodHandle mh(thread, method(thread)); - //BytecodeCounter::_counter_value++; - BytecodeTracer::trace(mh, mh->code_base() + bci, tos, tos2); -#endif // !PRODUCT -} -JRT_END - // Non-VM calls // Nothing in these must ever GC! diff -r f03bf9944657 -r 24cb346d989c ports/hotspot/src/share/vm/shark/sharkRuntime.hpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Mon Mar 02 22:19:24 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Tue Mar 03 09:18:36 2009 +0000 @@ -43,7 +43,6 @@ class SharkRuntime : public AllStatic { static llvm::Constant* _safepoint; static llvm::Constant* _throw_ArrayIndexOutOfBoundsException; static llvm::Constant* _throw_NullPointerException; - static llvm::Constant* _trace_bytecode; public: static llvm::Constant* find_exception_handler() @@ -102,10 +101,6 @@ class SharkRuntime : public AllStatic { { return _throw_NullPointerException; } - static llvm::Constant* trace_bytecode() - { - return _trace_bytecode; - } private: static int find_exception_handler_C(JavaThread* thread, @@ -141,10 +136,6 @@ class SharkRuntime : public AllStatic { static void throw_NullPointerException_C(JavaThread* thread, const char* file, int line); - static void trace_bytecode_C(JavaThread* thread, - int bci, - intptr_t tos, - intptr_t tos2); // Helpers for VM calls private: From ahughes at redhat.com Thu Mar 19 03:48:27 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 19 Mar 2009 10:48:27 +0000 Subject: changeset in /hg/icedtea: Update to b50 (02). Now builds using ... Message-ID: changeset e6d83e63e8e3 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=e6d83e63e8e3 description: Update to b50 (02). Now builds using --with-icedtea. 2009-03-17 Andrew John Hughes * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/NamedAttributeView.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileLockImpl.java, * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractNamedAttributeView.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxNamedAttributeView.java, * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisNamedAttributeView.java, * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsNamedAttributeView.java, * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/NamedAttributeView/Basic.java: Removed; in b50 (renamed as in b99). * patches/security/icedtea-6721753.patch: Removed; in b50. * Makefile.am: Remove security patch. * overlays/nio2/openjdk/jdk/src/share/classes/java/io/Inputs.java, * overlays/nio2/openjdk/jdk/src/share/classes/java/io/Outputs.java, * overlays/nio2/openjdk/jdk/src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipFileSystem.java: Updated to nio2 b99. * patches/icedtea-nio2.patch: Recreated against b50. * patches/icedtea-pr261.patch: Likewise. diffstat: 15 files changed, 95 insertions(+), 4146 deletions(-) ChangeLog | 19 Makefile.am | 1 overlays/nio2/openjdk/jdk/src/share/classes/java/io/Inputs.java | 25 overlays/nio2/openjdk/jdk/src/share/classes/java/io/Outputs.java | 24 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/NamedAttributeView.java | 231 - overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileLockImpl.java | 68 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractNamedAttributeView.java | 125 overlays/nio2/openjdk/jdk/src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipFileSystem.java | 79 overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxNamedAttributeView.java | 344 - overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisNamedAttributeView.java | 293 - overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsNamedAttributeView.java | 342 - overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/NamedAttributeView/Basic.java | 273 - patches/icedtea-nio2.patch | 2292 ---------- patches/icedtea-pr261.patch | 36 patches/security/icedtea-6721753.patch | 89 diffs (truncated from 4499 to 500 lines): diff -r a0f00c50a187 -r e6d83e63e8e3 ChangeLog --- a/ChangeLog Fri Mar 06 13:04:03 2009 +0000 +++ b/ChangeLog Tue Mar 17 00:44:07 2009 +0000 @@ -1,3 +1,22 @@ 2009-03-06 Andrew John Hughes + + * overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/NamedAttributeView.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileLockImpl.java, + * overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractNamedAttributeView.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxNamedAttributeView.java, + * overlays/nio2/openjdk/jdk/src/solaris/classes/sun/nio/fs/SolarisNamedAttributeView.java, + * overlays/nio2/openjdk/jdk/src/windows/classes/sun/nio/fs/WindowsNamedAttributeView.java, + * overlays/nio2/openjdk/jdk/test/java/nio/file/attribute/NamedAttributeView/Basic.java: + Removed; in b50 (renamed as in b99). + * patches/security/icedtea-6721753.patch: Removed; in b50. + * Makefile.am: Remove security patch. + * overlays/nio2/openjdk/jdk/src/share/classes/java/io/Inputs.java, + * overlays/nio2/openjdk/jdk/src/share/classes/java/io/Outputs.java, + * overlays/nio2/openjdk/jdk/src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipFileSystem.java: + Updated to nio2 b99. + * patches/icedtea-nio2.patch: Recreated against b50. + * patches/icedtea-pr261.patch: Likewise. + 2009-03-06 Andrew John Hughes * overlays/nio2/openjdk/jdk/make/mksample/nio/file/Makefile, diff -r a0f00c50a187 -r e6d83e63e8e3 Makefile.am --- a/Makefile.am Fri Mar 06 13:04:03 2009 +0000 +++ b/Makefile.am Tue Mar 17 00:44:07 2009 +0000 @@ -1840,7 +1840,6 @@ ICEDTEA_PATCHES = \ patches/security/icedtea-6497740.patch \ patches/security/icedtea-6588160.patch \ patches/security/icedtea-6592792.patch \ - patches/security/icedtea-6721753.patch \ patches/security/icedtea-6726779.patch \ patches/security/icedtea-6733959.patch \ patches/security/icedtea-6734167.patch \ diff -r a0f00c50a187 -r e6d83e63e8e3 overlays/nio2/openjdk/jdk/src/share/classes/java/io/Inputs.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/java/io/Inputs.java Fri Mar 06 13:04:03 2009 +0000 +++ b/overlays/nio2/openjdk/jdk/src/share/classes/java/io/Inputs.java Tue Mar 17 00:44:07 2009 +0000 @@ -25,26 +25,16 @@ package java.io; -import java.io.Closeable; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; - import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; +import java.nio.file.FileRef; +import java.nio.file.attribute.Attributes; import java.nio.channels.Channels; - +import java.util.Scanner; import java.util.Collections; import java.util.Arrays; import java.util.ArrayList; import java.util.List; - - -import java.nio.file.FileRef; - -import java.nio.file.attribute.Attributes; - -import java.util.Scanner; /** * {@note experimental} @@ -155,8 +145,13 @@ public final class Inputs { * Suppose we want to open a connection to a resource identified by a URI, * and read all bytes: *
-     *   URI uri = ...
-     *   byte[] content = InputOutput.readAllBytes(uri.toURL().openStream());
+     *   byte[] content;
+     *   InputStream in = uri.toURL().openStream();
+     *   try {
+     *       content = Inputs.readAllBytes(in);
+     *   } finally {
+     *       Inputs.closeUnchecked(in);
+     *   }
      * 
* *

On return, the input stream will be at end of stream. diff -r a0f00c50a187 -r e6d83e63e8e3 overlays/nio2/openjdk/jdk/src/share/classes/java/io/Outputs.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/java/io/Outputs.java Fri Mar 06 13:04:03 2009 +0000 +++ b/overlays/nio2/openjdk/jdk/src/share/classes/java/io/Outputs.java Tue Mar 17 00:44:07 2009 +0000 @@ -25,25 +25,15 @@ package java.io; -import java.io.BufferedWriter; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; - import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; +import java.nio.file.FileRef; +import static java.nio.file.StandardOpenOption.*; import java.nio.channels.Channels; import java.nio.channels.WritableByteChannel; import java.util.Arrays; import java.util.List; - -import java.nio.file.FileRef; - -import static java.nio.file.StandardOpenOption.CREATE; -import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; -import static java.nio.file.StandardOpenOption.WRITE; /** * {@note experimental} @@ -92,11 +82,14 @@ public final class Outputs { public static void write(FileRef file, byte[] bytes, int off, int len) throws IOException { + int end = off + len; + if ((off | len | end | (bytes.length - end)) < 0) + throw new IndexOutOfBoundsException(); WritableByteChannel wbc = file.newByteChannel(WRITE, CREATE, TRUNCATE_EXISTING); try { int pos = off; - while (pos < len) { - int size = Math.min(len-pos, 8192); + while (pos < end) { + int size = Math.min(end-pos, 8192); ByteBuffer bb = ByteBuffer.wrap(bytes, pos, size); int n = wbc.write(bb); pos += n; @@ -215,6 +208,9 @@ public final class Outputs { public static void write(File file, byte[] bytes, int off, int len) throws IOException { + int end = off + len; + if ((off | len | end | (bytes.length - end)) < 0) + throw new IndexOutOfBoundsException(); FileOutputStream out = new FileOutputStream(file); try { out.write(bytes, off, len); diff -r a0f00c50a187 -r e6d83e63e8e3 overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/NamedAttributeView.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/java/nio/file/attribute/NamedAttributeView.java Fri Mar 06 13:04:03 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ -/* - * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. - * - * 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. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * 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. - */ - -package java.nio.file.attribute; - -import java.nio.ByteBuffer; -import java.util.List; -import java.io.IOException; - -/** - * A file attribute view that provides a view of a file's user-defined - * attributes, sometimes known as extended attributes. Named attributes - * are used to store metadata with a file that is not meaningful to the file - * system. It is primarily intended for file system implementations that support - * such a capability directly but may be emulated. The details of such emulation - * are highly implementation specific and therefore not specified. - * - *

This {@code FileAttributeView} provides a view of a file's named - * attributes as a set of name/value pairs, where the attribute name is - * represented by a {@code String}. An implementation may require to encode and - * decode from the platform or file system representation when accessing the - * attribute. The value has opaque content. This attribute view defines the - * {@link #read read} and {@link #write write} methods to read the value into - * or write from a {@link ByteBuffer}. This {@code FileAttributeView} is not - * intended for use where the size of an attribute value is larger than {@link - * Integer#MAX_VALUE}. - * - *

Named attributes may be used in some implementations to store security - * related attributes so consequently, in the case of the default provider at - * least, all methods that access named attributes require the - * {@code RuntimePermission("accessNamedAttributes")} permission when a - * security manager is installed. - * - *

The {@link java.nio.file.FileStore#supportsFileAttributeView - * supportsFileAttributeView} method may be used to test if a specific {@link - * java.nio.file.FileStore FileStore} supports the storage of named attributes. - * - *

Where dynamic access to file attributes is required, the {@link - * #getAttribute getAttribute} or {@link #readAttributes(String,String[]) - * readAttributes(String,String[])} methods may be used to read the attribute - * value. The attribute value is returned as a byte array (byte[]). The {@link - * #setAttribute setAttribute} method may be used to write the value of a - * user-defined/named attribute from a buffer (as if by invoking the {@link - * #write write} method), or byte array (byte[]). - * - * @since 1.7 - */ - -public interface NamedAttributeView - extends FileAttributeView -{ - /** - * Returns the name of this attribute view. Attribute views of this type - * have the name {@code "xattr"}. - */ - - String name(); - - /** - * Returns a list containing the names of the user-defined/named - * attributes. - * - * @return An unmodifiable list continaing the names of the file's - * user-defined/named attributes - * - * @throws IOException - * If an I/O error occurs - * @throws SecurityException - * In the case of the default provider, a security manager is - * inst