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/attachment.obj 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/attachment.ksh -------------- 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/attachment-0001.ksh 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/attachment.bin 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.mht 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/attachment.bin -------------- 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/attachment-0001.bin 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/attachment.obj -------------- 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/attachment-0001.obj 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/attachment.obj -------------- 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/attachment.ksh 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/attachment.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/attachment-0001.ksh 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/attachment.bin 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/attachment.bin 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)), de