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 - * installed, and it denies {@link - * RuntimePermission}("accessNamedAttributes") - * or its {@link SecurityManager#checkRead(String) checkRead} method - * denies read access to the file. - */ - List list() throws IOException; - - /** - * Returns the size of the value of a user-defined/named attribute. - * - * @param name - * The attribute name - * - * @return The size of the attribute value, in bytes. - * - * @throws ArithmeticException - * If the size of the attribute is larger than {@link Integer#MAX_VALUE} - * @throws IOException - * If an I/O error occurs - * @throws SecurityException - * In the case of the default provider, a security manager is - * installed, and it denies {@link - * RuntimePermission}("accessNamedAttributes") - * or its {@link SecurityManager#checkRead(String) checkRead} method - * denies read access to the file. - */ - int size(String name) throws IOException; - - /** - * Read the value of a user-defined/named attribute into a buffer. - * - *

This method reads the value of the attribute into the given buffer - * as a sequence of bytes, failing if the number of bytes remaining in - * the buffer is insufficient to read the complete attribute value. The - * number of bytes transferred into the buffer is {@code n}, where {@code n} - * is the size of the attribute value. The first byte in the sequence is at - * index {@code p} and the last byte is at index {@code p + n - 1}, where - * {@code p} is the buffer's position. Upon return the buffer's position - * will be equal to {@code p + n}; its limit will not have changed. - * - *

Usage Example: - * Suppose we want to read a file's MIME type that is stored as a named - * attribute: - *

-     *    NamedAttributeView view = file.getFileAttributeView(NamedAttributeView.class);
-     *    String name = "user.mimetype";
-     *    ByteBuffer buf = ByteBuffer.allocate(view.size(name));
-     *    view.read(name, buf);
-     *    buf.flip();
-     *    String value = Charset.defaultCharset().decode(buf).toString();
-     * 
- * - * @param name - * The attribute name - * @param dst - * The destination buffer - * - * @return The number of bytes read, possibly zero - * - * @throws IllegalArgumentException - * If the destination buffer is read-only - * @throws IOException - * If an I/O error occurs or there is insufficient space in the - * destination buffer for the attribute value - * @throws SecurityException - * In the case of the default provider, a security manager is - * installed, and it denies {@link - * RuntimePermission}("accessNamedAttributes") - * or its {@link SecurityManager#checkRead(String) checkRead} method - * denies read access to the file. - * - * @see #size - */ - int read(String name, ByteBuffer dst) throws IOException; - - /** - * Writes the value of a user-defined/named attribute from a buffer. - * - *

This method writes the value of the attribute from a given buffer as - * a sequence of bytes. The size of the value to transfer is {@code r}, - * where {@code r} is the number of bytes remaining in the buffer, that is - * {@code src.remaining()}. The sequence of bytes is transferred from the - * buffer starting at index {@code p}, where {@code p} is the buffer's - * position. Upon return, the buffer's position will be equal to {@code - * p + n}, where {@code n} is the number of bytes transferred; its limit - * will not have changed. - * - *

If an attribute of the given name already exists then its value is - * replaced. If the attribute does not exist then it is created. If it - * implementation specific if a test to check for the existence of the - * attribute and the creation of attribute are atomic with repect to other - * file system activities. - * - *

Where there is insufficient space to store the attribute, or the - * attribute name or value exceed an implementation specific maximum size - * then an {@code IOException} is thrown. - * - *

Usage Example: - * Suppose we want to write a file's MIME type as a named attribute: - *

-     *    NamedAttributeView view = file.getFileAttributeView(NamedAttributeView.class);
-     *    view.write("user.mimetype", Charset.defaultCharset().encode("text/html"));
-     * 
- * - * @param name - * The attribute name - * @param src - * The buffer containing the attribute value - * - * @return The number of bytes written, possibly zero - * - * @throws IOException - * If an I/O error occurs - * @throws SecurityException - * In the case of the default provider, a security manager is - * installed, and it denies {@link - * RuntimePermission}("accessNamedAttributes") - * or its {@link SecurityManager#checkWrite(String) checkWrite} - * method denies write access to the file. - */ - int write(String name, ByteBuffer src) throws IOException; - - /** - * Deletes a user-defined/named attribute. - * - * @param name - * The attribute name - * - * @throws IOException - * If an I/O error occurs or the attribute does not exist - * @throws SecurityException - * In the case of the default provider, a security manager is - * installed, and it denies {@link - * RuntimePermission}("accessNamedAttributes") - * or its {@link SecurityManager#checkWrite(String) checkWrite} - * method denies write access to the file. - */ - void delete(String name) throws IOException; -} diff -r a0f00c50a187 -r e6d83e63e8e3 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileLockImpl.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/ch/AsynchronousFileLockImpl.java Fri Mar 06 13:04:03 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright 2001-2003 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 sun.nio.ch; - -import java.io.IOException; -import java.nio.channels.Channel; -import java.nio.channels.ClosedChannelException; -import java.nio.channels.FileChannel; - -import java.nio.channels.AsynchronousFileChannel; -import java.nio.channels.FileLock; - -public class AsynchronousFileLockImpl - extends FileLock -{ - boolean valid; - - AsynchronousFileLockImpl(AsynchronousFileChannel channel, long position, long size, boolean shared) - { - super(channel, position, size, shared); - this.valid = true; - } - - public synchronized boolean isValid() { - return valid; - } - - synchronized void invalidate() { - valid = false; - } - - public synchronized void release() throws IOException { - Channel ch = acquiredBy(); - if (!ch.isOpen()) - throw new ClosedChannelException(); - if (valid) { - if (ch instanceof AsynchronousFileChannelImpl) - ((AsynchronousFileChannelImpl)ch).release(this); - else throw new AssertionError("Attempted to release unsupported channel " + ch); - valid = false; - } - } - -} diff -r a0f00c50a187 -r e6d83e63e8e3 overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractNamedAttributeView.java --- a/overlays/nio2/openjdk/jdk/src/share/classes/sun/nio/fs/AbstractNamedAttributeView.java Fri Mar 06 13:04:03 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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 sun.nio.fs; - -import java.nio.ByteBuffer; -import java.io.IOException; -import java.util.*; - -import java.nio.file.attribute.NamedAttributeView; - -/** - * Base implementation of NamedAttributeView - */ - -abstract class AbstractNamedAttributeView - implements NamedAttributeView -{ - protected AbstractNamedAttributeView() { } - - protected void checkAccess(String file, - boolean checkRead, - boolean checkWrite) 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 a28f5ad21234 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a28f5ad21234 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: 4 files changed, 100 insertions(+) ports/hotspot/src/share/vm/includeDB_shark | 19 ++++++ ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 59 ++++++++++++++++++++ ports/hotspot/src/share/vm/shark/sharkState.cpp | 18 ++++++ ports/hotspot/src/share/vm/shark/shark_globals.hpp | 4 + diffs (140 lines): diff -r c8fd76f04b59 -r a28f5ad21234 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 04 10:41:13 2009 -0500 +++ 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 sharkBlock.cpp debug.hpp sharkBlock.cpp bytecodes.hpp diff -r c8fd76f04b59 -r a28f5ad21234 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Mar 04 10:41:13 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Mar 04 10:41:13 2009 -0500 @@ -89,6 +89,65 @@ class SharkEntryState : public SharkStat } }; +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() { // Emit the entry point diff -r c8fd76f04b59 -r a28f5ad21234 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Wed Mar 04 10:41:13 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Wed Mar 04 10:41:13 2009 -0500 @@ -27,6 +27,24 @@ #include "incls/_sharkState.cpp.incl" using namespace llvm; + +SharkState::SharkState(SharkBlock* block, + SharkFunction* function, + llvm::Value* method) + : _block(block), + _function(function), + _method(method) +{ + initialize(NULL); +} + +SharkState::SharkState(const SharkState* state) + : _block(state->block()), + _function(state->function()), + _method(state->method()) +{ + initialize(state); +} SharkState::SharkState(SharkBlock* block, SharkFunction* function, diff -r c8fd76f04b59 -r a28f5ad21234 ports/hotspot/src/share/vm/shark/shark_globals.hpp --- a/ports/hotspot/src/share/vm/shark/shark_globals.hpp Wed Mar 04 10:41:13 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/shark_globals.hpp Wed Mar 04 10:41:13 2009 -0500 @@ -36,6 +36,10 @@ product(intx, SharkMaxInlineSize, 32, \ "Maximum bytecode size of methods to inline when using Shark") \ \ + /* inlining */ \ + product(intx, SharkMaxInlineSize, 32, \ + "Maximum bytecode size of methods to inline when using Shark") \ + \ /* compiler debugging */ \ develop(uintx, SharkStartAt, 0, \ "First method to consider when using Shark") \ 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 ffde78306a6a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ffde78306a6a description: 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::maybe_inline_accessor): Remove a hack diffstat: 2 files changed, 11 insertions(+), 6 deletions(-) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 12 ++++++------ diffs (34 lines): diff -r 9f1c16638724 -r ffde78306a6a ChangeLog --- a/ChangeLog Fri Feb 27 14:52:57 2009 +0000 +++ b/ChangeLog Fri Feb 27 14:55:51 2009 +0000 @@ -1,3 +1,8 @@ 2009-02-27 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_inline_accessor): Remove a hack + 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.cpp diff -r 9f1c16638724 -r ffde78306a6a ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 14:52:57 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 14:55:51 2009 +0000 @@ -2197,12 +2197,12 @@ bool SharkBlock::maybe_inline_accessor(c // entering the inlined section. For the majority of accessors // this has already been done (in do_call) but if the accessor // was invoked by invokestatic (eg synthetic accessors) then it - // won't have been checked and do_field_access will try to do - // it and fail. So we check here, which is moderately wrong in - // that the NullPointerException will have been thrown by the - // caller rather than the callee. - if (is_field) - check_null(xstack(0)); + // may not have been checked and do_field_access will try to do + // it and fail. + if (is_field) { + if (!xstack(0)->zero_checked()) + return false; + } current_state()->enter_inlined_section(); do_field_access(is_get, is_field, field); 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 fd98e848b25c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=fd98e848b25c description: 2009-02-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::maybe_inline_call): Inline empty methods. diffstat: 2 files changed, 14 insertions(+) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 9 +++++++++ diffs (31 lines): diff -r 29fdac532dd0 -r fd98e848b25c ChangeLog --- a/ChangeLog Thu Feb 26 15:40:28 2009 -0500 +++ b/ChangeLog Fri Feb 27 04:08:04 2009 -0500 @@ -1,3 +1,8 @@ 2009-02-26 Deepak Bhole + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_inline_call): Inline empty methods. + 2009-02-26 Deepak Bhole * IcedTeaPlugin.cc: Decode url via nsINetUtil::UnescapeString() diff -r 29fdac532dd0 -r fd98e848b25c ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Feb 26 15:40:28 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 04:08:04 2009 -0500 @@ -2082,6 +2082,15 @@ bool SharkBlock::maybe_inline_call(ciMet method->has_monitor_bytecodes()) return false; + // Inlining empty methods is trivial + if (method->is_empty_method()) { + int desired_stack_depth = xstack_depth() - method->arg_size(); + while (xstack_depth() > desired_stack_depth) + pop(); + + return true; + } + // We need to scan the bytecode to do any more, so we bail out // now if the method is too big if (method->code_size() > 5) From gnu_andrew at member.fsf.org Fri Mar 20 04:20:22 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 20 Mar 2009 11:20:22 +0000 Subject: IcedTea7 1.9 Released! Message-ID: <17c6771e0903200420y4f21c45dkcd25f9d1ccd0fcc9@mail.gmail.com> We are pleased to announce the release of IcedTea7 1.9! IcedTea7 provides a means to build OpenJDK7 build drops using Free software tools, in addition to a number of additional features including additional platform support via the Zero/Shark and CACAO virtual machines, and the only Free 64-bit Java web plugin. New in release 1.9 (2009-03-20) - Security fixes for: CVE-2008-5360 - Temporary files have guessable file names. CVE-2008-5350 - Allows to list files within the user home directory. CVE-2008-5348 - Denial-Of-Service in kerberos authentication. CVE-2008-5359 - Buffer overflow in image processing. CVE-2008-5351 - UTF-8 decoder accepts non-shortest form sequences. CVE-2008-5356 - Font processing vulnerability. CVE-2008-5353 - Calendar object deserialization allows privilege escalation. CVE-2008-5354 - Privilege escalation in command line applications. CVE-2008-5357 - Truetype Font processing vulnerability. CVE-2008-5352 - Jar200 Decompression buffer overflow. CVE-2008-5358 - Buffer Overflow in GIF image processing. - Updated to OpenJDK7 b50 build. - XRender pipeline support: Java2D are noticably faster and running over a remote X connection feels like it is all local. Build by default (disable with --disable-xrender). Runtime enabled by running java -Dsun.java2d.xrender=True (default is to use the old X renderer for now). - IcedTeaPlugin now supports HTTPS sites and adds a user prompt for untrusted https certificates. - Use the ALSA 'default' device. Makes Java play nicer with PulseAudio. - VisualVM integration updated to 1.1.1 - Gervill soft synthesizer integration updated to latest CVS version. - Integrated jtreg upgraded to 4_0-src-b02-15_oct_2008. - make check runs much faster now. jtreg -samevm support has been integrated into the langtools and jdk subsystems. Please package the test/jtreg-summary.log file with your distribution package so end users can compare the test results. - Shark (--enable-shark) now builds on 64 bit platforms, but is a pre-alpha technology preview and not recommended for use. - Better support for bootstrapping with different jar programs (supporting -J options). - If --with-pkgversion isn't given the short mercurial rev node version will be used. Package distributors are encouraged to build packages with --with-pkgversion to uniquely identify their distribution version number when java -version is run to help distribution specific bug reporting. - Various freetype font, pisces renderer and awt X window size fixes to fix visual anomalies. - Build fixes for gcc 4.3 and 4.4-pre-release. - Added support for building against a specific openjdk src dir or hg revision (--with-openjdk-src-dir or --with-hg-revision). - Many other Plugin, Zero, Shark and PulseAudio bug fixes. - Build clean up. The tarball can be downloaded here: http://icedtea.classpath.org/download/source/icedtea-1.9.tar.gz The following people helped with this release: Gary Benson, Deepak Bhole, Andrew Haley, Andrew John Hughes, Tomas Hurka, Ioana Ivan, Matthias Klose, Omair Majid, Mark Reinhold, Christian Thalinger, Mark Wielaard, Lillian Angel We would also like to thank the bug reporters and testers! To get started: $ hg clone http://icedtea.classpath.org/hg/icedtea $ cd icedtea Full build requirements and instructions are in INSTALL: $ ./configure $ make -- 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 langel at redhat.com Fri Mar 20 08:26:20 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 20 Mar 2009 11:26:20 -0400 Subject: [FYI]: lcms security patch committed. Message-ID: <49C3B59C.9010001@redhat.com> Hi, I just committed a security patch for the lcms library. This was unembargoed as of yesterday, and should be in the next release of OpenJDK6/7. 2009-03-21 Lillian Angel * patches/icedtea-lcms.patch: New patch. * Makefile.am (ICEDTEA_PATCHES): Added new patch to the list. Cheers, Lillian From gnu_andrew at member.fsf.org Fri Mar 20 04:28:23 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 20 Mar 2009 11:28:23 +0000 Subject: How to host HS14 stable? (Was: RFC: Change name of default HotSpot to 'default') In-Reply-To: <499B727D.6060901@sun.com> References: <20090212150029.GA1121@rivendell.middle-earth.co.uk> <1234731237.3562.6.camel@hermans.wildebeest.org> <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> <499B727D.6060901@sun.com> Message-ID: <17c6771e0903200428j75e26899x9c15daf57f5ed20e@mail.gmail.com> 2009/2/18 Joe Darcy : > On 02/17/09 01:15 AM, Mark Wielaard wrote: > > Hi Christian (CCed hotspot-dev for advice) > > On Mon, 2009-02-16 at 09:55 +0100, Christian Thalinger wrote: > > > On Mon, 2009-02-16 at 09:25 +0100, Mark Wielaard wrote: > > > Great. I was surprised if it was otherwise. > I was just confused which tree to track to make sure to get the latest > HS14 since we are trying to keep all branches (zero/shark/default) of > IcedTea6 at a stable Hotspot release. Is this in the default > jdk7/jdk7/hotspot tree or in some other one? > > > The jdk7 repository contains HS15 and therefore not a stable one. I > just looked into the jdk6 repository but it only contains HS11. I don't > know of any open HS14 repository off the top of my head. > > > So it would be good to have an open repo that hosts the HS14 stable > build so that people interested in a stable, but modern, hotspot could > base their work on that. Since IcedTea6 is trying to standardize on HS14 > for the default hotspot and the one that Zero and Shark are based on I > could create a icedtea/hotspot repo branched from the latest HS14 code > in the jdk7/jdk7/hotspot repo. Would that be interesting to others? How > do we coordinate backporting fixes to it? Any other suggestions for > hosting an open hotspot HS14 repo (maybe as subtree of one of the other > 6 hotspot repos under jdk7/hostspot-* (I admit to not know what they are > all for currently). > > > > Hello. > > I have been talking with the HotSpot team inside Sun about the logistics > needed to support a public HotSpot Mercurial repository usable by both > OpenJDK 6 and the 6 update release, which would mean the stabilized HotSpot > 14 at this point. > > We should have something figured out relatively soon; I'll post when we do. > > -Joe > Any news on this? -- 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 langel at redhat.com Fri Mar 20 01:52:31 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 20 Mar 2009 08:52:31 +0000 Subject: changeset in /hg/icedtea: 2009-03-09 Tomas Hurka changeset 122e85e49878 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=122e85e49878 description: 2009-03-09 Tomas Hurka * Makefile.am: Updated visualvm to version 1.1.1. diffstat: 1 file changed, 3 insertions(+), 3 deletions(-) Makefile.am | 6 +++--- diffs (23 lines): diff -r 74222c209012 -r 122e85e49878 Makefile.am --- a/Makefile.am Thu Mar 19 12:15:24 2009 +0000 +++ 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_PLUGIN ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin @@ -1645,8 +1645,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: if OPENJDK_SRC_DIR_FOUND From bugzilla-daemon at icedtea.classpath.org Fri Mar 20 11:02:31 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 20 Mar 2009 18:02: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 aph at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #5 from aph at redhat.com 2009-03-20 18:02 ------- This isn't a bug. javac necessarily runs with a finite stack size, but there is no limit in the JLS on the nesting complexity of a Java program, so javac will always run out of stack space with some inputs. The need to set the stack size explicitly when building particularly complex source files is well-known, and this is even done while building OpenJDK itself. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Fri Mar 20 08:22:43 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 20 Mar 2009 15:22:43 +0000 Subject: changeset in /hg/icedtea6: 2009-03-21 Lillian Angel changeset 367b143c4238 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=367b143c4238 description: 2009-03-21 Lillian Angel * patches/icedtea-lcms.patch: New patch. * Makefile.am (ICEDTEA_PATCHES): Added new patch to the list. diffstat: 3 files changed, 411 insertions(+), 1 deletion(-) ChangeLog | 6 Makefile.am | 3 patches/icedtea-lcms.patch | 403 ++++++++++++++++++++++++++++++++++++++++++++ diffs (433 lines): diff -r e62a79c60bf7 -r 367b143c4238 ChangeLog --- a/ChangeLog Fri Mar 20 11:03:33 2009 -0400 +++ b/ChangeLog Fri Mar 20 11:21:59 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-20 Omair Majid + + * patches/icedtea-lcms.patch: New patch. + * Makefile.am + (ICEDTEA_PATCHES): Added new patch to the list. + 2009-03-20 Omair Majid * Makefile.am (check-jdk): Change permissions on test input diff -r e62a79c60bf7 -r 367b143c4238 Makefile.am --- a/Makefile.am Fri Mar 20 11:03:33 2009 -0400 +++ b/Makefile.am Fri Mar 20 11:21:59 2009 -0400 @@ -542,7 +542,8 @@ ICEDTEA_PATCHES = \ patches/icedtea-libraries.patch \ patches/icedtea-javafiles.patch \ patches/icedtea-core-build.patch \ - patches/icedtea-jvmtiEnv.patch + patches/icedtea-jvmtiEnv.patch \ + patches/icedtea-lcms.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r e62a79c60bf7 -r 367b143c4238 patches/icedtea-lcms.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-lcms.patch Fri Mar 20 11:21:59 2009 -0400 @@ -0,0 +1,403 @@ +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/lcms.h 2008-11-25 04:06:04.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/lcms.h 2009-03-20 11:12:53.000000000 -0400 +@@ -1445,7 +1445,17 @@ + #endif + } + +- ++LCMS_INLINE void* _cmsCalloc(size_t nmemb, size_t size) ++{ ++ size_t alloc = nmemb * size; ++ if (size == 0) { ++ return malloc(0); ++ } ++ if (alloc / size != nmemb) { ++ return NULL; ++ } ++ return malloc(alloc); ++} + + // Clamp with saturation + +@@ -2061,6 +2071,11 @@ + // Build a tone curve for K->K' if possible (only works on CMYK) + LPGAMMATABLE _cmsBuildKToneCurve(cmsHTRANSFORM hCMYK2CMYK, int nPoints); + ++// Validates a LUT ++BOOL cdecl _cmsValidateLUT(LPLUT NewLUT); ++ ++ ++ + // These are two VITAL macros, from converting between 8 and 16 bit + // representation. + +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2008-11-25 04:06:04.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2009-03-20 11:12:49.000000000 -0400 +@@ -144,7 +144,7 @@ + LPGAMMATABLE p; + size_t size; + +- if (nEntries > 65530) { ++ if (nEntries > 65530 || nEntries <= 0) { + cmsSignalError(LCMS_ERRC_WARNING, "Couldn't create gammatable of more than 65530 entries; 65530 assumed"); + nEntries = 65530; + } +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2008-11-25 04:06:04.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2009-03-20 11:12:53.000000000 -0400 +@@ -62,7 +62,7 @@ + typedef struct { + LPBYTE Block; // Points to allocated memory + size_t Size; // Size of allocated memory +- int Pointer; // Points to current location ++ size_t Pointer; // Points to current location + int FreeBlockOnClose; // As title + + } FILEMEM; +@@ -103,6 +103,21 @@ + FILEMEM* ResData = (FILEMEM*) Icc ->stream; + LPBYTE Ptr; + size_t len = size * count; ++ size_t extent = ResData -> Pointer + len; ++ ++ if (len == 0) { ++ return 0; ++ } ++ ++ if (len / size != count) { ++ cmsSignalError(LCMS_ERRC_ABORTED, "Read from memory error. Integer overflow with count / size."); ++ return 0; ++ } ++ ++ if (extent < len || extent < ResData -> Pointer) { ++ cmsSignalError(LCMS_ERRC_ABORTED, "Read from memory error. Integer overflow with len."); ++ return 0; ++ } + + + if (ResData -> Pointer + len > ResData -> Size){ +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2008-11-25 04:06:04.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2009-03-20 11:12:49.000000000 -0400 +@@ -288,11 +288,14 @@ + // Read profile header and validate it + + static +-LPLCMSICCPROFILE ReadHeader(LPLCMSICCPROFILE Icc, BOOL lIsFromMemory) ++LPLCMSICCPROFILE ReadHeader(LPLCMSICCPROFILE Icc, ++ BOOL lIsFromMemory, ++ DWORD dwSize) + { + icTag Tag; + icHeader Header; + icInt32Number TagCount, i; ++ icUInt32Number extent; + + Icc -> Read(&Header, sizeof(icHeader), 1, Icc); + +@@ -313,6 +316,9 @@ + + if (Header.magic != icMagicNumber) goto ErrorCleanup; + ++ if (dwSize && dwSize != Header.size) { ++ goto ErrorCleanup; ++ } + + if (Icc ->Read(&TagCount, sizeof(icInt32Number), 1, Icc) != 1) + goto ErrorCleanup; +@@ -348,7 +354,7 @@ + + // Read tag directory + +- if (TagCount > MAX_TABLE_TAG) { ++ if (TagCount > MAX_TABLE_TAG || TagCount < 0) { + + cmsSignalError(LCMS_ERRC_ABORTED, "Too many tags (%d)", TagCount); + goto ErrorCleanup; +@@ -363,6 +369,11 @@ + AdjustEndianess32((LPBYTE) &Tag.size); + AdjustEndianess32((LPBYTE) &Tag.sig); // Signature + ++ // Perform some sanity check. Offset + size should fall inside file. ++ extent = Tag.offset + Tag.size; ++ if (extent > Header.size || extent < Tag.offset) ++ goto ErrorCleanup; ++ + Icc -> TagNames[i] = Tag.sig; + Icc -> TagOffsets[i] = Tag.offset; + Icc -> TagSizes[i] = Tag.size; +@@ -515,6 +526,10 @@ + NewLUT -> InputEntries = 256; + NewLUT -> OutputEntries = 256; + ++ // Do some checking ++ if (!_cmsValidateLUT(NewLUT)) { ++ return FALSE; ++ } + + AdjustEndianess32((LPBYTE) &LUT8.e00); + AdjustEndianess32((LPBYTE) &LUT8.e01); +@@ -578,7 +593,7 @@ + + if (nTabSize > 0) { + +- PtrW = (LPWORD) malloc(sizeof(WORD) * nTabSize); ++ PtrW = (LPWORD) _cmsCalloc(sizeof(WORD), nTabSize); + Temp = (LPBYTE) malloc(nTabSize); + Icc ->Read(Temp, 1, nTabSize, Icc); + +@@ -646,6 +661,15 @@ + // some profiles does claim to do that. Poor lcms will try + // to detect such condition and fix up "on the fly". + ++ switch (sig) { ++ ++ case icSigBToA0Tag: ++ case icSigBToA1Tag: ++ case icSigBToA2Tag: ++ case icSigGamutTag: ++ case icSigPreview0Tag: ++ case icSigPreview1Tag: ++ case icSigPreview2Tag: + { + LPWORD WhiteLab, ExpectedWhite; + WORD WhiteFixed[MAXCHANNELS], WhiteUnfixed[MAXCHANNELS]; +@@ -685,7 +709,10 @@ + } + + } ++ break; + ++ default:; ++ } + } + + } +@@ -718,6 +745,9 @@ + NewLUT -> InputEntries = LUT16.inputEnt; + NewLUT -> OutputEntries = LUT16.outputEnt; + ++ if (!_cmsValidateLUT(NewLUT)) { ++ return FALSE; ++ } + + // Matrix handling + +@@ -775,7 +805,9 @@ + NewLUT->InputChan)); + if (nTabSize > 0) { + +- PtrW = (LPWORD) malloc(sizeof(WORD) * nTabSize); ++ PtrW = (LPWORD) _cmsCalloc(sizeof(WORD), nTabSize); ++ if (PtrW == NULL) ++ return FALSE; + + NewLUT -> T = PtrW; + NewLUT -> Tsize = (unsigned int) (nTabSize * sizeof(WORD)); +@@ -1070,14 +1102,24 @@ + BOOL ReadCLUT(LPLCMSICCPROFILE Icc, size_t Offset, LPLUT NewLUT) + { + ++ unsigned int j; + icCLutStruct CLUT; + + if (Icc -> Seek(Icc, Offset)) return FALSE; + Icc ->Read(&CLUT, sizeof(icCLutStruct), 1, Icc); + + +- cmsAlloc3DGrid(NewLUT, CLUT.gridPoints[0], NewLUT ->InputChan, +- NewLUT ->OutputChan); ++ for (j=1; j < NewLUT ->InputChan; j++) { ++ if (CLUT.gridPoints[0] != CLUT.gridPoints[j]) { ++ cmsSignalError(LCMS_ERRC_ABORTED, "CLUT with different granulatity is currently unsupported."); ++ return FALSE; ++ } ++ ++ ++ } ++ ++ if (cmsAlloc3DGrid(NewLUT, CLUT.gridPoints[0], NewLUT ->InputChan, ++ NewLUT ->OutputChan) == NULL) return FALSE; + + // Precission can be 1 or 2 bytes + +@@ -1134,9 +1176,11 @@ + else + nCurves = NewLUT ->OutputChan; + ++ ZeroMemory(Curves, sizeof(Curves)); + for (i=0; i < nCurves; i++) { + + Curves[i] = ReadCurve(Icc); ++ if (Curves[i] == NULL) goto Error; + SkipAlignment(Icc); + + } +@@ -1148,6 +1192,16 @@ + + return TRUE; + ++Error: ++ for (i=0; i < nCurves; i++) { ++ ++ if (Curves[i]) ++ cmsFreeGamma(Curves[i]); ++ } ++ ++ return FALSE; ++ ++ + } + + // V4 stuff. LutAtoB type +@@ -1169,6 +1223,14 @@ + NewLUT -> InputChan = LUT16.inputChan; + NewLUT -> OutputChan = LUT16.outputChan; + ++ // Validate the NewLUT here to avoid excessive number of channels ++ // (leading to stack-based buffer overflow in ReadSetOfCurves). ++ // Needs revalidation after table size is filled in. ++ if (!_cmsValidateLUT(NewLUT)) { ++ return FALSE; ++ } ++ ++ + AdjustEndianess32((LPBYTE) &LUT16.offsetB); + AdjustEndianess32((LPBYTE) &LUT16.offsetMat); + AdjustEndianess32((LPBYTE) &LUT16.offsetM); +@@ -1229,6 +1291,14 @@ + NewLUT -> InputChan = LUT16.inputChan; + NewLUT -> OutputChan = LUT16.outputChan; + ++ // Validate the NewLUT here to avoid excessive number of channels ++ // (leading to stack-based buffer overflow in ReadSetOfCurves). ++ // Needs revalidation after table size is filled in. ++ if (!_cmsValidateLUT(NewLUT)) { ++ return FALSE; ++ } ++ ++ + AdjustEndianess32((LPBYTE) &LUT16.offsetB); + AdjustEndianess32((LPBYTE) &LUT16.offsetMat); + AdjustEndianess32((LPBYTE) &LUT16.offsetM); +@@ -1493,10 +1563,12 @@ + + char Discard; + ++ // No return checking; could lead to large loop in ++ // combination with int oflow above computing Offset. + Icc ->Read(&Discard, 1, 1, Icc); + } + +- wchar = (wchar_t*) malloc(Len+2); ++ wchar = (wchar_t*) malloc(Len*sizeof(wchar_t)+2); + if (!wchar) return -1; + + Icc ->Read(wchar, 1, Len, Icc); +@@ -1867,6 +1939,8 @@ + char Root[33]; + + ZeroMemory(Colorant, sizeof(WORD) * MAXCHANNELS); ++ // No return value checking; could cause trouble with ++ // large count. + Icc -> Read(Root, 1, 32, Icc); + Icc -> Read(PCS, 3, sizeof(WORD), Icc); + +@@ -1900,7 +1974,8 @@ + + LPcmsNAMEDCOLORLIST LCMSEXPORT cmsReadColorantTable(cmsHPROFILE hProfile, icTagSignature sig) + { +- icInt32Number n, Count, i; ++ icInt32Number n; ++ icUInt32Number Count, i; + size_t offset; + icTagTypeSignature BaseType; + LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile; +@@ -2231,6 +2306,10 @@ + Icc ->Read(&Count, sizeof(icUInt32Number), 1, Icc); + AdjustEndianess32((LPBYTE) &Count); + ++ if (Count > 1000) { ++ return NULL; ++ } ++ + size = sizeof(int) + Count * sizeof(cmsPSEQDESC); + OutSeq = (LPcmsSEQ) malloc(size); + +@@ -2579,7 +2658,7 @@ + NewIcc = _cmsCreateProfileFromFilePlaceholder(lpFileName); + if (!NewIcc) return NULL; + +- if (!ReadHeader(NewIcc, FALSE)) return NULL; ++ if (!ReadHeader(NewIcc, FALSE, 0)) return NULL; + + ReadCriticalTags(NewIcc); + +@@ -2599,7 +2678,7 @@ + NewIcc = _cmsCreateProfileFromMemPlaceholder(MemPtr, dwSize); + if (!NewIcc) return NULL; + +- if (!ReadHeader(NewIcc, TRUE)) return NULL; ++ if (!ReadHeader(NewIcc, TRUE, dwSize)) return NULL; + + ReadCriticalTags(NewIcc); + +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c 2008-11-25 04:06:04.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c 2009-03-20 11:12:53.000000000 -0400 +@@ -210,6 +210,37 @@ + return rv; + } + ++BOOL _cmsValidateLUT(LPLUT NewLUT) ++{ ++ unsigned int calc = 1; ++ unsigned int oldCalc; ++ unsigned int power = NewLUT -> InputChan; ++ ++ if (NewLUT -> cLutPoints > 100) return FALSE; ++ if (NewLUT -> InputChan > MAXCHANNELS) return FALSE; ++ if (NewLUT -> OutputChan > MAXCHANNELS) return FALSE; ++ ++ if (NewLUT -> cLutPoints == 0) return TRUE; ++ ++ for (; power > 0; power--) { ++ ++ oldCalc = calc; ++ calc *= NewLUT -> cLutPoints; ++ ++ if (calc / NewLUT -> cLutPoints != oldCalc) { ++ return FALSE; ++ } ++ } ++ ++ oldCalc = calc; ++ calc *= NewLUT -> OutputChan; ++ if (NewLUT -> OutputChan && calc / NewLUT -> OutputChan != oldCalc) { ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ + + LPLUT LCMSEXPORT cmsAlloc3DGrid(LPLUT NewLUT, int clutPoints, int inputChan, int outputChan) + { +@@ -220,12 +251,15 @@ + NewLUT -> InputChan = inputChan; + NewLUT -> OutputChan = outputChan; + ++ if (!_cmsValidateLUT(NewLUT)) { ++ return NULL; ++ } ++ ++ nTabSize = NewLUT -> OutputChan * UIpow(NewLUT->cLutPoints, ++ NewLUT->InputChan); + +- nTabSize = (NewLUT -> OutputChan * UIpow(NewLUT->cLutPoints, +- NewLUT->InputChan) +- * sizeof(WORD)); +- +- NewLUT -> T = (LPWORD) malloc(nTabSize); ++ NewLUT -> T = (LPWORD) _cmsCalloc(sizeof(WORD), nTabSize); ++ nTabSize *= sizeof(WORD); + ZeroMemory(NewLUT -> T, nTabSize); + NewLUT ->Tsize = nTabSize; + From omajid at redhat.com Fri Mar 20 08:05:14 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 20 Mar 2009 15:05:14 +0000 Subject: changeset in /hg/icedtea6: 2009-03-20 Omair Majid changeset e62a79c60bf7 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e62a79c60bf7 description: 2009-03-20 Omair Majid * Makefile.am (check-jdk): Change permissions on test input files as required by the native2ascii jtreg tests. diffstat: 2 files changed, 7 insertions(+) ChangeLog | 5 +++++ Makefile.am | 2 ++ diffs (24 lines): diff -r c1d29ccc9bcb -r e62a79c60bf7 ChangeLog --- a/ChangeLog Fri Mar 20 10:43:33 2009 -0400 +++ b/ChangeLog Fri Mar 20 11:03:33 2009 -0400 @@ -1,3 +1,8 @@ 2009-03-20 Omair Majid + + * Makefile.am (check-jdk): Change permissions on test input + files as required by the native2ascii jtreg tests. + 2009-03-20 Omair Majid * patches/icedtea-jtreg-hatrun.patch: Fix path to java. diff -r c1d29ccc9bcb -r e62a79c60bf7 Makefile.am --- a/Makefile.am Fri Mar 20 10:43:33 2009 -0400 +++ b/Makefile.am Fri Mar 20 11:03:33 2009 -0400 @@ -1735,6 +1735,8 @@ check-langtools: stamps/jtreg.stamp | tee test/$@.log check-jdk: stamps/jtreg.stamp + chmod -w $(abs_top_srcdir)/openjdk/jdk/test/sun/tools/native2ascii/test2 + chmod -w $(abs_top_srcdir)/openjdk/jdk/test/sun/tools/native2ascii/test3 mkdir -p test/jdk/JTwork test/jdk/JTreport $(ICEDTEA_BOOT_DIR)/bin/java -jar test/jtreg.jar -v1 -a -ignore:quiet \ -w:test/jdk/JTwork -r:test/jdk/JTreport \ From omajid at redhat.com Fri Mar 20 07:44:48 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 20 Mar 2009 14:44:48 +0000 Subject: changeset in /hg/icedtea6: 2009-03-20 Omair Majid changeset c1d29ccc9bcb in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c1d29ccc9bcb description: 2009-03-20 Omair Majid * patches/icedtea-jtreg-hatrun.patch: Fix path to java. diffstat: 2 files changed, 14 insertions(+), 3 deletions(-) ChangeLog | 4 ++++ patches/icedtea-jtreg-hatrun.patch | 13 ++++++++++--- diffs (38 lines): diff -r 3e8846035a79 -r c1d29ccc9bcb ChangeLog --- a/ChangeLog Tue Mar 17 17:21:01 2009 -0400 +++ b/ChangeLog Fri Mar 20 10:43:33 2009 -0400 @@ -1,3 +1,7 @@ 2009-03-17 Omair Majid + + * patches/icedtea-jtreg-hatrun.patch: Fix path to java. + 2009-03-17 Omair Majid * test/jtreg/excludelist.jdk.jtx: Add diff -r 3e8846035a79 -r c1d29ccc9bcb patches/icedtea-jtreg-hatrun.patch --- a/patches/icedtea-jtreg-hatrun.patch Tue Mar 17 17:21:01 2009 -0400 +++ b/patches/icedtea-jtreg-hatrun.patch Fri Mar 20 10:43:33 2009 -0400 @@ -1,5 +1,5 @@ ---- 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 +--- openjdk/jdk/test/sun/tools/jhat/HatRun.java.orig 2009-03-20 09:55:39.000000000 -0400 ++++ openjdk/jdk/test/sun/tools/jhat/HatRun.java 2009-03-20 09:56:48.000000000 -0400 @@ -161,6 +161,7 @@ public void runit(String class_name, String vm_options[]) { @@ -8,7 +8,14 @@ String sdk_home = (jre_home.endsWith("jre") ? (jre_home + File.separator + "..") : jre_home ); -@@ -176,21 +177,25 @@ +@@ -170,27 +171,31 @@ + os_arch.equals("amd64"); + String isa_dir = d64?(File.separator+os_arch):""; + String java = jre_home +- + File.separator + "bin" + isa_dir ++ + File.separator + "bin" + + File.separator + "java"; + String jhat = sdk_home + File.separator + "bin" + File.separator + "jhat"; /* Array of strings to be passed in for exec: * 1. java From bugzilla-daemon at icedtea.classpath.org Fri Mar 20 07:41:32 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 20 Mar 2009 14:41:32 +0000 Subject: [Bug 303] qt-integration plugin in eclipse crashes while opening ui file Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=303 ------- Comment #1 from omajid at redhat.com 2009-03-20 14:41 ------- Hi Shekhar, I can reproduce the issue, but it seems to be a problem with qt-integration. The last message produced by eclipse looks is this: QPixmap: Must construct a QApplication before a QPaintDevice Aborted The first google result for that error message has this [1] "I have only seen this once in my application, and it was due to a static QPixmap or some such. Since static constructors get run before main() is entered, the QApplication hasn't been created yet." And the file qswt/shared/designerintegrationv2/QtDesigner/private/qdesigner_formbuilder_p.h:93 contains the line: static QPixmap createPreviewPixmap(const QDesignerFormWindowInterface *fw, const QString &styleName = QString(), const QString &appStyleSheet = QString()) It might be more useful to email qt-interest about this. [1] http://lists.trolltech.com/qt-interest/1998-12/thread00012-0.html -- 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 ahughes at redhat.com Fri Mar 20 04:44:04 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 11:44:04 +0000 Subject: changeset in /hg/icedtea: Added tag icedtea-1.9 for changeset db... Message-ID: changeset 9933c527970b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9933c527970b description: Added tag icedtea-1.9 for changeset db666234267c diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r db666234267c -r 9933c527970b .hgtags --- a/.hgtags Fri Mar 20 08:57:19 2009 +0000 +++ b/.hgtags Fri Mar 20 11:42:36 2009 +0000 @@ -14,3 +14,4 @@ 3ced1c5f140358bf1d1ef569017b7914f36d6a5e 3ced1c5f140358bf1d1ef569017b7914f36d6a5e icedtea-1.8 6c02b699206db299c6bc96d97d31808bf84f042a icedtea6-1.4pre 2b1c03c1e9fa88e453da2ca774dc8900227a2e16 icedtea6-1.4 +db666234267c53adb4f55967fa3dce442167ae3b icedtea-1.9 From ahughes at redhat.com Fri Mar 20 02:02:23 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 09:02:23 +0000 Subject: changeset in /hg/icedtea: Prepare for 1.9 release. Message-ID: changeset db666234267c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=db666234267c description: Prepare for 1.9 release. 2009-03-20 Andrew John Hughes * NEWS: Add release date for 1.9. * configure.ac: Bump to 1.9 proper. diffstat: 3 files changed, 9 insertions(+), 8 deletions(-) ChangeLog | 5 +++++ NEWS | 10 +++------- configure.ac | 2 +- diffs (52 lines): diff -r 9adee4a3a8d1 -r db666234267c ChangeLog --- a/ChangeLog Thu Mar 19 19:36:15 2009 +0000 +++ b/ChangeLog Fri Mar 20 08:57:19 2009 +0000 @@ -1,3 +1,8 @@ 2009-03-19 Andrew John Hughes + + * NEWS: Add release date for 1.9. + * configure.ac: Bump to 1.9 proper. + 2009-03-19 Andrew John Hughes * patches/icedtea-cacao-ignore-jdi-tests.patch: diff -r 9adee4a3a8d1 -r db666234267c NEWS --- a/NEWS Thu Mar 19 19:36:15 2009 +0000 +++ b/NEWS Fri Mar 20 08:57:19 2009 +0000 @@ -1,4 +1,4 @@ New in release 1.9 (XXXX-XX-XX) -New in release 1.9 (XXXX-XX-XX) +New in release 1.9 (2009-03-20) - Security fixes for: CVE-2008-5360 - Temporary files have guessable file names. @@ -12,11 +12,7 @@ New in release 1.9 (XXXX-XX-XX) CVE-2008-5357 - Truetype Font processing vulnerability. CVE-2008-5352 - Jar200 Decompression buffer overflow. CVE-2008-5358 - Buffer Overflow in GIF image processing. -- Updated to OpenJDK b14 build. -- Upgraded to new OpenJDK7 Hotspot 14. The old OpenJDK6 Hotspot 11 can - still be configured --with-hotspot-build=original but future versions - will drop support for the old version and only support HS14. Zero - and Shark have been forward ported to HS14 (from HS12). +- Updated to OpenJDK7 b50 build. - XRender pipeline support: Java2D are noticably faster and running over a remote X connection feels like it is all local. Build by default (disable with --disable-xrender). Runtime enabled by running java @@ -24,7 +20,7 @@ New in release 1.9 (XXXX-XX-XX) - IcedTeaPlugin now supports HTTPS sites and adds a user prompt for untrusted https certificates. - Use the ALSA 'default' device. Makes Java play nicer with PulseAudio. -- VisualVM integration has been removed. +- VisualVM integration updated to 1.1.1 - Gervill soft synthesizer integration updated to latest CVS version. - Integrated jtreg upgraded to 4_0-src-b02-15_oct_2008. - make check runs much faster now. jtreg -samevm support has been diff -r 9adee4a3a8d1 -r db666234267c configure.ac --- a/configure.ac Thu Mar 19 19:36:15 2009 +0000 +++ b/configure.ac Fri Mar 20 08:57:19 2009 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea], [1.9-pre], [distro-pk -AC_INIT([icedtea], [1.9-pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [1.9], [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 Fri Mar 20 01:52:32 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 08:52:32 +0000 Subject: changeset in /hg/icedtea: Fix CACAO build. Message-ID: changeset 9adee4a3a8d1 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9adee4a3a8d1 description: Fix CACAO build. 2009-03-19 Andrew John Hughes * patches/icedtea-cacao-ignore-jdi-tests.patch: Removed; replaced by exclude list. * patches/icedtea-cacao-ignore-tests.patch, * patches/icedtea-cacao.patch: Moved to cacao subdirectory. * Makefile.am: Bump CACAO to 0.99.4, fix CACAO for OpenJDK7, update target to jdk_only. * patches/cacao/ignore-tests.patch: Moved. * patches/cacao/launcher.patch: Updated. * patches/cacao/openjdk7.patch: Fix CACAO 0.99.4 to work with OpenJDK7. * test/jtreg/excludelist.jdk.cacao.jtx: Replacement exclude list for CACAO JDI tests. diffstat: 9 files changed, 293 insertions(+), 1401 deletions(-) ChangeLog | 17 Makefile.am | 25 patches/cacao/ignore-tests.patch | 10 patches/cacao/launcher.patch | 25 patches/cacao/openjdk7.patch | 86 + patches/icedtea-cacao-ignore-jdi-tests.patch | 1359 -------------------------- patches/icedtea-cacao-ignore-tests.patch | 10 patches/icedtea-cacao.patch | 23 test/jtreg/excludelist.jdk.cacao.jtx | 139 ++ diffs (truncated from 1791 to 500 lines): diff -r a3d58ec76be9 -r 9adee4a3a8d1 ChangeLog --- a/ChangeLog Thu Mar 19 16:00:19 2009 +0000 +++ b/ChangeLog Thu Mar 19 19:36:15 2009 +0000 @@ -1,3 +1,20 @@ 2009-03-19 Andrew John Hughes + + * patches/icedtea-cacao-ignore-jdi-tests.patch: + Removed; replaced by exclude list. + * patches/icedtea-cacao-ignore-tests.patch, + * patches/icedtea-cacao.patch: + Moved to cacao subdirectory. + * Makefile.am: + Bump CACAO to 0.99.4, fix CACAO for OpenJDK7, + update target to jdk_only. + * patches/cacao/ignore-tests.patch: Moved. + * patches/cacao/launcher.patch: Updated. + * patches/cacao/openjdk7.patch: Fix CACAO 0.99.4 + to work with OpenJDK7. + * test/jtreg/excludelist.jdk.cacao.jtx: + Replacement exclude list for CACAO JDI tests. + 2009-03-19 Andrew John Hughes * acinclude.m4: diff -r a3d58ec76be9 -r 9adee4a3a8d1 Makefile.am --- a/Makefile.am Thu Mar 19 16:00:19 2009 +0000 +++ b/Makefile.am Thu Mar 19 19:36:15 2009 +0000 @@ -2,8 +2,8 @@ OPENJDK_MD5SUM = a451251ebdd9a219b164293 OPENJDK_MD5SUM = a451251ebdd9a219b16429369fa72e2a OPENJDK_VERSION = b50 -CACAO_VERSION = 0.99.3 -CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 +CACAO_VERSION = 0.99.4 +CACAO_MD5SUM = 63220327925ace13756ae334c55a3baa NETBEANS_PROFILER_MD5SUM = 786ab31817cbd902a7211cd6a6161750 VISUALVM_MD5SUM = a289739f4a5bcdb9a2c642cfcc1e83fe @@ -1290,6 +1290,7 @@ JTREG_SRCS = $(top_srcdir)/test/jtreg/co $(top_srcdir)/test/jtreg/README \ $(top_srcdir)/test/jtreg/META-INF/MANIFEST.MF \ $(top_srcdir)/test/jtreg/excludelist.jdk.jtx \ + $(top_srcdir)/test/jtreg/excludelist.jdk.cacao.jtx \ $(top_srcdir)/test/jtreg/JavaTest.cmdMgrs.lst \ $(top_srcdir)/test/jtreg/excludelist.langtools.jtx @@ -1310,6 +1311,7 @@ EXTRA_DIST = $(GENERATED_FILES) $(top_sr EXTRA_DIST = $(GENERATED_FILES) $(top_srcdir)/patches/*.patch \ $(top_srcdir)/patches/hotspot/default/*.patch \ $(top_srcdir)/patches/ecj/*.patch \ + $(top_srcdir)/patches/cacao/*.patch \ $(top_srcdir)/patches/security/*.patch \ $(top_srcdir)/patches/xrender/*.patch \ tools-copy contrib ports extra overlays \ @@ -1839,9 +1841,8 @@ endif if WITH_CACAO ICEDTEA_PATCHES += \ - patches/icedtea-cacao.patch \ - patches/icedtea-cacao-ignore-jdi-tests.patch \ - patches/icedtea-cacao-ignore-tests.patch + patches/cacao/launcher.patch \ + patches/cacao/ignore-tests.patch endif if ENABLE_PULSE_JAVA @@ -1915,6 +1916,9 @@ if !USE_SYSTEM_CACAO $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ dir=$$(basename cacao/cacao-*) ; \ ln -s $$dir cacao/cacao ; \ + cd cacao/cacao ; \ + $(PATCH) -l -p0 < $(abs_top_srcdir)/patches/cacao/openjdk7.patch ; \ + cd .. ; \ fi endif endif @@ -2326,8 +2330,8 @@ endif endif if WITH_CACAO - ICEDTEA_BUILD_TARGET=j2se_only - ICEDTEA_DEBUG_BUILD_TARGET=j2se_fastdebug_only + ICEDTEA_BUILD_TARGET=jdk_only + ICEDTEA_DEBUG_BUILD_TARGET=jdk_fastdebug_only else ICEDTEA_BUILD_TARGET= ICEDTEA_DEBUG_BUILD_TARGET=debug_build @@ -2770,7 +2774,7 @@ if !USE_SYSTEM_CACAO --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ --with-java-runtime-library-classes=$(abs_top_builddir)/lib/rt \ --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ - make install + make -j$(PARALLEL_JOBS) install endif endif mkdir -p stamps @@ -2942,10 +2946,13 @@ check-langtools: stamps/jtreg.stamp check-jdk: stamps/jtreg.stamp mkdir -p test/jdk/JTwork test/jdk/JTreport +if WITH_CACAO + CACAO_EXCLUDE="-exclude:$(abs_top_srcdir)/test/jtreg/excludelist.jdk.cacao.jtx" +endif $(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) \ + $(ICEDTEA_JTREG_OPTIONS) $(CACAO_EXCLUDE) \ -exclude:$(abs_top_srcdir)/test/jtreg/excludelist.jdk.jtx \ `pwd`/openjdk/jdk/test \ | tee test/$@.log diff -r a3d58ec76be9 -r 9adee4a3a8d1 patches/cacao/ignore-tests.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/ignore-tests.patch Thu Mar 19 19:36:15 2009 +0000 @@ -0,0 +1,10 @@ +--- openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java~ 2008-08-28 10:20:49.000000000 +0200 ++++ openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java 2008-10-19 17:02:41.000000000 +0200 +@@ -37,6 +37,7 @@ + * @compile -source 1.5 ProducerConsumerLoops.java + * @run main/timeout=3600 ProducerConsumerLoops + * @summary multiple producers and consumers using blocking queues ++ * @ignore cacao test hog, ignore for the sake of buildds + */ + + import java.util.concurrent.*; diff -r a3d58ec76be9 -r 9adee4a3a8d1 patches/cacao/launcher.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/launcher.patch Thu Mar 19 19:36:15 2009 +0000 @@ -0,0 +1,25 @@ +diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile +--- openjdk.orig/jdk/make/docs/Makefile 2009-03-19 16:10:56.000000000 +0000 ++++ openjdk/jdk/make/docs/Makefile 2009-03-19 16:12:59.000000000 +0000 +@@ -36,7 +36,7 @@ + ifeq ($(ARCH_DATA_MODEL),64) + MAX_VM_MEMORY = 1024 + else +- MAX_VM_MEMORY = 512 ++ MAX_VM_MEMORY = 768 + endif + + # +diff -Nru openjdk.orig/jdk/src/share/bin/java.c openjdk/jdk/src/share/bin/java.c +--- openjdk.orig/jdk/src/share/bin/java.c 2009-03-19 16:10:56.000000000 +0000 ++++ openjdk/jdk/src/share/bin/java.c 2009-03-19 16:18:16.000000000 +0000 +@@ -1873,7 +1873,8 @@ + args.classname = classname; + args.ifn = *ifn; + +- rslt = ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args); ++ /*rslt = ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args);*/ ++ rslt = JavaMain((void*)&args); + /* If the caller has deemed there is an error we + * simply return that, otherwise we return the value of + * the callee diff -r a3d58ec76be9 -r 9adee4a3a8d1 patches/cacao/openjdk7.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/openjdk7.patch Thu Mar 19 19:36:15 2009 +0000 @@ -0,0 +1,86 @@ +diff -Nru src.orig/native/vm/sun_misc_Unsafe.c src/native/vm/sun_misc_Unsafe.c +--- src.orig/native/vm/sun_misc_Unsafe.c 2009-03-19 17:31:38.000000000 +0000 ++++ src/native/vm/sun_misc_Unsafe.c 2009-03-19 17:34:57.000000000 +0000 +@@ -104,14 +104,8 @@ + { "putDouble", "(JD)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_putDouble__JD }, + { "objectFieldOffset", "(Ljava/lang/reflect/Field;)J", (void *) (intptr_t) &Java_sun_misc_Unsafe_objectFieldOffset }, + { "allocateMemory", "(J)J", (void *) (intptr_t) &Java_sun_misc_Unsafe_allocateMemory }, +-#if 0 +- /* OpenJDK 7 */ + { "setMemory", "(Ljava/lang/Object;JJB)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_setMemory }, + { "copyMemory", "(Ljava/lang/Object;JLjava/lang/Object;JJ)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_copyMemory }, +-#else +- { "setMemory", "(JJB)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_setMemory }, +- { "copyMemory", "(JJJ)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_copyMemory }, +-#endif + { "freeMemory", "(J)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_freeMemory }, + { "staticFieldOffset", "(Ljava/lang/reflect/Field;)J", (void *) (intptr_t) &Java_sun_misc_Unsafe_staticFieldOffset }, + { "staticFieldBase", "(Ljava/lang/reflect/Field;)Ljava/lang/Object;", (void *) (intptr_t) &Java_sun_misc_Unsafe_staticFieldBase }, +@@ -758,7 +752,6 @@ + } + + +-#if 0 + /* OpenJDK 7 */ + + /* +@@ -816,59 +809,6 @@ + + system_memcpy(dest, src, length); + } +-#else +-/* +- * Class: sun/misc/Unsafe +- * Method: setMemory +- * Signature: (JJB)V +- */ +-JNIEXPORT void JNICALL Java_sun_misc_Unsafe_setMemory(JNIEnv *env, sun_misc_Unsafe *this, int64_t address, int64_t bytes, int32_t value) +-{ +- size_t length; +- void *p; +- +- length = (size_t) bytes; +- +- if ((length != (uint64_t) bytes) || (bytes < 0)) { +- exceptions_throw_illegalargumentexception(); +- return; +- } +- +- p = (void *) (intptr_t) address; +- +- /* XXX Not sure this is correct. */ +- +- system_memset(p, value, length); +-} +- +- +-/* +- * Class: sun/misc/Unsafe +- * Method: copyMemory +- * Signature: (JJJ)V +- */ +-JNIEXPORT void JNICALL Java_sun_misc_Unsafe_copyMemory(JNIEnv *env, sun_misc_Unsafe *this, int64_t srcAddress, int64_t destAddress, int64_t bytes) +-{ +- size_t length; +- void *src; +- void *dest; +- +- if (bytes == 0) +- return; +- +- length = (size_t) bytes; +- +- if ((length != (uint64_t) bytes) || (bytes < 0)) { +- exceptions_throw_illegalargumentexception(); +- return; +- } +- +- src = (void *) (intptr_t) srcAddress; +- dest = (void *) (intptr_t) destAddress; +- +- system_memcpy(dest, src, length); +-} +-#endif + + + /* diff -r a3d58ec76be9 -r 9adee4a3a8d1 patches/icedtea-cacao-ignore-jdi-tests.patch --- a/patches/icedtea-cacao-ignore-jdi-tests.patch Thu Mar 19 16:00:19 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1359 +0,0 @@ ---- openjdk/jdk/test/com/sun/jdi/TemplateTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/TemplateTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -26,6 +26,7 @@ - // TEMPLATE: delete TEMPLATE lines - /** - * @test -+ * @ignore cacao nyi - * @bug 0000000 - * @summary - * ---- openjdk/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6394084 - # @summary Redefine class can't handle addition of 64 bit constants in JDK1.5.0_05 - # ---- openjdk/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4952629 4870514 - * @summary REGRESSION: javac generates a spurious line number entry on } else { - * ---- openjdk/jdk/test/com/sun/jdi/Redefine-g.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/Redefine-g.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4777868 - # @summary Compile with java -g, do a RedefineClasses, and you don't get local vars - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/RedefineClasses.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineClasses.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4628760 - # @summary RedefineClasses gets assertion: "Should be a method entry in cpcache!" - # @author jjh ---- openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6431735 - * @summary Unexpected ClassCastException in ThreadReference.forceEarlyReturn - * @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4513488 - * @summary Test for JDI: Internal JDI helper threads should setDaemon(true) - * ---- openjdk/jdk/test/com/sun/jdi/RedefineException.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineException.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4559100 - # @summary The VM crashes when a method in a redefined class throws an exception. - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/LocationTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LocationTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4419453 - * @summary Test that Method.location() returns the right values - * ---- openjdk/jdk/test/com/sun/jdi/LineNumberInfo.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LineNumberInfo.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4238644 4238643 4238641 4944198 - * @summary Test javac regressions in the generation of line number info - * @author Gordon Hirsch ---- openjdk/jdk/test/com/sun/jdi/GetSetLocalTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetSetLocalTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** hard coded linenumbers in other tests - DO NOT CHANGE - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4300412 - * @summary Test GetLocal* and SetLocal* functions - * ---- openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4507088 - # @summary TTY: Add a comment delimiter to the jdb command set - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/WatchFramePop.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/WatchFramePop.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4546478 - # @summary Enabling a watchpoint can kill following NotifyFramePops - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/FinalLocalsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FinalLocalsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4326648 4768329 - * @summary Test to verify that table entries are generated for all final - * locals when a class is built for debug, even if they could be ---- openjdk/jdk/test/com/sun/jdi/ClassesByName.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassesByName.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4287992 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4525714 - # @summary jtreg test PopAsynchronousTest fails in build 85 with -Xcomp - # @author Jim Holmlund/Swamy Venkataramanappa ---- openjdk/jdk/test/com/sun/jdi/OptionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/OptionTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /* - * @test OptionTest -+ * @ignore cacao nyi - * @bug 5095072 - * @summary Test for misc jdwp options, just that the option is parsed - * @author Kelly O'Hair (copied from Tim Bell's NoLaunchOptionTest) ---- openjdk/jdk/test/com/sun/jdi/VMDeathLastTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/VMDeathLastTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4420844 4449394 - * @summary Checks that no events are sent after VMDeath, and test vm.canBeModified - * ---- openjdk/jdk/test/com/sun/jdi/InstanceFilter.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/InstanceFilter.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4312961 - * @summary Verify that an instance filter on a MethodEntryRequest works - * properly. ---- openjdk/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4448658 - # @summary javac produces the inconsistent variable debug in while loops. - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/SuspendThreadTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/SuspendThreadTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6485605 - * @summary com.sun.jdi.InternalException: Inconsistent suspend policy in internal event handler - * ---- openjdk/jdk/test/com/sun/jdi/UTF8Test.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/UTF8Test.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 5033550 - * @summary JDWP back end uses modified UTF-8 - * ---- openjdk/jdk/test/com/sun/jdi/RedefineStep.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineStep.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4689395 - # @summary "step over" after a class is redefined acts like "step out" - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/RedefineTTYLineNumber.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineTTYLineNumber.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4660756 - # @summary TTY: Need to clear source cache after doing a redefine class - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/JdbMethodExitTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbMethodExitTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6202891 - # @summary TTY: Add support for method exit event return values to jdb - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # From ahughes at redhat.com Fri Mar 20 01:52:32 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 08:52:32 +0000 Subject: changeset in /hg/icedtea: Fix Shark build. Message-ID: changeset a3d58ec76be9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a3d58ec76be9 description: Fix Shark build. 2009-03-19 Andrew John Hughes * acinclude.m4: Cleanup options so only --enable-shark is needed to build Shark. * configure.ac: Reorder for above. * patches/hotspot/default/icedtea-shark.patch: Recreated against b50/HSb15. diffstat: 4 files changed, 376 insertions(+), 349 deletions(-) ChangeLog | 9 acinclude.m4 | 50 +- configure.ac | 2 patches/hotspot/default/icedtea-shark.patch | 664 +++++++++++++-------------- diffs (truncated from 799 to 500 lines): diff -r 3fbe290cdd66 -r a3d58ec76be9 ChangeLog --- a/ChangeLog Thu Mar 19 13:51:08 2009 +0000 +++ b/ChangeLog Thu Mar 19 16:00:19 2009 +0000 @@ -1,3 +1,12 @@ 2009-03-09 Tomas Hurka + + * acinclude.m4: + Cleanup options so only --enable-shark is + needed to build Shark. + * configure.ac: Reorder for above. + * patches/hotspot/default/icedtea-shark.patch: + Recreated against b50/HSb15. + 2009-03-09 Tomas Hurka * Makefile.am: Updated visualvm to version 1.1.1. diff -r 3fbe290cdd66 -r a3d58ec76be9 acinclude.m4 --- a/acinclude.m4 Thu Mar 19 13:51:08 2009 +0000 +++ b/acinclude.m4 Thu Mar 19 16:00:19 2009 +0000 @@ -714,21 +714,35 @@ AC_DEFUN([ENABLE_ZERO_BUILD], esac ], [ - case "${host}" in - i?86-*-*) ;; - sparc*-*-*) ;; - x86_64-*-*) ;; - *) - if test "x${WITH_CACAO}" != xno; then - use_zero=no - else - use_zero=yes - fi - ;; - esac + if test "x${use_shark}" = "xyes"; then + use_zero=yes; + else + case "${host}" in + i?86-*-*) ;; + sparc*-*-*) ;; + x86_64-*-*) ;; + *) + if test "x${WITH_CACAO}" != xno; then + use_zero=no + else + use_zero=yes + fi + ;; + esac + fi ]) AC_MSG_RESULT($use_zero) AM_CONDITIONAL(ZERO_BUILD, test "x${use_zero}" = xyes) + + use_core=no + if test "x${WITH_CACAO}" != "xno"; then + use_core=yes; + elif test "x${use_zero}" = "xyes"; then + if test "x${use_shark}" = "xno"; then + use_core=yes; + fi + fi + AM_CONDITIONAL(CORE_BUILD, test "x${use_core}" = xyes) ZERO_LIBARCH= ZERO_BITSPERWORD= @@ -789,7 +803,7 @@ AC_DEFUN([ENABLE_ZERO_BUILD], AC_CONFIG_FILES([ergo.c]) ]) -AC_DEFUN([SET_CORE_OR_SHARK_BUILD], +AC_DEFUN([SET_SHARK_BUILD], [ AC_MSG_CHECKING(whether to use the Shark JIT) shark_selected=no @@ -804,20 +818,12 @@ AC_DEFUN([SET_CORE_OR_SHARK_BUILD], esac ]) - use_core=no use_shark=no - if test "x${WITH_CACAO}" != "xno"; then - use_core=yes - elif test "x${use_zero}" = "xyes"; then - if test "x${shark_selected}" = "xyes"; then + if test "x${shark_selected}" = "xyes"; then use_shark=yes - else - use_core=yes - fi fi AC_MSG_RESULT($use_shark) - AM_CONDITIONAL(CORE_BUILD, test "x${use_core}" = xyes) AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) ]) diff -r 3fbe290cdd66 -r a3d58ec76be9 configure.ac --- a/configure.ac Thu Mar 19 13:51:08 2009 +0000 +++ b/configure.ac Thu Mar 19 16:00:19 2009 +0000 @@ -279,8 +279,8 @@ AC_CHECK_WITH_CACAO_HOME AC_CHECK_WITH_CACAO_HOME AC_CHECK_WITH_CACAO_SRC_ZIP ENABLE_OPTIMIZATIONS +SET_SHARK_BUILD ENABLE_ZERO_BUILD -SET_CORE_OR_SHARK_BUILD WITH_VERSION_SUFFIX WITH_PROJECT ENABLE_HG diff -r 3fbe290cdd66 -r a3d58ec76be9 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Thu Mar 19 13:51:08 2009 +0000 +++ b/patches/hotspot/default/icedtea-shark.patch Thu Mar 19 16:00:19 2009 +0000 @@ -1,207 +1,117 @@ ---- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp 2008-12-03 14:33:48.000000000 +0000 -@@ -727,10 +727,14 @@ - } - - OrderAccess::storestore(); -+#ifdef SHARK -+ mh->_from_interpreted_entry = code->instructions_begin(); -+#else - mh->_from_compiled_entry = code->verified_entry_point(); - OrderAccess::storestore(); - // Instantly compiled code can execute. - mh->_from_interpreted_entry = mh->get_i2c_entry(); -+#endif // SHARK - - } - ---- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2008-12-03 14:33:48.000000000 +0000 -@@ -44,6 +44,7 @@ - friend class VMStructs; - friend class CardTableRS; - friend class CheckForUnmarkedOops; // Needs access to raw card bytes. -+ friend class SharkBuilder; - #ifndef PRODUCT - // For debugging. - friend class GuaranteeNotModClosure; ---- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/globals.cpp 2008-12-03 14:33:48.000000000 +0000 -@@ -176,6 +176,18 @@ - #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT }, - #endif - -+#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT }, -+#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc) { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT }, -+#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT }, -+#ifdef PRODUCT -+ #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */ -+ #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc) /* flag is constant */ -+ #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) -+#else -+ #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT }, -+ #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc) { #type, XSTR(name), &name, "{Shark pd}", DEFAULT }, -+ #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT }, -+#endif - - static Flag flagTable[] = { - RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT) -@@ -189,6 +201,9 @@ - #ifdef COMPILER2 - C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT) - #endif -+#ifdef SHARK -+ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT) -+#endif - {0, NULL, NULL} +diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.cpp openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp +--- openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.cpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp 2009-03-19 14:32:38.000000000 +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 -Nru openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.hpp openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp +--- openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.hpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp 2009-03-19 14:32:38.000000000 +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 }; - ---- openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp 2008-12-03 14:33:49.000000000 +0000 -@@ -64,6 +64,11 @@ - assert(monitor->owner() == NULL || (!monitor->owner()->is_unlocked() && !monitor->owner()->has_bias_pattern()), "object must be null or locked, and unbiased"); - BasicObjectLock* dest = _monitors->at(index); - dest->set_obj(monitor->owner()); -+#ifdef SHARK -+ // XXX This can be removed when Shark knows -+ // which monitors are in use. -+ if (monitor->owner()) -+#endif // SHARK - monitor->lock()->move_to(monitor->owner(), dest->lock()); - } - } -@@ -262,6 +267,11 @@ - top = iframe()->previous_monitor_in_interpreter_frame(top); - BasicObjectLock* src = _monitors->at(index); - top->set_obj(src->obj()); -+#ifdef SHARK -+ // XXX This can be removed when Shark knows -+ // which monitors are in use. -+ if (src->obj()) -+#endif // SHARK - src->lock()->move_to(src->obj(), top->lock()); - } - if (ProfileInterpreter) { ---- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig 2008-12-03 14:23:37.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-12-03 14:33:48.000000000 +0000 -@@ -94,12 +94,16 @@ - #ifdef TIERED - #define VMTYPE "Server" - #else -+#ifdef SHARK -+ #define VMTYPE "Shark" -+#else - #if defined(COMPILER1) || defined(COMPILER2) -- #define VMTYPE COMPILER1_PRESENT("Client") \ -- COMPILER2_PRESENT("Server") -+ #define VMTYPE COMPILER1_PRESENT("Client") \ -+ COMPILER2_PRESENT("Server") - #else - #define VMTYPE "Core" - #endif // COMPILER1 || COMPILER2 -+#endif // SHARK - #endif // TIERED - #endif // KERNEL - ---- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp 2008-12-03 14:33:48.000000000 +0000 -@@ -229,6 +229,7 @@ - - } - -+#ifndef SHARK - // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info. - CodeBlob* cb = stub_frame.cb(); - // Verify we have the right vframeArray -@@ -239,6 +240,10 @@ - assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking"); - Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp); - #endif -+#else -+ intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp(); -+#endif // !SHARK -+ - // This is a guarantee instead of an assert because if vframe doesn't match - // we will unpack the wrong deoptimized frame and wind up in strange places - // where it will be very difficult to figure out what went wrong. Better -@@ -349,7 +354,9 @@ - - frame_pcs[0] = deopt_sender.raw_pc(); - -+#ifndef SHARK - assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc"); -+#endif // SHARK - - UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord, - caller_adjustment * BytesPerWord, -@@ -890,7 +897,20 @@ - // stuff a C2I adapter we can properly fill in the callee-save - // register locations. - frame caller = fr.sender(reg_map); -+#ifdef ZERO -+ int frame_size; -+ { -+ // In zero, frame::sp() is the *end* of the frame, so -+ // caller.sp() - fr.sp() is the size of the *caller*. -+ RegisterMap dummy_map(thread, false); -+ frame frame_1 = thread->last_frame(); -+ frame frame_2 = frame_1.sender(&dummy_map); -+ assert(frame_2.sp() == fr.sp(), "should be"); -+ frame_size = frame_2.sp() - frame_1.sp(); -+ } -+#else - int frame_size = caller.sp() - fr.sp(); -+#endif // ZERO - - frame sender = caller; - -@@ -1057,7 +1077,7 @@ - JRT_END - - --#ifdef COMPILER2 -+#if defined(COMPILER2) || defined(SHARK) - void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) { - // in case of an unresolved klass entry, load the class. - if (constant_pool->tag_at(index).is_unresolved_klass()) { -@@ -1808,7 +1828,7 @@ - if (xtty != NULL) xtty->tail("statistics"); - } - } +diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciMethod.cpp openjdk/hotspot/src/share/vm/ci/ciMethod.cpp +--- openjdk.orig/hotspot/src/share/vm/ci/ciMethod.cpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp 2009-03-19 14:32:38.000000000 +0000 +@@ -56,9 +56,9 @@ + _liveness = NULL; + _bcea = NULL; + _method_blocks = NULL; +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + _flow = NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + + if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) { + // 6328518 check hotswap conditions under the right lock. +@@ -124,9 +124,9 @@ + _bcea = NULL; + _method_blocks = NULL; + _method_data = NULL; +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + _flow = NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + } + + +@@ -294,34 +294,34 @@ + // ------------------------------------------------------------------ + // ciMethod::get_flow_analysis + ciTypeFlow* ciMethod::get_flow_analysis() { +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + if (_flow == NULL) { + ciEnv* env = CURRENT_ENV; + _flow = new (env->arena()) ciTypeFlow(env, this); + _flow->do_flow(); + } + return _flow; -#else // COMPILER2 +#else // COMPILER2 || SHARK - - - // Stubs for C1 only system. -@@ -1844,4 +1864,4 @@ - return buf; - } - --#endif // COMPILER2 -+#endif // COMPILER2 || SHARK ---- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig 2008-12-03 14:22:17.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2008-12-03 14:33:48.000000000 +0000 -@@ -22,7 +22,7 @@ - * - */ - --#if !defined(COMPILER1) && !defined(COMPILER2) -+#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK) - define_pd_global(bool, BackgroundCompilation, false); - define_pd_global(bool, UseTLAB, false); - define_pd_global(bool, CICompileOSR, false); ---- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/code/nmethod.hpp 2008-12-03 14:33:48.000000000 +0000 -@@ -318,6 +318,7 @@ - - bool is_compiled_by_c1() const; - bool is_compiled_by_c2() const; -+ bool is_compiled_by_shark() const; - - // boundaries for different parts - address code_begin () const { return _entry_point; } ---- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp 2008-12-03 14:33:48.000000000 +0000 + ShouldNotReachHere(); + return NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + } + + + // ------------------------------------------------------------------ + // ciMethod::get_osr_flow_analysis + ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) { +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + // OSR entry points are always place after a call bytecode of some sort + assert(osr_bci >= 0, "must supply valid OSR entry point"); + ciEnv* env = CURRENT_ENV; + ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci); + flow->do_flow(); + return flow; +-#else // COMPILER2 ++#else // COMPILER2 || SHARK + ShouldNotReachHere(); + return NULL; +-#endif // COMPILER2 ++#endif // COMPILER2 || SHARK + } + + // ------------------------------------------------------------------ +diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciMethod.hpp openjdk/hotspot/src/share/vm/ci/ciMethod.hpp +--- openjdk.orig/hotspot/src/share/vm/ci/ciMethod.hpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp 2009-03-19 14:32:38.000000000 +0000 +@@ -69,7 +69,7 @@ + + // Optional liveness analyzer. + MethodLiveness* _liveness; +-#ifdef COMPILER2 ++#if defined(COMPILER2) || defined(SHARK) + ciTypeFlow* _flow; + #endif + +diff -Nru openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp openjdk/hotspot/src/share/vm/code/nmethod.cpp +--- openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp 2009-03-19 14:32:38.000000000 +0000 @@ -65,6 +65,11 @@ assert(compiler() != NULL, "must be"); return compiler()->is_c2(); @@ -239,25 +149,20 @@ } else { tty->print("(nm) "); } ---- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp 2008-12-03 14:33:48.000000000 +0000 -@@ -554,6 +554,14 @@ - #endif - #endif // COMPILER2 - -+#ifdef SHARK -+#if defined(COMPILER1) || defined(COMPILER2) -+#error "Can't use COMPILER1 or COMPILER2 with shark" -+#endif -+ _compilers[0] = new SharkCompiler(); -+ _compilers[1] = _compilers[0]; -+#endif -+ - // Initialize the CompileTask free list - _task_free_list = NULL; - ---- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2008-12-03 14:33:48.000000000 +0000 +diff -Nru openjdk.orig/hotspot/src/share/vm/code/nmethod.hpp openjdk/hotspot/src/share/vm/code/nmethod.hpp +--- openjdk.orig/hotspot/src/share/vm/code/nmethod.hpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/code/nmethod.hpp 2009-03-19 14:32:38.000000000 +0000 +@@ -318,6 +318,7 @@ + + bool is_compiled_by_c1() const; + bool is_compiled_by_c2() const; ++ bool is_compiled_by_shark() const; + + // boundaries for different parts + address code_begin () const { return _entry_point; } +diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/abstractCompiler.hpp openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp +--- openjdk.orig/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2009-03-05 08:25:32.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2009-03-19 14:32:38.000000000 +0000 @@ -45,18 +45,26 @@ // Missing feature tests virtual bool supports_native() { return true; } @@ -286,112 +191,219 @@ #endif // TIERED // Customization ---- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp 2008-12-03 14:33:48.000000000 +0000 -@@ -69,7 +69,7 @@ - - // Optional liveness analyzer. - MethodLiveness* _liveness; --#ifdef COMPILER2 -+#if defined(COMPILER2) || defined(SHARK) - ciTypeFlow* _flow; - #endif - ---- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp 2008-12-03 14:33:48.000000000 +0000 -@@ -56,9 +56,9 @@ - _liveness = NULL; - _bcea = NULL; - _method_blocks = NULL; --#ifdef COMPILER2 -+#if defined(COMPILER2) || defined(SHARK) - _flow = NULL; --#endif // COMPILER2 -+#endif // COMPILER2 || SHARK - From ahughes at redhat.com Fri Mar 20 01:52:31 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 08:52:31 +0000 Subject: changeset in /hg/icedtea: Add ChangeLog for previous merge. Message-ID: changeset 3fbe290cdd66 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=3fbe290cdd66 description: Add ChangeLog for previous merge. diffstat: 1 file changed, 4 insertions(+) ChangeLog | 4 ++++ diffs (11 lines): diff -r 122e85e49878 -r 3fbe290cdd66 ChangeLog --- a/ChangeLog Mon Mar 09 12:36:47 2009 -0400 +++ b/ChangeLog Thu Mar 19 13:51:08 2009 +0000 @@ -1,3 +1,7 @@ 2009-03-07 Matthias Klose + + * Makefile.am: Updated visualvm to version 1.1.1. + 2009-03-07 Matthias Klose * patches/icedtea-version.patch: Identify as IcedTea when Cacao is used From ahughes at redhat.com Fri Mar 20 01:52:30 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 08:52:30 +0000 Subject: changeset in /hg/icedtea: Port CACAO version patch. Message-ID: changeset 74222c209012 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=74222c209012 description: Port CACAO version patch. 2009-03-07 Matthias Klose * patches/icedtea-version.patch: Identify as IcedTea when Cacao is used as JVM. diffstat: 2 files changed, 17 insertions(+), 4 deletions(-) ChangeLog | 5 ++++- patches/icedtea-version.patch | 16 +++++++++++++--- diffs (56 lines): diff -r bf30f173b8c9 -r 74222c209012 ChangeLog --- a/ChangeLog Thu Mar 19 12:08:46 2009 +0000 +++ b/ChangeLog Thu Mar 19 12:15:24 2009 +0000 @@ -1,9 +1,12 @@ 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-07 Matthias Klose + + * Makefile.am (icedtea.stamp, icedtea-debug.stamp): Create target dirs. + 2009-03-19 Andrew John Hughes * ChangeLog, diff -r bf30f173b8c9 -r 74222c209012 patches/icedtea-version.patch --- a/patches/icedtea-version.patch Thu Mar 19 12:08:46 2009 +0000 +++ b/patches/icedtea-version.patch Thu Mar 19 12:15:24 2009 +0000 @@ -25,14 +25,21 @@ diff -Nru openjdk.orig/jdk/make/common/s 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(")"); + } @@ -44,7 +51,10 @@ diff -Nru openjdk.orig/jdk/make/common/s + 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 ahughes at redhat.com Fri Mar 20 01:52:30 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 08:52:30 +0000 Subject: changeset in /hg/icedtea: Port doko's patch to create directories. Message-ID: changeset bf30f173b8c9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=bf30f173b8c9 description: Port doko's patch to create directories. 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. diffstat: 2 files changed, 14 insertions(+) ChangeLog | 6 ++++++ Makefile.am | 8 ++++++++ diffs (38 lines): diff -r 9fef463be301 -r bf30f173b8c9 ChangeLog --- a/ChangeLog Thu Mar 19 12:02:54 2009 +0000 +++ b/ChangeLog Thu Mar 19 12:08:46 2009 +0000 @@ -1,3 +1,9 @@ 2009-03-19 Andrew John Hughes + + * 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-19 Andrew John Hughes * ChangeLog, diff -r 9fef463be301 -r bf30f173b8c9 Makefile.am --- a/Makefile.am Thu Mar 19 12:02:54 2009 +0000 +++ b/Makefile.am Thu Mar 19 12:08:46 2009 +0000 @@ -2346,6 +2346,10 @@ stamps/icedtea.stamp: stamps/bootstrap-d $(ICEDTEA_ENV) \ -C openjdk/ \ $(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_PLUGIN cp -pPRf IcedTeaPlugin.so \ $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) @@ -2401,6 +2405,10 @@ stamps/icedtea-debug.stamp: stamps/boots $(ICEDTEA_ENV) \ -C openjdk/ \ $(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_PLUGIN cp -pPRf IcedTeaPlugin.so \ $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) From ahughes at redhat.com Fri Mar 20 01:52:30 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 20 Mar 2009 08:52:30 +0000 Subject: changeset in /hg/icedtea: Cleanup Shark merge duplication. Message-ID: changeset 9fef463be301 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9fef463be301 description: Cleanup Shark merge duplication. 2009-03-19 Andrew John Hughes * ChangeLog, * ports/hotspot/src/share/vm/includeDB_shark, * ports/hotspot/src/share/vm/shark/sharkFunction.cpp, * ports/hotspot/src/share/vm/shark/sharkState.cpp, * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp, * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp, * ports/hotspot/src/share/vm/shark/shark_globals.hpp: Cleanup Shark merge duplication. diffstat: 7 files changed, 11 insertions(+), 223 deletions(-) ChangeLog | 18 +- ports/hotspot/src/share/vm/includeDB_shark | 19 --- ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 59 --------- ports/hotspot/src/share/vm/shark/sharkState.cpp | 18 -- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 93 --------------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 23 --- ports/hotspot/src/share/vm/shark/shark_globals.hpp | 4 diffs (308 lines): diff -r ae9230c3f0c5 -r 9fef463be301 ChangeLog --- a/ChangeLog Fri Mar 13 09:55:22 2009 -0400 +++ b/ChangeLog Thu Mar 19 12:02:54 2009 +0000 @@ -1,3 +1,14 @@ 2009-03-13 Gary Benson + + * ChangeLog, + * ports/hotspot/src/share/vm/includeDB_shark, + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp, + * ports/hotspot/src/share/vm/shark/sharkState.cpp, + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp, + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp, + * ports/hotspot/src/share/vm/shark/shark_globals.hpp: + Cleanup Shark merge duplication. + 2009-03-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkValue.hpp @@ -254,13 +265,6 @@ 2009-03-09 Gary Benson 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 ae9230c3f0c5 -r 9fef463be301 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Mar 13 09:55:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Thu Mar 19 12:02:54 2009 +0000 @@ -27,24 +27,6 @@ #include "incls/_sharkState.cpp.incl" using namespace llvm; - -SharkState::SharkState(SharkBlock* block, - SharkFunction* function, - llvm::Value* method) - : _block(block), - _function(function), - _method(method) -{ - initialize(NULL); -} - -SharkState::SharkState(const SharkState* state) - : _block(state->block()), - _function(state->function()), - _method(state->method()) -{ - initialize(state); -} SharkState::SharkState(SharkBlock* block, SharkFunction* function, diff -r ae9230c3f0c5 -r 9fef463be301 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 13 09:55:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Mar 19 12:02:54 2009 +0000 @@ -121,99 +121,6 @@ int SharkTopLevelBlock::scan_for_traps() return TRAP_NO_TRAPS; } -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) { diff -r ae9230c3f0c5 -r 9fef463be301 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Mar 13 09:55:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Mar 19 12:02:54 2009 +0000 @@ -127,29 +127,6 @@ class SharkTopLevelBlock : public SharkB private: int scan_for_traps(); - // 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: bool _entered; diff -r ae9230c3f0c5 -r 9fef463be301 ports/hotspot/src/share/vm/shark/shark_globals.hpp --- a/ports/hotspot/src/share/vm/shark/shark_globals.hpp Fri Mar 13 09:55:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/shark_globals.hpp Thu Mar 19 12:02:54 2009 +0000 @@ -36,10 +36,6 @@ product(intx, SharkMaxInlineSize, 32, \ "Maximum bytecode size of methods to inline when using Shark") \ \ - /* inlining */ \ - product(intx, SharkMaxInlineSize, 32, \ - "Maximum bytecode size of methods to inline when using Shark") \ - \ /* compiler debugging */ \ develop(uintx, SharkStartAt, 0, \ "First method to consider when using Shark") \ From gbenson at redhat.com Fri Mar 20 01:52:29 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:29 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset ae9230c3f0c5 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ae9230c3f0c5 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. (transplanted from 96d1de001c8d45a4f4a2bb77d583db89dd2b6653) 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 ffdbfdce6b92 -r ae9230c3f0c5 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 ffdbfdce6b92 -r ae9230c3f0c5 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 ffdbfdce6b92 -r ae9230c3f0c5 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 ffdbfdce6b92 -r ae9230c3f0c5 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 ffdbfdce6b92 -r ae9230c3f0c5 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 ffdbfdce6b92 -r ae9230c3f0c5 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 @@ -173,11 +173,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 @@ -192,11 +195,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)); } } @@ -224,7 +230,7 @@ void SharkState::cache_after_Java_call(c From gbenson at redhat.com Fri Mar 20 01:52:28 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:28 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 96d1de001c8d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 20 01:52:27 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:27 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 5a1daec06e6d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 20 01:52:27 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:27 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 3ef3b5ede304 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 20 01:52:26 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:26 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 8ad9d28381c5 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 20 01:52:26 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:26 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 4d70fcddd403 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 20 01:52:25 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:25 +0000 Subject: changeset in /hg/icedtea: 2009-03-12 Gary Benson changeset 1caf618d2b4c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 gbenson at redhat.com Fri Mar 20 01:52:25 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:25 +0000 Subject: changeset in /hg/icedtea: 2009-03-12 Gary Benson changeset 832443ed76f7 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 doko at ubuntu.com Fri Mar 20 01:52:24 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:24 +0000 Subject: changeset in /hg/icedtea: 2009-03-11 Matthias Klose changeset 66f144a0dbee in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 doko at ubuntu.com Fri Mar 20 01:52:24 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:24 +0000 Subject: changeset in /hg/icedtea: 2009-03-11 Matthias Klose changeset 0040fb0dcaf8 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 gbenson at redhat.com Fri Mar 20 01:52:23 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:23 +0000 Subject: changeset in /hg/icedtea: 2009-03-11 Gary Benson changeset 1eeb14582f5a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 langel at redhat.com Fri Mar 20 01:52:23 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 20 Mar 2009 08:52:23 +0000 Subject: changeset in /hg/icedtea: 2009-03-09 Tomas Hurka changeset b7948732adf2 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 gbenson at redhat.com Fri Mar 20 01:52:22 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:22 +0000 Subject: changeset in /hg/icedtea: 2009-03-09 Gary Benson changeset a28649aea20f in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 doko at ubuntu.com Fri Mar 20 01:52:22 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:22 +0000 Subject: changeset in /hg/icedtea: 2009-03-07 Matthias Klose changeset a912ddc51c0f in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 doko at ubuntu.com Fri Mar 20 01:52:21 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:21 +0000 Subject: changeset in /hg/icedtea: 2009-03-07 Matthias Klose changeset fb6a59ff8005 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 gbenson at redhat.com Fri Mar 20 01:52:21 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:21 +0000 Subject: changeset in /hg/icedtea: 2009-03-06 Gary Benson changeset 8228a1d1008b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 doko at ubuntu.com Fri Mar 20 01:52:20 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:20 +0000 Subject: changeset in /hg/icedtea: 2009-03-06 Matthias Klose changeset 52cac9f018fd in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 doko at ubuntu.com Fri Mar 20 01:52:20 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:20 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Matthias Klose changeset 0507febca60d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 gbenson at redhat.com Fri Mar 20 01:52:19 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:19 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Gary Benson changeset f51dcb5de1a9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 gbenson at redhat.com Fri Mar 20 01:52:19 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:19 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Gary Benson changeset c5a65faa56e2 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?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 Fri Mar 20 01:52:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:18 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset ffdbfdce6b92 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ffdbfdce6b92 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. (transplanted from 5a1daec06e6d581f55e5ad7ce38f37a5b7c86d41) diffstat: 2 files changed, 22 insertions(+), 8 deletions(-) ChangeLog | 6 +++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 24 ++++++++++++++------- diffs (62 lines): diff -r f88af1647dad -r ffdbfdce6b92 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 f88af1647dad -r ffdbfdce6b92 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 20 01:52:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:18 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset f88af1647dad in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f88af1647dad 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. (transplanted from 3ef3b5ede304a1ecc4efc7cb8b0d06ebcbaef808) 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 1b78a216c47e -r f88af1647dad 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 1b78a216c47e -r f88af1647dad 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 @@ -69,18 +69,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 1b78a216c47e -r f88af1647dad 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 1b78a216c47e -r f88af1647dad 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 @@ -228,9 +228,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"); } } @@ -324,21 +326,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 @@ -506,7 +495,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); @@ -861,23 +850,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()) { @@ -888,11 +892,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() @@ -911,7 +920,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 1b78a216c47e -r f88af1647dad 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 @@ -211,6 +211,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 1b78a216c47e -r f88af1647dad 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 1b78a216c47e -r f88af1647dad 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 20 01:52:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:18 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 1b78a216c47e in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1b78a216c47e 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. (transplanted from 8ad9d28381c535b4c4a80aa08b14e7e556875ccf) 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 80257489410d -r 1b78a216c47e 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 80257489410d -r 1b78a216c47e 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 @@ -89,65 +89,6 @@ class SharkEntryState : public SharkStat } }; -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() { // Emit the entry point diff -r 80257489410d -r 1b78a216c47e 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 @@ -185,3 +185,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 80257489410d -r 1b78a216c47e 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 80257489410d -r 1b78a216c47e 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 20 01:52:16 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:16 +0000 Subject: changeset in /hg/icedtea: 2009-03-12 Gary Benson changeset 019ce4c19ba2 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=019ce4c19ba2 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. (transplanted from 832443ed76f7032e2e26d4453ce420cbd0c6d72d) diffstat: 2 files changed, 11 insertions(+) ChangeLog | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 5 +++++ diffs (28 lines): diff -r 5caf65dd9bd3 -r 019ce4c19ba2 ChangeLog --- a/ChangeLog Wed Mar 11 09:03:27 2009 -0400 +++ b/ChangeLog Thu Mar 12 07:08:14 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-11 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. + 2009-03-11 Gary Benson * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: New file. diff -r 5caf65dd9bd3 -r 019ce4c19ba2 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 11 09:03:27 2009 -0400 +++ 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 gbenson at redhat.com Fri Mar 20 01:52:17 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:17 +0000 Subject: changeset in /hg/icedtea: 2009-03-13 Gary Benson changeset 80257489410d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=80257489410d 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. (transplanted from 4d70fcddd403ee68d11dd3a61abb08def1aaef5b) 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 1c92b0f7c071 -r 80257489410d 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 1c92b0f7c071 -r 80257489410d 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 @@ -348,6 +348,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 1c92b0f7c071 -r 80257489410d 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: @@ -981,13 +979,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 1c92b0f7c071 -r 80257489410d 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 1c92b0f7c071 -r 80257489410d 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 20 01:52:17 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:17 +0000 Subject: changeset in /hg/icedtea: 2009-03-12 Gary Benson changeset 1c92b0f7c071 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1c92b0f7c071 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. (transplanted from 1caf618d2b4cf5fc2a58d3754526fa5db09b10ab) 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 019ce4c19ba2 -r 1c92b0f7c071 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 019ce4c19ba2 -r 1c92b0f7c071 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 @@ -75,6 +75,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 @@ -85,12 +88,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 @@ -104,6 +108,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 @@ -119,14 +124,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 @@ -168,12 +175,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 @@ -188,6 +196,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 @@ -201,6 +210,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 @@ -212,7 +222,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 @@ -225,7 +235,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 @@ -240,6 +250,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 @@ -247,6 +258,7 @@ sharkMonitor.cpp sharkMonitor.hpp allocation.hpp sharkMonitor.hpp llvmHeaders.hpp +sharkMonitor.hpp llvmValue.hpp sharkMonitor.hpp sharkBuilder.hpp sharkMonitor.hpp sharkFunction.hpp @@ -273,7 +285,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 @@ -301,6 +313,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 @@ -308,7 +321,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 @@ -321,7 +334,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 @@ -338,9 +351,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 019ce4c19ba2 -r 1c92b0f7c071 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 019ce4c19ba2 -r 1c92b0f7c071 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 019ce4c19ba2 -r 1c92b0f7c071 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 gbenson at redhat.com Fri Mar 20 01:52:16 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:16 +0000 Subject: changeset in /hg/icedtea: 2009-03-11 Gary Benson changeset 5caf65dd9bd3 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5caf65dd9bd3 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. (transplanted from 1eeb14582f5a679354df249e23e10b2f61b423e8) 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 5e454391b4ce -r 5caf65dd9bd3 ChangeLog --- a/ChangeLog Mon Mar 09 10:26:08 2009 -0400 +++ b/ChangeLog Wed Mar 11 09:03:27 2009 -0400 @@ -1,3 +1,86 @@ 2009-03-09 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 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 09 10:26:08 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Mar 11 09:03:27 2009 -0400 @@ -210,12 +210,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 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Mon Mar 09 10:26:08 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 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Mon Mar 09 10:26:08 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 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Mon Mar 09 10:26:08 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 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Mar 09 10:26:08 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Mar 11 09:03:27 2009 -0400 @@ -159,6 +159,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()); @@ -191,15 +200,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 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Mon Mar 09 10:26:08 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 5e454391b4ce -r 5caf65dd9bd3 ports/hotspot/src/share/vm/shark/sharkInliner.hpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.hpp Mon Mar 09 10:26:08 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 5e454391b4ce -r 5caf65dd9bd3 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 Fri Mar 20 01:52:15 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:15 +0000 Subject: changeset in /hg/icedtea: 2009-03-09 Gary Benson changeset 5e454391b4ce in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5e454391b4ce 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. (transplanted from a28649aea20fad5a814c3cd8d56b8ed704c7203b) diffstat: 2 files changed, 116 insertions(+) ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 93 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 23 +++ diffs (136 lines): diff -r 146e5d33e990 -r 5e454391b4ce ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 09 10:26:08 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 09 10:26:08 2009 -0400 @@ -236,6 +236,99 @@ int SharkTopLevelBlock::scan_for_traps() return TRAP_NO_TRAPS; } +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) { diff -r 146e5d33e990 -r 5e454391b4ce ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Mar 09 10:26:08 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Mar 09 10:26:08 2009 -0400 @@ -130,6 +130,29 @@ class SharkTopLevelBlock : public SharkB private: int scan_for_traps(); + // 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: bool _entered; From gbenson at redhat.com Fri Mar 20 01:52:15 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:15 +0000 Subject: changeset in /hg/icedtea: 2009-03-09 Gary Benson changeset 146e5d33e990 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=146e5d33e990 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. (transplanted from a28649aea20fad5a814c3cd8d56b8ed704c7203b) 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 f7efa3c95c17 -r 146e5d33e990 ChangeLog --- a/ChangeLog Fri Mar 06 09:47:04 2009 -0500 +++ b/ChangeLog Mon Mar 09 10:26:08 2009 -0400 @@ -1,3 +1,40 @@ 2009-03-06 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-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp diff -r f7efa3c95c17 -r 146e5d33e990 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Fri Mar 06 09:47:04 2009 -0500 +++ b/ports/hotspot/src/share/vm/includeDB_shark Mon Mar 09 10:26:08 2009 -0400 @@ -171,7 +171,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 @@ -285,6 +284,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 f7efa3c95c17 -r 146e5d33e990 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Mar 06 09:47:04 2009 -0500 +++ 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 f7efa3c95c17 -r 146e5d33e990 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Fri Mar 06 09:47:04 2009 -0500 +++ 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 f7efa3c95c17 -r 146e5d33e990 ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Fri Mar 06 09:47:04 2009 -0500 +++ 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 f7efa3c95c17 -r 146e5d33e990 ports/hotspot/src/share/vm/shark/sharkRuntime.hpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Fri Mar 06 09:47:04 2009 -0500 +++ 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 f7efa3c95c17 -r 146e5d33e990 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Mar 06 09:47:04 2009 -0500 +++ 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 Fri Mar 20 01:52:14 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:14 +0000 Subject: changeset in /hg/icedtea: 2009-03-06 Gary Benson changeset f7efa3c95c17 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f7efa3c95c17 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. (transplanted from 8228a1d1008b4094350ae4a34e23b555eb5832e8) 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 88cbabc76b89 -r f7efa3c95c17 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 88cbabc76b89 -r f7efa3c95c17 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 sharkBlock.cpp debug.hpp sharkBlock.cpp bytecodes.hpp @@ -100,6 +81,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 @@ -131,171 +308,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 88cbabc76b89 -r f7efa3c95c17 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 88cbabc76b89 -r f7efa3c95c17 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 doko at ubuntu.com Fri Mar 20 01:52:14 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 20 Mar 2009 08:52:14 +0000 Subject: changeset in /hg/icedtea: 2009-03-06 Matthias Klose changeset 88cbabc76b89 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=88cbabc76b89 description: 2009-03-06 Matthias Klose * Makefile.am (check-*): Pass $(ICEDTEA_JTREG_OPTIONS), unset by default. (transplanted from 52cac9f018fd629e23158f859409691e02de2dfd) diffstat: 2 files changed, 8 insertions(+) ChangeLog | 5 +++++ Makefile.am | 3 +++ diffs (39 lines): diff -r c015d541246a -r 88cbabc76b89 ChangeLog --- a/ChangeLog Thu Mar 05 09:14:30 2009 -0500 +++ b/ChangeLog Fri Mar 06 11:33:48 2009 +0100 @@ -1,3 +1,8 @@ 2009-03-19 Andrew John Hughes + + * Makefile.am (check-*): Pass $(ICEDTEA_JTREG_OPTIONS), unset + by default. + 2009-03-19 Andrew John Hughes * Makefile.am: diff -r c015d541246a -r 88cbabc76b89 Makefile.am --- a/Makefile.am Thu Mar 05 09:14:30 2009 -0500 +++ b/Makefile.am Fri Mar 06 11:33:48 2009 +0100 @@ -2918,6 +2918,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 @@ -2926,6 +2927,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) \ -exclude:$(abs_top_srcdir)/test/jtreg/excludelist.langtools.jtx \ `pwd`/openjdk/langtools/test \ | tee test/$@.log @@ -2935,6 +2937,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) \ -exclude:$(abs_top_srcdir)/test/jtreg/excludelist.jdk.jtx \ `pwd`/openjdk/jdk/test \ | tee test/$@.log From gbenson at redhat.com Fri Mar 20 01:52:13 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:13 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Gary Benson changeset c015d541246a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=c015d541246a 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. (transplanted from f51dcb5de1a9abe8f6ada04de2b73659bb1abf35) 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 (195 lines): diff -r 6cb81042d68c -r c015d541246a ChangeLog --- a/ChangeLog Thu Mar 05 13:44:56 2009 +0000 +++ b/ChangeLog Thu Mar 05 09:14:30 2009 -0500 @@ -489,6 +489,20 @@ 2009-03-06 Andrew John Hughes + + * 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 diff -r 6cb81042d68c -r c015d541246a 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 6cb81042d68c -r c015d541246a 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 6cb81042d68c -r c015d541246a 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 gbenson at redhat.com Fri Mar 20 01:52:13 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 20 Mar 2009 08:52:13 +0000 Subject: changeset in /hg/icedtea: 2009-03-05 Gary Benson changeset 6cb81042d68c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6cb81042d68c 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. (transplanted from c5a65faa56e25214fb227cdf2eeaf5b195426052) 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 (101 lines): diff -r 017b63ad6962 -r 6cb81042d68c ChangeLog --- a/ChangeLog Thu Mar 19 10:20:51 2009 +0000 +++ b/ChangeLog Thu Mar 05 13:44:56 2009 +0000 @@ -489,6 +489,16 @@ 2009-03-06 Andrew John Hughes + + * 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 diff -r 017b63ad6962 -r 6cb81042d68c patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Thu Mar 19 10:20:51 2009 +0000 +++ b/patches/hotspot/default/icedtea-shark.patch Thu Mar 05 13:44:56 2009 +0000 @@ -364,3 +364,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 017b63ad6962 -r 6cb81042d68c ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Thu Mar 19 10:20:51 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 017b63ad6962 -r 6cb81042d68c ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp Thu Mar 19 10:20:51 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 bugzilla-daemon at icedtea.classpath.org Thu Mar 19 23:24:42 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 20 Mar 2009 06:24:42 +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 #5 from nikita.manovich at gmail.com 2009-03-20 06:24 ------- PyDev 1.4.4.2636 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Mar 19 23:20:47 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 20 Mar 2009 06:20:47 +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 #4 from nikita.manovich at gmail.com 2009-03-20 06:20 ------- nikita at dhcppc1:~> rpm -qa | grep java java-1_6_0-openjdk-1.2_b11-22.12 java-1_6_0-openjdk-plugin-1.2_b11-22.12 java-1_5_0-gcj-compat-1.5.0.0-56.58 timezone-java-2008h-2.16 nikita at dhcppc1:~> rpm -qa | grep python-2 python-2.6.0-2.21.1 gimp-plugins-python-2.6.2-2.16 libxml2-python-2.7.1-9.1 >From about: Eclipse Platform Version: 3.4.2 Build id: M20090211-1700 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Mar 19 23:20:10 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 20 Mar 2009 06:20:10 +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 #3 from nikita.manovich at gmail.com 2009-03-20 06:20 ------- nikita at dhcppc1:~> rpm -qa | grep java java-1_6_0-openjdk-1.2_b11-22.12 java-1_6_0-openjdk-plugin-1.2_b11-22.12 java-1_5_0-gcj-compat-1.5.0.0-56.58 timezone-java-2008h-2.16 nikita at dhcppc1:~> rpm -qa | grep python-2 python-2.6.0-2.21.1 gimp-plugins-python-2.6.2-2.16 libxml2-python-2.7.1-9.1 >From about: Eclipse Platform Version: 3.4.2 Build id: M20090211-1700 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Mar 19 13:56:01 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 19 Mar 2009 20:56:01 +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 #2 from omajid at redhat.com 2009-03-19 20:56 ------- I cant reproduce this on my system (fedora 10). Could provide more information? My package versions: java-1.6.0-openjdk-1.6.0.0-9.b14.fc10.i386 eclipse-pydev-1.4.2-1.fc10.i386 python-2.5.2-1.fc10.i386 -- 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 21 02:13:53 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 21 Mar 2009 09:13:53 +0000 Subject: changeset in /hg/icedtea6: 2009-03-21 Matthias Klose changeset 371412771066 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=371412771066 description: 2009-03-21 Matthias Klose * patches/hotspot/*/icedtea-text-relocations.patch: Build hotspot with -fPIC on alpha. diffstat: 3 files changed, 7 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ patches/hotspot/default/icedtea-text-relocations.patch | 2 +- patches/hotspot/original/icedtea-text-relocations.patch | 2 +- diffs (36 lines): diff -r 367b143c4238 -r 371412771066 ChangeLog --- a/ChangeLog Fri Mar 20 11:21:59 2009 -0400 +++ b/ChangeLog Sat Mar 21 10:10:02 2009 +0100 @@ -1,3 +1,8 @@ 2009-03-21 Lillian Angel + + * patches/hotspot/*/icedtea-text-relocations.patch: Build hotspot + with -fPIC on alpha. + 2009-03-21 Lillian Angel * patches/icedtea-lcms.patch: New patch. diff -r 367b143c4238 -r 371412771066 patches/hotspot/default/icedtea-text-relocations.patch --- a/patches/hotspot/default/icedtea-text-relocations.patch Fri Mar 20 11:21:59 2009 -0400 +++ b/patches/hotspot/default/icedtea-text-relocations.patch Sat Mar 21 10:10:02 2009 +0100 @@ -5,7 +5,7 @@ diff -Nru openjdk.orig/hotspot/make/linu # Compiler flags # position-independent code -+ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) ++ifneq ($(filter alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) PICFLAG = -fPIC +else +PICFLAG = -fpic diff -r 367b143c4238 -r 371412771066 patches/hotspot/original/icedtea-text-relocations.patch --- a/patches/hotspot/original/icedtea-text-relocations.patch Fri Mar 20 11:21:59 2009 -0400 +++ b/patches/hotspot/original/icedtea-text-relocations.patch Sat Mar 21 10:10:02 2009 +0100 @@ -4,7 +4,7 @@ # Compiler flags # position-independent code -+ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64,$(ZERO_LIBARCH)),) ++ifneq ($(filter alpha parisc ppc ppc64 s390 s390x sparc sparc64,$(ZERO_LIBARCH)),) PICFLAG = -fPIC +else +PICFLAG = -fpic From bugzilla-daemon at icedtea.classpath.org Sun Mar 22 15:16:58 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 22 Mar 2009 22:16:58 +0000 Subject: [Bug 308] New: run scilab 5.1 demos at openSUSE11.1 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=308 Summary: run scilab 5.1 demos at openSUSE11.1 Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: klauspeter.escher at gmx.de OS: openSUSE11.1 OS:openSUSE 11.1 (x86_64) SW-Application: scilab 5.1 Problem: start scilab, and run demo plot3d (for example) but this is a valid issue for all other demos which are available in scilab 5.1 help Report: ======= VM Arguments: jvm_args: -Djava.library.path= -Djava.compiler=JIT -Xmx256m java_command: Launcher Type: generic Environment Variables: JAVA_HOME=/etc/alternatives/jre JRE_HOME=/etc/alternatives/jre PATH=/usr/share/scilab/:/usr/share/scilab//bin:/usr/bin:/home/Escher/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin LD_LIBRARY_PATH=/usr/lib/scilab/:/usr/lib64/scilab/:/etc/alternatives/jre/lib/amd64/:/etc/alternatives/jre/lib/amd64/server/:/etc/alternatives/jre/lib/amd64/native_threads/: SHELL=/bin/bash DISPLAY=:0.0 HOSTTYPE=x86_64 OSTYPE=linux MACHTYPE=x86_64-suse-linux Signal Handlers: SIGSEGV: [libjvm.so+0x671790], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x671790], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x54bca0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: SIG_IGN, sa_mask[0]=0x00001000, sa_flags=0x10000000 SIGXFSZ: [libjvm.so+0x54bca0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x54bca0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x54b3d0], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x54d850], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: [libscicore.so.5+0x2a720], sa_mask[0]=0x00000002, sa_flags=0x10000000 SIGTERM: [libjvm.so+0x54d850], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x54d850], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:openSUSE 11.1 (x86_64) VERSION = 11.1 uname:Linux 2.6.27.19-3.2-default #1 SMP 2009-02-25 15:40:44 +0100 x86_64 libc:glibc 2.9 NPTL 2.9 rlimit: STACK 8192k, CORE 0k, NPROC 36864, NOFILE 8192, AS 4719200k load average:1.39 0.76 0.57 CPU:total 4 (4 cores per cpu, 1 threads per core) family 16 model 2 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, mmxext, 3dnow, 3dnowext, sse4a Memory: 4k page, physical 3794452k(1584624k free), swap 2104472k(2104472k free) vm_info: OpenJDK 64-Bit Server VM (14.0-b08) for linux-amd64 JRE (1.6.0_0-b14), built on Mar 12 2009 21:11:17 by "abuild" with gcc 4.3.2 [gcc-4_3-branch revision 141291] time: Sun Mar 22 22:53:17 2009 elapsed time: 48 seconds -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Sun Mar 22 15:20:18 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 22 Mar 2009 22:20:18 +0000 Subject: [Bug 308] run scilab 5.1 demos at openSUSE11.1 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=308 ------- Comment #1 from klauspeter.escher at gmx.de 2009-03-22 22:20 ------- Created an attachment (id=174) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=174&action=view) error log of problemdescription Bug 308 -- 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 Sun Mar 22 15:21:33 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 22 Mar 2009 22:21:33 +0000 Subject: [Bug 308] run scilab 5.1 demos at openSUSE11.1 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=308 ------- Comment #2 from klauspeter.escher at gmx.de 2009-03-22 22:21 ------- Created an attachment (id=175) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=175&action=view) 2nd error log of bug 308 -- 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 Mon Mar 23 06:35:20 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 23 Mar 2009 13:35:20 +0000 Subject: changeset in /hg/icedtea6: 2009-03-23 Gary Benson changeset 62a746a17ffa in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=62a746a17ffa description: 2009-03-23 Gary Benson * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: (SharkFunction::_deferred_zero_checks): New field. (SharkFunction::deferred_zero_checks): New method. (SharkFunction::add_deferred_zero_check): Likewise. (SharkFunction::do_deferred_zero_checks): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: (SharkFunction::DeferredZeroCheck): New class. (SharkFunction::add_deferred_zero_check): New method. (SharkFunction::do_deferred_zero_checks): Likewise. (SharkFunction::initialize): Do deferred zero checks after parsing blocks. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkBlock::zero_check_value): New method. (SharkBlock::do_deferred_zero_check): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkBlock::do_zero_check): Defer ambiguous zero checks. (SharkBlock::zero_check_value): New method. (SharkBlock::do_deferred_zero_check): Likewise. (SharkTopLevelBlock::handle_exception): Don't copy state. (SharkTopLevelBlock::do_if): Likewise. (SharkTopLevelBlock::do_switch): Likewise. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkPHIValue): New class. (SharkValue::is_phi): New method. (SharkValue::as_phi): Likewise. (SharkValue::create_phi): Likewise. (SharkValue::merge): Likewise. (SharkNormalValue::merge): Likewise. (SharkAddressValue::merge): Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkPHIState::SharkPHIState): Create SharkPHIValues. (SharkState::merge): Defer to SharkValue::merge. diffstat: 8 files changed, 400 insertions(+), 117 deletions(-) ChangeLog | 38 +++ ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 78 ++++++ ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 37 ++- ports/hotspot/src/share/vm/shark/sharkState.cpp | 57 +--- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 57 +++- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 12 - ports/hotspot/src/share/vm/shark/sharkValue.cpp | 65 +++++ ports/hotspot/src/share/vm/shark/sharkValue.hpp | 173 +++++++++++---- diffs (truncated from 756 to 500 lines): diff -r 371412771066 -r 62a746a17ffa ChangeLog --- a/ChangeLog Sat Mar 21 10:10:02 2009 +0100 +++ b/ChangeLog Mon Mar 23 09:33:31 2009 -0400 @@ -1,3 +1,41 @@ 2009-03-21 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: + (SharkFunction::_deferred_zero_checks): New field. + (SharkFunction::deferred_zero_checks): New method. + (SharkFunction::add_deferred_zero_check): Likewise. + (SharkFunction::do_deferred_zero_checks): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: + (SharkFunction::DeferredZeroCheck): New class. + (SharkFunction::add_deferred_zero_check): New method. + (SharkFunction::do_deferred_zero_checks): Likewise. + (SharkFunction::initialize): Do deferred zero checks + after parsing blocks. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkBlock::zero_check_value): New method. + (SharkBlock::do_deferred_zero_check): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkBlock::do_zero_check): Defer ambiguous zero checks. + (SharkBlock::zero_check_value): New method. + (SharkBlock::do_deferred_zero_check): Likewise. + (SharkTopLevelBlock::handle_exception): Don't copy state. + (SharkTopLevelBlock::do_if): Likewise. + (SharkTopLevelBlock::do_switch): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkPHIValue): New class. + (SharkValue::is_phi): New method. + (SharkValue::as_phi): Likewise. + (SharkValue::create_phi): Likewise. + (SharkValue::merge): Likewise. + (SharkNormalValue::merge): Likewise. + (SharkAddressValue::merge): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkPHIState::SharkPHIState): Create SharkPHIValues. + (SharkState::merge): Defer to SharkValue::merge. + 2009-03-21 Matthias Klose * patches/hotspot/*/icedtea-text-relocations.patch: Build hotspot diff -r 371412771066 -r 62a746a17ffa ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Mar 23 09:33:31 2009 -0400 @@ -123,6 +123,7 @@ void SharkFunction::initialize() block(i)->emit_IR(); } + do_deferred_zero_checks(); // Dump the bitcode, if requested if (SharkPrintBitcodeOf != NULL) { @@ -307,3 +308,80 @@ SharkMonitor* SharkFunction::monitor(Val this, builder()->CreateGEP(monitors_slots(), indexes, indexes + 2)); } + +class DeferredZeroCheck : public ResourceObj { + public: + DeferredZeroCheck(SharkTopLevelBlock* block, SharkValue* value) + : _block(block), + _value(value), + _bci(block->bci()), + _state(block->current_state()->copy()), + _check_block(builder()->GetInsertBlock()), + _continue_block(function()->CreateBlock("not_zero")) + { + builder()->SetInsertPoint(continue_block()); + } + + private: + SharkTopLevelBlock* _block; + SharkValue* _value; + int _bci; + SharkState* _state; + BasicBlock* _check_block; + BasicBlock* _continue_block; + + public: + SharkTopLevelBlock* block() const + { + return _block; + } + SharkValue* value() const + { + return _value; + } + int bci() const + { + return _bci; + } + SharkState* state() const + { + return _state; + } + BasicBlock* check_block() const + { + return _check_block; + } + BasicBlock* continue_block() const + { + return _continue_block; + } + + public: + SharkBuilder* builder() const + { + return block()->builder(); + } + SharkFunction* function() const + { + return block()->function(); + } + + public: + void process() const + { + builder()->SetInsertPoint(check_block()); + block()->do_deferred_zero_check(value(), bci(), state(), continue_block()); + } +}; + +void SharkFunction::add_deferred_zero_check(SharkTopLevelBlock* block, + SharkValue* value) +{ + deferred_zero_checks()->append(new DeferredZeroCheck(block, value)); +} + +void SharkFunction::do_deferred_zero_checks() +{ + for (int i = 0; i < deferred_zero_checks()->length(); i++) + deferred_zero_checks()->at(i)->process(); +} diff -r 371412771066 -r 62a746a17ffa ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Mon Mar 23 09:33:31 2009 -0400 @@ -23,8 +23,10 @@ * */ +class SharkMonitor; class SharkTopLevelBlock; -class SharkMonitor; + +class DeferredZeroCheck; class SharkFunction : public StackObj { public: @@ -44,16 +46,17 @@ class SharkFunction : public StackObj { void initialize(); private: - SharkCompiler* _compiler; - const char* _name; - ciTypeFlow* _flow; - ciBytecodeStream* _iter; - MacroAssembler* _masm; - llvm::Function* _function; - SharkTopLevelBlock** _blocks; - llvm::Value* _base_pc; - llvm::Value* _thread; - int _monitor_count; + SharkCompiler* _compiler; + const char* _name; + ciTypeFlow* _flow; + ciBytecodeStream* _iter; + MacroAssembler* _masm; + llvm::Function* _function; + SharkTopLevelBlock** _blocks; + llvm::Value* _base_pc; + llvm::Value* _thread; + int _monitor_count; + GrowableArray _deferred_zero_checks; public: SharkCompiler* compiler() const @@ -95,6 +98,10 @@ class SharkFunction : public StackObj { int monitor_count() const { return _monitor_count; + } + GrowableArray* deferred_zero_checks() + { + return &_deferred_zero_checks; } public: @@ -333,4 +340,12 @@ class SharkFunction : public StackObj { builder()->CreateStore(LLVMValue::null(), addr); return result; } + + // Deferred zero checks + public: + void add_deferred_zero_check(SharkTopLevelBlock* block, + SharkValue* value); + + private: + void do_deferred_zero_checks(); }; diff -r 371412771066 -r 62a746a17ffa ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Mon Mar 23 09:33:31 2009 -0400 @@ -130,14 +130,11 @@ void SharkState::merge(SharkState* other BasicBlock* other_block, BasicBlock* this_block) { - PHINode *phi; - char name[18]; - // Method Value *this_method = this->method(); Value *other_method = other->method(); if (this_method != other_method) { - phi = builder()->CreatePHI(SharkType::methodOop_type(), "method"); + PHINode *phi = builder()->CreatePHI(SharkType::methodOop_type(), "method"); phi->addIncoming(this_method, this_block); phi->addIncoming(other_method, other_block); set_method(phi); @@ -149,20 +146,12 @@ void SharkState::merge(SharkState* other SharkValue *this_value = this->local(i); SharkValue *other_value = other->local(i); assert((this_value == NULL) == (other_value == NULL), "should be"); - if (this_value == other_value) - continue; - - 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, this_checked)); + if (this_value != NULL) { + char name[18]; + snprintf(name, sizeof(name), "local_%d_", i); + set_local(i, this_value->merge( + builder(), other_value, other_block, this_block, name)); + } } // Expression stack @@ -171,20 +160,12 @@ void SharkState::merge(SharkState* other SharkValue *this_value = this->stack(i); SharkValue *other_value = other->stack(i); assert((this_value == NULL) == (other_value == NULL), "should be"); - if (this_value == other_value) - continue; - - 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, this_checked)); + if (this_value != NULL) { + char name[18]; + snprintf(name, sizeof(name), "stack_%d_", i); + set_stack(i, this_value->merge( + builder(), other_value, other_block, this_block, name)); + } } } @@ -315,10 +296,8 @@ SharkPHIState::SharkPHIState(SharkTopLev 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), - false); + value = SharkValue::create_phi( + type, builder()->CreatePHI(SharkType::to_stackType(type), name)); break; case T_ADDRESS: @@ -355,10 +334,8 @@ SharkPHIState::SharkPHIState(SharkTopLev 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), - false); + value = SharkValue::create_phi( + type, builder()->CreatePHI(SharkType::to_stackType(type), name)); break; case T_ADDRESS: diff -r 371412771066 -r 62a746a17ffa ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 23 09:33:31 2009 -0400 @@ -250,8 +250,40 @@ SharkTopLevelBlock* SharkTopLevelBlock:: void SharkTopLevelBlock::do_zero_check(SharkValue *value) { - BasicBlock *zero = function()->CreateBlock("zero"); - BasicBlock *not_zero = function()->CreateBlock("not_zero"); + if (value->is_phi() && value->as_phi()->all_incomers_zero_checked()) { + function()->add_deferred_zero_check(this, value); + } + else { + BasicBlock *continue_block = function()->CreateBlock("not_zero"); + SharkState *saved_state = current_state(); + set_current_state(saved_state->copy()); + zero_check_value(value, continue_block); + builder()->SetInsertPoint(continue_block); + set_current_state(saved_state); + } + + value->set_zero_checked(true); +} + +void SharkTopLevelBlock::do_deferred_zero_check(SharkValue* value, + int bci, + SharkState* saved_state, + BasicBlock* continue_block) +{ + if (value->as_phi()->all_incomers_zero_checked()) { + builder()->CreateBr(continue_block); + } + else { + iter()->force_bci(start()); + set_current_state(saved_state); + zero_check_value(value, continue_block); + } +} + +void SharkTopLevelBlock::zero_check_value(SharkValue* value, + BasicBlock* continue_block) +{ + BasicBlock *zero_block = builder()->CreateBlock(continue_block, "zero"); Value *a, *b; switch (value->basic_type()) { @@ -276,10 +308,10 @@ void SharkTopLevelBlock::do_zero_check(S ShouldNotReachHere(); } - builder()->CreateCondBr(builder()->CreateICmpNE(a, b), not_zero, zero); - - builder()->SetInsertPoint(zero); - SharkState *saved_state = current_state()->copy(); + builder()->CreateCondBr( + builder()->CreateICmpNE(a, b), continue_block, zero_block); + + builder()->SetInsertPoint(zero_block); if (value->is_jobject()) { call_vm_nocheck( SharkRuntime::throw_NullPointerException(), @@ -290,11 +322,6 @@ void SharkTopLevelBlock::do_zero_check(S builder()->CreateUnimplemented(__FILE__, __LINE__); } handle_exception(function()->CreateGetPendingException()); - set_current_state(saved_state); - - builder()->SetInsertPoint(not_zero); - - value->set_zero_checked(true); } void SharkTopLevelBlock::check_bounds(SharkValue* array, SharkValue* index) @@ -402,7 +429,7 @@ void SharkTopLevelBlock::handle_exceptio LLVMValue::jint_constant(i), handler->entry_block()); - handler->add_incoming(current_state()->copy()); + handler->add_incoming(current_state()); } builder()->SetInsertPoint(no_handler); @@ -776,8 +803,6 @@ void SharkTopLevelBlock::do_ret() // 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) { @@ -808,7 +833,7 @@ void SharkTopLevelBlock::do_if(ICmpInst: if_taken->entry_block(), not_taken->entry_block()); if_taken->add_incoming(current_state()); - not_taken->add_incoming(current_state()->copy()); + not_taken->add_incoming(current_state()); } void SharkTopLevelBlock::do_switch() @@ -827,7 +852,7 @@ void SharkTopLevelBlock::do_switch() switchinst->addCase( LLVMValue::jint_constant(switch_key(i)), dest_block->entry_block()); - dest_block->add_incoming(current_state()->copy()); + dest_block->add_incoming(current_state()); } } } diff -r 371412771066 -r 62a746a17ffa ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Mar 23 09:33:31 2009 -0400 @@ -185,10 +185,20 @@ class SharkTopLevelBlock : public SharkB // Helpers private: - void do_zero_check(SharkValue* value); llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); void do_branch(int successor_index); + + // Zero checks + private: + void do_zero_check(SharkValue* value); + void zero_check_value(SharkValue* value, llvm::BasicBlock* continue_block); + + public: + void do_deferred_zero_check(SharkValue* value, + int bci, + SharkState* saved_state, + llvm::BasicBlock* continue_block); // VM calls private: diff -r 371412771066 -r 62a746a17ffa ports/hotspot/src/share/vm/shark/sharkValue.cpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.cpp Mon Mar 23 09:33:31 2009 -0400 @@ -34,9 +34,32 @@ SharkValue* SharkNormalValue::clone() co { return SharkValue::create_generic(type(), generic_value(), zero_checked()); } +SharkValue* SharkPHIValue::clone() const +{ + return SharkValue::create_phi(type(), (PHINode *) generic_value(), this); +} SharkValue* SharkAddressValue::clone() const { return SharkValue::address_constant(address_value()); +} + +// Casting + +bool SharkValue::is_phi() const +{ + return false; +} +bool SharkPHIValue::is_phi() const +{ + return true; +} +SharkPHIValue* SharkValue::as_phi() +{ + ShouldNotCallThis(); +} +SharkPHIValue* SharkPHIValue::as_phi() +{ + return this; } // Comparison @@ -225,19 +248,51 @@ Value* SharkNormalValue::intptr_value(Sh 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"); +// Phi-style stuff for SharkPHIState::add_incoming + +void SharkValue::addIncoming(SharkValue *value, BasicBlock* block) +{ + ShouldNotCallThis(); +} +void SharkPHIValue::addIncoming(SharkValue *value, BasicBlock* block) +{ + assert(!is_clone(), "shouldn't be"); ((llvm::PHINode *) generic_value())->addIncoming( value->generic_value(), block); + if (!value->zero_checked()) + _all_incomers_zero_checked = false; } void SharkAddressValue::addIncoming(SharkValue *value, BasicBlock* block) { assert(this->equal_to(value), "should be"); } From gbenson at redhat.com Mon Mar 23 06:39:36 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 23 Mar 2009 13:39:36 +0000 Subject: More zero-check eliminator improvements Message-ID: <20090323133936.GA5197@redhat.com> Hi all, This patch allows Shark's zero-check eliminator to eliminate checks through phid states. Previously, zero-checked status was lost whenever the flow passed through a phi, meaning checks were performed unnecessarily. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 052feb41dea9 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Tue Mar 17 13:49:28 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Mon Mar 23 09:27:43 2009 +0000 @@ -149,30 +149,31 @@ SharkValue *this_value = this->local(i); SharkValue *other_value = other->local(i); assert((this_value == NULL) == (other_value == NULL), "should be"); - if (this_value == other_value) - continue; + set_local(i, this_value->merge(other_value)); +// if (this_value == other_value) +// continue; - if (this_value->is_address()) { - assert(other_value->is_address(), "should be"); +// if (this_value->is_address()) { +// assert(other_value->is_address(), "should be"); - int bci = this_value->address_value(); - assert(bci == other_value->address_value(), "should be"); +// int bci = this_value->address_value(); +// assert(bci == other_value->address_value(), "should be"); - set_local(i, SharkValue::address_constant(bci)); - } - else { - ciType *this_type = this_value->type(); - assert(this_type == other_value->type(), "should be"); +// set_local(i, SharkValue::address_constant(bci)); +// } +// else { +// 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"); +// 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, this_checked)); - } +// 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, this_checked)); +// } } // Expression stack @@ -181,30 +182,7 @@ SharkValue *this_value = this->stack(i); SharkValue *other_value = other->stack(i); assert((this_value == NULL) == (other_value == NULL), "should be"); - if (this_value == other_value) - continue; - - if (this_value->is_address()) { - assert(other_value->is_address(), "should be"); - - int bci = this_value->address_value(); - assert(bci == other_value->address_value(), "should be"); - - set_stack(i, SharkValue::address_constant(bci)); - } - else { - 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, this_checked)); - } + set_stack(i, this_value->merge(other_value)); } } From gbenson at redhat.com Mon Mar 23 06:43:10 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 23 Mar 2009 13:43:10 +0000 Subject: More zero-check eliminator improvements In-Reply-To: <20090323133936.GA5197@redhat.com> References: <20090323133936.GA5197@redhat.com> Message-ID: <20090323134310.GB5197@redhat.com> Gary Benson wrote: > This patch allows Shark's zero-check eliminator to eliminate checks > through phid states. Previously, zero-checked status was lost > whenever the flow passed through a phi, meaning checks were > performed unnecessarily. *This* patch. Not the other one... Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 371412771066 ChangeLog --- a/ChangeLog Sat Mar 21 10:10:02 2009 +0100 +++ b/ChangeLog Mon Mar 23 09:33:03 2009 -0400 @@ -1,3 +1,41 @@ +2009-03-23 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: + (SharkFunction::_deferred_zero_checks): New field. + (SharkFunction::deferred_zero_checks): New method. + (SharkFunction::add_deferred_zero_check): Likewise. + (SharkFunction::do_deferred_zero_checks): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp: + (SharkFunction::DeferredZeroCheck): New class. + (SharkFunction::add_deferred_zero_check): New method. + (SharkFunction::do_deferred_zero_checks): Likewise. + (SharkFunction::initialize): Do deferred zero checks + after parsing blocks. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkBlock::zero_check_value): New method. + (SharkBlock::do_deferred_zero_check): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkBlock::do_zero_check): Defer ambiguous zero checks. + (SharkBlock::zero_check_value): New method. + (SharkBlock::do_deferred_zero_check): Likewise. + (SharkTopLevelBlock::handle_exception): Don't copy state. + (SharkTopLevelBlock::do_if): Likewise. + (SharkTopLevelBlock::do_switch): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkPHIValue): New class. + (SharkValue::is_phi): New method. + (SharkValue::as_phi): Likewise. + (SharkValue::create_phi): Likewise. + (SharkValue::merge): Likewise. + (SharkNormalValue::merge): Likewise. + (SharkAddressValue::merge): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkPHIState::SharkPHIState): Create SharkPHIValues. + (SharkState::merge): Defer to SharkValue::merge. + 2009-03-21 Matthias Klose * patches/hotspot/*/icedtea-text-relocations.patch: Build hotspot diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Mon Mar 23 09:33:03 2009 -0400 @@ -123,6 +123,7 @@ block(i)->emit_IR(); } + do_deferred_zero_checks(); // Dump the bitcode, if requested if (SharkPrintBitcodeOf != NULL) { @@ -307,3 +308,80 @@ this, builder()->CreateGEP(monitors_slots(), indexes, indexes + 2)); } + +class DeferredZeroCheck : public ResourceObj { + public: + DeferredZeroCheck(SharkTopLevelBlock* block, SharkValue* value) + : _block(block), + _value(value), + _bci(block->bci()), + _state(block->current_state()->copy()), + _check_block(builder()->GetInsertBlock()), + _continue_block(function()->CreateBlock("not_zero")) + { + builder()->SetInsertPoint(continue_block()); + } + + private: + SharkTopLevelBlock* _block; + SharkValue* _value; + int _bci; + SharkState* _state; + BasicBlock* _check_block; + BasicBlock* _continue_block; + + public: + SharkTopLevelBlock* block() const + { + return _block; + } + SharkValue* value() const + { + return _value; + } + int bci() const + { + return _bci; + } + SharkState* state() const + { + return _state; + } + BasicBlock* check_block() const + { + return _check_block; + } + BasicBlock* continue_block() const + { + return _continue_block; + } + + public: + SharkBuilder* builder() const + { + return block()->builder(); + } + SharkFunction* function() const + { + return block()->function(); + } + + public: + void process() const + { + builder()->SetInsertPoint(check_block()); + block()->do_deferred_zero_check(value(), bci(), state(), continue_block()); + } +}; + +void SharkFunction::add_deferred_zero_check(SharkTopLevelBlock* block, + SharkValue* value) +{ + deferred_zero_checks()->append(new DeferredZeroCheck(block, value)); +} + +void SharkFunction::do_deferred_zero_checks() +{ + for (int i = 0; i < deferred_zero_checks()->length(); i++) + deferred_zero_checks()->at(i)->process(); +} diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Mon Mar 23 09:33:03 2009 -0400 @@ -23,8 +23,10 @@ * */ +class SharkMonitor; class SharkTopLevelBlock; -class SharkMonitor; + +class DeferredZeroCheck; class SharkFunction : public StackObj { public: @@ -44,16 +46,17 @@ void initialize(); private: - SharkCompiler* _compiler; - const char* _name; - ciTypeFlow* _flow; - ciBytecodeStream* _iter; - MacroAssembler* _masm; - llvm::Function* _function; - SharkTopLevelBlock** _blocks; - llvm::Value* _base_pc; - llvm::Value* _thread; - int _monitor_count; + SharkCompiler* _compiler; + const char* _name; + ciTypeFlow* _flow; + ciBytecodeStream* _iter; + MacroAssembler* _masm; + llvm::Function* _function; + SharkTopLevelBlock** _blocks; + llvm::Value* _base_pc; + llvm::Value* _thread; + int _monitor_count; + GrowableArray _deferred_zero_checks; public: SharkCompiler* compiler() const @@ -95,6 +98,10 @@ int monitor_count() const { return _monitor_count; + } + GrowableArray* deferred_zero_checks() + { + return &_deferred_zero_checks; } public: @@ -333,4 +340,12 @@ builder()->CreateStore(LLVMValue::null(), addr); return result; } + + // Deferred zero checks + public: + void add_deferred_zero_check(SharkTopLevelBlock* block, + SharkValue* value); + + private: + void do_deferred_zero_checks(); }; diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Mon Mar 23 09:33:03 2009 -0400 @@ -130,14 +130,11 @@ BasicBlock* other_block, BasicBlock* this_block) { - PHINode *phi; - char name[18]; - // Method Value *this_method = this->method(); Value *other_method = other->method(); if (this_method != other_method) { - phi = builder()->CreatePHI(SharkType::methodOop_type(), "method"); + PHINode *phi = builder()->CreatePHI(SharkType::methodOop_type(), "method"); phi->addIncoming(this_method, this_block); phi->addIncoming(other_method, other_block); set_method(phi); @@ -149,20 +146,12 @@ SharkValue *this_value = this->local(i); SharkValue *other_value = other->local(i); assert((this_value == NULL) == (other_value == NULL), "should be"); - if (this_value == other_value) - continue; - - 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, this_checked)); + if (this_value != NULL) { + char name[18]; + snprintf(name, sizeof(name), "local_%d_", i); + set_local(i, this_value->merge( + builder(), other_value, other_block, this_block, name)); + } } // Expression stack @@ -171,20 +160,12 @@ SharkValue *this_value = this->stack(i); SharkValue *other_value = other->stack(i); assert((this_value == NULL) == (other_value == NULL), "should be"); - if (this_value == other_value) - continue; - - 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, this_checked)); + if (this_value != NULL) { + char name[18]; + snprintf(name, sizeof(name), "stack_%d_", i); + set_stack(i, this_value->merge( + builder(), other_value, other_block, this_block, name)); + } } } @@ -315,10 +296,8 @@ 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), - false); + value = SharkValue::create_phi( + type, builder()->CreatePHI(SharkType::to_stackType(type), name)); break; case T_ADDRESS: @@ -355,10 +334,8 @@ 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), - false); + value = SharkValue::create_phi( + type, builder()->CreatePHI(SharkType::to_stackType(type), name)); break; case T_ADDRESS: diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Mar 23 09:33:03 2009 -0400 @@ -250,8 +250,40 @@ void SharkTopLevelBlock::do_zero_check(SharkValue *value) { - BasicBlock *zero = function()->CreateBlock("zero"); - BasicBlock *not_zero = function()->CreateBlock("not_zero"); + if (value->is_phi() && value->as_phi()->all_incomers_zero_checked()) { + function()->add_deferred_zero_check(this, value); + } + else { + BasicBlock *continue_block = function()->CreateBlock("not_zero"); + SharkState *saved_state = current_state(); + set_current_state(saved_state->copy()); + zero_check_value(value, continue_block); + builder()->SetInsertPoint(continue_block); + set_current_state(saved_state); + } + + value->set_zero_checked(true); +} + +void SharkTopLevelBlock::do_deferred_zero_check(SharkValue* value, + int bci, + SharkState* saved_state, + BasicBlock* continue_block) +{ + if (value->as_phi()->all_incomers_zero_checked()) { + builder()->CreateBr(continue_block); + } + else { + iter()->force_bci(start()); + set_current_state(saved_state); + zero_check_value(value, continue_block); + } +} + +void SharkTopLevelBlock::zero_check_value(SharkValue* value, + BasicBlock* continue_block) +{ + BasicBlock *zero_block = builder()->CreateBlock(continue_block, "zero"); Value *a, *b; switch (value->basic_type()) { @@ -276,10 +308,10 @@ ShouldNotReachHere(); } - builder()->CreateCondBr(builder()->CreateICmpNE(a, b), not_zero, zero); + builder()->CreateCondBr( + builder()->CreateICmpNE(a, b), continue_block, zero_block); - builder()->SetInsertPoint(zero); - SharkState *saved_state = current_state()->copy(); + builder()->SetInsertPoint(zero_block); if (value->is_jobject()) { call_vm_nocheck( SharkRuntime::throw_NullPointerException(), @@ -290,11 +322,6 @@ builder()->CreateUnimplemented(__FILE__, __LINE__); } handle_exception(function()->CreateGetPendingException()); - set_current_state(saved_state); - - builder()->SetInsertPoint(not_zero); - - value->set_zero_checked(true); } void SharkTopLevelBlock::check_bounds(SharkValue* array, SharkValue* index) @@ -402,7 +429,7 @@ LLVMValue::jint_constant(i), handler->entry_block()); - handler->add_incoming(current_state()->copy()); + handler->add_incoming(current_state()); } builder()->SetInsertPoint(no_handler); @@ -776,8 +803,6 @@ // 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) { @@ -808,7 +833,7 @@ if_taken->entry_block(), not_taken->entry_block()); if_taken->add_incoming(current_state()); - not_taken->add_incoming(current_state()->copy()); + not_taken->add_incoming(current_state()); } void SharkTopLevelBlock::do_switch() @@ -827,7 +852,7 @@ switchinst->addCase( LLVMValue::jint_constant(switch_key(i)), dest_block->entry_block()); - dest_block->add_incoming(current_state()->copy()); + dest_block->add_incoming(current_state()); } } } diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Mar 23 09:33:03 2009 -0400 @@ -185,10 +185,20 @@ // Helpers private: - void do_zero_check(SharkValue* value); llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); void do_branch(int successor_index); + + // Zero checks + private: + void do_zero_check(SharkValue* value); + void zero_check_value(SharkValue* value, llvm::BasicBlock* continue_block); + + public: + void do_deferred_zero_check(SharkValue* value, + int bci, + SharkState* saved_state, + llvm::BasicBlock* continue_block); // VM calls private: diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkValue.cpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.cpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.cpp Mon Mar 23 09:33:03 2009 -0400 @@ -34,9 +34,32 @@ { return SharkValue::create_generic(type(), generic_value(), zero_checked()); } +SharkValue* SharkPHIValue::clone() const +{ + return SharkValue::create_phi(type(), (PHINode *) generic_value(), this); +} SharkValue* SharkAddressValue::clone() const { return SharkValue::address_constant(address_value()); +} + +// Casting + +bool SharkValue::is_phi() const +{ + return false; +} +bool SharkPHIValue::is_phi() const +{ + return true; +} +SharkPHIValue* SharkValue::as_phi() +{ + ShouldNotCallThis(); +} +SharkPHIValue* SharkPHIValue::as_phi() +{ + return this; } // Comparison @@ -225,17 +248,49 @@ return builder->CreatePtrToInt(jobject_value(), SharkType::intptr_type()); } -// Phi-style stuff +// Phi-style stuff for SharkPHIState::add_incoming -void SharkNormalValue::addIncoming(SharkValue *value, BasicBlock* block) +void SharkValue::addIncoming(SharkValue *value, BasicBlock* block) { - assert(llvm::isa(generic_value()), "should be"); + ShouldNotCallThis(); +} +void SharkPHIValue::addIncoming(SharkValue *value, BasicBlock* block) +{ + assert(!is_clone(), "shouldn't be"); ((llvm::PHINode *) generic_value())->addIncoming( value->generic_value(), block); + if (!value->zero_checked()) + _all_incomers_zero_checked = false; } void SharkAddressValue::addIncoming(SharkValue *value, BasicBlock* block) { assert(this->equal_to(value), "should be"); +} + +// Phi-style stuff for SharkState::merge + +SharkValue* SharkNormalValue::merge(SharkBuilder* builder, + SharkValue* other, + BasicBlock* other_block, + BasicBlock* this_block, + const char* name) +{ + assert(type() == other->type(), "should be"); + assert(zero_checked() == other->zero_checked(), "should be"); + + PHINode *phi = builder->CreatePHI(SharkType::to_stackType(type()), name); + phi->addIncoming(this->generic_value(), this_block); + phi->addIncoming(other->generic_value(), other_block); + return SharkValue::create_generic(type(), phi, zero_checked()); +} +SharkValue* SharkAddressValue::merge(SharkBuilder* builder, + SharkValue* other, + BasicBlock* other_block, + BasicBlock* this_block, + const char* name) +{ + assert(this->equal_to(other), "should be"); + return this; } // Repeated null and divide-by-zero check removal diff -r 371412771066 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Sat Mar 21 10:10:02 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Mon Mar 23 09:33:03 2009 -0400 @@ -24,7 +24,9 @@ */ // Items on the stack and in local variables are tracked using -// SharkValue objects. There are two types, SharkNormalValue +// SharkValue objects. +// +// All SharkValues are one of two core 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 @@ -32,8 +34,14 @@ // 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. +// +// There is one more type, SharkPHIValue, which is a subclass +// of SharkNormalValue with a couple of extra methods. Use of +// SharkPHIValue outside of this file is acceptable, so long +// as it is obtained via SharkValue::as_phi(). class SharkBuilder; +class SharkPHIValue; class SharkValue : public ResourceObj { protected: @@ -42,6 +50,11 @@ // Cloning public: virtual SharkValue* clone() const = 0; + + // Casting + public: + virtual bool is_phi() const; + virtual SharkPHIValue* as_phi(); // Comparison public: @@ -180,10 +193,18 @@ static inline SharkValue* create_generic(ciType* type, llvm::Value* value, bool zero_checked); + static inline SharkValue* create_phi(ciType* type, + llvm::PHINode* phi, + const SharkPHIValue* parent = NULL); // Phi-style stuff public: - virtual void addIncoming(SharkValue *value, llvm::BasicBlock* block) = 0; + virtual void addIncoming(SharkValue* value, llvm::BasicBlock* block); + virtual SharkValue* merge(SharkBuilder* builder, + SharkValue* other, + llvm::BasicBlock* other_block, + llvm::BasicBlock* this_block, + const char* name) = 0; // Repeated null and divide-by-zero check removal public: @@ -245,9 +266,13 @@ llvm::Value* generic_value() const; llvm::Value* intptr_value(SharkBuilder* builder) const; - // Wrapped PHINodes + // Phi-style stuff public: - void addIncoming(SharkValue *value, llvm::BasicBlock* block); + SharkValue* merge(SharkBuilder* builder, + SharkValue* other, + llvm::BasicBlock* other_block, + llvm::BasicBlock* this_block, + const char* name); // Repeated null and divide-by-zero check removal public: @@ -255,12 +280,51 @@ void set_zero_checked(bool zero_checked); }; -inline SharkValue* SharkValue::create_generic(ciType* type, - llvm::Value* value, - bool zero_checked) -{ - return new SharkNormalValue(type, value, zero_checked); -} +class SharkPHIValue : public SharkNormalValue { + friend class SharkValue; + + protected: + SharkPHIValue(ciType* type, llvm::PHINode* phi, const SharkPHIValue *parent) + : SharkNormalValue(type, phi, parent && parent->zero_checked()), + _parent(parent), + _all_incomers_zero_checked(true) {} + + private: + const SharkPHIValue* _parent; + bool _all_incomers_zero_checked; + + private: + const SharkPHIValue* parent() const + { + return _parent; + } + bool is_clone() const + { + return parent() != NULL; + } + + public: + bool all_incomers_zero_checked() const + { + if (is_clone()) + return parent()->all_incomers_zero_checked(); + + return _all_incomers_zero_checked; + } + + // Cloning + public: + SharkValue* clone() const; + + // Casting + public: + bool is_phi() const; + SharkPHIValue* as_phi(); + + // Phi-style stuff + public: + void addIncoming(SharkValue *value, llvm::BasicBlock* block); +}; class SharkAddressValue : public SharkValue { friend class SharkValue; @@ -297,7 +361,28 @@ // Phi-style stuff public: void addIncoming(SharkValue *value, llvm::BasicBlock* block); + SharkValue* merge(SharkBuilder* builder, + SharkValue* other, + llvm::BasicBlock* other_block, + llvm::BasicBlock* this_block, + const char* name); }; + +// SharkValue methods that can't be declared above + +inline SharkValue* SharkValue::create_generic(ciType* type, + llvm::Value* value, + bool zero_checked) +{ + return new SharkNormalValue(type, value, zero_checked); +} + +inline SharkValue* SharkValue::create_phi(ciType* type, + llvm::PHINode* phi, + const SharkPHIValue* parent) +{ + return new SharkPHIValue(type, phi, parent); +} inline SharkValue* SharkValue::address_constant(int bci) { From bugzilla-daemon at icedtea.classpath.org Mon Mar 23 06:54:25 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 13:54:25 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #7 from thebohemian at gmx.net 2009-03-23 13:54 ------- Fixing this is very easy since one only needs to define a function which forwards the invocation to an existing MemoryManager instance. The question is more will IcedTea accept minimum supported llvm version raised to 2.5? Btw: The arm build fixes for llvm that have been discussed here have been contributed by me in the hope that I do not need separate patches in later llvm versions. So, from my POV I would welcome a move to llvm 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 Mon Mar 23 06:56:18 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 13:56:18 +0000 Subject: [Bug 309] New: llvm: use --cxxflags not --cflags Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=309 Summary: llvm: use --cxxflags not --cflags Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: thebohemian at gmx.net llvm-config makes a distinction between flags for a C and a C++ build. Although IcedTea compiles the shark port with g++ it uses the "--cflags" argument for llvm-config. I think this should be changed to --cxxflags. -- 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 23 06:57:25 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 13:57:25 +0000 Subject: [Bug 309] llvm: use --cxxflags not --cflags Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=309 ------- Comment #1 from thebohemian at gmx.net 2009-03-23 13:57 ------- Created an attachment (id=176) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=176&action=view) use llvm-config's --cxxflags instead of --cflags -- 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 23 07:00:15 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 14:00:15 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #8 from gbenson at redhat.com 2009-03-23 14:00 ------- I don't mind the minimum version being raised to 2.5, but I can't see me having time to do the upgrade in the next few weeks. If you need it done sooner then please submit a patch and I'll give it a go. -- 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 23 07:03:30 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 14:03:30 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #9 from thebohemian at gmx.net 2009-03-23 14:03 ------- Created an attachment (id=177) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=177&action=view) implement missing method from llvm 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 Mon Mar 23 07:16:52 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 14:16:52 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #10 from aph at redhat.com 2009-03-23 14:16 ------- The problem is that it all needs testing with 2.5. If someone is prepared to do that then it'll be fine, but be aware that list time I did a "minor" LLVM version bump it took a whole week's work to fix all the new bugs. -- 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 23 14:17:12 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 21:17:12 +0000 Subject: [Bug 293] JVM fatal error in VM code (HS 14) after NetworkManager disable / reenable cycle Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=293 naveed at cs.columbia.edu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |icedtea-bugs at cryptobitch.de ------- Comment #8 from naveed at cs.columbia.edu 2009-03-23 21:17 ------- *** Bug 306 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Mar 23 14:17:12 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 23 Mar 2009 21:17:12 +0000 Subject: [Bug 306] Azureus crashed after resuming from hibernate Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=306 naveed at cs.columbia.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #3 from naveed at cs.columbia.edu 2009-03-23 21:17 ------- *** This bug has been marked as a duplicate of bug 293 *** -- 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 24 04:03:26 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 24 Mar 2009 11:03:26 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #11 from gbenson at redhat.com 2009-03-24 11:03 ------- Is this patch *all* that is necesasry to have Shark build and run correctly with LLVM 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 langel at redhat.com Tue Mar 24 04:54:34 2009 From: langel at redhat.com (Lillian Angel) Date: Tue, 24 Mar 2009 11:54:34 +0000 Subject: changeset in /hg/icedtea6: 2009-03-24 Lillian Angel changeset 246837dabf32 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=246837dabf32 description: 2009-03-24 Lillian Angel * Makefile.am (ICEDTEA_PATCHES): Added new patches to the list. * patches/icedtea-6536193.patch, patches/icedtea-6610888.patch, patches/icedtea-6610896.patch, patches/icedtea-6630639.patch, patches/icedtea-6632886.patch, patches/icedtea-6636360.patch, patches/icedtea-6652463.patch, patches/icedtea-6656633.patch, patches/icedtea-6658158.patch, patches/icedtea-6691246.patch, patches/icedtea-6717680.patch, patches/icedtea-6721651.patch, patches/icedtea-6737315.patch, patches/icedtea-6792554.patch, patches/icedtea-6804996.patch, patches/icedtea-6804997.patch, patches/icedtea-6804998.patch: New security patches. diffstat: 19 files changed, 3380 insertions(+), 4 deletions(-) ChangeLog | 22 + Makefile.am | 24 + patches/icedtea-6536193.patch | 102 +++++ patches/icedtea-6610888.patch | 58 ++ patches/icedtea-6610896.patch | 189 +++++++++ patches/icedtea-6630639.patch | 31 + patches/icedtea-6632886.patch | 502 +++++++++++++++++++++++++ patches/icedtea-6636360.patch | 34 + patches/icedtea-6652463.patch | 28 + patches/icedtea-6656633.patch | 51 ++ patches/icedtea-6658158.patch | 815 +++++++++++++++++++++++++++++++++++++++++ patches/icedtea-6691246.patch | 166 ++++++++ patches/icedtea-6717680.patch | 27 + patches/icedtea-6721651.patch | 735 ++++++++++++++++++++++++++++++++++++ patches/icedtea-6737315.patch | 44 ++ patches/icedtea-6792554.patch | 415 ++++++++++++++++++++ patches/icedtea-6804996.patch | 75 +++ patches/icedtea-6804997.patch | 31 + patches/icedtea-6804998.patch | 35 + diffs (truncated from 3490 to 500 lines): diff -r 62a746a17ffa -r 246837dabf32 ChangeLog --- a/ChangeLog Mon Mar 23 09:33:31 2009 -0400 +++ b/ChangeLog Tue Mar 24 07:54:27 2009 -0400 @@ -1,3 +1,25 @@ 2009-03-23 Gary Benson + + * Makefile.am + (ICEDTEA_PATCHES): Added new patches to the list. + * patches/icedtea-6536193.patch, + patches/icedtea-6610888.patch, + patches/icedtea-6610896.patch, + patches/icedtea-6630639.patch, + patches/icedtea-6632886.patch, + patches/icedtea-6636360.patch, + patches/icedtea-6652463.patch, + patches/icedtea-6656633.patch, + patches/icedtea-6658158.patch, + patches/icedtea-6691246.patch, + patches/icedtea-6717680.patch, + patches/icedtea-6721651.patch, + patches/icedtea-6737315.patch, + patches/icedtea-6792554.patch, + patches/icedtea-6804996.patch, + patches/icedtea-6804997.patch, + patches/icedtea-6804998.patch: New security patches. + 2009-03-23 Gary Benson * ports/hotspot/src/share/vm/shark/sharkFunction.hpp: diff -r 62a746a17ffa -r 246837dabf32 Makefile.am --- a/Makefile.am Mon Mar 23 09:33:31 2009 -0400 +++ b/Makefile.am Tue Mar 24 07:54:27 2009 -0400 @@ -543,7 +543,23 @@ ICEDTEA_PATCHES = \ patches/icedtea-javafiles.patch \ patches/icedtea-core-build.patch \ patches/icedtea-jvmtiEnv.patch \ - patches/icedtea-lcms.patch + patches/icedtea-lcms.patch \ + patches/icedtea-6536193.patch \ + patches/icedtea-6610888.patch \ + patches/icedtea-6610896.patch \ + patches/icedtea-6630639.patch \ + patches/icedtea-6632886.patch \ + patches/icedtea-6652463.patch \ + patches/icedtea-6656633.patch \ + patches/icedtea-6658158.patch \ + patches/icedtea-6691246.patch \ + patches/icedtea-6717680.patch \ + patches/icedtea-6721651.patch \ + patches/icedtea-6737315.patch \ + patches/icedtea-6792554.patch \ + patches/icedtea-6804996.patch \ + patches/icedtea-6804997.patch \ + patches/icedtea-6804998.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ @@ -739,7 +755,7 @@ stamps/patch.stamp: stamps/patch-fsg.sta if test x$${all_patches_ok} = "xyes" \ && echo Checking $$p \ && $(PATCH) -l -p0 --dry-run -s -t -f \ - -F 0 < $(abs_top_srcdir)/$$p ; \ + < $(abs_top_srcdir)/$$p ; \ then \ echo Applying $$p ; \ $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \ @@ -818,7 +834,7 @@ stamps/patch-fsg.stamp: stamps/extract.s if test x$${all_patches_ok} = "xyes" \ && echo Checking $$p \ && $(PATCH) -l -p0 --dry-run -s -t -f \ - -F 0 < $(abs_top_srcdir)/$$p ; \ + < $(abs_top_srcdir)/$$p ; \ then \ echo Applying $$p ; \ $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \ @@ -917,7 +933,7 @@ stamps/patch-ecj.stamp: stamps/extract-e if test x$${all_patches_ok} = "xyes" \ && echo Checking $$p \ && $(PATCH) -l -p0 --dry-run -s -t -f \ - -F 0 < $(abs_top_srcdir)/$$p ; \ + < $(abs_top_srcdir)/$$p ; \ then \ echo Applying $$p ; \ $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \ diff -r 62a746a17ffa -r 246837dabf32 patches/icedtea-6536193.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6536193.patch Tue Mar 24 07:54:27 2009 -0400 @@ -0,0 +1,102 @@ +--- old/src/share/classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java Tue Mar 3 11:34:51 2009 ++++ openjdk/jaxws/src/share/classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java Tue Mar 3 11:34:50 2009 +@@ -1,27 +1,3 @@ +-/* +- * Copyright 2005-2006 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.xml.internal.bind.v2.runtime.output; + + import java.io.IOException; +@@ -32,6 +8,7 @@ + import com.sun.xml.internal.bind.DatatypeConverterImpl; + import com.sun.xml.internal.bind.v2.runtime.Name; + import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; ++import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl; + + import org.xml.sax.SAXException; + +@@ -81,6 +58,11 @@ + protected boolean closeStartTagPending = false; + + /** ++ * @see MarshallerImpl#header ++ */ ++ private String header; ++ ++ /** + * + * @param localNames + * local names encoded in UTF-8. +@@ -92,6 +74,10 @@ + prefixes[i] = new Encoded(); + } + ++ public void setHeader(String header) { ++ this.header = header; ++ } ++ + @Override + public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException { + super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext); +@@ -100,6 +86,10 @@ + if(!fragment) { + write(XML_DECL); + } ++ if(header!=null) { ++ textBuffer.set(header); ++ textBuffer.write(this); ++ } + } + + public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException { +@@ -383,11 +373,23 @@ + return buf; + } + +- private static final byte[] XMLNS_EQUALS = toBytes(" xmlns=\""); +- private static final byte[] XMLNS_COLON = toBytes(" xmlns:"); +- private static final byte[] EQUALS = toBytes("=\""); +- private static final byte[] CLOSE_TAG = toBytes(""); ++ // per instance copy to prevent an attack where malicious OutputStream ++ // rewrites the byte array. ++ private final byte[] XMLNS_EQUALS = _XMLNS_EQUALS.clone(); ++ private final byte[] XMLNS_COLON = _XMLNS_COLON.clone(); ++ private final byte[] EQUALS = _EQUALS.clone(); ++ private final byte[] CLOSE_TAG = _CLOSE_TAG.clone(); ++ private final byte[] EMPTY_TAG = _EMPTY_TAG.clone(); ++ private final byte[] XML_DECL = _XML_DECL.clone(); ++ ++ // masters ++ private static final byte[] _XMLNS_EQUALS = toBytes(" xmlns=\""); ++ private static final byte[] _XMLNS_COLON = toBytes(" xmlns:"); ++ private static final byte[] _EQUALS = toBytes("=\""); ++ private static final byte[] _CLOSE_TAG = toBytes(""); ++ private static final byte[] _XML_DECL = toBytes(""); ++ ++ // no need to copy + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; +- private static final byte[] XML_DECL = toBytes(""); + } diff -r 62a746a17ffa -r 246837dabf32 patches/icedtea-6610888.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6610888.patch Tue Mar 24 07:54:27 2009 -0400 @@ -0,0 +1,58 @@ +--- old/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 17:21:12 2009 ++++ openjdk/jdk/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 17:21:11 2009 +@@ -37,6 +37,7 @@ + import java.security.AccessControlContext; + import java.security.AccessController; + import java.security.PrivilegedAction; ++import java.security.ProtectionDomain; + import java.util.List; + import java.util.concurrent.CopyOnWriteArrayList; + import java.util.concurrent.ExecutorService; +@@ -170,7 +171,10 @@ + /** + * AccessControlContext of the Monitor.start() caller. + */ +- private AccessControlContext acc; ++ private static final AccessControlContext noPermissionsACC = ++ new AccessControlContext( ++ new ProtectionDomain[] {new ProtectionDomain(null, null)}); ++ private volatile AccessControlContext acc = noPermissionsACC; + + /** + * Scheduler Service. +@@ -755,7 +759,7 @@ + + // Reset the AccessControlContext. + // +- acc = null; ++ acc = noPermissionsACC; + + // Reset the complex type attribute information + // such that it is recalculated again. +@@ -1555,10 +1559,12 @@ + + public void run() { + final ScheduledFuture sf; ++ final AccessControlContext ac; + synchronized (Monitor.this) { + sf = Monitor.this.schedulerFuture; ++ ac = Monitor.this.acc; + } +- AccessController.doPrivileged(new PrivilegedAction() { ++ PrivilegedAction action = new PrivilegedAction() { + public Void run() { + if (Monitor.this.isActive()) { + final int an[] = alreadyNotifieds; +@@ -1571,7 +1577,11 @@ + } + return null; + } +- }, Monitor.this.acc); ++ }; ++ if (ac == null) { ++ throw new SecurityException("AccessControlContext cannot be null"); ++ } ++ AccessController.doPrivileged(action, ac); + synchronized (Monitor.this) { + if (Monitor.this.isActive() && + Monitor.this.schedulerFuture == sf) { diff -r 62a746a17ffa -r 246837dabf32 patches/icedtea-6610896.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6610896.patch Tue Mar 24 07:54:27 2009 -0400 @@ -0,0 +1,189 @@ +--- old/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 16:53:02 2009 ++++ openjdk/jdk/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 16:53:01 2009 +@@ -38,8 +38,9 @@ + import java.security.AccessController; + import java.security.PrivilegedAction; + import java.util.List; ++import java.util.Map; ++import java.util.WeakHashMap; + import java.util.concurrent.CopyOnWriteArrayList; +-import java.util.concurrent.ExecutorService; + import java.util.concurrent.Executors; + import java.util.concurrent.Future; + import java.util.concurrent.LinkedBlockingQueue; +@@ -180,14 +181,20 @@ + new DaemonThreadFactory("Scheduler")); + + /** +- * Maximum Pool Size ++ * Map containing the thread pool executor per thread group. + */ +- private static final int maximumPoolSize; ++ private static final Map executors = ++ new WeakHashMap(); + + /** +- * Executor Service. ++ * Lock for executors map. + */ +- private static final ExecutorService executor; ++ private static final Object executorsLock = new Object(); ++ ++ /** ++ * Maximum Pool Size ++ */ ++ private static final int maximumPoolSize; + static { + final String maximumPoolSizeSysProp = "jmx.x.monitor.maximum.pool.size"; + final String maximumPoolSizeStr = AccessController.doPrivileged( +@@ -217,22 +224,9 @@ + maximumPoolSize = maximumPoolSizeTmp; + } + } +- executor = new ThreadPoolExecutor( +- maximumPoolSize, +- maximumPoolSize, +- 60L, +- TimeUnit.SECONDS, +- new LinkedBlockingQueue(), +- new DaemonThreadFactory("Executor")); +- ((ThreadPoolExecutor)executor).allowCoreThreadTimeOut(true); + } + + /** +- * Monitor task to be executed by the Executor Service. +- */ +- private final MonitorTask monitorTask = new MonitorTask(); +- +- /** + * Future associated to the current monitor task. + */ + private Future monitorFuture; +@@ -240,7 +234,7 @@ + /** + * Scheduler task to be executed by the Scheduler Service. + */ +- private final SchedulerTask schedulerTask = new SchedulerTask(monitorTask); ++ private final SchedulerTask schedulerTask = new SchedulerTask(); + + /** + * ScheduledFuture associated to the current scheduler task. +@@ -726,6 +720,7 @@ + // Start the scheduler. + // + cleanupFutures(); ++ schedulerTask.setMonitorTask(new MonitorTask()); + schedulerFuture = scheduler.schedule(schedulerTask, + getGranularityPeriod(), + TimeUnit.MILLISECONDS); +@@ -1505,7 +1500,7 @@ + */ + private class SchedulerTask implements Runnable { + +- private Runnable task = null; ++ private MonitorTask task; + + /* + * ------------------------------------------ +@@ -1513,7 +1508,16 @@ + * ------------------------------------------ + */ + +- public SchedulerTask(Runnable task) { ++ public SchedulerTask() { ++ } ++ ++ /* ++ * ------------------------------------------ ++ * GETTERS/SETTERS ++ * ------------------------------------------ ++ */ ++ ++ public void setMonitorTask(MonitorTask task) { + this.task = task; + } + +@@ -1525,7 +1529,7 @@ + + public void run() { + synchronized (Monitor.this) { +- Monitor.this.monitorFuture = executor.submit(task); ++ Monitor.this.monitorFuture = task.submit(); + } + } + } +@@ -1538,6 +1542,8 @@ + */ + private class MonitorTask implements Runnable { + ++ private ThreadPoolExecutor executor; ++ + /* + * ------------------------------------------ + * CONSTRUCTORS +@@ -1545,6 +1551,38 @@ + */ + + public MonitorTask() { ++ // Find out if there's already an existing executor for the calling ++ // thread and reuse it. Otherwise, create a new one and store it in ++ // the executors map. If there is a SecurityManager, the group of ++ // System.getSecurityManager() is used, else the group of the thread ++ // instantiating this MonitorTask, i.e. the group of the thread that ++ // calls "Monitor.start()". ++ SecurityManager s = System.getSecurityManager(); ++ ThreadGroup group = (s != null) ? s.getThreadGroup() : ++ Thread.currentThread().getThreadGroup(); ++ synchronized (executorsLock) { ++ for (ThreadPoolExecutor e : executors.keySet()) { ++ DaemonThreadFactory tf = ++ (DaemonThreadFactory) e.getThreadFactory(); ++ ThreadGroup tg = tf.getThreadGroup(); ++ if (tg == group) { ++ executor = e; ++ break; ++ } ++ } ++ if (executor == null) { ++ executor = new ThreadPoolExecutor( ++ maximumPoolSize, ++ maximumPoolSize, ++ 60L, ++ TimeUnit.SECONDS, ++ new LinkedBlockingQueue(), ++ new DaemonThreadFactory("ThreadGroup<" + ++ group.getName() + "> Executor", group)); ++ executor.allowCoreThreadTimeOut(true); ++ executors.put(executor, null); ++ } ++ } + } + + /* +@@ -1553,6 +1591,10 @@ + * ------------------------------------------ + */ + ++ public Future submit() { ++ return executor.submit(this); ++ } ++ + public void run() { + final ScheduledFuture sf; + synchronized (Monitor.this) { +@@ -1611,6 +1653,15 @@ + namePrefix = "JMX Monitor " + poolName + " Pool [Thread-"; + } + ++ public DaemonThreadFactory(String poolName, ThreadGroup threadGroup) { ++ group = threadGroup; ++ namePrefix = "JMX Monitor " + poolName + " Pool [Thread-"; ++ } ++ ++ public ThreadGroup getThreadGroup() { ++ return group; ++ } ++ + public Thread newThread(Runnable r) { + Thread t = new Thread(group, + r, diff -r 62a746a17ffa -r 246837dabf32 patches/icedtea-6630639.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6630639.patch Tue Mar 24 07:54:27 2009 -0400 @@ -0,0 +1,31 @@ +--- old/src/share/classes/sun/net/httpserver/Request.java Wed Mar 4 03:29:39 2009 ++++ openjdk/jdk/src/share/classes/sun/net/httpserver/Request.java Wed Mar 4 03:29:39 2009 +@@ -52,6 +52,9 @@ + os = rawout; + do { + startLine = readLine(); ++ if (startLine == null) { ++ return; ++ } + /* skip blank lines */ + } while (startLine.equals ("")); + } +--- old/src/share/classes/sun/net/httpserver/ServerImpl.java Wed Mar 4 03:29:41 2009 ++++ openjdk/jdk/src/share/classes/sun/net/httpserver/ServerImpl.java Wed Mar 4 03:29:41 2009 +@@ -437,6 +437,7 @@ + rawin = sslStreams.getInputStream(); + rawout = sslStreams.getOutputStream(); + engine = sslStreams.getSSLEngine(); ++ connection.sslStreams = sslStreams; + } else { + rawin = new BufferedInputStream( + new Request.ReadStream ( +@@ -446,6 +447,8 @@ + ServerImpl.this, chan + ); + } ++ connection.raw = rawin; ++ connection.rawout = rawout; + } + Request req = new Request (rawin, rawout); + requestLine = req.requestLine(); diff -r 62a746a17ffa -r 246837dabf32 patches/icedtea-6632886.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6632886.patch Tue Mar 24 07:54:27 2009 -0400 @@ -0,0 +1,502 @@ +--- old/src/share/classes/java/awt/Font.java Tue Mar 3 14:12:23 2009 ++++ openjdk/jdk/src/share/classes/java/awt/Font.java Tue Mar 3 14:12:23 2009 +@@ -37,6 +37,8 @@ + import java.awt.peer.FontPeer; + import java.io.*; + import java.lang.ref.SoftReference; ++import java.security.AccessController; ++import java.security.PrivilegedExceptionAction; + import java.text.AttributedCharacterIterator.Attribute; + import java.text.CharacterIterator; + import java.text.StringCharacterIterator; +@@ -51,6 +53,7 @@ + import sun.font.AttributeValues; + import sun.font.EAttribute; + import sun.font.CompositeFont; ++import sun.font.CreatedFontTracker; From langel at redhat.com Tue Mar 24 05:04:33 2009 From: langel at redhat.com (Lillian Angel) Date: Tue, 24 Mar 2009 08:04:33 -0400 Subject: Security patches applied Message-ID: <49C8CC51.8030104@redhat.com> Hi, I applied the unembargoed security patches that were released today: 2009-03-24 Lillian Angel * Makefile.am (ICEDTEA_PATCHES): Added new patches to the list. * patches/icedtea-6536193.patch, patches/icedtea-6610888.patch, patches/icedtea-6610896.patch, patches/icedtea-6630639.patch, patches/icedtea-6632886.patch, patches/icedtea-6636360.patch, patches/icedtea-6652463.patch, patches/icedtea-6656633.patch, patches/icedtea-6658158.patch, patches/icedtea-6691246.patch, patches/icedtea-6717680.patch, patches/icedtea-6721651.patch, patches/icedtea-6737315.patch, patches/icedtea-6792554.patch, patches/icedtea-6804996.patch, patches/icedtea-6804997.patch, Cheers, Lillian patches/icedtea-6804998.patch: New security patches. From g.koppen at jondos.de Tue Mar 24 06:05:26 2009 From: g.koppen at jondos.de (Georg Koppen) Date: Tue, 24 Mar 2009 14:05:26 +0100 Subject: IcedTea-Plugin: Initialization failed Message-ID: <49C8DA96.5030201@jondos.de> Hi, I recently downloaded icedtea6-1.4.1 and built it succesfully (running ./configure && make) on my debian lenny. I linked the IcedTeaPlugin.so to ${HOME}/.mozilla/plugins and started Iceweasel. Well, the plugin was obviously recognised by the browser, so I tried to load some applets. But I failed. After waiting a while I got always the same page as before launching the applet. Starting Iceweasel from the commandline didn't reveal anything: there was no output, no crash, nothing. I set ICEDTEPLUGIN_DEBUG=true and started Iceweasel again. This time I got a lot of output which says basically that instance XYZ is waiting for initialization and is always failing. I attached a file with the whole output. I tested serveral applets and got similar results. Other plugins (that from sun, the one from the debian repository or the one integrated in the konqueror) work pretty fine. Does anybody know where I got wrong and how I could solve my problem? Georg -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: javatester.txt Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090324/bcd58253/javatester.txt From ahughes at redhat.com Tue Mar 24 07:17:29 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 24 Mar 2009 14:17:29 +0000 Subject: changeset in /hg/icedtea6: Move security patches to subdirectory. Message-ID: changeset e091113be80d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e091113be80d description: Move security patches to subdirectory. 2009-03-24 Andrew John Hughes * patches/icedtea-6536193.patch, * patches/icedtea-6610888.patch, * patches/icedtea-6610896.patch, * patches/icedtea-6630639.patch, * patches/icedtea-6632886.patch, * patches/icedtea-6636360.patch, * patches/icedtea-6652463.patch, * patches/icedtea-6656633.patch, * patches/icedtea-6658158.patch, * patches/icedtea-6691246.patch, * patches/icedtea-6717680.patch, * patches/icedtea-6721651.patch, * patches/icedtea-6737315.patch, * patches/icedtea-6792554.patch, * patches/icedtea-6804996.patch, * patches/icedtea-6804997.patch, * patches/icedtea-6804998.patch: Moved... * Makefile.am: Updated. * patches/security/icedtea-6536193.patch, * patches/security/icedtea-6610888.patch, * patches/security/icedtea-6610896.patch, * patches/security/icedtea-6630639.patch, * patches/security/icedtea-6632886.patch, * patches/security/icedtea-6636360.patch, * patches/security/icedtea-6652463.patch, * patches/security/icedtea-6656633.patch, * patches/security/icedtea-6658158.patch, * patches/security/icedtea-6691246.patch, * patches/security/icedtea-6717680.patch, * patches/security/icedtea-6721651.patch, * patches/security/icedtea-6737315.patch, * patches/security/icedtea-6792554.patch, * patches/security/icedtea-6804996.patch, * patches/security/icedtea-6804997.patch, * patches/security/icedtea-6804998.patch: to here. diffstat: 36 files changed, 3393 insertions(+), 3354 deletions(-) ChangeLog | 39 + Makefile.am | 32 - patches/icedtea-6536193.patch | 102 ---- patches/icedtea-6610888.patch | 58 -- patches/icedtea-6610896.patch | 189 ------- patches/icedtea-6630639.patch | 31 - patches/icedtea-6632886.patch | 502 ------------------- patches/icedtea-6636360.patch | 34 - patches/icedtea-6652463.patch | 28 - patches/icedtea-6656633.patch | 51 -- patches/icedtea-6658158.patch | 815 -------------------------------- patches/icedtea-6691246.patch | 166 ------ patches/icedtea-6717680.patch | 27 - patches/icedtea-6721651.patch | 735 ---------------------------- patches/icedtea-6737315.patch | 44 - patches/icedtea-6792554.patch | 415 ---------------- patches/icedtea-6804996.patch | 75 -- patches/icedtea-6804997.patch | 31 - patches/icedtea-6804998.patch | 35 - patches/security/icedtea-6536193.patch | 102 ++++ patches/security/icedtea-6610888.patch | 58 ++ patches/security/icedtea-6610896.patch | 189 +++++++ patches/security/icedtea-6630639.patch | 31 + patches/security/icedtea-6632886.patch | 502 +++++++++++++++++++ patches/security/icedtea-6636360.patch | 34 + patches/security/icedtea-6652463.patch | 28 + patches/security/icedtea-6656633.patch | 51 ++ patches/security/icedtea-6658158.patch | 815 ++++++++++++++++++++++++++++++++ patches/security/icedtea-6691246.patch | 166 ++++++ patches/security/icedtea-6717680.patch | 27 + patches/security/icedtea-6721651.patch | 735 ++++++++++++++++++++++++++++ patches/security/icedtea-6737315.patch | 44 + patches/security/icedtea-6792554.patch | 415 ++++++++++++++++ patches/security/icedtea-6804996.patch | 75 ++ patches/security/icedtea-6804997.patch | 31 + patches/security/icedtea-6804998.patch | 35 + diffs (truncated from 6900 to 500 lines): diff -r 246837dabf32 -r e091113be80d ChangeLog --- a/ChangeLog Tue Mar 24 07:54:27 2009 -0400 +++ b/ChangeLog Tue Mar 24 14:15:51 2009 +0000 @@ -1,3 +1,42 @@ 2009-03-24 Lillian Angel + + * patches/icedtea-6536193.patch, + * patches/icedtea-6610888.patch, + * patches/icedtea-6610896.patch, + * patches/icedtea-6630639.patch, + * patches/icedtea-6632886.patch, + * patches/icedtea-6636360.patch, + * patches/icedtea-6652463.patch, + * patches/icedtea-6656633.patch, + * patches/icedtea-6658158.patch, + * patches/icedtea-6691246.patch, + * patches/icedtea-6717680.patch, + * patches/icedtea-6721651.patch, + * patches/icedtea-6737315.patch, + * patches/icedtea-6792554.patch, + * patches/icedtea-6804996.patch, + * patches/icedtea-6804997.patch, + * patches/icedtea-6804998.patch: Moved... + * Makefile.am: Updated. + * patches/security/icedtea-6536193.patch, + * patches/security/icedtea-6610888.patch, + * patches/security/icedtea-6610896.patch, + * patches/security/icedtea-6630639.patch, + * patches/security/icedtea-6632886.patch, + * patches/security/icedtea-6636360.patch, + * patches/security/icedtea-6652463.patch, + * patches/security/icedtea-6656633.patch, + * patches/security/icedtea-6658158.patch, + * patches/security/icedtea-6691246.patch, + * patches/security/icedtea-6717680.patch, + * patches/security/icedtea-6721651.patch, + * patches/security/icedtea-6737315.patch, + * patches/security/icedtea-6792554.patch, + * patches/security/icedtea-6804996.patch, + * patches/security/icedtea-6804997.patch, + * patches/security/icedtea-6804998.patch: + to here. + 2009-03-24 Lillian Angel * Makefile.am diff -r 246837dabf32 -r e091113be80d Makefile.am --- a/Makefile.am Tue Mar 24 07:54:27 2009 -0400 +++ b/Makefile.am Tue Mar 24 14:15:51 2009 +0000 @@ -544,22 +544,22 @@ ICEDTEA_PATCHES = \ patches/icedtea-core-build.patch \ patches/icedtea-jvmtiEnv.patch \ patches/icedtea-lcms.patch \ - patches/icedtea-6536193.patch \ - patches/icedtea-6610888.patch \ - patches/icedtea-6610896.patch \ - patches/icedtea-6630639.patch \ - patches/icedtea-6632886.patch \ - patches/icedtea-6652463.patch \ - patches/icedtea-6656633.patch \ - patches/icedtea-6658158.patch \ - patches/icedtea-6691246.patch \ - patches/icedtea-6717680.patch \ - patches/icedtea-6721651.patch \ - patches/icedtea-6737315.patch \ - patches/icedtea-6792554.patch \ - patches/icedtea-6804996.patch \ - patches/icedtea-6804997.patch \ - patches/icedtea-6804998.patch + patches/security/icedtea-6536193.patch \ + patches/security/icedtea-6610888.patch \ + patches/security/icedtea-6610896.patch \ + patches/security/icedtea-6630639.patch \ + patches/security/icedtea-6632886.patch \ + patches/security/icedtea-6652463.patch \ + patches/security/icedtea-6656633.patch \ + patches/security/icedtea-6658158.patch \ + patches/security/icedtea-6691246.patch \ + patches/security/icedtea-6717680.patch \ + patches/security/icedtea-6721651.patch \ + patches/security/icedtea-6737315.patch \ + patches/security/icedtea-6792554.patch \ + patches/security/icedtea-6804996.patch \ + patches/security/icedtea-6804997.patch \ + patches/security/icedtea-6804998.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 246837dabf32 -r e091113be80d patches/icedtea-6536193.patch --- a/patches/icedtea-6536193.patch Tue Mar 24 07:54:27 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ ---- old/src/share/classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java Tue Mar 3 11:34:51 2009 -+++ openjdk/jaxws/src/share/classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java Tue Mar 3 11:34:50 2009 -@@ -1,27 +1,3 @@ --/* -- * Copyright 2005-2006 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.xml.internal.bind.v2.runtime.output; - - import java.io.IOException; -@@ -32,6 +8,7 @@ - import com.sun.xml.internal.bind.DatatypeConverterImpl; - import com.sun.xml.internal.bind.v2.runtime.Name; - import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; -+import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl; - - import org.xml.sax.SAXException; - -@@ -81,6 +58,11 @@ - protected boolean closeStartTagPending = false; - - /** -+ * @see MarshallerImpl#header -+ */ -+ private String header; -+ -+ /** - * - * @param localNames - * local names encoded in UTF-8. -@@ -92,6 +74,10 @@ - prefixes[i] = new Encoded(); - } - -+ public void setHeader(String header) { -+ this.header = header; -+ } -+ - @Override - public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException { - super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext); -@@ -100,6 +86,10 @@ - if(!fragment) { - write(XML_DECL); - } -+ if(header!=null) { -+ textBuffer.set(header); -+ textBuffer.write(this); -+ } - } - - public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException { -@@ -383,11 +373,23 @@ - return buf; - } - -- private static final byte[] XMLNS_EQUALS = toBytes(" xmlns=\""); -- private static final byte[] XMLNS_COLON = toBytes(" xmlns:"); -- private static final byte[] EQUALS = toBytes("=\""); -- private static final byte[] CLOSE_TAG = toBytes(""); -+ // per instance copy to prevent an attack where malicious OutputStream -+ // rewrites the byte array. -+ private final byte[] XMLNS_EQUALS = _XMLNS_EQUALS.clone(); -+ private final byte[] XMLNS_COLON = _XMLNS_COLON.clone(); -+ private final byte[] EQUALS = _EQUALS.clone(); -+ private final byte[] CLOSE_TAG = _CLOSE_TAG.clone(); -+ private final byte[] EMPTY_TAG = _EMPTY_TAG.clone(); -+ private final byte[] XML_DECL = _XML_DECL.clone(); -+ -+ // masters -+ private static final byte[] _XMLNS_EQUALS = toBytes(" xmlns=\""); -+ private static final byte[] _XMLNS_COLON = toBytes(" xmlns:"); -+ private static final byte[] _EQUALS = toBytes("=\""); -+ private static final byte[] _CLOSE_TAG = toBytes(""); -+ private static final byte[] _XML_DECL = toBytes(""); -+ -+ // no need to copy - private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; -- private static final byte[] XML_DECL = toBytes(""); - } diff -r 246837dabf32 -r e091113be80d patches/icedtea-6610888.patch --- a/patches/icedtea-6610888.patch Tue Mar 24 07:54:27 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ ---- old/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 17:21:12 2009 -+++ openjdk/jdk/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 17:21:11 2009 -@@ -37,6 +37,7 @@ - import java.security.AccessControlContext; - import java.security.AccessController; - import java.security.PrivilegedAction; -+import java.security.ProtectionDomain; - import java.util.List; - import java.util.concurrent.CopyOnWriteArrayList; - import java.util.concurrent.ExecutorService; -@@ -170,7 +171,10 @@ - /** - * AccessControlContext of the Monitor.start() caller. - */ -- private AccessControlContext acc; -+ private static final AccessControlContext noPermissionsACC = -+ new AccessControlContext( -+ new ProtectionDomain[] {new ProtectionDomain(null, null)}); -+ private volatile AccessControlContext acc = noPermissionsACC; - - /** - * Scheduler Service. -@@ -755,7 +759,7 @@ - - // Reset the AccessControlContext. - // -- acc = null; -+ acc = noPermissionsACC; - - // Reset the complex type attribute information - // such that it is recalculated again. -@@ -1555,10 +1559,12 @@ - - public void run() { - final ScheduledFuture sf; -+ final AccessControlContext ac; - synchronized (Monitor.this) { - sf = Monitor.this.schedulerFuture; -+ ac = Monitor.this.acc; - } -- AccessController.doPrivileged(new PrivilegedAction() { -+ PrivilegedAction action = new PrivilegedAction() { - public Void run() { - if (Monitor.this.isActive()) { - final int an[] = alreadyNotifieds; -@@ -1571,7 +1577,11 @@ - } - return null; - } -- }, Monitor.this.acc); -+ }; -+ if (ac == null) { -+ throw new SecurityException("AccessControlContext cannot be null"); -+ } -+ AccessController.doPrivileged(action, ac); - synchronized (Monitor.this) { - if (Monitor.this.isActive() && - Monitor.this.schedulerFuture == sf) { diff -r 246837dabf32 -r e091113be80d patches/icedtea-6610896.patch --- a/patches/icedtea-6610896.patch Tue Mar 24 07:54:27 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ ---- old/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 16:53:02 2009 -+++ openjdk/jdk/src/share/classes/javax/management/monitor/Monitor.java Mon Mar 9 16:53:01 2009 -@@ -38,8 +38,9 @@ - import java.security.AccessController; - import java.security.PrivilegedAction; - import java.util.List; -+import java.util.Map; -+import java.util.WeakHashMap; - import java.util.concurrent.CopyOnWriteArrayList; --import java.util.concurrent.ExecutorService; - import java.util.concurrent.Executors; - import java.util.concurrent.Future; - import java.util.concurrent.LinkedBlockingQueue; -@@ -180,14 +181,20 @@ - new DaemonThreadFactory("Scheduler")); - - /** -- * Maximum Pool Size -+ * Map containing the thread pool executor per thread group. - */ -- private static final int maximumPoolSize; -+ private static final Map executors = -+ new WeakHashMap(); - - /** -- * Executor Service. -+ * Lock for executors map. - */ -- private static final ExecutorService executor; -+ private static final Object executorsLock = new Object(); -+ -+ /** -+ * Maximum Pool Size -+ */ -+ private static final int maximumPoolSize; - static { - final String maximumPoolSizeSysProp = "jmx.x.monitor.maximum.pool.size"; - final String maximumPoolSizeStr = AccessController.doPrivileged( -@@ -217,22 +224,9 @@ - maximumPoolSize = maximumPoolSizeTmp; - } - } -- executor = new ThreadPoolExecutor( -- maximumPoolSize, -- maximumPoolSize, -- 60L, -- TimeUnit.SECONDS, -- new LinkedBlockingQueue(), -- new DaemonThreadFactory("Executor")); -- ((ThreadPoolExecutor)executor).allowCoreThreadTimeOut(true); - } - - /** -- * Monitor task to be executed by the Executor Service. -- */ -- private final MonitorTask monitorTask = new MonitorTask(); -- -- /** - * Future associated to the current monitor task. - */ - private Future monitorFuture; -@@ -240,7 +234,7 @@ - /** - * Scheduler task to be executed by the Scheduler Service. - */ -- private final SchedulerTask schedulerTask = new SchedulerTask(monitorTask); -+ private final SchedulerTask schedulerTask = new SchedulerTask(); - - /** - * ScheduledFuture associated to the current scheduler task. -@@ -726,6 +720,7 @@ - // Start the scheduler. - // - cleanupFutures(); -+ schedulerTask.setMonitorTask(new MonitorTask()); - schedulerFuture = scheduler.schedule(schedulerTask, - getGranularityPeriod(), - TimeUnit.MILLISECONDS); -@@ -1505,7 +1500,7 @@ - */ - private class SchedulerTask implements Runnable { - -- private Runnable task = null; -+ private MonitorTask task; - - /* - * ------------------------------------------ -@@ -1513,7 +1508,16 @@ - * ------------------------------------------ - */ - -- public SchedulerTask(Runnable task) { -+ public SchedulerTask() { -+ } -+ -+ /* -+ * ------------------------------------------ -+ * GETTERS/SETTERS -+ * ------------------------------------------ -+ */ -+ -+ public void setMonitorTask(MonitorTask task) { - this.task = task; - } - -@@ -1525,7 +1529,7 @@ - - public void run() { - synchronized (Monitor.this) { -- Monitor.this.monitorFuture = executor.submit(task); -+ Monitor.this.monitorFuture = task.submit(); - } - } - } -@@ -1538,6 +1542,8 @@ - */ - private class MonitorTask implements Runnable { - -+ private ThreadPoolExecutor executor; -+ - /* - * ------------------------------------------ - * CONSTRUCTORS -@@ -1545,6 +1551,38 @@ - */ - - public MonitorTask() { -+ // Find out if there's already an existing executor for the calling -+ // thread and reuse it. Otherwise, create a new one and store it in -+ // the executors map. If there is a SecurityManager, the group of -+ // System.getSecurityManager() is used, else the group of the thread -+ // instantiating this MonitorTask, i.e. the group of the thread that -+ // calls "Monitor.start()". -+ SecurityManager s = System.getSecurityManager(); -+ ThreadGroup group = (s != null) ? s.getThreadGroup() : -+ Thread.currentThread().getThreadGroup(); -+ synchronized (executorsLock) { -+ for (ThreadPoolExecutor e : executors.keySet()) { -+ DaemonThreadFactory tf = -+ (DaemonThreadFactory) e.getThreadFactory(); -+ ThreadGroup tg = tf.getThreadGroup(); -+ if (tg == group) { -+ executor = e; -+ break; -+ } -+ } -+ if (executor == null) { -+ executor = new ThreadPoolExecutor( -+ maximumPoolSize, -+ maximumPoolSize, -+ 60L, -+ TimeUnit.SECONDS, -+ new LinkedBlockingQueue(), -+ new DaemonThreadFactory("ThreadGroup<" + -+ group.getName() + "> Executor", group)); -+ executor.allowCoreThreadTimeOut(true); -+ executors.put(executor, null); -+ } -+ } - } - - /* -@@ -1553,6 +1591,10 @@ - * ------------------------------------------ - */ - -+ public Future submit() { -+ return executor.submit(this); -+ } -+ - public void run() { - final ScheduledFuture sf; - synchronized (Monitor.this) { -@@ -1611,6 +1653,15 @@ - namePrefix = "JMX Monitor " + poolName + " Pool [Thread-"; - } - -+ public DaemonThreadFactory(String poolName, ThreadGroup threadGroup) { -+ group = threadGroup; -+ namePrefix = "JMX Monitor " + poolName + " Pool [Thread-"; -+ } -+ -+ public ThreadGroup getThreadGroup() { -+ return group; -+ } -+ - public Thread newThread(Runnable r) { - Thread t = new Thread(group, - r, diff -r 246837dabf32 -r e091113be80d patches/icedtea-6630639.patch --- a/patches/icedtea-6630639.patch Tue Mar 24 07:54:27 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ ---- old/src/share/classes/sun/net/httpserver/Request.java Wed Mar 4 03:29:39 2009 -+++ openjdk/jdk/src/share/classes/sun/net/httpserver/Request.java Wed Mar 4 03:29:39 2009 -@@ -52,6 +52,9 @@ - os = rawout; - do { - startLine = readLine(); -+ if (startLine == null) { -+ return; -+ } - /* skip blank lines */ - } while (startLine.equals ("")); - } ---- old/src/share/classes/sun/net/httpserver/ServerImpl.java Wed Mar 4 03:29:41 2009 -+++ openjdk/jdk/src/share/classes/sun/net/httpserver/ServerImpl.java Wed Mar 4 03:29:41 2009 -@@ -437,6 +437,7 @@ - rawin = sslStreams.getInputStream(); - rawout = sslStreams.getOutputStream(); - engine = sslStreams.getSSLEngine(); -+ connection.sslStreams = sslStreams; - } else { - rawin = new BufferedInputStream( - new Request.ReadStream ( -@@ -446,6 +447,8 @@ - ServerImpl.this, chan - ); - } -+ connection.raw = rawin; -+ connection.rawout = rawout; - } - Request req = new Request (rawin, rawout); - requestLine = req.requestLine(); diff -r 246837dabf32 -r e091113be80d patches/icedtea-6632886.patch --- a/patches/icedtea-6632886.patch Tue Mar 24 07:54:27 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,502 +0,0 @@ ---- old/src/share/classes/java/awt/Font.java Tue Mar 3 14:12:23 2009 -+++ openjdk/jdk/src/share/classes/java/awt/Font.java Tue Mar 3 14:12:23 2009 -@@ -37,6 +37,8 @@ - import java.awt.peer.FontPeer; - import java.io.*; - import java.lang.ref.SoftReference; -+import java.security.AccessController; -+import java.security.PrivilegedExceptionAction; - import java.text.AttributedCharacterIterator.Attribute; - import java.text.CharacterIterator; - import java.text.StringCharacterIterator; -@@ -51,6 +53,7 @@ From bugzilla-daemon at icedtea.classpath.org Tue Mar 24 08:39:59 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 24 Mar 2009 15:39:59 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #12 from thebohemian at gmx.net 2009-03-24 15:39 ------- At the moment the patch only fixes the compile issue for me. I am doing this for the ARM target. I can't get it to run yet but it is likely that this is a linking problem (again). Unfortunately these things are difficult to debug. It takes some time to recompile everything. :| I'm on it. In the meantime Matthias could report whether the proposed patch makes it work on Ubuntu's supported architectures. -- 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 24 08:47:59 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 24 Mar 2009 15:47:59 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #13 from doko at ubuntu.com 2009-03-24 15:47 ------- > In the meantime Matthias could report whether the proposed patch makes > it work on Ubuntu's supported architectures. unlikely that I'll have time for this now (travelling, then vacation, then Ubuntu release ...) -- 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 24 08:48:48 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 24 Mar 2009 15:48:48 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #14 from gbenson at redhat.com 2009-03-24 15:48 ------- I'm away for a week starting Friday in any case. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From dbhole at redhat.com Tue Mar 24 09:03:24 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 24 Mar 2009 12:03:24 -0400 Subject: IcedTea-Plugin: Initialization failed In-Reply-To: <49C8DA96.5030201@jondos.de> References: <49C8DA96.5030201@jondos.de> Message-ID: <20090324160324.GB16802@redhat.com> * Georg Koppen [2009-03-24 09:06]: > Hi, > > I recently downloaded icedtea6-1.4.1 and built it succesfully (running > ./configure && make) on my debian lenny. I linked the IcedTeaPlugin.so > to ${HOME}/.mozilla/plugins and started Iceweasel. Well, the plugin was > obviously recognised by the browser, so I tried to load some applets. > But I failed. After waiting a while I got always the same page as before > launching the applet. Starting Iceweasel from the commandline didn't > reveal anything: there was no output, no crash, nothing. > When did you check it out? There was an error in tagging and it has been retagged recently... Deepak > I set ICEDTEPLUGIN_DEBUG=true and started Iceweasel again. This time I > got a lot of output which says basically that instance XYZ is waiting > for initialization and is always failing. > > I attached a file with the whole output. I tested serveral applets and > got similar results. > > Other plugins (that from sun, the one from the debian repository or the > one integrated in the konqueror) work pretty fine. > > Does anybody know where I got wrong and how I could solve my problem? > > Georg > ???ICEDTEA PLUGIN: Factory::IcedTeaPluginFactory > CONSTRUCTING FACTORY > ICEDTEAPLUGIN_DEBUG = true > ICEDTEA PLUGIN: Factory::IcedTeaPluginFactory return > ICEDTEA PLUGIN: Factory::Initialize > ICEDTEA PLUGIN: Factory::Initialize: using /home/strulli/Georg/Arbeit/Computersicherheit/Internetanon/JAP/Arbeit/JavaApplet/icedtea6-1.4.1/openjdk/control/build/linux-i586/j2re-image/lib/i386/../../bin/java > ICEDTEA PLUGIN: thread manager > ICEDTEA PLUGIN: current thread > Initializing JVM... > ICEDTEA PLUGIN: get component manager > ICEDTEA PLUGIN: liveconnect > ICEDTEA PLUGIN: thread manager > ICEDTEA PLUGIN: Instance::StartAppletviewer > ICEDTEA PLUGIN: get component manager > ICEDTEA PLUGIN: create local file > ICEDTEA PLUGIN: init with path > ICEDTEA PLUGIN: create process > ICEDTEA PLUGIN: init process > ICEDTEA PLUGIN: clearing old input fifo (if any): /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin > ICEDTEA PLUGIN: creating input fifo: /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin > ICEDTEA PLUGIN: created input fifo: /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin > ICEDTEA PLUGIN: got confirmation that appletviewer is running > ICEDTEA PLUGIN: clearing old output fifo (if any): /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer > ICEDTEA PLUGIN: creating output fifo: /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer > ICEDTEA PLUGIN: created output fifo: /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer > ICEDTEA PLUGIN: run process > ICEDTEA PLUGIN: Instance::StartAppletviewer return > ICEDTEA PLUGIN: started appletviewer > ICEDTEA PLUGIN: Factory::Initialize return > ICEDTEA PLUGIN: Factory::CreateSecureEnv > ICEDTEA PLUGIN: JNIEnv::IcedTeaJNIEnv > ICEDTEA PLUGIN: JNIEnv::IcedTeaJNIEnv return > CREATESECUREENV > ICEDTEA PLUGIN: Factory::CreateSecureEnv return > ICEDTEA PLUGIN: Factory::CreateInstance > ICEDTEA PLUGIN: Instance::IcedTeaPluginInstance > ICEDTEA PLUGIN: Instance::IcedTeaPluginInstance return > ICEDTEA PLUGIN: Factory::CreateInstance return > ICEDTEA PLUGIN: Instance::Initialize > TAG FROM BROWSER = instance 1 tag http://www.javatester.org/version.html > > ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer > Writing to JVM: instance 1 tag http://www.javatester.org/version.html > Wrote 223 bytes to pipe > ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer return > SETTING PEER!!!: 0x9b90120 > DONE SETTING PEER!!!: 0x9b90120 > ICEDTEA PLUGIN: Instance::Initialize return > NOT IMPLEMENTED: virtual nsresult IcedTeaPluginInstance::Start() > ICEDTEA PLUGIN: Instance::GetValue > ICEDTEA PLUGIN: Instance::GetValue return > GETTING PEER!!!: 0x9b90120 > DONE GETTING PEER!!!: 0x9b90120, 0x9b90120 > ICEDTEA PLUGIN: Factory::GetValue > ICEDTEA PLUGIN: Factory::GetValue return > ICEDTEA PLUGIN: Instance::GetValue > ICEDTEA PLUGIN: Instance::GetValue return > ICEDTEA PLUGIN: Instance::SetWindow > ICEDTEA PLUGIN: Instance::SetWindow: setting window. > ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer > Writing to JVM: instance 1 handle 33555732 > Wrote 27 bytes to pipe > ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer return > ICEDTEA PLUGIN: Instance::SetWindow return > ICEDTEA PLUGIN: Instance::GetJavaObject > IcedTeaPluginInstance::GetJavaObject: Instance 0x9b86c88 waiting for initialization... > ICEDTEA PLUGIN: Instance::SetWindow > IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... > Initialization for instance 1 has timed out. Marking it void > ICEDTEA PLUGIN: Instance::SetWindow return > ICEDTEA PLUGIN: Instance::SetWindow > IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... > Initialization failed. SetWindow returning > ICEDTEA PLUGIN: Instance::SetWindow return > IcedTeaPluginInstance::GetJavaObject: Initialization for instance 1 has timed out. Marking it void > ICEDTEA PLUGIN: Instance::GetJavaObject return > ICEDTEA PLUGIN: Instance::SetWindow > IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... > Initialization failed. SetWindow returning From langel at redhat.com Tue Mar 24 11:25:59 2009 From: langel at redhat.com (Lillian Angel) Date: Tue, 24 Mar 2009 18:25:59 +0000 Subject: changeset in /hg/icedtea6: 2009-03-24 Lillian Angel changeset 294a48a8e60a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=294a48a8e60a description: 2009-03-24 Lillian Angel * patches/icedtea-lcms.patch: Reworked to patch lcms sources with most recent upstream version (1.18). diffstat: 2 files changed, 6294 insertions(+), 102 deletions(-) ChangeLog | 5 patches/icedtea-lcms.patch | 6391 +++++++++++++++++++++++++++++++++++++++++++- diffs (truncated from 6627 to 500 lines): diff -r e091113be80d -r 294a48a8e60a ChangeLog --- a/ChangeLog Tue Mar 24 14:15:51 2009 +0000 +++ b/ChangeLog Tue Mar 24 14:25:53 2009 -0400 @@ -1,3 +1,8 @@ 2009-03-24 Andrew John Hughes + + * patches/icedtea-lcms.patch: Reworked to patch lcms sources with most + recent upstream version (1.18). + 2009-03-24 Andrew John Hughes * patches/icedtea-6536193.patch, diff -r e091113be80d -r 294a48a8e60a patches/icedtea-lcms.patch --- a/patches/icedtea-lcms.patch Tue Mar 24 14:15:51 2009 +0000 +++ b/patches/icedtea-lcms.patch Tue Mar 24 14:25:53 2009 -0400 @@ -1,49 +1,1931 @@ ---- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/lcms.h 2008-11-25 04:06:04.000000000 -0500 -+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/lcms.h 2009-03-20 11:12:53.000000000 -0400 -@@ -1445,7 +1445,17 @@ +diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2008-11-25 04:06:03.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2009-03-24 14:11:33.000000000 -0400 +@@ -29,7 +29,7 @@ + // + // + // Little cms +-// Copyright (C) 1998-2006 Marti Maria ++// Copyright (C) 1998-2007 Marti Maria + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -51,7 +51,7 @@ + + + +-// CIECAM 02 appearance model ++// CIECAM 02 appearance model. Many thanks to Jordi Vilar for the debugging. + + #include "lcms.h" + +@@ -196,6 +196,10 @@ + clr.RGBpa[i] = (400.0 * temp) / (temp + 27.13) + 0.1; + } + } ++ ++ clr.A = (((2.0 * clr.RGBpa[0]) + clr.RGBpa[1] + ++ (clr.RGBpa[2] / 20.0)) - 0.305) * pMod->Nbb; ++ + return clr; + } + +@@ -249,9 +253,6 @@ + clr.H = 300 + ((100*((clr.h - 237.53)/1.2)) / temp); + } + +- clr.A = (((2.0 * clr.RGBpa[0]) + clr.RGBpa[1] + +- (clr.RGBpa[2] / 20.0)) - 0.305) * pMod->Nbb; +- + clr.J = 100.0 * pow((clr.A / pMod->adoptedWhite.A), + (pMod->c * pMod->z)); + +@@ -395,7 +396,7 @@ + LPcmsCIECAM02 lpMod; + + +- if((lpMod = (LPcmsCIECAM02) malloc(sizeof(cmsCIECAM02))) == NULL) { ++ if((lpMod = (LPcmsCIECAM02) _cmsMalloc(sizeof(cmsCIECAM02))) == NULL) { + return (LCMSHANDLE) NULL; + } + +@@ -449,14 +450,19 @@ + lpMod -> z = compute_z(lpMod); + lpMod -> Nbb = computeNbb(lpMod); + lpMod -> FL = computeFL(lpMod); ++ ++ if (lpMod -> D == D_CALCULATE || ++ lpMod -> D == D_CALCULATE_DISCOUNT) { ++ + lpMod -> D = computeD(lpMod); ++ } ++ + lpMod -> Ncb = lpMod -> Nbb; + + lpMod -> adoptedWhite = XYZtoCAT02(lpMod -> adoptedWhite); + lpMod -> adoptedWhite = ChromaticAdaptation(lpMod -> adoptedWhite, lpMod); + lpMod -> adoptedWhite = CAT02toHPE(lpMod -> adoptedWhite); + lpMod -> adoptedWhite = NonlinearCompression(lpMod -> adoptedWhite, lpMod); +- lpMod -> adoptedWhite = ComputeCorrelates(lpMod -> adoptedWhite, lpMod); + + return (LCMSHANDLE) lpMod; + +@@ -465,7 +471,7 @@ + void LCMSEXPORT cmsCIECAM02Done(LCMSHANDLE hModel) + { + LPcmsCIECAM02 lpMod = (LPcmsCIECAM02) (LPSTR) hModel; +- if (lpMod) free(lpMod); ++ if (lpMod) _cmsFree(lpMod); + } + + +diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2008-11-25 04:06:03.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2009-03-24 14:16:55.000000000 -0400 +@@ -29,7 +29,7 @@ + // + // + // Little cms +-// Copyright (C) 1998-2006 Marti Maria ++// Copyright (C) 1998-2007 Marti Maria + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -174,7 +174,7 @@ + LCMSAPI void LCMSEXPORT cmsCIECAM97sDone(LCMSHANDLE hModel) + { + LPcmsCIECAM97s lpMod = (LPcmsCIECAM97s) (LPSTR) hModel; +- if (lpMod) free(lpMod); ++ if (lpMod) _cmsFree(lpMod); + } + + // Partial discounting for adaptation degree computation +@@ -331,7 +331,7 @@ + LPcmsCIECAM97s lpMod; + VEC3 tmp; + +- if((lpMod = (LPcmsCIECAM97s) malloc(sizeof(cmsCIECAM97s))) == NULL) { ++ if((lpMod = (LPcmsCIECAM97s) _cmsMalloc(sizeof(cmsCIECAM97s))) == NULL) { + return (LCMSHANDLE) NULL; + } + +@@ -449,7 +449,7 @@ + + // RGB_subw = [MlamRigg][WP/YWp] + #ifdef USE_CIECAM97s2 +- MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, (LPVEC3) &lpMod -> WP); ++ MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, &lpMod -> WP); + #else + VEC3divK(&tmp, (LPVEC3) &lpMod -> WP, lpMod->WP.Y); + MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, &tmp); +diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c +--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2008-11-25 04:06:03.000000000 -0500 ++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2009-03-24 14:17:09.000000000 -0400 +@@ -29,7 +29,7 @@ + // + // + // Little cms +-// Copyright (C) 1998-2006 Marti Maria ++// Copyright (C) 1998-2007 Marti Maria + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -65,22 +65,25 @@ + // Persistence + LCMSAPI LCMSHANDLE LCMSEXPORT cmsIT8LoadFromFile(const char* cFileName); + LCMSAPI LCMSHANDLE LCMSEXPORT cmsIT8LoadFromMem(void *Ptr, size_t len); +-LCMSAPI BOOL LCMSEXPORT cmsIT8SaveToFile(LCMSHANDLE IT8, const char* cFileName); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SaveToFile(LCMSHANDLE IT8, const char* cFileName); + + // Properties + LCMSAPI const char* LCMSEXPORT cmsIT8GetSheetType(LCMSHANDLE hIT8); +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetSheetType(LCMSHANDLE hIT8, const char* Type); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetSheetType(LCMSHANDLE hIT8, const char* Type); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetComment(LCMSHANDLE hIT8, const char* cComment); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetComment(LCMSHANDLE hIT8, const char* cComment); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetPropertyStr(LCMSHANDLE hIT8, const char* cProp, const char *Str); +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetPropertyDbl(LCMSHANDLE hIT8, const char* cProp, double Val); +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetPropertyHex(LCMSHANDLE hIT8, const char* cProp, int Val); +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetPropertyUncooked(LCMSHANDLE hIT8, const char* Key, const char* Buffer); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetPropertyStr(LCMSHANDLE hIT8, const char* cProp, const char *Str); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetPropertyDbl(LCMSHANDLE hIT8, const char* cProp, double Val); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetPropertyHex(LCMSHANDLE hIT8, const char* cProp, int Val); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetPropertyMulti(LCMSHANDLE hIT8, const char* cProp, const char* cSubProp, const char *Val); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetPropertyUncooked(LCMSHANDLE hIT8, const char* Key, const char* Buffer); + + LCMSAPI const char* LCMSEXPORT cmsIT8GetProperty(LCMSHANDLE hIT8, const char* cProp); + LCMSAPI double LCMSEXPORT cmsIT8GetPropertyDbl(LCMSHANDLE hIT8, const char* cProp); +-LCMSAPI int LCMSEXPORT cmsIT8EnumProperties(LCMSHANDLE IT8, char ***PropertyNames); ++LCMSAPI const char* LCMSEXPORT cmsIT8GetPropertyMulti(LCMSHANDLE hIT8, const char* cProp, const char *cSubProp); ++LCMSAPI int LCMSEXPORT cmsIT8EnumProperties(LCMSHANDLE IT8, const char ***PropertyNames); ++LCMSAPI int LCMSEXPORT cmsIT8EnumPropertyMulti(LCMSHANDLE hIT8, const char* cProp, const char*** SubpropertyNames); + + // Datasets + +@@ -89,10 +92,10 @@ + LCMSAPI const char* LCMSEXPORT cmsIT8GetDataRowCol(LCMSHANDLE IT8, int row, int col); + LCMSAPI double LCMSEXPORT cmsIT8GetDataRowColDbl(LCMSHANDLE IT8, int col, int row); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataRowCol(LCMSHANDLE hIT8, int row, int col, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataRowCol(LCMSHANDLE hIT8, int row, int col, + const char* Val); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataRowColDbl(LCMSHANDLE hIT8, int row, int col, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataRowColDbl(LCMSHANDLE hIT8, int row, int col, + double Val); + + LCMSAPI const char* LCMSEXPORT cmsIT8GetData(LCMSHANDLE IT8, const char* cPatch, const char* cSample); +@@ -100,15 +103,15 @@ + + LCMSAPI double LCMSEXPORT cmsIT8GetDataDbl(LCMSHANDLE IT8, const char* cPatch, const char* cSample); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetData(LCMSHANDLE IT8, const char* cPatch, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetData(LCMSHANDLE IT8, const char* cPatch, + const char* cSample, + const char *Val); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataDbl(LCMSHANDLE hIT8, const char* cPatch, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataDbl(LCMSHANDLE hIT8, const char* cPatch, + const char* cSample, + double Val); + +-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataFormat(LCMSHANDLE IT8, int n, const char *Sample); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataFormat(LCMSHANDLE IT8, int n, const char *Sample); + LCMSAPI int LCMSEXPORT cmsIT8EnumDataFormat(LCMSHANDLE IT8, char ***SampleNames); + + LCMSAPI void LCMSEXPORT cmsIT8DefineDblFormat(LCMSHANDLE IT8, const char* Formatter); +@@ -126,7 +129,7 @@ + // #define STRICT_CGATS 1 + + #define MAXID 128 // Max lenght of identifier +-#define MAXSTR 255 // Max lenght of string ++#define MAXSTR 1024 // Max lenght of string + #define MAXTABLES 255 // Max Number of tables in a single stream + #define MAXINCLUDE 20 // Max number of nested includes + +@@ -137,6 +140,9 @@ + + #ifndef NON_WINDOWS + #include ++#define DIR_CHAR '\\' ++#else ++#define DIR_CHAR '/' #endif - } - -- -+LCMS_INLINE void* _cmsCalloc(size_t nmemb, size_t size) + + // Symbols +@@ -160,6 +166,7 @@ + SEND_DATA, + SEND_DATA_FORMAT, + SKEYWORD, ++ SDATA_FORMAT_ID, + SINCLUDE + + } SYMBOL; +@@ -171,7 +178,8 @@ + WRITE_UNCOOKED, + WRITE_STRINGIFY, + WRITE_HEXADECIMAL, +- WRITE_BINARY ++ WRITE_BINARY, ++ WRITE_PAIR + + } WRITEMODE; + +@@ -181,6 +189,8 @@ + + struct _KeyVal* Next; + char* Keyword; // Name of variable ++ struct _KeyVal* NextSubkey; // If key is a dictionary, points to the next item ++ char* Subkey; // If key is a dictionary, points to the subkey name + char* Value; // Points to value + WRITEMODE WriteAs; // How to write the value + +@@ -220,7 +230,12 @@ + + } TABLE, *LPTABLE; + ++// File stream being parsed + ++typedef struct _FileContext { ++ char FileName[MAX_PATH]; // File name if being readed from file ++ FILE* Stream; // File stream or NULL if holded in memory ++ } FILECTX, *LPFILECTX; + + // This struct hold all information about an openened + // IT8 handler. Only one dataset is allowed. +@@ -257,9 +272,9 @@ + char* Source; // Points to loc. being parsed + int lineno; // line counter for error reporting + +- char FileName[MAX_PATH]; // File name if being readed from file +- FILE* Stream[MAXINCLUDE]; // File stream or NULL if holded in memory ++ LPFILECTX FileStack[MAXINCLUDE]; // Stack of files being parsed + int IncludeSP; // Include Stack Pointer ++ + char* MemoryBlock; // The stream if holded in memory + + char DoubleFormatter[MAXID]; // Printf-like 'double' formatter +@@ -298,6 +313,7 @@ + {".INCLUDE", SINCLUDE}, + {"BEGIN_DATA", SBEGIN_DATA }, + {"BEGIN_DATA_FORMAT", SBEGIN_DATA_FORMAT }, ++ {"DATA_FORMAT_IDENTIFIER", SDATA_FORMAT_ID}, + {"END_DATA", SEND_DATA}, + {"END_DATA_FORMAT", SEND_DATA_FORMAT}, + {"KEYWORD", SKEYWORD} +@@ -308,49 +324,94 @@ + + // Predefined properties + +-static const char* PredefinedProperties[] = { ++// A property ++typedef struct { ++ const char *id; ++ WRITEMODE as; ++ } PROPERTY; ++ ++static PROPERTY PredefinedProperties[] = { + +- "NUMBER_OF_FIELDS", // Required - NUMBER OF FIELDS +- "NUMBER_OF_SETS", // Required - NUMBER OF SETS +- "ORIGINATOR", // Required - Identifies the specific system, organization or individual that created the data file. +- "FILE_DESCRIPTOR", // Required - Describes the purpose or contents of the data file. +- "CREATED", // Required - Indicates date of creation of the data file. +- "DESCRIPTOR", // Required - Describes the purpose or contents of the data file. +- "DIFFUSE_GEOMETRY", // The diffuse geometry used. Allowed values are "sphere" or "opal". +- "MANUFACTURER", +- "MANUFACTURE", // Some broken Fuji targets does store this value +- "PROD_DATE", // Identifies year and month of production of the target in the form yyyy:mm. +- "SERIAL", // Uniquely identifies individual physical target. ++ {"NUMBER_OF_FIELDS", WRITE_UNCOOKED}, // Required - NUMBER OF FIELDS ++ {"NUMBER_OF_SETS", WRITE_UNCOOKED}, // Required - NUMBER OF SETS ++ {"ORIGINATOR", WRITE_STRINGIFY}, // Required - Identifies the specific system, organization or individual that created the data file. ++ {"FILE_DESCRIPTOR", WRITE_STRINGIFY}, // Required - Describes the purpose or contents of the data file. ++ {"CREATED", WRITE_STRINGIFY}, // Required - Indicates date of creation of the data file. ++ {"DESCRIPTOR", WRITE_STRINGIFY}, // Required - Describes the purpose or contents of the data file. ++ {"DIFFUSE_GEOMETRY", WRITE_STRINGIFY}, // The diffuse geometry used. Allowed values are "sphere" or "opal". ++ {"MANUFACTURER", WRITE_STRINGIFY}, ++ {"MANUFACTURE", WRITE_STRINGIFY}, // Some broken Fuji targets does store this value ++ {"PROD_DATE", WRITE_STRINGIFY}, // Identifies year and month of production of the target in the form yyyy:mm. ++ {"SERIAL", WRITE_STRINGIFY}, // Uniquely identifies individual physical target. + +- "MATERIAL", // Identifies the material on which the target was produced using a code ++ {"MATERIAL", WRITE_STRINGIFY}, // Identifies the material on which the target was produced using a code + // uniquely identifying th e material. This is intend ed to be used for IT8.7 + // physical targets only (i.e . IT8.7/1 a nd IT8.7/2). + +- "INSTRUMENTATION", // Used to report the specific instrumentation used (manufacturer and ++ {"INSTRUMENTATION", WRITE_STRINGIFY}, // Used to report the specific instrumentation used (manufacturer and + // model number) to generate the data reported. This data will often + // provide more information about the particular data collected than an + // extensive list of specific details. This is particularly important for + // spectral data or data derived from spectrophotometry. + +- "MEASUREMENT_SOURCE", // Illumination used for spectral measurements. This data helps provide ++ {"MEASUREMENT_SOURCE", WRITE_STRINGIFY}, // Illumination used for spectral measurements. This data helps provide + // a guide to the potential for issues of paper fluorescence, etc. + +- "PRINT_CONDITIONS", // Used to define the characteristics of the printed sheet being reported. ++ {"PRINT_CONDITIONS", WRITE_STRINGIFY}, // Used to define the characteristics of the printed sheet being reported. + // Where standard conditions have been defined (e.g., SWOP at nominal) + // named conditions may suffice. Otherwise, detailed information is + // needed. + +- "SAMPLE_BACKING", // Identifies the backing material used behind the sample during +- // measurement. Allowed values are ?black?, ?white?, or "na". ++ {"SAMPLE_BACKING", WRITE_STRINGIFY}, // Identifies the backing material used behind the sample during ++ // measurement. Allowed values are ?black?, ?white?, or {"na". + +- "CHISQ_DOF" // Degrees of freedom associated with the Chi squared statistic ++ {"CHISQ_DOF", WRITE_STRINGIFY}, // Degrees of freedom associated with the Chi squared statistic ++ ++// new in recent specs: ++ {"MEASUREMENT_GEOMETRY", WRITE_STRINGIFY}, // The type of measurement, either reflection or transmission, should be indicated ++ // along with details of the geometry and the aperture size and shape. For example, ++ // for transmission measurements it is important to identify 0/diffuse, diffuse/0, ++ // opal or integrating sphere, etc. For reflection it is important to identify 0/45, ++ // 45/0, sphere (specular included or excluded), etc. ++ ++ {"FILTER", WRITE_STRINGIFY}, // Identifies the use of physical filter(s) during measurement. Typically used to ++ // denote the use of filters such as none, D65, Red, Green or Blue. ++ ++ {"POLARIZATION", WRITE_STRINGIFY}, // Identifies the use of a physical polarization filter during measurement. Allowed ++ // values are {"yes?, ?white?, ?none? or ?na?. ++ ++ {"WEIGHTING_FUNCTION", WRITE_PAIR}, // Indicates such functions as: the CIE standard observer functions used in the ++ // calculation of various data parameters (2 degree and 10 degree), CIE standard ++ // illuminant functions used in the calculation of various data parameters (e.g., D50, ++ // D65, etc.), density status response, etc. If used there shall be at least one ++ // name-value pair following the WEIGHTING_FUNCTION tag/keyword. The first attribute ++ // in the set shall be {"name" and shall identify the particular parameter used. ++ // The second shall be {"value" and shall provide the value associated with that name. ++ // For ASCII data, a string containing the Name and Value attribute pairs shall follow ++ // the weighting function keyword. A semi-colon separates attribute pairs from each ++ // other and within the attribute the name and value are separated by a comma. ++ ++ {"COMPUTATIONAL_PARAMETER", WRITE_PAIR}, // Parameter that is used in computing a value from measured data. Name is the name ++ // of the calculation, parameter is the name of the parameter used in the calculation ++ // and value is the value of the parameter. ++ ++ {"TARGET_TYPE", WRITE_STRINGIFY}, // The type of target being measured, e.g. IT8.7/1, IT8.7/3, user defined, etc. ++ ++ {"COLORANT", WRITE_STRINGIFY}, // Identifies the colorant(s) used in creating the target. ++ ++ {"TABLE_DESCRIPTOR", WRITE_STRINGIFY}, // Describes the purpose or contents of a data table. ++ ++ {"TABLE_NAME", WRITE_STRINGIFY} // Provides a short name for a data table. + }; + +-#define NUMPREDEFINEDPROPS (sizeof(PredefinedProperties)/sizeof(char *)) ++#define NUMPREDEFINEDPROPS (sizeof(PredefinedProperties)/sizeof(PROPERTY)) + + + // Predefined sample types on dataset + static const char* PredefinedSampleID[] = { ++ "SAMPLE_ID", // Identifies sample that data represents ++ "STRING", // Identifies label, or other non-machine readable value. ++ // Value must begin and end with a " symbol + + "CMYK_C", // Cyan component of CMYK data expressed as a percentage + "CMYK_M", // Magenta component of CMYK data expressed as a percentage +@@ -378,7 +439,7 @@ + "LAB_B", // b* component of Lab data + "LAB_C", // C*ab component of Lab data + "LAB_H", // hab component of Lab data +- "LAB_DE" // CIE dE ++ "LAB_DE", // CIE dE + "LAB_DE_94", // CIE dE using CIE 94 + "LAB_DE_CMC", // dE using CMC + "LAB_DE_2000", // CIE dE using CIE DE 2000 +@@ -388,7 +449,7 @@ + "STDEV_Y", // Standard deviation of Y (tristimulus data) + "STDEV_Z", // Standard deviation of Z (tristimulus data) + "STDEV_L", // Standard deviation of L* +- "STDEV_A" // Standard deviation of a* ++ "STDEV_A", // Standard deviation of a* + "STDEV_B", // Standard deviation of b* + "STDEV_DE", // Standard deviation of CIE dE + "CHI_SQD_PAR"}; // The average of the standard deviations of L*, a* and b*. It is +@@ -397,9 +458,13 @@ + + #define NUMPREDEFINEDSAMPLEID (sizeof(PredefinedSampleID)/sizeof(char *)) + ++//Forward declaration of some internal functions ++static ++void* AllocChunk(LPIT8 it8, size_t size); ++ + // Checks if c is a separator + static +-BOOL isseparator(int c) ++LCMSBOOL isseparator(int c) + { + return (c == ' ') || (c == '\t') || (c == '\r'); + } +@@ -405,49 +470,107 @@ + } + + // Checks whatever if c is a valid identifier char +- + static +-BOOL ismiddle(int c) ++LCMSBOOL ismiddle(int c) + { + return (!isseparator(c) && (c != '#') && (c !='\"') && (c != '\'') && (c > 32) && (c < 127)); + } + + // Checks whatsever if c is a valid identifier middle char. + static +-BOOL isidchar(int c) ++LCMSBOOL isidchar(int c) + { + return isalnum(c) || ismiddle(c); + } + + // Checks whatsever if c is a valid identifier first char. + static +-BOOL isfirstidchar(int c) ++LCMSBOOL isfirstidchar(int c) + { + return !isdigit(c) && ismiddle(c); + } + ++// checks whether the supplied path looks like an absolute path ++// NOTE: this function doesn't checks if the path exists or even if it's legal ++static ++LCMSBOOL isabsolutepath(const char *path) +{ -+ size_t alloc = nmemb * size; -+ if (size == 0) { -+ return malloc(0); ++ if(path == NULL) ++ return FALSE; ++ ++ if(path[0] == DIR_CHAR) ++ return TRUE; ++ ++#ifndef NON_WINDOWS ++ if(isalpha(path[0]) && path[1] == ':') ++ return TRUE; ++#endif ++ return FALSE; ++} ++ ++// Makes a file path based on a given reference path ++// NOTE: buffer is assumed to point to at least MAX_PATH bytes ++// NOTE: both relPath and basePath are assumed to be no more than MAX_PATH characters long (including the null terminator!) From langel at redhat.com Tue Mar 24 11:27:37 2009 From: langel at redhat.com (Lillian Angel) Date: Tue, 24 Mar 2009 14:27:37 -0400 Subject: Upgraded lcms to 1.18 Message-ID: <49C92619.1080803@redhat.com> Hi, I just upgraded lcms to 1.18 (sources taken from the package in Fedora) and applied the patch below. 2009-03-24 Lillian Angel * patches/icedtea-lcms.patch: Reworked to patch lcms sources with most recent upstream version (1.18). diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c --- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c 2008-11-25 04:06:03.000000000 -0500 +++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c 2009-03-24 13:18:16.000000000 -0400 @@ -361,7 +361,7 @@ profile = (cmsHPROFILE) sProf.pf; dataArray = (*env)->GetByteArrayElements(env, data, 0); tagSize =(*env)->GetArrayLength(env, data); - _cmsModifyTagData(profile, (icTagSignature) tagSig, dataArray, tagSize); + _cmsInitTag(profile, (icTagSignature) tagSig, dataArray, tagSize); (*env)->ReleaseByteArrayElements(env, data, dataArray, 0); } From bugzilla-daemon at icedtea.classpath.org Tue Mar 24 12:05:18 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 24 Mar 2009 19:05:18 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #15 from thebohemian at gmx.net 2009-03-24 19:05 ------- With llvm 2.5 the JVM immediately crashes. However that reminded me of the situation when I got sharkt to work with llvm 2.4 first. The trouble is that shark cannot cope with the situation in which it does not get a default JIT compiler. If it is not available it will simply segfault (since the respective variable holding the JIT compiler instance is null). The reason for the JIT compiler not being there is very simple: The object code containing it was not linked in. :( In LLVM 2.5 they changed what 'llvm-config --libs' returns again. Now 'nativecodegen engine' does not contain machine-specific stuff anymore. You need to tell it 'armcodegen' or the like. I think it is inconvenient for icedtea's configure to contain the logic to pull in the right backend. I will file a bug at llvm's BT and see whether they can do it like it was before. -- 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 g.koppen at jondos.de Tue Mar 24 14:36:25 2009 From: g.koppen at jondos.de (Georg Koppen) Date: Tue, 24 Mar 2009 22:36:25 +0100 Subject: IcedTea-Plugin: Initialization failed In-Reply-To: <20090324160324.GB16802@redhat.com> References: <49C8DA96.5030201@jondos.de> <20090324160324.GB16802@redhat.com> Message-ID: <49C95259.2030005@jondos.de> Hi Deepak, I downloaded this one: http://icedtea.classpath.org/download/source/icedtea6-1.4.1.tar.gz maybe one or two days ago. I just finished compiling IcedTea using http://icedtea.classpath.org/hg/icedtea6 and now the Plugin does it's job. Thanks for your work! Georg Deepak Bhole schrieb: > * Georg Koppen [2009-03-24 09:06]: >> Hi, >> >> I recently downloaded icedtea6-1.4.1 and built it succesfully (running >> ./configure && make) on my debian lenny. I linked the IcedTeaPlugin.so >> to ${HOME}/.mozilla/plugins and started Iceweasel. Well, the plugin was >> obviously recognised by the browser, so I tried to load some applets. >> But I failed. After waiting a while I got always the same page as before >> launching the applet. Starting Iceweasel from the commandline didn't >> reveal anything: there was no output, no crash, nothing. >> > > When did you check it out? There was an error in tagging and it has been > retagged recently... > > Deepak > >> I set ICEDTEPLUGIN_DEBUG=true and started Iceweasel again. This time I >> got a lot of output which says basically that instance XYZ is waiting >> for initialization and is always failing. >> >> I attached a file with the whole output. I tested serveral applets and >> got similar results. >> >> Other plugins (that from sun, the one from the debian repository or the >> one integrated in the konqueror) work pretty fine. >> >> Does anybody know where I got wrong and how I could solve my problem? >> >> Georg > >> ???ICEDTEA PLUGIN: Factory::IcedTeaPluginFactory >> CONSTRUCTING FACTORY >> ICEDTEAPLUGIN_DEBUG = true >> ICEDTEA PLUGIN: Factory::IcedTeaPluginFactory return >> ICEDTEA PLUGIN: Factory::Initialize >> ICEDTEA PLUGIN: Factory::Initialize: using /home/strulli/Georg/Arbeit/Computersicherheit/Internetanon/JAP/Arbeit/JavaApplet/icedtea6-1.4.1/openjdk/control/build/linux-i586/j2re-image/lib/i386/../../bin/java >> ICEDTEA PLUGIN: thread manager >> ICEDTEA PLUGIN: current thread >> Initializing JVM... >> ICEDTEA PLUGIN: get component manager >> ICEDTEA PLUGIN: liveconnect >> ICEDTEA PLUGIN: thread manager >> ICEDTEA PLUGIN: Instance::StartAppletviewer >> ICEDTEA PLUGIN: get component manager >> ICEDTEA PLUGIN: create local file >> ICEDTEA PLUGIN: init with path >> ICEDTEA PLUGIN: create process >> ICEDTEA PLUGIN: init process >> ICEDTEA PLUGIN: clearing old input fifo (if any): /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin >> ICEDTEA PLUGIN: creating input fifo: /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin >> ICEDTEA PLUGIN: created input fifo: /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin >> ICEDTEA PLUGIN: got confirmation that appletviewer is running >> ICEDTEA PLUGIN: clearing old output fifo (if any): /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer >> ICEDTEA PLUGIN: creating output fifo: /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer >> ICEDTEA PLUGIN: created output fifo: /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer >> ICEDTEA PLUGIN: run process >> ICEDTEA PLUGIN: Instance::StartAppletviewer return >> ICEDTEA PLUGIN: started appletviewer >> ICEDTEA PLUGIN: Factory::Initialize return >> ICEDTEA PLUGIN: Factory::CreateSecureEnv >> ICEDTEA PLUGIN: JNIEnv::IcedTeaJNIEnv >> ICEDTEA PLUGIN: JNIEnv::IcedTeaJNIEnv return >> CREATESECUREENV >> ICEDTEA PLUGIN: Factory::CreateSecureEnv return >> ICEDTEA PLUGIN: Factory::CreateInstance >> ICEDTEA PLUGIN: Instance::IcedTeaPluginInstance >> ICEDTEA PLUGIN: Instance::IcedTeaPluginInstance return >> ICEDTEA PLUGIN: Factory::CreateInstance return >> ICEDTEA PLUGIN: Instance::Initialize >> TAG FROM BROWSER = instance 1 tag http://www.javatester.org/version.html >> >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer >> Writing to JVM: instance 1 tag http://www.javatester.org/version.html >> Wrote 223 bytes to pipe >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer return >> SETTING PEER!!!: 0x9b90120 >> DONE SETTING PEER!!!: 0x9b90120 >> ICEDTEA PLUGIN: Instance::Initialize return >> NOT IMPLEMENTED: virtual nsresult IcedTeaPluginInstance::Start() >> ICEDTEA PLUGIN: Instance::GetValue >> ICEDTEA PLUGIN: Instance::GetValue return >> GETTING PEER!!!: 0x9b90120 >> DONE GETTING PEER!!!: 0x9b90120, 0x9b90120 >> ICEDTEA PLUGIN: Factory::GetValue >> ICEDTEA PLUGIN: Factory::GetValue return >> ICEDTEA PLUGIN: Instance::GetValue >> ICEDTEA PLUGIN: Instance::GetValue return >> ICEDTEA PLUGIN: Instance::SetWindow >> ICEDTEA PLUGIN: Instance::SetWindow: setting window. >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer >> Writing to JVM: instance 1 handle 33555732 >> Wrote 27 bytes to pipe >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer return >> ICEDTEA PLUGIN: Instance::SetWindow return >> ICEDTEA PLUGIN: Instance::GetJavaObject >> IcedTeaPluginInstance::GetJavaObject: Instance 0x9b86c88 waiting for initialization... >> ICEDTEA PLUGIN: Instance::SetWindow >> IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... >> Initialization for instance 1 has timed out. Marking it void >> ICEDTEA PLUGIN: Instance::SetWindow return >> ICEDTEA PLUGIN: Instance::SetWindow >> IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... >> Initialization failed. SetWindow returning >> ICEDTEA PLUGIN: Instance::SetWindow return >> IcedTeaPluginInstance::GetJavaObject: Initialization for instance 1 has timed out. Marking it void >> ICEDTEA PLUGIN: Instance::GetJavaObject return >> ICEDTEA PLUGIN: Instance::SetWindow >> IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... >> Initialization failed. SetWindow returning > > From dbhole at redhat.com Tue Mar 24 14:42:18 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 24 Mar 2009 17:42:18 -0400 Subject: IcedTea-Plugin: Initialization failed In-Reply-To: <49C95259.2030005@jondos.de> References: <49C8DA96.5030201@jondos.de> <20090324160324.GB16802@redhat.com> <49C95259.2030005@jondos.de> Message-ID: <20090324214218.GA7508@redhat.com> * Georg Koppen [2009-03-24 17:36]: > Hi Deepak, > > I downloaded this one: > > http://icedtea.classpath.org/download/source/icedtea6-1.4.1.tar.gz > > maybe one or two days ago. > I just finished compiling IcedTea using > > http://icedtea.classpath.org/hg/icedtea6 > > and now the Plugin does it's job. Thanks for your work! > Ah okay, cool! Deepak > Georg > > > Deepak Bhole schrieb: > > * Georg Koppen [2009-03-24 09:06]: > >> Hi, > >> > >> I recently downloaded icedtea6-1.4.1 and built it succesfully (running > >> ./configure && make) on my debian lenny. I linked the IcedTeaPlugin.so > >> to ${HOME}/.mozilla/plugins and started Iceweasel. Well, the plugin was > >> obviously recognised by the browser, so I tried to load some applets. > >> But I failed. After waiting a while I got always the same page as before > >> launching the applet. Starting Iceweasel from the commandline didn't > >> reveal anything: there was no output, no crash, nothing. > >> > > > > When did you check it out? There was an error in tagging and it has been > > retagged recently... > > > > Deepak > > > >> I set ICEDTEPLUGIN_DEBUG=true and started Iceweasel again. This time I > >> got a lot of output which says basically that instance XYZ is waiting > >> for initialization and is always failing. > >> > >> I attached a file with the whole output. I tested serveral applets and > >> got similar results. > >> > >> Other plugins (that from sun, the one from the debian repository or the > >> one integrated in the konqueror) work pretty fine. > >> > >> Does anybody know where I got wrong and how I could solve my problem? > >> > >> Georg > > > >> ???ICEDTEA PLUGIN: Factory::IcedTeaPluginFactory > >> CONSTRUCTING FACTORY > >> ICEDTEAPLUGIN_DEBUG = true > >> ICEDTEA PLUGIN: Factory::IcedTeaPluginFactory return > >> ICEDTEA PLUGIN: Factory::Initialize > >> ICEDTEA PLUGIN: Factory::Initialize: using /home/strulli/Georg/Arbeit/Computersicherheit/Internetanon/JAP/Arbeit/JavaApplet/icedtea6-1.4.1/openjdk/control/build/linux-i586/j2re-image/lib/i386/../../bin/java > >> ICEDTEA PLUGIN: thread manager > >> ICEDTEA PLUGIN: current thread > >> Initializing JVM... > >> ICEDTEA PLUGIN: get component manager > >> ICEDTEA PLUGIN: liveconnect > >> ICEDTEA PLUGIN: thread manager > >> ICEDTEA PLUGIN: Instance::StartAppletviewer > >> ICEDTEA PLUGIN: get component manager > >> ICEDTEA PLUGIN: create local file > >> ICEDTEA PLUGIN: init with path > >> ICEDTEA PLUGIN: create process > >> ICEDTEA PLUGIN: init process > >> ICEDTEA PLUGIN: clearing old input fifo (if any): /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin > >> ICEDTEA PLUGIN: creating input fifo: /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin > >> ICEDTEA PLUGIN: created input fifo: /home/strulli/.icedteaplugin/icedtea-appletviewer-to-plugin > >> ICEDTEA PLUGIN: got confirmation that appletviewer is running > >> ICEDTEA PLUGIN: clearing old output fifo (if any): /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer > >> ICEDTEA PLUGIN: creating output fifo: /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer > >> ICEDTEA PLUGIN: created output fifo: /home/strulli/.icedteaplugin/icedtea-plugin-to-appletviewer > >> ICEDTEA PLUGIN: run process > >> ICEDTEA PLUGIN: Instance::StartAppletviewer return > >> ICEDTEA PLUGIN: started appletviewer > >> ICEDTEA PLUGIN: Factory::Initialize return > >> ICEDTEA PLUGIN: Factory::CreateSecureEnv > >> ICEDTEA PLUGIN: JNIEnv::IcedTeaJNIEnv > >> ICEDTEA PLUGIN: JNIEnv::IcedTeaJNIEnv return > >> CREATESECUREENV > >> ICEDTEA PLUGIN: Factory::CreateSecureEnv return > >> ICEDTEA PLUGIN: Factory::CreateInstance > >> ICEDTEA PLUGIN: Instance::IcedTeaPluginInstance > >> ICEDTEA PLUGIN: Instance::IcedTeaPluginInstance return > >> ICEDTEA PLUGIN: Factory::CreateInstance return > >> ICEDTEA PLUGIN: Instance::Initialize > >> TAG FROM BROWSER = instance 1 tag http://www.javatester.org/version.html > >> > >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer > >> Writing to JVM: instance 1 tag http://www.javatester.org/version.html > >> Wrote 223 bytes to pipe > >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer return > >> SETTING PEER!!!: 0x9b90120 > >> DONE SETTING PEER!!!: 0x9b90120 > >> ICEDTEA PLUGIN: Instance::Initialize return > >> NOT IMPLEMENTED: virtual nsresult IcedTeaPluginInstance::Start() > >> ICEDTEA PLUGIN: Instance::GetValue > >> ICEDTEA PLUGIN: Instance::GetValue return > >> GETTING PEER!!!: 0x9b90120 > >> DONE GETTING PEER!!!: 0x9b90120, 0x9b90120 > >> ICEDTEA PLUGIN: Factory::GetValue > >> ICEDTEA PLUGIN: Factory::GetValue return > >> ICEDTEA PLUGIN: Instance::GetValue > >> ICEDTEA PLUGIN: Instance::GetValue return > >> ICEDTEA PLUGIN: Instance::SetWindow > >> ICEDTEA PLUGIN: Instance::SetWindow: setting window. > >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer > >> Writing to JVM: instance 1 handle 33555732 > >> Wrote 27 bytes to pipe > >> ICEDTEA PLUGIN: Instance::SendMessageToAppletViewer return > >> ICEDTEA PLUGIN: Instance::SetWindow return > >> ICEDTEA PLUGIN: Instance::GetJavaObject > >> IcedTeaPluginInstance::GetJavaObject: Instance 0x9b86c88 waiting for initialization... > >> ICEDTEA PLUGIN: Instance::SetWindow > >> IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... > >> Initialization for instance 1 has timed out. Marking it void > >> ICEDTEA PLUGIN: Instance::SetWindow return > >> ICEDTEA PLUGIN: Instance::SetWindow > >> IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... > >> Initialization failed. SetWindow returning > >> ICEDTEA PLUGIN: Instance::SetWindow return > >> IcedTeaPluginInstance::GetJavaObject: Initialization for instance 1 has timed out. Marking it void > >> ICEDTEA PLUGIN: Instance::GetJavaObject return > >> ICEDTEA PLUGIN: Instance::SetWindow > >> IcedTeaPluginInstance::SetWindow: Instance 0x9b86c88 waiting for initialization... > >> Initialization failed. SetWindow returning > > > > > From bugzilla-daemon at icedtea.classpath.org Tue Mar 24 18:53:42 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 25 Mar 2009 01:53:42 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #16 from thebohemian at gmx.net 2009-03-25 01:53 ------- Ok, good news. If I force that 'asmcodegen' is added to the build I get something that works better than before (for ARM): root at beagleboard:~# java HelloWorld Hello World! root at beagleboard:~# java -version java version "1.6.0_0" IcedTea6 1.4 Runtime Environment (build 1.6.0_0-b14) OpenJDK Shark VM (build 14.0-b08, mixed mode) Running and ending a trivial hello world program successfully was not even possible with llvm 2.4. For bigger stuff you get an error: root at beagleboard:~# java -cp bsh.jar bsh.Interpreter Cannot yet select: 0x92b08: i32,ch = AtomicCmpSwap 0x920e4, 0x92860, 0x92ca0, 0xe2d30 <0x36faac:0> alignment=4 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 25 03:37:26 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 25 Mar 2009 10:37:26 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #17 from thebohemian at gmx.net 2009-03-25 10:37 ------- Here are the PRs I reported for LLVM 2.5: ARM-specific problem: http://llvm.org/bugs/show_bug.cgi?id=3881 Build problem of LLVM itself (possibly only interesting for distro packagers): http://llvm.org/bugs/show_bug.cgi?id=3882 Inconvenient use of the llvm components: http://llvm.org/bugs/show_bug.cgi?id=3883 -- 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 25 03:44:44 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 25 Mar 2009 10:44:44 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 ------- Comment #18 from thebohemian at gmx.net 2009-03-25 10:44 ------- Forget comment #17. I confused the URLs. Here are the PRs I reported for LLVM 2.5: ARM-specific problem: http://llvm.org/bugs/show_bug.cgi?id=3877 Build problem of LLVM itself (possibly only interesting for distro packagers): http://llvm.org/bugs/show_bug.cgi?id=3881 Serious problem for projects that compile against llvm when this has been built using the new cmake-based build system: http://llvm.org/bugs/show_bug.cgi?id=3882 Inconvenient use of the llvm components: http://llvm.org/bugs/show_bug.cgi?id=3883 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Wed Mar 25 04:22:15 2009 From: langel at redhat.com (Lillian Angel) Date: Wed, 25 Mar 2009 07:22:15 -0400 Subject: Status: March 25, 2009 Message-ID: <49CA13E7.9000202@redhat.com> Last Week: -------------- - Created and built java-1.4.2-ibm-sap rpms into brew - Looked into lcms issue. Original patch applied from SUSE was incorrect. Updated OpenJDK's library to lcms 1.18, and this solves the problem. - Applied all other unembargoed security patches from Sun - Updated java-1.6.0-openjdk in RHEL-5, F9, F10, F11. (TCK testing needed) - Investigated Rhino bug. https://bugzilla.redhat.com/show_bug.cgi?id=457336 - Looked into other security issues. - java-1.6.0-ibm packaging. - JavaOne stuff - A little bit of Eclipse debugging. - Other minor bug clean up. Next Week: ---------------- - java-1.5.0-sun packaging - java-1.6.0-sun packaging - Rhino bug. https://bugzilla.redhat.com/show_bug.cgi?id=457336 - aot-compile-rpm bug. https://bugzilla.redhat.com/show_bug.cgi?id=491436 Lillian From langel at redhat.com Wed Mar 25 04:24:00 2009 From: langel at redhat.com (Lillian Angel) Date: Wed, 25 Mar 2009 07:24:00 -0400 Subject: Status: March 25, 2009 In-Reply-To: <49CA13E7.9000202@redhat.com> References: <49CA13E7.9000202@redhat.com> Message-ID: <49CA1450.5070409@redhat.com> This was sent to the wrong list... Please ignore. Lillian Angel wrote: > Last Week: > -------------- > - Created and built java-1.4.2-ibm-sap rpms into brew > - Looked into lcms issue. Original patch applied from SUSE was > incorrect. Updated OpenJDK's library to lcms 1.18, and this solves the > problem. > - Applied all other unembargoed security patches from Sun > - Updated java-1.6.0-openjdk in RHEL-5, F9, F10, F11. (TCK testing > needed) > - Investigated Rhino bug. > https://bugzilla.redhat.com/show_bug.cgi?id=457336 > - Looked into other security issues. > - java-1.6.0-ibm packaging. > - JavaOne stuff > - A little bit of Eclipse debugging. > - Other minor bug clean up. > > Next Week: > ---------------- > - java-1.5.0-sun packaging > - java-1.6.0-sun packaging > - Rhino bug. https://bugzilla.redhat.com/show_bug.cgi?id=457336 > - aot-compile-rpm bug. https://bugzilla.redhat.com/show_bug.cgi?id=491436 > > > Lillian From gnu_andrew at member.fsf.org Wed Mar 25 06:47:09 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 25 Mar 2009 13:47:09 +0000 Subject: FOSDEM 2009: IcedTea Plugin Talk Recording Available Message-ID: <17c6771e0903250647j2470f130ne55fd7f4db8b4d21@mail.gmail.com> You can now find Deepak's talk on 'The IcedTea Plugin' here: http://www.archive.org/details/fosdem_2009_free_java_the_icedtea_plugin Blurb from Deepak (http://fosdem.org/2009/schedule/events/java_icedtea_plugin): 'This talk is about the IcedTea Java Web Browser Plugin. It will be mostly technical -- starting off with the need for the plugin and it's history. It will then delve into the elements of plugin design, and implementation details affecting speed, security and reliability. Finally, it will also cover known limitations, and future plans to fix those limitations.' It's available under the Creative Commons Attribution No-Derivative license (http://creativecommons.org/licenses/by-nd/2.0/uk/). ?Please feel free to distribute copies under those terms. Thanks to Deepak Bhole for allowing this to be made available. If there are any issues with the publication of these talks, please contact me ASAP. More to come in time and with appropriate permissions, -- 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 iivan at redhat.com Wed Mar 25 07:29:34 2009 From: iivan at redhat.com (Ioana Ivan) Date: Wed, 25 Mar 2009 14:29:34 +0000 Subject: changeset in /hg/icedtea6: 2009-03-24 Ioana Ivan changeset e1c8ba1bfa74 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e1c8ba1bfa74 description: 2009-03-24 Ioana Ivan * patches/icedtea-timezone.patch: Makes java only look for time zone information in /etc/sysconfig/clock if /etc/localtime is not found * Makefile.am: apply patch diffstat: 4 files changed, 206 insertions(+) ChangeLog | 6 + HACKING | 2 Makefile.am | 1 patches/icedtea-timezone.patch | 197 ++++++++++++++++++++++++++++++++++++++++ diffs (237 lines): diff -r 294a48a8e60a -r e1c8ba1bfa74 ChangeLog --- a/ChangeLog Tue Mar 24 14:25:53 2009 -0400 +++ b/ChangeLog Tue Mar 24 23:53:12 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-24 Lillian Angel + * patches/icedtea-timezone.patch: Makes java only look for time zone + information in /etc/sysconfig/clock if /etc/localtime is not found + * Makefile.am: apply patch + + 2009-03-24 Lillian Angel * patches/icedtea-lcms.patch: Reworked to patch lcms sources with most diff -r 294a48a8e60a -r e1c8ba1bfa74 HACKING --- a/HACKING Tue Mar 24 14:25:53 2009 -0400 +++ b/HACKING Tue Mar 24 23:53:12 2009 -0400 @@ -96,6 +96,8 @@ 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-timezone.patch : Makes java only look for time zone information in /etc/sysconfig/clock if /etc/localtime is not found (fix + for rh-489586) The following patches are only applied to OpenJDK in IcedTea: diff -r 294a48a8e60a -r e1c8ba1bfa74 Makefile.am --- a/Makefile.am Tue Mar 24 14:25:53 2009 -0400 +++ b/Makefile.am Tue Mar 24 23:53:12 2009 -0400 @@ -529,6 +529,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-rmi_amd64.patch \ patches/icedtea-tools.patch \ patches/icedtea-demos.patch \ + patches/icedtea-timezone.patch \ patches/icedtea-use-system-tzdata.patch \ patches/icedtea-headers.patch \ patches/hotspot/$(HSBUILD)/icedtea-headers.patch \ diff -r 294a48a8e60a -r e1c8ba1bfa74 patches/icedtea-timezone.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-timezone.patch Tue Mar 24 23:53:12 2009 -0400 @@ -0,0 +1,197 @@ +--- openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c 2008-11-25 04:06:19.000000000 -0500 ++++ openjdk/jdk/src/solaris/native/java/util/TimeZone_md_new.c 2009-03-24 12:08:35.000000000 -0400 +@@ -201,115 +201,105 @@ + size_t size; + + /* +- * First, try the ZONE entry in /etc/sysconfig/clock. However, the +- * ZONE entry is not set up after initial Red Hat Linux +- * installation. In case that /etc/localtime is set up without +- * using timeconfig, there might be inconsistency between +- * /etc/localtime and the ZONE entry. The inconsistency between +- * timeconfig and linuxconf is reported as a bug in the Red Hat +- * web page as of May 1, 2000. ++ * First, try /etc/localtime to find the zone ID. + */ +- if ((fp = fopen(sysconfig_clock_file, "r")) != NULL) { +- char line[256]; +- +- while (fgets(line, sizeof(line), fp) != NULL) { +- char *p = line; +- char *s; ++ if (lstat(defailt_zoneinfo_file, &statbuf) == -1) { ++ ++ /* If /etc/localtime doesn't exist, try /etc/sysconfig/clock */ ++ if ((fp = fopen(sysconfig_clock_file, "r")) != NULL) { ++ char line[256]; ++ ++ while (fgets(line, sizeof(line), fp) != NULL) { ++ char *p = line; ++ char *s; + +- SKIP_SPACE(p); +- if (*p != 'Z') { +- continue; +- } +- if (strncmp(p, "ZONE=\"", 6) == 0) { +- p += 6; +- } else { +- /* +- * In case we need to parse it token by token. +- */ +- if (strncmp(p, "ZONE", 4) != 0) { ++ SKIP_SPACE(p); ++ if (*p != 'Z') { + continue; + } +- p += 4; +- SKIP_SPACE(p); +- if (*p++ != '=') { +- break; ++ if (strncmp(p, "ZONE=\"", 6) == 0) { ++ p += 6; ++ } else { ++ /* ++ * In case we need to parse it token by token. ++ */ ++ if (strncmp(p, "ZONE", 4) != 0) { ++ continue; ++ } ++ p += 4; ++ SKIP_SPACE(p); ++ if (*p++ != '=') { ++ break; ++ } ++ SKIP_SPACE(p); ++ if (*p++ != '"') { ++ break; ++ } + } +- SKIP_SPACE(p); +- if (*p++ != '"') { ++ for (s = p; *s && *s != '"'; s++) ++ ; ++ if (*s != '"') { ++ /* this ZONE entry is broken. */ + break; + } +- } +- for (s = p; *s && *s != '"'; s++) +- ; +- if (*s != '"') { +- /* this ZONE entry is broken. */ ++ *s = '\0'; ++ tz = strdup(p); + break; + } +- *s = '\0'; +- tz = strdup(p); +- break; +- } +- (void) fclose(fp); +- if (tz != NULL) { ++ (void) fclose(fp); + return tz; + } +- } ++ } else { + +- /* +- * Next, try /etc/localtime to find the zone ID. +- */ +- if (lstat(defailt_zoneinfo_file, &statbuf) == -1) { +- return NULL; +- } ++ /* ++ * If it's a symlink, get the link name and its zone ID part. (The ++ * older versions of timeconfig created a symlink as described in ++ * the Red Hat man page. It was changed in 1999 to create a copy ++ * of a zoneinfo file. It's no longer possible to get the zone ID ++ * from /etc/localtime.) ++ */ ++ if (S_ISLNK(statbuf.st_mode)) { ++ char linkbuf[PATH_MAX+1]; ++ int len; ++ ++ if ((len = readlink(defailt_zoneinfo_file, linkbuf, sizeof(linkbuf)-1)) == -1) { ++ jio_fprintf(stderr, (const char *) "can't get a symlink of %s\n", ++ defailt_zoneinfo_file); ++ return NULL; ++ } ++ linkbuf[len] = '\0'; ++ tz = getZoneName(linkbuf); ++ if (tz != NULL) { ++ tz = strdup(tz); ++ } ++ return tz; ++ } + +- /* +- * If it's a symlink, get the link name and its zone ID part. (The +- * older versions of timeconfig created a symlink as described in +- * the Red Hat man page. It was changed in 1999 to create a copy +- * of a zoneinfo file. It's no longer possible to get the zone ID +- * from /etc/localtime.) +- */ +- if (S_ISLNK(statbuf.st_mode)) { +- char linkbuf[PATH_MAX+1]; +- int len; +- +- if ((len = readlink(defailt_zoneinfo_file, linkbuf, sizeof(linkbuf)-1)) == -1) { +- jio_fprintf(stderr, (const char *) "can't get a symlink of %s\n", +- defailt_zoneinfo_file); ++ /* ++ * If it's a regular file, we need to find out the same zoneinfo file ++ * that has been copied as /etc/localtime. ++ */ ++ size = (size_t) statbuf.st_size; ++ buf = (char *) malloc(size); ++ if (buf == NULL) { + return NULL; + } +- linkbuf[len] = '\0'; +- tz = getZoneName(linkbuf); +- if (tz != NULL) { +- tz = strdup(tz); ++ if ((fd = open(defailt_zoneinfo_file, O_RDONLY)) == -1) { ++ free((void *) buf); ++ return NULL; + } +- return tz; +- } + +- /* +- * If it's a regular file, we need to find out the same zoneinfo file +- * that has been copied as /etc/localtime. +- */ +- size = (size_t) statbuf.st_size; +- buf = (char *) malloc(size); +- if (buf == NULL) { +- return NULL; +- } +- if ((fd = open(defailt_zoneinfo_file, O_RDONLY)) == -1) { +- free((void *) buf); +- return NULL; +- } +- +- if (read(fd, buf, size) != (ssize_t) size) { ++ if (read(fd, buf, size) != (ssize_t) size) { ++ (void) close(fd); ++ free((void *) buf); ++ return NULL; ++ } + (void) close(fd); ++ ++ tz = findZoneinfoFile(buf, size, zoneinfo_dir); + free((void *) buf); +- return NULL; ++ return tz; + } +- (void) close(fd); +- +- tz = findZoneinfoFile(buf, size, zoneinfo_dir); +- free((void *) buf); +- return tz; + } + #else + #ifdef __solaris__ From iivan at redhat.com Wed Mar 25 08:21:40 2009 From: iivan at redhat.com (Ioana Ivan) Date: Wed, 25 Mar 2009 15:21:40 +0000 Subject: changeset in /hg/icedtea6: 2009-03-24 Ioana Ivan changeset 5b2572b5389f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5b2572b5389f description: 2009-03-24 Ioana Ivan * patches/icedtea-timezone.patch: Fixed header diffstat: 1 file changed, 2 insertions(+), 2 deletions(-) patches/icedtea-timezone.patch | 4 ++-- diffs (11 lines): diff -r e1c8ba1bfa74 -r 5b2572b5389f patches/icedtea-timezone.patch --- a/patches/icedtea-timezone.patch Tue Mar 24 23:53:12 2009 -0400 +++ b/patches/icedtea-timezone.patch Wed Mar 25 11:21:24 2009 -0400 @@ -1,5 +1,5 @@ ---- openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c 2008-11-25 04:06:19.000000000 -0500 -+++ openjdk/jdk/src/solaris/native/java/util/TimeZone_md_new.c 2009-03-24 12:08:35.000000000 -0400 +--- openjdk/jdk/src/solaris/native/java/util/TimeZone_md_old.c 2008-11-25 04:06:19.000000000 -0500 ++++ openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c 2009-03-24 12:08:35.000000000 -0400 @@ -201,115 +201,105 @@ size_t size; From iivan at redhat.com Wed Mar 25 11:03:28 2009 From: iivan at redhat.com (Ioana Ivan) Date: Wed, 25 Mar 2009 14:03:28 -0400 (EDT) Subject: [FYI] fix time zone bug -rh/489586 In-Reply-To: <1129263231.1525881238004110304.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> Message-ID: <339060168.1525971238004208279.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> Hi, This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=489586 by having getPlatformTimeZoneID() in jdk/src/solaris/native/java/util/TimeZone_md.c first try to use /etc/localtime to determine the time zone, and only use /etc/sysconfig/clock if /etc/localtime doesn't exist. -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-timezone.patch Type: text/x-patch Size: 6523 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090325/543afef8/icedtea-timezone.patch From bugzilla-daemon at icedtea.classpath.org Thu Mar 26 02:37:53 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 26 Mar 2009 09:37:53 +0000 Subject: [Bug 309] llvm: use --cxxflags not --cflags Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=309 ------- Comment #2 from gbenson at redhat.com 2009-03-26 09:37 ------- This looks good, please feel free to commit 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 theBohemian at gmx.net Thu Mar 26 13:30:00 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Thu, 26 Mar 2009 21:30:00 +0100 Subject: the ARM and the Shark Message-ID: <49CBE5C8.7020607@gmx.net> Behold! Starring: LLVM 2.5 OpenJDK Hotspot (Zero+Shark) from IcedTea 1.4.1 Special guest: Beagleboard (armv7a -> Cortex A8 -> OMAP3530) root at beagleboard:~# java -XX:+PrintCompilation HelloWorld 1 java.lang.String::equals (88 bytes) Hello World! No crash here. :) root at beagleboard:~# ./azureus 1 java.lang.String::equals (88 bytes) 2 java.lang.String::hashCode (60 bytes) 3 java.lang.String::indexOf (151 bytes) file:/usr/share/java/Azureus2.jar ; file:/usr/share/java/swt-gtk-3.4.jar ; 4file:/home/root/ ! sun.nio.cs.US_ASCII$Encoder::encodeArrayLoop (279 bytes) 5 java.lang.String::lastIndexOf (156 bytes) 6 java.lang.String::charAt (33 bytes) 7 java.util.Properties$LineReader::readLine (452 bytes) 8 java.util.Properties::loadConvert (505 bytes) Cannot yet select: 0x8ed18: i32,ch = AtomicCmpSwap 0x8e2f4, 0x8ea70, 0x8eeb0, 0xdf2a8 <0x11844c:0> alignment=4 Aborted Now is that cool or is that cool? :) LLVM is really compiling things and running them. For little 'enterprise applications' like HelloWorld it is already enough to get through it without problems. The error message that causes the VM to crash when running Azureus is caused by LLVM not providing ways to implement a certain atomic compare and swap function (the so-called llvm.atomic.cmp.swap.i32 intrinsic). Xerxes Ranby and me are currently fight^H^H^H^H^H trying to understand how to implement this in LLVM. From the looks of it the MIPS backend of LLVM also does not have atomic function support. So if anyone on this list is interested in Shark + ARM/MIPS/your toaster, we are desperately in need of help. :D Regards Robert -------------- 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/20090326/ccb7c964/signature.asc From theBohemian at gmx.net Thu Mar 26 17:46:56 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Fri, 27 Mar 2009 01:46:56 +0100 Subject: the ARM and the Shark In-Reply-To: <49CBE5C8.7020607@gmx.net> References: <49CBE5C8.7020607@gmx.net> Message-ID: <49CC2200.3080902@gmx.net> Hi, Robert Schuster schrieb: > Xerxes Ranby and me are currently fight^H^H^H^H^H trying to understand > how to implement this in LLVM. Xerxes had the cool idea for hack that allows us to work around the missing atomic functions: Instead of generating a call to the @llvm.atomic.cmp.swap intrinsic we create one that calls the arm_compare_and_swap function that zero already defines. We'll let you hear how good that works out. Regards Robert -------------- 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/20090327/297c1b1e/signature.asc From mjw at redhat.com Fri Mar 27 05:31:55 2009 From: mjw at redhat.com (Mark Wielaard) Date: Fri, 27 Mar 2009 13:31:55 +0100 Subject: Patch: Add simple systemtap tracing support Message-ID: <1238157115.3994.26.camel@fedora.wildebeest.org> Hi, This patch adds simple systemtap tracing support. Stan Cox made it so that systemtap can reuse dtrace dynamic static markers almost without any changes to the sources. This patch simply cleans up the parts of the code that relied on dtrace markers being something solaris specific and introduces the DTRACE_ENABLED flag for gnu/linux builds. 2009-03-27 Mark Wielaard * patches/icedtea-systemtap.patch: New patch. * configure.ac: Add AC_ARG_ENABLE systemtap and AC_CHECK_HEADER for sys/sdt.h when --enable-systemtap given. * Makefile.am: Add patches/icedtea-systemtap.patch to ICEDTEA_PATCHES if ENABLE_SYSTEMTAP. This requires a pretty recent systemtap build, so it is disabled by default. Enable it with configure --enable-systemtap. There is still some work to do to enable more interesting probes. For now the jni provider and the compiled method load/unload probes are disabled. They need some tweaks to get compiled with the gcc preprocessor. Also the nmethod support for generated code dtrace probes isn't there yet. This needs some extra magic and currently relies on dtrace.h which we don't provide with systemtap. But you can already probe for the other things from the hotspot and hsprivate collections like class loading/unloading, vm init/begin/end and shutdown, thread start/stop, gc and mempool events, monitors events (when running with -XX:+ExtendedDTraceProbes). See the hotspot and hsprivate .d files under hotspot/src/os/solaris/dtrace for more details. The jhelper.d (stack traces) utilities aren't support yet. When all of this is cleaned up, I will also submit upstream. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: systemtap.patch Type: text/x-patch Size: 8122 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090327/9b8832dc/systemtap.patch From mjw at redhat.com Fri Mar 27 05:32:35 2009 From: mjw at redhat.com (Mark Wielaard) Date: Fri, 27 Mar 2009 12:32:35 +0000 Subject: changeset in /hg/icedtea6: * patches/icedtea-systemtap.patch: Ne... Message-ID: changeset 8dd3adfcadf9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8dd3adfcadf9 description: * patches/icedtea-systemtap.patch: New patch. * configure.ac: Add AC_ARG_ENABLE systemtap and AC_CHECK_HEADER for sys/sdt.h when --enable-systemtap given. * Makefile.am: Add patches/icedtea-systemtap.patch to ICEDTEA_PATCHES if ENABLE_SYSTEMTAP. diffstat: 4 files changed, 189 insertions(+), 1 deletion(-) ChangeLog | 10 ++ Makefile.am | 4 configure.ac | 14 +++ patches/icedtea-systemtap.patch | 162 +++++++++++++++++++++++++++++++++++++++ diffs (232 lines): diff -r 5b2572b5389f -r 8dd3adfcadf9 ChangeLog --- a/ChangeLog Wed Mar 25 11:21:24 2009 -0400 +++ b/ChangeLog Fri Mar 27 13:10:15 2009 +0100 @@ -1,8 +1,16 @@ 2009-03-24 Ioana Ivan + + * patches/icedtea-systemtap.patch: New patch. + * configure.ac: Add AC_ARG_ENABLE systemtap and AC_CHECK_HEADER + for sys/sdt.h when --enable-systemtap given. + * Makefile.am: Add patches/icedtea-systemtap.patch to + ICEDTEA_PATCHES if ENABLE_SYSTEMTAP. + 2009-03-24 Ioana Ivan + * patches/icedtea-timezone.patch: Makes java only look for time zone information in /etc/sysconfig/clock if /etc/localtime is not found * Makefile.am: apply patch - 2009-03-24 Lillian Angel diff -r 5b2572b5389f -r 8dd3adfcadf9 Makefile.am --- a/Makefile.am Wed Mar 25 11:21:24 2009 -0400 +++ b/Makefile.am Fri Mar 27 13:10:15 2009 +0100 @@ -673,6 +673,10 @@ ICEDTEA_PATCHES += patches/icedtea-nio2. ICEDTEA_PATCHES += patches/icedtea-nio2.patch endif +if ENABLE_SYSTEMTAP +ICEDTEA_PATCHES += patches/icedtea-systemtap.patch +endif + ICEDTEA_PATCHES += \ patches/icedtea-demo-swingapplet.patch \ patches/icedtea-awt-window-size.patch \ diff -r 5b2572b5389f -r 8dd3adfcadf9 configure.ac --- a/configure.ac Wed Mar 25 11:21:24 2009 -0400 +++ b/configure.ac Fri Mar 27 13:10:15 2009 +0100 @@ -164,6 +164,14 @@ AC_ARG_ENABLE([nio2], [ENABLE_NIO2="${enableval}"], [ENABLE_NIO2='no']) AM_CONDITIONAL([ENABLE_NIO2], [test x$ENABLE_NIO2 = xyes]) AC_MSG_RESULT(${ENABLE_NIO2}) + +AC_MSG_CHECKING([whether to include systemtap tracing support]) +AC_ARG_ENABLE([systemtap], + [AS_HELP_STRING([--enable-systemtap], + [Enable inclusion of systemtap trace support])], + [ENABLE_SYSTEMTAP="${enableval}"], [ENABLE_SYSTEMTAP='no']) +AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$ENABLE_SYSTEMTAP = xyes]) +AC_MSG_RESULT(${ENABLE_SYSTEMTAP}) AC_MSG_CHECKING(how many parallel build jobs to execute) AC_ARG_WITH([parallel-jobs], @@ -350,6 +358,12 @@ Try installing libXrender-devel or confi fi fi +if test "x${ENABLE_SYSTEMTAP}" = xyes; then +AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'], + [SDT_H_FOUND='no'; + AC_MSG_ERROR([systemtap support needs sys/sdt.h header])]) +fi + dnl Check for libpng headers and libraries. PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes] ,[LIBPNG_FOUND=no]) diff -r 5b2572b5389f -r 8dd3adfcadf9 patches/icedtea-systemtap.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-systemtap.patch Fri Mar 27 13:10:15 2009 +0100 @@ -0,0 +1,162 @@ +diff -r 945bf7540697 make/linux/makefiles/dtrace.make +--- openjdk/hotspot/make/linux/makefiles/dtrace.make Thu Jan 22 14:42:01 2009 -0800 ++++ openjdk/hotspot/make/linux/makefiles/dtrace.make Mon Feb 02 13:47:34 2009 +0100 +@@ -25,3 +25,7 @@ + # Linux does not build jvm_db + LIBJVM_DB = + ++# But it does have a Systemtap dtrace compatible sys/sdt.h ++CFLAGS += -DDTRACE_ENABLED ++ ++# It doesn't support HAVE_DTRACE_H though. +diff -r 945bf7540697 src/share/vm/code/nmethod.cpp +--- openjdk/hotspot/src/share/vm/code/nmethod.cpp Thu Jan 22 14:42:01 2009 -0800 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Mon Feb 02 13:47:34 2009 +0100 +@@ -22,6 +22,14 @@ + * + */ + ++#ifdef __GNUC__ ++// GCC seems to have some trouble with the inserted probes. ++// error: _probe_compiled__method__unload causes a section type conflict ++// error: compiled__method__unload_probe_name causes a section type conflict ++// So disable probe insertion for now. ++#undef DTRACE_ENABLED ++#endif ++ + # include "incls/_precompiled.incl" + # include "incls/_nmethod.cpp.incl" + +diff -r 945bf7540697 src/share/vm/prims/jni.cpp +--- openjdk/hotspot/src/share/vm/prims/jni.cpp Thu Jan 22 14:42:01 2009 -0800 ++++ openjdk/hotspot/src/share/vm/prims/jni.cpp Mon Feb 02 13:47:34 2009 +0100 +@@ -22,6 +22,12 @@ + * + */ + ++#ifdef __GNUC__ ++// Unfortunately the gcc c preprocessor doesn't like some of the ++// FP_SELECT defines below, so for now we make sure to disable them. ++#undef DTRACE_ENABLED ++#endif ++ + # include "incls/_precompiled.incl" + # include "incls/_jni.cpp.incl" + +diff -r 945bf7540697 src/share/vm/utilities/dtrace.hpp +--- openjdk/hotspot/src/share/vm/utilities/dtrace.hpp Thu Jan 22 14:42:01 2009 -0800 ++++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp Mon Feb 02 13:47:34 2009 +0100 +@@ -1,5 +1,6 @@ + /* + * Copyright 2005-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 +@@ -22,14 +23,14 @@ + * + */ + +-#if defined(SOLARIS) && defined(DTRACE_ENABLED) ++#if defined(DTRACE_ENABLED) + + #include + + #define DTRACE_ONLY(x) x + #define NOT_DTRACE(x) + +-#else // ndef SOLARIS || ndef DTRACE_ENABLED ++#else // ndef DTRACE_ENABLED + + #define DTRACE_ONLY(x) + #define NOT_DTRACE(x) x +@@ -40,9 +41,15 @@ + #define DTRACE_PROBE3(a,b,c,d,e) {;} + #define DTRACE_PROBE4(a,b,c,d,e,f) {;} + #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} ++#define DTRACE_PROBE6(a,b,c,d,e,f,g,h) {;} ++#define DTRACE_PROBE7(a,b,c,d,e,f,g,h,i) {;} ++#define DTRACE_PROBE8(a,b,c,d,e,f,g,h,i,j) {;} ++#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;} + + #endif + ++#if defined(SOLARIS) ++// Solaris dtrace needs actual extern function decls. + #define HS_DTRACE_PROBE_FN(provider,name)\ + __dtrace_##provider##___##name + +@@ -50,6 +57,13 @@ + DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) + #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ + DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) ++#else ++// Systemtap dtrace compatible probes on GNU/Linux don't. ++#define HS_DTRACE_PROBE_FN(provider,name) ++ ++#define HS_DTRACE_PROBE_DECL_N(provider,name,args) ++#define HS_DTRACE_PROBE_CDECL_N(provider,name,args) ++#endif + + /* Dtrace probe declarations */ + #define HS_DTRACE_PROBE_DECL(provider,name) \ +@@ -91,6 +105,8 @@ + #define HS_DTRACE_PROBE_N(provider,name, args) \ + DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args) + ++#if defined(SOLARIS) ++// Solaris dtrace uses actual function calls. + #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) + #define HS_DTRACE_PROBE0(provider,name)\ + HS_DTRACE_PROBE_N(provider,name,()) +@@ -123,3 +139,27 @@ + HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ + (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ + (uintptr_t)a8,(uintptr_t)a9)) ++#else ++// Systemtap dtrace compatible probes on GNU/Linux use direct macros. ++#define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) ++#define HS_DTRACE_PROBE0(provider,name)\ ++ DTRACE_PROBE(provider,name) ++#define HS_DTRACE_PROBE1(provider,name,a0)\ ++ DTRACE_PROBE1(provider,name,a0) ++#define HS_DTRACE_PROBE2(provider,name,a0,a1)\ ++ DTRACE_PROBE2(provider,name,a0,a1) ++#define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\ ++ DTRACE_PROBE3(provider,name,a0,a1,a2) ++#define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\ ++ DTRACE_PROBE4(provider,name,a0,a1,a2,a3) ++#define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\ ++ DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4) ++#define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\ ++ DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5) ++#define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\ ++ DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6) ++#define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\ ++ DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7) ++#define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\ ++ DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8) ++#endif +--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-03-04 14:39:43.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2009-03-04 22:11:37.000000000 +0100 +@@ -2272,16 +2272,16 @@ + FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false); + FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true); + } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) { +-#ifdef SOLARIS ++#ifdef DTRACE_ENABLED + FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true); + FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true); + FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true); + FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true); +-#else // ndef SOLARIS ++#else // ndef DTRACE_ENABLED + jio_fprintf(defaultStream::error_stream(), +- "ExtendedDTraceProbes flag is only applicable on Solaris\n"); ++ "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n"); + return JNI_EINVAL; +-#endif // ndef SOLARIS ++#endif // ndef DTRACE_ENABLED + } else + #ifdef ASSERT + if (match_option(option, "-XX:+FullGCALot", &tail)) { From omajid at redhat.com Fri Mar 27 07:22:10 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 27 Mar 2009 10:22:10 -0400 Subject: [RFC] Fix socket.Connect() to throw a NoRouteToHostException when given an unreachable ip address Message-ID: <49CCE112.2020800@redhat.com> Hi, When using connect() in non-blocking mode, it can return an error other than EINPROGRESS immediately if there is no route to the host specified. The current implementation throws a ConnectException in this case. The Java program calling socket.Connect() receives a ConnectException instead of a NoRouteToHostException. The attached patch adds a check to deal with this case. The java/net/ipv6tests/TcpTest.java JTreg (jdk) test now passes with this fix for me. Changelog: 2009-03-27 Omair Majid * patches/icedtea-network-unreachable.patch: New file. Check for EHOSTUNREACH and ENETUNREACH early on when establishing a connection. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: connect.patch Type: text/x-patch Size: 2942 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090327/3118570f/connect.patch From bugzilla-daemon at icedtea.classpath.org Fri Mar 27 11:48:54 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 27 Mar 2009 18:48:54 +0000 Subject: [Bug 309] llvm: use --cxxflags not --cflags Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=309 ------- Comment #3 from thebohemian at gmx.net 2009-03-27 18:48 ------- Hi Gary, I dont have rw access to icedtea's repository. Here is my changelog: 2009-03-27 Robert Schuster * configure.ac: Use --cxxflags instead of --cflags for llvm-config. -- 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 27 11:50:43 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 27 Mar 2009 18:50:43 +0000 Subject: [Bug 309] llvm: use --cxxflags not --cflags Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=309 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176 is|0 |1 obsolete| | ------- Comment #4 from thebohemian at gmx.net 2009-03-27 18:50 ------- Created an attachment (id=178) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=178&action=view) use llvm-config's --cxxflags instead of --cflags (+ changelog) Here is the patch, updated to work against revision 8dd3adfcadf9 and including the changelog entry. -- 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 27 18:35:00 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 01:35:00 +0000 Subject: [Bug 310] New: icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 Summary: icedtea6: icedtea patch to disable sanity checks Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: thebohemian at gmx.net This is the first patch I would like to contribute to the IcedTea project and which it should add the list of patches that are applied during the build. The patch modifies the Sanity.gmk makefiles in a way that it will not build and run a little program to check the alsa and the cups version. It also takes out a 'sane-motif' target which does some motif checking. I wonder why this is still there at all since motif is no requirement any more. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Mar 27 18:38:32 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 01:38:32 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 ------- Comment #1 from thebohemian at gmx.net 2009-03-28 01:38 ------- Created an attachment (id=179) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=179&action=view) patch to disable sanity checks This is the patch I am currently using. It removes things unconditionally. It might be needed to add a --disable-sanity-checks configure switch and its handling to make it optional. Just tell me what you would like to see before this can go in. -- 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 theBohemian at gmx.net Fri Mar 27 18:46:12 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Sat, 28 Mar 2009 02:46:12 +0100 Subject: first iceadtea cross-compile patch: disable sanity checks Message-ID: <49CD8164.7090608@gmx.net> Hi, I just posted the first icedtea patch that needs to be applied during the and which makes cross-compiling easier. All details are here: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 I can imagine that you will not want to take it in this simple form. On the other hand I don't want to fix things before knowing what you really want. :) So, the patch is open for discussion. Regards Robert -------------- 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/20090328/33cf566b/signature.asc From theBohemian at gmx.net Fri Mar 27 19:10:18 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Sat, 28 Mar 2009 03:10:18 +0100 Subject: kill the sizers Message-ID: <49CD870A.5030002@gmx.net> Hi, at FOSDEM 09 I had a talk with Twisti about the sizer binaries. I was told that they are the only reason why a rt.jar for amd64 is different from one for x86. Furthermore they will be the major road block in getting cross-compilation support upstream. Yes. Cross-compilation support right in OpenJDK, wouldn't that be cool? In the discussion at FOSDEM that was regarded as likely and a desired ability. (I was generally overwhelmed by the support from all parties for the cross-compilation effort. :) ) Twisti contributed a simple and obvious idea on how to make this: All the constants which the Java code needs should be provided by some native code. The values could be retrieved using a large array and then stored in 'static final' fields. I am currently busy getting all the other patches for cross-compilation in. If you are interested in cross-compiling OpenJDK and want to help somehow, implementing the above proposal would be perfect. :) If no one starts with this I will probably do it. However I won't have time for this for some months and so it will all take much longer. - Please forward this mail to lists where you think interested individual may hang around. :) - Regards Robert -------------- 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/20090328/e82865af/signature.asc From matthew.flaschen at gatech.edu Fri Mar 27 19:22:00 2009 From: matthew.flaschen at gatech.edu (Matthew Flaschen) Date: Fri, 27 Mar 2009 22:22:00 -0400 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <49CD8164.7090608@gmx.net> References: <49CD8164.7090608@gmx.net> Message-ID: <49CD89C8.7040208@gatech.edu> Robert Schuster wrote: > Hi, > I just posted the first icedtea patch that needs to be applied during > the and which makes cross-compiling easier. > > All details are here: > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 > > I can imagine that you will not want to take it in this simple form. On > the other hand I don't want to fix things before knowing what you really > want. :) > > So, the patch is open for discussion. I definitely think it should be optional, as you suggest in a comment. Otherwise, you're making things more difficult for someone building the code for the first time (or building on a new system). Matt Flaschen From bugzilla-daemon at icedtea.classpath.org Sat Mar 28 08:04:59 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 15:04:59 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179 is|0 |1 obsolete| | ------- Comment #2 from thebohemian at gmx.net 2009-03-28 15:04 ------- Created an attachment (id=180) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=180&action=view) icedtea patch to disable sanity checks (optionally) This patch is a variant of attachment #179 which allows disabling certain sanity checks. It does so by checking of the existance of the definition of DISABLE_SANITY_CHECKS. This is, to my knowledge, in the same style as the other OpenJDK makefiles. Subsequently by chosing this approach I am working towards official integration of this patch. -- 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 28 08:35:40 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 15:35:40 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 ------- Comment #3 from thebohemian at gmx.net 2009-03-28 15:35 ------- Created an attachment (id=181) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=181&action=view) icedtea patch to disable sanity checks (optionally) Updated the icedtea patch. The other one had some syntax issue. -- 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 28 08:35:53 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 15:35:53 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180 is|0 |1 obsolete| | -- 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 28 08:38:38 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 15:38:38 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 ------- Comment #4 from thebohemian at gmx.net 2009-03-28 15:38 ------- Created an attachment (id=182) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=182&action=view) patch to allow configuring to disable sanity check This is the actual patch against icedtea that adds a --disable-sanity-checks configure option. This in turn enable that the OpenJDK makefiles are called with 'DISABLE_SANITY_CHECKS=true'. -- 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 28 09:13:13 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 16:13:13 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181 is|0 |1 obsolete| | ------- Comment #5 from thebohemian at gmx.net 2009-03-28 16:13 ------- Created an attachment (id=183) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=183&action=view) icedtea patch to disable sanity checks (optionally) Another whitespace problem related to backslash usage. I am not sure if this ".PHONY::" definition really works this way. I just copied how its done for regular targets. I welcome comments on how to make it better. -- 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 28 09:24:42 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 16:24:42 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 ------- Comment #6 from martinrb at google.com 2009-03-28 16:24 ------- (In reply to comment #4) > Created an attachment (id=182) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=182&action=view) [details] > patch to allow configuring to disable sanity check > > This is the actual patch against icedtea that adds a --disable-sanity-checks > configure option. This in turn enable that the OpenJDK makefiles are called > with 'DISABLE_SANITY_CHECKS=true'. There is already a mechanism INSANE=true to disable all sanity checks. I think this option will inevitably introduce confusion. Perhaps it should be more explicitly named, e.g. --disable-cross-compilation-sanity-checks or perhaps introduce a flag --cross-compile which indicates that none of the built binaries can be run. Is there a precedent with other configure scripts? -- 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 theBohemian at gmx.net Sat Mar 28 09:30:43 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Sat, 28 Mar 2009 17:30:43 +0100 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <49CD89C8.7040208@gatech.edu> References: <49CD8164.7090608@gmx.net> <49CD89C8.7040208@gatech.edu> Message-ID: <49CE50B3.8000107@gmx.net> Hi Matthew, Matthew Flaschen schrieb: > I definitely think it should be optional, as you suggest in a comment. > Otherwise, you're making things more difficult for someone building the > code for the first time (or building on a new system). Done. Please let me know if it is OK that way. There is one thing I would like to have but I don't know how to do it. Autoconf already checks whether one is cross-compiling: configure:3182: checking whether we are cross compiling configure:3184: result: yes In which variable is this result stored and when can I retrieve the value for sure? I want to implement the following algorithm in configure.ac: if (cross-compiling) disable sanity checks by default else if (--disable-sanity-checks was given) disable sanity checks else do sanity check I only have the last part so far but the proposed automatism would be useful, since some of the sanity checks really can't be done when cross-compiling. Well, except if your host can run the target's binaries. Regards Robert -------------- 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/20090328/3ec4d10c/signature.asc From bugzilla-daemon at icedtea.classpath.org Sat Mar 28 10:33:08 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 17:33:08 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182 is|0 |1 obsolete| | ------- Comment #7 from thebohemian at gmx.net 2009-03-28 17:33 ------- Created an attachment (id=184) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=184&action=view) patch to allow configuring cross-compilation support Ok, I changed the option's name and makefiles' definition to something that has to do with cross-compiling. This might be practical for future patches as well. Since all the change I will request have something to do with cross-compilation. The only thing I would like to prevent that people think that icedtea is already cross-compilation safe when it is released next time. That is why I named the option 'experimental-openjdk-cross-compilation'. -- 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 28 10:36:44 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 17:36:44 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183 is|0 |1 obsolete| | ------- Comment #8 from thebohemian at gmx.net 2009-03-28 17:36 ------- Created an attachment (id=185) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=185&action=view) icedtea patch to (optionally) disable cross-compilation incompatible sanity checks Changed the naming inside the makefiles and bring it together with cross-compilation. I did not keep the 'experimental' here since I expect that by the time we can talk about pushing this upstream (where the naming would matter) all patches to make OpenJDK cross-compilation safe will be ready. This will take some time though. The updated patch also fixes an issue with defining '.PHONY:' and '.PHONY::'. -- 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 28 10:37:02 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 17:37:02 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185 is|0 |1 patch| | -- 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 28 10:38:25 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 17:38:25 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 ------- Comment #9 from thebohemian at gmx.net 2009-03-28 17:38 ------- "Is there a precedent with other configure scripts?" No idea. Since it is my hope that cross-compilation support will one be a feature of OpenJDK itself I named it like so. -- 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 28 11:08:23 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 28 Mar 2009 18:08:23 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 thebohemian at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184 is|0 |1 obsolete| | ------- Comment #10 from thebohemian at gmx.net 2009-03-28 18:08 ------- Created an attachment (id=186) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=186&action=view) patch to allow configuring cross-compilation support Now you can use the result of autoconf's built-in cross-compilation check. Also fixes behavior in Makefile.am in regard to ENABLE_CROSS_COMPILATION (was reversed before). -- 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 xerxes at zafena.se Sat Mar 28 15:08:16 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Sat, 28 Mar 2009 23:08:16 +0100 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero Message-ID: <49CE9FD0.6030202@zafena.se> Greetings, This patch will make shark reroute LLVM atomic intrinsics to the existing atomic operations implemented in Zero. This patch are both platform and arch independent. I have tested this patch on Shark compiled for X86, PPC and ARM. The benefit from a porters point of view is that once the atomic operation are implemented in Zero you get the atomic operations needed for Shark for free without having to extend LLVM. I did this mainly because LLVM lacked atomic intrinsics in the ARM backend. Cheers and have a great day! Xerxes -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: icedtea6_sharkBuilder_atomic_reroute_2_zero.patch Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090328/64385744/icedtea6_sharkBuilder_atomic_reroute_2_zero.patch From theBohemian at gmx.net Sat Mar 28 16:03:51 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Sun, 29 Mar 2009 00:03:51 +0100 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49CE9FD0.6030202@zafena.se> References: <49CE9FD0.6030202@zafena.se> Message-ID: <49CEACD7.8040203@gmx.net> Hi Xerxes, Xerxes R?nby schrieb: > Greetings, > This patch will make shark reroute LLVM atomic intrinsics to the > existing atomic operations implemented in Zero. > > This patch are both platform and arch independent. > I have tested this patch on Shark compiled for X86, PPC and ARM. I would make this rerouting optional depending on the architecture. LLVM has atomic intrinsic fucntion support for x86(-64), powerpc (32,64) and alpha. On those architectures you really want to use what LLVM provides. E.g. on x86 the function is converted into a series of machine instructions and no function call. > The benefit from a porters point of view is that once the atomic > operation are implemented in Zero you get the atomic operations needed > for Shark for free without having to extend LLVM. > > I did this mainly because LLVM lacked atomic intrinsics in the ARM backend. Yes, MIPS, ARM and IA64 would clearly benefit from this and should use the rerouting. Regards Robert -------------- 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/20090329/8b0bbdcd/signature.asc From matthew.flaschen at gatech.edu Sat Mar 28 18:05:58 2009 From: matthew.flaschen at gatech.edu (Matthew Flaschen) Date: Sat, 28 Mar 2009 21:05:58 -0400 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <49CE50B3.8000107@gmx.net> References: <49CD8164.7090608@gmx.net> <49CD89C8.7040208@gatech.edu> <49CE50B3.8000107@gmx.net> Message-ID: <49CEC976.8070107@gatech.edu> Robert Schuster wrote: > if (cross-compiling) > disable sanity checks by default > else if (--disable-sanity-checks was given) > disable sanity checks > else > do sanity check I definitely think that's the right approach. As far as automatically detecting cross-compiling, I'm not exactly sure either. I assume you have seen the cross_compiling variable in configure, but like me don't know where it comes from. Matt Flaschen From bugzilla-daemon at icedtea.classpath.org Sun Mar 29 07:18:31 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 29 Mar 2009 14:18:31 +0000 Subject: [Bug 311] New: JAVA-Based programs won't run and craches Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=311 Summary: JAVA-Based programs won't run and craches Product: IcedTea Version: unspecified Platform: PC URL: http://forums.fedoraforum.org/showthread.php?t=218058 OS/Version: Linux Status: NEW Severity: normal Priority: P5 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: mrjava.javaman at gmail.com please read all the details here: http://forums.fedoraforum.org/showthread.php?t=218058 I have two auto generated bug reports how can I attach them? -- 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 Sun Mar 29 07:48:30 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 29 Mar 2009 14:48:30 +0000 Subject: [Bug 311] JAVA-Based programs won't run and craches Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=311 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from mark at klomp.org 2009-03-29 14:48 ------- (In reply to comment #0) > please read all the details here: > http://forums.fedoraforum.org/showthread.php?t=218058 This sounds like: https://bugzilla.redhat.com/show_bug.cgi?id=492018 Which was resolved by upgrading libX11 and imsettings. Please reopen this bug if that doesn't fix your problem. > I have two auto generated bug reports how can I attach them? After a bug is created you can attach files. Just go to the bug and click on "Create a New Attachment". -- 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 Sun Mar 29 08:05:49 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 29 Mar 2009 15:05:49 +0000 Subject: [Bug 311] JAVA-Based programs won't run and craches Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=311 ------- Comment #2 from mrjava.javaman at gmail.com 2009-03-29 15:05 ------- Created an attachment (id=187) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=187&action=view) this file is needed in the bug report file -- 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 Sun Mar 29 08:11:14 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 29 Mar 2009 15:11:14 +0000 Subject: [Bug 311] JAVA-Based programs won't run and craches Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=311 ------- Comment #3 from mrjava.javaman at gmail.com 2009-03-29 15:11 ------- Created an attachment (id=188) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=188&action=view) auto generated bug 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 Sun Mar 29 08:13:41 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 29 Mar 2009 15:13:41 +0000 Subject: [Bug 311] JAVA-Based programs won't run and craches Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=311 mrjava.javaman at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Comment #4 from mrjava.javaman at gmail.com 2009-03-29 15:13 ------- I thought it was fixed and my netbeans returned to run correctly again but, today when working I got the bugreport tool and generated the 2 attached files ... I restarted and re-opened netbeans and it works now, I just wanted to report the attachments hopefully it wont re-generate ... -- 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 aph at redhat.com Sun Mar 29 09:45:19 2009 From: aph at redhat.com (Andrew Haley) Date: Sun, 29 Mar 2009 17:45:19 +0100 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49CEACD7.8040203@gmx.net> References: <49CE9FD0.6030202@zafena.se> <49CEACD7.8040203@gmx.net> Message-ID: <49CFA59F.4030509@redhat.com> Robert Schuster wrote: > Xerxes R?nby schrieb: >> Greetings, >> This patch will make shark reroute LLVM atomic intrinsics to the >> existing atomic operations implemented in Zero. >> >> This patch are both platform and arch independent. >> I have tested this patch on Shark compiled for X86, PPC and ARM. > I would make this rerouting optional depending on the architecture. > LLVM has atomic intrinsic fucntion support for x86(-64), powerpc (32,64) > and alpha. On those architectures you really want to use what LLVM > provides. > > E.g. on x86 the function is converted into a series of machine > instructions and no function call. Definitely; we really don't want a function call just do do an atomic cmpxchg. This is really just a workaround for an llvm bug, and hopefully it'll soon go away. Andrew. From xerxes at zafena.se Sun Mar 29 18:17:44 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 30 Mar 2009 03:17:44 +0200 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49CFA59F.4030509@redhat.com> References: <49CE9FD0.6030202@zafena.se> <49CEACD7.8040203@gmx.net> <49CFA59F.4030509@redhat.com> Message-ID: <49D01DB8.9050007@zafena.se> Andrew Haley skrev: > Robert Schuster wrote: > > >> Xerxes R?nby schrieb: >> >>> Greetings, >>> This patch will make shark reroute LLVM atomic intrinsics to the >>> existing atomic operations implemented in Zero. >>> >>> This patch are both platform and arch independent. >>> I have tested this patch on Shark compiled for X86, PPC and ARM. >>> >> I would make this rerouting optional depending on the architecture. >> LLVM has atomic intrinsic fucntion support for x86(-64), powerpc (32,64) >> and alpha. On those architectures you really want to use what LLVM >> provides. >> >> E.g. on x86 the function is converted into a series of machine >> instructions and no function call. >> > > Definitely; we really don't want a function call just do do an atomic > cmpxchg. This is really just a workaround for an llvm bug, and hopefully > it'll soon go away. > > Andrew. > I have done a small investigation to see how large the cost is to use the reroute patch on PPC. The test machine is a PowerBook G4 1.333Ghz with F10 installed. I used Caffeine Mark 3.0 for this benchmark, why? It is a quick benchmark and it includes some graphics tests so it is quite fun to benchmark with. And not to mention it is fun to see large scores since it is a rather old test. To my surprise one test, the image test, actually performed a little better with the atomic reroute patch applied. The nice attached pdf and ods report contains all hard data with nice graphs and build instructions. For fun I have also attached two screen shots with the output of CM30 running on F10/PPC zero and my PPC shark build. It are nice to see that float performance have increased 14x using shark compared to pure zero :) Cheers and have a great day! Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: zero-PPC-F10.png Type: image/png Size: 8869 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090330/56fc6218/zero-PPC-F10.png -------------- next part -------------- A non-text attachment was scrubbed... Name: shark-PPC-F10.png Type: image/png Size: 8606 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090330/56fc6218/shark-PPC-F10.png -------------- next part -------------- A non-text attachment was scrubbed... Name: SharkRerouteToZeroCost.ods Type: application/vnd.oasis.opendocument.spreadsheet Size: 43994 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090330/56fc6218/SharkRerouteToZeroCost.ods -------------- next part -------------- A non-text attachment was scrubbed... Name: SharkRerouteToZeroCost.pdf Type: application/pdf Size: 174780 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090330/56fc6218/SharkRerouteToZeroCost.pdf From bugzilla-daemon at icedtea.classpath.org Sun Mar 29 21:27:54 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 30 Mar 2009 04:27:54 +0000 Subject: [Bug 312] New: IcedTeaPlugin: fifo =?UTF-8?Q?_doesn=E2=80=99t?= work in AFS network home directories Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=312 Summary: IcedTeaPlugin: fifo doesn?t work in AFS network home directories Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: anders at kaseorg.com -- 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 Sun Mar 29 21:32:48 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 30 Mar 2009 04:32:48 +0000 Subject: [Bug 312] IcedTeaPlugin: fifo =?UTF-8?Q?_doesn=E2=80=99t?= work in AFS network home directories Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=312 ------- Comment #1 from anders at kaseorg.com 2009-03-30 04:32 ------- [Oops, submitted this accidentally by hitting Enter before getting to the Description field.] The icedtea plugin creates fifos at ~/.icedteaplugin/icedtea-appletviewer-to-plugin and ~/.icedteaplugin/icedtea-plugin-to-appletviewer. So if $HOME is in an AFS filesystem, which doesn?t support fifos, the plugin doesn?t work at all. For example, this makes the plugin unusable for MIT Athena machines. The plugin needs the ability to fall back to creating fifos somewhere in, say, /tmp. -- 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 aph at redhat.com Mon Mar 30 02:23:28 2009 From: aph at redhat.com (Andrew Haley) Date: Mon, 30 Mar 2009 10:23:28 +0100 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49D01DB8.9050007@zafena.se> References: <49CE9FD0.6030202@zafena.se> <49CEACD7.8040203@gmx.net> <49CFA59F.4030509@redhat.com> <49D01DB8.9050007@zafena.se> Message-ID: <49D08F90.8020904@redhat.com> Xerxes R?nby wrote: > Andrew Haley skrev: >> Robert Schuster wrote: >> >>> Xerxes R?nby schrieb: >>> >>>> Greetings, >>>> This patch will make shark reroute LLVM atomic intrinsics to the >>>> existing atomic operations implemented in Zero. >>>> >>>> This patch are both platform and arch independent. >>>> I have tested this patch on Shark compiled for X86, PPC and ARM. >>>> >>> I would make this rerouting optional depending on the architecture. >>> LLVM has atomic intrinsic fucntion support for x86(-64), powerpc (32,64) >>> and alpha. On those architectures you really want to use what LLVM >>> provides. >>> >>> E.g. on x86 the function is converted into a series of machine >>> instructions and no function call. >> >> Definitely; we really don't want a function call just do do an atomic >> cmpxchg. This is really just a workaround for an llvm bug, and hopefully >> it'll soon go away. > > I have done a small investigation to see how large the cost is to use > the reroute patch on PPC. > The test machine is a PowerBook G4 1.333Ghz with F10 installed. > > I used Caffeine Mark 3.0 for this benchmark, why? It is a quick > benchmark and it includes some graphics tests so it is quite fun to > benchmark with. And, perhaps unsurprisingly, it doesn't use java.lang.concurrent.* at all. :-) Really, the use of lock-free in Java is only just beginning; in the future I expect it'll be the obvious way to do things. Andrew. From xerxes at zafena.se Mon Mar 30 03:25:19 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 30 Mar 2009 12:25:19 +0200 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49D08F90.8020904@redhat.com> References: <49CE9FD0.6030202@zafena.se> <49CEACD7.8040203@gmx.net> <49CFA59F.4030509@redhat.com> <49D01DB8.9050007@zafena.se> <49D08F90.8020904@redhat.com> Message-ID: <49D09E0F.40802@zafena.se> Andrew Haley skrev: > Xerxes R?nby wrote: > >> Andrew Haley skrev: >> >>> Robert Schuster wrote: >>> >>> >>>> Xerxes R?nby schrieb: >>>> >>>> >>>>> Greetings, >>>>> This patch will make shark reroute LLVM atomic intrinsics to the >>>>> existing atomic operations implemented in Zero. >>>>> >>>>> This patch are both platform and arch independent. >>>>> I have tested this patch on Shark compiled for X86, PPC and ARM. >>>>> >>>>> >>>> I would make this rerouting optional depending on the architecture. >>>> LLVM has atomic intrinsic fucntion support for x86(-64), powerpc (32,64) >>>> and alpha. On those architectures you really want to use what LLVM >>>> provides. >>>> >>>> E.g. on x86 the function is converted into a series of machine >>>> instructions and no function call. >>>> >>> Definitely; we really don't want a function call just do do an atomic >>> cmpxchg. This is really just a workaround for an llvm bug, and hopefully >>> it'll soon go away. >>> >> I have done a small investigation to see how large the cost is to use >> the reroute patch on PPC. >> The test machine is a PowerBook G4 1.333Ghz with F10 installed. >> >> I used Caffeine Mark 3.0 for this benchmark, why? It is a quick >> benchmark and it includes some graphics tests so it is quite fun to >> benchmark with. >> > > And, perhaps unsurprisingly, it doesn't use java.lang.concurrent.* > at all. :-) > > Really, the use of lock-free in Java is only just beginning; in the > future I expect it'll be the obvious way to do things. > > Andrew. > > I agree that it is a rather stupid benchmark to use yet I dont have any benchmark that i know specifically tests for concurrency. My thinking was to use a benchmark with some gui parts since AWT internally are multi-threaded AFAIC just to see if i could measure any effect at all from the use of the reroute. Ok, in order to check my sanity i did a small test to see if running the CM30 benchmarks triggered any rerouting of atomic intrinsics at all. I added a printf to the rerouted functioncalls printing one char each like this: extern "C" { jint zero_cmpxchg_int_fn(volatile jint *ptr, jint *oldval, jint *newval) { printf("1"); return Atomic::cmpxchg((jint) newval, (volatile jint *) ptr, (jint) oldval); } intptr_t* zero_cmpxchg_ptr_fn(volatile void *ptr, intptr_t *oldval, intptr_t *newval) { printf("0"); return (intptr_t *) Atomic::cmpxchg_ptr((void *) newval, (volatile void *) ptr, (void *) oldval); } }; And then i ran the CM30 using the appletviewer: logs can be found here: http://labb.zafena.se/shark-testing/cm30_useof_atomic.log 3537613 bytes http://labb.zafena.se/shark-testing/cm30_useof_atomic.log2 3493084 bytes I am happy to see that the reroute at least did get used during the test 3.5million times. If someone know of a better benchmark that tests concurrency throughfully i would be happy to hear about it. Cheers Xerxes From bugzilla-daemon at icedtea.classpath.org Mon Mar 30 04:13:44 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 30 Mar 2009 11:13:44 +0000 Subject: [Bug 312] IcedTeaPlugin: fifo =?UTF-8?Q?_doesn=E2=80=99t?= work in AFS network home directories Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=312 ------- Comment #2 from aph at redhat.com 2009-03-30 11:13 ------- > The plugin needs the ability to fall back to creating fifos somewhere in, say, > /tmp. Indeed. I think the plugin should start with /tmp, given that $HOME is often nfs-mounted and /tmp usually isn't. -- 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 30 05:26:48 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 30 Mar 2009 12:26:48 +0000 Subject: [Bug 312] IcedTeaPlugin: fifo =?UTF-8?Q?_doesn=E2=80=99t?= work in AFS network home directories Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=312 langel at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|dbhole at redhat.com |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Mon Mar 30 09:30:11 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 30 Mar 2009 12:30:11 -0400 Subject: [FYI] Fix JTreg test: java/awt/dnd/FileListBetweenJVMsTest Message-ID: <49D0F393.5090006@redhat.com> Hi, The attached patch fixes classpath issues in java/awt/dnd/FileListBetweenJVMsTest. The test still fails though; looks like bug 5079469 [1] has returned. ChangeLog: 2009-03-30 Omair Majid * patches/icedtea-jtreg-dnd.patch: New Patch. Fixes classpath issues in java/awt/dnd/FileListBetweenJVMsTest. * Makefile.am: Apply the above. * HACKING: Document the above. Cheers, Omair [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5079469 -------------- next part -------------- A non-text attachment was scrubbed... Name: jtreg-dnd.patch Type: text/x-patch Size: 2763 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090330/5b0d520e/jtreg-dnd.patch From omajid at redhat.com Mon Mar 30 09:33:14 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 30 Mar 2009 16:33:14 +0000 Subject: changeset in /hg/icedtea6: 2009-03-30 Omair Majid changeset b1ed8de8d63e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b1ed8de8d63e description: 2009-03-30 Omair Majid * patches/icedtea-jtreg-dnd.patch: New Patch. Fixes classpath issues in java/awt/dnd/FileListBetweenJVMsTest. * Makefile.am: Apply the above. * HACKING: Document the above. diffstat: 4 files changed, 37 insertions(+) ChangeLog | 7 +++++++ HACKING | 1 + Makefile.am | 1 + patches/icedtea-jtreg-dnd.patch | 28 ++++++++++++++++++++++++++++ diffs (68 lines): diff -r 8dd3adfcadf9 -r b1ed8de8d63e ChangeLog --- a/ChangeLog Fri Mar 27 13:10:15 2009 +0100 +++ b/ChangeLog Mon Mar 30 12:31:21 2009 -0400 @@ -1,3 +1,10 @@ 2009-03-27 Mark Wielaard + + * patches/icedtea-jtreg-dnd.patch: New Patch. Fixes classpath issues in + java/awt/dnd/FileListBetweenJVMsTest. + * Makefile.am: Apply the above. + * HACKING: Document the above. + 2009-03-27 Mark Wielaard * patches/icedtea-systemtap.patch: New patch. diff -r 8dd3adfcadf9 -r b1ed8de8d63e HACKING --- a/HACKING Fri Mar 27 13:10:15 2009 +0100 +++ b/HACKING Mon Mar 30 12:31:21 2009 -0400 @@ -88,6 +88,7 @@ The following patches are currently appl * 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. +* icedtea-jtreg-dnd.patch: Fix classpath issues in java/awt/dnd/FileListBetweenJVMsTest. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r 8dd3adfcadf9 -r b1ed8de8d63e Makefile.am --- a/Makefile.am Fri Mar 27 13:10:15 2009 +0100 +++ b/Makefile.am Mon Mar 30 12:31:21 2009 -0400 @@ -687,6 +687,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-jtreg-6592792.patch \ patches/icedtea-s390-noinline.patch \ patches/icedtea-jtreg-hatrun.patch \ + patches/icedtea-jtreg-dnd.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r 8dd3adfcadf9 -r b1ed8de8d63e patches/icedtea-jtreg-dnd.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jtreg-dnd.patch Mon Mar 30 12:31:21 2009 -0400 @@ -0,0 +1,28 @@ +--- openjdk/jdk/test/java/awt/regtesthelpers/process/ProcessCommunicator.java.orig 2009-03-30 11:41:32.000000000 -0400 ++++ openjdk/jdk/test/java/awt/regtesthelpers/process/ProcessCommunicator.java 2009-03-30 11:44:21.000000000 -0400 +@@ -146,7 +146,11 @@ + final String classPathArguments, final String [] args) + { + StringBuilder commandBuilder = new StringBuilder(); +- commandBuilder.append(javaPath).append(classPathArguments).append(classToExecute.getName()); ++ commandBuilder.append(javaPath).append(" "); ++ if (classPathArguments.trim().length() > 0) { ++ commandBuilder.append("-cp ").append(classPathArguments).append(" "); ++ } ++ commandBuilder.append(classToExecute.getName()); + for (String argument:args) { + commandBuilder.append(" ").append(argument); + } +--- openjdk/jdk/test/java/awt/dnd/FileListBetweenJVMsTest/FileListBetweenJVMsTest.java.orig 2009-03-30 11:45:16.000000000 -0400 ++++ openjdk/jdk/test/java/awt/dnd/FileListBetweenJVMsTest/FileListBetweenJVMsTest.java 2009-03-30 11:46:51.000000000 -0400 +@@ -69,8 +69,9 @@ + String.valueOf(sourceFrame.getSourceFilesNumber()) + }; + ++ String classpath = System.getProperty("java.class.path"); + ProcessResults processResults = +- ProcessCommunicator.executeChildProcess(this.getClass(), args); ++ ProcessCommunicator.executeChildProcess(this.getClass(), classpath, args); + + verifyTestResults(processResults); + From omajid at redhat.com Mon Mar 30 11:42:57 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 30 Mar 2009 14:42:57 -0400 Subject: [FYI] Fix JTreg test (java/awt/Graphics/DrawImageBG/SystemBgColorTest.java) Message-ID: <49D112B1.4040605@redhat.com> Hi, The attached patch fixes java/awt/Graphics/DrawImageBG/SystemBgColorTest.java by removing the System.exit() call. JTreg installs a SecurityManager that doesnt allow shutting down the JVM; doing a System.exit() will trigger a security exception and cause the test to fail. ChangeLog: 2009-03-30 Omair Majid * patches/icedtea-jtreg-colortest.patch: New patch. Remove the System.exit() call that was causing the test to fail. * Makefile.am: Apply the above. * HACKING: Document the above. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: jtreg-colortest.patch Type: text/x-patch Size: 1664 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090330/4e9e5ffe/jtreg-colortest.patch From omajid at redhat.com Mon Mar 30 11:45:29 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 30 Mar 2009 18:45:29 +0000 Subject: changeset in /hg/icedtea6: 2009-03-30 Omair Majid changeset 4d01a6a212bd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4d01a6a212bd description: 2009-03-30 Omair Majid * patches/icedtea-jtreg-colortest.patch: New patch. Remove the System.exit() call that was causing the test to fail. * Makefile.am: Apply the above. * HACKING: Document the above. diffstat: 4 files changed, 19 insertions(+) ChangeLog | 7 +++++++ HACKING | 1 + Makefile.am | 1 + patches/icedtea-jtreg-colortest.patch | 10 ++++++++++ diffs (50 lines): diff -r b1ed8de8d63e -r 4d01a6a212bd ChangeLog --- a/ChangeLog Mon Mar 30 12:31:21 2009 -0400 +++ b/ChangeLog Mon Mar 30 14:43:28 2009 -0400 @@ -1,3 +1,10 @@ 2009-03-30 Omair Majid + + * patches/icedtea-jtreg-colortest.patch: New patch. Remove the + System.exit() call that was causing the test to fail. + * Makefile.am: Apply the above. + * HACKING: Document the above. + 2009-03-30 Omair Majid * patches/icedtea-jtreg-dnd.patch: New Patch. Fixes classpath issues in diff -r b1ed8de8d63e -r 4d01a6a212bd HACKING --- a/HACKING Mon Mar 30 12:31:21 2009 -0400 +++ b/HACKING Mon Mar 30 14:43:28 2009 -0400 @@ -89,6 +89,7 @@ The following patches are currently appl * 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. * icedtea-jtreg-dnd.patch: Fix classpath issues in java/awt/dnd/FileListBetweenJVMsTest. +* icedtea-jtreg-colortest.patch: Remove call to System.exit() that was causing SystemBgColorTest to fail. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r b1ed8de8d63e -r 4d01a6a212bd Makefile.am --- a/Makefile.am Mon Mar 30 12:31:21 2009 -0400 +++ b/Makefile.am Mon Mar 30 14:43:28 2009 -0400 @@ -688,6 +688,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-s390-noinline.patch \ patches/icedtea-jtreg-hatrun.patch \ patches/icedtea-jtreg-dnd.patch \ + patches/icedtea-jtreg-colortest.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r b1ed8de8d63e -r 4d01a6a212bd patches/icedtea-jtreg-colortest.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jtreg-colortest.patch Mon Mar 30 14:43:28 2009 -0400 @@ -0,0 +1,10 @@ +--- openjdk/jdk/test/java/awt/Graphics/DrawImageBG/SystemBgColorTest.java.orig 2009-03-30 14:21:10.000000000 -0400 ++++ openjdk/jdk/test/java/awt/Graphics/DrawImageBG/SystemBgColorTest.java 2009-03-30 14:21:18.000000000 -0400 +@@ -59,7 +59,6 @@ + if (errcount > 0) { + throw new RuntimeException(errcount+" errors"); + } +- System.exit(0); // For 1.3 and earlier VMs... + } + + static int cmap[] = { From theBohemian at gmx.net Mon Mar 30 15:12:02 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Tue, 31 Mar 2009 00:12:02 +0200 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49CFA59F.4030509@redhat.com> References: <49CE9FD0.6030202@zafena.se> <49CEACD7.8040203@gmx.net> <49CFA59F.4030509@redhat.com> Message-ID: <49D143B2.80007@gmx.net> Hi Andrew, Andrew Haley schrieb: > Definitely; we really don't want a function call just do do an atomic > cmpxchg. That is why I opted for enabling it only for the arches that really need it by using #ifdef. > This is really just a workaround for an llvm bug, and hopefully > it'll soon go away. Do you know more than me? The 'bug' is actually a missing feature and I don't see someone working on this. I tried fixing it myself but it will take me a while until understand how to use llvm's tablegen syntax to describe the generation of a series of instructions for the compiler. Regards Robert -------------- 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/20090331/0d5e982d/signature.asc From bugzilla-daemon at icedtea.classpath.org Mon Mar 30 22:41:10 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 31 Mar 2009 05:41:10 +0000 Subject: [Bug 313] New: "make hotspot" errors Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=313 Summary: "make hotspot" errors Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: sanxiyn at gmail.com $ make hotspot (snip) cp openjdk-ecj/control/build/linux-i586/hotspot/import/jre/lib/i586/server/libjvm.so \ openjdk-ecj/control/build/linux-i586/j2sdk-image/jre/lib/i586/server cp: cannot stat `openjdk-ecj/control/build/linux-i586/hotspot/import/jre/lib/i586/server/libjvm.so': No such file or directory make: *** [hotspot] Error 1 jre/lib/i586 should be jre/lib/i386 instead. -- 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 31 02:32:38 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 31 Mar 2009 09:32:38 +0000 Subject: [Bug 310] icedtea6: icedtea patch to disable sanity checks Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 ------- Comment #11 from thebohemian at gmx.net 2009-03-31 09:32 ------- Here is the ChangeLog for the patches: 2009-03-31 Robert Schuster * configure.ac: Added --enable-experimental-openjdk-cross-compilation option. * Makefile.am: Added icedtea-disable-cc-incompatible-sanity-checks.patch, added CROSS_COMPILATION option to icedtea and icedtea-ecj environment. * patches/icedtea-disable-cc-incompatible-sanity-checks.patch: New patch. -- 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 theBohemian at gmx.net Tue Mar 31 02:34:33 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Tue, 31 Mar 2009 11:34:33 +0200 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <49CD8164.7090608@gmx.net> References: <49CD8164.7090608@gmx.net> Message-ID: <49D1E3A9.4010405@gmx.net> Hi, the changes are in two patches: One needs to be placed into the 'patches' folder, the other can be applied simply. I implemented the recommendation by Matthew and made the cross-compilation things optional. Additionally there is now a changelog entry: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=310 So, anything missing before it can go in? Regards Robert -------------- 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/20090331/6ad98277/signature.asc From aph at redhat.com Tue Mar 31 02:55:29 2009 From: aph at redhat.com (Andrew Haley) Date: Tue, 31 Mar 2009 10:55:29 +0100 Subject: [patch] Shark reroute LLVM atomic intrinsics to Zero In-Reply-To: <49D143B2.80007@gmx.net> References: <49CE9FD0.6030202@zafena.se> <49CEACD7.8040203@gmx.net> <49CFA59F.4030509@redhat.com> <49D143B2.80007@gmx.net> Message-ID: <49D1E891.7030502@redhat.com> Robert Schuster wrote: > Andrew Haley schrieb: >> Definitely; we really don't want a function call just do do an atomic >> cmpxchg. > That is why I opted for enabling it only for the arches that really need > it by using #ifdef. Yes. That is the correct answer. >> This is really just a workaround for an llvm bug, and hopefully >> it'll soon go away. > Do you know more than me? > > The 'bug' is actually a missing feature and I don't see someone working > on this. I tried fixing it myself but it will take me a while until > understand how to use llvm's tablegen syntax to describe the generation > of a series of instructions for the compiler. Maybe our idea of "soon" varies. It'll have to be fixed before LLVM's ARM back-end is used for real work. But these really are early days for LLVM JIT on ARM. Andrew. From gnu_andrew at member.fsf.org Tue Mar 31 04:33:51 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 31 Mar 2009 11:33:51 +0000 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <49CE50B3.8000107@gmx.net> References: <49CD8164.7090608@gmx.net> <49CD89C8.7040208@gatech.edu> <49CE50B3.8000107@gmx.net> Message-ID: <17c6771e0903310433s57336e12tef4e5902b8f28a1a@mail.gmail.com> 2009/3/28 Robert Schuster : > Hi Matthew, > > Matthew Flaschen schrieb: >> I definitely think it should be optional, as you suggest in a comment. >> Otherwise, you're making things more difficult for someone building the >> code for the first time (or building on a new system). > Done. > > Please let me know if it is OK that way. > > There is one thing I would like to have but I don't know how to do it. > Autoconf already checks whether one is cross-compiling: > > configure:3182: checking whether we are cross compiling > configure:3184: result: yes > > In which variable is this result stored and when can I retrieve the > value for sure? > > I want to implement the following algorithm in configure.ac: > > if (cross-compiling) > ?disable sanity checks by default > else if (--disable-sanity-checks was given) > ?disable sanity checks > else > ?do sanity check > > I only have the last part so far but the proposed automatism would be > useful, since some of the sanity checks really can't be done when > cross-compiling. Well, except if your host can run the target's binaries. > > Regards > Robert > > I see cross_compiling was adopted. This is set when host is specifed: http://www.gnu.org/software/autoconf/manual/autoconf.html#Manual-Configuration Can we actually have --disable-sanity-checks rather than --enable-experimental-openjdk-cross-compilation too? :) AC_MSG_CHECKING(whether to disable sanity checks) AC_ARG_ENABLE([sanity-checks], [AS_HELP_STRING([--disable-sanity-checks], [Disable sanity checks run by the OpenJDK build which require host==build])], [disable_sanity_checks="${enableval}"], [disable_sanity_checks="${cross_compiling}"]) AM_CONDITIONAL([DISABLE_SANITY_CHECKS], [test x$DISABLE_SANITY_CHECKS = xyes]) AC_MSG_RESULT(${disable_sanity_checks}) -- 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 31 11:02:48 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 14:02:48 -0400 Subject: [FYI] Fix JTreg test (java/awt/PrintJob/MultipleEnd/MultipleEnd.java) Message-ID: <49D25AC8.8080304@redhat.com> Hi, The attached patch removes the need for user interaction in the MultipleEnd JTreg test. This should prevent the test from timing out and failing. ChangeLog: 2009-03-31 Omair Majid * patches/icedtea-jtreg-printjob-multiple-end.patch: New patch. Dont require any user interaction for test. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: multiple-end.patch Type: text/x-patch Size: 2427 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090331/173ef7ed/multiple-end.patch From omajid at redhat.com Tue Mar 31 11:08:07 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 18:08:07 +0000 Subject: changeset in /hg/icedtea6: 2009-03-31 Omair Majid changeset a537113b9d22 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a537113b9d22 description: 2009-03-31 Omair Majid * patches/icedtea-jtreg-printjob-multiple-end.patch: New patch. Dont require any user interaction for test. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. diffstat: 4 files changed, 46 insertions(+) ChangeLog | 7 +++ HACKING | 1 Makefile.am | 1 patches/icedtea-jtreg-printjob-multiple-end.patch | 37 +++++++++++++++++++++ diffs (77 lines): diff -r 4d01a6a212bd -r a537113b9d22 ChangeLog --- a/ChangeLog Mon Mar 30 14:43:28 2009 -0400 +++ b/ChangeLog Tue Mar 31 14:03:24 2009 -0400 @@ -1,3 +1,10 @@ 2009-03-30 Omair Majid + + * patches/icedtea-jtreg-printjob-multiple-end.patch: New patch. Dont + require any user interaction for test. + * Makefile.am (ICEDTEA_PATCHES): Apply the above. + * HACKING: Document the above. + 2009-03-30 Omair Majid * patches/icedtea-jtreg-colortest.patch: New patch. Remove the diff -r 4d01a6a212bd -r a537113b9d22 HACKING --- a/HACKING Mon Mar 30 14:43:28 2009 -0400 +++ b/HACKING Tue Mar 31 14:03:24 2009 -0400 @@ -90,6 +90,7 @@ The following patches are currently appl * icedtea-jtreg-hatrun.patch: Fix jhat test by passing the classpath to the new jvm in HatRun.java. * icedtea-jtreg-dnd.patch: Fix classpath issues in java/awt/dnd/FileListBetweenJVMsTest. * icedtea-jtreg-colortest.patch: Remove call to System.exit() that was causing SystemBgColorTest to fail. +* icedtea-jtreg-printjob-multiple-end.patch: Fix test to not require any user interaction. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r 4d01a6a212bd -r a537113b9d22 Makefile.am --- a/Makefile.am Mon Mar 30 14:43:28 2009 -0400 +++ b/Makefile.am Tue Mar 31 14:03:24 2009 -0400 @@ -689,6 +689,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-jtreg-hatrun.patch \ patches/icedtea-jtreg-dnd.patch \ patches/icedtea-jtreg-colortest.patch \ + patches/icedtea-jtreg-printjob-multiple-end.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r 4d01a6a212bd -r a537113b9d22 patches/icedtea-jtreg-printjob-multiple-end.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jtreg-printjob-multiple-end.patch Tue Mar 31 14:03:24 2009 -0400 @@ -0,0 +1,37 @@ +--- openjdk/jdk/test/java/awt/PrintJob/MultipleEnd/MultipleEnd.java.orig 2009-03-31 13:29:02.000000000 -0400 ++++ openjdk/jdk/test/java/awt/PrintJob/MultipleEnd/MultipleEnd.java 2009-03-31 13:39:50.000000000 -0400 +@@ -30,13 +30,17 @@ + */ + + import java.awt.*; ++import java.awt.JobAttributes.DialogType; + + public class MultipleEnd { + public static void main(String[] args) { + new MultipleEnd().start(); + } + public void start() { +- new MultipleEndFrame(); ++ Frame f = new MultipleEndFrame(); ++ ++ // cleanup ++ f.dispose(); + } + } + +@@ -44,10 +48,14 @@ + public MultipleEndFrame() { + super("MultipleEnd"); + setVisible(true); +- PrintJob pj = getToolkit().getPrintJob(this, "MuiltipleEnd", null); ++ JobAttributes printJobAttributes = new JobAttributes(); ++ printJobAttributes.setDialog(DialogType.NONE); ++ PrintJob pj = getToolkit().getPrintJob(this, "MuiltipleEnd", printJobAttributes, null); + if (pj != null) { + pj.end(); + pj.end(); ++ } else { ++ throw new RuntimeException("getPrintJob returned null"); + } + } + } From omajid at redhat.com Tue Mar 31 11:46:20 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 18:46:20 +0000 Subject: changeset in /hg/icedtea6: 2009-03-31 Omair Majid changeset bd118814ce2e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=bd118814ce2e description: 2009-03-31 Omair Majid * patches/icedtea-network-unreachable.patch: New file. Check for EHOSTUNREACH and ENETUNREACH early on when establishing a connection. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. diffstat: 4 files changed, 40 insertions(+) ChangeLog | 7 ++++++ HACKING | 1 Makefile.am | 1 patches/icedtea-network-unreachable.patch | 31 +++++++++++++++++++++++++++++ diffs (71 lines): diff -r a537113b9d22 -r bd118814ce2e ChangeLog --- a/ChangeLog Tue Mar 31 14:03:24 2009 -0400 +++ b/ChangeLog Tue Mar 31 14:43:02 2009 -0400 @@ -1,3 +1,10 @@ 2009-03-31 Omair Majid + + * patches/icedtea-network-unreachable.patch: New file. Check for + EHOSTUNREACH and ENETUNREACH early on when establishing a connection. + * Makefile.am (ICEDTEA_PATCHES): Apply the above. + * HACKING: Document the above. + 2009-03-31 Omair Majid * patches/icedtea-jtreg-printjob-multiple-end.patch: New patch. Dont diff -r a537113b9d22 -r bd118814ce2e HACKING --- a/HACKING Tue Mar 31 14:03:24 2009 -0400 +++ b/HACKING Tue Mar 31 14:43:02 2009 -0400 @@ -91,6 +91,7 @@ The following patches are currently appl * icedtea-jtreg-dnd.patch: Fix classpath issues in java/awt/dnd/FileListBetweenJVMsTest. * icedtea-jtreg-colortest.patch: Remove call to System.exit() that was causing SystemBgColorTest to fail. * icedtea-jtreg-printjob-multiple-end.patch: Fix test to not require any user interaction. +* icedtea-network-unreachable.patch: Check for ENETUNREACH and EHOSTUNREACH early on when doing a Socket.connect(). The following patches are only applied to OpenJDK6 in IcedTea6: diff -r a537113b9d22 -r bd118814ce2e Makefile.am --- a/Makefile.am Tue Mar 31 14:03:24 2009 -0400 +++ b/Makefile.am Tue Mar 31 14:43:02 2009 -0400 @@ -690,6 +690,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-jtreg-dnd.patch \ patches/icedtea-jtreg-colortest.patch \ patches/icedtea-jtreg-printjob-multiple-end.patch \ + patches/icedtea-network-unreachable.patch \ $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp diff -r a537113b9d22 -r bd118814ce2e patches/icedtea-network-unreachable.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-network-unreachable.patch Tue Mar 31 14:43:02 2009 -0400 @@ -0,0 +1,31 @@ +--- openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c.orig 2008-11-25 04:06:19.000000000 -0500 ++++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2009-03-20 16:58:35.000000000 -0400 +@@ -410,8 +410,16 @@ + jlong prevTime = JVM_CurrentTimeMillis(env, 0); + + if (errno != EINPROGRESS) { +- NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", +- "connect failed"); ++ if (errno == EHOSTUNREACH) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "NoRouteToHostException", ++ "Host unreachable"); ++ } else if (errno == ENETUNREACH) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "NoRouteToHostException", ++ "Network unreachable"); ++ } else { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", ++ "connect failed"); ++ } + SET_BLOCKING(fd); + return; + } +@@ -540,6 +548,9 @@ + } else if (errno == EHOSTUNREACH) { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "NoRouteToHostException", + "Host unreachable"); ++ } else if (errno == ENETUNREACH) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "NoRouteToHostException", ++ "Network unreachable"); + } else if (errno == EADDRNOTAVAIL) { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "NoRouteToHostException", + "Address not available"); From theBohemian at gmx.net Tue Mar 31 12:54:32 2009 From: theBohemian at gmx.net (Robert Schuster) Date: Tue, 31 Mar 2009 21:54:32 +0200 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <17c6771e0903310433s57336e12tef4e5902b8f28a1a@mail.gmail.com> References: <49CD8164.7090608@gmx.net> <49CD89C8.7040208@gatech.edu> <49CE50B3.8000107@gmx.net> <17c6771e0903310433s57336e12tef4e5902b8f28a1a@mail.gmail.com> Message-ID: <49D274F8.4050507@gmx.net> Hi Andrew, Andrew John Hughes schrieb: > Can we actually have --disable-sanity-checks rather than > --enable-experimental-openjdk-cross-compilation > too? :) > > AC_MSG_CHECKING(whether to disable sanity checks) > AC_ARG_ENABLE([sanity-checks], > [AS_HELP_STRING([--disable-sanity-checks], > [Disable sanity checks run by the OpenJDK build which > require host==build])], > [disable_sanity_checks="${enableval}"], > [disable_sanity_checks="${cross_compiling}"]) > AM_CONDITIONAL([DISABLE_SANITY_CHECKS], [test x$DISABLE_SANITY_CHECKS = xyes]) > AC_MSG_RESULT(${disable_sanity_checks}) at this time --enable-experimental-openjdk-cross-compilation only disables the checks incompatible with host!=build. Later patches will built on this and use the Makefile variable CROSS_COMPILATION that I introduced as well. So my question is. Do you want a separate configure option, that can only disable the above mentioned sanity checks and is otherwise independent from the CROSS_COMPILATION stuff that is coming? Additionally Matthews was not happy with the former name since it is actually not disabling all sanity checks (which the name may imply) but only some of them. Regards Robert -------------- 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/20090331/97bfd7fb/signature.asc From omajid at redhat.com Tue Mar 31 13:01:57 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 16:01:57 -0400 Subject: [FYI] Add java/awt/PrintJob/EdgeTest/EdgeTest.java to exclude list Message-ID: <49D276B5.7050806@redhat.com> Hi, The JTreg test java/awt/PrintJob/EdgeTest/EdgeTest.java currently times out waiting for a user to click "Print" on the print dialog it pops up. So when running the jtreg tests unsupervised, the test will time out and fail. On the other hand, if the user clicks on the button, the test will pass - the user has to manually verify that the printed output matches the expected output. To make use of this test, it needs to be run interactively. The attached patch adds the test to the exclude list so a make check will skip over this test. ChangeLog: 2009-03-31 Omair Majid * test/jtreg/excludelist.jdk.jtx: Add java/awt/PrintJob/EdgeTest/EdgeTest.java to the exclude list since it requires a user to manually examine the printout even if the test passes. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: exclude-list.patch Type: text/x-patch Size: 423 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090331/19ba16da/exclude-list.patch From omajid at redhat.com Tue Mar 31 13:04:35 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 20:04:35 +0000 Subject: changeset in /hg/icedtea6: 2009-03-31 Omair Majid changeset 422763ad5d3c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=422763ad5d3c description: 2009-03-31 Omair Majid * test/jtreg/excludelist.jdk.jtx: Add java/awt/PrintJob/EdgeTest/EdgeTest.java to the exclude list since it requires a user to manually examine the printout even if the test passes. diffstat: 2 files changed, 9 insertions(+) ChangeLog | 6 ++++++ test/jtreg/excludelist.jdk.jtx | 3 +++ diffs (26 lines): diff -r bd118814ce2e -r 422763ad5d3c ChangeLog --- a/ChangeLog Tue Mar 31 14:43:02 2009 -0400 +++ b/ChangeLog Tue Mar 31 16:02:56 2009 -0400 @@ -1,3 +1,9 @@ 2009-03-31 Omair Majid + + * test/jtreg/excludelist.jdk.jtx: Add + java/awt/PrintJob/EdgeTest/EdgeTest.java to the exclude list since it + requires a user to manually examine the printout even if the test passes. + 2009-03-31 Omair Majid * patches/icedtea-network-unreachable.patch: New file. Check for diff -r bd118814ce2e -r 422763ad5d3c test/jtreg/excludelist.jdk.jtx --- a/test/jtreg/excludelist.jdk.jtx Tue Mar 31 14:43:02 2009 -0400 +++ b/test/jtreg/excludelist.jdk.jtx Tue Mar 31 16:02:56 2009 -0400 @@ -20,6 +20,9 @@ sun/net/idn/TestStringPrep.java # tcp (not icmp) echo server running java/nio/channels/DatagramChannel/AdaptDatagramSocket.java +# this test needs a user to verify the printed result +java/awt/PrintJob/EdgeTest/EdgeTest.java + # # Obsolete # From Joe.Darcy at Sun.COM Tue Mar 31 13:26:01 2009 From: Joe.Darcy at Sun.COM (Joe Darcy) Date: Tue, 31 Mar 2009 13:26:01 -0700 Subject: [FYI] Add java/awt/PrintJob/EdgeTest/EdgeTest.java to exclude list In-Reply-To: <49D276B5.7050806@redhat.com> References: <49D276B5.7050806@redhat.com> Message-ID: <49D27C59.6080205@sun.com> Omair Majid wrote: > Hi, > > The JTreg test java/awt/PrintJob/EdgeTest/EdgeTest.java currently times > out waiting for a user to click "Print" on the print dialog it pops up. > So when running the jtreg tests unsupervised, the test will time out and > fail. On the other hand, if the user clicks on the button, the test will > pass - the user has to manually verify that the printed output matches > the expected output. To make use of this test, it needs to be run > interactively. > > The attached patch adds the test to the exclude list so a make check > will skip over this test. > > ChangeLog: > 2009-03-31 Omair Majid > > * test/jtreg/excludelist.jdk.jtx: Add > java/awt/PrintJob/EdgeTest/EdgeTest.java to the exclude list > since it requires a user to manually examine the printout even if > the test passes. > > Cheers, > Omair > Have you tried running only the automated tests instead "jtreg -a ..."? -Joe From gnu_andrew at member.fsf.org Tue Mar 31 13:27:20 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 31 Mar 2009 20:27:20 +0000 Subject: first iceadtea cross-compile patch: disable sanity checks In-Reply-To: <49D274F8.4050507@gmx.net> References: <49CD8164.7090608@gmx.net> <49CD89C8.7040208@gatech.edu> <49CE50B3.8000107@gmx.net> <17c6771e0903310433s57336e12tef4e5902b8f28a1a@mail.gmail.com> <49D274F8.4050507@gmx.net> Message-ID: <17c6771e0903311327k23566571nf57f6ec40c41509d@mail.gmail.com> 2009/3/31 Robert Schuster : > Hi Andrew, > > Andrew John Hughes schrieb: >> Can we actually have --disable-sanity-checks rather than >> --enable-experimental-openjdk-cross-compilation >> too? :) >> >> AC_MSG_CHECKING(whether to disable sanity checks) >> AC_ARG_ENABLE([sanity-checks], >> ? ? ? ? ? ? [AS_HELP_STRING([--disable-sanity-checks], >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? [Disable sanity checks run by the OpenJDK build which >> require host==build])], >> ? ? ? ? ? ? [disable_sanity_checks="${enableval}"], >> [disable_sanity_checks="${cross_compiling}"]) >> AM_CONDITIONAL([DISABLE_SANITY_CHECKS], [test x$DISABLE_SANITY_CHECKS = xyes]) >> AC_MSG_RESULT(${disable_sanity_checks}) > at this time --enable-experimental-openjdk-cross-compilation only > disables the checks incompatible with > host!=build. Later patches will built on this and use the Makefile > variable CROSS_COMPILATION > that I introduced as well. > > So my question is. Do you want a separate configure option, that can > only disable the above mentioned sanity checks and is otherwise > independent from the CROSS_COMPILATION stuff that is coming? > I guess that's what I was aiming at, with all the options necessary for cross compilation defaulting to on when cross_compiling is set. > Additionally Matthews was not happy with the former name since it is > actually not disabling all sanity checks (which the name may imply) but > only some of them. > My main issue with the current name is the length; my poor fingers! Maybe there is a happy medium; e.g. --disable-host-specific-checks? > Regards > Robert > > > -- 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 Tue Mar 31 13:29:49 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 31 Mar 2009 20:29:49 +0000 Subject: [FYI] Add java/awt/PrintJob/EdgeTest/EdgeTest.java to exclude list In-Reply-To: <49D27C59.6080205@sun.com> References: <49D276B5.7050806@redhat.com> <49D27C59.6080205@sun.com> Message-ID: <17c6771e0903311329w6bbbadcbu35929c0a33de67c9@mail.gmail.com> 2009/3/31 Joe Darcy : > Omair Majid wrote: >> >> Hi, >> >> The JTreg test java/awt/PrintJob/EdgeTest/EdgeTest.java currently times >> out waiting for a user to click "Print" on the print dialog it pops up. So >> when running the jtreg tests unsupervised, the test will time out and fail. >> On the other hand, if the user clicks on the button, the test will ?pass - >> the user has to manually verify that the printed output matches the expected >> output. To make use of this test, it needs to be run interactively. >> >> The attached patch adds the test to the exclude list so a make check will >> skip over this test. >> >> ChangeLog: >> 2009-03-31 ?Omair Majid ? >> >> ? ? ? * test/jtreg/excludelist.jdk.jtx: Add >> ? ? ? java/awt/PrintJob/EdgeTest/EdgeTest.java to the exclude list >> ? ? ? since it requires a user to manually examine the printout even if >> ? ? ? the test passes. >> >> Cheers, >> Omair >> > > Have you tried running only the automated tests instead "jtreg -a ..."? > > -Joe > I'd prefer the change suggested by Joe, and I'm surprised we don't do that already. -- 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 31 13:43:14 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 16:43:14 -0400 Subject: [FYI] Add java/awt/PrintJob/EdgeTest/EdgeTest.java to exclude list In-Reply-To: <49D27C59.6080205@sun.com> References: <49D276B5.7050806@redhat.com> <49D27C59.6080205@sun.com> Message-ID: <49D28062.3020004@redhat.com> Hi Joe, Joe Darcy wrote: > Omair Majid wrote: >> The attached patch adds the test to the exclude list so a make check >> will skip over this test. > > Have you tried running only the automated tests instead "jtreg -a ..."? > > -Joe Oh, I hadn't considered that. But here is part of what make check does: [snip] $(ICEDTEA_BOOT_DIR)/bin/java -jar test/jtreg.jar -v1 -a -ignore:quiet \ -w:test/jdk/JTwork -r:test/jdk/JTreport \ [snip] It looks like openjdk/jdk/test/java/awt/PrintJob/EdgeTest/EdgeTest.java is missing the '/manual' option. Adding /manual certainly seems like the correct fix. I am going to try and add that. Thanks, Omair From omajid at redhat.com Tue Mar 31 14:30:59 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 31 Mar 2009 21:30:59 +0000 Subject: changeset in /hg/icedtea6: 2009-03-31 Omair Majid changeset 6a51f2c4db71 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6a51f2c4db71 description: 2009-03-31 Omair Majid * test/jtreg/excludelist.jdk.jtx: Revert previous change. * patches/icedtea-jtreg-printjob-edgetest-manual.patch: New patch. Mark test as manual. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above. diffstat: 5 files changed, 20 insertions(+), 3 deletions(-) ChangeLog | 8 ++++++++ HACKING | 1 + Makefile.am | 1 + patches/icedtea-jtreg-printjob-edgetest-manual.patch | 10 ++++++++++ test/jtreg/excludelist.jdk.jtx | 3 --- diffs (64 lines): diff -r 422763ad5d3c -r 6a51f2c4db71 ChangeLog --- a/ChangeLog Tue Mar 31 16:02:56 2009 -0400 +++ b/ChangeLog Tue Mar 31 17:28:50 2009 -0400 @@ -1,3 +1,11 @@ 2009-03-31 Omair Majid + + * test/jtreg/excludelist.jdk.jtx: Revert previous change. + * patches/icedtea-jtreg-printjob-edgetest-manual.patch: New patch. Mark + test as manual. + * Makefile.am (ICEDTEA_PATCHES): Apply the above. + * HACKING: Document the above. + 2009-03-31 Omair Majid * test/jtreg/excludelist.jdk.jtx: Add diff -r 422763ad5d3c -r 6a51f2c4db71 HACKING --- a/HACKING Tue Mar 31 16:02:56 2009 -0400 +++ b/HACKING Tue Mar 31 17:28:50 2009 -0400 @@ -92,6 +92,7 @@ The following patches are currently appl * icedtea-jtreg-colortest.patch: Remove call to System.exit() that was causing SystemBgColorTest to fail. * icedtea-jtreg-printjob-multiple-end.patch: Fix test to not require any user interaction. * icedtea-network-unreachable.patch: Check for ENETUNREACH and EHOSTUNREACH early on when doing a Socket.connect(). +* icedtea-jtreg-printjob-edgetest-manual.patch: Mark test that requires user interaction as manual. The following patches are only applied to OpenJDK6 in IcedTea6: diff -r 422763ad5d3c -r 6a51f2c4db71 Makefile.am --- a/Makefile.am Tue Mar 31 16:02:56 2009 -0400 +++ b/Makefile.am Tue Mar 31 17:28:50 2009 -0400 @@ -690,6 +690,7 @@ ICEDTEA_PATCHES += \ patches/icedtea-jtreg-dnd.patch \ patches/icedtea-jtreg-colortest.patch \ patches/icedtea-jtreg-printjob-multiple-end.patch \ + patches/icedtea-jtreg-printjob-edgetest-manual.patch \ patches/icedtea-network-unreachable.patch \ $(DISTRIBUTION_PATCHES) diff -r 422763ad5d3c -r 6a51f2c4db71 patches/icedtea-jtreg-printjob-edgetest-manual.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-jtreg-printjob-edgetest-manual.patch Tue Mar 31 17:28:50 2009 -0400 @@ -0,0 +1,10 @@ +--- openjdk/jdk/test/java/awt/PrintJob/EdgeTest/EdgeTest.java.orig 2009-03-31 16:49:27.000000000 -0400 ++++ openjdk/jdk/test/java/awt/PrintJob/EdgeTest/EdgeTest.java 2009-03-31 16:49:54.000000000 -0400 +@@ -26,6 +26,7 @@ + * @bug 4092755 + * @summary Verifies that (0, 0) is the upper-left corner of the page, not + * the upper-left corner adjusted for the margins. ++ * @run main/manual=yesno EdgeTest + * @author dpm + */ + diff -r 422763ad5d3c -r 6a51f2c4db71 test/jtreg/excludelist.jdk.jtx --- a/test/jtreg/excludelist.jdk.jtx Tue Mar 31 16:02:56 2009 -0400 +++ b/test/jtreg/excludelist.jdk.jtx Tue Mar 31 17:28:50 2009 -0400 @@ -20,9 +20,6 @@ sun/net/idn/TestStringPrep.java # tcp (not icmp) echo server running java/nio/channels/DatagramChannel/AdaptDatagramSocket.java -# this test needs a user to verify the printed result -java/awt/PrintJob/EdgeTest/EdgeTest.java - # # Obsolete #