From aph at redhat.com Mon Jun 1 07:59:03 2009 From: aph at redhat.com (Andrew Haley) Date: Mon, 01 Jun 2009 15:59:03 +0100 Subject: Releases, releases, releases In-Reply-To: <17c6771e0905301712r1537a591gc77c0d8ad6c52883@mail.gmail.com> References: <17c6771e0905301712r1537a591gc77c0d8ad6c52883@mail.gmail.com> Message-ID: <4A23ECB7.70601@redhat.com> Andrew John Hughes wrote: > This is clearly a long and tedious list for testing on every change so > we need to narrow down which ones are most release-critical and which > features really need to be tested, which are useful but not critical. > For the IcedTea7 release, we decided not to make the CACAO build > release-critical due to a bug > (http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=128) > that at least myself and one of the CACAO devs (Ringding on > #cacao at FreeNode) have reproduced. I think something like that needs > regular testing, especially for 7, and support from upstream. Yes. Cacao is really the Cacao maintainers' job to keep working: others are in no position to debug it when it breaks. At a minimum we need to test Zero, x86/32, and x86/64. We may not need to test Zero on a wide range of architectures; that's up for discussion. Re in-tree/out-of-tree builds: I'm not sure that we need to support (and therefore test) both. I think we should stick as close as possible to the way Sun work upstream, which AFAIK is in-tree. I am quite aware of the advantages of building otside the source tree, but IMO the disadvantages of building in a way that's not commonly used upstream outweigh them. What do other people think? > As to JTReg, I don't think either 6 or 7 yet have a clean run (i.e. > 100% pass). I've tended to give less regards to results for 7 after > finding some tests wouldn't even compile, having been broken by API > changes (see https://bugs.openjdk.java.net/show_bug.cgi?id=100012 for > example). If we're going to run this before releases, we need a clear > baseline so we can identify regressions, and ideally continuous > testing so we can spot regressions as soon as they happen. OK. > As to the actual release process, I think we cleared most of it up but > for clarity, we now propose a release at least a week in advance and a > branch is created for release work once tip is considered stable > enough to undergo pre-release testing. This branch can then also be > used for minor releases, while tip remains open for new major release > features. That is standard practice in most of the free software projects I know about. We need to ask whether a week's notice is enough, though. There are a great many Debian platforms that take a long time to build and test. > If we have a clear release procedure, I think it will be easier for > everyone to collaborate on future releases and ensure a smoother and > more hassle-free process. Clear goals for a release and easy > delineation of work are thus the order of the day. I think the basic release process is now pretty good, but it would be better if it were described online. A Wiki page detailing the process can be discussed and edited by all IcedTea stakeholders. So, if someone thinks that testing on a particular platform in a particular way is needed, they can propose it on the list and add it to the Wiki page when agreed. I must emphasize that anyone insisting that Platform X must be tested is in effect promising to do the testing. The Wiki page should also detail all known JTreg failures. Andrew. From omajid at redhat.com Mon Jun 1 08:36:08 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 01 Jun 2009 11:36:08 -0400 Subject: RFC: Fix --enable-hg in IcedTea6 Message-ID: <4A23F568.4040900@redhat.com> Hi, Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16" fails when applying the patches, even though jdk6-b16 is a known good build. The issues appears to be that the Makefile removes the old hotspot only if the openjdk directory doesn't already exist. The attached patch checks USE_HG and then removes the hotspot directory so it can be replaced with HS14. ChangeLog: 2009-06-01 Omair Majid * Makefile.am (stamps/extract.stamp): Remove hotspot if using --enable-hg and an alternate hotspot build. Can someone please review the patch? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-jdk6-hg.patch Type: text/x-patch Size: 371 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090601/54289512/icedtea-jdk6-hg.patch From gnu_andrew at member.fsf.org Mon Jun 1 08:51:24 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 1 Jun 2009 16:51:24 +0100 Subject: RFC: Fix --enable-hg in IcedTea6 In-Reply-To: <4A23F568.4040900@redhat.com> References: <4A23F568.4040900@redhat.com> Message-ID: <17c6771e0906010851r22114970xdb3ed983f186799c@mail.gmail.com> 2009/6/1 Omair Majid : > Hi, > > Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16" > fails when applying the patches, even though jdk6-b16 is a known good build. > The issues appears to be that the Makefile removes the old hotspot only if > the openjdk directory doesn't already exist. > > The attached patch checks USE_HG and then removes the hotspot directory so > it can be replaced with HS14. > > ChangeLog: > 2009-06-01 ?Omair Majid ? > > ? ?* Makefile.am (stamps/extract.stamp): Remove hotspot if using > ? ?--enable-hg and an alternate hotspot build. > > Can someone please review the patch? > > Cheers, > Omair > The presumption was that anyone wanting to use Mercurial as a source wanted the whole thing. I don't see how the attached patch can work. This would stop the hotspot directory not being removed when Mercurial is disabled, and doesn't do anything about the if block which checks for the openjdk directory. stamps/extract.stamp: stamps/download.stamp if OPENJDK_SRC_DIR_FOUND cp -a $(OPENJDK_SRC_DIR) openjdk else if ! test -d openjdk ; \ then \ mkdir openjdk ; \ $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ chmod -R ug+w openjdk ; \ if test "x${HSBUILD}" != "xoriginal"; then \ rm -rf openjdk/hotspot ; \ fi ; \ sh $(abs_top_srcdir)/fsg.sh ; \ fi if WITH_ALT_HSBUILD if test -e ${HOTSPOT_SRC_ZIP} ; \ then \ if ! test -d openjdk/hotspot ; \ then \ $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ chmod -R ug+w master-* ; \ mv master-$$($(AWK) 'version==$$1 {print $$2}' version=$(HSBUILD) \ $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ fi ; \ fi endif endif The simplest solution is probably to add an additional target for the HotSpot replacement so it isn't so tightly related to extraction. -- 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 Jun 1 09:02:41 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 1 Jun 2009 17:02:41 +0100 Subject: Releases, releases, releases In-Reply-To: <4A23ECB7.70601@redhat.com> References: <17c6771e0905301712r1537a591gc77c0d8ad6c52883@mail.gmail.com> <4A23ECB7.70601@redhat.com> Message-ID: <17c6771e0906010902w1172b1b8g4fcf74fea0d92f40@mail.gmail.com> 2009/6/1 Andrew Haley : > Andrew John Hughes wrote: > >> This is clearly a long and tedious list for testing on every change so >> we need to narrow down which ones are most release-critical and which >> features really need to be tested, which are useful but not critical. >> For the IcedTea7 release, we decided not to make the CACAO build >> release-critical due to a bug >> (http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=128) >> that at least myself and one of the CACAO devs (Ringding on >> #cacao at FreeNode) have reproduced. ?I think something like that needs >> regular testing, especially for 7, and support from upstream. > > Yes. ?Cacao is really the Cacao maintainers' job to keep working: others > are in no position to debug it when it breaks. > Indeed. We also don't want to start accumulating a patch queue for that as well. The good news is it looks like there may be a fix for the CACAO issue: http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=128 > At a minimum we need to test Zero, x86/32, and x86/64. ?We may not > need to test Zero on a wide range of architectures; that's up for > discussion. > I think having two is already a clear case for needing work distribution; I know I don't have the means to do 32-bit builds. > Re in-tree/out-of-tree builds: I'm not sure that we need to support > (and therefore test) both. ?I think we should stick as close as possible > to the way Sun work upstream, which AFAIK is in-tree. ?I am quite > aware of the advantages of building otside the source tree, but IMO > the disadvantages of building in a way that's not commonly used > upstream outweigh them. ?What do other people think? > To clarify, OpenJDK is always extracted in the build directory and built using the normal OpenJDK make process. This is always (sort of) out-of-tree. The results are all in the build directory, and I presume there is some funky variable that will allow this to be placed elsewhere than the default. What I'm referring to is separating the build of IcedTea (including the entire OpenJDK tree that is extracted and built) from the Mercurial IcedTea checkout being hacked on. >> As to JTReg, I don't think either 6 or 7 yet have a clean run (i.e. >> 100% pass). I've tended to give less regards to results for 7 after >> finding some tests wouldn't even compile, having been broken by API >> changes (see https://bugs.openjdk.java.net/show_bug.cgi?id=100012 for >> example). ?If we're going to run this before releases, we need a clear >> baseline so we can identify regressions, and ideally continuous >> testing so we can spot regressions as soon as they happen. > > OK. > >> As to the actual release process, I think we cleared most of it up but >> for clarity, we now propose a release at least a week in advance and a >> branch is created for release work once tip is considered stable >> enough to undergo pre-release testing. ?This branch can then also be >> used for minor releases, while tip remains open for new major release >> features. > > That is standard practice in most of the free software projects I know > about. ?We need to ask whether a week's notice is enough, though. ?There > are a great many Debian platforms that take a long time to build and test. > Yes, I was querying a week myself as I wrote it. >> If we have a clear release procedure, I think it will be easier for >> everyone to collaborate on future releases and ensure a smoother and >> more hassle-free process. ? Clear goals for a release and easy >> delineation of work are thus the order of the day. > > I think the basic release process is now pretty good, but it would be > better if it were described online. ?A Wiki page detailing the process > can be discussed and edited by all IcedTea stakeholders. ?So, if someone > thinks that testing on a particular platform in a particular way is > needed, they can propose it on the list and add it to the Wiki page > when agreed. ?I must emphasize that anyone insisting that Platform X > must be tested is in effect promising to do the testing. > > The Wiki page should also detail all known JTreg failures. > The process is good. We still don't have clear requirements as to when a release should be regarded as 'ready'. A wiki page sounds good. > 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 Mon Jun 1 09:31:36 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 01 Jun 2009 12:31:36 -0400 Subject: RFC: Fix --enable-hg in IcedTea6 In-Reply-To: <17c6771e0906010851r22114970xdb3ed983f186799c@mail.gmail.com> References: <4A23F568.4040900@redhat.com> <17c6771e0906010851r22114970xdb3ed983f186799c@mail.gmail.com> Message-ID: <4A240268.5020002@redhat.com> Andrew John Hughes wrote: > 2009/6/1 Omair Majid : >> Hi, >> >> Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16" >> fails when applying the patches, even though jdk6-b16 is a known good build. >> The issues appears to be that the Makefile removes the old hotspot only if >> the openjdk directory doesn't already exist. >> >> The attached patch checks USE_HG and then removes the hotspot directory so >> it can be replaced with HS14. >> >> ChangeLog: >> 2009-06-01 Omair Majid >> >> * Makefile.am (stamps/extract.stamp): Remove hotspot if using >> --enable-hg and an alternate hotspot build. >> >> Can someone please review the patch? >> >> Cheers, >> Omair >> > > The presumption was that anyone wanting to use Mercurial as a source > wanted the whole thing. I see. What about the patches then? Should we apply patches from the original hotspot? Or leave out the hotspot patches completely? > > I don't see how the attached patch can work. This would stop the > hotspot directory not being removed when Mercurial is disabled, and > doesn't do anything about the if block which checks for the openjdk > directory. Err...too many negatives in that sentence, so apologies if I misunderstand something. The patch works (as in I can do a 'make patch' with this change applied and everything works). If mercurial is disabled, it does nothing - it only comes into play if --enable-hg is used. In that case, it deletes the hotspot directory so the alternate hotspot tarball is used. Currently hotspot is only replaced if there is no openjdk directory. In case of --enable-hg, there is, so hotspot wasnt being replaced. The patch explicitly rm -rf's the old hotspot direcotry so it is replaced with HS14. Anyway, the entire point is moot if the purpose of --enable-hg is to provide the unmodified hotspot. > > stamps/extract.stamp: stamps/download.stamp > if OPENJDK_SRC_DIR_FOUND > cp -a $(OPENJDK_SRC_DIR) openjdk > else > if ! test -d openjdk ; \ > then \ > mkdir openjdk ; \ > $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ > chmod -R ug+w openjdk ; \ > if test "x${HSBUILD}" != "xoriginal"; then \ > rm -rf openjdk/hotspot ; \ > fi ; \ > sh $(abs_top_srcdir)/fsg.sh ; \ > fi > if WITH_ALT_HSBUILD > if test -e ${HOTSPOT_SRC_ZIP} ; \ > then \ > if ! test -d openjdk/hotspot ; \ > then \ > $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ > chmod -R ug+w master-* ; \ > mv master-$$($(AWK) 'version==$$1 {print $$2}' > version=$(HSBUILD) \ > $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ > fi ; \ > fi > endif > endif > > The simplest solution is probably to add an additional target for the > HotSpot replacement so it isn't so tightly related to extraction. That makes sense, I will see what I can do. Cheers, Omair From gnu_andrew at member.fsf.org Mon Jun 1 10:18:36 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 1 Jun 2009 18:18:36 +0100 Subject: RFC: Fix --enable-hg in IcedTea6 In-Reply-To: <4A240268.5020002@redhat.com> References: <4A23F568.4040900@redhat.com> <17c6771e0906010851r22114970xdb3ed983f186799c@mail.gmail.com> <4A240268.5020002@redhat.com> Message-ID: <17c6771e0906011018v127a02e1pf0b0ed03f593091e@mail.gmail.com> 2009/6/1 Omair Majid : > Andrew John Hughes wrote: >> >> 2009/6/1 Omair Majid : >>> >>> Hi, >>> >>> Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16" >>> fails when applying the patches, even though jdk6-b16 is a known good >>> build. >>> The issues appears to be that the Makefile removes the old hotspot only >>> if >>> the openjdk directory doesn't already exist. >>> >>> The attached patch checks USE_HG and then removes the hotspot directory >>> so >>> it can be replaced with HS14. >>> >>> ChangeLog: >>> 2009-06-01 ?Omair Majid ? >>> >>> ? * Makefile.am (stamps/extract.stamp): Remove hotspot if using >>> ? --enable-hg and an alternate hotspot build. >>> >>> Can someone please review the patch? >>> >>> Cheers, >>> Omair >>> >> >> The presumption was that anyone wanting to use Mercurial as a source >> wanted the whole thing. > > I see. What about the patches then? Should we apply patches from the > original hotspot? Or leave out the hotspot patches completely? > Sorry, I should have been more clear. I was just explaining why the current status quo is as it is. Changing it as you say is the right thing to do. Things are different in 7 (we don't replace HotSpot, there are a heck of a lot more forests) so it makes more sense to use a pristine checkout. BTW, I wouldn't worry too much about --enable-hg not building. It's really there for people who want to live life on the edge i.e. if you want to use live Mercurial sources to build, you should know what you're letting yourself in for :) Again, it's a lot more useful with 7 because there are lots of rapidly changing upstream forests. >> >> I don't see how the attached patch can work. ?This would stop the >> hotspot directory not being removed when Mercurial is disabled, and >> doesn't do anything about the if block which checks for the openjdk >> directory. > > Err...too many negatives in that sentence, so apologies if I misunderstand > something. Sorry on my part :) The patch works (as in I can do a 'make patch' with this change > applied and everything works) With what configuration options? Do both non-hg and hg builds still work? Does a full build work? . If mercurial is disabled, it does nothing - > it only comes into play if --enable-hg is used. In that case, it deletes the > hotspot directory so the alternate hotspot tarball is used. This is my point; we should always delete the hotspot directory and use an alternate tarball if alternate HotSpot is turned on (which it is by default). Looking at this, it will stop HotSpot being replaced for a normal build and we'll end up with hs11 and broken patches... > Currently > hotspot is only replaced if there is no openjdk directory. In case of > --enable-hg, there is, so hotspot wasnt being replaced. > The patch explicitly > rm -rf's the old hotspot direcotry so it is replaced with HS14. Right, but that should happen, hg or no hg. With your patch, it's only with hg. > Anyway, the > entire point is moot if the purpose of --enable-hg is to provide the > unmodified hotspot. In the case of 6, I think we should still replace HotSpot. > >> >> stamps/extract.stamp: stamps/download.stamp >> if OPENJDK_SRC_DIR_FOUND >> ? ? ? ?cp -a $(OPENJDK_SRC_DIR) openjdk >> else >> ? ? ? ?if ! test -d openjdk ; \ >> ? ? ? ?then \ >> ? ? ? ? ?mkdir openjdk ; \ >> ? ? ? ? ?$(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ >> ? ? ? ? ?chmod -R ug+w openjdk ; \ >> ? ? ? ? ?if test "x${HSBUILD}" != "xoriginal"; then \ >> ? ? ? ? ? ?rm -rf openjdk/hotspot ; \ >> ? ? ? ? ?fi ; \ >> ? ? ? ? ?sh $(abs_top_srcdir)/fsg.sh ; \ >> ? ? ? ?fi >> if WITH_ALT_HSBUILD >> ? ? ? ?if test -e ${HOTSPOT_SRC_ZIP} ; \ >> ? ? ? ?then \ >> ? ? ? ? ?if ! test -d openjdk/hotspot ; \ >> ? ? ? ? ?then \ >> ? ? ? ? ? ?$(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ >> ? ? ? ? ? ?chmod -R ug+w master-* ; \ >> ? ? ? ? ? ?mv master-$$($(AWK) 'version==$$1 {print $$2}' >> version=$(HSBUILD) \ >> ? ? ? ? ? ? ?$(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ >> ? ? ? ? ?fi ; \ >> ? ? ? ?fi >> endif >> endif >> >> The simplest solution is probably to add an additional target for the >> HotSpot replacement so it isn't so tightly related to extraction. > > That makes sense, I will see what I can do. > I think it would make the whole thing less confusing and easier to work on. 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 omajid at redhat.com Mon Jun 1 14:03:08 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 01 Jun 2009 17:03:08 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file Message-ID: <4A24420C.4030401@redhat.com> Hi, The attached patch allows Netx to use the JVM arguments specified in the JNLP file. Currently only 'initial-heap-size', 'max-heap-size' and 'java-vm-args' are used. The first instance of the JVM parses the JNLP file and creates a new JVM with the required arguments if the JNLP file requires it. The option '-Xnofork' is passed to Netx to indicate it shouldnt fork any more JVMs. This also makes it possible to revert to the old behaviour by passing -Xnofork to the first instance of Netx. ChangeLog: 2009-06-01 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (needsNewJVM): New function. Returns true if the JNLP file requires creating a new JVM. (getNewVMArgs): New function. Returns arguments to pass to the new JVM. * rt/net/sourceforge/jnlp/Launcher.java (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to the Java program. (launchExternal): Likewise. Launch Netx with the with the appropriate arguments. (launchApplication): If needed, launch a new JVM. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * rt/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Add forksAllowed to store whether creating a new JVM is allowed. (getForksAllowed): New function. Check if creating a new JVM is allowed. (setForksAllowed): New function. Set whether creating a JVM is allowed. * rt/net/sourceforge/jnlp/services/XBasicService.java (showDocument): Fix call to launchExternal to match the new semantics. Any comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 10848 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090601/94a6276b/netx-jvm-args.patch From ekrichardson at gmail.com Mon Jun 1 15:56:36 2009 From: ekrichardson at gmail.com (Eric Richardson) Date: Mon, 1 Jun 2009 15:56:36 -0700 Subject: Mac OS X - Power PC Build Progress Message-ID: <860cb0120906011556o5f7c48c7n36c8224380858173@mail.gmail.com> Hi All, I made another try at building Icedtea-1.10 yesterday. I have been able to work through all the patches. Some files are being worked on by multiple patches. I have kept track but need to go through my notes before I report my findings and diffs. The basic problem I am having now is that MacOSX on PowerPC reports as "Power Macintosh" so the default configure comes out to be bsd-Power Macintosh. I use ALT_OUTPUTDIR to get the make started. This machine has a ppc970 processor so should it be as defaulted(ARCH_DATA_MODEL=64)? Note: ZERO_ARCHFLAG=-m32 shown below. The core build is defaulting back to 'Power Macintosh' and the spaces seem to be causing problems. Here are the possible offending vars from the output below: ARCH = Power Macintosh\n LIBARCH = Power Macintosh\n ARCH_FAMILY = Power Macintosh\n Error follows. >>>Recursively making core build @ Mon Jun 1 00:26:52 PDT 2009 ... ../../../common/Rules.gmk:263: warning: overriding commands for target `Macintosh' ../../../common/Rules.gmk:49: warning: ignoring old commands for target `Macintosh' ../../../common/Library.gmk:67: *** target file `/Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/lib/Power' has both : and :: entries. Stop. make[5]: *** [build] Error 1 make[4]: *** [build] Error 1 make[3]: *** [build] Error 1 make[2]: *** [corba-build] Error 2 make[1]: *** [build_product_image] Error 2 make: *** [stamps/icedtea-ecj.stamp] Error 2 I have no idea how far I made it but it is much better than before. Any pointers to the appropriate place to adjust the build is appreciated. Eric Commands and some Output follows - may be a bit out of order as it was late ------------------------------ ./autogen.sh ./configure --enable-zero=yes --with-project=bsd --with-gcj-home=/Users/eric/jdk1.5 --with-ecj-jar=/opt/local/share/java/eclipse-ecj.jar --with-xalan2-jar=/opt/local/share/java/xalan.jar --with-xalan2-serializer-jar=/opt/local/share/java/serializer.jar --with-xerces2-jar=/opt/local/share/java/xercesImpl.jar --without-rhino --disable-plugin --disable-xrender make ALT_OUTPUTDIR=`pwd`/build/bsd-macosx ALT_FREETYPE_LIB_PATH=/opt/local/lib ALT_FREETYPE_HEADERS_PATH=/opt/local/include ALT_JIBX_LIBS_PATH=/Users/eric/java/jibx-1.2.1/lib /usr/bin/make \ "ALT_JDK_IMPORT_PATH=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0" "ANT_HOME=/usr/share/ant" "BUILD_NUMBER=b59" "JDK_UPDATE_VERSION=0" "JRE_RELEASE_VERSION=1.7.0_0-b59" "MILESTONE=fcs" "LANG=C" "PATH=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin::$PATH" "ALT_BOOTDIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0" "BUILD_ARCH_DIR=ppc" "ICEDTEA_RT=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" "ICEDTEA_BUILD_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/" "ICEDTEA_CLS_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes" "ICEDTEA_ENDORSED_DIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/lib/endorsed" "ENDORSED=-Djava.endorsed.dirs=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/lib/endorsed" "BOOTCLASSPATH_CLS_RT=-bootclasspath /Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes:/Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" "BOOTCLASSPATH_CLS=-bootclasspath /Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes" "BOOTCLASSPATH_RT_LIBGCJ=-bootclasspath /Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar:/Users/eric/jdk1.5/jre/lib/rt.jar" "CLASSPATH=" "LD_LIBRARY_PATH=" "GENSRCDIR=/Users/eric/java/icedtea-1.10/generated" "ICEDTEA_CORE_BUILD=yes" "ICEDTEA_ZERO_BUILD=yes" "ICEDTEA_SHARK_BUILD=" "ZERO_LIBARCH=ppc" "ZERO_BITSPERWORD=32" "ZERO_ENDIANNESS=big" "ZERO_ARCHDEF=PPC" "ZERO_ARCHFLAG=-m32" "LIBFFI_CFLAGS=-I/opt/local/lib/libffi-3.0.6/include " "LIBFFI_LIBS=-L/opt/local/lib -lffi " "LLVM_CFLAGS=" "LLVM_LDFLAGS=" "LLVM_LIBS=" "FREETYPE2_HEADERS=-I/opt/local/include/freetype2 -I/opt/local/include " "FT2_LIB=-L/opt/local/lib -lfreetype -lz " "ALT_PARALLEL_COMPILE_JOBS=2" "HOTSPOT_BUILD_JOBS=2" "JAVAC=" "RHINO_JAR=no" "JAR_KNOWS_ATFILE=1" "JAR_KNOWS_J_OPTIONS=1" "JAR_ACCEPTS_STDIN_LIST=" "DISABLE_NIMBUS=true" "ALT_NETX_DIST=/Users/eric/java/icedtea-1.10/netx.build" "ALT_LIVECONNECT_DIST=/Users/eric/java/icedtea-1.10" \ -C openjdk-ecj \ Control bsd Power Macintosh 1.7.0_0-bsd all build started: ( cd ./jdk/make && \ /usr/bin/make sanity HOTSPOT_IMPORT_CHECK=false JDK_TOPDIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk JDK_MAKE_SHARED_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk/make/common/shared EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs BUILD_NUMBER=b59 JDK_BUILD_NUMBER=b59 FULL_VERSION=1.7.0_0-bsd-b59 PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0_0 JDK_MKTG_VERSION=7u JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 ARCH_DATA_MODEL=64 COOKED_JDK_UPDATE_VERSION=0 COOKED_BUILD_NUMBER=59 ANT_HOME="/usr/share/ant" ALT_OUTPUTDIR=/Users/eric/java/icedtea-1.10/build/bsd-macosx ALT_LANGTOOLS_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist ALT_CORBA_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/dist ALT_JAXP_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxp/dist ALT_JAXWS_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxws/dist ALT_HOTSPOT_IMPORT_PATH=/Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import BUILD_HOTSPOT=true ; ) Build Machine Information: build machine = new-host.home Build Directory Structure: CWD = /Users/eric/java/icedtea-1.10/openjdk-ecj TOPDIR = . CONTROL_TOPDIR = . LANGTOOLS_TOPDIR = ./langtools JAXP_TOPDIR = ./jaxp JAXWS_TOPDIR = ./jaxws CORBA_TOPDIR = ./corba HOTSPOT_TOPDIR = ./hotspot JDK_TOPDIR = ./jdk Build Directives: BUILD_LANGTOOLS = true BUILD_JAXP = true BUILD_JAXWS = true BUILD_CORBA = true BUILD_HOTSPOT = true BUILD_JDK = true Hotspot Settings: \n HOTSPOT_BUILD_JOBS = 2 \n HOTSPOT_OUTPUTDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/outputdir \n HOTSPOT_EXPORT_PATH = /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import \n \n \nBootstrap Settings:\n BOOTDIR = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_BOOTDIR = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n BOOT_VER = 1.5.0 [requires at least 1.5]\n OUTPUTDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx\n ALT_OUTPUTDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx\n ABS_OUTPUTDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx\n \nBuild Tool Settings:\n SLASH_JAVA = /NOT-SET\n ALT_SLASH_JAVA = \n VARIANT = OPT\n JDK_DEVTOOLS_DIR = /NOT-SET/devtools\n ALT_JDK_DEVTOOLS_DIR = \n ANT_HOME = /usr/share/ant\n UNIXCOMMAND_PATH = /bin/\n ALT_UNIXCOMMAND_PATH = \n COMPILER_PATH = /usr/bin/\n ALT_COMPILER_PATH = \n DEVTOOLS_PATH = /opt/local/bin/\n ALT_DEVTOOLS_PATH = \n COMPILER_NAME = GCC4\n COMPILER_VERSION = GCC4\n CC_VER = 4.0.1 [requires at least 3.2]\n ZIP_VER = 2.32 [requires at least 2.2]\n UNZIP_VER = 5.52 [requires at least 5.12]\n ANT_VER = 1.7.0 [requires at least 1.6.3]\n TEMPDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx/tmp\n \nBuild Directives:\n OPENJDK = true\n USE_HOTSPOT_INTERPRETER_MODE = \n PEDANTIC = \n DEV_ONLY = \n NO_DOCS = \n NO_IMAGES = \n TOOLS_ONLY = \n INSANE = \n COMPILE_APPROACH = parallel\n PARALLEL_COMPILE_JOBS = 2\n ALT_PARALLEL_COMPILE_JOBS = 2\n FASTDEBUG = \n COMPILER_WARNINGS_FATAL = false\n COMPILER_WARNING_LEVEL = \n INCREMENTAL_BUILD = false\n CC_HIGHEST_OPT = \n CC_HIGHER_OPT = \n CC_LOWER_OPT = \n CXXFLAGS = -O2 -fPIC -DCC_NOEX -W -Wall -Wno-unused -Wno-parentheses \n CFLAGS = -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses \n BOOT_JAVA_CMD = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m\n BOOT_JAVAC_CMD = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/javac -J-XX:ThreadStackSize=1536 -J-XX:-PrintVMOptions -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii -XDignore.symbol.file=true\n BOOT_JAR_CMD = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/jar\n BOOT_JARSIGNER_CMD = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/jarsigner\n JAVAC_CMD = \n JAVAH_CMD = \n JAVADOC_CMD = \n \nBuild Platform Settings:\n USER = eric\n PLATFORM = bsd\n ARCH = Power Macintosh\n LIBARCH = Power Macintosh\n ARCH_FAMILY = Power Macintosh\n ARCH_DATA_MODEL = 64\n ARCHPROP = Power Macintosh\n OS_VERSION = 9.6.0 [requires at least 8.0]\n OS_VARIANT_NAME = \n OS_VARIANT_VERSION = \n TEMP_FREE_SPACE = 312319584\n FREE_SPACE = 312319584\n MB_OF_MEMORY = 1024\n \nGNU Make Settings:\n MAKE = /usr/bin/make\n MAKE_VER = 3.81 [requires at least 3.78]\n MAKECMDGOALS = sanity\n MAKEFLAGS = \n SHELL = /bin/sh\n \nTarget Build Versions:\n JDK_VERSION = 1.7.0_0\n MILESTONE = fcs\n RELEASE = 1.7.0_0-bsd\n FULL_VERSION = 1.7.0_0-bsd-b59\n BUILD_NUMBER = b59\n \nExternal File/Binary Locations:\n USRJDKINSTANCES_PATH = /opt/local\n BUILD_JDK_IMPORT_PATH = /NOT-SET/re/jdk/1.7.0_0/promoted/latest/binaries\n ALT_BUILD_JDK_IMPORT_PATH = \n JDK_IMPORT_PATH = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_JDK_IMPORT_PATH = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n LANGTOOLS_DIST = \n ALT_LANGTOOLS_DIST = /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist\n CORBA_DIST = \n ALT_CORBA_DIST = /Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/dist\n JAXP_DIST = \n ALT_JAXP_DIST = /Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxp/dist\n JAXWS_DIST = \n ALT_JAXWS_DIST = /Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxws/dist\n HOTSPOT_DOCS_IMPORT_PATH = /NO_DOCS_DIR\n ALT_HOTSPOT_DOCS_IMPORT_PATH = \n HOTSPOT_IMPORT_PATH = /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import\n ALT_HOTSPOT_IMPORT_PATH = /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import\n HOTSPOT_SERVER_PATH = /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import/jre/lib/Power Macintosh/server\n ALT_HOTSPOT_SERVER_PATH = \n CACERTS_FILE = ./../src/share/lib/security/cacerts\n ALT_CACERTS_FILE = \n JIBX_LIBS_PATH = /Users/eric/java/jibx-1.2.1/lib\n ALT_JIBX_LIBS_PATH = /Users/eric/java/jibx-1.2.1/lib\n CUPS_HEADERS_PATH = /usr/include\n ALT_CUPS_HEADERS_PATH = \n \nOpenJDK-specific settings:\n FREETYPE_HEADERS_PATH = /opt/local/include\n ALT_FREETYPE_HEADERS_PATH = /opt/local/include\n FREETYPE_LIB_PATH = /opt/local/lib\n ALT_FREETYPE_LIB_PATH = /opt/local/lib\n X11_PATH = /usr/X11R6\n ALT_X11_PATH = \n \nOPENJDK Import Binary Plug Settings:\n IMPORT_BINARY_PLUGS = \n BINARY_PLUGS_JARFILE = /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs/bsd-Power Macintosh/jre/lib/rt-closed.jar\n ALT_BINARY_PLUGS_JARFILE = \n BINARY_PLUGS_PATH = /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs/bsd-Power Macintosh\n ALT_BINARY_PLUGS_PATH = \n BUILD_BINARY_PLUGS_PATH = /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs\n ALT_BUILD_BINARY_PLUGS_PATH = \n PLUG_LIBRARY_NAMES = \n \nPrevious JDK Settings:\n PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE\n ALT_PREVIOUS_RELEASE_PATH = \n PREVIOUS_JDK_VERSION = 1.6.0\n ALT_PREVIOUS_JDK_VERSION = \n PREVIOUS_JDK_FILE = \n ALT_PREVIOUS_JDK_FILE = \n PREVIOUS_JRE_FILE = \n ALT_PREVIOUS_JRE_FILE = \n PREVIOUS_RELEASE_IMAGE = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_PREVIOUS_RELEASE_IMAGE = \n Sanity check passed. Control bsd Power Macintosh 1.7.0_0-bsd all_product_build build started: Control bsd Power Macintosh 1.7.0_0-bsd build_product_image build started: /usr/bin/make \ SKIP_FASTDEBUG_BUILD=true \ SKIP_DEBUG_BUILD=true \ \ generic_build_repo_series /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx/j2sdk-image /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools (cd ./langtools/make && \ /usr/bin/make JDK_TOPDIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk JDK_MAKE_SHARED_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk/make/common/shared EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs BUILD_NUMBER=b59 JDK_BUILD_NUMBER=b59 FULL_VERSION=1.7.0_0-bsd-b59 PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0_0 JDK_MKTG_VERSION=7u JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 ARCH_DATA_MODEL=64 COOKED_JDK_UPDATE_VERSION=0 COOKED_BUILD_NUMBER=59 ANT_HOME="/usr/share/ant" ALT_OUTPUTDIR=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools ALT_BOOTDIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0 all) ANT_OPTS=-Djava.io.tmpdir='/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-tmp' ant -diagnostics > /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-diagnostics.log ANT_OPTS=-Djava.io.tmpdir='/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-tmp' ant -Djdk.version=1.7.0_0 -Dfull.version='1.7.0_0-bsd-b59' -Drelease=1.7.0_0 -Dbuild.number=b59 -Djavac.target=5 -Dboot.java.home=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0 -Djavac.executable=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/javac -Dbuild.dir=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build -Ddist.dir=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist build Buildfile: build.xml -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090601/e01dd6de/attachment.html From gbenson at redhat.com Tue Jun 2 07:12:59 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 02 Jun 2009 14:12:59 +0000 Subject: changeset in /hg/icedtea6: 2009-06-02 Gary Benson changeset b7825ac40fd9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b7825ac40fd9 description: 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::ExceptionAction): Replaced with... (SharkTopLevelBlock::ExceptionActionMask): New enum. (SharkTopLevelBlock::check_pending_exception): Changed type of action argument from ExceptionAction to int. (SharkTopLevelBlock::handle_exception): Likewise. (SharkTopLevelBlock::call_vm): Likewise. (SharkTopLevelBlock::acquire_lock): Likewise. (SharkTopLevelBlock::release_lock): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::check_pending_exception): Changed type of action argument from ExceptionAction to int, and added monitor-fudging support. (SharkTopLevelBlock::handle_exception): Changed type of action argument from ExceptionAction to int. (SharkTopLevelBlock::acquire_lock): Changed type of action argument from ExceptionAction to int, and added monitor- fudging to the VM call. (SharkTopLevelBlock::release_lock): Likewise. diffstat: 3 files changed, 71 insertions(+), 32 deletions(-) ChangeLog | 22 +++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 35 +++++++---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 46 ++++++++------- diffs (213 lines): diff -r 6b95c888541f -r b7825ac40fd9 ChangeLog --- a/ChangeLog Fri May 29 12:13:53 2009 -0400 +++ b/ChangeLog Tue Jun 02 15:14:15 2009 +0100 @@ -1,3 +1,25 @@ 2009-05-29 Omair Majid + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::ExceptionAction): Replaced with... + (SharkTopLevelBlock::ExceptionActionMask): New enum. + (SharkTopLevelBlock::check_pending_exception): Changed type + of action argument from ExceptionAction to int. + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::call_vm): Likewise. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::check_pending_exception): Changed type + of action argument from ExceptionAction to int, and added + monitor-fudging support. + (SharkTopLevelBlock::handle_exception): Changed type of + action argument from ExceptionAction to int. + (SharkTopLevelBlock::acquire_lock): Changed type of action + argument from ExceptionAction to int, and added monitor- + fudging to the VM call. + (SharkTopLevelBlock::release_lock): Likewise. + 2009-05-29 Omair Majid * rt/net/sourceforge/jnlp/JREDesc.java: diff -r 6b95c888541f -r b7825ac40fd9 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri May 29 12:13:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:14:15 2009 +0100 @@ -331,9 +331,9 @@ void SharkTopLevelBlock::check_bounds(Sh builder()->SetInsertPoint(in_bounds); } -void SharkTopLevelBlock::check_pending_exception(ExceptionAction action) -{ - assert(action != EX_CHECK_NONE, "shouldn't be"); +void SharkTopLevelBlock::check_pending_exception(int action) +{ + assert(action & EAM_CHECK, "should be"); BasicBlock *exception = function()->CreateBlock("exception"); BasicBlock *no_exception = function()->CreateBlock("no_exception"); @@ -349,16 +349,23 @@ void SharkTopLevelBlock::check_pending_e builder()->SetInsertPoint(exception); builder()->CreateStore(LLVMValue::null(), pending_exception_addr); SharkState *saved_state = current_state()->copy(); - handle_exception(pending_exception, action); + if (action & EAM_MONITOR_FUDGE) { + // The top monitor is marked live, but the exception was thrown + // while setting it up or tearing it down. We need to mark it + // dead before we enter any exception handlers as they will not + // expect it to be there. + set_num_monitors(num_monitors() - 1); + action ^= EAM_MONITOR_FUDGE; + } + handle_exception(pending_exception, action); set_current_state(saved_state); builder()->SetInsertPoint(no_exception); } -void SharkTopLevelBlock::handle_exception(Value* exception, - ExceptionAction action) -{ - if (action == EX_CHECK_FULL && num_exceptions() != 0) { +void SharkTopLevelBlock::handle_exception(Value* exception, int action) +{ + if (action & EAM_HANDLE && num_exceptions() != 0) { // Clear the stack and push the exception onto it. // We do this now to protect it across the VM call // we may be about to make. @@ -1631,7 +1638,7 @@ void SharkTopLevelBlock::do_monitorexit( release_lock(EX_CHECK_FULL); } -void SharkTopLevelBlock::acquire_lock(Value *lockee, ExceptionAction ea) +void SharkTopLevelBlock::acquire_lock(Value *lockee, int exception_action) { BasicBlock *try_recursive = function()->CreateBlock("try_recursive"); BasicBlock *got_recursive = function()->CreateBlock("got_recursive"); @@ -1705,7 +1712,9 @@ void SharkTopLevelBlock::acquire_lock(Va // It's not a recursive case so we need to drop into the runtime builder()->SetInsertPoint(not_recursive); - call_vm(SharkRuntime::monitorenter(), monitor_addr, ea); + call_vm( + SharkRuntime::monitorenter(), monitor_addr, + exception_action | EAM_MONITOR_FUDGE); BasicBlock *acquired_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_acquired); @@ -1714,7 +1723,7 @@ void SharkTopLevelBlock::acquire_lock(Va current_state()->merge(fast_state, acquired_fast, acquired_slow); } -void SharkTopLevelBlock::release_lock(ExceptionAction ea) +void SharkTopLevelBlock::release_lock(int exception_action) { BasicBlock *not_recursive = function()->CreateBlock("not_recursive"); BasicBlock *released_fast = function()->CreateBlock("released_fast"); @@ -1757,7 +1766,9 @@ void SharkTopLevelBlock::release_lock(Ex // Need to drop into the runtime to release this one builder()->SetInsertPoint(slow_path); - call_vm(SharkRuntime::monitorexit(), monitor_addr, ea); + call_vm( + SharkRuntime::monitorexit(), monitor_addr, + exception_action | EAM_MONITOR_FUDGE); BasicBlock *released_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_released); diff -r 6b95c888541f -r b7825ac40fd9 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri May 29 12:13:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:14:15 2009 +0100 @@ -237,28 +237,34 @@ class SharkTopLevelBlock : public SharkB SharkState* saved_state, llvm::BasicBlock* continue_block); // Exceptions - enum ExceptionAction { - EX_CHECK_NONE, // don't check for pending exceptions - EX_CHECK_NO_CATCH, // if there is a pending exception then throw it - EX_CHECK_FULL // if there is a pending exception then catch it - }; // if it has a handler or throw it otherwise - void check_pending_exception(ExceptionAction action); - void handle_exception(llvm::Value* exception, ExceptionAction action); + enum ExceptionActionMask { + // The actual bitmasks that things test against + EAM_CHECK = 1, // whether to check for pending exceptions + EAM_HANDLE = 2, // whether to attempt to handle pending exceptions + EAM_MONITOR_FUDGE = 4, // whether the monitor count needs adjusting + + // More convenient values for passing + EX_CHECK_NONE = 0, + EX_CHECK_NO_CATCH = EAM_CHECK, + EX_CHECK_FULL = EAM_CHECK | EAM_HANDLE + }; + void check_pending_exception(int action); + void handle_exception(llvm::Value* exception, int action); // VM calls private: llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value** args_start, llvm::Value** args_end, - ExceptionAction ea) + int exception_action) { current_state()->decache_for_VM_call(); function()->set_last_Java_frame(); llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); - if (ea != EX_CHECK_NONE) { - check_pending_exception(ea); + if (exception_action) { + check_pending_exception(exception_action); current_state()->set_has_safepointed(true); } return res; @@ -266,40 +272,40 @@ class SharkTopLevelBlock : public SharkB public: llvm::CallInst* call_vm(llvm::Constant* callee, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread()}; - return call_vm(callee, args, args + 1, ea); + return call_vm(callee, args, args + 1, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1}; - return call_vm(callee, args, args + 2, ea); + return call_vm(callee, args, args + 2, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1, arg2}; - return call_vm(callee, args, args + 3, ea); + return call_vm(callee, args, args + 3, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, llvm::Value* arg3, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1, arg2, arg3}; - return call_vm(callee, args, args + 4, ea); + return call_vm(callee, args, args + 4, exception_action); } // Synchronization private: - void acquire_lock(llvm::Value* lockee, ExceptionAction ea); - void release_lock(ExceptionAction ea); + void acquire_lock(llvm::Value* lockee, int exception_action); + void release_lock(int exception_action); public: void acquire_method_lock(); From gbenson at redhat.com Tue Jun 2 07:17:56 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 2 Jun 2009 15:17:56 +0100 Subject: Shark exception processing improvements (part 2) Message-ID: <20090602141756.GB3173@redhat.com> Hi all, This commit fixes a bug where if exceptions thrown during monitor setup and teardown were caught, the handler they entered would be entered as if the monitor that failed were live. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 6b95c888541f -r b7825ac40fd9 ChangeLog --- a/ChangeLog Fri May 29 12:13:53 2009 -0400 +++ b/ChangeLog Tue Jun 02 15:14:15 2009 +0100 @@ -1,3 +1,25 @@ +2009-06-02 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::ExceptionAction): Replaced with... + (SharkTopLevelBlock::ExceptionActionMask): New enum. + (SharkTopLevelBlock::check_pending_exception): Changed type + of action argument from ExceptionAction to int. + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::call_vm): Likewise. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::check_pending_exception): Changed type + of action argument from ExceptionAction to int, and added + monitor-fudging support. + (SharkTopLevelBlock::handle_exception): Changed type of + action argument from ExceptionAction to int. + (SharkTopLevelBlock::acquire_lock): Changed type of action + argument from ExceptionAction to int, and added monitor- + fudging to the VM call. + (SharkTopLevelBlock::release_lock): Likewise. + 2009-05-29 Omair Majid * rt/net/sourceforge/jnlp/JREDesc.java: diff -r 6b95c888541f -r b7825ac40fd9 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri May 29 12:13:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:14:15 2009 +0100 @@ -331,9 +331,9 @@ builder()->SetInsertPoint(in_bounds); } -void SharkTopLevelBlock::check_pending_exception(ExceptionAction action) +void SharkTopLevelBlock::check_pending_exception(int action) { - assert(action != EX_CHECK_NONE, "shouldn't be"); + assert(action & EAM_CHECK, "should be"); BasicBlock *exception = function()->CreateBlock("exception"); BasicBlock *no_exception = function()->CreateBlock("no_exception"); @@ -349,16 +349,23 @@ builder()->SetInsertPoint(exception); builder()->CreateStore(LLVMValue::null(), pending_exception_addr); SharkState *saved_state = current_state()->copy(); - handle_exception(pending_exception, action); + if (action & EAM_MONITOR_FUDGE) { + // The top monitor is marked live, but the exception was thrown + // while setting it up or tearing it down. We need to mark it + // dead before we enter any exception handlers as they will not + // expect it to be there. + set_num_monitors(num_monitors() - 1); + action ^= EAM_MONITOR_FUDGE; + } + handle_exception(pending_exception, action); set_current_state(saved_state); builder()->SetInsertPoint(no_exception); } -void SharkTopLevelBlock::handle_exception(Value* exception, - ExceptionAction action) +void SharkTopLevelBlock::handle_exception(Value* exception, int action) { - if (action == EX_CHECK_FULL && num_exceptions() != 0) { + if (action & EAM_HANDLE && num_exceptions() != 0) { // Clear the stack and push the exception onto it. // We do this now to protect it across the VM call // we may be about to make. @@ -1631,7 +1638,7 @@ release_lock(EX_CHECK_FULL); } -void SharkTopLevelBlock::acquire_lock(Value *lockee, ExceptionAction ea) +void SharkTopLevelBlock::acquire_lock(Value *lockee, int exception_action) { BasicBlock *try_recursive = function()->CreateBlock("try_recursive"); BasicBlock *got_recursive = function()->CreateBlock("got_recursive"); @@ -1705,7 +1712,9 @@ // It's not a recursive case so we need to drop into the runtime builder()->SetInsertPoint(not_recursive); - call_vm(SharkRuntime::monitorenter(), monitor_addr, ea); + call_vm( + SharkRuntime::monitorenter(), monitor_addr, + exception_action | EAM_MONITOR_FUDGE); BasicBlock *acquired_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_acquired); @@ -1714,7 +1723,7 @@ current_state()->merge(fast_state, acquired_fast, acquired_slow); } -void SharkTopLevelBlock::release_lock(ExceptionAction ea) +void SharkTopLevelBlock::release_lock(int exception_action) { BasicBlock *not_recursive = function()->CreateBlock("not_recursive"); BasicBlock *released_fast = function()->CreateBlock("released_fast"); @@ -1757,7 +1766,9 @@ // Need to drop into the runtime to release this one builder()->SetInsertPoint(slow_path); - call_vm(SharkRuntime::monitorexit(), monitor_addr, ea); + call_vm( + SharkRuntime::monitorexit(), monitor_addr, + exception_action | EAM_MONITOR_FUDGE); BasicBlock *released_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_released); diff -r 6b95c888541f -r b7825ac40fd9 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri May 29 12:13:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:14:15 2009 +0100 @@ -237,28 +237,34 @@ SharkState* saved_state, llvm::BasicBlock* continue_block); // Exceptions - enum ExceptionAction { - EX_CHECK_NONE, // don't check for pending exceptions - EX_CHECK_NO_CATCH, // if there is a pending exception then throw it - EX_CHECK_FULL // if there is a pending exception then catch it - }; // if it has a handler or throw it otherwise - void check_pending_exception(ExceptionAction action); - void handle_exception(llvm::Value* exception, ExceptionAction action); + enum ExceptionActionMask { + // The actual bitmasks that things test against + EAM_CHECK = 1, // whether to check for pending exceptions + EAM_HANDLE = 2, // whether to attempt to handle pending exceptions + EAM_MONITOR_FUDGE = 4, // whether the monitor count needs adjusting + + // More convenient values for passing + EX_CHECK_NONE = 0, + EX_CHECK_NO_CATCH = EAM_CHECK, + EX_CHECK_FULL = EAM_CHECK | EAM_HANDLE + }; + void check_pending_exception(int action); + void handle_exception(llvm::Value* exception, int action); // VM calls private: llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value** args_start, llvm::Value** args_end, - ExceptionAction ea) + int exception_action) { current_state()->decache_for_VM_call(); function()->set_last_Java_frame(); llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); - if (ea != EX_CHECK_NONE) { - check_pending_exception(ea); + if (exception_action) { + check_pending_exception(exception_action); current_state()->set_has_safepointed(true); } return res; @@ -266,40 +272,40 @@ public: llvm::CallInst* call_vm(llvm::Constant* callee, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread()}; - return call_vm(callee, args, args + 1, ea); + return call_vm(callee, args, args + 1, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1}; - return call_vm(callee, args, args + 2, ea); + return call_vm(callee, args, args + 2, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1, arg2}; - return call_vm(callee, args, args + 3, ea); + return call_vm(callee, args, args + 3, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, llvm::Value* arg3, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1, arg2, arg3}; - return call_vm(callee, args, args + 4, ea); + return call_vm(callee, args, args + 4, exception_action); } // Synchronization private: - void acquire_lock(llvm::Value* lockee, ExceptionAction ea); - void release_lock(ExceptionAction ea); + void acquire_lock(llvm::Value* lockee, int exception_action); + void release_lock(int exception_action); public: void acquire_method_lock(); From gbenson at redhat.com Tue Jun 2 07:29:13 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 02 Jun 2009 14:29:13 +0000 Subject: changeset in /hg/icedtea6: 2009-06-02 Gary Benson changeset 44cd62d979db in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=44cd62d979db description: 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::call_vm): Bugfix. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 +- diffs (24 lines): diff -r b7825ac40fd9 -r 44cd62d979db ChangeLog --- a/ChangeLog Tue Jun 02 15:14:15 2009 +0100 +++ b/ChangeLog Tue Jun 02 15:30:30 2009 +0100 @@ -1,3 +1,8 @@ 2009-06-02 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::call_vm): Bugfix. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r b7825ac40fd9 -r 44cd62d979db ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:14:15 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:30:30 2009 +0100 @@ -263,7 +263,7 @@ class SharkTopLevelBlock : public SharkB llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); - if (exception_action) { + if (exception_action & EAM_CHECK) { check_pending_exception(exception_action); current_state()->set_has_safepointed(true); } From gbenson at redhat.com Tue Jun 2 07:40:27 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 02 Jun 2009 14:40:27 +0000 Subject: changeset in /hg/icedtea6: 2009-06-02 Gary Benson changeset e01a6da1a425 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e01a6da1a425 description: 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::release_lock): Bugfix. (SharkTopLevelBlock::check_pending_exception): Updated comment to account for the above. diffstat: 2 files changed, 10 insertions(+), 6 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 9 +++------ diffs (40 lines): diff -r 44cd62d979db -r e01a6da1a425 ChangeLog --- a/ChangeLog Tue Jun 02 15:30:30 2009 +0100 +++ b/ChangeLog Tue Jun 02 15:41:45 2009 +0100 @@ -1,3 +1,10 @@ 2009-06-02 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::release_lock): Bugfix. + (SharkTopLevelBlock::check_pending_exception): Updated + comment to account for the above. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 44cd62d979db -r e01a6da1a425 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:30:30 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:41:45 2009 +0100 @@ -351,9 +351,8 @@ void SharkTopLevelBlock::check_pending_e SharkState *saved_state = current_state()->copy(); if (action & EAM_MONITOR_FUDGE) { // The top monitor is marked live, but the exception was thrown - // while setting it up or tearing it down. We need to mark it - // dead before we enter any exception handlers as they will not - // expect it to be there. + // while setting it up so we need to mark it dead before we enter + // any exception handlers as they will not expect it to be there. set_num_monitors(num_monitors() - 1); action ^= EAM_MONITOR_FUDGE; } @@ -1766,9 +1765,7 @@ void SharkTopLevelBlock::release_lock(in // Need to drop into the runtime to release this one builder()->SetInsertPoint(slow_path); - call_vm( - SharkRuntime::monitorexit(), monitor_addr, - exception_action | EAM_MONITOR_FUDGE); + call_vm(SharkRuntime::monitorexit(), monitor_addr, exception_action); BasicBlock *released_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_released); From dbhole at redhat.com Tue Jun 2 11:43:29 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 2 Jun 2009 14:43:29 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <4A24420C.4030401@redhat.com> References: <4A24420C.4030401@redhat.com> Message-ID: <20090602184329.GA18297@redhat.com> * Omair Majid [2009-06-01 17:03]: > Hi, > > The attached patch allows Netx to use the JVM arguments specified in the > JNLP file. Currently only 'initial-heap-size', 'max-heap-size' and > 'java-vm-args' are used. > > The first instance of the JVM parses the JNLP file and creates a new JVM > with the required arguments if the JNLP file requires it. The option > '-Xnofork' is passed to Netx to indicate it shouldnt fork any more JVMs. > This also makes it possible to revert to the old behaviour by passing > -Xnofork to the first instance of Netx. > Xnofork is fine, but it doesn't look like the other args (that javaws accepts) will get passed to the new vm instance... those should be inherited as well. Deepak > ChangeLog: > 2009-06-01 Omair Majid > > * rt/net/sourceforge/jnlp/JNLPFile.java > (needsNewJVM): New function. Returns true if the JNLP file requires > creating a new JVM. > (getNewVMArgs): New function. Returns arguments to pass to the new > JVM. > * rt/net/sourceforge/jnlp/Launcher.java > (launchExternal): Modify to take in arguments to pass to the JVM and > arguments to pass to the Java program. > (launchExternal): Likewise. Launch Netx with the with the > appropriate arguments. > (launchApplication): If needed, launch a new JVM. > * rt/net/sourceforge/jnlp/resources/Messages.properties: > Add BXnofork. > * rt/net/sourceforge/jnlp/runtime/Boot/java: > Add -Xnofork to helpMessage > (main): Check for '-Xnofork'. > * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: > Add forksAllowed to store whether creating a new JVM is allowed. > (getForksAllowed): New function. Check if creating a new JVM is > allowed. > (setForksAllowed): New function. Set whether creating a JVM is > allowed. > * rt/net/sourceforge/jnlp/services/XBasicService.java > (showDocument): Fix call to launchExternal to match the new > semantics. > > Any comments? > > Cheers, > Omair From gnu_andrew at member.fsf.org Tue Jun 2 14:29:55 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 2 Jun 2009 22:29:55 +0100 Subject: changeset in /hg/icedtea: Fix build of Zero VM. In-Reply-To: <20090522145144.GC14260@redhat.com> References: <20090522080057.GA3182@redhat.com> <17c6771e0905220732h15954c98w8beb2dc90ccbcf1e@mail.gmail.com> <20090522145144.GC14260@redhat.com> Message-ID: <17c6771e0906021429u6fc08bc4wa176ba818da1b12a@mail.gmail.com> 2009/5/22 Gary Benson : > Andrew John Hughes wrote: >> Does this look ok for 6? ?It would be nice to keep the two in sync, >> especially if we're going to try and push it upstream (this is >> needed to build with current HotSpot) and I don't see anything that >> would break the build on 6, just stubs that are superfluous on hs14. > > I was meaning to ask you about that. ?Yes, commit away :) > > Cheers, > Gary > > -- > http://gbenson.net/ > Just tried backporting the changeset and it fails miserably. It's possible to get round the Register/RegisterOrConstant issue but not having method_handle is also an issue; I don't want to start patching OpenJDK6 HotSpot with random bits of 7's just so it will compile. Looks like they're going to have to remain different :( When it comes to doing the big push, the version in 7 is probably going to be the one to use so feel free to sync across any changesets. hg export/import does most of the job, but the ChangeLog tends to get in the way. -- 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 xerxes at zafena.se Wed Jun 3 04:58:03 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 03 Jun 2009 13:58:03 +0200 Subject: [patch] icedtea7 cacao fixes Message-ID: <4A26654B.3040003@zafena.se> The two patches enables Icedtea 7b59 to build and run with cacao as vm. by applying the patches from cacao bugzilla http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=128 cacao-native-resolve.patch cacao-xxoption-warnings.patch Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: cacao-native-resolve.patch Type: text/x-patch Size: 4179 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/c8bebd40/cacao-native-resolve.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: cacao-xxoption-warning.patch Type: text/x-patch Size: 1104 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/c8bebd40/cacao-xxoption-warning.patch From xerxes at zafena.se Wed Jun 3 05:36:30 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 03 Jun 2009 14:36:30 +0200 Subject: [patch] icedtea7 cacao fixes In-Reply-To: <4A26654B.3040003@zafena.se> References: <4A26654B.3040003@zafena.se> Message-ID: <4A266E4E.4090307@zafena.se> Xerxes R?nby skrev: > The two patches enables Icedtea 7b59 to build and run with cacao as vm. > by applying the patches from cacao bugzilla > http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=128 > > cacao-native-resolve.patch > cacao-xxoption-warnings.patch > > Cheers > Xerxes > Attached an combined patch of the above with updated HACKING and ChangeLog. Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: 3jun_icedtea7_cacao.patch Type: text/x-patch Size: 6013 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/3a336be2/3jun_icedtea7_cacao.patch From gbenson at redhat.com Wed Jun 3 06:31:35 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 03 Jun 2009 13:31:35 +0000 Subject: changeset in /hg/icedtea6: 2009-06-03 Gary Benson changeset 6bbac4cbc210 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6bbac4cbc210 description: 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp (MacroAssembler::store_oop): New method. * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp (MacroAssembler::store_oop): Likewise. * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp (Relocation::pd_address_in_code): Implement. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Create CodeBuffer with space for relocations. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::code_offset): Renamed as... (SharkFunction::create_unique_pc_offset): New method. (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Updated to use new offset code. (SharkDecacher::start_stack): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Direct calls need no checking. (SharkTopLevelBlock::get_direct_callee): Replace constant pool lookup with oop load from CodeBuffer. diffstat: 8 files changed, 85 insertions(+), 47 deletions(-) ChangeLog | 30 ++++++++++ ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp | 6 ++ ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp | 4 + ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp | 3 - ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 5 - ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 6 -- ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 33 +++++++---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 45 ++++++--------- diffs (249 lines): diff -r e01a6da1a425 -r 6bbac4cbc210 ChangeLog --- a/ChangeLog Tue Jun 02 15:41:45 2009 +0100 +++ b/ChangeLog Wed Jun 03 14:32:52 2009 +0100 @@ -1,3 +1,33 @@ 2009-06-02 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp + (MacroAssembler::store_oop): New method. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp + (MacroAssembler::store_oop): Likewise. + + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp + (Relocation::pd_address_in_code): Implement. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Create CodeBuffer + with space for relocations. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::code_offset): Renamed as... + (SharkFunction::create_unique_pc_offset): New method. + (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. + (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Updated to use new offset code. + (SharkDecacher::start_stack): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Direct calls need no + checking. + (SharkTopLevelBlock::get_direct_callee): Replace constant + pool lookup with oop load from CodeBuffer. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -60,6 +60,12 @@ void MacroAssembler::advance(int bytes) sync(); } +void MacroAssembler::store_oop(jobject obj) +{ + code_section()->relocate(pc(), oop_Relocation::spec_for_immediate()); + emit_address((address) obj); +} + static void _UnimplementedStub() { report_unimplemented(__FILE__, __LINE__); diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Wed Jun 03 14:32:52 2009 +0100 @@ -1,6 +1,6 @@ /* * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 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 @@ -45,8 +45,10 @@ class MacroAssembler : public Assembler void align(int modulus); void bang_stack_with_offset(int offset); bool needs_explicit_null_check(intptr_t offset); + public: void advance(int bytes); + void store_oop(jobject obj); }; #ifdef ASSERT diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -48,7 +48,8 @@ address Relocation::pd_get_address_from_ address* Relocation::pd_address_in_code() { - Unimplemented(); + // Relocations in Shark are just stored directly + return (address *) addr(); } int Relocation::pd_breakpoint_size() diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -31,7 +31,7 @@ void SharkDecacher::start_frame() void SharkDecacher::start_frame() { // Start recording the debug information - _pc_offset = function()->code_offset(); + _pc_offset = function()->create_unique_pc_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), oopmap_slot_munge(function()->arg_size())); @@ -119,8 +119,7 @@ void SharkDecacher::process_pc_slot(int { // Record the PC builder()->CreateStore( - builder()->CreateAdd( - function()->base_pc(), LLVMValue::intptr_constant(pc_offset())), + function()->CreateAddressOfCodeBufferEntry(pc_offset()), function()->CreateAddressOfFrameEntry(offset)); } diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -116,8 +116,7 @@ void SharkCompiler::compile_method(ciEnv env->set_dependencies(new Dependencies(env)); // Create the CodeBuffer and MacroAssembler - BufferBlob *bb = BufferBlob::create("shark_temp", 256 * K); - CodeBuffer cb(bb->instructions_begin(), bb->instructions_size()); + CodeBuffer cb("Shark", 256 * K, 64 * K); cb.initialize_oop_recorder(env->oop_recorder()); MacroAssembler *masm = new MacroAssembler(&cb); @@ -148,9 +147,6 @@ void SharkCompiler::compile_method(ciEnv env->comp_level(), false, false); - - // Free the BufferBlob - BufferBlob::free(bb); } diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 14:32:52 2009 +0100 @@ -137,6 +137,28 @@ class SharkFunction : public StackObj { return flow()->method(); } + // CodeBuffer interface + public: + int create_unique_pc_offset() const + { + int offset = masm()->offset(); + masm()->advance(1); + return offset; + } + llvm::Value* CreateAddressOfCodeBufferEntry(int offset) const + { + return builder()->CreateAdd(base_pc(), LLVMValue::intptr_constant(offset)); + } + llvm::Value* CreateAddressOfOopInCodeBuffer(ciObject* object) const + { + masm()->align(BytesPerWord); + int offset = masm()->offset(); + masm()->store_oop(object->encoding()); + return builder()->CreateIntToPtr( + CreateAddressOfCodeBufferEntry(offset), + llvm::PointerType::getUnqual(SharkType::jobject_type())); + } + // Block management private: llvm::BasicBlock* _block_insertion_point; @@ -216,17 +238,6 @@ class SharkFunction : public StackObj { const char* name = "") const; private: llvm::Value* CreateBuildFrame(); - - // OopMap support - public: - // Every time a new, distinct pc is required, an extra byte is - // emitted into the codebuffer - int code_offset() const - { - int offset = masm()->offset(); - masm()->advance(1); // keeps PCs unique - return offset; - } private: int _extended_frame_size; diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -91,27 +91,25 @@ void SharkTopLevelBlock::scan_for_traps( index = iter()->get_field_index(); break; - case Bytecodes::_invokespecial: - case Bytecodes::_invokestatic: case Bytecodes::_invokevirtual: + method = iter()->get_method(will_link); + assert(will_link, "typeflow responsibility"); + + // If this is a non-final invokevirtual then we need to + // check that its holder is linked, because its vtable + // won't have been set up otherwise. + if (!method->is_final_method() && !method->holder()->is_linked()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } + break; + 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()) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } - break; - } // Continue to the check index = iter()->get_method_index(); @@ -897,15 +895,10 @@ Value *SharkTopLevelBlock::get_callee(Ca // invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - return builder()->CreateValueOfStructEntry( - cache, - bc() == Bytecodes::_invokevirtual ? - ConstantPoolCacheEntry::f2_offset() : - ConstantPoolCacheEntry::f1_offset(), - SharkType::methodOop_type(), - "callee"); + return builder()->CreateLoad( + builder()->CreateBitCast( + function()->CreateAddressOfOopInCodeBuffer(method), + PointerType::getUnqual(SharkType::methodOop_type())), "callee"); } // Non-direct virtual calls are handled here From gbenson at redhat.com Wed Jun 3 06:36:04 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 3 Jun 2009 14:36:04 +0100 Subject: Shark direct call improvements Message-ID: <20090603133603.GA19979@redhat.com> Hi all, This commit replaces the interpreter-style lookup of the callee in the constant pool with a server-JIT-style callee inlined in the code buffer for direct calls (ie invokestatic, invokespecial, and final invokevirtual). This gives a small speedup in itself, but opens the door to a ton of other optimizations. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r e01a6da1a425 -r 6bbac4cbc210 ChangeLog --- a/ChangeLog Tue Jun 02 15:41:45 2009 +0100 +++ b/ChangeLog Wed Jun 03 14:32:52 2009 +0100 @@ -1,3 +1,33 @@ +2009-06-03 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp + (MacroAssembler::store_oop): New method. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp + (MacroAssembler::store_oop): Likewise. + + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp + (Relocation::pd_address_in_code): Implement. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Create CodeBuffer + with space for relocations. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::code_offset): Renamed as... + (SharkFunction::create_unique_pc_offset): New method. + (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. + (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Updated to use new offset code. + (SharkDecacher::start_stack): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Direct calls need no + checking. + (SharkTopLevelBlock::get_direct_callee): Replace constant + pool lookup with oop load from CodeBuffer. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -60,6 +60,12 @@ sync(); } +void MacroAssembler::store_oop(jobject obj) +{ + code_section()->relocate(pc(), oop_Relocation::spec_for_immediate()); + emit_address((address) obj); +} + static void _UnimplementedStub() { report_unimplemented(__FILE__, __LINE__); diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Wed Jun 03 14:32:52 2009 +0100 @@ -1,6 +1,6 @@ /* * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 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 @@ -45,8 +45,10 @@ void align(int modulus); void bang_stack_with_offset(int offset); bool needs_explicit_null_check(intptr_t offset); + public: void advance(int bytes); + void store_oop(jobject obj); }; #ifdef ASSERT diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -48,7 +48,8 @@ address* Relocation::pd_address_in_code() { - Unimplemented(); + // Relocations in Shark are just stored directly + return (address *) addr(); } int Relocation::pd_breakpoint_size() diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -31,7 +31,7 @@ void SharkDecacher::start_frame() { // Start recording the debug information - _pc_offset = function()->code_offset(); + _pc_offset = function()->create_unique_pc_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), oopmap_slot_munge(function()->arg_size())); @@ -119,8 +119,7 @@ { // Record the PC builder()->CreateStore( - builder()->CreateAdd( - function()->base_pc(), LLVMValue::intptr_constant(pc_offset())), + function()->CreateAddressOfCodeBufferEntry(pc_offset()), function()->CreateAddressOfFrameEntry(offset)); } diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -116,8 +116,7 @@ env->set_dependencies(new Dependencies(env)); // Create the CodeBuffer and MacroAssembler - BufferBlob *bb = BufferBlob::create("shark_temp", 256 * K); - CodeBuffer cb(bb->instructions_begin(), bb->instructions_size()); + CodeBuffer cb("Shark", 256 * K, 64 * K); cb.initialize_oop_recorder(env->oop_recorder()); MacroAssembler *masm = new MacroAssembler(&cb); @@ -148,9 +147,6 @@ env->comp_level(), false, false); - - // Free the BufferBlob - BufferBlob::free(bb); } diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 14:32:52 2009 +0100 @@ -137,6 +137,28 @@ return flow()->method(); } + // CodeBuffer interface + public: + int create_unique_pc_offset() const + { + int offset = masm()->offset(); + masm()->advance(1); + return offset; + } + llvm::Value* CreateAddressOfCodeBufferEntry(int offset) const + { + return builder()->CreateAdd(base_pc(), LLVMValue::intptr_constant(offset)); + } + llvm::Value* CreateAddressOfOopInCodeBuffer(ciObject* object) const + { + masm()->align(BytesPerWord); + int offset = masm()->offset(); + masm()->store_oop(object->encoding()); + return builder()->CreateIntToPtr( + CreateAddressOfCodeBufferEntry(offset), + llvm::PointerType::getUnqual(SharkType::jobject_type())); + } + // Block management private: llvm::BasicBlock* _block_insertion_point; @@ -217,17 +239,6 @@ private: llvm::Value* CreateBuildFrame(); - // OopMap support - public: - // Every time a new, distinct pc is required, an extra byte is - // emitted into the codebuffer - int code_offset() const - { - int offset = masm()->offset(); - masm()->advance(1); // keeps PCs unique - return offset; - } - private: int _extended_frame_size; int _stack_slots_offset; diff -r e01a6da1a425 -r 6bbac4cbc210 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 14:32:52 2009 +0100 @@ -91,28 +91,26 @@ index = iter()->get_field_index(); break; - case Bytecodes::_invokespecial: - case Bytecodes::_invokestatic: case Bytecodes::_invokevirtual: + method = iter()->get_method(will_link); + assert(will_link, "typeflow responsibility"); + + // If this is a non-final invokevirtual then we need to + // check that its holder is linked, because its vtable + // won't have been set up otherwise. + if (!method->is_final_method() && !method->holder()->is_linked()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } + break; + 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()) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } - break; - } - // Continue to the check index = iter()->get_method_index(); break; @@ -897,15 +895,10 @@ // invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - return builder()->CreateValueOfStructEntry( - cache, - bc() == Bytecodes::_invokevirtual ? - ConstantPoolCacheEntry::f2_offset() : - ConstantPoolCacheEntry::f1_offset(), - SharkType::methodOop_type(), - "callee"); + return builder()->CreateLoad( + builder()->CreateBitCast( + function()->CreateAddressOfOopInCodeBuffer(method), + PointerType::getUnqual(SharkType::methodOop_type())), "callee"); } // Non-direct virtual calls are handled here From gbenson at redhat.com Wed Jun 3 06:39:14 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 03 Jun 2009 13:39:14 +0000 Subject: changeset in /hg/icedtea6: 2009-06-03 Gary Benson changeset d50608f15874 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d50608f15874 description: 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: Updated copyright year. * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp: Likewise. diffstat: 3 files changed, 9 insertions(+), 2 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp | 2 +- ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp | 2 +- diffs (36 lines): diff -r 6bbac4cbc210 -r d50608f15874 ChangeLog --- a/ChangeLog Wed Jun 03 14:32:52 2009 +0100 +++ b/ChangeLog Wed Jun 03 09:37:51 2009 -0400 @@ -1,3 +1,10 @@ 2009-06-03 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: + Updated copyright year. + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp: + Likewise. + 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp diff -r 6bbac4cbc210 -r d50608f15874 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 03 14:32:52 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 03 09:37:51 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 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 diff -r 6bbac4cbc210 -r d50608f15874 ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 03 14:32:52 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 03 09:37:51 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007 Red Hat, Inc. + * Copyright 2007, 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 From omajid at redhat.com Wed Jun 3 06:32:34 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 03 Jun 2009 09:32:34 -0400 Subject: RFC: Fix --enable-hg in IcedTea6 In-Reply-To: <17c6771e0906011018v127a02e1pf0b0ed03f593091e@mail.gmail.com> References: <4A23F568.4040900@redhat.com> <17c6771e0906010851r22114970xdb3ed983f186799c@mail.gmail.com> <4A240268.5020002@redhat.com> <17c6771e0906011018v127a02e1pf0b0ed03f593091e@mail.gmail.com> Message-ID: <4A267B72.8040806@redhat.com> Andrew John Hughes wrote: > 2009/6/1 Omair Majid : >> Andrew John Hughes wrote: >>> 2009/6/1 Omair Majid : >>>> Hi, >>>> >>>> Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16" >>>> fails when applying the patches, even though jdk6-b16 is a known good >>>> build. >>>> The issues appears to be that the Makefile removes the old hotspot only >>>> if >>>> the openjdk directory doesn't already exist. >>>> >>>> The attached patch checks USE_HG and then removes the hotspot directory >>>> so >>>> it can be replaced with HS14. >>>> >>>> ChangeLog: >>>> 2009-06-01 Omair Majid >>>> >>>> * Makefile.am (stamps/extract.stamp): Remove hotspot if using >>>> --enable-hg and an alternate hotspot build. >>>> >>>> Can someone please review the patch? >>>> >>>> Cheers, >>>> Omair >>>> >>> The presumption was that anyone wanting to use Mercurial as a source >>> wanted the whole thing. >> I see. What about the patches then? Should we apply patches from the >> original hotspot? Or leave out the hotspot patches completely? >> > > Sorry, I should have been more clear. I was just explaining why the > current status quo is as it is. Changing it as you say is the right > thing to do. Things are different in 7 (we don't replace HotSpot, > there are a heck of a lot more forests) so it makes more sense to use > a pristine checkout. > > BTW, I wouldn't worry too much about --enable-hg not building. It's > really there for people who want to live life on the edge i.e. if you > want to use live Mercurial sources to build, you should know what > you're letting yourself in for :) Yeah, that's true. I would expect occasional bugs and IcedTea lagging behind patches. But failing to build completely with a known good revision? > Again, it's a lot more useful with 7 because there are lots of rapidly > changing upstream forests. > Oh. That makes a lot of sense. Should we remove --enable-hg from 6? >>> I don't see how the attached patch can work. This would stop the >>> hotspot directory not being removed when Mercurial is disabled, and >>> doesn't do anything about the if block which checks for the openjdk >>> directory. >> Err...too many negatives in that sentence, so apologies if I misunderstand >> something. > > Sorry on my part :) > No worries. > The patch works (as in I can do a 'make patch' with this change >> applied and everything works) > > With what configuration options? Do both non-hg and hg builds still work? > Does a full build work? I did try those options with the old patch. See blow for the new list. > > . If mercurial is disabled, it does nothing - >> it only comes into play if --enable-hg is used. In that case, it deletes the >> hotspot directory so the alternate hotspot tarball is used. > > This is my point; we should always delete the hotspot directory and > use an alternate tarball if alternate HotSpot is turned on (which it > is by default). Looking at this, it will stop HotSpot being replaced > for a normal build and we'll end up with hs11 and broken patches... > >> Currently >> hotspot is only replaced if there is no openjdk directory. In case of >> --enable-hg, there is, so hotspot wasnt being replaced. >> The patch explicitly >> rm -rf's the old hotspot direcotry so it is replaced with HS14. > > Right, but that should happen, hg or no hg. With your patch, it's only with hg. > >> Anyway, the >> entire point is moot if the purpose of --enable-hg is to provide the >> unmodified hotspot. > > In the case of 6, I think we should still replace HotSpot. > >>> stamps/extract.stamp: stamps/download.stamp >>> if OPENJDK_SRC_DIR_FOUND >>> cp -a $(OPENJDK_SRC_DIR) openjdk >>> else >>> if ! test -d openjdk ; \ >>> then \ >>> mkdir openjdk ; \ >>> $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ >>> chmod -R ug+w openjdk ; \ >>> if test "x${HSBUILD}" != "xoriginal"; then \ >>> rm -rf openjdk/hotspot ; \ >>> fi ; \ >>> sh $(abs_top_srcdir)/fsg.sh ; \ >>> fi >>> if WITH_ALT_HSBUILD >>> if test -e ${HOTSPOT_SRC_ZIP} ; \ >>> then \ >>> if ! test -d openjdk/hotspot ; \ >>> then \ >>> $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ >>> chmod -R ug+w master-* ; \ >>> mv master-$$($(AWK) 'version==$$1 {print $$2}' >>> version=$(HSBUILD) \ >>> $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ >>> fi ; \ >>> fi >>> endif >>> endif >>> >>> The simplest solution is probably to add an additional target for the >>> HotSpot replacement so it isn't so tightly related to extraction. >> That makes sense, I will see what I can do. >> > > I think it would make the whole thing less confusing and easier to work on. > Thanks. I got a patch that I *think* works. Here are the configurations I tested: Just 'make patch' ./autogen.sh && ./configure && make patch ./autogen.sh && ./configure --enable-hg --with-hg-revision=jdk6-b16 && make patch ./autogen.sh && ./configure --with-openjdk && make patch ./autogen.sh && ./configure --with-openjdk && make replace-hotspot ./autogen.sh && ./configure --with-openjdk --disable-docs && make patch ./autogen.sh && ./configure --enable-hg --with-hg-revision=jdk6-b16 --with-openjdk --disable-docs && make patch ./autogen.sh && ./configure --enable-zero && make patch ./autogen.sh && ./configure --enable-zero --enable-shark && make patch ./autogen.sh && ./configure --enable-plugin --enable-pulse-java --enable-visualvm --enable-openjdk-cross-compilation --enable-zero --enable-shark --enable-systemtap --enable-cacao && make patch Full Build: ./autogen.sh && ./configure && make ./autogen.sh && ./configure --with-openjdk --disable-docs && make ./autogen.sh && ./configure --with-hotspot-build=original && make patch failed just like it does with the current Makefile.am (trying to apply icedtea-shark.patch) ChangeLog: 2009-06-03 Omair Majid * Makefile.am (stamps/ports.stamp): Depend on stamps/replace-hotspot.stamp instead of stamps/extract.stamp. (stamps/extract.stamp): Dont replace hotspot. (stamps/replace-hotspot.stamp): New target. Replace hotspot without assuming anything about the build. (clean-replace-hotspot): New target. (stamps/patch-fsg.stamp): Depend on stamps/replace-hotspot.stamp instead of stamps/extract.stamp. (stamps/hotspot-tools-source-files.txt): Likewise. (rt-source-files.txt): Likewise. (stamps/cacao.stamp): Likewise. (stamps/visualvm.stamp): Likewise. (stamps/nbplatform.stamp): Likewise. (replace-hotspot): New alias for stamps/replace-hotspot.stamp. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea6-enable-hg.patch Type: text/x-patch Size: 3943 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/4fab1795/icedtea6-enable-hg.patch From xerxes at zafena.se Wed Jun 3 07:07:16 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 03 Jun 2009 16:07:16 +0200 Subject: [patch] icedtea7 cacao fixes - rfc In-Reply-To: <4A266E4E.4090307@zafena.se> References: <4A26654B.3040003@zafena.se> <4A266E4E.4090307@zafena.se> Message-ID: <4A268394.2020902@zafena.se> Xerxes R?nby skrev: > Xerxes R?nby skrev: >> The two patches enables Icedtea 7b59 to build and run with cacao as vm. >> by applying the patches from cacao bugzilla >> http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=128 >> >> cacao-native-resolve.patch >> cacao-xxoption-warnings.patch >> >> Cheers >> Xerxes >> > > Attached an combined patch of the above with updated HACKING and > ChangeLog. > > Xerxes > > > Sorry for the fuzz, but i realized I had included the wrong patch. This attached patch includes the patches from cacao hg. Suggestions are welcome. Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: 3jun1520_icedtea7_cacao_pr128.patch Type: text/x-patch Size: 6875 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/54532466/3jun1520_icedtea7_cacao_pr128.patch From xerxes at zafena.se Wed Jun 3 07:42:28 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Wed, 03 Jun 2009 14:42:28 +0000 Subject: changeset in /hg/icedtea: 2009-06-03 Xerxes R?nby changeset 123d98a5d278 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=123d98a5d278 description: 2009-06-03 Xerxes R?nby Stefan Ring * patches/cacao/native-resolve.patch: New. * patches/cacao/xxoption-warning.patch: Likewise. * Makefile.am (ICEDTEA_PATCHES): Apply above patches. * HACKING: Update. diffstat: 5 files changed, 178 insertions(+), 2 deletions(-) ChangeLog | 8 + HACKING | 4 Makefile.am | 4 patches/cacao/native-resolve.patch | 143 ++++++++++++++++++++++++++++++++++ patches/cacao/xxoption-warning.patch | 21 ++++ diffs (215 lines): diff -r e9bd43d303d1 -r 123d98a5d278 ChangeLog --- a/ChangeLog Sun May 31 15:29:57 2009 +0200 +++ b/ChangeLog Wed Jun 03 16:41:46 2009 +0200 @@ -1,3 +1,11 @@ 2009-05-30 Mark Wielaard + Stefan Ring + + * patches/cacao/native-resolve.patch: New. + * patches/cacao/xxoption-warning.patch: Likewise. + * Makefile.am (ICEDTEA_PATCHES): Apply above patches. + * HACKING: Update. + 2009-05-30 Mark Wielaard * configure.ac (enable-nio2): Removed. diff -r e9bd43d303d1 -r 123d98a5d278 HACKING --- a/HACKING Sun May 31 15:29:57 2009 +0200 +++ b/HACKING Wed Jun 03 16:41:46 2009 +0200 @@ -72,7 +72,9 @@ The following patches are currently appl * icedtea-includedb.patch: Add missing include files. (S6793825, mostly applied in b47) * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295). * cacao/launcher.patch: For the 'java' command, create new thread depending on the current VM. -* icedtea-cacao-no-mmap-first-page.patch: Don't mmap the first memory page. +* cacao/no-mmap-first-page.patch: Don't mmap the first memory page. +* cacao/native-resolve.patch: Changes CACAO resolution order for native methods. (cacao PR128). +* cacao/xxoption-warning.patch: Makes CACAO print warnings to stderr (cacao PR128). The following patches are only applied to OpenJDK6 in IcedTea6: diff -r e9bd43d303d1 -r 123d98a5d278 Makefile.am --- a/Makefile.am Sun May 31 15:29:57 2009 +0200 +++ b/Makefile.am Wed Jun 03 16:41:46 2009 +0200 @@ -2087,7 +2087,9 @@ if BUILD_CACAO if BUILD_CACAO ICEDTEA_PATCHES += \ patches/cacao/launcher.patch \ - patches/cacao/no-mmap-first-page.patch + patches/cacao/no-mmap-first-page.patch \ + patches/cacao/native-resolve.patch \ + patches/cacao/xxoption-warning.patch endif if WITH_CACAO diff -r e9bd43d303d1 -r 123d98a5d278 patches/cacao/native-resolve.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/native-resolve.patch Wed Jun 03 16:41:46 2009 +0200 @@ -0,0 +1,143 @@ + +# HG changeset patch +# User Stefan Ring +# Date 1244023392 -7200 +# Node ID 8e8a38453f6c1e11e057457daf979a1acb40d9bf +# Parent 5fdb98095047abf89f3d3298417499c2c06f8d56 +Fixes PR128 (changed resolution order for native methods). +* src/native/native.c (native_method_resolve): Consider internal +methods before descending into java.lang.ClassLoader. + +--- cacao/cacao/src/native/native.c Wed Jun 03 01:35:48 2009 +0200 ++++ cacao/cacao/src/native/native.c Wed Jun 03 12:03:12 2009 +0200 +@@ -1,6 +1,6 @@ + /* src/native/native.c - native library support + +- Copyright (C) 1996-2005, 2006, 2007, 2008 ++ Copyright (C) 1996-2005, 2006, 2007, 2008, 2009 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO + + This file is part of CACAO. +@@ -529,39 +529,47 @@ + + newname = native_make_overloaded_function(name, m->descriptor); + ++ /* Try to find the native function symbol in the main program. */ ++ ++ f = native_method_find(m); ++ ++ if (f != NULL) ++ if (opt_verbosejni) ++ printf("internal ]\n"); ++ ++#if defined(ENABLE_DL) + /* check the library hash entries of the classloader of the + methods's class */ + +- f = NULL; ++ if (f == NULL) { ++ /* Get the classloader. */ + +-#if defined(ENABLE_DL) +- /* Get the classloader. */ ++ cl = class_get_classloader(m->clazz); + +- cl = class_get_classloader(m->clazz); ++ /* normally addresses are aligned to 4, 8 or 16 bytes */ + +- /* normally addresses are aligned to 4, 8 or 16 bytes */ ++ key = ((u4) (ptrint) cl) >> 4; /* align to 16-byte */ ++ slot = key & (hashtable_library->size - 1); ++ le = hashtable_library->ptr[slot]; + +- key = ((u4) (ptrint) cl) >> 4; /* align to 16-byte */ +- slot = key & (hashtable_library->size - 1); +- le = hashtable_library->ptr[slot]; ++ /* iterate through loaders in this hash slot */ + +- /* iterate through loaders in this hash slot */ ++ while ((le != NULL) && (f == NULL)) { ++ /* iterate through names in this loader */ + +- while ((le != NULL) && (f == NULL)) { +- /* iterate through names in this loader */ ++ ne = le->namelink; + +- ne = le->namelink; +- +- while ((ne != NULL) && (f == NULL)) { +- f = (functionptr) (ptrint) system_dlsym(ne->handle, name->text); ++ while ((ne != NULL) && (f == NULL)) { ++ f = (functionptr) (ptrint) system_dlsym(ne->handle, name->text); + +- if (f == NULL) +- f = (functionptr) (ptrint) system_dlsym(ne->handle, newname->text); ++ if (f == NULL) ++ f = (functionptr) (ptrint) system_dlsym(ne->handle, newname->text); + +- ne = ne->hashlink; ++ ne = ne->hashlink; ++ } ++ ++ le = le->hashlink; + } +- +- le = le->hashlink; + } + + # if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK) +@@ -577,23 +585,22 @@ + class_java_lang_ClassLoader, + true); + +- if (method_findNative == NULL) +- return NULL; ++ if (method_findNative != NULL) { ++ /* try the normal name */ + +- /* try the normal name */ +- +- s = javastring_new(name); +- +- f = (functionptr) (intptr_t) vm_call_method_long(method_findNative, +- NULL, cl, s); +- +- /* if not found, try the mangled name */ +- +- if (f == NULL) { +- s = javastring_new(newname); ++ s = javastring_new(name); + + f = (functionptr) (intptr_t) vm_call_method_long(method_findNative, + NULL, cl, s); ++ ++ /* if not found, try the mangled name */ ++ ++ if (f == NULL) { ++ s = javastring_new(newname); ++ ++ f = (functionptr) (intptr_t) vm_call_method_long(method_findNative, ++ NULL, cl, s); ++ } + } + } + # endif +@@ -602,17 +609,6 @@ + if (opt_verbosejni) + printf("JNI ]\n"); + #endif +- +- /* If not found, try to find the native function symbol in the +- main program. */ +- +- if (f == NULL) { +- f = native_method_find(m); +- +- if (f != NULL) +- if (opt_verbosejni) +- printf("internal ]\n"); +- } + + #if defined(ENABLE_JVMTI) + /* fire Native Method Bind event */ + diff -r e9bd43d303d1 -r 123d98a5d278 patches/cacao/xxoption-warning.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/xxoption-warning.patch Wed Jun 03 16:41:46 2009 +0200 @@ -0,0 +1,21 @@ + +# HG changeset patch +# User Stefan Ring +# Date 1243985748 -7200 +# Node ID 5fdb98095047abf89f3d3298417499c2c06f8d56 +# Parent 2d848ae770f5b7bfc59cf007ceae36f97adccc03 +* src/vm/options.c (options_xx): Don't clutter output with warning (print to +stderr instead). + +--- cacao/cacao/src/vmcore/options.c Wed Apr 22 11:20:27 2009 +0200 ++++ cacao/cacao/src/vmcore/options.c Wed Jun 03 01:35:48 2009 +0200 +@@ -816,7 +816,7 @@ + #endif + + default: +- printf("Unknown -XX option: %s\n", name); ++ fprintf(stderr, "Unknown -XX option: %s\n", name); + break; + } + } + From gbenson at redhat.com Wed Jun 3 08:17:05 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 03 Jun 2009 15:17:05 +0000 Subject: changeset in /hg/icedtea6: 2009-06-03 Gary Benson changeset 724f230eea38 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=724f230eea38 description: 2009-06-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::_code_buffer): New field. (SharkBuilder::code_buffer): New method. (SharkBuilder::set_code_buffer): Likewise. (SharkBuilder::code_buffer_address): Likewise. (SharkBuilder::CreateInlineOop): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Use a SharkCodeBuffer instead of a normal CodeBuffer and MacroAssembler, and hook it into the SharkBuilder. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::SharkFunction): Removed masm argument and initialization. (SharkFunction::_masm): Removed. (SharkFunction::_base_pc): Likewise. (SharkFunction::masm): Likewise. (SharkFunction::base_pc): Likewise. (SharkFunction::create_unique_pc_offset): Likewise. (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Use the new code to allocate the SharkEntry, and set the base_pc for the SharkCodeBuffer. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::get_direct_callee): Use new code. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Use new code. (SharkDecacher::start_stack): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 9 files changed, 194 insertions(+), 55 deletions(-) ChangeLog | 40 ++++++ ports/hotspot/src/share/vm/includeDB_shark | 7 - ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 31 ++++ ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 4 ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp | 94 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 18 +- ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 9 - ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 38 ------ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 8 - diffs (400 lines): diff -r d50608f15874 -r 724f230eea38 ChangeLog --- a/ChangeLog Wed Jun 03 09:37:51 2009 -0400 +++ b/ChangeLog Wed Jun 03 11:15:36 2009 -0400 @@ -1,3 +1,43 @@ 2009-06-03 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: + New file. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::_code_buffer): New field. + (SharkBuilder::code_buffer): New method. + (SharkBuilder::set_code_buffer): Likewise. + (SharkBuilder::code_buffer_address): Likewise. + (SharkBuilder::CreateInlineOop): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Use a SharkCodeBuffer + instead of a normal CodeBuffer and MacroAssembler, and + hook it into the SharkBuilder. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::SharkFunction): Removed masm argument + and initialization. + (SharkFunction::_masm): Removed. + (SharkFunction::_base_pc): Likewise. + (SharkFunction::masm): Likewise. + (SharkFunction::base_pc): Likewise. + (SharkFunction::create_unique_pc_offset): Likewise. + (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. + (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Use the new code to allocate + the SharkEntry, and set the base_pc for the SharkCodeBuffer. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::get_direct_callee): Use new code. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Use new code. + (SharkDecacher::start_stack): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 11:15:36 2009 -0400 @@ -107,6 +107,7 @@ sharkBuilder.hpp sharkBuilder.hpp llvmHeaders.hpp sharkBuilder.hpp llvmValue.hpp sharkBuilder.hpp sizes.hpp +sharkBuilder.hpp sharkCodeBuffer.hpp sharkBuilder.hpp sharkCompiler.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.hpp @@ -128,10 +129,13 @@ sharkCacheDecache.hpp sharkCacheDecache.hpp sharkFunction.hpp sharkCacheDecache.hpp sharkStateScanner.hpp +sharkCodeBuffer.hpp allocation.hpp +sharkCodeBuffer.hpp codeBuffer.hpp +sharkCodeBuffer.hpp llvmHeaders.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 @@ -141,6 +145,7 @@ sharkCompiler.cpp sharkCompiler.cpp oopRecorder.hpp sharkCompiler.cpp shark_globals.hpp sharkCompiler.cpp sharkBuilder.hpp +sharkCompiler.cpp sharkCodeBuffer.hpp sharkCompiler.cpp sharkCompiler.hpp sharkCompiler.cpp sharkEntry.hpp sharkCompiler.cpp sharkFunction.hpp diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -360,4 +360,35 @@ class SharkBuilder : public llvm::IRBuil LLVMValue::intptr_constant(~(s - 1)), name); } + + // CodeBuffer interface + private: + SharkCodeBuffer* _code_buffer; + + public: + SharkCodeBuffer* code_buffer() const + { + return _code_buffer; + } + void set_code_buffer(SharkCodeBuffer* code_buffer) + { + _code_buffer = code_buffer; + } + + public: + llvm::Value* code_buffer_address(int offset) + { + return CreateAdd( + code_buffer()->base_pc(), LLVMValue::intptr_constant(offset)); + } + + public: + llvm::Value* CreateInlineOop(ciObject* object, const char* name = "") + { + return CreateLoad( + CreateIntToPtr( + code_buffer_address(code_buffer()->inline_oop(object)), + llvm::PointerType::getUnqual(SharkType::jobject_type())), + name); + } }; diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -31,7 +31,7 @@ void SharkDecacher::start_frame() void SharkDecacher::start_frame() { // Start recording the debug information - _pc_offset = function()->create_unique_pc_offset(); + _pc_offset = builder()->code_buffer()->create_unique_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), oopmap_slot_munge(function()->arg_size())); @@ -119,7 +119,7 @@ void SharkDecacher::process_pc_slot(int { // Record the PC builder()->CreateStore( - function()->CreateAddressOfCodeBufferEntry(pc_offset()), + builder()->code_buffer_address(pc_offset()), function()->CreateAddressOfFrameEntry(offset)); } diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -0,0 +1,94 @@ +/* + * 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 SharkCodeBuffer : public StackObj { + public: + SharkCodeBuffer(OopRecorder* oop_recorder) + : _cb("Shark", 256 * K, 64 * K), + _masm(new MacroAssembler(&_cb)), + _base_pc(NULL) + { + cb()->initialize_oop_recorder(oop_recorder); + } + + private: + CodeBuffer _cb; + MacroAssembler* _masm; + llvm::Value* _base_pc; + + public: + CodeBuffer* cb() + { + return &_cb; + } + + private: + MacroAssembler* masm() const + { + return _masm; + } + + public: + llvm::Value* base_pc() const + { + return _base_pc; + } + void set_base_pc(llvm::Value* base_pc) + { + assert(_base_pc == NULL, "only do this once"); + _base_pc = base_pc; + } + + // Allocate some space in the buffer and return its address. + // This buffer will have been relocated by the time the method + // is installed, so you can't inline the result in code. + public: + void* malloc(size_t size) const + { + masm()->align(BytesPerWord); + void *result = masm()->pc(); + masm()->advance(size); + return result; + } + + // Create a unique offset in the buffer. + public: + int create_unique_offset() const + { + int offset = masm()->offset(); + masm()->advance(1); + return offset; + } + + // Inline an oop into the buffer and return its offset. + public: + int inline_oop(ciObject* object) const + { + masm()->align(BytesPerWord); + int offset = masm()->offset(); + masm()->store_oop(object->encoding()); + return offset; + } +}; diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -115,14 +115,16 @@ void SharkCompiler::compile_method(ciEnv env->debug_info()->set_oopmaps(&oopmaps); env->set_dependencies(new Dependencies(env)); - // Create the CodeBuffer and MacroAssembler - CodeBuffer cb("Shark", 256 * K, 64 * K); - cb.initialize_oop_recorder(env->oop_recorder()); - MacroAssembler *masm = new MacroAssembler(&cb); - - // Compile the method into the CodeBuffer + // Create the code buffer and hook it into the builder + SharkCodeBuffer cb(env->oop_recorder()); + builder()->set_code_buffer(&cb); + + // Compile the method ciBytecodeStream iter(target); - SharkFunction function(this, name, flow, &iter, masm); + SharkFunction function(this, name, flow, &iter); + + // Unhook the code buffer + builder()->set_code_buffer(NULL); // Install the method into the VM CodeOffsets offsets; @@ -138,7 +140,7 @@ void SharkCompiler::compile_method(ciEnv entry_bci, &offsets, 0, - &cb, + cb.cb(), 0, &oopmaps, &handler_table, diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -33,8 +33,8 @@ void SharkFunction::initialize() void SharkFunction::initialize() { // Emit the entry point - SharkEntry *entry = (SharkEntry *) masm()->pc(); - masm()->advance(sizeof(SharkEntry)); + SharkEntry *entry = + (SharkEntry *) builder()->code_buffer()->malloc(sizeof(SharkEntry)); // Create the function _function = builder()->CreateFunction(name()); @@ -45,8 +45,9 @@ void SharkFunction::initialize() Function::arg_iterator ai = function()->arg_begin(); Argument *method = ai++; method->setName("method"); - _base_pc = ai++; - _base_pc->setName("base_pc"); + Argument *base_pc = ai++; + base_pc->setName("base_pc"); + builder()->code_buffer()->set_base_pc(base_pc); _thread = ai++; _thread->setName("thread"); diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -32,13 +32,11 @@ class SharkFunction : public StackObj { SharkFunction(SharkCompiler* compiler, const char* name, ciTypeFlow* flow, - ciBytecodeStream* iter, - MacroAssembler* masm) + ciBytecodeStream* iter) : _compiler(compiler), _name(name), _flow(flow), - _iter(iter), - _masm(masm) + _iter(iter) { initialize(); } private: @@ -49,10 +47,8 @@ class SharkFunction : public StackObj { const char* _name; ciTypeFlow* _flow; ciBytecodeStream* _iter; - MacroAssembler* _masm; llvm::Function* _function; SharkTopLevelBlock** _blocks; - llvm::Value* _base_pc; llvm::Value* _thread; int _max_monitors; GrowableArray _deferred_zero_checks; @@ -74,10 +70,6 @@ class SharkFunction : public StackObj { { return _iter; } - MacroAssembler* masm() const - { - return _masm; - } llvm::Function* function() const { return _function; @@ -86,10 +78,6 @@ class SharkFunction : public StackObj { { return _blocks[i]; } - llvm::Value* base_pc() const - { - return _base_pc; - } llvm::Value* thread() const { return _thread; @@ -135,28 +123,6 @@ class SharkFunction : public StackObj { ciMethod* target() const { return flow()->method(); - } - - // CodeBuffer interface - public: - int create_unique_pc_offset() const - { - int offset = masm()->offset(); - masm()->advance(1); - return offset; - } - llvm::Value* CreateAddressOfCodeBufferEntry(int offset) const - { - return builder()->CreateAdd(base_pc(), LLVMValue::intptr_constant(offset)); - } - llvm::Value* CreateAddressOfOopInCodeBuffer(ciObject* object) const - { - masm()->align(BytesPerWord); - int offset = masm()->offset(); - masm()->store_oop(object->encoding()); - return builder()->CreateIntToPtr( - CreateAddressOfCodeBufferEntry(offset), - llvm::PointerType::getUnqual(SharkType::jobject_type())); } // Block management diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -895,10 +895,10 @@ Value *SharkTopLevelBlock::get_callee(Ca // invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { - return builder()->CreateLoad( - builder()->CreateBitCast( - function()->CreateAddressOfOopInCodeBuffer(method), - PointerType::getUnqual(SharkType::methodOop_type())), "callee"); + return builder()->CreateBitCast( + builder()->CreateInlineOop(method), + SharkType::methodOop_type(), + "callee"); } // Non-direct virtual calls are handled here From gbenson at redhat.com Wed Jun 3 08:22:16 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 3 Jun 2009 16:22:16 +0100 Subject: Shark codebuffer refactoring Message-ID: <20090603152216.GD19979@redhat.com> Hi all, This commit moves the interface to the CodeBuffer from SharkFunction into a new class, SharkCodeBuffer, accessed through the SharkBuilder. This makes the oop-inlining code I wrote this morning accessible from anywhere in Shark. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r d50608f15874 -r 724f230eea38 ChangeLog --- a/ChangeLog Wed Jun 03 09:37:51 2009 -0400 +++ b/ChangeLog Wed Jun 03 11:15:36 2009 -0400 @@ -1,3 +1,43 @@ +2009-06-03 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: + New file. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::_code_buffer): New field. + (SharkBuilder::code_buffer): New method. + (SharkBuilder::set_code_buffer): Likewise. + (SharkBuilder::code_buffer_address): Likewise. + (SharkBuilder::CreateInlineOop): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Use a SharkCodeBuffer + instead of a normal CodeBuffer and MacroAssembler, and + hook it into the SharkBuilder. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::SharkFunction): Removed masm argument + and initialization. + (SharkFunction::_masm): Removed. + (SharkFunction::_base_pc): Likewise. + (SharkFunction::masm): Likewise. + (SharkFunction::base_pc): Likewise. + (SharkFunction::create_unique_pc_offset): Likewise. + (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. + (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Use the new code to allocate + the SharkEntry, and set the base_pc for the SharkCodeBuffer. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::get_direct_callee): Use new code. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Use new code. + (SharkDecacher::start_stack): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 11:15:36 2009 -0400 @@ -107,6 +107,7 @@ sharkBuilder.hpp llvmHeaders.hpp sharkBuilder.hpp llvmValue.hpp sharkBuilder.hpp sizes.hpp +sharkBuilder.hpp sharkCodeBuffer.hpp sharkBuilder.hpp sharkCompiler.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.hpp @@ -128,10 +129,13 @@ sharkCacheDecache.hpp sharkFunction.hpp sharkCacheDecache.hpp sharkStateScanner.hpp +sharkCodeBuffer.hpp allocation.hpp +sharkCodeBuffer.hpp codeBuffer.hpp +sharkCodeBuffer.hpp llvmHeaders.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 @@ -141,6 +145,7 @@ sharkCompiler.cpp oopRecorder.hpp sharkCompiler.cpp shark_globals.hpp sharkCompiler.cpp sharkBuilder.hpp +sharkCompiler.cpp sharkCodeBuffer.hpp sharkCompiler.cpp sharkCompiler.hpp sharkCompiler.cpp sharkEntry.hpp sharkCompiler.cpp sharkFunction.hpp diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -360,4 +360,35 @@ LLVMValue::intptr_constant(~(s - 1)), name); } + + // CodeBuffer interface + private: + SharkCodeBuffer* _code_buffer; + + public: + SharkCodeBuffer* code_buffer() const + { + return _code_buffer; + } + void set_code_buffer(SharkCodeBuffer* code_buffer) + { + _code_buffer = code_buffer; + } + + public: + llvm::Value* code_buffer_address(int offset) + { + return CreateAdd( + code_buffer()->base_pc(), LLVMValue::intptr_constant(offset)); + } + + public: + llvm::Value* CreateInlineOop(ciObject* object, const char* name = "") + { + return CreateLoad( + CreateIntToPtr( + code_buffer_address(code_buffer()->inline_oop(object)), + llvm::PointerType::getUnqual(SharkType::jobject_type())), + name); + } }; diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -31,7 +31,7 @@ void SharkDecacher::start_frame() { // Start recording the debug information - _pc_offset = function()->create_unique_pc_offset(); + _pc_offset = builder()->code_buffer()->create_unique_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), oopmap_slot_munge(function()->arg_size())); @@ -119,7 +119,7 @@ { // Record the PC builder()->CreateStore( - function()->CreateAddressOfCodeBufferEntry(pc_offset()), + builder()->code_buffer_address(pc_offset()), function()->CreateAddressOfFrameEntry(offset)); } diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -0,0 +1,94 @@ +/* + * 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 SharkCodeBuffer : public StackObj { + public: + SharkCodeBuffer(OopRecorder* oop_recorder) + : _cb("Shark", 256 * K, 64 * K), + _masm(new MacroAssembler(&_cb)), + _base_pc(NULL) + { + cb()->initialize_oop_recorder(oop_recorder); + } + + private: + CodeBuffer _cb; + MacroAssembler* _masm; + llvm::Value* _base_pc; + + public: + CodeBuffer* cb() + { + return &_cb; + } + + private: + MacroAssembler* masm() const + { + return _masm; + } + + public: + llvm::Value* base_pc() const + { + return _base_pc; + } + void set_base_pc(llvm::Value* base_pc) + { + assert(_base_pc == NULL, "only do this once"); + _base_pc = base_pc; + } + + // Allocate some space in the buffer and return its address. + // This buffer will have been relocated by the time the method + // is installed, so you can't inline the result in code. + public: + void* malloc(size_t size) const + { + masm()->align(BytesPerWord); + void *result = masm()->pc(); + masm()->advance(size); + return result; + } + + // Create a unique offset in the buffer. + public: + int create_unique_offset() const + { + int offset = masm()->offset(); + masm()->advance(1); + return offset; + } + + // Inline an oop into the buffer and return its offset. + public: + int inline_oop(ciObject* object) const + { + masm()->align(BytesPerWord); + int offset = masm()->offset(); + masm()->store_oop(object->encoding()); + return offset; + } +}; diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -115,14 +115,16 @@ env->debug_info()->set_oopmaps(&oopmaps); env->set_dependencies(new Dependencies(env)); - // Create the CodeBuffer and MacroAssembler - CodeBuffer cb("Shark", 256 * K, 64 * K); - cb.initialize_oop_recorder(env->oop_recorder()); - MacroAssembler *masm = new MacroAssembler(&cb); + // Create the code buffer and hook it into the builder + SharkCodeBuffer cb(env->oop_recorder()); + builder()->set_code_buffer(&cb); - // Compile the method into the CodeBuffer + // Compile the method ciBytecodeStream iter(target); - SharkFunction function(this, name, flow, &iter, masm); + SharkFunction function(this, name, flow, &iter); + + // Unhook the code buffer + builder()->set_code_buffer(NULL); // Install the method into the VM CodeOffsets offsets; @@ -138,7 +140,7 @@ entry_bci, &offsets, 0, - &cb, + cb.cb(), 0, &oopmaps, &handler_table, diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -33,8 +33,8 @@ void SharkFunction::initialize() { // Emit the entry point - SharkEntry *entry = (SharkEntry *) masm()->pc(); - masm()->advance(sizeof(SharkEntry)); + SharkEntry *entry = + (SharkEntry *) builder()->code_buffer()->malloc(sizeof(SharkEntry)); // Create the function _function = builder()->CreateFunction(name()); @@ -45,8 +45,9 @@ Function::arg_iterator ai = function()->arg_begin(); Argument *method = ai++; method->setName("method"); - _base_pc = ai++; - _base_pc->setName("base_pc"); + Argument *base_pc = ai++; + base_pc->setName("base_pc"); + builder()->code_buffer()->set_base_pc(base_pc); _thread = ai++; _thread->setName("thread"); diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -32,13 +32,11 @@ SharkFunction(SharkCompiler* compiler, const char* name, ciTypeFlow* flow, - ciBytecodeStream* iter, - MacroAssembler* masm) + ciBytecodeStream* iter) : _compiler(compiler), _name(name), _flow(flow), - _iter(iter), - _masm(masm) + _iter(iter) { initialize(); } private: @@ -49,10 +47,8 @@ const char* _name; ciTypeFlow* _flow; ciBytecodeStream* _iter; - MacroAssembler* _masm; llvm::Function* _function; SharkTopLevelBlock** _blocks; - llvm::Value* _base_pc; llvm::Value* _thread; int _max_monitors; GrowableArray _deferred_zero_checks; @@ -74,10 +70,6 @@ { return _iter; } - MacroAssembler* masm() const - { - return _masm; - } llvm::Function* function() const { return _function; @@ -85,10 +77,6 @@ SharkTopLevelBlock* block(int i) const { return _blocks[i]; - } - llvm::Value* base_pc() const - { - return _base_pc; } llvm::Value* thread() const { @@ -135,28 +123,6 @@ ciMethod* target() const { return flow()->method(); - } - - // CodeBuffer interface - public: - int create_unique_pc_offset() const - { - int offset = masm()->offset(); - masm()->advance(1); - return offset; - } - llvm::Value* CreateAddressOfCodeBufferEntry(int offset) const - { - return builder()->CreateAdd(base_pc(), LLVMValue::intptr_constant(offset)); - } - llvm::Value* CreateAddressOfOopInCodeBuffer(ciObject* object) const - { - masm()->align(BytesPerWord); - int offset = masm()->offset(); - masm()->store_oop(object->encoding()); - return builder()->CreateIntToPtr( - CreateAddressOfCodeBufferEntry(offset), - llvm::PointerType::getUnqual(SharkType::jobject_type())); } // Block management diff -r d50608f15874 -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -895,10 +895,10 @@ // invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { - return builder()->CreateLoad( - builder()->CreateBitCast( - function()->CreateAddressOfOopInCodeBuffer(method), - PointerType::getUnqual(SharkType::methodOop_type())), "callee"); + return builder()->CreateBitCast( + builder()->CreateInlineOop(method), + SharkType::methodOop_type(), + "callee"); } // Non-direct virtual calls are handled here From omajid at redhat.com Wed Jun 3 10:41:03 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 03 Jun 2009 13:41:03 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <20090602184329.GA18297@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> Message-ID: <4A26B5AF.605@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-01 17:03]: >> Hi, >> >> The attached patch allows Netx to use the JVM arguments specified in the >> JNLP file. Currently only 'initial-heap-size', 'max-heap-size' and >> 'java-vm-args' are used. >> >> The first instance of the JVM parses the JNLP file and creates a new JVM >> with the required arguments if the JNLP file requires it. The option >> '-Xnofork' is passed to Netx to indicate it shouldnt fork any more JVMs. >> This also makes it possible to revert to the old behaviour by passing >> -Xnofork to the first instance of Netx. >> > > Xnofork is fine, but it doesn't look like the other args (that javaws > accepts) will get passed to the new vm instance... those should be > inherited as well. Doh. Updated patch attached. ChangeLog: 2009-06-03 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (needsNewJVM): New function. Returns true if the JNLP file requires creating a new JVM. (getNewVMArgs): New function. Returns arguments to pass to the new JVM. * rt/net/sourceforge/jnlp/Launcher.java (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to the Java program. Use the local file used to launch this instance if possible. (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to the Java program. Launch Netx with the with the appropriate arguments. (launchApplication): If needed, launch a new JVM and pass along the Netx arguments. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * rt/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. Set initial arguments. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Add forksAllowed to store whether creating a new JVM is allowed. Add initialArguments to store the arguments to Netx. (getForksAllowed): New function. Check if creating a new JVM is allowed. (setForksAllowed): New function. Set whether creating a JVM is allowed. (setInitialArguments): New function. Store the arguments to Netx. (getInitialArguments): New function. Return the arguments passed to Netx. * rt/net/sourceforge/jnlp/services/XBasicService.java (showDocument): Fix call to launchExternal to match the new semantics. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 11870 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/034ebc47/netx-jvm-args.patch From dbhole at redhat.com Wed Jun 3 11:07:52 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 3 Jun 2009 14:07:52 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <4A26B5AF.605@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> Message-ID: <20090603180752.GB21904@redhat.com> * Omair Majid [2009-06-03 13:41]: Looks good. Couple of things though: 1. getForksAlowed() is spelled incorrectly.. 2. There is a lot of unnecessary wrapping/unwrapping going on with the whole convert array to list, add to list, convert list to array and iterate over array. Why not just change initialArgs to be a list, and then just use that list everywhere and iterate over it when launching the new vm? Cheers, Deepak -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 11903 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/9c6634d9/netx-jvm-args.patch From ekrichardson at gmail.com Wed Jun 3 12:29:31 2009 From: ekrichardson at gmail.com (Eric Richardson) Date: Wed, 3 Jun 2009 12:29:31 -0700 Subject: JAXWS build problem - Darwin/PowerPC/Zero Message-ID: <860cb0120906031229of68779fw2ad329ce2d7e60f6@mail.gmail.com> Hi, I get the following error. In the release notes in says JIBX is not needed. ERROR: You do not have access to valid JIBX library files. \n Please check your access to \n /NOT-SET/devtools/share/jibx/lib/jibx-run.jar \n and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_JIBX_LIBS_PATH \n Exiting because of the above error(s). \n make[1]: *** [post-sanity] Error 1 make: *** [stamps/icedtea-ecj.stamp] Error 2 I tried this which will at least get me to the jaxws build - jaxp compiles. make ALT_OUTPUTDIR=`pwd`/build/bsd-ppc ALT_FREETYPE_LIB_PATH=/opt/local/lib ALT_FREETYPE_HEADERS_PATH=/opt/local/include ALT_JIBX_LIBS_PATH=/Users/eric/java/jibx-1.2.1/lib LIBARCH=ppc ARCH=ppc ARCH_FAMILY=ppc ARCH_DATA_MODEL=32 It fails like this below and the appropriate class is in the stax-api.jar in the jibx lib dir. build-classes: [javac] Compiling 2425 source files to /Users/eric/java/icedtea-1.10/build/bsd-ppc/jaxws/build/classes [javac] /Users/eric/java/icedtea-1.10/openjdk-ecj/jaxws/src/share/classes/com/sun/istack/internal/XMLStreamException2.java:27: package javax.xml.stream does not exist [javac] import javax.xml.stream.XMLStreamException; I looked at both the Makefile which calls the Ant build.xml and neither refer to any classpath so I assume that the missing classes need to somehow be in the bootclasspath for the jvm/javac. I also try the configure option --with-jibx with no luck. ./configure --enable-zero=yes --with-project=bsd --with-gcj-home=/Users/eric/jdk1.5 --with-ecj-jar=/opt/local/share/java/eclipse-ecj.jar --with-xalan2-jar=/opt/local/share/java/xalan.jar --with-xalan2-serializer-jar=/opt/local/share/java/serializer.jar --with-xerces2-jar=/opt/local/share/java/xercesImpl.jar --with-jibx=/Users/eric/java/jibx-1.2.1 --without-rhino --disable-plugin --disable-xrender Any help appreciated, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/f3df2983/attachment.html From mvfranz at gmail.com Wed Jun 3 15:51:43 2009 From: mvfranz at gmail.com (Michael Franz) Date: Wed, 3 Jun 2009 18:51:43 -0400 Subject: Mac OS X - Power PC Build Progress In-Reply-To: <860cb0120906011556o5f7c48c7n36c8224380858173@mail.gmail.com> References: <860cb0120906011556o5f7c48c7n36c8224380858173@mail.gmail.com> Message-ID: Eric, Were you able to work through all the patches? Michael On Mon, Jun 1, 2009 at 6:56 PM, Eric Richardson wrote: > Hi All, > > I made another try at building Icedtea-1.10 yesterday. I have been able to > work through all the patches. Some files are being worked on by multiple > patches. I have kept track but need to go through my notes before I report > my findings and diffs. > > The basic problem I am having now is that MacOSX on PowerPC reports as > "Power Macintosh" so the default configure comes out to be bsd-Power > Macintosh. I use ALT_OUTPUTDIR to get the make started. > > This machine has a ppc970 processor so should it be as > defaulted(ARCH_DATA_MODEL=64)? Note: ZERO_ARCHFLAG=-m32 shown below. > > The core build is defaulting back to 'Power Macintosh' and the spaces seem > to be causing problems. Here are the possible offending vars from the output > below: ARCH = Power Macintosh\n LIBARCH = Power Macintosh\n ARCH_FAMILY = > Power Macintosh\n > Error follows. > > >>>Recursively making core build @ Mon Jun 1 00:26:52 PDT 2009 ... > ../../../common/Rules.gmk:263: warning: overriding commands for target > `Macintosh' > ../../../common/Rules.gmk:49: warning: ignoring old commands for target > `Macintosh' > ../../../common/Library.gmk:67: *** target file > `/Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/lib/Power' has both : > and :: entries. Stop. > make[5]: *** [build] Error 1 > make[4]: *** [build] Error 1 > make[3]: *** [build] Error 1 > make[2]: *** [corba-build] Error 2 > make[1]: *** [build_product_image] Error 2 > make: *** [stamps/icedtea-ecj.stamp] Error 2 > > I have no idea how far I made it but it is much better than before. Any > pointers to the appropriate place to adjust the build is appreciated. > > Eric > > > Commands and some Output follows - may be a bit out of order as it was late > ------------------------------ > > ./autogen.sh > > ./configure --enable-zero=yes --with-project=bsd > --with-gcj-home=/Users/eric/jdk1.5 > --with-ecj-jar=/opt/local/share/java/eclipse-ecj.jar > --with-xalan2-jar=/opt/local/share/java/xalan.jar > --with-xalan2-serializer-jar=/opt/local/share/java/serializer.jar > --with-xerces2-jar=/opt/local/share/java/xercesImpl.jar --without-rhino > --disable-plugin --disable-xrender > > make ALT_OUTPUTDIR=`pwd`/build/bsd-macosx > ALT_FREETYPE_LIB_PATH=/opt/local/lib > ALT_FREETYPE_HEADERS_PATH=/opt/local/include > ALT_JIBX_LIBS_PATH=/Users/eric/java/jibx-1.2.1/lib > > > > /usr/bin/make \ > > "ALT_JDK_IMPORT_PATH=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0" > "ANT_HOME=/usr/share/ant" "BUILD_NUMBER=b59" "JDK_UPDATE_VERSION=0" > "JRE_RELEASE_VERSION=1.7.0_0-b59" "MILESTONE=fcs" "LANG=C" > "PATH=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin::$PATH" > "ALT_BOOTDIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0" > "BUILD_ARCH_DIR=ppc" > "ICEDTEA_RT=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" > "ICEDTEA_BUILD_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/" > "ICEDTEA_CLS_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes" > "ICEDTEA_ENDORSED_DIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/lib/endorsed" > "ENDORSED=-Djava.endorsed.dirs=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/lib/endorsed" > "BOOTCLASSPATH_CLS_RT=-bootclasspath > /Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes:/Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" > "BOOTCLASSPATH_CLS=-bootclasspath > /Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes" > "BOOTCLASSPATH_RT_LIBGCJ=-bootclasspath > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar:/Users/eric/jdk1.5/jre/lib/rt.jar" > "CLASSPATH=" "LD_LIBRARY_PATH=" > "GENSRCDIR=/Users/eric/java/icedtea-1.10/generated" "ICEDTEA_CORE_BUILD=yes" > "ICEDTEA_ZERO_BUILD=yes" "ICEDTEA_SHARK_BUILD=" "ZERO_LIBARCH=ppc" > "ZERO_BITSPERWORD=32" "ZERO_ENDIANNESS=big" "ZERO_ARCHDEF=PPC" > "ZERO_ARCHFLAG=-m32" "LIBFFI_CFLAGS=-I/opt/local/lib/libffi-3.0.6/include " > "LIBFFI_LIBS=-L/opt/local/lib -lffi " "LLVM_CFLAGS=" "LLVM_LDFLAGS=" > "LLVM_LIBS=" "FREETYPE2_HEADERS=-I/opt/local/include/freetype2 > -I/opt/local/include " "FT2_LIB=-L/opt/local/lib -lfreetype -lz " > "ALT_PARALLEL_COMPILE_JOBS=2" "HOTSPOT_BUILD_JOBS=2" "JAVAC=" "RHINO_JAR=no" > "JAR_KNOWS_ATFILE=1" "JAR_KNOWS_J_OPTIONS=1" "JAR_ACCEPTS_STDIN_LIST=" > "DISABLE_NIMBUS=true" > "ALT_NETX_DIST=/Users/eric/java/icedtea-1.10/netx.build" > "ALT_LIVECONNECT_DIST=/Users/eric/java/icedtea-1.10" \ > -C openjdk-ecj \ > > Control bsd Power Macintosh 1.7.0_0-bsd all build started: > ( cd ./jdk/make && \ > /usr/bin/make sanity HOTSPOT_IMPORT_CHECK=false > JDK_TOPDIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk > JDK_MAKE_SHARED_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk/make/common/shared > EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs > BUILD_NUMBER=b59 JDK_BUILD_NUMBER=b59 FULL_VERSION=1.7.0_0-bsd-b59 > PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0_0 JDK_MKTG_VERSION=7u > JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 > PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 > ARCH_DATA_MODEL=64 COOKED_JDK_UPDATE_VERSION=0 COOKED_BUILD_NUMBER=59 > ANT_HOME="/usr/share/ant" > ALT_OUTPUTDIR=/Users/eric/java/icedtea-1.10/build/bsd-macosx > ALT_LANGTOOLS_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist > ALT_CORBA_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/dist > ALT_JAXP_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxp/dist > ALT_JAXWS_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxws/dist > ALT_HOTSPOT_IMPORT_PATH=/Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import > BUILD_HOTSPOT=true ; ) > > Build Machine Information: > build machine = new-host.home > > Build Directory Structure: > CWD = /Users/eric/java/icedtea-1.10/openjdk-ecj > TOPDIR = . > CONTROL_TOPDIR = . > LANGTOOLS_TOPDIR = ./langtools > JAXP_TOPDIR = ./jaxp > JAXWS_TOPDIR = ./jaxws > CORBA_TOPDIR = ./corba > HOTSPOT_TOPDIR = ./hotspot > JDK_TOPDIR = ./jdk > > Build Directives: > BUILD_LANGTOOLS = true > BUILD_JAXP = true > BUILD_JAXWS = true > BUILD_CORBA = true > BUILD_HOTSPOT = true > BUILD_JDK = true > > Hotspot Settings: \n HOTSPOT_BUILD_JOBS = 2 \n > HOTSPOT_OUTPUTDIR = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/outputdir \n > HOTSPOT_EXPORT_PATH = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import \n \n > > \nBootstrap Settings:\n BOOTDIR = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_BOOTDIR = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n BOOT_VER = 1.5.0 > [requires at least 1.5]\n OUTPUTDIR = > /Users/eric/java/icedtea-1.10/build/bsd-macosx\n ALT_OUTPUTDIR = > /Users/eric/java/icedtea-1.10/build/bsd-macosx\n ABS_OUTPUTDIR = > /Users/eric/java/icedtea-1.10/build/bsd-macosx\n \nBuild Tool Settings:\n > SLASH_JAVA = /NOT-SET\n ALT_SLASH_JAVA = \n VARIANT = OPT\n > JDK_DEVTOOLS_DIR = /NOT-SET/devtools\n ALT_JDK_DEVTOOLS_DIR = \n > ANT_HOME = /usr/share/ant\n UNIXCOMMAND_PATH = /bin/\n > ALT_UNIXCOMMAND_PATH = \n COMPILER_PATH = /usr/bin/\n ALT_COMPILER_PATH > = \n DEVTOOLS_PATH = /opt/local/bin/\n ALT_DEVTOOLS_PATH = \n > COMPILER_NAME = GCC4\n COMPILER_VERSION = GCC4\n CC_VER = 4.0.1 [requires > at least 3.2]\n ZIP_VER = 2.32 [requires at least 2.2]\n UNZIP_VER = 5.52 > [requires at least 5.12]\n ANT_VER = 1.7.0 [requires at least 1.6.3]\n > TEMPDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx/tmp\n \nBuild > Directives:\n OPENJDK = true\n USE_HOTSPOT_INTERPRETER_MODE = \n PEDANTIC > = \n DEV_ONLY = \n NO_DOCS = \n NO_IMAGES = \n TOOLS_ONLY = \n INSANE = > \n COMPILE_APPROACH = parallel\n PARALLEL_COMPILE_JOBS = 2\n > ALT_PARALLEL_COMPILE_JOBS = 2\n FASTDEBUG = \n COMPILER_WARNINGS_FATAL = > false\n COMPILER_WARNING_LEVEL = \n INCREMENTAL_BUILD = false\n > CC_HIGHEST_OPT = \n CC_HIGHER_OPT = \n CC_LOWER_OPT = \n CXXFLAGS = -O2 > -fPIC -DCC_NOEX -W -Wall -Wno-unused -Wno-parentheses \n CFLAGS = -O2 > -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses \n > BOOT_JAVA_CMD = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/java > -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Xmx896m > -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m\n BOOT_JAVAC_CMD = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/javac > -J-XX:ThreadStackSize=1536 -J-XX:-PrintVMOptions > -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-Xmx896m -J-Xms128m > -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii > -XDignore.symbol.file=true\n BOOT_JAR_CMD = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/jar\n > BOOT_JARSIGNER_CMD = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/jarsigner\n JAVAC_CMD > = \n JAVAH_CMD = \n JAVADOC_CMD = \n \nBuild Platform Settings:\n USER = > eric\n PLATFORM = bsd\n ARCH = Power Macintosh\n LIBARCH = Power > Macintosh\n ARCH_FAMILY = Power Macintosh\n ARCH_DATA_MODEL = 64\n > ARCHPROP = Power Macintosh\n OS_VERSION = 9.6.0 [requires at least 8.0]\n > OS_VARIANT_NAME = \n OS_VARIANT_VERSION = \n TEMP_FREE_SPACE = > 312319584\n FREE_SPACE = 312319584\n MB_OF_MEMORY = 1024\n \nGNU Make > Settings:\n MAKE = /usr/bin/make\n MAKE_VER = 3.81 [requires at least > 3.78]\n MAKECMDGOALS = sanity\n MAKEFLAGS = \n SHELL = /bin/sh\n \nTarget > Build Versions:\n JDK_VERSION = 1.7.0_0\n MILESTONE = fcs\n RELEASE = > 1.7.0_0-bsd\n FULL_VERSION = 1.7.0_0-bsd-b59\n BUILD_NUMBER = b59\n > \nExternal File/Binary Locations:\n USRJDKINSTANCES_PATH = /opt/local\n > BUILD_JDK_IMPORT_PATH = > /NOT-SET/re/jdk/1.7.0_0/promoted/latest/binaries\n > ALT_BUILD_JDK_IMPORT_PATH = \n JDK_IMPORT_PATH = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_JDK_IMPORT_PATH = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n LANGTOOLS_DIST = \n > ALT_LANGTOOLS_DIST = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist\n CORBA_DIST > = \n ALT_CORBA_DIST = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/dist\n JAXP_DIST = > \n ALT_JAXP_DIST = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxp/dist\n JAXWS_DIST = > \n ALT_JAXWS_DIST = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxws/dist\n > HOTSPOT_DOCS_IMPORT_PATH = /NO_DOCS_DIR\n ALT_HOTSPOT_DOCS_IMPORT_PATH = > \n HOTSPOT_IMPORT_PATH = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import\n > ALT_HOTSPOT_IMPORT_PATH = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import\n > HOTSPOT_SERVER_PATH = > /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import/jre/lib/Power > Macintosh/server\n ALT_HOTSPOT_SERVER_PATH = \n CACERTS_FILE = > ./../src/share/lib/security/cacerts\n ALT_CACERTS_FILE = \n > JIBX_LIBS_PATH = /Users/eric/java/jibx-1.2.1/lib\n ALT_JIBX_LIBS_PATH = > /Users/eric/java/jibx-1.2.1/lib\n CUPS_HEADERS_PATH = /usr/include\n > ALT_CUPS_HEADERS_PATH = \n \nOpenJDK-specific settings:\n > FREETYPE_HEADERS_PATH = /opt/local/include\n ALT_FREETYPE_HEADERS_PATH = > /opt/local/include\n FREETYPE_LIB_PATH = /opt/local/lib\n > ALT_FREETYPE_LIB_PATH = /opt/local/lib\n X11_PATH = /usr/X11R6\n > ALT_X11_PATH = \n \nOPENJDK Import Binary Plug Settings:\n > IMPORT_BINARY_PLUGS = \n BINARY_PLUGS_JARFILE = > /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs/bsd-Power > Macintosh/jre/lib/rt-closed.jar\n ALT_BINARY_PLUGS_JARFILE = \n > BINARY_PLUGS_PATH = > /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs/bsd-Power > Macintosh\n ALT_BINARY_PLUGS_PATH = \n BUILD_BINARY_PLUGS_PATH = > /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs\n > ALT_BUILD_BINARY_PLUGS_PATH = \n PLUG_LIBRARY_NAMES = \n \nPrevious JDK > Settings:\n PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE\n > ALT_PREVIOUS_RELEASE_PATH = \n PREVIOUS_JDK_VERSION = 1.6.0\n > ALT_PREVIOUS_JDK_VERSION = \n PREVIOUS_JDK_FILE = \n > ALT_PREVIOUS_JDK_FILE = \n PREVIOUS_JRE_FILE = \n ALT_PREVIOUS_JRE_FILE > = \n PREVIOUS_RELEASE_IMAGE = > /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n > ALT_PREVIOUS_RELEASE_IMAGE = \n > > Sanity check passed. > Control bsd Power Macintosh 1.7.0_0-bsd all_product_build build started: > Control bsd Power Macintosh 1.7.0_0-bsd build_product_image build started: > /usr/bin/make \ > SKIP_FASTDEBUG_BUILD=true \ > SKIP_DEBUG_BUILD=true \ > \ > generic_build_repo_series > /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx > /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx/j2sdk-image > /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools > (cd ./langtools/make && \ > /usr/bin/make JDK_TOPDIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk > JDK_MAKE_SHARED_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk/make/common/shared > EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs > BUILD_NUMBER=b59 JDK_BUILD_NUMBER=b59 FULL_VERSION=1.7.0_0-bsd-b59 > PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0_0 JDK_MKTG_VERSION=7u > JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 > PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 > ARCH_DATA_MODEL=64 COOKED_JDK_UPDATE_VERSION=0 COOKED_BUILD_NUMBER=59 > ANT_HOME="/usr/share/ant" > ALT_OUTPUTDIR=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools > ALT_BOOTDIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0 all) > ANT_OPTS=-Djava.io.tmpdir='/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-tmp' > ant -diagnostics > > /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-diagnostics.log > ANT_OPTS=-Djava.io.tmpdir='/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-tmp' > ant -Djdk.version=1.7.0_0 -Dfull.version='1.7.0_0-bsd-b59' > -Drelease=1.7.0_0 -Dbuild.number=b59 -Djavac.target=5 > -Dboot.java.home=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0 > -Djavac.executable=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/javac > -Dbuild.dir=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build > -Ddist.dir=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist > build > Buildfile: build.xml > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090603/5ba97db9/attachment.html From ptisnovs at redhat.com Thu Jun 4 03:21:39 2009 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Thu, 4 Jun 2009 06:21:39 -0400 (EDT) Subject: New member of Open Source Java team in RedHat Message-ID: <41480188.1182291244110899736.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Hi, Let me introduce myself: I'm new member of Open Source Java team in RedHat, my position is QA Engineer for OpenJDK project. My IcedTea wiki login name is PavelTisnovsky, so don't be suprised, when you see this name in edit history :-) My contact information: e-mail: ptisnovs at redhat.com or Jabber: tisnik at jabber.cz I'm looking forward for our cooperation, Pavel Tisnovsky From mjw at redhat.com Thu Jun 4 04:34:03 2009 From: mjw at redhat.com (Mark Wielaard) Date: Thu, 04 Jun 2009 13:34:03 +0200 Subject: [OpenJDK 2D-Dev] freetype version check (2.3.0 -> 2.2.1) In-Reply-To: <1241467043.26874.12.camel@hermans.wildebeest.org> References: <1241444279.2359.56.camel@fedora.wildebeest.org> <49FF4337.9000502@sun.com> <1241467043.26874.12.camel@hermans.wildebeest.org> Message-ID: <1244115243.3575.20.camel@hermans.wildebeest.org> Hi Phil, Hi Igor, On Mon, 2009-05-04 at 21:57 +0200, Mark Wielaard wrote: > On Mon, 2009-05-04 at 12:34 -0700, Phil Race wrote: > > Igor did the freetype work and in he commented in email on 23rd July 2007 : > > > > > - Changed required freetype version from 2.3.4 to 2.3.0 > > > (it did compile with 2.2.1 too for me but Font2DTest was showing garbage > > > and i had no chance to investigate why this happens) > > > > So I don't think we want to move it down without knowing what that was about. > > It may have been platform-specific. Igor - can you remember two years back ? > > Interesting, to make sure everything was fine I did also check with that > Font2DTest (and some others) and the fact that everything looked just > fine was the reason to push it. > > > I also recall there was a nasty bug where having fonts with embedded > > bitmaps on your system caused an infinite loop inside freetype. > > I think we needed to update the freetype lib because of that, but > > I can't remember the details to be sure. > > The freetype 2.2.1 package on RHEL and CentOS 5 do have some fixes > applied to them. And the java-1.6.0-openjdk package has been deployed on > those platforms for some time. So I assume if there were any real bugs > they will have been backported at least on those platforms. > > Ideally of course we would have a autoconf test for the features that > the backend relies on. The problem with the hard version check is that > it prevents compilation for everybody, even when they really just want > to compile against an earlier (patched/fixed) version that might just be > what is available for the platform. > > Let me know if I can help with coming up with a feature test for any > issues. For now to not forget this patch it has been filed at: https://bugs.openjdk.java.net/show_bug.cgi?id=100061 Please do let me know if you find out anything about your earlier concerns and what I can do to help move this forward. Thanks, Mark From mjw at redhat.com Thu Jun 4 05:19:08 2009 From: mjw at redhat.com (Mark Wielaard) Date: Thu, 04 Jun 2009 14:19:08 +0200 Subject: Cleaning up crypto support] In-Reply-To: <1227203691.3306.51.camel@dijkstra.wildebeest.org> References: <49133910.2050609@sun.com> <1227203691.3306.51.camel@dijkstra.wildebeest.org> Message-ID: <1244117949.3575.40.camel@hermans.wildebeest.org> Hi Brad, On Thu, 2008-11-20 at 18:54 +0100, Mark Wielaard wrote: > On Thu, 2008-11-06 at 10:36 -0800, Brad Wetmore wrote: > > Mark Wielaard wrote: > >> It seems this is working out good for the GNU/Linux distros based > >> on the latest IcedTea6 releases, so getting this upstream would > >> be nice. Anything I can do to help with that? > > > > I got brought into a high priority escalation for the last couple weeks, > > I'm think I'm finally coming to the end and will respond then. I owe > > several responses. > > Thanks, take your time. And if there is anything I can do to provide > more info on the idea behind the patch to ease reviewing, please let me > know. Just to make sure this doesn't get forgotten I also filed it as: https://bugs.openjdk.java.net/show_bug.cgi?id=100062 Thanks, Mark From mjw at redhat.com Thu Jun 4 05:29:24 2009 From: mjw at redhat.com (Mark Wielaard) Date: Thu, 04 Jun 2009 14:29:24 +0200 Subject: [OpenJDK 2D-Dev] Bug in pisces Renderer (uninitialized crossings) In-Reply-To: <1227202342.3306.33.camel@dijkstra.wildebeest.org> References: <1225119212.3329.29.camel@dijkstra.wildebeest.org> <1225791009.3320.4.camel@dijkstra.wildebeest.org> <1226579411.4563.17.camel@dijkstra.wildebeest.org> <491C64FE.4070408@sun.com> <1227202342.3306.33.camel@dijkstra.wildebeest.org> Message-ID: <1244118565.3575.47.camel@hermans.wildebeest.org> Hi Igor and Alexey, On Thu, 2008-11-20 at 18:32 +0100, Mark Wielaard wrote: > On Thu, 2008-11-13 at 20:33 +0300, Igor Nekrestyanov wrote: > > your patch looks ok to me but i am not expert in pisces. > > > > Alexey Ushakov, who is our expert in pisces should have returned from > > vacation today > > and i think he will review this soon. > > Thanks for looking at it. If I can help with any review, by clarifying > anything, please let me know. To make sure this doesn't get forgotten I also filed it as: https://bugs.openjdk.java.net/show_bug.cgi?id=100063 Thanks, Mark From mjw at redhat.com Thu Jun 4 05:50:19 2009 From: mjw at redhat.com (Mark Wielaard) Date: Thu, 04 Jun 2009 14:50:19 +0200 Subject: Bug in pisces Stroker (div by zero) In-Reply-To: <1227304315.9475.12.camel@hermans.wildebeest.org> References: <1227304315.9475.12.camel@hermans.wildebeest.org> Message-ID: <1244119819.3565.6.camel@hermans.wildebeest.org> Hi, On Fri, 2008-11-21 at 22:51 +0100, Mark Wielaard wrote: > There is a bug in the pisces Stroker in finish(). When ldx and ldy are > so small (zero) that lineLength() will return zero, then you will get a > div by zero exception. > > You can see this with for example this webstart application (you will > need to have IcedTeaWebstart [netx] installed): > http://linuxhippy.blogspot.com/2008/11/jgears2-rendermark.html > > java.lang.ArithmeticException: / by zero > at sun.java2d.pisces.Stroker.finish(Stroker.java:698) > at sun.java2d.pisces.Stroker.close(Stroker.java:592) > [...] To make sure that the patch isn't forgotten I also filed this as: https://bugs.openjdk.java.net/show_bug.cgi?id=100064 Thanks, Mark From mark at klomp.org Thu Jun 4 06:19:58 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 04 Jun 2009 15:19:58 +0200 Subject: Setting public TestEnv defaults for net/nio tests needing hosts In-Reply-To: <1226790321.3805.12.camel@dijkstra.wildebeest.org> References: <1226790321.3805.12.camel@dijkstra.wildebeest.org> Message-ID: <1244121598.3565.21.camel@hermans.wildebeest.org> Hi, On Sun, 2008-11-16 at 00:05 +0100, Mark Wielaard wrote: > I made sure all needed services are enabled on > icedtea.classpath.org/developer.classpath.org and set those as defaults > in TestEnv for the net/nio tests that need to contact hosts. Using > icedtea for remote_host and developer for far_host is somewhat > arbitrary, but at least these hosts are public. > > I also made sure the cname.sh test uses the far_host to do its tests > instead of a hardcoded one. And I changed the SocketChannel LocalAddress > and Shutdown tests to use the echo service. Since the echo service > already has to be enabled for other tests and I didn't want to open up a > telnet port. > [...] > All the tests using TestEnv in make check-jdk target now PASS for me. > > Note that TestEnv hasn't been forward ported from jdk6 to jdk7. So I > haven't yet pushed this patch upstream to the jdk7 net/nio lists. The jdk6 and jdk7 environments are still somewhat dissimilar, but thanks to Andrew Hughes the patches have been ported to make sure they also work on jdk7 out of the box by default using just public hosts without the need to change anything in your test environment locally. Attached is the patch against jdk7. I also filed (the jdk6 version) in bugzilla so it doesn't get forgotten: https://bugs.openjdk.java.net/show_bug.cgi?id=100066 Thanks, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-testenv.patch Type: text/x-patch Size: 3185 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090604/b81d04af/icedtea-testenv.patch From gbenson at redhat.com Thu Jun 4 06:49:48 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 04 Jun 2009 13:49:48 +0000 Subject: changeset in /hg/icedtea6: 2009-06-04 Gary Benson changeset 89bd8e0f38c5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=89bd8e0f38c5 description: 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkConstant.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::lookup_for_ldc): Removed. (SharkBlock::do_ldc): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Use new code for ldc and friends. (SharkBlock::do_field_access): Use new code for constant fields. (SharkBlock::lookup_for_ldc): Removed. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlinerHelper::is_inlinable): Use new code for ldc and friends. (SharkInlinerHelper::do_field_access): Use new code for constant fields. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::lookup_for_ldc): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Use new code to for ldc and constant field traps. (SharkTopLevelBlock::lookup_for_ldc): Removed. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkValue::from_ciConstant): Removed. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 10 files changed, 247 insertions(+), 101 deletions(-) ChangeLog | 29 +++ ports/hotspot/src/share/vm/includeDB_shark | 14 + ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 11 - ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 11 - ports/hotspot/src/share/vm/shark/sharkConstant.cpp | 121 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkConstant.hpp | 68 ++++++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 16 - ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 38 ---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkValue.hpp | 39 ---- diffs (truncated from 512 to 500 lines): diff -r 724f230eea38 -r 89bd8e0f38c5 ChangeLog --- a/ChangeLog Wed Jun 03 11:15:36 2009 -0400 +++ b/ChangeLog Thu Jun 04 09:48:19 2009 -0400 @@ -1,3 +1,32 @@ 2009-06-03 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkConstant.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::lookup_for_ldc): Removed. + (SharkBlock::do_ldc): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Use new code for ldc and friends. + (SharkBlock::do_field_access): Use new code for constant fields. + (SharkBlock::lookup_for_ldc): Removed. + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::is_inlinable): Use new code for ldc and friends. + (SharkInlinerHelper::do_field_access): Use new code for constant fields. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::lookup_for_ldc): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Use new code to for ldc and + constant field traps. + (SharkTopLevelBlock::lookup_for_ldc): Removed. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::from_ciConstant): Removed. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Jun 04 09:48:19 2009 -0400 @@ -73,6 +73,7 @@ sharkBlock.cpp sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkConstant.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp sharkBlock.cpp sharkValue.hpp @@ -83,6 +84,7 @@ sharkBlock.hpp sharkBlock.hpp debug.hpp sharkBlock.hpp llvmHeaders.hpp sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkConstant.hpp sharkBlock.hpp sharkState.hpp sharkBlock.hpp sharkValue.hpp @@ -158,6 +160,16 @@ sharkCompiler.hpp sharkCompiler.hpp llvmHeaders.hpp sharkCompiler.hpp sharkMemoryManager.hpp +sharkConstant.cpp ciStreams.hpp +sharkConstant.cpp sharkBuilder.hpp +sharkConstant.cpp sharkConstant.hpp +sharkConstant.cpp sharkValue.hpp + +sharkConstant.hpp allocation.hpp +sharkConstant.hpp ciStreams.hpp +sharkConstant.hpp sharkBuilder.hpp +sharkConstant.hpp sharkValue.hpp + sharkConstantPool.cpp allocation.hpp sharkConstantPool.cpp constantPoolOop.hpp sharkConstantPool.cpp cpCacheOop.hpp @@ -215,6 +227,7 @@ sharkInliner.cpp sharkInliner.cpp ciMethod.hpp sharkInliner.cpp ciStreams.hpp sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkConstant.hpp sharkInliner.cpp sharkInliner.hpp sharkInliner.cpp sharkIntrinsics.hpp sharkInliner.cpp sharkState.inline.hpp @@ -302,6 +315,7 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp shark_globals.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp +sharkTopLevelBlock.cpp sharkConstant.hpp sharkTopLevelBlock.cpp sharkConstantPool.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -163,7 +163,7 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_ldc: case Bytecodes::_ldc_w: case Bytecodes::_ldc2_w: - do_ldc(); + push(SharkConstant::for_ldc(iter())->value(builder())); break; case Bytecodes::_iload_0: @@ -996,7 +996,9 @@ void SharkBlock::do_field_access(bool is object = value->generic_value(); } if (is_get && field->is_constant()) { - value = SharkValue::from_ciConstant(field->constant_value()); + SharkConstant *constant = SharkConstant::for_field(iter()); + if (constant->is_loaded()) + value = constant->value(builder()); } if (!is_get || value == NULL) { if (!is_field) @@ -1163,11 +1165,6 @@ void SharkBlock::do_trap(int trap_reques ShouldNotCallThis(); } -Value* SharkBlock::lookup_for_ldc() -{ - ShouldNotCallThis(); -} - Value* SharkBlock::lookup_for_field_access() { ShouldNotCallThis(); diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -202,7 +202,6 @@ class SharkBlock : public ResourceObj { // Helpers protected: virtual void do_zero_check(SharkValue* value); - virtual llvm::Value* lookup_for_ldc(); virtual llvm::Value* lookup_for_field_access(); // Leaf calls @@ -240,16 +239,6 @@ class SharkBlock : public ResourceObj { virtual int trap_bci(); virtual void do_trap(int trap_request); - // ldc* - private: - void do_ldc() - { - SharkValue *value = SharkValue::from_ciConstant(iter()->get_constant()); - if (value == NULL) - value = SharkValue::create_jobject(lookup_for_ldc(), true); - push(value); - } - // arraylength protected: virtual void do_arraylength(); diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkConstant.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -0,0 +1,121 @@ +/* + * 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/_sharkConstant.cpp.incl" + +using namespace llvm; + +SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) +{ + return new SharkConstant(iter->get_constant(), NULL); +} + +SharkConstant* SharkConstant::for_field(ciBytecodeStream *iter) +{ + bool will_link; + ciField *field = iter->get_field(will_link); + assert(will_link, "typeflow responsibility"); + + return new SharkConstant(field->constant_value(), field->type()); +} + +SharkConstant::SharkConstant(ciConstant constant, ciType *type) +{ + SharkValue *value = NULL; + + switch (constant.basic_type()) { + case T_BOOLEAN: + case T_BYTE: + case T_CHAR: + case T_SHORT: + case T_INT: + value = SharkValue::jint_constant(constant.as_int()); + break; + + case T_LONG: + value = SharkValue::jlong_constant(constant.as_long()); + break; + + case T_FLOAT: + value = SharkValue::jfloat_constant(constant.as_float()); + break; + + case T_DOUBLE: + value = SharkValue::jdouble_constant(constant.as_double()); + break; + + case T_OBJECT: + case T_ARRAY: + break; + + case T_ILLEGAL: + // out of memory + _is_loaded = false; + return; + + default: + tty->print_cr("Unhandled type %s", type2name(constant.basic_type())); + ShouldNotReachHere(); + } + + // Handle primitive types. We create SharkValues for these + // now; doing so doesn't emit any code, and it allows us to + // delegate a bunch of stuff to the SharkValue code. + if (value) { + _value = value; + _is_loaded = true; + _is_nonzero = value->zero_checked(); + _is_two_word = value->is_two_word(); + return; + } + + // Handle reference types. This is tricky because some + // ciObjects are psuedo-objects that refer to oops which + // have yet to be created. We need to spot the unloaded + // objects (which differ between ldc* and get*, thanks!) + ciObject *object = constant.as_object(); + if (object->is_klass()) { + // The constant returned for a klass is the ciKlass + // for the entry, but we want the java_mirror. + ciKlass *klass = object->as_klass(); + if (!klass->is_loaded()) { + _is_loaded = false; + return; + } + object = klass->java_mirror(); + } + if (object->is_null_object() || !object->has_encoding()) { + _is_loaded = false; + return; + } + + _value = NULL; + _object = object; + _type = type ? type : ciType::make(T_OBJECT); + _is_loaded = true; + _is_nonzero = true; + _is_two_word = false; +} diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkConstant.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -0,0 +1,68 @@ +/* + * 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 SharkConstant : public ResourceObj { + public: + static SharkConstant* for_ldc(ciBytecodeStream* iter); + static SharkConstant* for_field(ciBytecodeStream* iter); + + private: + SharkConstant(ciConstant constant, ciType* type); + + private: + SharkValue* _value; + ciObject* _object; + ciType* _type; + bool _is_loaded; + bool _is_nonzero; + bool _is_two_word; + + public: + bool is_loaded() const + { + return _is_loaded; + } + bool is_nonzero() const + { + assert(is_loaded(), "should be"); + return _is_nonzero; + } + bool is_two_word() const + { + assert(is_loaded(), "should be"); + return _is_two_word; + } + + public: + SharkValue* value(SharkBuilder* builder) + { + assert(is_loaded(), "should be"); + if (_value == NULL) { + _value = SharkValue::create_generic( + _type, builder->CreateInlineOop(_object), _is_nonzero); + } + return _value; + } +}; diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -267,7 +267,7 @@ bool SharkInlinerHelper::is_inlinable() ResourceMark rm; initialize_for_check(); - SharkValue *sv; + SharkConstant *sc; bool a, b, c, d; iter()->reset_to_bci(0); @@ -323,11 +323,11 @@ bool SharkInlinerHelper::is_inlinable() case Bytecodes::_ldc: case Bytecodes::_ldc_w: case Bytecodes::_ldc2_w: - sv = SharkValue::from_ciConstant(iter()->get_constant()); - if (sv == NULL) + sc = SharkConstant::for_ldc(iter()); + if (!sc->is_loaded()) return false; - push(sv->zero_checked()); - if (sv->is_two_word()) + push(sc->is_nonzero()); + if (sc->is_two_word()) push(false); break; @@ -753,9 +753,9 @@ bool SharkInlinerHelper::do_field_access if (is_get) { bool result_pushed = false; if (field->is_constant()) { - SharkValue *value = SharkValue::from_ciConstant(field->constant_value()); - if (value != NULL) { - push(value->zero_checked()); + SharkConstant *sc = SharkConstant::for_field(iter()); + if (sc->is_loaded()) { + push(sc->is_nonzero()); result_pushed = true; } } diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -48,7 +48,7 @@ void SharkTopLevelBlock::scan_for_traps( switch (bc()) { case Bytecodes::_ldc: case Bytecodes::_ldc_w: - if (iter()->is_unresolved_string() || iter()->is_unresolved_klass()) { + if (!SharkConstant::for_ldc(iter())->is_loaded()) { set_trap( Deoptimization::make_trap_request( Deoptimization::Reason_uninitialized, @@ -80,10 +80,9 @@ void SharkTopLevelBlock::scan_for_traps( if (is_field) break; - // There won't be a pool access if this is a getstatic that - // resolves to a handled constant either + // There won't be a pool access if this is a constant getstatic if (bc() == Bytecodes::_getstatic && field->is_constant()) { - if (SharkValue::from_ciConstant(field->constant_value())) + if (SharkConstant::for_field(iter())->is_loaded()) break; } @@ -609,37 +608,6 @@ void SharkTopLevelBlock::handle_return(B builder()->CreateRetVoid(); } -Value *SharkTopLevelBlock::lookup_for_ldc() -{ - int index = iter()->get_constant_index(); - constantTag tag = target()->holder()->constant_pool_tag_at(index); - - SharkConstantPool constants(this); - Value *entry = constants.object_at(index); - - Value *klass_part; - switch (tag.value()) { - case JVM_CONSTANT_String: - return entry; - - case JVM_CONSTANT_Class: - klass_part = builder()->CreateAddressOfStructEntry( - entry, - in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), - SharkType::klass_type(), - "klass_part"); - // XXX FIXME: We need a memory barrier before this load - return builder()->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror"); - - default: - ShouldNotReachHere(); - } -} - Value* SharkTopLevelBlock::lookup_for_field_access() { SharkConstantPool constants(this); diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -222,7 +222,6 @@ class SharkTopLevelBlock : public SharkB // Helpers private: - llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); void do_branch(int successor_index); diff -r 724f230eea38 -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -146,45 +146,6 @@ class SharkValue : public ResourceObj { } static inline SharkValue* address_constant(int bci); - // Typed conversion from HotSpot ciConstants - public: - static SharkValue* from_ciConstant(ciConstant value) - { - switch (value.basic_type()) { - case T_BOOLEAN: - return SharkValue::jint_constant(value.as_boolean()); - - case T_BYTE: - return SharkValue::jint_constant(value.as_byte()); - - case T_CHAR: - return SharkValue::jint_constant(value.as_char()); - - case T_SHORT: - return SharkValue::jint_constant(value.as_short()); - - case T_INT: - return SharkValue::jint_constant(value.as_int()); - - case T_LONG: - return SharkValue::jlong_constant(value.as_long()); - - case T_FLOAT: - return SharkValue::jfloat_constant(value.as_float()); - - case T_DOUBLE: - return SharkValue::jdouble_constant(value.as_double()); - - case T_OBJECT: From gbenson at redhat.com Thu Jun 4 06:55:14 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 4 Jun 2009 14:55:14 +0100 Subject: Shark ldc improvements Message-ID: <20090604135514.GC3156@redhat.com> Hi all, This commit replaced the interpreter-style lookup of class and string constants in ldc and friends with inlined oops using the code I wrote yesterday. getfield and getstatic also use the code, for constant fields, so they've been altered too, although the way HotSpot lays things out means that getfield and getstatic never inline constants (they get loaded from the object instead...) Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 724f230eea38 ChangeLog --- a/ChangeLog Wed Jun 03 11:15:36 2009 -0400 +++ b/ChangeLog Thu Jun 04 09:47:24 2009 -0400 @@ -1,3 +1,32 @@ +2009-06-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkConstant.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::lookup_for_ldc): Removed. + (SharkBlock::do_ldc): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Use new code for ldc and friends. + (SharkBlock::do_field_access): Use new code for constant fields. + (SharkBlock::lookup_for_ldc): Removed. + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::is_inlinable): Use new code for ldc and friends. + (SharkInlinerHelper::do_field_access): Use new code for constant fields. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::lookup_for_ldc): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Use new code to for ldc and + constant field traps. + (SharkTopLevelBlock::lookup_for_ldc): Removed. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::from_ciConstant): Removed. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: diff -r 724f230eea38 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Jun 04 09:47:24 2009 -0400 @@ -73,6 +73,7 @@ sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkConstant.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp sharkBlock.cpp sharkValue.hpp @@ -83,6 +84,7 @@ sharkBlock.hpp debug.hpp sharkBlock.hpp llvmHeaders.hpp sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkConstant.hpp sharkBlock.hpp sharkState.hpp sharkBlock.hpp sharkValue.hpp @@ -158,6 +160,16 @@ sharkCompiler.hpp llvmHeaders.hpp sharkCompiler.hpp sharkMemoryManager.hpp +sharkConstant.cpp ciStreams.hpp +sharkConstant.cpp sharkBuilder.hpp +sharkConstant.cpp sharkConstant.hpp +sharkConstant.cpp sharkValue.hpp + +sharkConstant.hpp allocation.hpp +sharkConstant.hpp ciStreams.hpp +sharkConstant.hpp sharkBuilder.hpp +sharkConstant.hpp sharkValue.hpp + sharkConstantPool.cpp allocation.hpp sharkConstantPool.cpp constantPoolOop.hpp sharkConstantPool.cpp cpCacheOop.hpp @@ -215,6 +227,7 @@ sharkInliner.cpp ciMethod.hpp sharkInliner.cpp ciStreams.hpp sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkConstant.hpp sharkInliner.cpp sharkInliner.hpp sharkInliner.cpp sharkIntrinsics.hpp sharkInliner.cpp sharkState.inline.hpp @@ -302,6 +315,7 @@ sharkTopLevelBlock.cpp shark_globals.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp +sharkTopLevelBlock.cpp sharkConstant.hpp sharkTopLevelBlock.cpp sharkConstantPool.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 09:47:24 2009 -0400 @@ -163,7 +163,7 @@ case Bytecodes::_ldc: case Bytecodes::_ldc_w: case Bytecodes::_ldc2_w: - do_ldc(); + push(SharkConstant::for_ldc(iter())->value(builder())); break; case Bytecodes::_iload_0: @@ -996,7 +996,9 @@ object = value->generic_value(); } if (is_get && field->is_constant()) { - value = SharkValue::from_ciConstant(field->constant_value()); + SharkConstant *constant = SharkConstant::for_field(iter()); + if (constant->is_loaded()) + value = constant->value(builder()); } if (!is_get || value == NULL) { if (!is_field) @@ -1163,11 +1165,6 @@ ShouldNotCallThis(); } -Value* SharkBlock::lookup_for_ldc() -{ - ShouldNotCallThis(); -} - Value* SharkBlock::lookup_for_field_access() { ShouldNotCallThis(); diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 09:47:24 2009 -0400 @@ -202,7 +202,6 @@ // Helpers protected: virtual void do_zero_check(SharkValue* value); - virtual llvm::Value* lookup_for_ldc(); virtual llvm::Value* lookup_for_field_access(); // Leaf calls @@ -239,16 +238,6 @@ virtual int trap_request(); virtual int trap_bci(); virtual void do_trap(int trap_request); - - // ldc* - private: - void do_ldc() - { - SharkValue *value = SharkValue::from_ciConstant(iter()->get_constant()); - if (value == NULL) - value = SharkValue::create_jobject(lookup_for_ldc(), true); - push(value); - } // arraylength protected: diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkConstant.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.cpp Thu Jun 04 09:47:24 2009 -0400 @@ -0,0 +1,121 @@ +/* + * 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/_sharkConstant.cpp.incl" + +using namespace llvm; + +SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) +{ + return new SharkConstant(iter->get_constant(), NULL); +} + +SharkConstant* SharkConstant::for_field(ciBytecodeStream *iter) +{ + bool will_link; + ciField *field = iter->get_field(will_link); + assert(will_link, "typeflow responsibility"); + + return new SharkConstant(field->constant_value(), field->type()); +} + +SharkConstant::SharkConstant(ciConstant constant, ciType *type) +{ + SharkValue *value = NULL; + + switch (constant.basic_type()) { + case T_BOOLEAN: + case T_BYTE: + case T_CHAR: + case T_SHORT: + case T_INT: + value = SharkValue::jint_constant(constant.as_int()); + break; + + case T_LONG: + value = SharkValue::jlong_constant(constant.as_long()); + break; + + case T_FLOAT: + value = SharkValue::jfloat_constant(constant.as_float()); + break; + + case T_DOUBLE: + value = SharkValue::jdouble_constant(constant.as_double()); + break; + + case T_OBJECT: + case T_ARRAY: + break; + + case T_ILLEGAL: + // out of memory + _is_loaded = false; + return; + + default: + tty->print_cr("Unhandled type %s", type2name(constant.basic_type())); + ShouldNotReachHere(); + } + + // Handle primitive types. We create SharkValues for these + // now; doing so doesn't emit any code, and it allows us to + // delegate a bunch of stuff to the SharkValue code. + if (value) { + _value = value; + _is_loaded = true; + _is_nonzero = value->zero_checked(); + _is_two_word = value->is_two_word(); + return; + } + + // Handle reference types. This is tricky because some + // ciObjects are psuedo-objects that refer to oops which + // have yet to be created. We need to spot the unloaded + // objects (which differ between ldc* and get*, thanks!) + ciObject *object = constant.as_object(); + if (object->is_klass()) { + // The constant returned for a klass is the ciKlass + // for the entry, but we want the java_mirror. + ciKlass *klass = object->as_klass(); + if (!klass->is_loaded()) { + _is_loaded = false; + return; + } + object = klass->java_mirror(); + } + if (object->is_null_object() || !object->has_encoding()) { + _is_loaded = false; + return; + } + + _value = NULL; + _object = object; + _type = type ? type : ciType::make(T_OBJECT); + _is_loaded = true; + _is_nonzero = true; + _is_two_word = false; +} diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkConstant.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.hpp Thu Jun 04 09:47:24 2009 -0400 @@ -0,0 +1,68 @@ +/* + * 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 SharkConstant : public ResourceObj { + public: + static SharkConstant* for_ldc(ciBytecodeStream* iter); + static SharkConstant* for_field(ciBytecodeStream* iter); + + private: + SharkConstant(ciConstant constant, ciType* type); + + private: + SharkValue* _value; + ciObject* _object; + ciType* _type; + bool _is_loaded; + bool _is_nonzero; + bool _is_two_word; + + public: + bool is_loaded() const + { + return _is_loaded; + } + bool is_nonzero() const + { + assert(is_loaded(), "should be"); + return _is_nonzero; + } + bool is_two_word() const + { + assert(is_loaded(), "should be"); + return _is_two_word; + } + + public: + SharkValue* value(SharkBuilder* builder) + { + assert(is_loaded(), "should be"); + if (_value == NULL) { + _value = SharkValue::create_generic( + _type, builder->CreateInlineOop(_object), _is_nonzero); + } + return _value; + } +}; diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 09:47:24 2009 -0400 @@ -267,7 +267,7 @@ ResourceMark rm; initialize_for_check(); - SharkValue *sv; + SharkConstant *sc; bool a, b, c, d; iter()->reset_to_bci(0); @@ -323,11 +323,11 @@ case Bytecodes::_ldc: case Bytecodes::_ldc_w: case Bytecodes::_ldc2_w: - sv = SharkValue::from_ciConstant(iter()->get_constant()); - if (sv == NULL) + sc = SharkConstant::for_ldc(iter()); + if (!sc->is_loaded()) return false; - push(sv->zero_checked()); - if (sv->is_two_word()) + push(sc->is_nonzero()); + if (sc->is_two_word()) push(false); break; @@ -753,9 +753,9 @@ if (is_get) { bool result_pushed = false; if (field->is_constant()) { - SharkValue *value = SharkValue::from_ciConstant(field->constant_value()); - if (value != NULL) { - push(value->zero_checked()); + SharkConstant *sc = SharkConstant::for_field(iter()); + if (sc->is_loaded()) { + push(sc->is_nonzero()); result_pushed = true; } } diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 09:47:24 2009 -0400 @@ -48,7 +48,7 @@ switch (bc()) { case Bytecodes::_ldc: case Bytecodes::_ldc_w: - if (iter()->is_unresolved_string() || iter()->is_unresolved_klass()) { + if (!SharkConstant::for_ldc(iter())->is_loaded()) { set_trap( Deoptimization::make_trap_request( Deoptimization::Reason_uninitialized, @@ -80,10 +80,9 @@ if (is_field) break; - // There won't be a pool access if this is a getstatic that - // resolves to a handled constant either + // There won't be a pool access if this is a constant getstatic if (bc() == Bytecodes::_getstatic && field->is_constant()) { - if (SharkValue::from_ciConstant(field->constant_value())) + if (SharkConstant::for_field(iter())->is_loaded()) break; } @@ -607,37 +606,6 @@ } builder()->CreateRetVoid(); -} - -Value *SharkTopLevelBlock::lookup_for_ldc() -{ - int index = iter()->get_constant_index(); - constantTag tag = target()->holder()->constant_pool_tag_at(index); - - SharkConstantPool constants(this); - Value *entry = constants.object_at(index); - - Value *klass_part; - switch (tag.value()) { - case JVM_CONSTANT_String: - return entry; - - case JVM_CONSTANT_Class: - klass_part = builder()->CreateAddressOfStructEntry( - entry, - in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), - SharkType::klass_type(), - "klass_part"); - // XXX FIXME: We need a memory barrier before this load - return builder()->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror"); - - default: - ShouldNotReachHere(); - } } Value* SharkTopLevelBlock::lookup_for_field_access() diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 09:47:24 2009 -0400 @@ -222,7 +222,6 @@ // Helpers private: - llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); void do_branch(int successor_index); diff -r 724f230eea38 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Jun 04 09:47:24 2009 -0400 @@ -145,45 +145,6 @@ return create_jobject(LLVMValue::null(), false); } static inline SharkValue* address_constant(int bci); - - // Typed conversion from HotSpot ciConstants - public: - static SharkValue* from_ciConstant(ciConstant value) - { - switch (value.basic_type()) { - case T_BOOLEAN: - return SharkValue::jint_constant(value.as_boolean()); - - case T_BYTE: - return SharkValue::jint_constant(value.as_byte()); - - case T_CHAR: - return SharkValue::jint_constant(value.as_char()); - - case T_SHORT: - return SharkValue::jint_constant(value.as_short()); - - case T_INT: - return SharkValue::jint_constant(value.as_int()); - - case T_LONG: - return SharkValue::jlong_constant(value.as_long()); - - case T_FLOAT: - return SharkValue::jfloat_constant(value.as_float()); - - case T_DOUBLE: - return SharkValue::jdouble_constant(value.as_double()); - - case T_OBJECT: - case T_ARRAY: - return NULL; - - default: - tty->print_cr("Unhandled type %s", type2name(value.basic_type())); - ShouldNotReachHere(); - } - } // Type-losing conversions -- use with care! public: From omajid at redhat.com Thu Jun 4 07:37:04 2009 From: omajid at redhat.com (Omair Majid) Date: Thu, 04 Jun 2009 10:37:04 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <20090603180752.GB21904@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> Message-ID: <4A27DC10.9070600@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-03 13:41]: > > Looks good. Couple of things though: > > 1. getForksAlowed() is spelled incorrectly.. Fixed. > 2. There is a lot of unnecessary wrapping/unwrapping going on with the > whole convert array to list, add to list, convert list to array and > iterate over array. Why not just change initialArgs to be a list, and > then just use that list everywhere and iterate over it when launching the > new vm? Does the new patch look ok? ChangeLog: 2009-06-04 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (needsNewJVM): New function. Returns true if the JNLP file requires creating a new JVM. (getNewVMArgs): New function. Returns arguments to pass to the new JVM. * rt/net/sourceforge/jnlp/Launcher.java (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to the Java program. Try to use the local file to launch this instance if possible. (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to the Java program. Launch Netx with the with the appropriate arguments. (launchApplication): If needed, launch a new JVM and pass along the Netx arguments. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * rt/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. Set initial arguments. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Add forksAllowed to store whether creating a new JVM is allowed. Add initialArguments to store the arguments to Netx. (getForksAllowed): New function. Check if creating a new JVM is allowed. (setForksAllowed): New function. Set whether creating a JVM is allowed. (setInitialArguments): New function. Store the arguments to Netx. (getInitialArguments): New function. Return the arguments passed to Netx. * rt/net/sourceforge/jnlp/services/XBasicService.java (showDocument): Fix call to launchExternal to match the new semantics. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 12869 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090604/236aad18/netx-jvm-args.patch From gbenson at redhat.com Thu Jun 4 08:09:20 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 04 Jun 2009 15:09:20 +0000 Subject: changeset in /hg/icedtea6: 2009-06-04 Gary Benson changeset 2a14fec2301f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=2a14fec2301f description: 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::lookup_for_field_access): Removed. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::do_field_access): Inline receiver for static fields. (SharkBlock::lookup_for_field_access): Removed. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlinerHelper::do_field_access): Allow static fields. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkBlock::lookup_for_field_access): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Removed static field traps. (SharkBlock::lookup_for_field_access): Removed. diffstat: 6 files changed, 22 insertions(+), 41 deletions(-) ChangeLog | 17 ++++++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 7 ---- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 8 +--- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 25 --------------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 5 +-- diffs (134 lines): diff -r 89bd8e0f38c5 -r 2a14fec2301f ChangeLog --- a/ChangeLog Thu Jun 04 09:48:19 2009 -0400 +++ b/ChangeLog Thu Jun 04 11:07:53 2009 -0400 @@ -1,3 +1,20 @@ 2009-06-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::lookup_for_field_access): Removed. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::do_field_access): Inline receiver for static fields. + (SharkBlock::lookup_for_field_access): Removed. + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::do_field_access): Allow static fields. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkBlock::lookup_for_field_access): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Removed static field traps. + (SharkBlock::lookup_for_field_access): Removed. + 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. diff -r 89bd8e0f38c5 -r 2a14fec2301f ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 11:07:53 2009 -0400 @@ -1002,7 +1002,7 @@ void SharkBlock::do_field_access(bool is } if (!is_get || value == NULL) { if (!is_field) - object = lookup_for_field_access(); + object = builder()->CreateInlineOop(field->holder()); BasicType basic_type = field->type()->basic_type(); const Type *stack_type = SharkType::to_stackType(basic_type); @@ -1165,11 +1165,6 @@ void SharkBlock::do_trap(int trap_reques ShouldNotCallThis(); } -Value* SharkBlock::lookup_for_field_access() -{ - ShouldNotCallThis(); -} - void SharkBlock::do_arraylength() { ShouldNotCallThis(); diff -r 89bd8e0f38c5 -r 2a14fec2301f ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 11:07:53 2009 -0400 @@ -202,7 +202,6 @@ class SharkBlock : public ResourceObj { // Helpers protected: virtual void do_zero_check(SharkValue* value); - virtual llvm::Value* lookup_for_field_access(); // Leaf calls protected: diff -r 89bd8e0f38c5 -r 2a14fec2301f ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 11:07:53 2009 -0400 @@ -760,12 +760,8 @@ bool SharkInlinerHelper::do_field_access } } - if (!result_pushed) { - if (!is_field) - return false; - - push(false); - } + if (!result_pushed) + push(false); if (field->type()->is_two_word()) push(false); diff -r 89bd8e0f38c5 -r 2a14fec2301f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 11:07:53 2009 -0400 @@ -74,20 +74,6 @@ void SharkTopLevelBlock::scan_for_traps( Deoptimization::Action_none), bci()); return; } - - // 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 constant getstatic - if (bc() == Bytecodes::_getstatic && field->is_constant()) { - if (SharkConstant::for_field(iter())->is_loaded()) - break; - } - - // Continue to the check - index = iter()->get_field_index(); break; case Bytecodes::_invokevirtual: @@ -608,17 +594,6 @@ void SharkTopLevelBlock::handle_return(B builder()->CreateRetVoid(); } -Value* SharkTopLevelBlock::lookup_for_field_access() -{ - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_field_index()); - - return builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f1_offset(), - SharkType::jobject_type(), - "object"); -} - void SharkTopLevelBlock::do_arraylength() { SharkValue *array = pop(); diff -r 89bd8e0f38c5 -r 2a14fec2301f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 11:07:53 2009 -0400 @@ -220,9 +220,8 @@ class SharkTopLevelBlock : public SharkB public: void emit_IR(); - // Helpers - private: - llvm::Value* lookup_for_field_access(); + // Branch helpers + private: void do_branch(int successor_index); // Zero checks From gbenson at redhat.com Thu Jun 4 08:13:35 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 4 Jun 2009 16:13:35 +0100 Subject: Shark getstatic and putstatic improvements Message-ID: <20090604151335.GD3156@redhat.com> Hi all, This commit replaced the interpreter-style constant pool lookup of the receiving class for getstatic and putstatic with inlined oops. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 89bd8e0f38c5 ChangeLog --- a/ChangeLog Thu Jun 04 09:48:19 2009 -0400 +++ b/ChangeLog Thu Jun 04 11:07:23 2009 -0400 @@ -1,3 +1,20 @@ +2009-06-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::lookup_for_field_access): Removed. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::do_field_access): Inline receiver for static fields. + (SharkBlock::lookup_for_field_access): Removed. + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::do_field_access): Allow static fields. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkBlock::lookup_for_field_access): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Removed static field traps. + (SharkBlock::lookup_for_field_access): Removed. + 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. diff -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 11:07:23 2009 -0400 @@ -1002,7 +1002,7 @@ } if (!is_get || value == NULL) { if (!is_field) - object = lookup_for_field_access(); + object = builder()->CreateInlineOop(field->holder()); BasicType basic_type = field->type()->basic_type(); const Type *stack_type = SharkType::to_stackType(basic_type); @@ -1165,11 +1165,6 @@ ShouldNotCallThis(); } -Value* SharkBlock::lookup_for_field_access() -{ - ShouldNotCallThis(); -} - void SharkBlock::do_arraylength() { ShouldNotCallThis(); diff -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 11:07:23 2009 -0400 @@ -202,7 +202,6 @@ // Helpers protected: virtual void do_zero_check(SharkValue* value); - virtual llvm::Value* lookup_for_field_access(); // Leaf calls protected: diff -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 11:07:23 2009 -0400 @@ -760,12 +760,8 @@ } } - if (!result_pushed) { - if (!is_field) - return false; - + if (!result_pushed) push(false); - } if (field->type()->is_two_word()) push(false); diff -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 11:07:23 2009 -0400 @@ -74,20 +74,6 @@ Deoptimization::Action_none), bci()); return; } - - // 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 constant getstatic - if (bc() == Bytecodes::_getstatic && field->is_constant()) { - if (SharkConstant::for_field(iter())->is_loaded()) - break; - } - - // Continue to the check - index = iter()->get_field_index(); break; case Bytecodes::_invokevirtual: @@ -606,17 +592,6 @@ } builder()->CreateRetVoid(); -} - -Value* SharkTopLevelBlock::lookup_for_field_access() -{ - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_field_index()); - - return builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f1_offset(), - SharkType::jobject_type(), - "object"); } void SharkTopLevelBlock::do_arraylength() diff -r 89bd8e0f38c5 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 11:07:23 2009 -0400 @@ -220,9 +220,8 @@ public: void emit_IR(); - // Helpers + // Branch helpers private: - llvm::Value* lookup_for_field_access(); void do_branch(int successor_index); // Zero checks From gnu_andrew at member.fsf.org Thu Jun 4 09:10:29 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 4 Jun 2009 17:10:29 +0100 Subject: JAXWS build problem - Darwin/PowerPC/Zero In-Reply-To: <860cb0120906031229of68779fw2ad329ce2d7e60f6@mail.gmail.com> References: <860cb0120906031229of68779fw2ad329ce2d7e60f6@mail.gmail.com> Message-ID: <17c6771e0906040910l12dbab3ave661f8f5417dbaab@mail.gmail.com> 2009/6/3 Eric Richardson : > Hi, > > I get the following error. In the release notes in says JIBX is not needed. > > ERROR: You do not have access to valid JIBX library files. \n?????? Please > check your access to \n > /NOT-SET/devtools/share/jibx/lib/jibx-run.jar \n?????? and/or check your > value of ALT_JDK_DEVTOOLS_DIR, ALT_JIBX_LIBS_PATH \n > Exiting because of the above error(s). \n > make[1]: *** [post-sanity] Error 1 > make: *** [stamps/icedtea-ecj.stamp] Error 2 > > I tried this which will at least get me to the jaxws build - jaxp compiles. > > > make ALT_OUTPUTDIR=`pwd`/build/bsd-ppc ALT_FREETYPE_LIB_PATH=/opt/local/lib > ALT_FREETYPE_HEADERS_PATH=/opt/local/include > ALT_JIBX_LIBS_PATH=/Users/eric/java/jibx-1.2.1/lib LIBARCH=ppc ARCH=ppc > ARCH_FAMILY=ppc ARCH_DATA_MODEL=32 > > It fails like this below and the appropriate class is in the stax-api.jar in > the jibx lib dir. > > build-classes: > ??? [javac] Compiling 2425 source files to > /Users/eric/java/icedtea-1.10/build/bsd-ppc/jaxws/build/classes > ??? [javac] > /Users/eric/java/icedtea-1.10/openjdk-ecj/jaxws/src/share/classes/com/sun/istack/internal/XMLStreamException2.java:27: > package javax.xml.stream does not exist > ??? [javac] import javax.xml.stream.XMLStreamException; > > I looked at both the Makefile which calls the Ant build.xml and neither > refer to any classpath so I assume that the missing classes need to somehow > be in the bootclasspath for the jvm/javac. I also try the configure option > --with-jibx with no luck. > > ./configure --enable-zero=yes --with-project=bsd > --with-gcj-home=/Users/eric/jdk1.5 > --with-ecj-jar=/opt/local/share/java/eclipse-ecj.jar > --with-xalan2-jar=/opt/local/share/java/xalan.jar > --with-xalan2-serializer-jar=/opt/local/share/java/serializer.jar > --with-xerces2-jar=/opt/local/share/java/xercesImpl.jar > --with-jibx=/Users/eric/java/jibx-1.2.1? --without-rhino --disable-plugin > --disable-xrender > > Any help appreciated, > Eric > > > > Disabling it in IcedTea relies on the DISABLE_NIMBUS changeset which is only so far in the IcedTea and build forests. The BSD folks are welcome to pull it into their repo, and it will appear in 7 itself once things start to move forward. Basically, if you're using a different tree (via --with-project or some other mechanism), all bets are off as to how things will work as they are based on the default tree and options :) I expect the local Nimbus patch will have broken too prior to this as it removes a DISABLE_NIMBUS block to give Nimbus (via the generated files in IcedTea) without JIBX (the tool build and generation is still disabled). Your JIBX is too new. You need 1.1.5. It can be downloaded via jibx.sourceforge.net. If you do --disable-nimbus-generation (which is what you're getting with the broken patch anyway), the IcedTea configure will check for the JAR files and make available the directory OpenJDK needs. IcedTea takes paths to the three needed jars and passes OpenJDK $(top_builddir)/jibx which contains bcel.jar, xpp3.jar, jibx-run.jar and jibx-bind.jar. You shouldn't have a stax-api.jar. That's already part of the JDK. If you let IcedTea do the directory from wherever you or your distro installed JIBX, then it will do a clean directory with only the needed JAR files. Long term, most IcedTea stuff will be going upstream, including Zero so it may just appear in the BSD tree anyway at some point :) -- 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 Alan.Bateman at Sun.COM Thu Jun 4 09:58:20 2009 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Thu, 04 Jun 2009 17:58:20 +0100 Subject: Setting public TestEnv defaults for net/nio tests needing hosts In-Reply-To: <1244121598.3565.21.camel@hermans.wildebeest.org> References: <1226790321.3805.12.camel@dijkstra.wildebeest.org> <1244121598.3565.21.camel@hermans.wildebeest.org> Message-ID: <4A27FD2C.7030804@sun.com> Mark Wielaard wrote: > : > The jdk6 and jdk7 environments are still somewhat dissimilar, but thanks > to Andrew Hughes the patches have been ported to make sure they also > work on jdk7 out of the box by default using just public hosts without > the need to change anything in your test environment locally. Attached > is the patch against jdk7. > > I also filed (the jdk6 version) in bugzilla so it doesn't get forgotten: > https://bugs.openjdk.java.net/show_bug.cgi?id=100066 > > Thanks, > > Mark > It's been on my list to forward-port the TestEnv and test updates to jdk7 (just haven't got to it yet). The idea with that was that jtreg would be run with a properties file that listed the hosts that the tests depend on (eg: jtreg -e JTREG_TESTENV=openjdk-hosts.properties). We (meaning Joe and I) kinda hoped that would be preferable to patching TestEnv but maybe this isn't the case. Changing these tests to not depend on the telnet port is a good idea as it is hard to find systems with that legacy service enabled. Changing the defaults to hosts outside of Sun is reasonable in principle but this is going to cause disruption for our test teams when running on test systems that will not be able to connect to these systems. I need to check into this and also to see if openjdk.java.net systems could be used, or maybe just re-visit these tests to not depend on other hosts. -Alan. From mark at klomp.org Thu Jun 4 10:27:50 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 04 Jun 2009 19:27:50 +0200 Subject: Setting public TestEnv defaults for net/nio tests needing hosts In-Reply-To: <4A27FD2C.7030804@sun.com> References: <1226790321.3805.12.camel@dijkstra.wildebeest.org> <1244121598.3565.21.camel@hermans.wildebeest.org> <4A27FD2C.7030804@sun.com> Message-ID: <1244136471.3565.29.camel@hermans.wildebeest.org> Hi Alan, On Thu, 2009-06-04 at 17:58 +0100, Alan Bateman wrote: > It's been on my list to forward-port the TestEnv and test updates to > jdk7 (just haven't got to it yet). Thanks. > The idea with that was that jtreg > would be run with a properties file that listed the hosts that the tests > depend on (eg: jtreg -e JTREG_TESTENV=openjdk-hosts.properties). We > (meaning Joe and I) kinda hoped that would be preferable to patching > TestEnv but maybe this isn't the case. That is preferable. That is actually why I made the change. So that no editing or setting or properties was needed by default, unless you needed a set different from the public defaults. > Changing these tests to not > depend on the telnet port is a good idea as it is hard to find systems > with that legacy service enabled. Changing the defaults to hosts outside > of Sun is reasonable in principle but this is going to cause disruption > for our test teams when running on test systems that will not be able to > connect to these systems. I need to check into this and also to see if > openjdk.java.net systems could be used, or maybe just re-visit these > tests to not depend on other hosts. Yes, making this as easy as possible for anybody running the tests, so in principle you don't have to changed or edited anything was the goal. So the real changes are just to use one standard (echo) port to make it easier to switch hosts. Make cname.sh not use a hardcoded host. And then set the defaults so that they work for everybody out of the box against a set of publicly available machines. Then only people needing to do tests against non-public machines have to change any settings. Cheers, Mark From omajid at redhat.com Thu Jun 4 11:51:15 2009 From: omajid at redhat.com (Omair Majid) Date: Thu, 04 Jun 2009 14:51:15 -0400 Subject: RFC: Make javax.jnlp package visible to javac Message-ID: <4A2817A3.2070807@redhat.com> Hi, Sun's documentation states that javac should be able to compile code that uses javax.jnlp once jnlp.jar is added to the classpath [1]. IcedTea6, however, has no jnlp.jar, and javax.jnlp.* classes are already in rt.jar. It turns out that you have to use 'javac -XDignore.symbol.file OnlineTest.java' for this to work [2]. The attached patch adds javax.jnlp to NON_CORE_PKGS list, making it visible to javac. ChangeLog: 2009-06-04 Omair Majid * patches/icedtea-webstart.patch: Make javax.jnlp classes visible. Ok to commit? Cheers, Omair [1] http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/examples.html#Introduction [2] http://andrew-haley.livejournal.com/695.html -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea6-make-javax-jnlp-visible.patch Type: text/x-patch Size: 947 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090604/7db6dc81/icedtea6-make-javax-jnlp-visible.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: OnlineTest.java Type: text/x-java Size: 402 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090604/7db6dc81/OnlineTest.java From dbhole at redhat.com Thu Jun 4 14:47:22 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 4 Jun 2009 17:47:22 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <4A27DC10.9070600@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> <4A27DC10.9070600@redhat.com> Message-ID: <20090604214722.GA29542@redhat.com> * Omair Majid [2009-06-04 10:37]: > Deepak Bhole wrote: >> * Omair Majid [2009-06-03 13:41]: >> >> Looks good. Couple of things though: >> >> 1. getForksAlowed() is spelled incorrectly.. > Fixed. > >> 2. There is a lot of unnecessary wrapping/unwrapping going on with the >> whole convert array to list, add to list, convert list to array and >> iterate over array. Why not just change initialArgs to be a list, and >> then just use that list everywhere and iterate over it when launching the >> new vm? > Does the new patch look ok? > Yep, looks good. Please go ahead and apply. One minor thing you may want to consider btw... put a securitymanager AllPermissions() check inside setInitialArguments(). Only trusted code would have all perms. The reason for this is that initialArgs are used to launch another process, and one could in theory perhaps mangle them. Again though, this is totally optional because I honestly cannot come up with any way to exploit it, given how the code is laid out. So I leave it upto you. Thanks! Deepak > ChangeLog: > 2009-06-04 Omair Majid > > * rt/net/sourceforge/jnlp/JNLPFile.java > (needsNewJVM): New function. Returns true if the JNLP file requires > creating a new JVM. > (getNewVMArgs): New function. Returns arguments to pass to the new > JVM. > * rt/net/sourceforge/jnlp/Launcher.java > (launchExternal): Modify to take in arguments to pass to the JVM and > arguments to pass to the Java program. Try to use the local file to > launch this instance if possible. > (launchExternal): Modify to take in arguments to pass to the JVM and > arguments to pass to the Java program. Launch Netx with the with the > appropriate arguments. > (launchApplication): If needed, launch a new JVM and pass along the > Netx arguments. > * rt/net/sourceforge/jnlp/resources/Messages.properties: > Add BXnofork. > * rt/net/sourceforge/jnlp/runtime/Boot/java: > Add -Xnofork to helpMessage > (main): Check for '-Xnofork'. Set initial arguments. > * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: > Add forksAllowed to store whether creating a new JVM is allowed. Add > initialArguments to store the arguments to Netx. > (getForksAllowed): New function. Check if creating a new JVM is > allowed. > (setForksAllowed): New function. Set whether creating a JVM is > allowed. > (setInitialArguments): New function. Store the arguments to Netx. > (getInitialArguments): New function. Return the arguments passed to > Netx. > * rt/net/sourceforge/jnlp/services/XBasicService.java > (showDocument): Fix call to launchExternal to match the new > semantics. > > > Cheers, > Omair From ekrichardson at gmail.com Thu Jun 4 17:08:51 2009 From: ekrichardson at gmail.com (Eric Richardson) Date: Thu, 4 Jun 2009 17:08:51 -0700 Subject: Mac OS X - Power PC Build Progress In-Reply-To: References: <860cb0120906011556o5f7c48c7n36c8224380858173@mail.gmail.com> Message-ID: <860cb0120906041708s67004300k8c92f02f43e67969@mail.gmail.com> Michael, Yes, there were only a couple of patches that patch the same file and less than half the number of patches compared to your experience. The patch cleanup effort has made the distro significantly easier as well as the effort to push patches upstream. Eric On Wed, Jun 3, 2009 at 3:51 PM, Michael Franz wrote: > Eric, > > Were you able to work through all the patches? > > Michael > > > On Mon, Jun 1, 2009 at 6:56 PM, Eric Richardson wrote: > >> Hi All, >> >> I made another try at building Icedtea-1.10 yesterday. I have been able to >> work through all the patches. Some files are being worked on by multiple >> patches. I have kept track but need to go through my notes before I report >> my findings and diffs. >> >> The basic problem I am having now is that MacOSX on PowerPC reports as >> "Power Macintosh" so the default configure comes out to be bsd-Power >> Macintosh. I use ALT_OUTPUTDIR to get the make started. >> >> This machine has a ppc970 processor so should it be as >> defaulted(ARCH_DATA_MODEL=64)? Note: ZERO_ARCHFLAG=-m32 shown below. >> >> The core build is defaulting back to 'Power Macintosh' and the spaces seem >> to be causing problems. Here are the possible offending vars from the output >> below: ARCH = Power Macintosh\n LIBARCH = Power Macintosh\n ARCH_FAMILY = >> Power Macintosh\n >> Error follows. >> >> >>>Recursively making core build @ Mon Jun 1 00:26:52 PDT 2009 ... >> ../../../common/Rules.gmk:263: warning: overriding commands for target >> `Macintosh' >> ../../../common/Rules.gmk:49: warning: ignoring old commands for target >> `Macintosh' >> ../../../common/Library.gmk:67: *** target file >> `/Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/lib/Power' has both : >> and :: entries. Stop. >> make[5]: *** [build] Error 1 >> make[4]: *** [build] Error 1 >> make[3]: *** [build] Error 1 >> make[2]: *** [corba-build] Error 2 >> make[1]: *** [build_product_image] Error 2 >> make: *** [stamps/icedtea-ecj.stamp] Error 2 >> >> I have no idea how far I made it but it is much better than before. Any >> pointers to the appropriate place to adjust the build is appreciated. >> >> Eric >> >> >> Commands and some Output follows - may be a bit out of order as it was >> late ------------------------------ >> >> ./autogen.sh >> >> ./configure --enable-zero=yes --with-project=bsd >> --with-gcj-home=/Users/eric/jdk1.5 >> --with-ecj-jar=/opt/local/share/java/eclipse-ecj.jar >> --with-xalan2-jar=/opt/local/share/java/xalan.jar >> --with-xalan2-serializer-jar=/opt/local/share/java/serializer.jar >> --with-xerces2-jar=/opt/local/share/java/xercesImpl.jar --without-rhino >> --disable-plugin --disable-xrender >> >> make ALT_OUTPUTDIR=`pwd`/build/bsd-macosx >> ALT_FREETYPE_LIB_PATH=/opt/local/lib >> ALT_FREETYPE_HEADERS_PATH=/opt/local/include >> ALT_JIBX_LIBS_PATH=/Users/eric/java/jibx-1.2.1/lib >> >> >> >> /usr/bin/make \ >> >> "ALT_JDK_IMPORT_PATH=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0" >> "ANT_HOME=/usr/share/ant" "BUILD_NUMBER=b59" "JDK_UPDATE_VERSION=0" >> "JRE_RELEASE_VERSION=1.7.0_0-b59" "MILESTONE=fcs" "LANG=C" >> "PATH=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin::$PATH" >> "ALT_BOOTDIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0" >> "BUILD_ARCH_DIR=ppc" >> "ICEDTEA_RT=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" >> "ICEDTEA_BUILD_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/" >> "ICEDTEA_CLS_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes" >> "ICEDTEA_ENDORSED_DIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/lib/endorsed" >> "ENDORSED=-Djava.endorsed.dirs=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/lib/endorsed" >> "BOOTCLASSPATH_CLS_RT=-bootclasspath >> /Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes:/Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" >> "BOOTCLASSPATH_CLS=-bootclasspath >> /Users/eric/java/icedtea-1.10/openjdk-ecj/build/bsd-ppc/classes" >> "BOOTCLASSPATH_RT_LIBGCJ=-bootclasspath >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar:/Users/eric/jdk1.5/jre/lib/rt.jar" >> "CLASSPATH=" "LD_LIBRARY_PATH=" >> "GENSRCDIR=/Users/eric/java/icedtea-1.10/generated" "ICEDTEA_CORE_BUILD=yes" >> "ICEDTEA_ZERO_BUILD=yes" "ICEDTEA_SHARK_BUILD=" "ZERO_LIBARCH=ppc" >> "ZERO_BITSPERWORD=32" "ZERO_ENDIANNESS=big" "ZERO_ARCHDEF=PPC" >> "ZERO_ARCHFLAG=-m32" "LIBFFI_CFLAGS=-I/opt/local/lib/libffi-3.0.6/include " >> "LIBFFI_LIBS=-L/opt/local/lib -lffi " "LLVM_CFLAGS=" "LLVM_LDFLAGS=" >> "LLVM_LIBS=" "FREETYPE2_HEADERS=-I/opt/local/include/freetype2 >> -I/opt/local/include " "FT2_LIB=-L/opt/local/lib -lfreetype -lz " >> "ALT_PARALLEL_COMPILE_JOBS=2" "HOTSPOT_BUILD_JOBS=2" "JAVAC=" "RHINO_JAR=no" >> "JAR_KNOWS_ATFILE=1" "JAR_KNOWS_J_OPTIONS=1" "JAR_ACCEPTS_STDIN_LIST=" >> "DISABLE_NIMBUS=true" >> "ALT_NETX_DIST=/Users/eric/java/icedtea-1.10/netx.build" >> "ALT_LIVECONNECT_DIST=/Users/eric/java/icedtea-1.10" \ >> -C openjdk-ecj \ >> >> Control bsd Power Macintosh 1.7.0_0-bsd all build started: >> ( cd ./jdk/make && \ >> /usr/bin/make sanity HOTSPOT_IMPORT_CHECK=false >> JDK_TOPDIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk >> JDK_MAKE_SHARED_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk/make/common/shared >> EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs >> BUILD_NUMBER=b59 JDK_BUILD_NUMBER=b59 FULL_VERSION=1.7.0_0-bsd-b59 >> PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0_0 JDK_MKTG_VERSION=7u >> JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 >> PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 >> ARCH_DATA_MODEL=64 COOKED_JDK_UPDATE_VERSION=0 COOKED_BUILD_NUMBER=59 >> ANT_HOME="/usr/share/ant" >> ALT_OUTPUTDIR=/Users/eric/java/icedtea-1.10/build/bsd-macosx >> ALT_LANGTOOLS_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist >> ALT_CORBA_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/dist >> ALT_JAXP_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxp/dist >> ALT_JAXWS_DIST=/Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxws/dist >> ALT_HOTSPOT_IMPORT_PATH=/Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import >> BUILD_HOTSPOT=true ; ) >> >> Build Machine Information: >> build machine = new-host.home >> >> Build Directory Structure: >> CWD = /Users/eric/java/icedtea-1.10/openjdk-ecj >> TOPDIR = . >> CONTROL_TOPDIR = . >> LANGTOOLS_TOPDIR = ./langtools >> JAXP_TOPDIR = ./jaxp >> JAXWS_TOPDIR = ./jaxws >> CORBA_TOPDIR = ./corba >> HOTSPOT_TOPDIR = ./hotspot >> JDK_TOPDIR = ./jdk >> >> Build Directives: >> BUILD_LANGTOOLS = true >> BUILD_JAXP = true >> BUILD_JAXWS = true >> BUILD_CORBA = true >> BUILD_HOTSPOT = true >> BUILD_JDK = true >> >> Hotspot Settings: \n HOTSPOT_BUILD_JOBS = 2 \n >> HOTSPOT_OUTPUTDIR = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/outputdir \n >> HOTSPOT_EXPORT_PATH = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import \n \n >> >> \nBootstrap Settings:\n BOOTDIR = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_BOOTDIR = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n BOOT_VER = 1.5.0 >> [requires at least 1.5]\n OUTPUTDIR = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx\n ALT_OUTPUTDIR = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx\n ABS_OUTPUTDIR = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx\n \nBuild Tool Settings:\n >> SLASH_JAVA = /NOT-SET\n ALT_SLASH_JAVA = \n VARIANT = OPT\n >> JDK_DEVTOOLS_DIR = /NOT-SET/devtools\n ALT_JDK_DEVTOOLS_DIR = \n >> ANT_HOME = /usr/share/ant\n UNIXCOMMAND_PATH = /bin/\n >> ALT_UNIXCOMMAND_PATH = \n COMPILER_PATH = /usr/bin/\n ALT_COMPILER_PATH >> = \n DEVTOOLS_PATH = /opt/local/bin/\n ALT_DEVTOOLS_PATH = \n >> COMPILER_NAME = GCC4\n COMPILER_VERSION = GCC4\n CC_VER = 4.0.1 [requires >> at least 3.2]\n ZIP_VER = 2.32 [requires at least 2.2]\n UNZIP_VER = 5.52 >> [requires at least 5.12]\n ANT_VER = 1.7.0 [requires at least 1.6.3]\n >> TEMPDIR = /Users/eric/java/icedtea-1.10/build/bsd-macosx/tmp\n \nBuild >> Directives:\n OPENJDK = true\n USE_HOTSPOT_INTERPRETER_MODE = \n PEDANTIC >> = \n DEV_ONLY = \n NO_DOCS = \n NO_IMAGES = \n TOOLS_ONLY = \n INSANE = >> \n COMPILE_APPROACH = parallel\n PARALLEL_COMPILE_JOBS = 2\n >> ALT_PARALLEL_COMPILE_JOBS = 2\n FASTDEBUG = \n COMPILER_WARNINGS_FATAL = >> false\n COMPILER_WARNING_LEVEL = \n INCREMENTAL_BUILD = false\n >> CC_HIGHEST_OPT = \n CC_HIGHER_OPT = \n CC_LOWER_OPT = \n CXXFLAGS = -O2 >> -fPIC -DCC_NOEX -W -Wall -Wno-unused -Wno-parentheses \n CFLAGS = -O2 >> -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses \n >> BOOT_JAVA_CMD = /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/java >> -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Xmx896m >> -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m\n BOOT_JAVAC_CMD = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/javac >> -J-XX:ThreadStackSize=1536 -J-XX:-PrintVMOptions >> -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-Xmx896m -J-Xms128m >> -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii >> -XDignore.symbol.file=true\n BOOT_JAR_CMD = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/jar\n >> BOOT_JARSIGNER_CMD = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/jarsigner\n JAVAC_CMD >> = \n JAVAH_CMD = \n JAVADOC_CMD = \n \nBuild Platform Settings:\n USER = >> eric\n PLATFORM = bsd\n ARCH = Power Macintosh\n LIBARCH = Power >> Macintosh\n ARCH_FAMILY = Power Macintosh\n ARCH_DATA_MODEL = 64\n >> ARCHPROP = Power Macintosh\n OS_VERSION = 9.6.0 [requires at least 8.0]\n >> OS_VARIANT_NAME = \n OS_VARIANT_VERSION = \n TEMP_FREE_SPACE = >> 312319584\n FREE_SPACE = 312319584\n MB_OF_MEMORY = 1024\n \nGNU Make >> Settings:\n MAKE = /usr/bin/make\n MAKE_VER = 3.81 [requires at least >> 3.78]\n MAKECMDGOALS = sanity\n MAKEFLAGS = \n SHELL = /bin/sh\n \nTarget >> Build Versions:\n JDK_VERSION = 1.7.0_0\n MILESTONE = fcs\n RELEASE = >> 1.7.0_0-bsd\n FULL_VERSION = 1.7.0_0-bsd-b59\n BUILD_NUMBER = b59\n >> \nExternal File/Binary Locations:\n USRJDKINSTANCES_PATH = /opt/local\n >> BUILD_JDK_IMPORT_PATH = >> /NOT-SET/re/jdk/1.7.0_0/promoted/latest/binaries\n >> ALT_BUILD_JDK_IMPORT_PATH = \n JDK_IMPORT_PATH = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n ALT_JDK_IMPORT_PATH = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n LANGTOOLS_DIST = \n >> ALT_LANGTOOLS_DIST = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist\n CORBA_DIST >> = \n ALT_CORBA_DIST = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/corba/dist\n JAXP_DIST = >> \n ALT_JAXP_DIST = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxp/dist\n JAXWS_DIST = >> \n ALT_JAXWS_DIST = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/jaxws/dist\n >> HOTSPOT_DOCS_IMPORT_PATH = /NO_DOCS_DIR\n ALT_HOTSPOT_DOCS_IMPORT_PATH = >> \n HOTSPOT_IMPORT_PATH = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import\n >> ALT_HOTSPOT_IMPORT_PATH = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import\n >> HOTSPOT_SERVER_PATH = >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/hotspot/import/jre/lib/Power >> Macintosh/server\n ALT_HOTSPOT_SERVER_PATH = \n CACERTS_FILE = >> ./../src/share/lib/security/cacerts\n ALT_CACERTS_FILE = \n >> JIBX_LIBS_PATH = /Users/eric/java/jibx-1.2.1/lib\n ALT_JIBX_LIBS_PATH = >> /Users/eric/java/jibx-1.2.1/lib\n CUPS_HEADERS_PATH = /usr/include\n >> ALT_CUPS_HEADERS_PATH = \n \nOpenJDK-specific settings:\n >> FREETYPE_HEADERS_PATH = /opt/local/include\n ALT_FREETYPE_HEADERS_PATH = >> /opt/local/include\n FREETYPE_LIB_PATH = /opt/local/lib\n >> ALT_FREETYPE_LIB_PATH = /opt/local/lib\n X11_PATH = /usr/X11R6\n >> ALT_X11_PATH = \n \nOPENJDK Import Binary Plug Settings:\n >> IMPORT_BINARY_PLUGS = \n BINARY_PLUGS_JARFILE = >> /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs/bsd-Power >> Macintosh/jre/lib/rt-closed.jar\n ALT_BINARY_PLUGS_JARFILE = \n >> BINARY_PLUGS_PATH = >> /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs/bsd-Power >> Macintosh\n ALT_BINARY_PLUGS_PATH = \n BUILD_BINARY_PLUGS_PATH = >> /NOT-SET/re/jdk/1.7.0_0/promoted/latest/openjdk/binaryplugs\n >> ALT_BUILD_BINARY_PLUGS_PATH = \n PLUG_LIBRARY_NAMES = \n \nPrevious JDK >> Settings:\n PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE\n >> ALT_PREVIOUS_RELEASE_PATH = \n PREVIOUS_JDK_VERSION = 1.6.0\n >> ALT_PREVIOUS_JDK_VERSION = \n PREVIOUS_JDK_FILE = \n >> ALT_PREVIOUS_JDK_FILE = \n PREVIOUS_JRE_FILE = \n ALT_PREVIOUS_JRE_FILE >> = \n PREVIOUS_RELEASE_IMAGE = >> /Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0\n >> ALT_PREVIOUS_RELEASE_IMAGE = \n >> >> Sanity check passed. >> Control bsd Power Macintosh 1.7.0_0-bsd all_product_build build started: >> Control bsd Power Macintosh 1.7.0_0-bsd build_product_image build started: >> >> /usr/bin/make \ >> SKIP_FASTDEBUG_BUILD=true \ >> SKIP_DEBUG_BUILD=true \ >> \ >> generic_build_repo_series >> /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx >> /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx/j2sdk-image >> /bin/mkdir -p /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools >> (cd ./langtools/make && \ >> /usr/bin/make >> JDK_TOPDIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk >> JDK_MAKE_SHARED_DIR=/Users/eric/java/icedtea-1.10/openjdk-ecj/jdk/make/common/shared >> EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs >> BUILD_NUMBER=b59 JDK_BUILD_NUMBER=b59 FULL_VERSION=1.7.0_0-bsd-b59 >> PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0_0 JDK_MKTG_VERSION=7u >> JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 >> PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 >> ARCH_DATA_MODEL=64 COOKED_JDK_UPDATE_VERSION=0 COOKED_BUILD_NUMBER=59 >> ANT_HOME="/usr/share/ant" >> ALT_OUTPUTDIR=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools >> ALT_BOOTDIR=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0 all) >> ANT_OPTS=-Djava.io.tmpdir='/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-tmp' >> ant -diagnostics > >> /Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-diagnostics.log >> ANT_OPTS=-Djava.io.tmpdir='/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build/ant-tmp' >> ant -Djdk.version=1.7.0_0 -Dfull.version='1.7.0_0-bsd-b59' >> -Drelease=1.7.0_0 -Dbuild.number=b59 -Djavac.target=5 >> -Dboot.java.home=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0 >> -Djavac.executable=/Users/eric/java/icedtea-1.10/bootstrap/jdk1.6.0/bin/javac >> -Dbuild.dir=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/build >> -Ddist.dir=/Users/eric/java/icedtea-1.10/build/bsd-macosx/langtools/dist >> build >> Buildfile: build.xml >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090604/0810581d/attachment.html From gnu_andrew at member.fsf.org Thu Jun 4 17:49:34 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 5 Jun 2009 01:49:34 +0100 Subject: RFC: Make javax.jnlp package visible to javac In-Reply-To: <4A2817A3.2070807@redhat.com> References: <4A2817A3.2070807@redhat.com> Message-ID: <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> 2009/6/4 Omair Majid : > Hi, > > Sun's documentation states that javac should be able to compile code that > uses javax.jnlp once jnlp.jar is added to the classpath [1]. IcedTea6, > however, has no jnlp.jar, and javax.jnlp.* classes are already in rt.jar. It > turns out that you have to use 'javac -XDignore.symbol.file OnlineTest.java' > for this to work [2]. > > The attached patch adds javax.jnlp to NON_CORE_PKGS list, making it visible > to javac. > > ChangeLog: > 2009-06-04 ?Omair Majid ? > > ? ?* patches/icedtea-webstart.patch: Make javax.jnlp classes visible. > > Ok to commit? > > Cheers, > Omair > > > [1] > http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/examples.html#Introduction > [2] http://andrew-haley.livejournal.com/695.html > Looks good to me (though seems strange the Makefile is under docs...). Did we ever work out if there was a good reason for keeping this symbol mapping stuff? -- 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 Fri Jun 5 03:48:45 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 05 Jun 2009 10:48:45 +0000 Subject: changeset in /hg/icedtea6: 2009-06-05 Gary Benson changeset 4dbf479c5609 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4dbf479c5609 description: 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_new): Removed constant pool lookup. (SharkTopLevelBlock::scan_for_traps): Add traps for new. diffstat: 2 files changed, 35 insertions(+), 16 deletions(-) ChangeLog | 6 ++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 45 +++++++++------ diffs (121 lines): diff -r 2a14fec2301f -r 4dbf479c5609 ChangeLog --- a/ChangeLog Thu Jun 04 11:07:53 2009 -0400 +++ b/ChangeLog Fri Jun 05 06:47:14 2009 -0400 @@ -1,3 +1,9 @@ 2009-06-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_new): Removed constant pool lookup. + (SharkTopLevelBlock::scan_for_traps): Add traps for new. + 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r 2a14fec2301f -r 4dbf479c5609 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 11:07:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 06:47:14 2009 -0400 @@ -40,6 +40,7 @@ void SharkTopLevelBlock::scan_for_traps( ciField *field; ciMethod *method; + ciInstanceKlass *klass; bool will_link; bool is_field; @@ -98,6 +99,30 @@ void SharkTopLevelBlock::scan_for_traps( // Continue to the check index = iter()->get_method_index(); + break; + + case Bytecodes::_new: + klass = iter()->get_klass(will_link)->as_instance_klass(); + assert(will_link, "typeflow responsibility"); + + // Bail out if the class is unloaded + if (iter()->is_unresolved_klass() || !klass->is_initialized()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } + + // Bail out if the class cannot be instantiated + if (klass->is_abstract() || klass->is_interface() || + klass->name() == ciSymbol::java_lang_Class()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_unhandled, + Deoptimization::Action_reinterpret), bci()); + return; + } break; } @@ -1291,7 +1316,6 @@ void SharkTopLevelBlock::do_new() ciInstanceKlass* klass = iter()->get_klass(will_link)->as_instance_klass(); assert(will_link, "typeflow responsibility"); - BasicBlock *tlab_alloc = NULL; BasicBlock *got_tlab = NULL; BasicBlock *heap_alloc = NULL; BasicBlock *retry = NULL; @@ -1310,33 +1334,22 @@ void SharkTopLevelBlock::do_new() Value *slow_object = NULL; Value *object = NULL; - SharkConstantPool constants(this); - // The fast path if (!Klass::layout_helper_needs_slow_path(klass->layout_helper())) { if (UseTLAB) { - tlab_alloc = function()->CreateBlock("tlab_alloc"); got_tlab = function()->CreateBlock("got_tlab"); + heap_alloc = function()->CreateBlock("heap_alloc"); } - heap_alloc = function()->CreateBlock("heap_alloc"); retry = function()->CreateBlock("retry"); got_heap = function()->CreateBlock("got_heap"); initialize = function()->CreateBlock("initialize"); slow_alloc_and_init = function()->CreateBlock("slow_alloc_and_init"); push_object = function()->CreateBlock("push_object"); - builder()->CreateCondBr( - builder()->CreateICmpEQ( - constants.tag_at(iter()->get_klass_index()), - LLVMValue::jbyte_constant(JVM_CONSTANT_Class)), - UseTLAB ? tlab_alloc : heap_alloc, slow_alloc_and_init); - size_t size_in_bytes = klass->size_helper() << LogHeapWordSize; // Thread local allocation if (UseTLAB) { - builder()->SetInsertPoint(tlab_alloc); - Value *top_addr = builder()->CreateAddressOfStructEntry( thread(), Thread::tlab_top_offset(), PointerType::getUnqual(SharkType::intptr_type()), @@ -1361,11 +1374,11 @@ void SharkTopLevelBlock::do_new() builder()->CreateStore(new_top, top_addr); builder()->CreateBr(initialize); + + builder()->SetInsertPoint(heap_alloc); } // Heap allocation - builder()->SetInsertPoint(heap_alloc); - Value *top_addr = builder()->CreateIntToPtr( builder()->pointer_constant(Universe::heap()->top_addr()), PointerType::getUnqual(SharkType::intptr_type()), @@ -1438,7 +1451,7 @@ void SharkTopLevelBlock::do_new() builder()->CreateStore(LLVMValue::intptr_constant(mark), mark_addr); // Set the class - Value *rtklass = constants.object_at(iter()->get_klass_index()); + Value *rtklass = builder()->CreateInlineOop(klass); builder()->CreateStore(rtklass, klass_addr); got_fast = builder()->GetInsertBlock(); From gbenson at redhat.com Fri Jun 5 03:53:24 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 5 Jun 2009 11:53:24 +0100 Subject: Shark new improvements Message-ID: <20090605105323.GA3171@redhat.com> Hi all, This commit replaces the interpreter-style constant pool lookup of class to be instantiated in the "new" bytecode with an inlined oop. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 2a14fec2301f -r 4dbf479c5609 ChangeLog --- a/ChangeLog Thu Jun 04 11:07:53 2009 -0400 +++ b/ChangeLog Fri Jun 05 06:47:14 2009 -0400 @@ -1,3 +1,9 @@ +2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_new): Removed constant pool lookup. + (SharkTopLevelBlock::scan_for_traps): Add traps for new. + 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r 2a14fec2301f -r 4dbf479c5609 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 11:07:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 06:47:14 2009 -0400 @@ -40,6 +40,7 @@ ciField *field; ciMethod *method; + ciInstanceKlass *klass; bool will_link; bool is_field; @@ -98,6 +99,30 @@ // Continue to the check index = iter()->get_method_index(); + break; + + case Bytecodes::_new: + klass = iter()->get_klass(will_link)->as_instance_klass(); + assert(will_link, "typeflow responsibility"); + + // Bail out if the class is unloaded + if (iter()->is_unresolved_klass() || !klass->is_initialized()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } + + // Bail out if the class cannot be instantiated + if (klass->is_abstract() || klass->is_interface() || + klass->name() == ciSymbol::java_lang_Class()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_unhandled, + Deoptimization::Action_reinterpret), bci()); + return; + } break; } @@ -1291,7 +1316,6 @@ ciInstanceKlass* klass = iter()->get_klass(will_link)->as_instance_klass(); assert(will_link, "typeflow responsibility"); - BasicBlock *tlab_alloc = NULL; BasicBlock *got_tlab = NULL; BasicBlock *heap_alloc = NULL; BasicBlock *retry = NULL; @@ -1310,33 +1334,22 @@ Value *slow_object = NULL; Value *object = NULL; - SharkConstantPool constants(this); - // The fast path if (!Klass::layout_helper_needs_slow_path(klass->layout_helper())) { if (UseTLAB) { - tlab_alloc = function()->CreateBlock("tlab_alloc"); got_tlab = function()->CreateBlock("got_tlab"); + heap_alloc = function()->CreateBlock("heap_alloc"); } - heap_alloc = function()->CreateBlock("heap_alloc"); retry = function()->CreateBlock("retry"); got_heap = function()->CreateBlock("got_heap"); initialize = function()->CreateBlock("initialize"); slow_alloc_and_init = function()->CreateBlock("slow_alloc_and_init"); push_object = function()->CreateBlock("push_object"); - builder()->CreateCondBr( - builder()->CreateICmpEQ( - constants.tag_at(iter()->get_klass_index()), - LLVMValue::jbyte_constant(JVM_CONSTANT_Class)), - UseTLAB ? tlab_alloc : heap_alloc, slow_alloc_and_init); - size_t size_in_bytes = klass->size_helper() << LogHeapWordSize; // Thread local allocation if (UseTLAB) { - builder()->SetInsertPoint(tlab_alloc); - Value *top_addr = builder()->CreateAddressOfStructEntry( thread(), Thread::tlab_top_offset(), PointerType::getUnqual(SharkType::intptr_type()), @@ -1361,11 +1374,11 @@ builder()->CreateStore(new_top, top_addr); builder()->CreateBr(initialize); + + builder()->SetInsertPoint(heap_alloc); } // Heap allocation - builder()->SetInsertPoint(heap_alloc); - Value *top_addr = builder()->CreateIntToPtr( builder()->pointer_constant(Universe::heap()->top_addr()), PointerType::getUnqual(SharkType::intptr_type()), @@ -1438,7 +1451,7 @@ builder()->CreateStore(LLVMValue::intptr_constant(mark), mark_addr); // Set the class - Value *rtklass = constants.object_at(iter()->get_klass_index()); + Value *rtklass = builder()->CreateInlineOop(klass); builder()->CreateStore(rtklass, klass_addr); got_fast = builder()->GetInsertBlock(); From gbenson at redhat.com Fri Jun 5 04:10:38 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 05 Jun 2009 11:10:38 +0000 Subject: changeset in /hg/icedtea6: 2009-06-05 Gary Benson changeset 20de96630f3a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=20de96630f3a description: 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::acquire_method_lock): Removed constant pool lookup. diffstat: 2 files changed, 13 insertions(+), 7 deletions(-) ChangeLog | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 14 +++++++------- diffs (38 lines): diff -r 4dbf479c5609 -r 20de96630f3a ChangeLog --- a/ChangeLog Fri Jun 05 06:47:14 2009 -0400 +++ b/ChangeLog Fri Jun 05 12:12:00 2009 +0100 @@ -1,3 +1,9 @@ 2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::acquire_method_lock): Removed constant + pool lookup. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 4dbf479c5609 -r 20de96630f3a ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 06:47:14 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 12:12:00 2009 +0100 @@ -1563,14 +1563,14 @@ void SharkTopLevelBlock::do_multianewarr void SharkTopLevelBlock::acquire_method_lock() { + Value *lockee; + if (target()->is_static()) + lockee = builder()->CreateInlineOop(target()->holder()->java_mirror()); + else + lockee = local(0)->jobject_value(); + iter()->force_bci(start()); // for the decache in acquire_lock - if (target()->is_static()) { - SharkConstantPool constants(this); - acquire_lock(constants.java_mirror(), EX_CHECK_NO_CATCH); - } - else { - acquire_lock(local(0)->jobject_value(), EX_CHECK_NO_CATCH); - } + acquire_lock(lockee, EX_CHECK_NO_CATCH); } void SharkTopLevelBlock::do_monitorenter() From gbenson at redhat.com Fri Jun 5 05:18:51 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 05 Jun 2009 12:18:51 +0000 Subject: changeset in /hg/icedtea6: 2009-06-05 Gary Benson changeset 26ddf03b22c3 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=26ddf03b22c3 description: 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_full_instance_check): Add class argument. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_instance_check): Removed constant pool check. (SharkTopLevelBlock::do_full_instance_check): Removed constant pool lookup. diffstat: 3 files changed, 20 insertions(+), 18 deletions(-) ChangeLog | 9 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 27 +++++---------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 - diffs (74 lines): diff -r 20de96630f3a -r 26ddf03b22c3 ChangeLog --- a/ChangeLog Fri Jun 05 12:12:00 2009 +0100 +++ b/ChangeLog Fri Jun 05 08:17:22 2009 -0400 @@ -1,3 +1,12 @@ 2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_full_instance_check): Add class argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_instance_check): Removed constant pool check. + (SharkTopLevelBlock::do_full_instance_check): Removed constant + pool lookup. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 20de96630f3a -r 26ddf03b22c3 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 12:12:00 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 08:17:22 2009 -0400 @@ -1166,23 +1166,17 @@ void SharkTopLevelBlock::do_call() void SharkTopLevelBlock::do_instance_check() { - constantTag tag = - target()->holder()->constant_pool_tag_at(iter()->get_klass_index()); - if (!tag.is_klass()) { - assert(tag.is_unresolved_klass(), "should be"); - do_trapping_instance_check(); - } - else { - do_full_instance_check(); - } -} - -void SharkTopLevelBlock::do_full_instance_check() -{ bool will_link; ciKlass *klass = iter()->get_klass(will_link); - assert(will_link, "should do"); - + + if (will_link) + do_full_instance_check(klass); + else + do_trapping_instance_check(); +} + +void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) +{ BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *subtype_check = function()->CreateBlock("subtype_check"); BasicBlock *is_instance = function()->CreateBlock("is_instance"); @@ -1208,8 +1202,7 @@ void SharkTopLevelBlock::do_full_instanc // Get the class we're checking against builder()->SetInsertPoint(not_null); - SharkConstantPool constants(this); - Value *check_klass = constants.object_at(iter()->get_klass_index()); + Value *check_klass = builder()->CreateInlineOop(klass); // Get the class of the object being tested Value *object_klass = builder()->CreateValueOfStructEntry( diff -r 20de96630f3a -r 26ddf03b22c3 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 12:12:00 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 08:17:22 2009 -0400 @@ -386,7 +386,7 @@ class SharkTopLevelBlock : public SharkB // checkcast and instanceof private: - void do_full_instance_check(); + void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(); void do_instance_check(); From gbenson at redhat.com Fri Jun 5 05:22:47 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 5 Jun 2009 13:22:47 +0100 Subject: Shark checkcast and instanceof improvements (part 1) Message-ID: <20090605122247.GB3171@redhat.com> Hi all, This commit replaces the interpreter-style constant pool lookup of the class to be checked against in the instanceof and checkcast bytecodes with an inlined oop. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r a2125c262913 ChangeLog --- a/ChangeLog Fri Jun 05 12:12:47 2009 +0100 +++ b/ChangeLog Fri Jun 05 13:21:26 2009 +0100 @@ -1,3 +1,12 @@ +2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_full_instance_check): Add class argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_instance_check): Removed constant pool check. + (SharkTopLevelBlock::do_full_instance_check): Removed constant + pool lookup. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r a2125c262913 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 12:12:47 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 13:21:26 2009 +0100 @@ -1166,23 +1166,17 @@ void SharkTopLevelBlock::do_instance_check() { - constantTag tag = - target()->holder()->constant_pool_tag_at(iter()->get_klass_index()); - if (!tag.is_klass()) { - assert(tag.is_unresolved_klass(), "should be"); + bool will_link; + ciKlass *klass = iter()->get_klass(will_link); + + if (will_link) + do_full_instance_check(klass); + else do_trapping_instance_check(); - } - else { - do_full_instance_check(); - } } -void SharkTopLevelBlock::do_full_instance_check() +void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { - bool will_link; - ciKlass *klass = iter()->get_klass(will_link); - assert(will_link, "should do"); - BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *subtype_check = function()->CreateBlock("subtype_check"); BasicBlock *is_instance = function()->CreateBlock("is_instance"); @@ -1208,8 +1202,7 @@ // Get the class we're checking against builder()->SetInsertPoint(not_null); - SharkConstantPool constants(this); - Value *check_klass = constants.object_at(iter()->get_klass_index()); + Value *check_klass = builder()->CreateInlineOop(klass); // Get the class of the object being tested Value *object_klass = builder()->CreateValueOfStructEntry( diff -r a2125c262913 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 12:12:47 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 13:21:26 2009 +0100 @@ -386,7 +386,7 @@ // checkcast and instanceof private: - void do_full_instance_check(); + void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(); void do_instance_check(); From omajid at redhat.com Fri Jun 5 06:40:18 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 05 Jun 2009 09:40:18 -0400 Subject: RFC: Make javax.jnlp package visible to javac In-Reply-To: <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> References: <4A2817A3.2070807@redhat.com> <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> Message-ID: <4A292042.50908@redhat.com> Andrew John Hughes wrote: > 2009/6/4 Omair Majid : >> Hi, >> >> Sun's documentation states that javac should be able to compile code that >> uses javax.jnlp once jnlp.jar is added to the classpath [1]. IcedTea6, >> however, has no jnlp.jar, and javax.jnlp.* classes are already in rt.jar. It >> turns out that you have to use 'javac -XDignore.symbol.file OnlineTest.java' >> for this to work [2]. >> >> The attached patch adds javax.jnlp to NON_CORE_PKGS list, making it visible >> to javac. >> >> ChangeLog: >> 2009-06-04 Omair Majid >> >> * patches/icedtea-webstart.patch: Make javax.jnlp classes visible. >> >> Ok to commit? >> >> Cheers, >> Omair >> >> >> [1] >> http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/examples.html#Introduction >> [2] http://andrew-haley.livejournal.com/695.html >> > > Looks good to me (though seems strange the Makefile is under docs...). I could move the Makefile in the patch ;) > > Did we ever work out if there was a good reason for keeping this > symbol mapping stuff? Nothing formally. If I recall correctly, Andrew Haley mentioned that it might make javac faster. Presumably anything not visible to javac is not really part of the Java API and there should be no need for programmers to use those classes (but this doesnt hold true for some parts of IcedTea). Cheers, Omair From gbenson at redhat.com Fri Jun 5 06:45:09 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 05 Jun 2009 13:45:09 +0000 Subject: changeset in /hg/icedtea6: 2009-06-06 Gary Benson changeset 2f2bbe3b693d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=2f2bbe3b693d description: 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_optimized_instance_check): New method. (SharkTopLevelBlock::do_full_instance_check): Add class argument. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_instance_check): Add compile time type checks. (SharkTopLevelBlock::do_optimized_instance_check): New method. (SharkTopLevelBlock::do_trapping_instance_check): Update the object with the new class if its a checkcast that passes. diffstat: 3 files changed, 65 insertions(+), 9 deletions(-) ChangeLog | 12 +++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 59 ++++++++++++--- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 3 diffs (119 lines): diff -r 26ddf03b22c3 -r 2f2bbe3b693d ChangeLog --- a/ChangeLog Fri Jun 05 08:17:22 2009 -0400 +++ b/ChangeLog Fri Jun 05 14:46:31 2009 +0100 @@ -1,3 +1,15 @@ 2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_optimized_instance_check): New method. + (SharkTopLevelBlock::do_full_instance_check): Add class argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_instance_check): Add compile time type + checks. + (SharkTopLevelBlock::do_optimized_instance_check): New method. + (SharkTopLevelBlock::do_trapping_instance_check): Update the + object with the new class if its a checkcast that passes. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 26ddf03b22c3 -r 2f2bbe3b693d ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 08:17:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 14:46:31 2009 +0100 @@ -1166,15 +1166,55 @@ void SharkTopLevelBlock::do_call() void SharkTopLevelBlock::do_instance_check() { + // Get the class we're checking against bool will_link; - ciKlass *klass = iter()->get_klass(will_link); - + ciKlass *check_klass = iter()->get_klass(will_link); + + // If the class we're checking against is java.lang.Object + // then this is a no brainer. Apparently this can happen + // in reflective code... + if (check_klass == function()->env()->Object_klass()) { + do_optimized_instance_check(); + return; + } + + // Get the class of the object we're checking + ciKlass *object_klass = xstack(0)->type()->as_klass(); + + // If the classes are defined enough now then we + // don't need a runtime check. NB opto's code for + // this (GraphKit::static_subtype_check) says we + // cannot trust static interface types yet, hence + // the extra check + if (!object_klass->is_interface()) { + if (object_klass == check_klass) { + do_optimized_instance_check(); + return; + } + + if (object_klass->is_loaded() && check_klass->is_loaded()) { + if (object_klass->is_subtype_of(check_klass)) { + do_optimized_instance_check(); + return; + } + } + } + + // Need to check this one at runtime if (will_link) - do_full_instance_check(klass); + do_full_instance_check(check_klass); else - do_trapping_instance_check(); -} - + do_trapping_instance_check(check_klass); +} + +void SharkTopLevelBlock::do_optimized_instance_check() +{ + if (bc() == Bytecodes::_instanceof) { + pop(); + push(SharkValue::jint_constant(1)); + } +} + void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -1275,7 +1315,7 @@ void SharkTopLevelBlock::do_full_instanc } } -void SharkTopLevelBlock::do_trapping_instance_check() +void SharkTopLevelBlock::do_trapping_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *is_null = function()->CreateBlock("null"); @@ -1297,7 +1337,10 @@ void SharkTopLevelBlock::do_trapping_ins // If it's null then we're ok builder()->SetInsertPoint(is_null); set_current_state(saved_state); - if (bc() == Bytecodes::_instanceof) { + if (bc() == Bytecodes::_checkcast) { + push(SharkValue::create_generic(klass, pop()->jobject_value(), false)); + } + else { pop(); push(SharkValue::jint_constant(0)); } diff -r 26ddf03b22c3 -r 2f2bbe3b693d ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 08:17:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 14:46:31 2009 +0100 @@ -386,8 +386,9 @@ class SharkTopLevelBlock : public SharkB // checkcast and instanceof private: + void do_optimized_instance_check(); void do_full_instance_check(ciKlass* klass); - void do_trapping_instance_check(); + void do_trapping_instance_check(ciKlass* klass); void do_instance_check(); From gbenson at redhat.com Fri Jun 5 06:48:49 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 5 Jun 2009 14:48:49 +0100 Subject: Shark checkcast and instanceof improvements (part 2) Message-ID: <20090605134849.GC3171@redhat.com> Hi all, This commit adds some compile-time type checking to the instanceof and checkcast bytecodes. It doesn't actually do anything at the moment because of the way Shark handles state (see PR IcedTea/346) but hopefully I can change that soon. Cheers, Gary -- http://gbenson.net/ From omajid at redhat.com Fri Jun 5 07:37:13 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 05 Jun 2009 14:37:13 +0000 Subject: changeset in /hg/icedtea6: 2009-06-05 Omair Majid changeset 8ba2783ba3b0 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8ba2783ba3b0 description: 2009-06-05 Omair Majid * patches/icedtea-webstart.patch: Make javax.jnlp package visible to javac. diffstat: 2 files changed, 23 insertions(+) ChangeLog | 5 +++++ patches/icedtea-webstart.patch | 18 ++++++++++++++++++ diffs (37 lines): diff -r 2f2bbe3b693d -r 8ba2783ba3b0 ChangeLog --- a/ChangeLog Fri Jun 05 14:46:31 2009 +0100 +++ b/ChangeLog Fri Jun 05 10:25:13 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-06 Gary Benson + + * patches/icedtea-webstart.patch: Make javax.jnlp package visible to + javac. + 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 2f2bbe3b693d -r 8ba2783ba3b0 patches/icedtea-webstart.patch --- a/patches/icedtea-webstart.patch Fri Jun 05 14:46:31 2009 +0100 +++ b/patches/icedtea-webstart.patch Fri Jun 05 10:25:13 2009 -0400 @@ -117,3 +117,21 @@ diff -urN openjdk.orig/jdk/src/share/cla if (status != APPLET_DISPOSE) { showAppletStatus("notdisposed"); return; +--- openjdk/jdk/make/docs/NON_CORE_PKGS.gmk.orig 2009-06-04 11:02:18.000000000 -0400 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2009-06-04 11:02:45.000000000 -0400 +@@ -84,6 +84,8 @@ + + SMARTCARDIO_PKGS = javax.smartcardio + ++JNLP_PKGS = javax.jnlp ++ + # non-core packages in rt.jar + NON_CORE_PKGS = $(DOMAPI_PKGS) \ + $(MGMT_PKGS) \ +@@ -91,4 +93,5 @@ + $(JGSS_PKGS) \ + $(OLD_JSSE_PKGS) \ + $(HTTPSERVER_PKGS) \ +- $(SMARTCARDIO_PKGS) ++ $(SMARTCARDIO_PKGS) \ ++ $(JNLP_PKGS) From ahughes at redhat.com Fri Jun 5 10:36:55 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 05 Jun 2009 17:36:55 +0000 Subject: changeset in /hg/icedtea: Fix CACAO build with GCC 4.4. Message-ID: changeset a5e05eb00fc3 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a5e05eb00fc3 description: Fix CACAO build with GCC 4.4. 2009-05-27 Andrew John Hughes * HACKING: Updated. * Makefile.am: Add new patch, move openjdk7 patch to be with others. * patches/cacao/no-strict-aliasing.patch: New patch to fix CACAO build on GCC 4.4 (see PR129). * patches/cacao/openjdk7.patch: Fixed paths to match other patches. diffstat: 5 files changed, 35 insertions(+), 8 deletions(-) ChangeLog | 11 +++++++++++ HACKING | 11 +++++++---- Makefile.am | 5 +++-- patches/cacao/no-strict-aliasing.patch | 12 ++++++++++++ patches/cacao/openjdk7.patch | 4 ++-- diffs (96 lines): diff -r 123d98a5d278 -r a5e05eb00fc3 ChangeLog --- a/ChangeLog Wed Jun 03 16:41:46 2009 +0200 +++ b/ChangeLog Fri Jun 05 18:38:11 2009 +0100 @@ -1,3 +1,14 @@ 2009-06-03 Xerxes R??nby + + * HACKING: Updated. + * Makefile.am: + Add new patch, move openjdk7 patch to be + with others. + * patches/cacao/no-strict-aliasing.patch: + New patch to fix CACAO build on GCC 4.4 (see PR129). + * patches/cacao/openjdk7.patch: + Fixed paths to match other patches. + 2009-06-03 Xerxes R??nby Stefan Ring diff -r 123d98a5d278 -r a5e05eb00fc3 HACKING --- a/HACKING Wed Jun 03 16:41:46 2009 +0200 +++ b/HACKING Fri Jun 05 18:38:11 2009 +0100 @@ -71,10 +71,6 @@ The following patches are currently appl * icedtea-cc-interp-backedge.patch: Remove some duplicated code in DO_BACKEDGE_CHECKS. * icedtea-includedb.patch: Add missing include files. (S6793825, mostly applied in b47) * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295). -* cacao/launcher.patch: For the 'java' command, create new thread depending on the current VM. -* cacao/no-mmap-first-page.patch: Don't mmap the first memory page. -* cacao/native-resolve.patch: Changes CACAO resolution order for native methods. (cacao PR128). -* cacao/xxoption-warning.patch: Makes CACAO print warnings to stderr (cacao PR128). The following patches are only applied to OpenJDK6 in IcedTea6: @@ -141,6 +137,13 @@ The following patches are only applied w The following patches are only applied when building with the CACAO virtual machine: * cacao/ignore-tests.patch: Ignore tests known to fail on CACAO. +* cacao/launcher.patch: For the 'java' command, create new thread depending on the current VM. +* cacao/no-mmap-first-page.patch: Don't mmap the first memory page. +* cacao/native-resolve.patch: Changes CACAO resolution order for native methods. (cacao PR128). +* cacao/xxoption-warning.patch: Makes CACAO print warnings to stderr (cacao PR128). +* cacao/openjdk7.patch: Turn on java.c functions for OpenJDK7. +* cacao/no-strict-aliasing.patch: Turn off strict aliasing which causes an issue with the verifier + when building with GCC 4.4 (cacao PR129). The following patches are to support Xrender pipeline (-Dsun.java2d.xrender): diff -r 123d98a5d278 -r a5e05eb00fc3 Makefile.am --- a/Makefile.am Wed Jun 03 16:41:46 2009 +0200 +++ b/Makefile.am Fri Jun 05 18:38:11 2009 +0100 @@ -2089,7 +2089,9 @@ ICEDTEA_PATCHES += \ patches/cacao/launcher.patch \ patches/cacao/no-mmap-first-page.patch \ patches/cacao/native-resolve.patch \ - patches/cacao/xxoption-warning.patch + patches/cacao/xxoption-warning.patch \ + patches/cacao/no-strict-aliasing.patch \ + patches/cacao/openjdk7.patch endif if WITH_CACAO @@ -2248,7 +2250,6 @@ if !USE_SYSTEM_CACAO dir=$$(basename cacao/cacao-*) ; \ ln -s $$dir cacao/cacao ; \ cd cacao/cacao ; \ - $(PATCH) -l -p0 < $(abs_top_srcdir)/patches/cacao/openjdk7.patch ; \ cd .. ; \ fi endif diff -r 123d98a5d278 -r a5e05eb00fc3 patches/cacao/no-strict-aliasing.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/no-strict-aliasing.patch Fri Jun 05 18:38:11 2009 +0100 @@ -0,0 +1,12 @@ +diff -ur cacao-0.99.4.orig/configure cacao-0.99.4/configure +--- cacao.orig/cacao/configure 2009-03-16 12:44:25.000000000 +0100 ++++ cacao/cacao/configure 2009-06-05 17:58:48.000000000 +0200 +@@ -2825,7 +2825,7 @@ + + + if test x"$CFLAGS" = "x"; then +- OPT_CFLAGS="-g -O2" ++ OPT_CFLAGS="-g -O2 -fno-strict-aliasing" + else + OPT_CFLAGS=$CFLAGS + fi diff -r 123d98a5d278 -r a5e05eb00fc3 patches/cacao/openjdk7.patch --- a/patches/cacao/openjdk7.patch Wed Jun 03 16:41:46 2009 +0200 +++ b/patches/cacao/openjdk7.patch Fri Jun 05 18:38:11 2009 +0100 @@ -1,6 +1,6 @@ diff -Nru src.orig/native/vm/sun_misc_Un diff -Nru src.orig/native/vm/sun_misc_Unsafe.c src/native/vm/sun_misc_Unsafe.c ---- src.orig/native/vm/sun_misc_Unsafe.c 2009-03-19 17:31:38.000000000 +0000 -+++ src/native/vm/sun_misc_Unsafe.c 2009-03-19 17:34:57.000000000 +0000 +--- cacao/cacao/src.orig/native/vm/sun_misc_Unsafe.c 2009-03-19 17:31:38.000000000 +0000 ++++ cacao/cacao/src/native/vm/sun_misc_Unsafe.c 2009-03-19 17:34:57.000000000 +0000 @@ -104,14 +104,8 @@ { "putDouble", "(JD)V", (void *) (intptr_t) &Java_sun_misc_Unsafe_putDouble__JD }, { "objectFieldOffset", "(Ljava/lang/reflect/Field;)J", (void *) (intptr_t) &Java_sun_misc_Unsafe_objectFieldOffset }, From gbenson at redhat.com Fri Jun 5 11:10:06 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 05 Jun 2009 18:10:06 +0000 Subject: changeset in /hg/icedtea6: 2009-06-06 Gary Benson changeset afa643fbffde in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=afa643fbffde description: 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::maybe_do_instanceof_if): New method. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::maybe_do_instanceof_if): New method. (SharkBlock::parse_bytecode): Use the above for instanceof immediately followed by ifeq or ifne. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_if_helper): New method. (SharkTopLevelBlock::static_subtype_check): Likewise. (SharkTopLevelBlock::maybe_do_instanceof_if): Likewise. (SharkTopLevelBlock::do_optimized_instance_check): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_if_helper): New method. (SharkTopLevelBlock::do_if): Use the above. (SharkTopLevelBlock::static_subtype_check): New method. (SharkTopLevelBlock::do_instance_check): Use the above. (SharkTopLevelBlock::maybe_do_instanceof_if): New method. (SharkTopLevelBlock::do_optimized_instance_check): Removed. (SharkTopLevelBlock::do_full_instance_check): Removed now-unnecessary state copy and merge. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState::replace_all): New method. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::replace_all): Likewise. diffstat: 7 files changed, 205 insertions(+), 43 deletions(-) ChangeLog | 31 ++- ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 37 +++ ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkState.cpp | 15 + ports/hotspot/src/share/vm/shark/sharkState.hpp | 4 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 152 +++++++++++---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 8 diffs (385 lines): diff -r 8ba2783ba3b0 -r afa643fbffde ChangeLog --- a/ChangeLog Fri Jun 05 10:25:13 2009 -0400 +++ b/ChangeLog Fri Jun 05 19:11:26 2009 +0100 @@ -1,4 +1,33 @@ 2009-06-05 Omair Majid +2009-06-06 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::maybe_do_instanceof_if): New method. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_do_instanceof_if): New method. + (SharkBlock::parse_bytecode): Use the above for + instanceof immediately followed by ifeq or ifne. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_if_helper): New method. + (SharkTopLevelBlock::static_subtype_check): Likewise. + (SharkTopLevelBlock::maybe_do_instanceof_if): Likewise. + (SharkTopLevelBlock::do_optimized_instance_check): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_if_helper): New method. + (SharkTopLevelBlock::do_if): Use the above. + (SharkTopLevelBlock::static_subtype_check): New method. + (SharkTopLevelBlock::do_instance_check): Use the above. + (SharkTopLevelBlock::maybe_do_instanceof_if): New method. + (SharkTopLevelBlock::do_optimized_instance_check): Removed. + (SharkTopLevelBlock::do_full_instance_check): Removed + now-unnecessary state copy and merge. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::replace_all): New method. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::replace_all): Likewise. + +2009-06-06 Omair Majid * patches/icedtea-webstart.patch: Make javax.jnlp package visible to javac. diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jun 05 19:11:26 2009 +0100 @@ -825,8 +825,38 @@ void SharkBlock::parse_bytecode(int star do_call(); break; + case Bytecodes::_instanceof: + // This is a very common construct: + // + // if (object instanceof Klass) { + // something = (Klass) object; + // ... + // } + // + // which gets compiled to something like this: + // + // 28: aload 9 + // 30: instanceof + // 33: ifeq 52 + // 36: aload 9 + // 38: checkcast + // + // Handling both bytecodes at once allows us + // to eliminate the checkcast. + if (iter()->next_bci() < limit && + (iter()->next_bc() == Bytecodes::_ifeq || + iter()->next_bc() == Bytecodes::_ifne) && + (!UseLoopSafepoints || + iter()->next_get_dest() > iter()->next_bci())) { + if (maybe_do_instanceof_if()) { + iter()->next(); + if (SharkTraceBytecodes) + tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); + break; + } + } + // fall through case Bytecodes::_checkcast: - case Bytecodes::_instanceof: do_instance_check(); break; @@ -1225,6 +1255,11 @@ void SharkBlock::do_instance_check() ShouldNotCallThis(); } +bool SharkBlock::maybe_do_instanceof_if() +{ + ShouldNotCallThis(); +} + void SharkBlock::do_new() { ShouldNotCallThis(); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Jun 05 19:11:26 2009 +0100 @@ -326,6 +326,7 @@ class SharkBlock : public ResourceObj { // checkcast and instanceof protected: virtual void do_instance_check(); + virtual bool maybe_do_instanceof_if(); // new and *newarray protected: diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Jun 05 19:11:26 2009 +0100 @@ -223,6 +223,21 @@ void SharkState::merge(SharkState* other // Safepointed status set_has_safepointed(this->has_safepointed() && other->has_safepointed()); +} + +void SharkState::replace_all(SharkValue* old_value, SharkValue* new_value) +{ + // Local variables + for (int i = 0; i < max_locals(); i++) { + if (local(i) == old_value) + set_local(i, new_value); + } + + // Expression stack + for (int i = 0; i < stack_depth(); i++) { + if (stack(i) == old_value) + set_stack(i, new_value); + } } void SharkState::decache_for_Java_call(ciMethod* callee) diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Jun 05 19:11:26 2009 +0100 @@ -187,6 +187,10 @@ class SharkState : public ResourceObj { llvm::BasicBlock* other_block, llvm::BasicBlock* this_block); + // Value replacement + public: + void replace_all(SharkValue* old_value, SharkValue* new_value); + // Cache and decache public: void decache_for_Java_call(ciMethod* callee); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 19:11:26 2009 +0100 @@ -772,8 +772,11 @@ void SharkTopLevelBlock::do_ret() } // All propagation of state from one block to the next (via -// dest->add_incoming) is handled by the next three methods -// (do_branch, do_if and do_switch) and by handle_exception. +// dest->add_incoming) is handled by these methods: +// do_branch +// do_if_helper +// do_switch +// handle_exception void SharkTopLevelBlock::do_branch(int successor_index) { @@ -795,16 +798,24 @@ void SharkTopLevelBlock::do_if(ICmpInst: llvm_a = a->jint_value(); llvm_b = b->jint_value(); } - + do_if_helper(p, llvm_b, llvm_a, current_state(), current_state()); +} + +void SharkTopLevelBlock::do_if_helper(ICmpInst::Predicate p, + Value* b, + Value* a, + SharkState* if_taken_state, + SharkState* not_taken_state) +{ SharkTopLevelBlock *if_taken = successor(ciTypeFlow::IF_TAKEN); SharkTopLevelBlock *not_taken = successor(ciTypeFlow::IF_NOT_TAKEN); builder()->CreateCondBr( - builder()->CreateICmp(p, llvm_a, llvm_b), + builder()->CreateICmp(p, a, b), if_taken->entry_block(), not_taken->entry_block()); - if_taken->add_incoming(current_state()); - not_taken->add_incoming(current_state()); + if_taken->add_incoming(if_taken_state); + not_taken->add_incoming(not_taken_state); } void SharkTopLevelBlock::do_switch() @@ -1164,40 +1175,48 @@ void SharkTopLevelBlock::do_call() current_state()->set_has_safepointed(true); } +bool SharkTopLevelBlock::static_subtype_check(ciKlass* check_klass, + ciKlass* object_klass) +{ + // If the class we're checking against is java.lang.Object + // then this is a no brainer. Apparently this can happen + // in reflective code... + if (check_klass == function()->env()->Object_klass()) + return true; + + // Perform a subtype check. NB in opto's code for this + // (GraphKit::static_subtype_check) it says that static + // interface types cannot be trusted, and if opto can't + // trust them then I assume we can't either. + if (!object_klass->is_interface()) { + if (object_klass == check_klass) + return true; + + if (object_klass->is_loaded() && check_klass->is_loaded()) { + if (object_klass->is_subtype_of(check_klass)) + return true; + } + } + + return false; +} + void SharkTopLevelBlock::do_instance_check() { // Get the class we're checking against bool will_link; ciKlass *check_klass = iter()->get_klass(will_link); - // If the class we're checking against is java.lang.Object - // then this is a no brainer. Apparently this can happen - // in reflective code... - if (check_klass == function()->env()->Object_klass()) { - do_optimized_instance_check(); - return; - } - // Get the class of the object we're checking ciKlass *object_klass = xstack(0)->type()->as_klass(); - // If the classes are defined enough now then we - // don't need a runtime check. NB opto's code for - // this (GraphKit::static_subtype_check) says we - // cannot trust static interface types yet, hence - // the extra check - if (!object_klass->is_interface()) { - if (object_klass == check_klass) { - do_optimized_instance_check(); - return; + // Can we optimize this check away? + if (static_subtype_check(check_klass, object_klass)) { + if (bc() == Bytecodes::_instanceof) { + pop(); + push(SharkValue::jint_constant(1)); } - - if (object_klass->is_loaded() && check_klass->is_loaded()) { - if (object_klass->is_subtype_of(check_klass)) { - do_optimized_instance_check(); - return; - } - } + return; } // Need to check this one at runtime @@ -1207,14 +1226,69 @@ void SharkTopLevelBlock::do_instance_che do_trapping_instance_check(check_klass); } -void SharkTopLevelBlock::do_optimized_instance_check() -{ - if (bc() == Bytecodes::_instanceof) { - pop(); - push(SharkValue::jint_constant(1)); - } -} - +bool SharkTopLevelBlock::maybe_do_instanceof_if() +{ + // Get the class we're checking against + bool will_link; + ciKlass *check_klass = iter()->get_klass(will_link); + + // If the class is unloaded then the instanceof + // cannot possibly succeed. + if (!will_link) + return false; + + // Keep a copy of the object we're checking + SharkValue *old_object = xstack(0); + + // Get the class of the object we're checking + ciKlass *object_klass = old_object->type()->as_klass(); + + // If the instanceof can be optimized away at compile time + // then any subsequent checkcasts will be too so we handle + // it normally. + if (static_subtype_check(check_klass, object_klass)) + return false; + + // Perform the instance check + do_full_instance_check(check_klass); + Value *result = pop()->jint_value(); + + // Create the casted object + SharkValue *new_object = SharkValue::create_generic( + check_klass, old_object->jobject_value(), old_object->zero_checked()); + + // Create two copies of the current state, one with the + // original object and one with all instances of the + // original object replaced with the new, casted object. + SharkState *new_state = current_state(); + SharkState *old_state = new_state->copy(); + new_state->replace_all(old_object, new_object); + + // Perform the check-and-branch + switch (iter()->next_bc()) { + case Bytecodes::_ifeq: + // branch if not an instance + do_if_helper( + ICmpInst::ICMP_EQ, + LLVMValue::jint_constant(0), result, + old_state, new_state); + break; + + case Bytecodes::_ifne: + // branch if an instance + do_if_helper( + ICmpInst::ICMP_NE, + LLVMValue::jint_constant(0), result, + new_state, old_state); + break; + + default: + ShouldNotReachHere(); + } + + return true; +} + void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -1238,7 +1312,6 @@ void SharkTopLevelBlock::do_full_instanc builder()->CreateICmpEQ(object, LLVMValue::null()), merge2, not_null); BasicBlock *null_block = builder()->GetInsertBlock(); - SharkState *null_state = current_state()->copy(); // Get the class we're checking against builder()->SetInsertPoint(not_null); @@ -1282,7 +1355,6 @@ void SharkTopLevelBlock::do_full_instanc // Second merge builder()->SetInsertPoint(merge2); - current_state()->merge(null_state, null_block, nonnull_block); PHINode *result = builder()->CreatePHI( SharkType::jint_type(), "result"); result->addIncoming(LLVMValue::jint_constant(IC_IS_NULL), null_block); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 19:11:26 2009 +0100 @@ -358,6 +358,11 @@ class SharkTopLevelBlock : public SharkB // if* private: + void do_if_helper(llvm::ICmpInst::Predicate p, + llvm::Value* b, + llvm::Value* a, + SharkState* if_taken_state, + SharkState* not_taken_state); void do_if(llvm::ICmpInst::Predicate p, SharkValue* b, SharkValue* a); // tableswitch and lookupswitch @@ -386,11 +391,12 @@ class SharkTopLevelBlock : public SharkB // checkcast and instanceof private: - void do_optimized_instance_check(); + bool static_subtype_check(ciKlass* check_klass, ciKlass* object_klass); void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(ciKlass* klass); void do_instance_check(); + bool maybe_do_instanceof_if(); // new and *newarray private: From gbenson at redhat.com Fri Jun 5 11:15:35 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 5 Jun 2009 19:15:35 +0100 Subject: Shark checkcast and instanceof improvements (part 3) Message-ID: <20090605181535.GA10309@redhat.com> Hi all, This commit adds special handling to instanceof instructions that are immediately followed by an ifeq or an ifne. The instructions are compiled as a pair, with the value checked by the instanceof annotated with updated type information in the branch of the if corresponding to the instanceof returning 1. This means that if the branch then contains a checkcast then that checkcast will be eliminated with a static check. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 8ba2783ba3b0 -r afa643fbffde ChangeLog --- a/ChangeLog Fri Jun 05 10:25:13 2009 -0400 +++ b/ChangeLog Fri Jun 05 19:11:26 2009 +0100 @@ -1,4 +1,33 @@ -2009-06-05 Omair Majid +2009-06-06 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::maybe_do_instanceof_if): New method. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_do_instanceof_if): New method. + (SharkBlock::parse_bytecode): Use the above for + instanceof immediately followed by ifeq or ifne. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_if_helper): New method. + (SharkTopLevelBlock::static_subtype_check): Likewise. + (SharkTopLevelBlock::maybe_do_instanceof_if): Likewise. + (SharkTopLevelBlock::do_optimized_instance_check): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_if_helper): New method. + (SharkTopLevelBlock::do_if): Use the above. + (SharkTopLevelBlock::static_subtype_check): New method. + (SharkTopLevelBlock::do_instance_check): Use the above. + (SharkTopLevelBlock::maybe_do_instanceof_if): New method. + (SharkTopLevelBlock::do_optimized_instance_check): Removed. + (SharkTopLevelBlock::do_full_instance_check): Removed + now-unnecessary state copy and merge. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::replace_all): New method. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::replace_all): Likewise. + +2009-06-06 Omair Majid * patches/icedtea-webstart.patch: Make javax.jnlp package visible to javac. diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jun 05 19:11:26 2009 +0100 @@ -825,8 +825,38 @@ do_call(); break; + case Bytecodes::_instanceof: + // This is a very common construct: + // + // if (object instanceof Klass) { + // something = (Klass) object; + // ... + // } + // + // which gets compiled to something like this: + // + // 28: aload 9 + // 30: instanceof + // 33: ifeq 52 + // 36: aload 9 + // 38: checkcast + // + // Handling both bytecodes at once allows us + // to eliminate the checkcast. + if (iter()->next_bci() < limit && + (iter()->next_bc() == Bytecodes::_ifeq || + iter()->next_bc() == Bytecodes::_ifne) && + (!UseLoopSafepoints || + iter()->next_get_dest() > iter()->next_bci())) { + if (maybe_do_instanceof_if()) { + iter()->next(); + if (SharkTraceBytecodes) + tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); + break; + } + } + // fall through case Bytecodes::_checkcast: - case Bytecodes::_instanceof: do_instance_check(); break; @@ -1225,6 +1255,11 @@ ShouldNotCallThis(); } +bool SharkBlock::maybe_do_instanceof_if() +{ + ShouldNotCallThis(); +} + void SharkBlock::do_new() { ShouldNotCallThis(); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Jun 05 19:11:26 2009 +0100 @@ -326,6 +326,7 @@ // checkcast and instanceof protected: virtual void do_instance_check(); + virtual bool maybe_do_instanceof_if(); // new and *newarray protected: diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Jun 05 19:11:26 2009 +0100 @@ -225,6 +225,21 @@ set_has_safepointed(this->has_safepointed() && other->has_safepointed()); } +void SharkState::replace_all(SharkValue* old_value, SharkValue* new_value) +{ + // Local variables + for (int i = 0; i < max_locals(); i++) { + if (local(i) == old_value) + set_local(i, new_value); + } + + // Expression stack + for (int i = 0; i < stack_depth(); i++) { + if (stack(i) == old_value) + set_stack(i, new_value); + } +} + void SharkState::decache_for_Java_call(ciMethod* callee) { assert(function() && method(), "you cannot decache here"); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Jun 05 19:11:26 2009 +0100 @@ -187,6 +187,10 @@ llvm::BasicBlock* other_block, llvm::BasicBlock* this_block); + // Value replacement + public: + void replace_all(SharkValue* old_value, SharkValue* new_value); + // Cache and decache public: void decache_for_Java_call(ciMethod* callee); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 19:11:26 2009 +0100 @@ -772,8 +772,11 @@ } // 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. +// dest->add_incoming) is handled by these methods: +// do_branch +// do_if_helper +// do_switch +// handle_exception void SharkTopLevelBlock::do_branch(int successor_index) { @@ -795,16 +798,24 @@ llvm_a = a->jint_value(); llvm_b = b->jint_value(); } + do_if_helper(p, llvm_b, llvm_a, current_state(), current_state()); +} +void SharkTopLevelBlock::do_if_helper(ICmpInst::Predicate p, + Value* b, + Value* a, + SharkState* if_taken_state, + SharkState* not_taken_state) +{ SharkTopLevelBlock *if_taken = successor(ciTypeFlow::IF_TAKEN); SharkTopLevelBlock *not_taken = successor(ciTypeFlow::IF_NOT_TAKEN); builder()->CreateCondBr( - builder()->CreateICmp(p, llvm_a, llvm_b), + builder()->CreateICmp(p, a, b), if_taken->entry_block(), not_taken->entry_block()); - if_taken->add_incoming(current_state()); - not_taken->add_incoming(current_state()); + if_taken->add_incoming(if_taken_state); + not_taken->add_incoming(not_taken_state); } void SharkTopLevelBlock::do_switch() @@ -1164,40 +1175,48 @@ current_state()->set_has_safepointed(true); } +bool SharkTopLevelBlock::static_subtype_check(ciKlass* check_klass, + ciKlass* object_klass) +{ + // If the class we're checking against is java.lang.Object + // then this is a no brainer. Apparently this can happen + // in reflective code... + if (check_klass == function()->env()->Object_klass()) + return true; + + // Perform a subtype check. NB in opto's code for this + // (GraphKit::static_subtype_check) it says that static + // interface types cannot be trusted, and if opto can't + // trust them then I assume we can't either. + if (!object_klass->is_interface()) { + if (object_klass == check_klass) + return true; + + if (object_klass->is_loaded() && check_klass->is_loaded()) { + if (object_klass->is_subtype_of(check_klass)) + return true; + } + } + + return false; +} + void SharkTopLevelBlock::do_instance_check() { // Get the class we're checking against bool will_link; ciKlass *check_klass = iter()->get_klass(will_link); - // If the class we're checking against is java.lang.Object - // then this is a no brainer. Apparently this can happen - // in reflective code... - if (check_klass == function()->env()->Object_klass()) { - do_optimized_instance_check(); - return; - } - // Get the class of the object we're checking ciKlass *object_klass = xstack(0)->type()->as_klass(); - // If the classes are defined enough now then we - // don't need a runtime check. NB opto's code for - // this (GraphKit::static_subtype_check) says we - // cannot trust static interface types yet, hence - // the extra check - if (!object_klass->is_interface()) { - if (object_klass == check_klass) { - do_optimized_instance_check(); - return; + // Can we optimize this check away? + if (static_subtype_check(check_klass, object_klass)) { + if (bc() == Bytecodes::_instanceof) { + pop(); + push(SharkValue::jint_constant(1)); } - - if (object_klass->is_loaded() && check_klass->is_loaded()) { - if (object_klass->is_subtype_of(check_klass)) { - do_optimized_instance_check(); - return; - } - } + return; } // Need to check this one at runtime @@ -1207,14 +1226,69 @@ do_trapping_instance_check(check_klass); } -void SharkTopLevelBlock::do_optimized_instance_check() +bool SharkTopLevelBlock::maybe_do_instanceof_if() { - if (bc() == Bytecodes::_instanceof) { - pop(); - push(SharkValue::jint_constant(1)); + // Get the class we're checking against + bool will_link; + ciKlass *check_klass = iter()->get_klass(will_link); + + // If the class is unloaded then the instanceof + // cannot possibly succeed. + if (!will_link) + return false; + + // Keep a copy of the object we're checking + SharkValue *old_object = xstack(0); + + // Get the class of the object we're checking + ciKlass *object_klass = old_object->type()->as_klass(); + + // If the instanceof can be optimized away at compile time + // then any subsequent checkcasts will be too so we handle + // it normally. + if (static_subtype_check(check_klass, object_klass)) + return false; + + // Perform the instance check + do_full_instance_check(check_klass); + Value *result = pop()->jint_value(); + + // Create the casted object + SharkValue *new_object = SharkValue::create_generic( + check_klass, old_object->jobject_value(), old_object->zero_checked()); + + // Create two copies of the current state, one with the + // original object and one with all instances of the + // original object replaced with the new, casted object. + SharkState *new_state = current_state(); + SharkState *old_state = new_state->copy(); + new_state->replace_all(old_object, new_object); + + // Perform the check-and-branch + switch (iter()->next_bc()) { + case Bytecodes::_ifeq: + // branch if not an instance + do_if_helper( + ICmpInst::ICMP_EQ, + LLVMValue::jint_constant(0), result, + old_state, new_state); + break; + + case Bytecodes::_ifne: + // branch if an instance + do_if_helper( + ICmpInst::ICMP_NE, + LLVMValue::jint_constant(0), result, + new_state, old_state); + break; + + default: + ShouldNotReachHere(); } + + return true; } - + void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -1238,7 +1312,6 @@ builder()->CreateICmpEQ(object, LLVMValue::null()), merge2, not_null); BasicBlock *null_block = builder()->GetInsertBlock(); - SharkState *null_state = current_state()->copy(); // Get the class we're checking against builder()->SetInsertPoint(not_null); @@ -1282,7 +1355,6 @@ // Second merge builder()->SetInsertPoint(merge2); - current_state()->merge(null_state, null_block, nonnull_block); PHINode *result = builder()->CreatePHI( SharkType::jint_type(), "result"); result->addIncoming(LLVMValue::jint_constant(IC_IS_NULL), null_block); diff -r 8ba2783ba3b0 -r afa643fbffde ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 10:25:13 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 19:11:26 2009 +0100 @@ -358,6 +358,11 @@ // if* private: + void do_if_helper(llvm::ICmpInst::Predicate p, + llvm::Value* b, + llvm::Value* a, + SharkState* if_taken_state, + SharkState* not_taken_state); void do_if(llvm::ICmpInst::Predicate p, SharkValue* b, SharkValue* a); // tableswitch and lookupswitch @@ -386,11 +391,12 @@ // checkcast and instanceof private: - void do_optimized_instance_check(); + bool static_subtype_check(ciKlass* check_klass, ciKlass* object_klass); void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(ciKlass* klass); void do_instance_check(); + bool maybe_do_instanceof_if(); // new and *newarray private: From omajid at redhat.com Fri Jun 5 12:20:21 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 05 Jun 2009 15:20:21 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <20090604214722.GA29542@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> <4A27DC10.9070600@redhat.com> <20090604214722.GA29542@redhat.com> Message-ID: <4A296FF5.2020703@redhat.com> Deepak Bhole wrote: > > Yep, looks good. Please go ahead and apply. One minor thing you may want > to consider btw... put a securitymanager AllPermissions() check inside > setInitialArguments(). Only trusted code would have all perms. The > reason for this is that initialArgs are used to launch another process, > and one could in theory perhaps mangle them. Again though, this is > totally optional because I honestly cannot come up with any way to > exploit it, given how the code is laid out. So I leave it upto you. > Updated version attached. A couple of changes. I added the security manager check. I also added a check for the arguments being passed to the java process (based on the list at [1]). I also noticed that the file name was being passed to Netx twice (didnt cause any issues, just seemed strange) and fixed that. Thanks again for taking the time to review the patch! ChangeLog: 2009-06-04 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (needsNewJVM): New function. Returns true if the JNLP file requires creating a new JVM. (getNewVMArgs): New function. Returns arguments to pass to the new JVM. * rt/net/sourceforge/jnlp/JREDesc.java (getVMArgs): Fix javadoc to reflect that return value can be null. * rt/net/sourceforge/jnlp/Launcher.java (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to Netx. Try to use the local file to launch this instance if possible. (launchExternal): Delegate to new launchExternal. (launchExternal): New method. Take in arguments to pass to the JVM and arguments to pass to Netx. Launch Netx with the with the appropriate arguments. (launchApplication): If needed, launch a new JVM and pass along the Netx arguments. * rt/net/sourceforge/jnlp/Parser.java: (getJRE): Call checkVMArgs to check 'java-vm-args' for security. If that fails, assume 'java-vm-args' is null. (checkVMArgs): New method. Check that the vmArgs variable contains safe arguments only. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * rt/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. Set initial arguments. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Add forksAllowed to store whether creating a new JVM is allowed. Add initialArguments to store the arguments to Netx. (getForksAllowed): New function. Check if creating a new JVM is allowed. (setForksAllowed): New function. Set whether creating a JVM is allowed. (setInitialArguments): New function. Store the arguments passed to Netx. (getInitialArguments): New function. Return the arguments passed to Netx. Cheers, Omair [1] http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#resources -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 16903 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090605/ec161351/netx-jvm-args.patch From bugzilla-daemon at icedtea.classpath.org Sat Jun 6 14:20:46 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Jun 2009 21:20:46 +0000 Subject: [Bug 324] Shark assert(is_jarray(), "should be") during Java2Demo demos.Mix.JavaMedia Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=324 ------- Comment #2 from xerxes at zafena.se 2009-06-06 21:20 ------- When running on a more recent shar? without assertions the error log seems to indicate problems for shark to compile gervill. The demos.Mix.JavaMedia are the only demo in Java2Demo that plays sound. java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.5-rafa643fbffde) (build 1.6.0_0-b16) OpenJDK Shark VM (build 14.0-b15, mixed mode) llvm used are 26svn # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (ciObjectFactory.cpp:335), pid=27871, tid=2478779248 # Error: ShouldNotReachHere() # # JRE version: 6.0-b16 # Java VM: OpenJDK Shark VM (14.0-b15 mixed mode linux-i386 ) # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # --------------- T H R E A D --------------- Current thread (0xb7e8cfe0): JavaThread "CompilerThread0" daemon [_thread_in_vm, id=27877, stack(0x93b73000,0x93bf3000)] Java stack: stack not set up Current CompileTask: shark:587 ! com.sun.media.sound.SoftMainMixer.processAudioBuffers()V (1611 bytes) -- 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 Jun 6 14:28:25 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Jun 2009 21:28:25 +0000 Subject: [Bug 300] shark fails to build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=300 xerxes at zafena.se changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED ------- Comment #22 from xerxes at zafena.se 2009-06-06 21:28 ------- Shark have been updated to compile against llvm 2.4 2.5 2.6 and future llvm versions. http://icedtea.classpath.org/hg/icedtea6/rev/c7860ca7b19e bug closed! -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Sun Jun 7 06:27:26 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 07 Jun 2009 13:27:26 +0000 Subject: [Bug 347] New: IcedTea plugin, JS function can't converted to JSObject Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=347 Summary: IcedTea plugin, JS function can't converted to JSObject Product: IcedTea Version: unspecified Platform: PC URL: http://dev.gumboo.com:8880/demo2/index.html OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: georgopoulos.georgios at gmail.com I can't pass a JS function to a Java applet. The error message says that the function can converted to JSObject. The code is: function openFileChooser() { var desktop = document.getElementById('webgears').getDesktop(); desktop.openFiles( function(files) { for(var i = 0; i < files.length; i++) { uploadFile(files[i]); } }, null, false); } Demo: http://dev.gumboo.com:8880/demo2/index.html (please view source to see the JS code). It works with: Java(TM) Plug-in 1.6.0_14 File name: libnpjp2.so The next generation Java plug-in for Mozilla browsers. OS Linux (Fedoa 10), Firefox 3.0.10, Iced Tea: [ggeorg at localhost ~]$ java -version java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.5) (fedora-18.b16.fc10-i386) OpenJDK Server VM (build 14.0-b15, mixed mode) Thanks, George. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From gbenson at redhat.com Mon Jun 8 03:01:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 08 Jun 2009 10:01:18 +0000 Subject: changeset in /hg/icedtea6: 2009-06-08 Gary Benson changeset 4a81a23f1da6 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4a81a23f1da6 description: 2009-06-08 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::get_virtual_callee): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Catch invokeinterface edge case. (SharkTopLevelBlock::get_interface_callee): Removed code to handle invokeinterface edge case. (SharkTopLevelBlock::get_virtual_callee): Removed. diffstat: 3 files changed, 26 insertions(+), 104 deletions(-) ChangeLog | 11 + ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 117 +-------------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 diffs (201 lines): diff -r afa643fbffde -r 4a81a23f1da6 ChangeLog --- a/ChangeLog Fri Jun 05 19:11:26 2009 +0100 +++ b/ChangeLog Mon Jun 08 05:59:35 2009 -0400 @@ -1,3 +1,14 @@ 2009-06-06 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::get_virtual_callee): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Catch invokeinterface + edge case. + (SharkTopLevelBlock::get_interface_callee): Removed code to + handle invokeinterface edge case. + (SharkTopLevelBlock::get_virtual_callee): Removed. + 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r afa643fbffde -r 4a81a23f1da6 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 19:11:26 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Jun 08 05:59:35 2009 -0400 @@ -97,6 +97,16 @@ void SharkTopLevelBlock::scan_for_traps( method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); + // Handle 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 legal corner case in the spec, and while javac does not + // generate this code there's no reason a compliant Java + // compiler should not. See cpCacheOop.cpp and + // interpreterRuntime.cpp for more details. + if (method->holder() == function()->env()->Object_klass()) + Unimplemented(); + // Continue to the check index = iter()->get_method_index(); break; @@ -900,107 +910,19 @@ Value *SharkTopLevelBlock::get_virtual_c "callee"); } -// Interpreter-style virtual call lookup -Value* SharkTopLevelBlock::get_virtual_callee(Value *cache, - SharkValue *receiver) -{ - BasicBlock *final = function()->CreateBlock("final"); - BasicBlock *not_final = function()->CreateBlock("not_final"); - BasicBlock *got_callee = function()->CreateBlock("got_callee"); - - Value *flags = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::flags_offset(), - SharkType::intptr_type(), - "flags"); - - const int mask = 1 << ConstantPoolCacheEntry::vfinalMethod; - builder()->CreateCondBr( - builder()->CreateICmpNE( - builder()->CreateAnd(flags, LLVMValue::intptr_constant(mask)), - LLVMValue::intptr_constant(0)), - final, not_final); - - // For final methods f2 is the actual address of the method - builder()->SetInsertPoint(final); - Value *final_callee = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::methodOop_type(), - "final_callee"); - builder()->CreateBr(got_callee); - - // For non-final methods f2 is the index into the vtable - builder()->SetInsertPoint(not_final); - Value *klass = builder()->CreateValueOfStructEntry( - receiver->jobject_value(), - in_ByteSize(oopDesc::klass_offset_in_bytes()), - SharkType::jobject_type(), - "klass"); - - Value *index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - - Value *nonfinal_callee = builder()->CreateLoad( - builder()->CreateArrayAddress( - klass, - SharkType::methodOop_type(), - vtableEntry::size() * wordSize, - in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - index), - "nonfinal_callee"); - builder()->CreateBr(got_callee); - - builder()->SetInsertPoint(got_callee); - PHINode *callee = builder()->CreatePHI( - SharkType::methodOop_type(), "callee"); - callee->addIncoming(final_callee, final); - callee->addIncoming(nonfinal_callee, not_final); - - return callee; -} - -// Interpreter-style interface call lookup +// Interface calls are handled here Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver) { SharkConstantPool constants(this); Value *cache = constants.cache_entry_at(iter()->get_method_index()); - BasicBlock *hacky = function()->CreateBlock("hacky"); - BasicBlock *normal = function()->CreateBlock("normal"); BasicBlock *loop = function()->CreateBlock("loop"); BasicBlock *got_null = function()->CreateBlock("got_null"); BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *next = function()->CreateBlock("next"); BasicBlock *got_entry = function()->CreateBlock("got_entry"); - BasicBlock *got_callee = function()->CreateBlock("got_callee"); - - Value *flags = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::flags_offset(), - SharkType::intptr_type(), - "flags"); - - const int mask = 1 << ConstantPoolCacheEntry::methodInterface; - builder()->CreateCondBr( - builder()->CreateICmpNE( - builder()->CreateAnd(flags, LLVMValue::intptr_constant(mask)), - LLVMValue::intptr_constant(0)), - hacky, normal); - - // 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. - builder()->SetInsertPoint(hacky); - Value *hacky_callee = get_virtual_callee(cache, receiver); - BasicBlock *got_hacky = builder()->GetInsertBlock(); - builder()->CreateBr(got_callee); // Locate the receiver's itable - builder()->SetInsertPoint(normal); Value *object_klass = builder()->CreateValueOfStructEntry( receiver->jobject_value(), in_ByteSize(oopDesc::klass_offset_in_bytes()), SharkType::jobject_type(), @@ -1038,11 +960,12 @@ Value* SharkTopLevelBlock::get_interface SharkType::jobject_type(), "iklass"); + BasicBlock *loop_entry = builder()->GetInsertBlock(); builder()->CreateBr(loop); builder()->SetInsertPoint(loop); PHINode *itable_entry_addr = builder()->CreatePHI( SharkType::intptr_type(), "itable_entry_addr"); - itable_entry_addr->addIncoming(itable_start, normal); + itable_entry_addr->addIncoming(itable_start, loop_entry); Value *itable_entry = builder()->CreateIntToPtr( itable_entry_addr, SharkType::itableOffsetEntry_type(), "itable_entry"); @@ -1091,7 +1014,7 @@ Value* SharkTopLevelBlock::get_interface SharkType::intptr_type(), "index"); - Value *normal_callee = builder()->CreateLoad( + return builder()->CreateLoad( builder()->CreateIntToPtr( builder()->CreateAdd( builder()->CreateAdd( @@ -1106,17 +1029,7 @@ Value* SharkTopLevelBlock::get_interface LLVMValue::intptr_constant( itableMethodEntry::method_offset_in_bytes())), PointerType::getUnqual(SharkType::methodOop_type())), - "normal_callee"); - BasicBlock *got_normal = builder()->GetInsertBlock(); - builder()->CreateBr(got_callee); - - builder()->SetInsertPoint(got_callee); - PHINode *callee = builder()->CreatePHI( - SharkType::methodOop_type(), "callee"); - callee->addIncoming(hacky_callee, got_hacky); - callee->addIncoming(normal_callee, got_normal); - - return callee; + "callee"); } void SharkTopLevelBlock::do_call() diff -r afa643fbffde -r 4a81a23f1da6 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 19:11:26 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Jun 08 05:59:35 2009 -0400 @@ -383,8 +383,6 @@ class SharkTopLevelBlock : public SharkB llvm::Value* get_direct_callee(ciMethod* method); llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); - - llvm::Value* get_virtual_callee(llvm::Value* cache, SharkValue* receiver); llvm::Value* get_interface_callee(SharkValue* receiver); void do_call(); From gbenson at redhat.com Mon Jun 8 03:08:17 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 8 Jun 2009 11:08:17 +0100 Subject: Shark invokeinterface improvements (part 1) Message-ID: <20090608100817.GA5081@redhat.com> Hi all, This commit removes a huge amount of code that handles an edge case for invokeinterface that only occurs with broken (IMO) but spec-compliant bytecode. I want to refactor invokeinterface and this code was making it a pain in the ass. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r a4f54a28260b ChangeLog --- a/ChangeLog Fri Jun 05 19:19:36 2009 +0100 +++ b/ChangeLog Mon Jun 08 11:04:42 2009 +0100 @@ -1,3 +1,14 @@ +2009-06-08 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::get_virtual_callee): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Catch invokeinterface + edge case. + (SharkTopLevelBlock::get_interface_callee): Removed code to + handle invokeinterface edge case. + (SharkTopLevelBlock::get_virtual_callee): Removed. + 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r a4f54a28260b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 19:19:36 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Jun 08 11:04:42 2009 +0100 @@ -97,6 +97,16 @@ method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); + // Handle 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 legal corner case in the spec, and while javac does not + // generate this code there's no reason a compliant Java + // compiler should not. See cpCacheOop.cpp and + // interpreterRuntime.cpp for more details. + if (method->holder() == function()->env()->Object_klass()) + Unimplemented(); + // Continue to the check index = iter()->get_method_index(); break; @@ -900,107 +910,19 @@ "callee"); } -// Interpreter-style virtual call lookup -Value* SharkTopLevelBlock::get_virtual_callee(Value *cache, - SharkValue *receiver) -{ - BasicBlock *final = function()->CreateBlock("final"); - BasicBlock *not_final = function()->CreateBlock("not_final"); - BasicBlock *got_callee = function()->CreateBlock("got_callee"); - - Value *flags = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::flags_offset(), - SharkType::intptr_type(), - "flags"); - - const int mask = 1 << ConstantPoolCacheEntry::vfinalMethod; - builder()->CreateCondBr( - builder()->CreateICmpNE( - builder()->CreateAnd(flags, LLVMValue::intptr_constant(mask)), - LLVMValue::intptr_constant(0)), - final, not_final); - - // For final methods f2 is the actual address of the method - builder()->SetInsertPoint(final); - Value *final_callee = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::methodOop_type(), - "final_callee"); - builder()->CreateBr(got_callee); - - // For non-final methods f2 is the index into the vtable - builder()->SetInsertPoint(not_final); - Value *klass = builder()->CreateValueOfStructEntry( - receiver->jobject_value(), - in_ByteSize(oopDesc::klass_offset_in_bytes()), - SharkType::jobject_type(), - "klass"); - - Value *index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - - Value *nonfinal_callee = builder()->CreateLoad( - builder()->CreateArrayAddress( - klass, - SharkType::methodOop_type(), - vtableEntry::size() * wordSize, - in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - index), - "nonfinal_callee"); - builder()->CreateBr(got_callee); - - builder()->SetInsertPoint(got_callee); - PHINode *callee = builder()->CreatePHI( - SharkType::methodOop_type(), "callee"); - callee->addIncoming(final_callee, final); - callee->addIncoming(nonfinal_callee, not_final); - - return callee; -} - -// Interpreter-style interface call lookup +// Interface calls are handled here Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver) { SharkConstantPool constants(this); Value *cache = constants.cache_entry_at(iter()->get_method_index()); - BasicBlock *hacky = function()->CreateBlock("hacky"); - BasicBlock *normal = function()->CreateBlock("normal"); BasicBlock *loop = function()->CreateBlock("loop"); BasicBlock *got_null = function()->CreateBlock("got_null"); BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *next = function()->CreateBlock("next"); BasicBlock *got_entry = function()->CreateBlock("got_entry"); - BasicBlock *got_callee = function()->CreateBlock("got_callee"); - - Value *flags = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::flags_offset(), - SharkType::intptr_type(), - "flags"); - - const int mask = 1 << ConstantPoolCacheEntry::methodInterface; - builder()->CreateCondBr( - builder()->CreateICmpNE( - builder()->CreateAnd(flags, LLVMValue::intptr_constant(mask)), - LLVMValue::intptr_constant(0)), - hacky, normal); - - // 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. - builder()->SetInsertPoint(hacky); - Value *hacky_callee = get_virtual_callee(cache, receiver); - BasicBlock *got_hacky = builder()->GetInsertBlock(); - builder()->CreateBr(got_callee); // Locate the receiver's itable - builder()->SetInsertPoint(normal); Value *object_klass = builder()->CreateValueOfStructEntry( receiver->jobject_value(), in_ByteSize(oopDesc::klass_offset_in_bytes()), SharkType::jobject_type(), @@ -1038,11 +960,12 @@ SharkType::jobject_type(), "iklass"); + BasicBlock *loop_entry = builder()->GetInsertBlock(); builder()->CreateBr(loop); builder()->SetInsertPoint(loop); PHINode *itable_entry_addr = builder()->CreatePHI( SharkType::intptr_type(), "itable_entry_addr"); - itable_entry_addr->addIncoming(itable_start, normal); + itable_entry_addr->addIncoming(itable_start, loop_entry); Value *itable_entry = builder()->CreateIntToPtr( itable_entry_addr, SharkType::itableOffsetEntry_type(), "itable_entry"); @@ -1091,7 +1014,7 @@ SharkType::intptr_type(), "index"); - Value *normal_callee = builder()->CreateLoad( + return builder()->CreateLoad( builder()->CreateIntToPtr( builder()->CreateAdd( builder()->CreateAdd( @@ -1106,17 +1029,7 @@ LLVMValue::intptr_constant( itableMethodEntry::method_offset_in_bytes())), PointerType::getUnqual(SharkType::methodOop_type())), - "normal_callee"); - BasicBlock *got_normal = builder()->GetInsertBlock(); - builder()->CreateBr(got_callee); - - builder()->SetInsertPoint(got_callee); - PHINode *callee = builder()->CreatePHI( - SharkType::methodOop_type(), "callee"); - callee->addIncoming(hacky_callee, got_hacky); - callee->addIncoming(normal_callee, got_normal); - - return callee; + "callee"); } void SharkTopLevelBlock::do_call() diff -r a4f54a28260b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 19:19:36 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Jun 08 11:04:42 2009 +0100 @@ -383,8 +383,6 @@ llvm::Value* get_direct_callee(ciMethod* method); llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); - - llvm::Value* get_virtual_callee(llvm::Value* cache, SharkValue* receiver); llvm::Value* get_interface_callee(SharkValue* receiver); void do_call(); From gnu_andrew at member.fsf.org Mon Jun 8 09:13:24 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 8 Jun 2009 17:13:24 +0100 Subject: RFC: Fix --enable-hg in IcedTea6 In-Reply-To: <4A267B72.8040806@redhat.com> References: <4A23F568.4040900@redhat.com> <17c6771e0906010851r22114970xdb3ed983f186799c@mail.gmail.com> <4A240268.5020002@redhat.com> <17c6771e0906011018v127a02e1pf0b0ed03f593091e@mail.gmail.com> <4A267B72.8040806@redhat.com> Message-ID: <17c6771e0906080913j45ac74cah78d7ead827bb4c2f@mail.gmail.com> 2009/6/3 Omair Majid : > Andrew John Hughes wrote: >> >> 2009/6/1 Omair Majid : >>> >>> Andrew John Hughes wrote: >>>> >>>> 2009/6/1 Omair Majid : >>>>> >>>>> Hi, >>>>> >>>>> Trying to build IcedTea6 with "--enable-hg --with-hg-revision=jdk6-b16" >>>>> fails when applying the patches, even though jdk6-b16 is a known good >>>>> build. >>>>> The issues appears to be that the Makefile removes the old hotspot only >>>>> if >>>>> the openjdk directory doesn't already exist. >>>>> >>>>> The attached patch checks USE_HG and then removes the hotspot directory >>>>> so >>>>> it can be replaced with HS14. >>>>> >>>>> ChangeLog: >>>>> 2009-06-01 ?Omair Majid ? >>>>> >>>>> ?* Makefile.am (stamps/extract.stamp): Remove hotspot if using >>>>> ?--enable-hg and an alternate hotspot build. >>>>> >>>>> Can someone please review the patch? >>>>> >>>>> Cheers, >>>>> Omair >>>>> >>>> The presumption was that anyone wanting to use Mercurial as a source >>>> wanted the whole thing. >>> >>> I see. What about the patches then? Should we apply patches from the >>> original hotspot? Or leave out the hotspot patches completely? >>> >> >> Sorry, I should have been more clear. ?I was just explaining why the >> current status quo is as it is. ?Changing it as you say is the right >> thing to do. ?Things are different in 7 (we don't replace HotSpot, >> there are a heck of a lot more forests) so it makes more sense to use >> a pristine checkout. >> >> BTW, I wouldn't worry too much about --enable-hg not building. ?It's >> really there for people who want to live life on the edge i.e. if you >> want to use live Mercurial sources to build, you should know what >> you're letting yourself in for :) > > Yeah, that's true. I would expect occasional bugs and IcedTea lagging behind > patches. But failing to build completely with a known good revision? > >> Again, it's a lot more useful with 7 because there are lots of rapidly >> changing upstream forests. >> > Oh. That makes a lot of sense. Should we remove --enable-hg from 6? > No. While the only real value in --enable-hg --with-hg-revision=jdk6-b16 is testing, the more general default of using tip is useful for testing stuff in hg but not yet in a tarball. >>>> I don't see how the attached patch can work. ?This would stop the >>>> hotspot directory not being removed when Mercurial is disabled, and >>>> doesn't do anything about the if block which checks for the openjdk >>>> directory. >>> >>> Err...too many negatives in that sentence, so apologies if I >>> misunderstand >>> something. >> >> Sorry on my part :) >> > No worries. > >> The patch works (as in I can do a 'make patch' with this change >>> >>> applied and everything works) >> >> With what configuration options? Do both non-hg and hg builds still work? >> Does a full build work? > > I did try those options with the old patch. See blow for the new list. > >> >> . If mercurial is disabled, it does nothing - >>> >>> it only comes into play if --enable-hg is used. In that case, it deletes >>> the >>> hotspot directory so the alternate hotspot tarball is used. >> >> This is my point; we should always delete the hotspot directory and >> use an alternate tarball if alternate HotSpot is turned on (which it >> is by default). ?Looking at this, it will stop HotSpot being replaced >> for a normal build and we'll end up with hs11 and broken patches... >> >>> Currently >>> hotspot is only replaced if there is no openjdk directory. In case of >>> --enable-hg, there is, so hotspot wasnt being replaced. >>> The patch explicitly >>> rm -rf's the old hotspot direcotry so it is replaced with HS14. >> >> Right, but that should happen, hg or no hg. ?With your patch, it's only >> with hg. >> >>> Anyway, the >>> entire point is moot if the purpose of --enable-hg is to provide the >>> unmodified hotspot. >> >> In the case of 6, I think we should still replace HotSpot. >> >>>> stamps/extract.stamp: stamps/download.stamp >>>> if OPENJDK_SRC_DIR_FOUND >>>> ? ? ? cp -a $(OPENJDK_SRC_DIR) openjdk >>>> else >>>> ? ? ? if ! test -d openjdk ; \ >>>> ? ? ? then \ >>>> ? ? ? ? mkdir openjdk ; \ >>>> ? ? ? ? $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ >>>> ? ? ? ? chmod -R ug+w openjdk ; \ >>>> ? ? ? ? if test "x${HSBUILD}" != "xoriginal"; then \ >>>> ? ? ? ? ? rm -rf openjdk/hotspot ; \ >>>> ? ? ? ? fi ; \ >>>> ? ? ? ? sh $(abs_top_srcdir)/fsg.sh ; \ >>>> ? ? ? fi >>>> if WITH_ALT_HSBUILD >>>> ? ? ? if test -e ${HOTSPOT_SRC_ZIP} ; \ >>>> ? ? ? then \ >>>> ? ? ? ? if ! test -d openjdk/hotspot ; \ >>>> ? ? ? ? then \ >>>> ? ? ? ? ? $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ >>>> ? ? ? ? ? chmod -R ug+w master-* ; \ >>>> ? ? ? ? ? mv master-$$($(AWK) 'version==$$1 {print $$2}' >>>> version=$(HSBUILD) \ >>>> ? ? ? ? ? ? $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ >>>> ? ? ? ? fi ; \ >>>> ? ? ? fi >>>> endif >>>> endif >>>> >>>> The simplest solution is probably to add an additional target for the >>>> HotSpot replacement so it isn't so tightly related to extraction. >>> >>> That makes sense, I will see what I can do. >>> >> >> I think it would make the whole thing less confusing and easier to work >> on. >> Thanks. > > I got a patch that I *think* works. Here are the configurations I tested: > > Just 'make patch' > ./autogen.sh && ./configure && make patch > ./autogen.sh && ./configure --enable-hg --with-hg-revision=jdk6-b16 && make > patch > ./autogen.sh && ./configure --with-openjdk ?&& make patch > ./autogen.sh && ./configure --with-openjdk && make replace-hotspot > ./autogen.sh && ./configure --with-openjdk --disable-docs && make patch > ./autogen.sh && ./configure --enable-hg --with-hg-revision=jdk6-b16 > --with-openjdk --disable-docs && make patch > ./autogen.sh && ./configure --enable-zero && make patch > ./autogen.sh && ./configure --enable-zero --enable-shark && make patch > ./autogen.sh && ./configure --enable-plugin --enable-pulse-java > --enable-visualvm --enable-openjdk-cross-compilation --enable-zero > --enable-shark --enable-systemtap --enable-cacao ?&& make patch > > Full Build: > ./autogen.sh && ./configure && make > ./autogen.sh && ./configure --with-openjdk --disable-docs && make > > > ./autogen.sh && ./configure --with-hotspot-build=original && make patch > failed just like it does with the current Makefile.am (trying to apply > icedtea-shark.patch) > > > ChangeLog: > 2009-06-03 ?Omair Majid ? > > ? ?* Makefile.am > ? ?(stamps/ports.stamp): Depend on stamps/replace-hotspot.stamp instead > ? ?of stamps/extract.stamp. > ? ?(stamps/extract.stamp): Dont replace hotspot. > ? ?(stamps/replace-hotspot.stamp): New target. Replace hotspot without > ? ?assuming anything about the build. > ? ?(clean-replace-hotspot): New target. > ? ?(stamps/patch-fsg.stamp): Depend on stamps/replace-hotspot.stamp > ? ?instead of stamps/extract.stamp. > ? ?(stamps/hotspot-tools-source-files.txt): Likewise. > ? ?(rt-source-files.txt): Likewise. > ? ?(stamps/cacao.stamp): Likewise. > ? ?(stamps/visualvm.stamp): Likewise. > ? ?(stamps/nbplatform.stamp): Likewise. > ? ?(replace-hotspot): New alias for stamps/replace-hotspot.stamp. > Looks ok. Please commit. > Cheers, > Omair > 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 omajid at redhat.com Mon Jun 8 09:54:02 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 08 Jun 2009 12:54:02 -0400 Subject: RFC: Netx - Parser support for shortcut, association and related-content elements Message-ID: <4A2D422A.8090202@redhat.com> Hi, The attached patch adds support to the JNLP parser for parsing association, shortcut and related-content elements from the JNLP file. ChangeLog: 2009-06-08 Omair Majid * rt/net/sourceforge/jnlp/AssociationDesc.java: New file. (AssociationDesc): New function. Create an association descriptor. (getExtensions): New function. Get the extensions for this association. (getMimeType): New function. Get the mimetype for this association. (checkMimeType): New function. * rt/net/sourceforge/jnlp/InformationDesc.java (getAssociations): New function. Get the associations. (getShortcut): New function. Get the shortcut. (getRelatedContents): New function. Get the related-contents. * rt/net/sourceforge/jnlp/MenuDesc.java: New file. (MenuDesc): New function. (getSubMenu): New function. Get the submenu for this menu descriptor. * rt/net/sourceforge/jnlp/Parser.java (getInformationDesc): Parse "assocation", "shortcut" and "related-content" elements. (getAssociation): New function. Parse the association node to create a AssociationDesc. (getShortcut): New function. Parse the shortcut node to create a ShortcutDesc. (getMenu): New function. Parse a menu node to create a MenuDesc. (getRelatedContent): New function. Parse a related-content node to create a RelatedContentDesc. * rt/net/sourceforge/jnlp/RelatedContentDesc.java (RelatedContentDesc): New function. (setTitle): New function. Set the title of this content. (getTitle): New function. Get the title of this content. (setDescription): New function. Set the description of this content. (getDescription): New function. Get the description of this content. (getLocation): New function. Get the location of this content. (setIconDesc): New function. Set the icon descriptor for this content. (getIcon): Get the icon descriptor for this content. * rt/net/sourceforge/jnlp/ShortcutDesc.java (ShortcutDesc): New function. (ShortcutDesc): New function. Initialize requiresOnline and onDesktop. (isOnline): New function. Return true if the shortcut is online only. (onDesktop): New function. Return true if the shortcut should be placed on the desktop. (addMenu): New function. Add a menu descriptor for this shortcut. (getMenu): New function. Return the menu descriptor for this shortcut. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons. Any comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-parser-shortcut-association-related-content.patch Type: text/x-patch Size: 11348 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090608/fb6ae461/netx-parser-shortcut-association-related-content.patch From omajid at redhat.com Mon Jun 8 11:25:50 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 08 Jun 2009 18:25:50 +0000 Subject: changeset in /hg/icedtea6: 2009-06-08 Omair Majid changeset 0be8e3334758 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0be8e3334758 description: 2009-06-08 Omair Majid * Makefile.am (stamps/ports.stamp): Depend on stamps/replace-hotspot.stamp instead of stamps/extract.stamp. (stamps/extract.stamp): Dont replace hotspot. (stamps/replace-hotspot.stamp): New target. Replace hotspot without assuming anything about the build. (clean-replace-hotspot): New target. (stamps/patch-fsg.stamp): Depend on stamps/replace-hotspot.stamp instead of stamps/extract.stamp. (stamps/hotspot-tools-source-files.txt): Likewise. (rt-source-files.txt): Likewise. (stamps/cacao.stamp): Likewise. (stamps/visualvm.stamp): Likewise. (stamps/nbplatform.stamp): Likewise. (replace-hotspot): New alias for stamps/replace-hotspot.stamp. diffstat: 2 files changed, 72 insertions(+), 49 deletions(-) ChangeLog | 18 ++++++++++ Makefile.am | 103 ++++++++++++++++++++++++++++++----------------------------- diffs (203 lines): diff -r 4a81a23f1da6 -r 0be8e3334758 ChangeLog --- a/ChangeLog Mon Jun 08 05:59:35 2009 -0400 +++ b/ChangeLog Mon Jun 08 14:26:32 2009 -0400 @@ -1,3 +1,21 @@ 2009-06-08 Gary Benson + + * Makefile.am + (stamps/ports.stamp): Depend on stamps/replace-hotspot.stamp instead + of stamps/extract.stamp. + (stamps/extract.stamp): Dont replace hotspot. + (stamps/replace-hotspot.stamp): New target. Replace hotspot without + assuming anything about the build. + (clean-replace-hotspot): New target. + (stamps/patch-fsg.stamp): Depend on stamps/replace-hotspot.stamp + instead of stamps/extract.stamp. + (stamps/hotspot-tools-source-files.txt): Likewise. + (rt-source-files.txt): Likewise. + (stamps/cacao.stamp): Likewise. + (stamps/visualvm.stamp): Likewise. + (stamps/nbplatform.stamp): Likewise. + (replace-hotspot): New alias for stamps/replace-hotspot.stamp. + 2009-06-08 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 4a81a23f1da6 -r 0be8e3334758 Makefile.am --- a/Makefile.am Mon Jun 08 05:59:35 2009 -0400 +++ b/Makefile.am Mon Jun 08 14:26:32 2009 -0400 @@ -455,7 +455,7 @@ endif endif # Link ports sources into tree -stamps/ports.stamp: stamps/extract.stamp +stamps/ports.stamp: stamps/replace-hotspot.stamp for target in $(abs_top_srcdir)/ports/hotspot/build/*/makefiles/* \ $(abs_top_srcdir)/ports/hotspot/src/*cpu/* \ $(abs_top_srcdir)/ports/hotspot/src/share/vm/*; do \ @@ -675,57 +675,60 @@ else mkdir openjdk ; \ $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ chmod -R ug+w openjdk ; \ - if test "x${HSBUILD}" != "xoriginal"; then \ - rm -rf openjdk/hotspot ; \ - fi ; \ sh $(abs_top_srcdir)/fsg.sh ; \ fi +endif +if BUILD_CACAO +if !USE_SYSTEM_CACAO + if ! test -d cacao ; \ + then \ + mkdir cacao ; \ + $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ + dir=$$(basename cacao/cacao-*) ; \ + ln -s $$dir cacao/cacao ; \ + fi +endif +endif +if WITH_VISUALVM + if ! test -d netbeans ; \ + then \ + mkdir netbeans ; \ + $(TAR) xf $(NETBEANS_PROFILER_SRC_ZIP) -C netbeans ; \ + fi + + if ! test -d visualvm ; \ + then \ + $(TAR) xf $(VISUALVM_SRC_ZIP) ; \ + fi +endif + if [ ! -e $(abs_top_builddir)/generated ]; then \ + cp -a $(abs_top_srcdir)/generated $(abs_top_builddir); \ + find $(abs_top_builddir)/generated -type f -exec chmod 640 '{}' ';' \ + -o -type d -exec chmod 750 '{}' ';'; \ + fi + mkdir -p stamps + touch stamps/extract.stamp + +clean-extract: + rm -f stamps/extract.stamp + +stamps/replace-hotspot.stamp: stamps/extract.stamp if WITH_ALT_HSBUILD - if test -e ${HOTSPOT_SRC_ZIP} ; \ - then \ - if ! test -d openjdk/hotspot ; \ + if test "x${HSBUILD}" != "xoriginal"; then \ + rm -rf openjdk/hotspot ; \ + if test -e ${HOTSPOT_SRC_ZIP} ; \ then \ $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ chmod -R ug+w master-* ; \ mv master-$$($(AWK) 'version==$$1 {print $$2}' version=$(HSBUILD) \ $(abs_top_srcdir)/hotspot.map) openjdk/hotspot ; \ fi ; \ - fi -endif -endif -if BUILD_CACAO -if !USE_SYSTEM_CACAO - if ! test -d cacao ; \ - then \ - mkdir cacao ; \ - $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ - dir=$$(basename cacao/cacao-*) ; \ - ln -s $$dir cacao/cacao ; \ - fi -endif -endif -if WITH_VISUALVM - if ! test -d netbeans ; \ - then \ - mkdir netbeans ; \ - $(TAR) xf $(NETBEANS_PROFILER_SRC_ZIP) -C netbeans ; \ - fi - - if ! test -d visualvm ; \ - then \ - $(TAR) xf $(VISUALVM_SRC_ZIP) ; \ - fi -endif - if [ ! -e $(abs_top_builddir)/generated ]; then \ - cp -a $(abs_top_srcdir)/generated $(abs_top_builddir); \ - find $(abs_top_builddir)/generated -type f -exec chmod 640 '{}' ';' \ - -o -type d -exec chmod 750 '{}' ';'; \ - fi - mkdir -p stamps - touch stamps/extract.stamp - -clean-extract: - rm -f stamps/extract.stamp + fi ; +endif + touch stamps/replace-hotspot.stamp + +clean-replace-hotspot: + rm -rf stamps/replace-hotspot.stamp stamps/patch.stamp: stamps/patch-fsg.stamp mkdir -p stamps ; \ @@ -812,7 +815,7 @@ clean-patch: rm -f openjdk/jdk/src/share/classes/sun/applet/`basename $file` ; \ done ; -stamps/patch-fsg.stamp: stamps/extract.stamp +stamps/patch-fsg.stamp: stamps/replace-hotspot.stamp mkdir -p stamps ; \ rm -f stamps/patch-fsg.stamp.tmp ; \ touch stamps/patch-fsg.stamp.tmp ; \ @@ -1445,7 +1448,7 @@ stamps/hotspot-tools-copy-source-files.s mkdir -p stamps touch stamps/hotspot-tools-copy-source-files.stamp -hotspot-tools-source-files.txt: stamps/extract.stamp \ +hotspot-tools-source-files.txt: stamps/replace-hotspot.stamp \ stamps/hotspot-tools-copy-source-files.stamp find hotspot-tools -name '*.java' | sort > $@ mkdir -p lib/hotspot-tools @@ -1498,7 +1501,7 @@ bootstrap/jdk1.7.0/jre/lib/tools.jar: st fi # rt-closed.jar class files. -rt-source-files.txt: stamps/extract.stamp stamps/copy-source-files.stamp +rt-source-files.txt: stamps/replace-hotspot.stamp stamps/copy-source-files.stamp find $(abs_top_srcdir)/rt $(abs_top_builddir)/rt -name '*.java' \ | sort -u > $@ @@ -1582,7 +1585,7 @@ extra-lib/about.jar: stamps/extra-class- $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; \ fi -stamps/cacao.stamp: stamps/extract.stamp stamps/rt-class-files.stamp +stamps/cacao.stamp: stamps/replace-hotspot.stamp stamps/rt-class-files.stamp if BUILD_CACAO if !USE_SYSTEM_CACAO cd cacao/cacao && \ @@ -1956,7 +1959,7 @@ check-local: jtregcheck # VisualVM stamps/visualvm.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/download.stamp \ - stamps/extract.stamp stamps/nbplatform.stamp + stamps/replace-hotspot.stamp stamps/nbplatform.stamp if WITH_VISUALVM cd visualvm ; \ ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans_visualvm netbeans ; \ @@ -1969,7 +1972,7 @@ clean-visualvm: rm -rf visualvm rm -f stamps/visualvm.stamp -stamps/nbplatform.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/extract.stamp \ +stamps/nbplatform.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/replace-hotspot.stamp \ stamps/download.stamp if WITH_VISUALVM cd netbeans ; \ @@ -2059,6 +2062,8 @@ plugs: stamps/plugs.stamp rt-class-files: stamps/rt-class-files.stamp +replace-hotspot: stamps/replace-hotspot.stamp + hotspot-tools-class-files: stamps/hotspot-tools-class-files.stamp hotspot-tools-copy-source-files: stamps/hotspot-tools-copy-source-files.stamp From omajid at redhat.com Mon Jun 8 14:24:45 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 08 Jun 2009 17:24:45 -0400 Subject: RFC: Netx - Fix BasicService.isOffline() Message-ID: <4A2D819D.9060604@redhat.com> Hi, The attached patch implements XBasicService.isOffline(). ChangeLog 2009-06-08 Omair Majid * rt/net/sourceforge/jnlp/services/XBasicService.java (isOffline): Check if the system is offline by retrieving data from a URL. (findFirstURLFromJNLPFile): New function. Obtain a URL from the JNLP file. As a last resort, return an arbitrary known URL. Any comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-basicservice-isoffline.patch Type: text/x-patch Size: 3035 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090608/3b5e0d55/netx-basicservice-isoffline.patch From rupertlssmith at googlemail.com Mon Jun 8 14:48:07 2009 From: rupertlssmith at googlemail.com (Rupert Smith) Date: Mon, 8 Jun 2009 22:48:07 +0100 Subject: Icedtea - NIO2 Linux Asynchronous File IO. Message-ID: Hi, I have been checking out icedtea6 today, in order to examine its support for nio2. Looking through the source, I cannot find an implementation of asynchronous file IO for Linux, but I just wanted to check with someone in the know if that is the case, as the code base is quite large, maybe I overlooked it? I think 'SimpleAsynchronousFileChannelImpl.java' is the one that a Linux build will use, which implements it by handing off IO events to a thread pool, which is a portable solution not taking advantage of OS specific asynchronous IO support. I have a partial implementation of asynchronous file IO, built on top of libaio. If I wanted to contribute this to the project, would the correct place to do so be as part of icedtea, or upstream as part of openjdk? Thanks for your answers. Rupert -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090608/7d5d31e8/attachment.html From gnu_andrew at member.fsf.org Mon Jun 8 15:00:19 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 8 Jun 2009 23:00:19 +0100 Subject: Icedtea - NIO2 Linux Asynchronous File IO. In-Reply-To: References: Message-ID: <17c6771e0906081500hc3b5ffah9c0c8765f726ba17@mail.gmail.com> 2009/6/8 Rupert Smith : > Hi, > > I have been checking out icedtea6 today, in order to examine its support for > nio2. Looking through the source, I cannot find an implementation of > asynchronous file IO for Linux, but I just wanted to check with someone in > the know if that is the case, as the code base is quite large, maybe I > overlooked it? > > I think 'SimpleAsynchronousFileChannelImpl.java' is the one that a Linux > build will use, which implements it by handing off IO events to a thread > pool, which is a portable solution not taking advantage of OS specific > asynchronous IO support. > > I have a partial implementation of asynchronous file IO, built on top of > libaio. If I wanted to contribute this to the project, would the correct > place to do so be as part of icedtea, or upstream as part of openjdk? > > Thanks for your answers. > > Rupert > Upstream OpenJDK is the place to contribute (specifically http://openjdk.java.net/projects/nio), but I think you'll find there is a GNU/Linux implementation in overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/EPollPort.c -- 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 dbhole at redhat.com Mon Jun 8 15:56:21 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 8 Jun 2009 18:56:21 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <4A296FF5.2020703@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> <4A27DC10.9070600@redhat.com> <20090604214722.GA29542@redhat.com> <4A296FF5.2020703@redhat.com> Message-ID: <20090608225621.GB21227@redhat.com> * Omair Majid [2009-06-05 15:20]: I can create an exploit with this patch == BEGIN == 1. Unzip the attached zip file in a location accessible via a web server Note: You *must* copy it to a server accessible location since the attack relies on cache, which kicks in only when loading via a server. 2. Edit exploit-poc.jnlp and replace instances of "http://example.org/" with http://// 3. Clear your cache files (/tmp/cache and ~/.icedteaplugin/cache) 4. Run: javaws http:////test.jnlp This will throw an access exception: java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read) 3. Now edit exploit-poc.jnlp and change the resource element from: to: where "$LOCATION" is the location where exploit.jar is cached. Older versions cached it in /tmp/cache//
/patch/jarname while the newer ones do it in ~/.icedteaplugin/cache/.../ . If you are unsure, just run 'find ~/.icedteaplugin/ /tmp/cache/ -name Exploit.jar' 4. Save exploit-poc.jnlp and re-load it via javaws You will see a list of items in your home directory. This implies that the unsigned code is running with full privileges. == END == You can fix this by adding a check for -jar like others, but rather than excluding specific items, it would be better to check for allowed items. java-vm-args accepts only certain args: http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html (scroll to resources element). This covers any future arguments that might get added to java that allow classpath specification. Cheers, Deepak -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jnlpvmargs-exploit-poc.zip Type: application/zip Size: 3084 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090608/ae5fbc1f/netx-jnlpvmargs-exploit-poc.zip From rupertlssmith at googlemail.com Mon Jun 8 18:03:07 2009 From: rupertlssmith at googlemail.com (Rupert Smith) Date: Tue, 9 Jun 2009 02:03:07 +0100 Subject: Icedtea - NIO2 Linux Asynchronous File IO. In-Reply-To: <17c6771e0906081500hc3b5ffah9c0c8765f726ba17@mail.gmail.com> References: <17c6771e0906081500hc3b5ffah9c0c8765f726ba17@mail.gmail.com> Message-ID: Thanks. I thought that EPollPort.c was just for sockets and not files? I'll look into it a bit more, see if can understand how it all fits together. Rupert 2009/6/8 Andrew John Hughes > 2009/6/8 Rupert Smith : > > Hi, > > > > I have been checking out icedtea6 today, in order to examine its support > for > > nio2. Looking through the source, I cannot find an implementation of > > asynchronous file IO for Linux, but I just wanted to check with someone > in > > the know if that is the case, as the code base is quite large, maybe I > > overlooked it? > > > > I think 'SimpleAsynchronousFileChannelImpl.java' is the one that a Linux > > build will use, which implements it by handing off IO events to a thread > > pool, which is a portable solution not taking advantage of OS specific > > asynchronous IO support. > > > > I have a partial implementation of asynchronous file IO, built on top of > > libaio. If I wanted to contribute this to the project, would the correct > > place to do so be as part of icedtea, or upstream as part of openjdk? > > > > Thanks for your answers. > > > > Rupert > > > > Upstream OpenJDK is the place to contribute (specifically > http://openjdk.java.net/projects/nio), but I think you'll find there > is a GNU/Linux implementation in > overlays/nio2/openjdk/jdk/src/solaris/native/sun/nio/ch/EPollPort.c > -- > Andrew :-) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and the OpenJDK > http://www.gnu.org/software/classpath > http://openjdk.java.net > > PGP Key: 94EFD9D8 (http://subkeys.pgp.net) > Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090609/44f79e46/attachment.html From gbenson at redhat.com Tue Jun 9 03:23:51 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 09 Jun 2009 10:23:51 +0000 Subject: changeset in /hg/icedtea6: 2009-06-09 Gary Benson changeset d55dfba8404f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d55dfba8404f description: 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::get_interface_callee): New argument. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Update traps for invokeinterface. (SharkTopLevelBlock::get_callee): Pass method to get_interface_callee. (SharkTopLevelBlock::get_interface_callee): Removed constant pool lookup. * patches/hotspot/default/icedtea-shark.patch (ciMethod::itable_index): New method. diffstat: 3 files changed, 31 insertions(+), 23 deletions(-) ChangeLog | 15 ++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 37 ++++++--------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 diffs (116 lines): diff -r 0be8e3334758 -r d55dfba8404f ChangeLog --- a/ChangeLog Mon Jun 08 14:26:32 2009 -0400 +++ b/ChangeLog Tue Jun 09 06:22:07 2009 -0400 @@ -1,3 +1,18 @@ 2009-06-08 Omair Majid + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::get_interface_callee): New argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Update traps for + invokeinterface. + (SharkTopLevelBlock::get_callee): Pass method to + get_interface_callee. + (SharkTopLevelBlock::get_interface_callee): Removed constant + pool lookup. + + * patches/hotspot/default/icedtea-shark.patch + (ciMethod::itable_index): New method. + 2009-06-08 Omair Majid * Makefile.am diff -r 0be8e3334758 -r d55dfba8404f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Jun 08 14:26:32 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 06:22:07 2009 -0400 @@ -107,8 +107,14 @@ void SharkTopLevelBlock::scan_for_traps( if (method->holder() == function()->env()->Object_klass()) Unimplemented(); - // Continue to the check - index = iter()->get_method_index(); + // Bail out if the holder is unloaded + if (!method->holder()->is_linked()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } break; case Bytecodes::_new: @@ -873,7 +879,7 @@ Value *SharkTopLevelBlock::get_callee(Ca case CALL_VIRTUAL: return get_virtual_callee(receiver, method); case CALL_INTERFACE: - return get_interface_callee(receiver); + return get_interface_callee(receiver, method); default: ShouldNotReachHere(); } @@ -911,11 +917,9 @@ Value *SharkTopLevelBlock::get_virtual_c } // Interface calls are handled here -Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver) -{ - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - +Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver, + ciMethod* method) +{ BasicBlock *loop = function()->CreateBlock("loop"); BasicBlock *got_null = function()->CreateBlock("got_null"); BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -955,11 +959,7 @@ Value* SharkTopLevelBlock::get_interface itable_start, BytesPerLong, itable_start_name); // Locate this interface's entry in the table - Value *iklass = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f1_offset(), - SharkType::jobject_type(), - "iklass"); - + Value *iklass = builder()->CreateInlineOop(method->holder()); BasicBlock *loop_entry = builder()->GetInsertBlock(); builder()->CreateBr(loop); builder()->SetInsertPoint(loop); @@ -1009,11 +1009,6 @@ Value* SharkTopLevelBlock::get_interface offset = builder()->CreateIntCast(offset, SharkType::intptr_type(), false); - Value *index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - return builder()->CreateLoad( builder()->CreateIntToPtr( builder()->CreateAdd( @@ -1022,10 +1017,8 @@ Value* SharkTopLevelBlock::get_interface builder()->CreatePtrToInt( object_klass, SharkType::intptr_type()), offset), - builder()->CreateShl( - index, - LLVMValue::intptr_constant( - exact_log2(itableMethodEntry::size() * wordSize)))), + LLVMValue::intptr_constant( + method->itable_index() * itableMethodEntry::size() * wordSize)), LLVMValue::intptr_constant( itableMethodEntry::method_offset_in_bytes())), PointerType::getUnqual(SharkType::methodOop_type())), diff -r 0be8e3334758 -r d55dfba8404f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Jun 08 14:26:32 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 09 06:22:07 2009 -0400 @@ -383,7 +383,7 @@ class SharkTopLevelBlock : public SharkB llvm::Value* get_direct_callee(ciMethod* method); llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); - llvm::Value* get_interface_callee(SharkValue* receiver); + llvm::Value* get_interface_callee(SharkValue* receiver, ciMethod* method); void do_call(); From gbenson at redhat.com Tue Jun 9 04:09:11 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 9 Jun 2009 12:09:11 +0100 Subject: Shark invokeinterface improvements (part 2) Message-ID: <20090609110911.GE3177@redhat.com> Hi all, This commit replaces the interpreter-style constant pool lookup of the method and itable index with compile time lookups. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 0be8e3334758 -r d55dfba8404f ChangeLog --- a/ChangeLog Mon Jun 08 14:26:32 2009 -0400 +++ b/ChangeLog Tue Jun 09 06:22:07 2009 -0400 @@ -1,3 +1,18 @@ +2009-06-09 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::get_interface_callee): New argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Update traps for + invokeinterface. + (SharkTopLevelBlock::get_callee): Pass method to + get_interface_callee. + (SharkTopLevelBlock::get_interface_callee): Removed constant + pool lookup. + + * patches/hotspot/default/icedtea-shark.patch + (ciMethod::itable_index): New method. + 2009-06-08 Omair Majid * Makefile.am diff -r 0be8e3334758 -r d55dfba8404f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Jun 08 14:26:32 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 06:22:07 2009 -0400 @@ -107,8 +107,14 @@ if (method->holder() == function()->env()->Object_klass()) Unimplemented(); - // Continue to the check - index = iter()->get_method_index(); + // Bail out if the holder is unloaded + if (!method->holder()->is_linked()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } break; case Bytecodes::_new: @@ -873,7 +879,7 @@ case CALL_VIRTUAL: return get_virtual_callee(receiver, method); case CALL_INTERFACE: - return get_interface_callee(receiver); + return get_interface_callee(receiver, method); default: ShouldNotReachHere(); } @@ -911,11 +917,9 @@ } // Interface calls are handled here -Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver) +Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver, + ciMethod* method) { - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - BasicBlock *loop = function()->CreateBlock("loop"); BasicBlock *got_null = function()->CreateBlock("got_null"); BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -955,11 +959,7 @@ itable_start, BytesPerLong, itable_start_name); // Locate this interface's entry in the table - Value *iklass = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f1_offset(), - SharkType::jobject_type(), - "iklass"); - + Value *iklass = builder()->CreateInlineOop(method->holder()); BasicBlock *loop_entry = builder()->GetInsertBlock(); builder()->CreateBr(loop); builder()->SetInsertPoint(loop); @@ -1009,11 +1009,6 @@ offset = builder()->CreateIntCast(offset, SharkType::intptr_type(), false); - Value *index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - return builder()->CreateLoad( builder()->CreateIntToPtr( builder()->CreateAdd( @@ -1022,10 +1017,8 @@ builder()->CreatePtrToInt( object_klass, SharkType::intptr_type()), offset), - builder()->CreateShl( - index, - LLVMValue::intptr_constant( - exact_log2(itableMethodEntry::size() * wordSize)))), + LLVMValue::intptr_constant( + method->itable_index() * itableMethodEntry::size() * wordSize)), LLVMValue::intptr_constant( itableMethodEntry::method_offset_in_bytes())), PointerType::getUnqual(SharkType::methodOop_type())), diff -r 0be8e3334758 -r d55dfba8404f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Jun 08 14:26:32 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 09 06:22:07 2009 -0400 @@ -383,7 +383,7 @@ llvm::Value* get_direct_callee(ciMethod* method); llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); - llvm::Value* get_interface_callee(SharkValue* receiver); + llvm::Value* get_interface_callee(SharkValue* receiver, ciMethod* method); void do_call(); From gbenson at redhat.com Tue Jun 9 05:55:58 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 09 Jun 2009 12:55:58 +0000 Subject: changeset in /hg/icedtea6: 2009-06-09 Gary Benson changeset ff13b7d6e330 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ff13b7d6e330 description: 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Removed unused code. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Removed. * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. * patches/hotspot/default/icedtea-shark.patch (ciInstanceKlass::is_cache_entry_resolved): Removed. (ciInstanceKlass::constant_pool_tag_at): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 6 files changed, 49 insertions(+), 274 deletions(-) ChangeLog | 14 + patches/hotspot/default/icedtea-shark.patch | 76 ++++----- ports/hotspot/src/share/vm/includeDB_shark | 19 -- ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp | 125 --------------- ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 75 --------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 14 - diffs (381 lines): diff -r d55dfba8404f -r ff13b7d6e330 ChangeLog --- a/ChangeLog Tue Jun 09 06:22:07 2009 -0400 +++ b/ChangeLog Tue Jun 09 08:53:57 2009 -0400 @@ -1,3 +1,17 @@ 2009-06-09 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Removed unused code. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Removed. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. + + * patches/hotspot/default/icedtea-shark.patch + (ciInstanceKlass::is_cache_entry_resolved): Removed. + (ciInstanceKlass::constant_pool_tag_at): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r d55dfba8404f -r ff13b7d6e330 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Tue Jun 09 06:22:07 2009 -0400 +++ b/patches/hotspot/default/icedtea-shark.patch Tue Jun 09 08:53:57 2009 -0400 @@ -337,46 +337,40 @@ } // ------------------------------------------------------------------ -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 Tue Apr 21 09:47:27 2009 +0100 -@@ -548,3 +548,23 @@ - } - return impl; - } +diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.cpp +--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp Tue Jun 09 09:17:11 2009 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp Tue Jun 09 10:04:02 2009 +0100 +@@ -229,6 +229,20 @@ + } + + ++#ifdef SHARK ++// ------------------------------------------------------------------ ++// ciMethod::itable_index ++// ++// Get the position of this method's entry in the itable, if any. ++int ciMethod::itable_index() { ++ check_is_loaded(); ++ assert(holder()->is_linked(), "must be linked"); ++ VM_ENTRY_MARK; ++ return klassItable::compute_itable_index(get_methodOop()); ++} ++#endif // SHARK + -+#ifdef SHARK -+// ------------------------------------------------------------------ -+// ciInstanceKlass::constant_pool_tag_at -+// -+// What is in this constant pool slot? -+constantTag ciInstanceKlass::constant_pool_tag_at(int index) { -+ VM_ENTRY_MARK; -+ return get_instanceKlass()->constants()->tag_at(index); -+} + -+// ------------------------------------------------------------------ -+// 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 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 Tue Apr 21 09:47:27 2009 +0100 -@@ -198,4 +198,12 @@ - // What kind of ciObject is this? - bool is_instance_klass() { return true; } - bool is_java_klass() { return true; } -+ -+#ifdef SHARK -+ // What is in this constant pool slot? -+ constantTag constant_pool_tag_at(int index); -+ -+ // Is this entry in the constant pool cache resolved? -+ bool is_cache_entry_resolved(int index, Bytecodes::Code opcode); -+#endif // SHARK - }; + // ------------------------------------------------------------------ + // ciMethod::native_entry + // +diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.hpp +--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp Tue Jun 09 09:17:11 2009 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp Tue Jun 09 10:04:02 2009 +0100 +@@ -139,6 +139,9 @@ + + // Runtime information. + int vtable_index(); ++#ifdef SHARK ++ int itable_index(); ++#endif // SHARK + address native_entry(); + address interpreter_entry(); + diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Tue Jun 09 06:22:07 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Tue Jun 09 08:53:57 2009 -0400 @@ -170,24 +170,6 @@ sharkConstant.hpp sharkConstant.hpp sharkBuilder.hpp sharkConstant.hpp sharkValue.hpp -sharkConstantPool.cpp allocation.hpp -sharkConstantPool.cpp constantPoolOop.hpp -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.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 @@ -316,7 +298,6 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp sharkTopLevelBlock.cpp sharkConstant.hpp -sharkTopLevelBlock.cpp sharkConstantPool.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp sharkTopLevelBlock.cpp sharkState.inline.hpp diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Tue Jun 09 06:22:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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/_sharkConstantPool.cpp.incl" - -using namespace llvm; - -Value *SharkConstantPool::constants() -{ - Value *m = method(); - if (m != _constants_method) { - _constants = builder()->CreateValueOfStructEntry( - m, methodOopDesc::constants_offset(), - SharkType::oop_type(), "constants"); - _constants_method = m; - } - return _constants; -} - -Value *SharkConstantPool::tags() -{ - Value *cp = constants(); - if (cp != _tags_constants) { - _tags = builder()->CreateValueOfStructEntry( - cp, in_ByteSize(constantPoolOopDesc::tags_offset_in_bytes()), - SharkType::oop_type(), "tags"); - _tags_constants = cp; - } - return _tags; -} - -Value *SharkConstantPool::cache() -{ - Value *cp = constants(); - if (cp != _cache_constants) { - _cache = builder()->CreateValueOfStructEntry( - cp, in_ByteSize(constantPoolOopDesc::cache_offset_in_bytes()), - SharkType::oop_type(), "cache"); - _cache_constants = cp; - } - return _cache; -} - -Value *SharkConstantPool::object_at(int which) -{ - return builder()->CreateLoad( - builder()->CreateArrayAddress( - constants(), - T_OBJECT, in_ByteSize(sizeof(constantPoolOopDesc)), - LLVMValue::jint_constant(which))); -} - -Value *SharkConstantPool::tag_at(int which) -{ - return builder()->CreateLoad( - builder()->CreateArrayAddress( - tags(), T_BYTE, LLVMValue::jint_constant(which))); -} - -Value *SharkConstantPool::cache_entry_at(int which) -{ - // Takes a constant pool cache index in byte-swapped byte order - // (which comes from the bytecodes after rewriting). This is a - // 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"); - - return builder()->CreateIntToPtr( - builder()->CreateAdd( - builder()->CreatePtrToInt( - cache(), SharkType::intptr_type()), - LLVMValue::intptr_constant( - in_bytes(constantPoolCacheOopDesc::base_offset()) + - which * sizeof(ConstantPoolCacheEntry))), - SharkType::cpCacheEntry_type()); -} - -Value *SharkConstantPool::java_mirror() -{ - Value *cp = constants(); - - Value *pool_holder = builder()->CreateValueOfStructEntry( - cp, - in_ByteSize(constantPoolOopDesc::pool_holder_offset_in_bytes()), - SharkType::oop_type(), - "pool_holder"); - - Value *klass_part = builder()->CreateAddressOfStructEntry( - pool_holder, - in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), - SharkType::klass_type(), - "klass_part"); - - // XXX should there be a memory barrier before this load? - return builder()->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror"); -} diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp Tue Jun 09 06:22:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +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. - * - */ - -class SharkConstantPool : public StackObj { - public: - SharkConstantPool(SharkTopLevelBlock* block) - : _block(block), - _constants_method(NULL), - _tags_constants(NULL), - _cache_constants(NULL) {} - - private: - SharkTopLevelBlock* _block; - - private: - SharkTopLevelBlock* block() const - { - return _block; - } - SharkBuilder* builder() const - { - return block()->builder(); - } - ciMethod* target() const - { - return block()->target(); - } - llvm::Value* method() const - { - return block()->method(); - } - - private: - llvm::Value* _constants; // The constant pool, a constantPoolOop - llvm::Value* _constants_method; // The method _constants was loaded from - - llvm::Value* _tags; // The tags array, a typeArrayOop - llvm::Value* _tags_constants; // The constantPoolOop _tags is in - - llvm::Value* _cache; // The cache, a constantPoolCacheOop - llvm::Value* _cache_constants; // The constantPoolCacheOop _cache is in - - private: - llvm::Value* constants(); - llvm::Value* tags(); - llvm::Value* cache(); - - public: - llvm::Value* object_at(int which); - llvm::Value* tag_at(int which); - llvm::Value* cache_entry_at(int which); - llvm::Value* java_mirror(); -}; diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 06:22:07 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 08:53:57 2009 -0400 @@ -44,8 +44,6 @@ void SharkTopLevelBlock::scan_for_traps( bool will_link; bool is_field; - int index = -1; - switch (bc()) { case Bytecodes::_ldc: case Bytecodes::_ldc_w: @@ -140,18 +138,6 @@ void SharkTopLevelBlock::scan_for_traps( return; } 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())) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } } } From gbenson at redhat.com Tue Jun 9 05:59:36 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 9 Jun 2009 13:59:36 +0100 Subject: Shark clearout Message-ID: <20090609125936.GH3177@redhat.com> Hi all, My commits over the past week have replaced all constant pool accesses in Shark. This commit removes the constant pool access code itself, and some hacks that were required to support it. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r d55dfba8404f -r ff13b7d6e330 ChangeLog --- a/ChangeLog Tue Jun 09 06:22:07 2009 -0400 +++ b/ChangeLog Tue Jun 09 08:53:57 2009 -0400 @@ -1,3 +1,17 @@ +2009-06-09 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Removed unused code. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Removed. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. + + * patches/hotspot/default/icedtea-shark.patch + (ciInstanceKlass::is_cache_entry_resolved): Removed. + (ciInstanceKlass::constant_pool_tag_at): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r d55dfba8404f -r ff13b7d6e330 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Tue Jun 09 06:22:07 2009 -0400 +++ b/patches/hotspot/default/icedtea-shark.patch Tue Jun 09 08:53:57 2009 -0400 @@ -337,46 +337,40 @@ } // ------------------------------------------------------------------ -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 Tue Apr 21 09:47:27 2009 +0100 -@@ -548,3 +548,23 @@ - } - return impl; +diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.cpp +--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp Tue Jun 09 09:17:11 2009 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp Tue Jun 09 10:04:02 2009 +0100 +@@ -229,6 +229,20 @@ } -+ + + +#ifdef SHARK +// ------------------------------------------------------------------ -+// ciInstanceKlass::constant_pool_tag_at ++// ciMethod::itable_index +// -+// What is in this constant pool slot? -+constantTag ciInstanceKlass::constant_pool_tag_at(int index) { ++// Get the position of this method's entry in the itable, if any. ++int ciMethod::itable_index() { ++ check_is_loaded(); ++ assert(holder()->is_linked(), "must be linked"); + VM_ENTRY_MARK; -+ return get_instanceKlass()->constants()->tag_at(index); -+} -+ -+// ------------------------------------------------------------------ -+// 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); ++ return klassItable::compute_itable_index(get_methodOop()); +} +#endif // SHARK -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 Tue Apr 21 09:47:27 2009 +0100 -@@ -198,4 +198,12 @@ - // What kind of ciObject is this? - bool is_instance_klass() { return true; } - bool is_java_klass() { return true; } + ++ + // ------------------------------------------------------------------ + // ciMethod::native_entry + // +diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.hpp +--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp Tue Jun 09 09:17:11 2009 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp Tue Jun 09 10:04:02 2009 +0100 +@@ -139,6 +139,9 @@ + + // Runtime information. + int vtable_index(); +#ifdef SHARK -+ // What is in this constant pool slot? -+ constantTag constant_pool_tag_at(int index); -+ -+ // Is this entry in the constant pool cache resolved? -+ bool is_cache_entry_resolved(int index, Bytecodes::Code opcode); ++ int itable_index(); +#endif // SHARK - }; + address native_entry(); + address interpreter_entry(); + diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Tue Jun 09 06:22:07 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Tue Jun 09 08:53:57 2009 -0400 @@ -170,24 +170,6 @@ sharkConstant.hpp sharkBuilder.hpp sharkConstant.hpp sharkValue.hpp -sharkConstantPool.cpp allocation.hpp -sharkConstantPool.cpp constantPoolOop.hpp -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.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 @@ -316,7 +298,6 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp sharkTopLevelBlock.cpp sharkConstant.hpp -sharkTopLevelBlock.cpp sharkConstantPool.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp sharkTopLevelBlock.cpp sharkState.inline.hpp diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Tue Jun 09 06:22:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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/_sharkConstantPool.cpp.incl" - -using namespace llvm; - -Value *SharkConstantPool::constants() -{ - Value *m = method(); - if (m != _constants_method) { - _constants = builder()->CreateValueOfStructEntry( - m, methodOopDesc::constants_offset(), - SharkType::oop_type(), "constants"); - _constants_method = m; - } - return _constants; -} - -Value *SharkConstantPool::tags() -{ - Value *cp = constants(); - if (cp != _tags_constants) { - _tags = builder()->CreateValueOfStructEntry( - cp, in_ByteSize(constantPoolOopDesc::tags_offset_in_bytes()), - SharkType::oop_type(), "tags"); - _tags_constants = cp; - } - return _tags; -} - -Value *SharkConstantPool::cache() -{ - Value *cp = constants(); - if (cp != _cache_constants) { - _cache = builder()->CreateValueOfStructEntry( - cp, in_ByteSize(constantPoolOopDesc::cache_offset_in_bytes()), - SharkType::oop_type(), "cache"); - _cache_constants = cp; - } - return _cache; -} - -Value *SharkConstantPool::object_at(int which) -{ - return builder()->CreateLoad( - builder()->CreateArrayAddress( - constants(), - T_OBJECT, in_ByteSize(sizeof(constantPoolOopDesc)), - LLVMValue::jint_constant(which))); -} - -Value *SharkConstantPool::tag_at(int which) -{ - return builder()->CreateLoad( - builder()->CreateArrayAddress( - tags(), T_BYTE, LLVMValue::jint_constant(which))); -} - -Value *SharkConstantPool::cache_entry_at(int which) -{ - // Takes a constant pool cache index in byte-swapped byte order - // (which comes from the bytecodes after rewriting). This is a - // 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"); - - return builder()->CreateIntToPtr( - builder()->CreateAdd( - builder()->CreatePtrToInt( - cache(), SharkType::intptr_type()), - LLVMValue::intptr_constant( - in_bytes(constantPoolCacheOopDesc::base_offset()) + - which * sizeof(ConstantPoolCacheEntry))), - SharkType::cpCacheEntry_type()); -} - -Value *SharkConstantPool::java_mirror() -{ - Value *cp = constants(); - - Value *pool_holder = builder()->CreateValueOfStructEntry( - cp, - in_ByteSize(constantPoolOopDesc::pool_holder_offset_in_bytes()), - SharkType::oop_type(), - "pool_holder"); - - Value *klass_part = builder()->CreateAddressOfStructEntry( - pool_holder, - in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), - SharkType::klass_type(), - "klass_part"); - - // XXX should there be a memory barrier before this load? - return builder()->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror"); -} diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp Tue Jun 09 06:22:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +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. - * - */ - -class SharkConstantPool : public StackObj { - public: - SharkConstantPool(SharkTopLevelBlock* block) - : _block(block), - _constants_method(NULL), - _tags_constants(NULL), - _cache_constants(NULL) {} - - private: - SharkTopLevelBlock* _block; - - private: - SharkTopLevelBlock* block() const - { - return _block; - } - SharkBuilder* builder() const - { - return block()->builder(); - } - ciMethod* target() const - { - return block()->target(); - } - llvm::Value* method() const - { - return block()->method(); - } - - private: - llvm::Value* _constants; // The constant pool, a constantPoolOop - llvm::Value* _constants_method; // The method _constants was loaded from - - llvm::Value* _tags; // The tags array, a typeArrayOop - llvm::Value* _tags_constants; // The constantPoolOop _tags is in - - llvm::Value* _cache; // The cache, a constantPoolCacheOop - llvm::Value* _cache_constants; // The constantPoolCacheOop _cache is in - - private: - llvm::Value* constants(); - llvm::Value* tags(); - llvm::Value* cache(); - - public: - llvm::Value* object_at(int which); - llvm::Value* tag_at(int which); - llvm::Value* cache_entry_at(int which); - llvm::Value* java_mirror(); -}; diff -r d55dfba8404f -r ff13b7d6e330 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 06:22:07 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 08:53:57 2009 -0400 @@ -43,8 +43,6 @@ ciInstanceKlass *klass; bool will_link; bool is_field; - - int index = -1; switch (bc()) { case Bytecodes::_ldc: @@ -140,18 +138,6 @@ return; } 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())) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } } } From dbhole at redhat.com Tue Jun 9 09:02:15 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 9 Jun 2009 12:02:15 -0400 Subject: RFC: Netx - Parser support for shortcut, association and related-content elements In-Reply-To: <4A2D422A.8090202@redhat.com> References: <4A2D422A.8090202@redhat.com> Message-ID: <20090609160215.GA17330@redhat.com> * Omair Majid [2009-06-08 12:55]: > Hi, > > The attached patch adds support to the JNLP parser for parsing > association, shortcut and related-content elements from the JNLP file. > Looks fine. New files are missing headers though. Please add them before committing. Deepak > ChangeLog: > 2009-06-08 Omair Majid > > * rt/net/sourceforge/jnlp/AssociationDesc.java: New file. > (AssociationDesc): New function. Create an association descriptor. > (getExtensions): New function. Get the extensions for this > association. > (getMimeType): New function. Get the mimetype for this association. > (checkMimeType): New function. > * rt/net/sourceforge/jnlp/InformationDesc.java > (getAssociations): New function. Get the associations. > (getShortcut): New function. Get the shortcut. > (getRelatedContents): New function. Get the related-contents. > * rt/net/sourceforge/jnlp/MenuDesc.java: New file. > (MenuDesc): New function. > (getSubMenu): New function. Get the submenu for this menu > descriptor. > * rt/net/sourceforge/jnlp/Parser.java > (getInformationDesc): Parse "assocation", "shortcut" and > "related-content" elements. > (getAssociation): New function. Parse the association node to create > a AssociationDesc. > (getShortcut): New function. Parse the shortcut node to create a > ShortcutDesc. > (getMenu): New function. Parse a menu node to create a MenuDesc. > (getRelatedContent): New function. Parse a related-content node to > create a RelatedContentDesc. > * rt/net/sourceforge/jnlp/RelatedContentDesc.java > (RelatedContentDesc): New function. > (setTitle): New function. Set the title of this content. > (getTitle): New function. Get the title of this content. > (setDescription): New function. Set the description of this content. > (getDescription): New function. Get the description of this content. > (getLocation): New function. Get the location of this content. > (setIconDesc): New function. Set the icon descriptor for this > content. > (getIcon): Get the icon descriptor for this content. > * rt/net/sourceforge/jnlp/ShortcutDesc.java > (ShortcutDesc): New function. > (ShortcutDesc): New function. Initialize requiresOnline and > onDesktop. > (isOnline): New function. Return true if the shortcut is online > only. > (onDesktop): New function. Return true if the shortcut should be > placed on the desktop. > (addMenu): New function. Add a menu descriptor for this shortcut. > (getMenu): New function. Return the menu descriptor for this > shortcut. > * rt/net/sourceforge/jnlp/resources/Messages.properties: > Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons. > > Any comments? > > > Cheers, > Omair From dbhole at redhat.com Tue Jun 9 11:00:37 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 9 Jun 2009 14:00:37 -0400 Subject: RFC: Netx - Fix BasicService.isOffline() In-Reply-To: <4A2D819D.9060604@redhat.com> References: <4A2D819D.9060604@redhat.com> Message-ID: <20090609180037.GA3528@redhat.com> * Omair Majid [2009-06-08 17:25]: > Hi, > > The attached patch implements XBasicService.isOffline(). > > ChangeLog > 2009-06-08 Omair Majid > > * rt/net/sourceforge/jnlp/services/XBasicService.java > (isOffline): Check if the system is offline by retrieving data from > a URL. > (findFirstURLFromJNLPFile): New function. Obtain a URL from the JNLP > file. As a last resort, return an arbitrary known URL. > > Any comments? > Looks good to me! Deepak > Cheers, > Omair From omajid at redhat.com Tue Jun 9 11:11:45 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Jun 2009 18:11:45 +0000 Subject: changeset in /hg/icedtea6: 2009-06-09 Omair Majid changeset 852af6e8bf0e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=852af6e8bf0e description: 2009-06-09 Omair Majid * rt/net/sourceforge/jnlp/AssociationDesc.java: New file. (AssociationDesc): New function. Create an association descriptor. (getExtensions): New function. Get the extensions for this association. (getMimeType): New function. Get the mimetype for this association. (checkMimeType): New function. * rt/net/sourceforge/jnlp/InformationDesc.java (getAssociations): New function. Get the associations. (getShortcut): New function. Get the shortcut. (getRelatedContents): New function. Get the related-contents. * rt/net/sourceforge/jnlp/MenuDesc.java: New file. (MenuDesc): New function. (getSubMenu): New function. Get the submenu for this menu descriptor. * rt/net/sourceforge/jnlp/Parser.java (getInformationDesc): Parse "assocation", "shortcut" and "related-content" elements. (getAssociation): New function. Parse the association node to create a AssociationDesc. (getShortcut): New function. Parse the shortcut node to create a ShortcutDesc. (getMenu): New function. Parse a menu node to create a MenuDesc. (getRelatedContent): New function. Parse a related-content node to create a RelatedContentDesc. * rt/net/sourceforge/jnlp/RelatedContentDesc.java (RelatedContentDesc): New function. (setTitle): New function. Set the title of this content. (getTitle): New function. Get the title of this content. (setDescription): New function. Set the description of this content. (getDescription): New function. Get the description of this content. (getLocation): New function. Get the location of this content. (setIconDesc): New function. Set the icon descriptor for this content. (getIcon): Get the icon descriptor for this content. * rt/net/sourceforge/jnlp/ShortcutDesc.java (ShortcutDesc): New function. Initialize requiresOnline and onDesktop. (isOnline): New function. Return true if the shortcut is online only. (onDesktop): New function. Return true if the shortcut should be placed on the desktop. (addMenu): New function. Add a menu descriptor for this shortcut. (getMenu): New function. Return the menu descriptor for this shortcut. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons. diffstat: 8 files changed, 445 insertions(+) ChangeLog | 43 ++++++ rt/net/sourceforge/jnlp/AssociationDesc.java | 56 ++++++++ rt/net/sourceforge/jnlp/InformationDesc.java | 27 ++++ rt/net/sourceforge/jnlp/MenuDesc.java | 38 +++++ rt/net/sourceforge/jnlp/Parser.java | 114 +++++++++++++++++ rt/net/sourceforge/jnlp/RelatedContentDesc.java | 93 +++++++++++++ rt/net/sourceforge/jnlp/ShortcutDesc.java | 70 ++++++++++ rt/net/sourceforge/jnlp/resources/Messages.properties | 4 diffs (truncated from 515 to 500 lines): diff -r ff13b7d6e330 -r 852af6e8bf0e ChangeLog --- a/ChangeLog Tue Jun 09 08:53:57 2009 -0400 +++ b/ChangeLog Tue Jun 09 14:08:52 2009 -0400 @@ -1,3 +1,46 @@ 2009-06-09 Gary Benson + + * rt/net/sourceforge/jnlp/AssociationDesc.java: New file. + (AssociationDesc): New function. Create an association descriptor. + (getExtensions): New function. Get the extensions for this association. + (getMimeType): New function. Get the mimetype for this association. + (checkMimeType): New function. + * rt/net/sourceforge/jnlp/InformationDesc.java + (getAssociations): New function. Get the associations. + (getShortcut): New function. Get the shortcut. + (getRelatedContents): New function. Get the related-contents. + * rt/net/sourceforge/jnlp/MenuDesc.java: New file. + (MenuDesc): New function. + (getSubMenu): New function. Get the submenu for this menu descriptor. + * rt/net/sourceforge/jnlp/Parser.java + (getInformationDesc): Parse "assocation", "shortcut" and + "related-content" elements. + (getAssociation): New function. Parse the association node to create a + AssociationDesc. + (getShortcut): New function. Parse the shortcut node to create a + ShortcutDesc. + (getMenu): New function. Parse a menu node to create a MenuDesc. + (getRelatedContent): New function. Parse a related-content node to create a + RelatedContentDesc. + * rt/net/sourceforge/jnlp/RelatedContentDesc.java + (RelatedContentDesc): New function. + (setTitle): New function. Set the title of this content. + (getTitle): New function. Get the title of this content. + (setDescription): New function. Set the description of this content. + (getDescription): New function. Get the description of this content. + (getLocation): New function. Get the location of this content. + (setIconDesc): New function. Set the icon descriptor for this content. + (getIcon): Get the icon descriptor for this content. + * rt/net/sourceforge/jnlp/ShortcutDesc.java + (ShortcutDesc): New function. Initialize requiresOnline and onDesktop. + (isOnline): New function. Return true if the shortcut is online only. + (onDesktop): New function. Return true if the shortcut should be placed on + the desktop. + (addMenu): New function. Add a menu descriptor for this shortcut. + (getMenu): New function. Return the menu descriptor for this shortcut. + * rt/net/sourceforge/jnlp/resources/Messages.properties: + Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons. + 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r ff13b7d6e330 -r 852af6e8bf0e rt/net/sourceforge/jnlp/AssociationDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/net/sourceforge/jnlp/AssociationDesc.java Tue Jun 09 14:08:52 2009 -0400 @@ -0,0 +1,56 @@ +// Copyright (C) 2009 Red Hat, Inc. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +package net.sourceforge.jnlp; + +public final class AssociationDesc { + + /** the extensions this application wants to register with */ + private String[] extensions; + + /** the mime type for the association */ + private String mimeType; + + public AssociationDesc(String mimeType, String[] extensions) throws ParseException { + checkMimeType(mimeType); + this.mimeType = mimeType; + this.extensions = extensions; + } + + /** + * Return the extensions for this association + */ + public String[] getExtensions() { + return extensions; + } + + /** + * Return the mimetype for this association + */ + public String getMimeType() { + return mimeType; + } + + /** + * Check for valid mimeType + * @param mimeType a mime type + * @throws ParseException if mimeType is an invalid MIME type + */ + private void checkMimeType(String mimeType) throws ParseException { + // TODO check that mime type is valid + } + +} diff -r ff13b7d6e330 -r 852af6e8bf0e rt/net/sourceforge/jnlp/InformationDesc.java --- a/rt/net/sourceforge/jnlp/InformationDesc.java Tue Jun 09 08:53:57 2009 -0400 +++ b/rt/net/sourceforge/jnlp/InformationDesc.java Tue Jun 09 14:08:52 2009 -0400 @@ -1,4 +1,5 @@ // Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// Copyright (C) 2009 Red Hat, Inc. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -200,6 +201,32 @@ public class InformationDesc { } /** + * Returns the associations specified in the JNLP file + */ + public AssociationDesc[] getAssociations() { + List associations = getItems("association"); + + return (AssociationDesc[]) associations.toArray(new AssociationDesc[associations.size()]); + } + + /** + * Returns the shortcut specified by this JNLP file + */ + public ShortcutDesc getShortcut() { + return (ShortcutDesc) getItem("shortcut"); + } + + /** + * Returns the related-contents specified by this JNLP file + */ + public RelatedContentDesc[] getRelatedContents() { + List relatedContents = getItems("related-content"); + + return (RelatedContentDesc[]) relatedContents.toArray( + new RelatedContentDesc[relatedContents.size()]); + } + + /** * Returns the last item matching the specified key. */ protected Object getItem(Object key) { diff -r ff13b7d6e330 -r 852af6e8bf0e rt/net/sourceforge/jnlp/MenuDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/net/sourceforge/jnlp/MenuDesc.java Tue Jun 09 14:08:52 2009 -0400 @@ -0,0 +1,38 @@ +// Copyright (C) 2009 Red Hat, Inc. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +package net.sourceforge.jnlp; + +public class MenuDesc { + + /** the submenu for this menu entry */ + private String subMenu; + + /** + * Create a new menu descriptor + */ + public MenuDesc(String subMenu) { + this.subMenu = subMenu; + } + + /** + * Returns the submenu for this menu entry. + */ + public String getSubMenu() { + return subMenu; + } + +} diff -r ff13b7d6e330 -r 852af6e8bf0e rt/net/sourceforge/jnlp/Parser.java --- a/rt/net/sourceforge/jnlp/Parser.java Tue Jun 09 08:53:57 2009 -0400 +++ b/rt/net/sourceforge/jnlp/Parser.java Tue Jun 09 14:08:52 2009 -0400 @@ -1,4 +1,5 @@ // Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// Copyright (C) 2009 Red Hat, Inc. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -435,6 +436,15 @@ class Parser { throw new ParseException(R("PSharing")); addInfo(info, child, null, Boolean.TRUE); } + if ("association".equals(name)) { + addInfo(info, child, null, getAssociation(child)); + } + if ("shortcut".equals(name)) { + addInfo(info, child, null, getShortcut(child)); + } + if ("related-content".equals(name)) { + addInfo(info, child, null, getRelatedContent(child)); + } child = child.getNextSibling(); } @@ -643,6 +653,110 @@ class Parser { return new InstallerDesc(main); } + /** + * Returns the association descriptor. + */ + public AssociationDesc getAssociation(Node node) throws ParseException { + String[] extensions = getRequiredAttribute(node, "extensions", null).split(" "); + String mimeType = getRequiredAttribute(node, "mime-type", null); + + return new AssociationDesc(mimeType, extensions); + } + + /** + * Returns the shortcut descriptor. + */ + public ShortcutDesc getShortcut(Node node) throws ParseException { + + String online = getAttribute(node, "online", "true"); + boolean shortcutIsOnline = Boolean.valueOf(online); + + boolean showOnDesktop = false; + MenuDesc menu = null; + + // step through the elements + Node child = node.getFirstChild(); + while (child != null) { + String name = child.getNodeName(); + + if ("desktop".equals(name)) { + if (showOnDesktop && strict) { + throw new ParseException(R("PTwoDesktops")); + } + showOnDesktop = true; + } else if ("menu".equals(name)){ + if (menu != null && strict) { + throw new ParseException(R("PTwoMenus")); + } + menu = getMenu(child); + } + + child = child.getNextSibling(); + } + + ShortcutDesc shortcut = new ShortcutDesc(shortcutIsOnline, showOnDesktop); + if (menu != null) { + shortcut.addMenu(menu); + } + return shortcut; + } + + /** + * Returns the menu descriptor. + */ + public MenuDesc getMenu(Node node) { + String subMenu = getAttribute(node, "submenu", null); + + return new MenuDesc(subMenu); + } + + + /** + * Returns the related-content descriptor. + */ + public RelatedContentDesc getRelatedContent(Node node) throws ParseException { + + getRequiredAttribute(node, "href", null); + URL location = getURL(node, "href", base); + + String title = null; + String description = null; + IconDesc icon = null; + + // step through the elements + Node child = node.getFirstChild(); + while (child != null) { + String name = child.getNodeName(); + + if ("title".equals(name)) { + if (title != null && strict) { + throw new ParseException(R("PTwoTitles")); + } + title = getSpanText(child); + } else if ("description".equals(name)) { + if (description != null && strict) { + throw new ParseException(R("PTwoDescriptions")); + } + description = getSpanText(child); + } else if ("icon".equals(name)) { + if (icon != null && strict) { + throw new ParseException(R("PTwoIcons")); + } + icon = getIcon(child); + } + + child = child.getNextSibling(); + } + + RelatedContentDesc relatedContent = new RelatedContentDesc(location); + relatedContent.setDescription(description); + relatedContent.setIconDesc(icon); + relatedContent.setTitle(title); + + return relatedContent; + + } + // other methods /** diff -r ff13b7d6e330 -r 852af6e8bf0e rt/net/sourceforge/jnlp/RelatedContentDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/net/sourceforge/jnlp/RelatedContentDesc.java Tue Jun 09 14:08:52 2009 -0400 @@ -0,0 +1,93 @@ +// Copyright (C) 2009 Red Hat, Inc. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +package net.sourceforge.jnlp; + +import java.net.URL; + +public class RelatedContentDesc { + + /** title of the content */ + private String title = null;; + + /** the description of the content */ + private String description = null; + + /** the location of the content */ + private URL location = null; + + /** the icon for this related content */ + private IconDesc icon = null; + + /** + * Create a related-content descriptor + * @param href the url of the related content + */ + public RelatedContentDesc(URL href) { + this.location = href; + } + + /** + * Set the title of this content + * @param title the title of this content + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * Returns the title of this content.. + */ + public String getTitle() { + return title; + } + + /** + * Set the description of this related content + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Returns the description of the related content + */ + public String getDescription() { + return description; + } + + /** + * Returns the location of the related content. Not null + */ + public URL getLocation() { + return location; + } + + /** + * Set the icon for this related content + */ + public void setIconDesc(IconDesc icon) { + this.icon = icon; + } + + /** + * Returns the icon descriptor for the realted content + */ + public IconDesc getIcon() { + return icon; + } + +} diff -r ff13b7d6e330 -r 852af6e8bf0e rt/net/sourceforge/jnlp/ShortcutDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/net/sourceforge/jnlp/ShortcutDesc.java Tue Jun 09 14:08:52 2009 -0400 @@ -0,0 +1,70 @@ +// Copyright (C) 2009 Red Hat, Inc. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +package net.sourceforge.jnlp; + +public final class ShortcutDesc { + + /** the application wants to be placed on the desktop */ + private boolean onDesktop = false; + + /** the application needs to be launched online */ + private boolean requiresOnline = true; + + /** the menu descriptor */ + private MenuDesc menu = null; + + /** + * Create a new Shortcut descriptor + * @param requiresOnline whether the shortcut requires connectivity + * @param onDesktop whether the shortcut wants to be placed on the desktop + */ + public ShortcutDesc(boolean requiresOnline, boolean onDesktop) { + this.requiresOnline = requiresOnline; + this.onDesktop = onDesktop; + } + + /** + * Returns whether the shortcut requires being online + */ + public boolean isOnline() { + return requiresOnline; + } + + /** + * Return whether the shortcut should be placed on the desktop + */ + public boolean onDesktop() { + return onDesktop; + } + + /** + * Add a shortcut to the 'start menu' + * (whatever that means on gnome/kde/other ...) + * @param menu if/what menu this shortcut should be added to + */ + public void addMenu(MenuDesc menu) { + this.menu = menu; + } + + /** + * Returns the menu this shortcut should be added to + */ + public MenuDesc getMenu() { + return menu; + } + From omajid at redhat.com Tue Jun 9 11:15:18 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Jun 2009 14:15:18 -0400 Subject: RFC: Netx - Parser support for shortcut, association and related-content elements In-Reply-To: <20090609160215.GA17330@redhat.com> References: <4A2D422A.8090202@redhat.com> <20090609160215.GA17330@redhat.com> Message-ID: <4A2EA6B6.60600@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-08 12:55]: >> Hi, >> >> The attached patch adds support to the JNLP parser for parsing >> association, shortcut and related-content elements from the JNLP file. >> > > Looks fine. New files are missing headers though. Please add them before > committing. > Done. Pushed as changeset 852af6e8bf0e in icedtea6. Thanks, Omair From bugzilla-daemon at icedtea.classpath.org Tue Jun 9 13:10:13 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 09 Jun 2009 20:10:13 +0000 Subject: [Bug 347] IcedTea plugin, JS function can't converted to JSObject Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=347 dbhole at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|dbhole at redhat.com |.org | ------- Comment #1 from dbhole at redhat.com 2009-06-09 20:10 ------- Is it possible to see the source code of this? Or at the very least, the source of webgears.applet.Main? I fixed the security exception, but am running into another exception now. getDesktop() (called via reflection from the plugin code) is returning an object of type webgears.applet.Main$1 instead of webgears.desktop.Desktop .. and that further cascades into a failure. I want to see why it is not retuning an object ot type webgears.desktop.Desktop ... -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Tue Jun 9 14:08:29 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Jun 2009 17:08:29 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <20090608225621.GB21227@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> <4A27DC10.9070600@redhat.com> <20090604214722.GA29542@redhat.com> <4A296FF5.2020703@redhat.com> <20090608225621.GB21227@redhat.com> Message-ID: <4A2ECF4D.3050608@redhat.com> Deepak Bhole wrote: > You can fix this by adding a check for -jar like others, but rather than > excluding specific items, it would be better to check for allowed > items. java-vm-args accepts only certain args: > > http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html > > (scroll to resources element). > > This covers any future arguments that might get added to java that allow > classpath specification. > Fixed checkVMArgs(). It now compares the arguments to the list of supported arguments. Also switched from invoking java directly to relying on the javaws launcher (and pasing the arguments through -J-Xms format) to reset the classpath. 2009-06-09 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (needsNewJVM): New function. Returns true if the JNLP file requires creating a new JVM. (getNewVMArgs): New function. Returns arguments to pass to the new JVM. * rt/net/sourceforge/jnlp/JREDesc.java (getVMArgs): Fix javadoc to reflect that return value can be null. * rt/net/sourceforge/jnlp/Launcher.java (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to Netx. Try to use the local file to launch this instance if possible. (launchExternal): Delegate to new launchExternal. (launchExternal): New method. Take in arguments to pass to the JVM and arguments to pass to Netx. Launch Netx with the with the appropriate arguments. (launchApplication): If needed, launch a new JVM and pass along the Netx arguments. * rt/net/sourceforge/jnlp/Parser.java: (getJRE): Call checkVMArgs to check 'java-vm-args' for security. If that fails, assume 'java-vm-args' is null. (checkVMArgs): New method. Check that the vmArgs variable contains safe arguments only. (getValidVMArguments): New method. (getValidStartingVMArguments): New method. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * rt/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. Set initial arguments. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Add forksAllowed to store whether creating a new JVM is allowed. Add initialArguments to store the arguments to Netx. (getForksAllowed): New function. Check if creating a new JVM is allowed. (setForksAllowed): New function. Set whether creating a JVM is allowed. (setInitialArguments): New function. Store the arguments passed to Netx. (getInitialArguments): New function. Return the arguments passed to Netx. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 20173 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090609/c441e070/netx-jvm-args.patch From xerxes at zafena.se Wed Jun 10 04:59:52 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 10 Jun 2009 13:59:52 +0200 Subject: RFC: [patch] Zero/Shark -Xcheck:jni fix for pr 323 Message-ID: <4A2FA038.8040503@zafena.se> The attached patch fixes icedtea pr 323 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=323 2009-06-10 Xerxes R?nby PR icedtea/323 * patches/icedtea-zero.patch (JNIHandles::is_frame_handle) Changed stack boundary during compare to include the whole zero stack. Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: pr323.patch Type: text/x-patch Size: 847 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090610/8ec52436/pr323.patch From xerxes at zafena.se Wed Jun 10 05:13:15 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Wed, 10 Jun 2009 12:13:15 +0000 Subject: changeset in /hg/icedtea6: PR icedtea/323 Message-ID: changeset 188882817ac2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=188882817ac2 description: PR icedtea/323 * patches/icedtea-zero.patch (JNIHandles::is_frame_handle) Changed stack boundary during compare to include the whole zero stack. diffstat: 2 files changed, 23 insertions(+) ChangeLog | 7 +++++++ patches/icedtea-zero.patch | 16 ++++++++++++++++ diffs (37 lines): diff -r 852af6e8bf0e -r 188882817ac2 ChangeLog --- a/ChangeLog Tue Jun 09 14:08:52 2009 -0400 +++ b/ChangeLog Wed Jun 10 14:13:59 2009 +0200 @@ -1,3 +1,10 @@ 2009-06-09 Omair Majid + + PR icedtea/323 + * patches/icedtea-zero.patch + (JNIHandles::is_frame_handle) Changed stack boundary + during compare to include the whole zero stack. + 2009-06-09 Omair Majid * rt/net/sourceforge/jnlp/AssociationDesc.java: New file. diff -r 852af6e8bf0e -r 188882817ac2 patches/icedtea-zero.patch --- a/patches/icedtea-zero.patch Tue Jun 09 14:08:52 2009 -0400 +++ b/patches/icedtea-zero.patch Wed Jun 10 14:13:59 2009 +0200 @@ -221,3 +221,19 @@ } } +Index: openjdk/hotspot/src/share/vm/runtime/jniHandles.cpp +=================================================================== +--- openjdk/hotspot/src/share/vm/runtime/jniHandles.cpp.orig 2009-06-10 11:30:46.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/runtime/jniHandles.cpp 2009-06-10 11:37:07.000000000 +0200 +@@ -173,7 +173,11 @@ + // is not permitted. + return (thr->has_last_Java_frame() && + (void*)obj < (void*)thr->stack_base() && ++#ifdef ZERO ++ (void*)obj >= (void*)os::current_stack_pointer()); ++#else + (void*)obj >= (void*)thr->last_Java_sp()); ++#endif // ZERO + } + + From gbenson at redhat.com Wed Jun 10 05:20:57 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 12:20:57 +0000 Subject: changeset in /hg/icedtea6: 2009-06-10 Gary Benson changeset ce70ed27635c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ce70ed27635c description: 2009-06-10 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::CallType): Removed. (SharkTopLevelBlock::get_call_type): Likewise. (SharkTopLevelBlock::get_callee): Likewise. (SharkTopLevelBlock::improve_virtual_call): New method. (SharkTopLevelBlock::get_virtual_callee): Updated. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Updated call traps. (SharkTopLevelBlock::get_call_type): Removed. (SharkTopLevelBlock::get_callee): Likewise. (SharkTopLevelBlock::improve_virtual_call): New method. (SharkTopLevelBlock::get_virtual_callee): Updated. (SharkTopLevelBlock::do_call): Replaced callee selection. diffstat: 3 files changed, 155 insertions(+), 85 deletions(-) ChangeLog | 16 + ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 208 +++++++++------ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 16 - diffs (329 lines): diff -r 188882817ac2 -r ce70ed27635c ChangeLog --- a/ChangeLog Wed Jun 10 14:13:59 2009 +0200 +++ b/ChangeLog Wed Jun 10 13:22:21 2009 +0100 @@ -1,3 +1,19 @@ 2009-06-10 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::CallType): Removed. + (SharkTopLevelBlock::get_call_type): Likewise. + (SharkTopLevelBlock::get_callee): Likewise. + (SharkTopLevelBlock::improve_virtual_call): New method. + (SharkTopLevelBlock::get_virtual_callee): Updated. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Updated call traps. + (SharkTopLevelBlock::get_call_type): Removed. + (SharkTopLevelBlock::get_callee): Likewise. + (SharkTopLevelBlock::improve_virtual_call): New method. + (SharkTopLevelBlock::get_virtual_callee): Updated. + (SharkTopLevelBlock::do_call): Replaced callee selection. + 2009-06-10 Xerxes R??nby PR icedtea/323 diff -r 188882817ac2 -r ce70ed27635c ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 14:13:59 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 13:22:21 2009 +0100 @@ -75,37 +75,13 @@ void SharkTopLevelBlock::scan_for_traps( } break; + case Bytecodes::_invokestatic: + case Bytecodes::_invokespecial: case Bytecodes::_invokevirtual: - method = iter()->get_method(will_link); - assert(will_link, "typeflow responsibility"); - - // If this is a non-final invokevirtual then we need to - // check that its holder is linked, because its vtable - // won't have been set up otherwise. - if (!method->is_final_method() && !method->holder()->is_linked()) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } - break; - case Bytecodes::_invokeinterface: method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); - // Handle 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 legal corner case in the spec, and while javac does not - // generate this code there's no reason a compliant Java - // compiler should not. See cpCacheOop.cpp and - // interpreterRuntime.cpp for more details. - if (method->holder() == function()->env()->Object_klass()) - Unimplemented(); - - // Bail out if the holder is unloaded if (!method->holder()->is_linked()) { set_trap( Deoptimization::make_trap_request( @@ -841,39 +817,78 @@ void SharkTopLevelBlock::do_switch() } } -// Figure out what type of call this is. -// - Direct calls are where the callee is fixed. -// - Interface and Virtual calls require lookup at runtime. -// NB some invokevirtuals can be resolved to direct calls. -SharkTopLevelBlock::CallType SharkTopLevelBlock::get_call_type(ciMethod* method) -{ - if (bc() == Bytecodes::_invokeinterface) - return CALL_INTERFACE; - else if (bc() == Bytecodes::_invokevirtual && !method->is_final_method()) - return CALL_VIRTUAL; - else - return CALL_DIRECT; -} - -Value *SharkTopLevelBlock::get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver) -{ - switch (call_type) { - case CALL_DIRECT: - return get_direct_callee(method); - case CALL_VIRTUAL: - return get_virtual_callee(receiver, method); - case CALL_INTERFACE: - return get_interface_callee(receiver, method); - default: - ShouldNotReachHere(); - } -} - -// Direct calls can be made when the callee is fixed. -// invokestatic and invokespecial are always direct; -// invokevirtual is direct in some circumstances. +ciMethod* SharkTopLevelBlock::improve_virtual_call(ciMethod* caller, + ciInstanceKlass* klass, + ciMethod* dest_method, + ciType* receiver_type) +{ + // If the method is obviously final then we are already done + if (dest_method->can_be_statically_bound()) + return dest_method; + + // Array methods are all inherited from Object and are monomorphic + if (receiver_type->is_array_klass() && + dest_method->holder() == function()->env()->Object_klass()) + return dest_method; + + // All other interesting cases are instance classes + if (!receiver_type->is_instance_klass()) + return NULL; + + // Attempt to improve the receiver + ciInstanceKlass* actual_receiver = klass; + ciInstanceKlass *improved_receiver = receiver_type->as_instance_klass(); + if (improved_receiver->is_loaded() && + improved_receiver->is_initialized() && + !improved_receiver->is_interface() && + improved_receiver->is_subtype_of(actual_receiver)) { + actual_receiver = improved_receiver; + } + + // Attempt to find a monomorphic target for this call using + // class heirachy analysis. + ciInstanceKlass *calling_klass = caller->holder(); + ciMethod* monomorphic_target = + dest_method->find_monomorphic_target(calling_klass, klass, actual_receiver); + if (monomorphic_target != NULL) { + assert(!monomorphic_target->is_abstract(), "shouldn't be"); + + // Opto has a bunch of type checking here that I don't + // understand. It's to inhibit casting in one direction, + // possibly because objects in Opto can have inexact + // types, but I can't even tell which direction it + // doesn't like. For now I'm going to block *any* cast. + if (monomorphic_target != dest_method) { +#ifndef PRODUCT + tty->print_cr("found monomorphic target, but inhibited cast:"); + tty->print(" dest_method = "); + dest_method->print_short_name(tty); + tty->cr(); + tty->print(" monomorphic_target = "); + monomorphic_target->print_short_name(tty); + tty->cr(); +#endif // !PRODUCT + monomorphic_target = NULL; + } + } + + // Replace the virtual call with a direct one. This makes + // us dependent on that target method not getting overridden + // by dynamic class loading. + if (monomorphic_target != NULL) { + function()->env()->dependencies()->assert_unique_concrete_method( + actual_receiver, monomorphic_target); + return monomorphic_target; + } + + // Because Opto distinguishes exact types from inexact ones + // it can perform a further optimization to replace calls + // with non-monomorphic targets if the receiver has an exact + // type. We don't mark types this way, so we can't do this. + + return NULL; +} + Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { return builder()->CreateBitCast( @@ -882,9 +897,8 @@ Value *SharkTopLevelBlock::get_direct_ca "callee"); } -// Non-direct virtual calls are handled here Value *SharkTopLevelBlock::get_virtual_callee(SharkValue* receiver, - ciMethod* method) + int vtable_index) { Value *klass = builder()->CreateValueOfStructEntry( receiver->jobject_value(), @@ -898,11 +912,10 @@ Value *SharkTopLevelBlock::get_virtual_c SharkType::methodOop_type(), vtableEntry::size() * wordSize, in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - LLVMValue::intptr_constant(method->vtable_index())), + LLVMValue::intptr_constant(vtable_index)), "callee"); } -// Interface calls are handled here Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver, ciMethod* method) { @@ -1013,31 +1026,78 @@ Value* SharkTopLevelBlock::get_interface void SharkTopLevelBlock::do_call() { + // Set frequently used booleans + bool is_static = bc() == Bytecodes::_invokestatic; + bool is_virtual = bc() == Bytecodes::_invokevirtual; + bool is_interface = bc() == Bytecodes::_invokeinterface; + + // Find the method being called bool will_link; - ciMethod *method = iter()->get_method(will_link); + ciMethod *dest_method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); - - // Figure out what type of call this is - CallType call_type = get_call_type(method); + assert(dest_method->is_static() == is_static, "must match bc"); + + // Find the class of the method being called. Note + // that the superclass check in the second assertion + // is to cope with a hole in the spec that allows for + // invokeinterface instructions where the resolved + // method is a virtual method in java.lang.Object. + // javac doesn't generate code like that, but there's + // no reason a compliant Java compiler might not. + ciInstanceKlass *holder_klass = dest_method->holder(); + assert(holder_klass->is_loaded(), "scan_for_traps responsibility"); + assert(holder_klass->is_interface() || + holder_klass->super() == NULL || + !is_interface, "must match bc"); + ciKlass *holder = iter()->get_declared_method_holder(); + ciInstanceKlass *klass = + ciEnv::get_instance_klass_for_declared_method_holder(holder); // Find the receiver in the stack. We do this before // trying to inline because the inliner can only use // zero-checked values, not being able to perform the // check itself. SharkValue *receiver = NULL; - if (bc() != Bytecodes::_invokestatic) { - receiver = xstack(method->arg_size() - 1); + if (!is_static) { + receiver = xstack(dest_method->arg_size() - 1); check_null(receiver); } + // Try to improve non-direct calls + bool call_is_virtual = is_virtual || is_interface; + ciMethod *call_method = dest_method; + if (call_is_virtual) { + ciMethod *optimized_method = improve_virtual_call( + target(), klass, dest_method, receiver->type()); + if (optimized_method) { + call_method = optimized_method; + call_is_virtual = false; + } + } + // Try to inline the call - if (call_type == CALL_DIRECT) { - if (SharkInliner::attempt_inline(method, current_state(), thread())) + if (!call_is_virtual) { + if (SharkInliner::attempt_inline(call_method, current_state(), thread())) return; } // Find the method we are calling - Value *callee = get_callee(call_type, method, receiver); + Value *callee; + if (call_is_virtual) { + if (is_virtual) { + int vtable_index = call_method->resolve_vtable_index( + target()->holder(), klass); + assert(vtable_index >= 0, "should be"); + callee = get_virtual_callee(receiver, vtable_index); + } + else { + assert(is_interface, "should be"); + callee = get_interface_callee(receiver, call_method); + } + } + else { + callee = get_direct_callee(call_method); + } // Load the SharkEntry from the callee Value *base_pc = builder()->CreateValueOfStructEntry( @@ -1056,9 +1116,9 @@ void SharkTopLevelBlock::do_call() "entry_point"); // Make the call - current_state()->decache_for_Java_call(method); + current_state()->decache_for_Java_call(call_method); builder()->CreateCall3(entry_point, callee, base_pc, thread()); - current_state()->cache_after_Java_call(method); + current_state()->cache_after_Java_call(call_method); // Check for pending exceptions check_pending_exception(EX_CHECK_FULL); diff -r 188882817ac2 -r ce70ed27635c ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 14:13:59 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 13:22:21 2009 +0100 @@ -371,18 +371,12 @@ class SharkTopLevelBlock : public SharkB // invoke* private: - enum CallType { - CALL_DIRECT, - CALL_VIRTUAL, - CALL_INTERFACE - }; - CallType get_call_type(ciMethod* method); - llvm::Value* get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver); - + ciMethod* improve_virtual_call(ciMethod* caller, + ciInstanceKlass* klass, + ciMethod* dest_method, + ciType* receiver_type); llvm::Value* get_direct_callee(ciMethod* method); - llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); + llvm::Value* get_virtual_callee(SharkValue* receiver, int vtable_index); llvm::Value* get_interface_callee(SharkValue* receiver, ciMethod* method); void do_call(); From gbenson at redhat.com Wed Jun 10 05:30:47 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 13:30:47 +0100 Subject: Shark invoke* improvements Message-ID: <20090610123047.GA26952@redhat.com> Hi all, The work I've done over the past week has made the callee-fetching part of Shark's invoke* bytecodes a lot less like the interpreter's and a lot more like the Server compiler's. This has allowed me to drop in a block of code from Server that uses class heirachy analysis to convert virtual calls to direct ones. Now, the difference here is fairly small (callee-fetching is just two loads for a virtual call against one for a direct) but direct calls can be inlined -- and an inlined call is a vast performance boost on Shark where calls are expensive. I ran SPECjvm98 on this one. Most of the benchmarks improved slightly, except the mtrt one which improved by 120%! Turns out it has an awful lot of inlinable virtual calls :) Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 188882817ac2 -r ce70ed27635c ChangeLog --- a/ChangeLog Wed Jun 10 14:13:59 2009 +0200 +++ b/ChangeLog Wed Jun 10 13:22:21 2009 +0100 @@ -1,3 +1,19 @@ +2009-06-10 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::CallType): Removed. + (SharkTopLevelBlock::get_call_type): Likewise. + (SharkTopLevelBlock::get_callee): Likewise. + (SharkTopLevelBlock::improve_virtual_call): New method. + (SharkTopLevelBlock::get_virtual_callee): Updated. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Updated call traps. + (SharkTopLevelBlock::get_call_type): Removed. + (SharkTopLevelBlock::get_callee): Likewise. + (SharkTopLevelBlock::improve_virtual_call): New method. + (SharkTopLevelBlock::get_virtual_callee): Updated. + (SharkTopLevelBlock::do_call): Replaced callee selection. + 2009-06-10 Xerxes R?nby PR icedtea/323 diff -r 188882817ac2 -r ce70ed27635c ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 14:13:59 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 13:22:21 2009 +0100 @@ -75,37 +75,13 @@ } break; + case Bytecodes::_invokestatic: + case Bytecodes::_invokespecial: case Bytecodes::_invokevirtual: - method = iter()->get_method(will_link); - assert(will_link, "typeflow responsibility"); - - // If this is a non-final invokevirtual then we need to - // check that its holder is linked, because its vtable - // won't have been set up otherwise. - if (!method->is_final_method() && !method->holder()->is_linked()) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } - break; - case Bytecodes::_invokeinterface: method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); - // Handle 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 legal corner case in the spec, and while javac does not - // generate this code there's no reason a compliant Java - // compiler should not. See cpCacheOop.cpp and - // interpreterRuntime.cpp for more details. - if (method->holder() == function()->env()->Object_klass()) - Unimplemented(); - - // Bail out if the holder is unloaded if (!method->holder()->is_linked()) { set_trap( Deoptimization::make_trap_request( @@ -841,39 +817,78 @@ } } -// Figure out what type of call this is. -// - Direct calls are where the callee is fixed. -// - Interface and Virtual calls require lookup at runtime. -// NB some invokevirtuals can be resolved to direct calls. -SharkTopLevelBlock::CallType SharkTopLevelBlock::get_call_type(ciMethod* method) +ciMethod* SharkTopLevelBlock::improve_virtual_call(ciMethod* caller, + ciInstanceKlass* klass, + ciMethod* dest_method, + ciType* receiver_type) { - if (bc() == Bytecodes::_invokeinterface) - return CALL_INTERFACE; - else if (bc() == Bytecodes::_invokevirtual && !method->is_final_method()) - return CALL_VIRTUAL; - else - return CALL_DIRECT; + // If the method is obviously final then we are already done + if (dest_method->can_be_statically_bound()) + return dest_method; + + // Array methods are all inherited from Object and are monomorphic + if (receiver_type->is_array_klass() && + dest_method->holder() == function()->env()->Object_klass()) + return dest_method; + + // All other interesting cases are instance classes + if (!receiver_type->is_instance_klass()) + return NULL; + + // Attempt to improve the receiver + ciInstanceKlass* actual_receiver = klass; + ciInstanceKlass *improved_receiver = receiver_type->as_instance_klass(); + if (improved_receiver->is_loaded() && + improved_receiver->is_initialized() && + !improved_receiver->is_interface() && + improved_receiver->is_subtype_of(actual_receiver)) { + actual_receiver = improved_receiver; + } + + // Attempt to find a monomorphic target for this call using + // class heirachy analysis. + ciInstanceKlass *calling_klass = caller->holder(); + ciMethod* monomorphic_target = + dest_method->find_monomorphic_target(calling_klass, klass, actual_receiver); + if (monomorphic_target != NULL) { + assert(!monomorphic_target->is_abstract(), "shouldn't be"); + + // Opto has a bunch of type checking here that I don't + // understand. It's to inhibit casting in one direction, + // possibly because objects in Opto can have inexact + // types, but I can't even tell which direction it + // doesn't like. For now I'm going to block *any* cast. + if (monomorphic_target != dest_method) { +#ifndef PRODUCT + tty->print_cr("found monomorphic target, but inhibited cast:"); + tty->print(" dest_method = "); + dest_method->print_short_name(tty); + tty->cr(); + tty->print(" monomorphic_target = "); + monomorphic_target->print_short_name(tty); + tty->cr(); +#endif // !PRODUCT + monomorphic_target = NULL; + } + } + + // Replace the virtual call with a direct one. This makes + // us dependent on that target method not getting overridden + // by dynamic class loading. + if (monomorphic_target != NULL) { + function()->env()->dependencies()->assert_unique_concrete_method( + actual_receiver, monomorphic_target); + return monomorphic_target; + } + + // Because Opto distinguishes exact types from inexact ones + // it can perform a further optimization to replace calls + // with non-monomorphic targets if the receiver has an exact + // type. We don't mark types this way, so we can't do this. + + return NULL; } -Value *SharkTopLevelBlock::get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver) -{ - switch (call_type) { - case CALL_DIRECT: - return get_direct_callee(method); - case CALL_VIRTUAL: - return get_virtual_callee(receiver, method); - case CALL_INTERFACE: - return get_interface_callee(receiver, method); - default: - ShouldNotReachHere(); - } -} - -// Direct calls can be made when the callee is fixed. -// invokestatic and invokespecial are always direct; -// invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { return builder()->CreateBitCast( @@ -882,9 +897,8 @@ "callee"); } -// Non-direct virtual calls are handled here Value *SharkTopLevelBlock::get_virtual_callee(SharkValue* receiver, - ciMethod* method) + int vtable_index) { Value *klass = builder()->CreateValueOfStructEntry( receiver->jobject_value(), @@ -898,11 +912,10 @@ SharkType::methodOop_type(), vtableEntry::size() * wordSize, in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - LLVMValue::intptr_constant(method->vtable_index())), + LLVMValue::intptr_constant(vtable_index)), "callee"); } -// Interface calls are handled here Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver, ciMethod* method) { @@ -1013,31 +1026,78 @@ void SharkTopLevelBlock::do_call() { + // Set frequently used booleans + bool is_static = bc() == Bytecodes::_invokestatic; + bool is_virtual = bc() == Bytecodes::_invokevirtual; + bool is_interface = bc() == Bytecodes::_invokeinterface; + + // Find the method being called bool will_link; - ciMethod *method = iter()->get_method(will_link); + ciMethod *dest_method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); + assert(dest_method->is_static() == is_static, "must match bc"); - // Figure out what type of call this is - CallType call_type = get_call_type(method); + // Find the class of the method being called. Note + // that the superclass check in the second assertion + // is to cope with a hole in the spec that allows for + // invokeinterface instructions where the resolved + // method is a virtual method in java.lang.Object. + // javac doesn't generate code like that, but there's + // no reason a compliant Java compiler might not. + ciInstanceKlass *holder_klass = dest_method->holder(); + assert(holder_klass->is_loaded(), "scan_for_traps responsibility"); + assert(holder_klass->is_interface() || + holder_klass->super() == NULL || + !is_interface, "must match bc"); + ciKlass *holder = iter()->get_declared_method_holder(); + ciInstanceKlass *klass = + ciEnv::get_instance_klass_for_declared_method_holder(holder); // Find the receiver in the stack. We do this before // trying to inline because the inliner can only use // zero-checked values, not being able to perform the // check itself. SharkValue *receiver = NULL; - if (bc() != Bytecodes::_invokestatic) { - receiver = xstack(method->arg_size() - 1); + if (!is_static) { + receiver = xstack(dest_method->arg_size() - 1); check_null(receiver); } + // Try to improve non-direct calls + bool call_is_virtual = is_virtual || is_interface; + ciMethod *call_method = dest_method; + if (call_is_virtual) { + ciMethod *optimized_method = improve_virtual_call( + target(), klass, dest_method, receiver->type()); + if (optimized_method) { + call_method = optimized_method; + call_is_virtual = false; + } + } + // Try to inline the call - if (call_type == CALL_DIRECT) { - if (SharkInliner::attempt_inline(method, current_state(), thread())) + if (!call_is_virtual) { + if (SharkInliner::attempt_inline(call_method, current_state(), thread())) return; } // Find the method we are calling - Value *callee = get_callee(call_type, method, receiver); + Value *callee; + if (call_is_virtual) { + if (is_virtual) { + int vtable_index = call_method->resolve_vtable_index( + target()->holder(), klass); + assert(vtable_index >= 0, "should be"); + callee = get_virtual_callee(receiver, vtable_index); + } + else { + assert(is_interface, "should be"); + callee = get_interface_callee(receiver, call_method); + } + } + else { + callee = get_direct_callee(call_method); + } // Load the SharkEntry from the callee Value *base_pc = builder()->CreateValueOfStructEntry( @@ -1056,9 +1116,9 @@ "entry_point"); // Make the call - current_state()->decache_for_Java_call(method); + current_state()->decache_for_Java_call(call_method); builder()->CreateCall3(entry_point, callee, base_pc, thread()); - current_state()->cache_after_Java_call(method); + current_state()->cache_after_Java_call(call_method); // Check for pending exceptions check_pending_exception(EX_CHECK_FULL); diff -r 188882817ac2 -r ce70ed27635c ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 14:13:59 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 13:22:21 2009 +0100 @@ -371,18 +371,12 @@ // invoke* private: - enum CallType { - CALL_DIRECT, - CALL_VIRTUAL, - CALL_INTERFACE - }; - CallType get_call_type(ciMethod* method); - llvm::Value* get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver); - + ciMethod* improve_virtual_call(ciMethod* caller, + ciInstanceKlass* klass, + ciMethod* dest_method, + ciType* receiver_type); llvm::Value* get_direct_callee(ciMethod* method); - llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); + llvm::Value* get_virtual_callee(SharkValue* receiver, int vtable_index); llvm::Value* get_interface_callee(SharkValue* receiver, ciMethod* method); void do_call(); From xerxes at zafena.se Wed Jun 10 06:10:13 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 10 Jun 2009 15:10:13 +0200 Subject: RFC: [patch] Zero/Shark -Xcheck:jni fix for pr 323 In-Reply-To: <4A2FA038.8040503@zafena.se> References: <4A2FA038.8040503@zafena.se> Message-ID: <4A2FB0B5.8000603@zafena.se> Xerxes R?nby skrev: > The attached patch fixes icedtea pr 323 > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=323 > > 2009-06-10 Xerxes R?nby > > PR icedtea/323 > * patches/icedtea-zero.patch > (JNIHandles::is_frame_handle) Changed stack boundary > during compare to include the whole zero stack. > > > Cheers > Xerxes Some quotes from IRC to clarify why this patch got almost /instantly /committed after the RFC request: #classpath / irc.freenode.net (14.33.28) xranby: gbenson: hi, i posted a patch for you to review on the mailinglist a minute ago (14.33.56) gbenson: xranby: ah, was it for review, commit away :) (14.34.25) xranby: gbenson: thanks, commiting. (14.35.03) xranby: pushed Have a great day! Xerxes From dbhole at redhat.com Wed Jun 10 06:54:22 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 10 Jun 2009 09:54:22 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <4A2ECF4D.3050608@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> <4A27DC10.9070600@redhat.com> <20090604214722.GA29542@redhat.com> <4A296FF5.2020703@redhat.com> <20090608225621.GB21227@redhat.com> <4A2ECF4D.3050608@redhat.com> Message-ID: <20090610135422.GA11916@redhat.com> * Omair Majid [2009-06-09 17:08]: Looks good. You may want to print a warning on stderr stating that vmargs are being dropped to null and why (instead of just setting them null and proceeding). But that's your call. Either way, good to commit. Cheers, Deepak -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-jvm-args.patch Type: text/x-patch Size: 20220 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090610/b3b6a51c/netx-jvm-args.patch From omajid at redhat.com Wed Jun 10 07:54:10 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Jun 2009 14:54:10 +0000 Subject: changeset in /hg/icedtea6: 2009-06-10 Omair Majid changeset c68aaf028ad2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c68aaf028ad2 description: 2009-06-10 Omair Majid * rt/net/sourceforge/jnlp/services/XBasicService.java (isOffline): Check if the system is offline by retrieving data from a URL. (findFirstURLFromJNLPFile): New function. Obtain a URL from the JNLP file. As a last resort, return an arbitrary known URL. diffstat: 2 files changed, 76 insertions(+), 9 deletions(-) ChangeLog | 7 + rt/net/sourceforge/jnlp/services/XBasicService.java | 78 ++++++++++++++++--- diffs (109 lines): diff -r ce70ed27635c -r c68aaf028ad2 ChangeLog --- a/ChangeLog Wed Jun 10 13:22:21 2009 +0100 +++ b/ChangeLog Wed Jun 10 10:53:03 2009 -0400 @@ -1,3 +1,10 @@ 2009-06-10 Gary Benson + + * rt/net/sourceforge/jnlp/services/XBasicService.java + (isOffline): Check if the system is offline by retrieving data from a URL. + (findFirstURLFromJNLPFile): New function. Obtain a URL from the JNLP file. + As a last resort, return an arbitrary known URL. + 2009-06-10 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r ce70ed27635c -r c68aaf028ad2 rt/net/sourceforge/jnlp/services/XBasicService.java --- a/rt/net/sourceforge/jnlp/services/XBasicService.java Wed Jun 10 13:22:21 2009 +0100 +++ b/rt/net/sourceforge/jnlp/services/XBasicService.java Wed Jun 10 10:53:03 2009 -0400 @@ -17,14 +17,21 @@ package net.sourceforge.jnlp.services; -import java.io.*; -import java.net.*; -import javax.jnlp.*; -import javax.swing.*; - -import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.runtime.*; -import net.sourceforge.jnlp.util.*; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import javax.jnlp.BasicService; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +import net.sourceforge.jnlp.InformationDesc; +import net.sourceforge.jnlp.JARDesc; +import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.Launcher; +import net.sourceforge.jnlp.runtime.ApplicationInstance; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.util.PropertiesFile; /** * The BasicService JNLP service. @@ -81,7 +88,60 @@ class XBasicService implements BasicServ * Return true if the Environment is Offline */ public boolean isOffline() { - return false; + + URL url = findFirstURLFromJNLPFile(); + + try { + url.openConnection().getInputStream().close(); + return false; + } catch (IOException exception) { + return true; + } + } + + /** + * Return the first URL from the jnlp file + * Or a default URL if no url found in JNLP file + */ + private URL findFirstURLFromJNLPFile() { + + ApplicationInstance app = JNLPRuntime.getApplication(); + + if (app != null) { + JNLPFile jnlpFile = app.getJNLPFile(); + + URL sourceURL = jnlpFile.getSourceLocation(); + if (sourceURL != null) { + return sourceURL; + } + + URL codeBaseURL = jnlpFile.getCodeBase(); + if (codeBaseURL != null) { + return codeBaseURL; + } + + InformationDesc informationDesc = jnlpFile.getInformation(); + URL homePage = informationDesc.getHomepage(); + if (homePage != null) { + return homePage; + } + + JARDesc[] jarDescs = jnlpFile.getResources().getJARs(); + for (JARDesc jarDesc: jarDescs) { + return jarDesc.getLocation(); + } + } + + // this section is only reached if the jnlp file has no jars. + // that doesnt seem very likely. + URL arbitraryURL; + try { + arbitraryURL = new URL("http://icedtea.classpath.org"); + } catch (MalformedURLException malformedURL) { + throw new RuntimeException(malformedURL); + } + + return arbitraryURL; } /** From omajid at redhat.com Wed Jun 10 08:30:56 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Jun 2009 11:30:56 -0400 Subject: RFC: Netx - Fix BasicService.isOffline() In-Reply-To: <20090609180037.GA3528@redhat.com> References: <4A2D819D.9060604@redhat.com> <20090609180037.GA3528@redhat.com> Message-ID: <4A2FD1B0.1010406@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-08 17:25]: >> Hi, >> >> The attached patch implements XBasicService.isOffline(). >> >> ChangeLog >> 2009-06-08 Omair Majid >> >> * rt/net/sourceforge/jnlp/services/XBasicService.java >> (isOffline): Check if the system is offline by retrieving data from >> a URL. >> (findFirstURLFromJNLPFile): New function. Obtain a URL from the JNLP >> file. As a last resort, return an arbitrary known URL. >> >> Any comments? >> > > Looks good to me! > Committed and pushed. changeset c68aaf028ad2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c68aaf028ad2 description: 2009-06-10 Omair Majid * rt/net/sourceforge/jnlp/services/XBasicService.java (isOffline): Check if the system is offline by retrieving data from a URL. (findFirstURLFromJNLPFile): New function. Obtain a URL from the JNLP file. As a last resort, return an arbitrary known URL. Thanks, Omair From omajid at redhat.com Wed Jun 10 09:00:00 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Jun 2009 16:00:00 +0000 Subject: changeset in /hg/icedtea6: 2009-06-10 Omair Majid changeset 0b4d2e77cf97 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0b4d2e77cf97 description: 2009-06-10 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (needsNewJVM): New function. Returns true if the JNLP file requires creating a new JVM. (getNewVMArgs): New function. Returns arguments to pass to the new JVM. * rt/net/sourceforge/jnlp/JREDesc.java (getVMArgs): Fix javadoc to reflect that return value can be null. * rt/net/sourceforge/jnlp/Launcher.java (launchExternal): Modify to take in arguments to pass to the JVM and arguments to pass to Netx. Try to use the local file to launch this instance if possible. (launchExternal): Delegate to new launchExternal. (launchExternal): New method. Take in arguments to pass to the JVM and arguments to pass to Netx. Launch Netx with the with the appropriate arguments. (launchApplication): If needed, launch a new JVM and pass along the Netx arguments. * rt/net/sourceforge/jnlp/Parser.java: (getJRE): Call checkVMArgs to check 'java-vm-args' for security. If that fails, assume 'java-vm-args' is null. (checkVMArgs): New method. Check that the vmArgs variable contains safe arguments only. (getValidVMArguments): New method. (getValidStartingVMArguments): New method. * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * rt/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. Set initial arguments. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Add forksAllowed to store whether creating a new JVM is allowed. Add initialArguments to store the arguments to Netx. (getForksAllowed): New function. Check if creating a new JVM is allowed. (setForksAllowed): New function. Set whether creating a JVM is allowed. (setInitialArguments): New function. Store the arguments passed to Netx. (getInitialArguments): New function. Return the arguments passed to Netx. diffstat: 8 files changed, 326 insertions(+), 41 deletions(-) ChangeLog | 37 +++++ rt/net/sourceforge/jnlp/JNLPFile.java | 63 ++++++++- rt/net/sourceforge/jnlp/JREDesc.java | 1 rt/net/sourceforge/jnlp/Launcher.java | 109 +++++++++++----- rt/net/sourceforge/jnlp/Parser.java | 112 +++++++++++++++++ rt/net/sourceforge/jnlp/resources/Messages.properties | 1 rt/net/sourceforge/jnlp/runtime/Boot.java | 9 + rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 35 +++++ diffs (truncated from 539 to 500 lines): diff -r c68aaf028ad2 -r 0b4d2e77cf97 ChangeLog --- a/ChangeLog Wed Jun 10 10:53:03 2009 -0400 +++ b/ChangeLog Wed Jun 10 12:00:53 2009 -0400 @@ -1,3 +1,40 @@ 2009-06-10 Omair Majid + + * rt/net/sourceforge/jnlp/JNLPFile.java + (needsNewJVM): New function. Returns true if the JNLP file requires + creating a new JVM. + (getNewVMArgs): New function. Returns arguments to pass to the new JVM. + * rt/net/sourceforge/jnlp/JREDesc.java + (getVMArgs): Fix javadoc to reflect that return value can be null. + * rt/net/sourceforge/jnlp/Launcher.java + (launchExternal): Modify to take in arguments to pass to the JVM and + arguments to pass to Netx. Try to use the local file to launch this + instance if possible. + (launchExternal): Delegate to new launchExternal. + (launchExternal): New method. Take in arguments to pass to the JVM and + arguments to pass to Netx. Launch Netx with the with the appropriate + arguments. + (launchApplication): If needed, launch a new JVM and pass along the Netx + arguments. + * rt/net/sourceforge/jnlp/Parser.java: + (getJRE): Call checkVMArgs to check 'java-vm-args' for security. If that + fails, assume 'java-vm-args' is null. + (checkVMArgs): New method. Check that the vmArgs variable contains safe + arguments only. + (getValidVMArguments): New method. + (getValidStartingVMArguments): New method. + * rt/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. + * rt/net/sourceforge/jnlp/runtime/Boot/java: + Add -Xnofork to helpMessage + (main): Check for '-Xnofork'. Set initial arguments. + * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java: + Add forksAllowed to store whether creating a new JVM is allowed. Add + initialArguments to store the arguments to Netx. + (getForksAllowed): New function. Check if creating a new JVM is allowed. + (setForksAllowed): New function. Set whether creating a JVM is allowed. + (setInitialArguments): New function. Store the arguments passed to Netx. + (getInitialArguments): New function. Return the arguments passed to Netx. + 2009-06-10 Omair Majid * rt/net/sourceforge/jnlp/services/XBasicService.java diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/JNLPFile.java --- a/rt/net/sourceforge/jnlp/JNLPFile.java Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/JNLPFile.java Wed Jun 10 12:00:53 2009 -0400 @@ -17,12 +17,19 @@ package net.sourceforge.jnlp; -import java.io.*; -import java.net.*; -import java.util.*; - -import net.sourceforge.jnlp.cache.*; -import net.sourceforge.jnlp.runtime.*; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; + +import net.sourceforge.jnlp.cache.ResourceTracker; +import net.sourceforge.jnlp.cache.UpdatePolicy; +import net.sourceforge.jnlp.runtime.JNLPRuntime; /** * Provides methods to access the information in a Java Network @@ -520,4 +527,48 @@ public class JNLPFile { } } + /** + * + * @return true if the JNLP file specifies things that can only be + * applied on a new vm (eg: different max heap memory) + */ + public boolean needsNewVM() { + + if (getNewVMArgs().size() == 0) { + return false; + } else { + return true; + } + } + + /** + * @return a list of args to pass to the new + * JVM based on this JNLP file + */ + public List getNewVMArgs() { + + List newVMArgs = new LinkedList(); + + JREDesc[] jres = getResources().getJREs(); + for (int jreIndex = 0; jreIndex < jres.length; jreIndex++) { + String initialHeapSize = jres[jreIndex].getInitialHeapSize(); + if (initialHeapSize != null) { + newVMArgs.add("-Xms" + initialHeapSize); + } + + String maxHeapSize = jres[jreIndex].getMaximumHeapSize(); + if (maxHeapSize != null) { + newVMArgs.add("-Xmx" + maxHeapSize); + } + + String vmArgsFromJre = jres[jreIndex].getVMArgs(); + if (vmArgsFromJre != null) { + String[] args = vmArgsFromJre.split(" "); + newVMArgs.addAll(Arrays.asList(args)); + } + } + + return newVMArgs; + } + } diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/JREDesc.java --- a/rt/net/sourceforge/jnlp/JREDesc.java Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/JREDesc.java Wed Jun 10 12:00:53 2009 -0400 @@ -121,6 +121,7 @@ public class JREDesc { /** * Returns the additional arguments to pass to the Java VM + * Can be null */ public String getVMArgs() { return vmArgs; diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/Launcher.java --- a/rt/net/sourceforge/jnlp/Launcher.java Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/Launcher.java Wed Jun 10 12:00:53 2009 -0400 @@ -17,16 +17,27 @@ package net.sourceforge.jnlp; -import java.applet.*; +import java.applet.Applet; import java.awt.Container; -import java.io.*; -import java.net.*; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Method; +import java.net.URL; +import java.util.LinkedList; +import java.util.List; import java.util.jar.JarFile; -import java.lang.reflect.*; - -import net.sourceforge.jnlp.cache.*; -import net.sourceforge.jnlp.runtime.*; -import net.sourceforge.jnlp.util.*; + +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.ResourceTracker; +import net.sourceforge.jnlp.cache.UpdatePolicy; +import net.sourceforge.jnlp.runtime.AppThreadGroup; +import net.sourceforge.jnlp.runtime.AppletInstance; +import net.sourceforge.jnlp.runtime.ApplicationInstance; +import net.sourceforge.jnlp.runtime.JNLPClassLoader; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.util.Reflect; /** * Launches JNLPFiles either in the foreground or background.

@@ -238,44 +249,67 @@ public class Launcher { * application's output is sent to the system out and it's * standard input channel is closed. * + * @param vmArgs the arguments to pass to the new JVM. Can be empty but + * must not be null. * @param file the JNLP file to launch + * @param javawsArgs the arguments to pass to the javaws command. Can be + * an empty list but must not be null. * @throws LaunchException if there was an exception */ - public void launchExternal(JNLPFile file) throws LaunchException { - if (file.getSourceLocation() != null) - launchExternal(file.getSourceLocation()); - else if (file.getFileLocation() != null) - launchExternal(file.getFileLocation()); + public void launchExternal(List vmArgs, JNLPFile file, List javawsArgs) throws LaunchException { + List updatedArgs = new LinkedList(javawsArgs); + + if (file.getFileLocation() != null) + updatedArgs.add(file.getFileLocation().toString()); + else if (file.getSourceLocation() != null) + updatedArgs.add(file.getFileLocation().toString()); else launchError(new LaunchException(file, null, R("LSFatal"), R("LCExternalLaunch"), R("LNullLocation"), R("LNullLocationInfo"))); + + launchExternal(vmArgs, updatedArgs); + + } + + /** + * Launches the JNLP file in a new JVM instance. The launched + * application's output is sent to the system out and it's + * standard input channel is closed. + * + * @param url the URL of the JNLP file to launch + * @throws LaunchException if there was an exception + */ + public void launchExternal(URL url) throws LaunchException { + List javawsArgs = new LinkedList(); + javawsArgs.add(url.toString()); + launchExternal(new LinkedList(), javawsArgs); } /** * Launches the JNLP file at the specified location in a new JVM * instance. The launched application's output is sent to the * system out and it's standard input channel is closed. - * - * @param location the URL of the JNLP file to launch + * @param vmArgs the arguments to pass to the jvm + * @param javawsArgs the arguments to pass to javaws (aka Netx) * @throws LaunchException if there was an exception */ - public void launchExternal(URL location) throws LaunchException { - try { - URL cs = Launcher.class.getProtectionDomain().getCodeSource().getLocation(); - if (JNLPRuntime.isDebug()) - System.out.println("netx.jar path: "+cs.getPath()); - - File netxFile = new File(cs.getPath()); - if (!netxFile.exists()) - throw launchError(new LaunchException(null, null, R("LSFatal"), R("LCExternalLaunch"), R("LNetxJarMissing"), R("LNetxJarMissingInfo"))); - - String command[] = { - "javaw", - "-jar", - netxFile.toString(), - "-jnlp", - location.toString(), - "-verbose", - }; + public void launchExternal(List vmArgs, List javawsArgs) throws LaunchException { + try { + + List commands = new LinkedList(); + + String pathToWebstartBinary = System.getProperty("java.home") + + File.separatorChar + + "bin" + + File.separatorChar + + "javaws"; + commands.add(pathToWebstartBinary); + // use -Jargument format to pass arguments to the JVM through the launcher + for (String arg: vmArgs) { + commands.add("-J" + arg); + } + commands.addAll(javawsArgs); + + String[] command = commands.toArray(new String[] {}); Process p = Runtime.getRuntime().exec(command); new StreamEater(p.getErrorStream()).start(); @@ -331,6 +365,15 @@ public class Launcher { throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplication"), R("LNotApplicationInfo"))); try { + + if (JNLPRuntime.getForksAllowed() && file.needsNewVM()) { + List netxArguments = new LinkedList(); + netxArguments.add("-Xnofork"); + netxArguments.addAll(JNLPRuntime.getInitialArguments()); + launchExternal(file.getNewVMArgs(), netxArguments); + return null; + } + final int preferredWidth = 500; final int preferredHeight = 400; JNLPSplashScreen splashScreen = null; diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/Parser.java --- a/rt/net/sourceforge/jnlp/Parser.java Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/Parser.java Wed Jun 10 12:00:53 2009 -0400 @@ -281,6 +281,11 @@ class Parser { Version version = getVersion(node, "version", null); URL location = getURL(node, "href", base); String vmArgs = getAttribute(node, "java-vm-args",null); + try { + checkVMArgs(vmArgs); + } catch (IllegalArgumentException argumentException) { + vmArgs = null; + } String initialHeap = getAttribute(node, "initial-heap-size", null); String maxHeap = getAttribute(node, "max-heap-size", null); List resources = getResources(node, true); @@ -290,6 +295,8 @@ class Parser { return new JREDesc(version, location, vmArgs, initialHeap, maxHeap, resources); } + + /** * Returns the JAR element at the specified node. @@ -992,6 +999,111 @@ class Parser { return null; else return new Version(version); + } + + /** + * Check that the VM args are valid and safe + * @param vmArgs a string containing the args + * @throws ParseException if the VM arguments are invalid or dangerous + */ + private void checkVMArgs(String vmArgs) throws IllegalArgumentException { + if (vmArgs == null) { + return; + } + + List validArguments = Arrays.asList(getValidVMArguments()); + List validStartingArguments = Arrays.asList(getValidStartingVMArguments()); + + String[] arguments = vmArgs.split(" "); + boolean argumentIsValid = false; + for (String argument: arguments) { + argumentIsValid = false; + + if (validArguments.contains(argument)) { + argumentIsValid = true; + } else { + for (String validStartingArgument: validStartingArguments) { + if (argument.startsWith(validStartingArgument)) { + argumentIsValid = true; + break; + } + } + } + + if (!argumentIsValid) { + throw new IllegalArgumentException(argument); + } + } + + } + + /** + * Returns an array of valid (ie safe and supported) arguments for the JVM + * + * Based on http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html + */ + private String[] getValidVMArguments() { + return new String[] { + "-d32", /* use a 32-bit data model if available */ + "-client", /* to select the client VM */ + "-server", /* to select the server VM */ + "-verbose", /* enable verbose output */ + "-version", /* print product version and exit */ + "-showversion", /* print product version and continue */ + "-help", /* print this help message */ + "-X", /* print help on non-standard options */ + "-ea", /* enable assertions */ + "-enableassertions", /* enable assertions */ + "-da", /* disable assertions */ + "-disableassertions", /* disable assertions */ + "-esa", /* enable system assertions */ + "-enablesystemassertions", /* enable system assertions */ + "-dsa", /* disable system assertione */ + "-disablesystemassertions", /* disable system assertione */ + "-Xmixed", /* mixed mode execution (default) */ + "-Xint", /* interpreted mode execution only */ + "-Xnoclassgc", /* disable class garbage collection */ + "-Xincgc", /* enable incremental garbage collection */ + "-Xbatch", /* disable background compilation */ + "-Xprof", /* output cpu profiling data */ + "-Xdebug", /* enable remote debugging */ + "-Xfuture", /* enable strictest checks, anticipating future default */ + "-Xrs", /* reduce use of OS signals by Java/VM (see documentation) */ + "-XX:+ForceTimeHighResolution", /* use high resolution timer */ + "-XX:-ForceTimeHighResolution", /* use low resolution (default) */ + }; + } + + /** + * Returns an array containing the starts of valid (ie safe and supported) + * arguments for the JVM + * + * Based on http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html + */ + private String[] getValidStartingVMArguments() { + return new String[] { + "-ea", /* enable assertions for classes */ + "-enableassertions", /* enable assertions for classes */ + "-da", /* disable assertions for classes */ + "-disableassertions", /* disable assertions for classes */ + "-verbose", /* enable verbose output */ + "-Xms", /* set initial Java heap size */ + "-Xmx", /* set maximum Java heap size */ + "-Xss", /* set java thread stack size */ + "-XX:NewRatio", /* set Ratio of new/old gen sizes */ + "-XX:NewSize", /* set initial size of new generation */ + "-XX:MaxNewSize", /* set max size of new generation */ + "-XX:PermSize", /* set initial size of permanent gen */ + "-XX:MaxPermSize", /* set max size of permanent gen */ + "-XX:MaxHeapFreeRatio", /* heap free percentage (default 70) */ + "-XX:MinHeapFreeRatio", /* heap free percentage (default 40) */ + "-XX:UseSerialGC", /* use serial garbage collection */ + "-XX:ThreadStackSize", /* thread stack size (in KB) */ + "-XX:MaxInlineSize", /* set max num of bytecodes to inline */ + "-XX:ReservedCodeCacheSize", /* Reserved code cache size (bytes) */ + "-XX:MaxDirectMemorySize", + + }; } /** diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/resources/Messages.properties --- a/rt/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 10 12:00:53 2009 -0400 @@ -130,6 +130,7 @@ BOStrict = Enables strict checking of BOStrict = Enables strict checking of JNLP file format. BOViewer = Shows the trusted certificate viewer. BOUmask = Sets the umask for files created by an application. +BXnofork = Do not create another JVM. BOHelp = Print this message and exit. # Cache diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/runtime/Boot.java --- a/rt/net/sourceforge/jnlp/runtime/Boot.java Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/runtime/Boot.java Wed Jun 10 12:00:53 2009 -0400 @@ -24,6 +24,7 @@ import java.security.AccessController; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.net.ssl.HttpsURLConnection; @@ -116,6 +117,7 @@ public final class Boot implements Privi + " -headless "+R("BOHeadless")+"\n" + " -strict "+R("BOStrict")+"\n" + " -umask=value "+R("BOUmask")+"\n" + + " -Xnofork "+R("BXnofork")+"\n" + " -help "+R("BOHelp")+"\n"; private static final String doubleArgs = "-basedir -jnlp -arg -param -property -update"; @@ -168,6 +170,10 @@ public final class Boot implements Privi if (null != getOption("-noupdate")) JNLPRuntime.setDefaultUpdatePolicy(UpdatePolicy.NEVER); + + if (null != getOption("-Xnofork")) { + JNLPRuntime.setForksAllowed(false); + } // wire in custom authenticator try { @@ -183,12 +189,13 @@ public final class Boot implements Privi e.printStackTrace(); } + JNLPRuntime.setInitialArgments(Arrays.asList(argsIn)); + // do in a privileged action to clear the security context of // the Boot13 class, which doesn't have any privileges in // JRE1.3; JRE1.4 works without Boot13 or this PrivilegedAction. AccessController.doPrivileged(new Boot()); - args = null; // might save a couple bytes... } /** diff -r c68aaf028ad2 -r 0b4d2e77cf97 rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 10 10:53:03 2009 -0400 +++ b/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 10 12:00:53 2009 -0400 @@ -21,6 +21,7 @@ import java.awt.*; import java.awt.*; import java.text.*; import java.util.*; +import java.util.List; import java.security.*; import javax.jnlp.*; @@ -96,7 +97,14 @@ public class JNLPRuntime { /** set to true if this is a webstart application. */ private static boolean isWebstartApplication; - + + /** set to false to indicate another JVM should not be spawned, even if necessary */ + private static boolean forksAllowed = true; + + /** contains the arguments passed to the jnlp runtime */ + private static List initialArguments; + + /** * Returns whether the JNLP runtime environment has been * initialized. Once initialized, some properties such as the From omajid at redhat.com Wed Jun 10 09:09:08 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Jun 2009 12:09:08 -0400 Subject: RFC: Netx - Support VM arguments specified in the JNLP file In-Reply-To: <20090610135422.GA11916@redhat.com> References: <4A24420C.4030401@redhat.com> <20090602184329.GA18297@redhat.com> <4A26B5AF.605@redhat.com> <20090603180752.GB21904@redhat.com> <4A27DC10.9070600@redhat.com> <20090604214722.GA29542@redhat.com> <4A296FF5.2020703@redhat.com> <20090608225621.GB21227@redhat.com> <4A2ECF4D.3050608@redhat.com> <20090610135422.GA11916@redhat.com> Message-ID: <4A2FDAA4.8030005@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-09 17:08]: > > Looks good. You may want to print a warning on stderr stating that > vmargs are being dropped to null and why (instead of just setting > them null and proceeding). But that's your call. Either way, good to > commit. > > Cheers, > Deepak > Thanks for the extensive review! Pushed as changeset 0b4d2e77cf97 in icedtea6 Cheers, Omair From gbenson at redhat.com Wed Jun 10 13:45:29 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:29 +0000 Subject: changeset in /hg/icedtea: 2009-05-21 Gary Benson changeset 6909d3942630 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6909d3942630 description: 2009-05-21 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Fix for x86 debug builds. diffstat: 2 files changed, 7 insertions(+) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 2 ++ diffs (24 lines): diff -r a5e05eb00fc3 -r 6909d3942630 ChangeLog --- a/ChangeLog Fri Jun 05 18:38:11 2009 +0100 +++ b/ChangeLog Thu May 21 14:26:47 2009 +0100 @@ -1,3 +1,8 @@ 2009-05-27 Andrew John Hughes + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: + Fix for x86 debug builds. + 2009-05-27 Andrew John Hughes * HACKING: Updated. diff -r a5e05eb00fc3 -r 6909d3942630 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jun 05 18:38:11 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu May 21 14:26:47 2009 +0100 @@ -25,6 +25,8 @@ #include "incls/_precompiled.incl" #include "incls/_sharkCompiler.cpp.incl" + +#include using namespace llvm; From ahughes at redhat.com Wed Jun 10 13:45:30 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:30 +0000 Subject: changeset in /hg/icedtea: Forwardport Shark. Message-ID: changeset bdb3cd6099a9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=bdb3cd6099a9 description: Forwardport Shark. 2009-05-22 Gary Benson * patches/icedtea-zero.patch (vmError.cpp): Don't include interpreterRuntime.hpp here. * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Include interpreterRuntime.hpp and scopeDesc.hpp. (ZeroStackPrinter::print_word): Decode pc to get bci. diffstat: 3 files changed, 25 insertions(+), 4 deletions(-) ChangeLog | 8 ++++++++ patches/icedtea-zero.patch | 5 ++--- ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 16 +++++++++++++++- diffs (76 lines): diff -r 6909d3942630 -r bdb3cd6099a9 ChangeLog --- a/ChangeLog Thu May 21 14:26:47 2009 +0100 +++ b/ChangeLog Wed Jun 10 16:59:23 2009 +0100 @@ -1,3 +1,11 @@ 2009-05-21 Gary Benson + + * patches/icedtea-zero.patch + (vmError.cpp): Don't include interpreterRuntime.hpp here. + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp + Include interpreterRuntime.hpp and scopeDesc.hpp. + (ZeroStackPrinter::print_word): Decode pc to get bci. + 2009-05-21 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: diff -r 6909d3942630 -r bdb3cd6099a9 patches/icedtea-zero.patch --- a/patches/icedtea-zero.patch Thu May 21 14:26:47 2009 +0100 +++ b/patches/icedtea-zero.patch Wed Jun 10 16:59:23 2009 +0100 @@ -151,14 +151,13 @@ class ParkEvent ; --- openjdk/hotspot/src/share/vm/utilities/vmError.cpp.orig 2008-12-03 19:33:25.000000000 +0000 +++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2008-12-03 19:40:11.000000000 +0000 -@@ -25,6 +25,11 @@ +@@ -25,6 +25,10 @@ # include "incls/_precompiled.incl" # include "incls/_vmError.cpp.incl" +# ifdef ZERO -+# include +# include -+# endif // ++# endif // ZERO + // List of environment variables that should be reported in error log file. const char *env_list[] = { diff -r 6909d3942630 -r bdb3cd6099a9 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Thu May 21 14:26:47 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Jun 10 16:59:23 2009 +0100 @@ -22,6 +22,9 @@ * have any questions. * */ + +#include +#include class ZeroStackPrinter { private: @@ -190,15 +193,26 @@ class ZeroStackPrinter { } } if (frame->is_shark_frame()) { + SharkFrame *sf = frame->as_shark_frame(); + methodOop method = sf->method(); + if (word == SharkFrame::pc_off) { field = "pc"; + if (method->is_oop()) { + nmethod *code = method->code(); + address pc = sf->pc(); + if (code->pc_desc_at(pc)) { + SimpleScopeDesc ssd(code, pc); + snprintf(_buf, _buflen, PTR_FORMAT " (bci %d)", pc, ssd.bci()); + value = _buf; + } + } } else if (word == SharkFrame::unextended_sp_off) { field = "unextended_sp"; } else if (word == SharkFrame::method_off) { field = "method"; - methodOop method = ((SharkFrame *) frame)->method(); if (method->is_oop()) value = method->name_and_sig_as_C_string(_buf, _buflen); } From gbenson at redhat.com Wed Jun 10 13:45:31 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:31 +0000 Subject: changeset in /hg/icedtea: 2009-05-27 Gary Benson changeset 57f11ade2a35 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=57f11ade2a35 description: 2009-05-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp (SharkDecacher::location_type): New method. (SharkDecacher::stack_location_type): Use the above. (SharkDecacher::local_location_type): Use the above. diffstat: 2 files changed, 49 insertions(+), 10 deletions(-) ChangeLog | 7 ++ ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp | 52 ++++++++++++---- diffs (90 lines): diff -r 49646e89d0ce -r 57f11ade2a35 ChangeLog --- a/ChangeLog Fri May 22 15:18:17 2009 +0100 +++ b/ChangeLog Wed May 27 13:47:05 2009 +0100 @@ -1,3 +1,10 @@ 2009-05-22 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp + (SharkDecacher::location_type): New method. + (SharkDecacher::stack_location_type): Use the above. + (SharkDecacher::local_location_type): Use the above. + 2009-05-22 Gary Benson * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp diff -r 49646e89d0ce -r 57f11ade2a35 ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Fri May 22 15:18:17 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Wed May 27 13:47:05 2009 +0100 @@ -151,6 +151,46 @@ class SharkDecacher : public SharkCacher { return new LocationValue(slot2loc(offset, type)); } + static Location::Type location_type(SharkValue** addr, bool maybe_two_word) + { + // low addresses this end + // Type 32-bit 64-bit + // ---------------------------------------------------- + // stack[0] local[3] jobject oop oop + // stack[1] local[2] NULL normal lng + // stack[2] local[1] jlong normal invalid + // stack[3] local[0] jint normal normal + // + // high addresses this end + + SharkValue *value = *addr; + if (value) { + if (value->is_jobject()) + return Location::oop; +#ifdef _LP64 + if (value->is_two_word()) + return Location::invalid; +#endif // _LP64 + return Location::normal; + } + else { + if (maybe_two_word) { + value = *(addr - 1); + if (value && value->is_two_word()) { +#ifdef _LP64 + if (value->is_jlong()) + return Location::lng; + if (value->is_jdouble()) + return Location::dbl; + ShouldNotReachHere(); +#else + return Location::normal; +#endif // _LP64 + } + } + return Location::invalid; + } + } // Stack slot helpers protected: @@ -160,9 +200,7 @@ class SharkDecacher : public SharkCacher static Location::Type stack_location_type(int index, SharkValue** addr) { - if (addr[0] && addr[0]->is_jobject()) - return Location::oop; - return Location::normal; + return location_type(addr, *addr == NULL); } // Local slot helpers @@ -173,13 +211,7 @@ class SharkDecacher : public SharkCacher static Location::Type local_location_type(int index, SharkValue** addr) { - if (addr[0] && addr[0]->is_jobject()) - return Location::oop; - if (addr[0]) - return Location::normal; - if (index > 0 && addr[-1] && addr[-1]->is_two_word()) - return Location::normal; - return Location::invalid; + return location_type(addr, index > 0); } // Writer helper From gbenson at redhat.com Wed Jun 10 13:45:30 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:30 +0000 Subject: changeset in /hg/icedtea: 2009-05-22 Gary Benson changeset 49646e89d0ce in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=49646e89d0ce description: 2009-05-22 Gary Benson * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Include interpreterRuntime.hpp and scopeDesc.hpp. (ZeroStackPrinter::print_word): Decode bcx to get bci. diffstat: 2 files changed, 12 insertions(+) ChangeLog | 6 ++++++ ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 6 ++++++ diffs (29 lines): diff -r bdb3cd6099a9 -r 49646e89d0ce ChangeLog --- a/ChangeLog Wed Jun 10 16:59:23 2009 +0100 +++ b/ChangeLog Fri May 22 15:18:17 2009 +0100 @@ -1,3 +1,9 @@ 2009-05-22 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp + Include interpreterRuntime.hpp and scopeDesc.hpp. + (ZeroStackPrinter::print_word): Decode bcx to get bci. + 2009-05-22 Gary Benson * patches/icedtea-zero.patch diff -r bdb3cd6099a9 -r 49646e89d0ce ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Jun 10 16:59:23 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Fri May 22 15:18:17 2009 +0100 @@ -115,6 +115,12 @@ class ZeroStackPrinter { if (is_valid && !strcmp(field, "_method")) { value = istate->method()->name_and_sig_as_C_string(_buf,_buflen); field = "istate->_method"; + } + else if (is_valid && !strcmp(field, "_bcp") && istate->bcp()) { + snprintf(_buf, _buflen, PTR_FORMAT " (bci %d)", istate->bcp(), + istate->method()->bci_from(istate->bcp())); + value = _buf; + field = "istate->_bcp"; } else { snprintf(_buf, _buflen, "%sistate->%s", From gbenson at redhat.com Wed Jun 10 13:45:31 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:31 +0000 Subject: changeset in /hg/icedtea: ChangeLog fix Message-ID: changeset b49274854fdc in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b49274854fdc description: ChangeLog fix diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) ChangeLog | 2 +- diffs (12 lines): diff -r 57f11ade2a35 -r b49274854fdc ChangeLog --- a/ChangeLog Wed May 27 13:47:05 2009 +0100 +++ b/ChangeLog Wed May 27 13:49:38 2009 +0100 @@ -3,7 +3,7 @@ 2009-05-27 Gary Benson From ahughes at redhat.com Wed Jun 10 13:45:31 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:31 +0000 Subject: changeset in /hg/icedtea: Forwardport Shark. Message-ID: changeset 348b533726b1 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=348b533726b1 description: Forwardport Shark. 2009-05-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::_monitor_count): Removed. (SharkFunction::_max_monitors): New field. (SharkFunction::monitor_count): Removed. (SharkFunction::max_monitors): New method. (SharkFunction::_exception_slot_offset): Removed. (SharkFunction::exception_slot): Likewise. (SharkFunction::_oop_tmp_slot_offset): New field. (SharkFunction::oop_tmp_slot_offset): New method. (SharkFunction::monitors_slots): Removed. (SharkFunction::monitors_slots_offset): Likewise. (SharkFunction::monitor_offset): New method. (SharkFunction::monitor_object_offset): Likewise. (SharkFunction::monitor_header_offset): Likewise. (SharkFunction::monitor_addr): Likewise. (SharkFunction::monitor_object_addr): Likewise. (SharkFunction::monitor_header_addr): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Renamed _monitor_count as _max_monitors. (SharkFunction::CreateBuildFrame): Renamed _monitor_count as _max_monitors, remove monitor initialization, remove exception pointer and add temporary oop slot. (SharkFunction::monitor): Removed. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState::_num_monitors): New field. (SharkState::max_monitors): New method. (SharkState::num_monitors): Likewise. (SharkState::set_num_monitors): Likewise. (SharkState::_oop_tmp): New field. (SharkState::oop_tmp_addr): New method. (SharkState::oop_tmp): Likewise. (SharkState::set_oop_tmp): Likewise. * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp (SharkState::max_monitors): New method. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::SharkState): Initialize oop_tmp. (SharkState::initialize): Initialize num_monitors. (SharkPHIState::SharkPHIState): Likewise. (SharkState::equal_to): Also check oop_tmp and num_monitors. (SharkPHIState::add_incoming): Likewise. (SharkState::merge): Also merge oop_tmp and check num_monitors. * ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp (SharkStateScanner::process_monitor): New argument. (SharkStateScanner::process_oop_tmp_slot): New method. (SharkStateScanner::process_exception_slot): Removed. * ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp (SharkStateScanner::scan): Replace monitor scanning, remove exception slot, and add temporary oop slot. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp (SharkDecacher::process_monitor): New argument. (SharkDecacher::process_oop_tmp_slot): New method. (SharkCacher::process_oop_tmp_slot): Likewise. (SharkDecacher::process_exception_slot): Removed. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::process_monitor): New argument. (SharkDecacher::process_oop_tmp_slot): New method. (SharkCacher::process_oop_tmp_slot): Likewise. (SharkDecacher::process_exception_slot): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::set_oop_tmp): New method. (SharkTopLevelBlock::get_oop_tmp): Likewise. (SharkTopLevelBlock::num_monitors): Likewise. (SharkTopLevelBlock::set_num_monitors): Likewise. (SharkTopLevelBlock::release_method_lock): Removed. (SharkTopLevelBlock::release_locked_monitors): Likewise. (SharkTopLevelBlock::acquire_lock): New method. (SharkTopLevelBlock::release_lock): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::acquire_method_lock): Rewritten. (SharkTopLevelBlock::release_method_lock): Removed. (SharkTopLevelBlock::release_locked_monitors): Likewise. (SharkTopLevelBlock::handle_return): New monitor release code. (SharkTopLevelBlock::do_monitorenter): Rewritten. (SharkTopLevelBlock::do_monitorexit): Likewise. (SharkTopLevelBlock::acquire_lock): New method. (SharkTopLevelBlock::release_lock): Likewise. * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp (SharkFrame::Layout): Replaced exception slot with oop_tmp slot. * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp (ZeroStackPrinter::print_word): Likewise. * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Removed. * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. * patches/hotspot/default/icedtea-shark.patch (vframeArrayElement::fill_in): Remove workaround for unused but recorded monitors. (vframeArrayElement::unpack_on_stack): Likewise. diffstat: 18 files changed, 488 insertions(+), 566 deletions(-) ChangeLog | 98 ++++ patches/hotspot/default/icedtea-shark.patch | 27 - ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp | 4 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 4 ports/hotspot/src/share/vm/includeDB_shark | 15 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 48 +- ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp | 7 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 53 -- ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 87 ++-- ports/hotspot/src/share/vm/shark/sharkMonitor.cpp | 170 ------- ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 94 ---- ports/hotspot/src/share/vm/shark/sharkState.cpp | 35 + ports/hotspot/src/share/vm/shark/sharkState.hpp | 29 + ports/hotspot/src/share/vm/shark/sharkState.inline.hpp | 5 ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp | 13 ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp | 6 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 320 ++++++++------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 39 + diffs (truncated from 1471 to 500 lines): diff -r b49274854fdc -r 348b533726b1 ChangeLog --- a/ChangeLog Wed May 27 13:49:38 2009 +0100 +++ b/ChangeLog Wed Jun 10 17:06:29 2009 +0100 @@ -1,3 +1,101 @@ 2009-05-27 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::_monitor_count): Removed. + (SharkFunction::_max_monitors): New field. + (SharkFunction::monitor_count): Removed. + (SharkFunction::max_monitors): New method. + (SharkFunction::_exception_slot_offset): Removed. + (SharkFunction::exception_slot): Likewise. + (SharkFunction::_oop_tmp_slot_offset): New field. + (SharkFunction::oop_tmp_slot_offset): New method. + (SharkFunction::monitors_slots): Removed. + (SharkFunction::monitors_slots_offset): Likewise. + (SharkFunction::monitor_offset): New method. + (SharkFunction::monitor_object_offset): Likewise. + (SharkFunction::monitor_header_offset): Likewise. + (SharkFunction::monitor_addr): Likewise. + (SharkFunction::monitor_object_addr): Likewise. + (SharkFunction::monitor_header_addr): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Renamed _monitor_count as _max_monitors. + (SharkFunction::CreateBuildFrame): Renamed _monitor_count as + _max_monitors, remove monitor initialization, remove exception + pointer and add temporary oop slot. + (SharkFunction::monitor): Removed. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::_num_monitors): New field. + (SharkState::max_monitors): New method. + (SharkState::num_monitors): Likewise. + (SharkState::set_num_monitors): Likewise. + (SharkState::_oop_tmp): New field. + (SharkState::oop_tmp_addr): New method. + (SharkState::oop_tmp): Likewise. + (SharkState::set_oop_tmp): Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp + (SharkState::max_monitors): New method. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::SharkState): Initialize oop_tmp. + (SharkState::initialize): Initialize num_monitors. + (SharkPHIState::SharkPHIState): Likewise. + (SharkState::equal_to): Also check oop_tmp and num_monitors. + (SharkPHIState::add_incoming): Likewise. + (SharkState::merge): Also merge oop_tmp and check num_monitors. + + * ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp + (SharkStateScanner::process_monitor): New argument. + (SharkStateScanner::process_oop_tmp_slot): New method. + (SharkStateScanner::process_exception_slot): Removed. + * ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp + (SharkStateScanner::scan): Replace monitor scanning, remove + exception slot, and add temporary oop slot. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp + (SharkDecacher::process_monitor): New argument. + (SharkDecacher::process_oop_tmp_slot): New method. + (SharkCacher::process_oop_tmp_slot): Likewise. + (SharkDecacher::process_exception_slot): Removed. + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::process_monitor): New argument. + (SharkDecacher::process_oop_tmp_slot): New method. + (SharkCacher::process_oop_tmp_slot): Likewise. + (SharkDecacher::process_exception_slot): Removed. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::set_oop_tmp): New method. + (SharkTopLevelBlock::get_oop_tmp): Likewise. + (SharkTopLevelBlock::num_monitors): Likewise. + (SharkTopLevelBlock::set_num_monitors): Likewise. + (SharkTopLevelBlock::release_method_lock): Removed. + (SharkTopLevelBlock::release_locked_monitors): Likewise. + (SharkTopLevelBlock::acquire_lock): New method. + (SharkTopLevelBlock::release_lock): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::acquire_method_lock): Rewritten. + (SharkTopLevelBlock::release_method_lock): Removed. + (SharkTopLevelBlock::release_locked_monitors): Likewise. + (SharkTopLevelBlock::handle_return): New monitor release code. + (SharkTopLevelBlock::do_monitorenter): Rewritten. + (SharkTopLevelBlock::do_monitorexit): Likewise. + (SharkTopLevelBlock::acquire_lock): New method. + (SharkTopLevelBlock::release_lock): Likewise. + + * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp + (SharkFrame::Layout): Replaced exception slot with oop_tmp slot. + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp + (ZeroStackPrinter::print_word): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Removed. + * ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + + * patches/hotspot/default/icedtea-shark.patch + (vframeArrayElement::fill_in): Remove workaround for + unused but recorded monitors. + (vframeArrayElement::unpack_on_stack): Likewise. + 2009-05-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp diff -r b49274854fdc -r 348b533726b1 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Wed May 27 13:49:38 2009 +0100 +++ b/patches/hotspot/default/icedtea-shark.patch Wed Jun 10 17:06:29 2009 +0100 @@ -371,33 +371,6 @@ diff -Nru openjdk.orig/hotspot/src/share define_pd_global(bool, BackgroundCompilation, false); define_pd_global(bool, UseTLAB, false); define_pd_global(bool, CICompileOSR, false); -diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vframeArray.cpp openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/vframeArray.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp 2009-05-19 16:07:37.000000000 +0100 -@@ -64,6 +64,11 @@ - assert(monitor->owner() == NULL || (!monitor->owner()->is_unlocked() && !monitor->owner()->has_bias_pattern()), "object must be null or locked, and unbiased"); - BasicObjectLock* dest = _monitors->at(index); - dest->set_obj(monitor->owner()); -+#ifdef SHARK -+ // XXX This can be removed when Shark knows -+ // which monitors are in use. -+ if (monitor->owner()) -+#endif // SHARK - monitor->lock()->move_to(monitor->owner(), dest->lock()); - } - } -@@ -262,6 +267,11 @@ - top = iframe()->previous_monitor_in_interpreter_frame(top); - BasicObjectLock* src = _monitors->at(index); - top->set_obj(src->obj()); -+#ifdef SHARK -+ // XXX This can be removed when Shark knows -+ // which monitors are in use. -+ if (src->obj()) -+#endif // SHARK - src->lock()->move_to(src->obj(), top->lock()); - } - if (ProfileInterpreter) { diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp --- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2009-05-19 01:11:05.000000000 +0100 +++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2009-05-19 16:07:37.000000000 +0100 diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Wed Jun 10 17:06:29 2009 +0100 @@ -31,7 +31,7 @@ // | monitor m-1 | // | ... | // | monitor 0 | -// | exception | +// | oop_tmp | // | method | // | unextended_sp | // | pc | @@ -55,7 +55,7 @@ class SharkFrame : public ZeroFrame { pc_off = jf_header_words, unextended_sp_off, method_off, - exception_off, + oop_tmp_off, header_words }; diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Jun 10 17:06:29 2009 +0100 @@ -222,8 +222,8 @@ class ZeroStackPrinter { if (method->is_oop()) value = method->name_and_sig_as_C_string(_buf, _buflen); } - else if (word == SharkFrame::exception_off) { - field = "exception"; + else if (word == SharkFrame::oop_tmp_off) { + field = "oop_tmp"; } else { SharkFrame *sf = (SharkFrame *) frame; diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 10 17:06:29 2009 +0100 @@ -193,7 +193,6 @@ sharkFunction.cpp 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 @@ -240,19 +239,6 @@ sharkMemoryManager.cpp sharkMemoryManager.cpp llvmHeaders.hpp sharkMemoryManager.cpp sharkEntry.hpp 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 -sharkMonitor.cpp sharkTopLevelBlock.hpp - -sharkMonitor.hpp allocation.hpp -sharkMonitor.hpp llvmHeaders.hpp -sharkMonitor.hpp llvmValue.hpp -sharkMonitor.hpp sharkBuilder.hpp -sharkMonitor.hpp sharkFunction.hpp sharkRuntime.cpp biasedLocking.hpp sharkRuntime.cpp deoptimization.hpp @@ -326,7 +312,6 @@ sharkTopLevelBlock.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.hpp diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 10 17:06:29 2009 +0100 @@ -82,11 +82,8 @@ void SharkDecacher::start_monitors(int n _monarray = new GrowableArray(num_monitors); } -void SharkDecacher::process_monitor(int index, int box_offset) -{ - int obj_offset = - box_offset + (BasicObjectLock::obj_offset_in_bytes() >> LogBytesPerWord); - +void SharkDecacher::process_monitor(int index, int box_offset, int obj_offset) +{ oopmap()->set_oop(slot2reg(obj_offset)); monarray()->append(new MonitorValue( @@ -94,13 +91,20 @@ void SharkDecacher::process_monitor(int slot2loc(box_offset, Location::normal))); } -void SharkDecacher::process_exception_slot(int offset) -{ - // Record the exception slot - oopmap()->set_oop(slot2reg(offset)); -} - -void SharkDecacher::process_method_slot(llvm::Value** value, int offset) +void SharkDecacher::process_oop_tmp_slot(Value** value, int offset) +{ + // Decache the temporary oop slot + if (*value) { + write_value_to_frame( + SharkType::oop_type(), + *value, + offset); + + oopmap()->set_oop(slot2reg(offset)); + } +} + +void SharkDecacher::process_method_slot(Value** value, int offset) { // Decache the method pointer write_value_to_frame( @@ -182,14 +186,20 @@ void SharkCacher::process_stack_slot(int } } -void SharkCacher::process_method_slot(llvm::Value** value, int offset) +void SharkCacher::process_oop_tmp_slot(Value** value, int offset) +{ + // Cache the temporary oop + if (*value) + *value = read_value_from_frame(SharkType::oop_type(), offset); +} + +void SharkCacher::process_method_slot(Value** value, int offset) { // Cache the method pointer *value = read_value_from_frame(SharkType::methodOop_type(), offset); } -void SharkFunctionEntryCacher::process_method_slot(llvm::Value** value, - int offset) +void SharkFunctionEntryCacher::process_method_slot(Value** value, int offset) { // "Cache" the method pointer *value = method(); @@ -212,9 +222,9 @@ void SharkCacher::process_local_slot(int } } -void SharkDecacher::write_value_to_frame(const llvm::Type* type, - llvm::Value* value, - int offset) +void SharkDecacher::write_value_to_frame(const Type* type, + Value* value, + int offset) { if (frame_cache()->value(offset) != value) { builder()->CreateStore( @@ -223,7 +233,7 @@ void SharkDecacher::write_value_to_frame } } -Value* SharkCacher::read_value_from_frame(const llvm::Type* type, int offset) +Value* SharkCacher::read_value_from_frame(const Type* type, int offset) { Value *result = builder()->CreateLoad( function()->CreateAddressOfFrameEntry(offset, type)); diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Wed Jun 10 17:06:29 2009 +0100 @@ -122,9 +122,9 @@ class SharkDecacher : public SharkCacher void process_stack_slot(int index, SharkValue** value, int offset); void start_monitors(int num_monitors); - void process_monitor(int index, int offset); - - void process_exception_slot(int offset); + void process_monitor(int index, int box_offset, int obj_offset); + + void process_oop_tmp_slot(llvm::Value** value, int offset); void process_method_slot(llvm::Value** value, int offset); void process_pc_slot(int offset); @@ -354,6 +354,7 @@ class SharkCacher : public SharkCacherDe protected: void process_stack_slot(int index, SharkValue** value, int offset); + void process_oop_tmp_slot(llvm::Value** value, int offset); virtual void process_method_slot(llvm::Value** value, int offset); void process_local_slot(int index, SharkValue** value, int offset); diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 10 17:06:29 2009 +0100 @@ -53,15 +53,16 @@ void SharkFunction::initialize() // Create the list of blocks set_block_insertion_point(NULL); _blocks = NEW_RESOURCE_ARRAY(SharkTopLevelBlock*, flow()->block_count()); - for (int i = 0; i < block_count(); i++) - { - ciTypeFlow::Block *b = flow()->pre_order_at(i); - // Work around a bug in pre_order_at() that does not return the - // correct pre-ordering. If pre_order_at() were correct this - // line could simply be: - // _blocks[i] = new SharkTopLevelBlock(this, b); - _blocks[b->pre_order()] = new SharkTopLevelBlock(this, b); - } + for (int i = 0; i < block_count(); i++) { + ciTypeFlow::Block *b = flow()->pre_order_at(i); + + // Work around a bug in pre_order_at() that does not return + // the correct pre-ordering. If pre_order_at() were correct + // this line could simply be: + // _blocks[i] = new SharkTopLevelBlock(this, b); + _blocks[b->pre_order()] = new SharkTopLevelBlock(this, b); + } + // Walk the tree from the start block to determine which // blocks are entered and which blocks require phis SharkTopLevelBlock *start_block = block(0); @@ -75,11 +76,11 @@ void SharkFunction::initialize() } // Initialize the monitors - _monitor_count = 0; + _max_monitors = 0; if (target()->is_synchronized() || target()->uses_monitors()) { for (int i = 0; i < block_count(); i++) - _monitor_count = MAX2( - _monitor_count, block(i)->ciblock()->monitor_count()); + _max_monitors = MAX2( + _max_monitors, block(i)->ciblock()->monitor_count()); } // Create the method preamble @@ -216,7 +217,7 @@ Value* SharkFunction::CreateBuildFrame() int locals_words = max_locals(); int extra_locals = locals_words - arg_size(); int header_words = SharkFrame::header_words; - int monitor_words = monitor_count()*frame::interpreter_frame_monitor_size(); + int monitor_words = max_monitors()*frame::interpreter_frame_monitor_size(); int stack_words = max_stack(); int frame_words = header_words + monitor_words + stack_words; @@ -242,19 +243,11 @@ Value* SharkFunction::CreateBuildFrame() offset += stack_words; // Monitors - if (monitor_count()) { - _monitors_slots_offset = offset; - - for (int i = 0; i < monitor_count(); i++) { - if (i != 0 || !target()->is_synchronized()) - monitor(i)->mark_free(); - } - } + _monitors_slots_offset = offset; offset += monitor_words; - // Exception pointer - _exception_slot_offset = offset++; - builder()->CreateStore(LLVMValue::null(), exception_slot()); + // Temporary oop slot + _oop_tmp_slot_offset = offset++; // Method pointer _method_slot_offset = offset++; @@ -295,18 +288,6 @@ Value* SharkFunction::CreateAddressOfFra result, PointerType::getUnqual(type), name); } return result; -} - -SharkMonitor* SharkFunction::monitor(Value *index) const -{ - Value *indexes[] = { - LLVMValue::jint_constant(0), - builder()->CreateSub( - LLVMValue::jint_constant(monitor_count() - 1), index), - }; - return new SharkMonitor( - this, - builder()->CreateGEP(monitors_slots(), indexes, indexes + 2)); } class DeferredZeroCheck : public ResourceObj { diff -r b49274854fdc -r 348b533726b1 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed May 27 13:49:38 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 10 17:06:29 2009 +0100 @@ -23,7 +23,6 @@ * */ -class SharkMonitor; class SharkTopLevelBlock; class DeferredZeroCheck; @@ -55,7 +54,7 @@ class SharkFunction : public StackObj { SharkTopLevelBlock** _blocks; llvm::Value* _base_pc; llvm::Value* _thread; - int _monitor_count; + int _max_monitors; GrowableArray _deferred_zero_checks; public: @@ -95,9 +94,9 @@ class SharkFunction : public StackObj { { return _thread; } - int monitor_count() const - { - return _monitor_count; + int max_monitors() const + { + return _max_monitors; } GrowableArray* deferred_zero_checks() { @@ -215,29 +214,6 @@ class SharkFunction : public StackObj { llvm::Value* CreateAddressOfFrameEntry(int offset, const llvm::Type* type = NULL, const char* name = "") const; - public: - llvm::Value* exception_slot() const - { - return CreateAddressOfFrameEntry( - exception_slot_offset(), - SharkType::oop_type(), - "exception_slot"); - } - llvm::Value* monitors_slots() const - { - return CreateAddressOfFrameEntry( - monitors_slots_offset(), - llvm::ArrayType::get(SharkType::monitor_type(), monitor_count()), - "monitors"); - } - - public: - SharkMonitor* monitor(int index) const - { - return monitor(LLVMValue::jint_constant(index)); - } - SharkMonitor* monitor(llvm::Value* index) const; - private: llvm::Value* CreateBuildFrame(); @@ -256,7 +232,7 @@ class SharkFunction : public StackObj { int _extended_frame_size; int _stack_slots_offset; int _monitors_slots_offset; - int _exception_slot_offset; + int _oop_tmp_slot_offset; int _method_slot_offset; int _pc_slot_offset; int _locals_slots_offset; @@ -274,13 +250,9 @@ class SharkFunction : public StackObj { { From gbenson at redhat.com Wed Jun 10 13:45:32 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:32 +0000 Subject: changeset in /hg/icedtea: 2009-05-28 Gary Benson changeset f4bd4773a2d0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f4bd4773a2d0 description: 2009-05-28 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::is_private_copy): Renamed as... (SharkTopLevelBlock::is_backedge_copy): New method. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::initialize): Use the above. diffstat: 3 files changed, 10 insertions(+), 2 deletions(-) ChangeLog | 8 ++++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 2 +- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 +- diffs (39 lines): diff -r 348b533726b1 -r f4bd4773a2d0 ChangeLog --- a/ChangeLog Wed Jun 10 17:06:29 2009 +0100 +++ b/ChangeLog Thu May 28 05:53:28 2009 -0400 @@ -1,3 +1,11 @@ 2009-05-27 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::is_private_copy): Renamed as... + (SharkTopLevelBlock::is_backedge_copy): New method. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::initialize): Use the above. + 2009-05-27 Gary Benson * ports/hotspot/src/share/vm/shark/sharkFunction.hpp diff -r 348b533726b1 -r f4bd4773a2d0 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 17:06:29 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu May 28 05:53:28 2009 -0400 @@ -201,7 +201,7 @@ void SharkTopLevelBlock::initialize() char name[28]; snprintf(name, sizeof(name), "bci_%d%s", - start(), is_private_copy() ? "_private_copy" : ""); + start(), is_backedge_copy() ? "_backedge_copy" : ""); _entry_block = function()->CreateBlock(name); } diff -r 348b533726b1 -r f4bd4773a2d0 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 17:06:29 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu May 28 05:53:28 2009 -0400 @@ -58,7 +58,7 @@ class SharkTopLevelBlock : public SharkB { return ciblock()->pre_order(); } - bool is_private_copy() const + bool is_backedge_copy() const { return ciblock()->is_backedge_copy(); } From gbenson at redhat.com Wed Jun 10 13:45:32 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:32 +0000 Subject: changeset in /hg/icedtea: 2009-05-28 Gary Benson changeset 80b9af346dc0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=80b9af346dc0 description: 2009-05-28 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::ExceptionAction): New enum. (SharkTopLevelBlock::check_pending_exception): Replace boolean attempt_catch argument with an ExceptionAction. (SharkTopLevelBlock::handle_exception): Likewise. (SharkTopLevelBlock::call_vm): Add an ExceptionAction argument. (SharkTopLevelBlock::acquire_lock): Likewise. (SharkTopLevelBlock::release_lock): Likewise. (SharkTopLevelBlock::call_vm_nocheck): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::check_pending_exception): Replace boolean attempt_catch argument with an ExceptionAction. (SharkTopLevelBlock::handle_exception): Likewise. (SharkTopLevelBlock::call_vm): Add an ExceptionAction argument. (SharkTopLevelBlock::acquire_lock): Likewise. (SharkTopLevelBlock::release_lock): Likewise. (SharkTopLevelBlock::zero_check_value): Updated. (SharkTopLevelBlock::check_bounds): Likewise. (SharkTopLevelBlock::add_safepoint): Likewise. (SharkTopLevelBlock::call_register_finalizer): Likewise. (SharkTopLevelBlock::handle_return): Likewise. (SharkTopLevelBlock::do_athrow): Likewise. (SharkTopLevelBlock::do_call): Likewise. (SharkTopLevelBlock::do_new): Likewise. (SharkTopLevelBlock::do_newarray): Likewise. (SharkTopLevelBlock::do_anewarray): Likewise. (SharkTopLevelBlock::do_multianewarray): Likewise. (SharkTopLevelBlock::acquire_method_lock): Likewise. (SharkTopLevelBlock::do_monitorenter): Likewise. (SharkTopLevelBlock::do_monitorexit): Likewise. diffstat: 3 files changed, 115 insertions(+), 96 deletions(-) ChangeLog | 34 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 80 ++++++------ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 97 +++++---------- diffs (416 lines): diff -r f4bd4773a2d0 -r 80b9af346dc0 ChangeLog --- a/ChangeLog Thu May 28 05:53:28 2009 -0400 +++ b/ChangeLog Thu May 28 10:23:21 2009 -0400 @@ -1,3 +1,37 @@ 2009-05-28 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::ExceptionAction): New enum. + (SharkTopLevelBlock::check_pending_exception): Replace + boolean attempt_catch argument with an ExceptionAction. + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::call_vm): Add an ExceptionAction argument. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + (SharkTopLevelBlock::call_vm_nocheck): Removed. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::check_pending_exception): Replace + boolean attempt_catch argument with an ExceptionAction. + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::call_vm): Add an ExceptionAction argument. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + (SharkTopLevelBlock::zero_check_value): Updated. + (SharkTopLevelBlock::check_bounds): Likewise. + (SharkTopLevelBlock::add_safepoint): Likewise. + (SharkTopLevelBlock::call_register_finalizer): Likewise. + (SharkTopLevelBlock::handle_return): Likewise. + (SharkTopLevelBlock::do_athrow): Likewise. + (SharkTopLevelBlock::do_call): Likewise. + (SharkTopLevelBlock::do_new): Likewise. + (SharkTopLevelBlock::do_newarray): Likewise. + (SharkTopLevelBlock::do_anewarray): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + (SharkTopLevelBlock::acquire_method_lock): Likewise. + (SharkTopLevelBlock::do_monitorenter): Likewise. + (SharkTopLevelBlock::do_monitorexit): Likewise. + 2009-05-28 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r f4bd4773a2d0 -r 80b9af346dc0 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu May 28 05:53:28 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu May 28 10:23:21 2009 -0400 @@ -294,15 +294,16 @@ void SharkTopLevelBlock::zero_check_valu builder()->SetInsertPoint(zero_block); if (value->is_jobject()) { - call_vm_nocheck( + call_vm( SharkRuntime::throw_NullPointerException(), builder()->pointer_constant(__FILE__), - LLVMValue::jint_constant(__LINE__)); + LLVMValue::jint_constant(__LINE__), + EX_CHECK_NONE); } else { builder()->CreateUnimplemented(__FILE__, __LINE__); } - handle_exception(function()->CreateGetPendingException()); + handle_exception(function()->CreateGetPendingException(), EX_CHECK_FULL); } void SharkTopLevelBlock::check_bounds(SharkValue* array, SharkValue* index) @@ -318,19 +319,22 @@ void SharkTopLevelBlock::check_bounds(Sh builder()->SetInsertPoint(out_of_bounds); SharkState *saved_state = current_state()->copy(); - call_vm_nocheck( + call_vm( SharkRuntime::throw_ArrayIndexOutOfBoundsException(), builder()->pointer_constant(__FILE__), LLVMValue::jint_constant(__LINE__), - index->jint_value()); - handle_exception(function()->CreateGetPendingException()); + index->jint_value(), + EX_CHECK_NONE); + handle_exception(function()->CreateGetPendingException(), EX_CHECK_FULL); set_current_state(saved_state); builder()->SetInsertPoint(in_bounds); } -void SharkTopLevelBlock::check_pending_exception(bool attempt_catch) -{ +void SharkTopLevelBlock::check_pending_exception(ExceptionAction action) +{ + assert(action != EX_CHECK_NONE, "shouldn't be"); + BasicBlock *exception = function()->CreateBlock("exception"); BasicBlock *no_exception = function()->CreateBlock("no_exception"); @@ -345,15 +349,16 @@ void SharkTopLevelBlock::check_pending_e builder()->SetInsertPoint(exception); builder()->CreateStore(LLVMValue::null(), pending_exception_addr); SharkState *saved_state = current_state()->copy(); - handle_exception(pending_exception, attempt_catch); + handle_exception(pending_exception, action); set_current_state(saved_state); builder()->SetInsertPoint(no_exception); } -void SharkTopLevelBlock::handle_exception(Value* exception, bool attempt_catch) -{ - if (attempt_catch && num_exceptions() != 0) { +void SharkTopLevelBlock::handle_exception(Value* exception, + ExceptionAction action) +{ + if (action == EX_CHECK_FULL && num_exceptions() != 0) { // Clear the stack and push the exception onto it. // We do this now to protect it across the VM call // we may be about to make. @@ -392,11 +397,11 @@ void SharkTopLevelBlock::handle_exceptio LLVMValue::jint_constant(indexes[i]), builder()->CreateStructGEP(options, i)); - Value *index = call_vm_nocheck( + Value *index = call_vm( SharkRuntime::find_exception_handler(), builder()->CreateStructGEP(options, 0), - LLVMValue::jint_constant(num_options)); - check_pending_exception(false); + LLVMValue::jint_constant(num_options), + EX_CHECK_NO_CATCH); // Jump to the exception handler, if found BasicBlock *no_handler = function()->CreateBlock("no_handler"); @@ -451,7 +456,7 @@ void SharkTopLevelBlock::add_safepoint() do_safepoint, safepointed); builder()->SetInsertPoint(do_safepoint); - call_vm(SharkRuntime::safepoint()); + call_vm(SharkRuntime::safepoint(), EX_CHECK_FULL); BasicBlock *safepointed_block = builder()->GetInsertBlock(); builder()->CreateBr(safepointed); @@ -504,7 +509,7 @@ void SharkTopLevelBlock::call_register_f do_call, done); builder()->SetInsertPoint(do_call); - call_vm(SharkRuntime::register_finalizer(), receiver); + call_vm(SharkRuntime::register_finalizer(), receiver, EX_CHECK_FULL); BasicBlock *branch_block = builder()->GetInsertBlock(); builder()->CreateBr(done); @@ -527,7 +532,7 @@ void SharkTopLevelBlock::handle_return(B // If we're returning with an exception then that exception // takes priority and the release_lock one will be ignored. while (num_monitors()) - release_lock(); + release_lock(EX_CHECK_NONE); // Reload the exception we're throwing if (exception) @@ -724,7 +729,7 @@ void SharkTopLevelBlock::do_athrow() { SharkValue *exception = pop(); check_null(exception); - handle_exception(exception->jobject_value()); + handle_exception(exception->jobject_value(), EX_CHECK_FULL); } void SharkTopLevelBlock::do_goto() @@ -1137,7 +1142,7 @@ void SharkTopLevelBlock::do_call() current_state()->cache_after_Java_call(method); // Check for pending exceptions - check_pending_exception(); + check_pending_exception(EX_CHECK_FULL); } void SharkTopLevelBlock::do_instance_check() @@ -1451,7 +1456,8 @@ void SharkTopLevelBlock::do_new() // The slow path call_vm( SharkRuntime::new_instance(), - LLVMValue::jint_constant(iter()->get_klass_index())); + LLVMValue::jint_constant(iter()->get_klass_index()), + EX_CHECK_FULL); slow_object = function()->CreateGetVMResult(); got_slow = builder()->GetInsertBlock(); @@ -1481,7 +1487,8 @@ void SharkTopLevelBlock::do_newarray() call_vm( SharkRuntime::newarray(), LLVMValue::jint_constant(type), - pop()->jint_value()); + pop()->jint_value(), + EX_CHECK_FULL); push(SharkValue::create_generic( ciArrayKlass::make(ciType::make(type)), @@ -1503,7 +1510,8 @@ void SharkTopLevelBlock::do_anewarray() call_vm( SharkRuntime::anewarray(), LLVMValue::jint_constant(iter()->get_klass_index()), - pop()->jint_value()); + pop()->jint_value(), + EX_CHECK_FULL); push(SharkValue::create_generic( array_klass, function()->CreateGetVMResult(), true)); @@ -1535,7 +1543,8 @@ void SharkTopLevelBlock::do_multianewarr SharkRuntime::multianewarray(), LLVMValue::jint_constant(iter()->get_klass_index()), LLVMValue::jint_constant(ndims), - builder()->CreateStructGEP(dimensions, 0)); + builder()->CreateStructGEP(dimensions, 0), + EX_CHECK_FULL); // Now we can pop the dimensions off the stack for (int i = 0; i < ndims; i++) @@ -1550,28 +1559,27 @@ void SharkTopLevelBlock::acquire_method_ iter()->force_bci(start()); // for the decache in acquire_lock if (target()->is_static()) { SharkConstantPool constants(this); - acquire_lock(constants.java_mirror()); + acquire_lock(constants.java_mirror(), EX_CHECK_NO_CATCH); } else { - acquire_lock(local(0)->jobject_value()); - } - check_pending_exception(false); + acquire_lock(local(0)->jobject_value(), EX_CHECK_NO_CATCH); + } } void SharkTopLevelBlock::do_monitorenter() { SharkValue *lockee = pop(); check_null(lockee); - acquire_lock(lockee->jobject_value()); + acquire_lock(lockee->jobject_value(), EX_CHECK_FULL); } void SharkTopLevelBlock::do_monitorexit() { pop(); // don't need this (monitors are block structured) - release_lock(); -} - -void SharkTopLevelBlock::acquire_lock(Value *lockee) + release_lock(EX_CHECK_FULL); +} + +void SharkTopLevelBlock::acquire_lock(Value *lockee, ExceptionAction ea) { BasicBlock *try_recursive = function()->CreateBlock("try_recursive"); BasicBlock *got_recursive = function()->CreateBlock("got_recursive"); @@ -1645,7 +1653,7 @@ void SharkTopLevelBlock::acquire_lock(Va // It's not a recursive case so we need to drop into the runtime builder()->SetInsertPoint(not_recursive); - call_vm_nocheck(SharkRuntime::monitorenter(), monitor_addr); + call_vm(SharkRuntime::monitorenter(), monitor_addr, ea); BasicBlock *acquired_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_acquired); @@ -1654,7 +1662,7 @@ void SharkTopLevelBlock::acquire_lock(Va current_state()->merge(fast_state, acquired_fast, acquired_slow); } -void SharkTopLevelBlock::release_lock() +void SharkTopLevelBlock::release_lock(ExceptionAction ea) { BasicBlock *not_recursive = function()->CreateBlock("not_recursive"); BasicBlock *released_fast = function()->CreateBlock("released_fast"); @@ -1697,7 +1705,7 @@ void SharkTopLevelBlock::release_lock() // Need to drop into the runtime to release this one builder()->SetInsertPoint(slow_path); - call_vm_nocheck(SharkRuntime::monitorexit(), monitor_addr); + call_vm(SharkRuntime::monitorexit(), monitor_addr, ea); BasicBlock *released_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_released); diff -r f4bd4773a2d0 -r 80b9af346dc0 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu May 28 05:53:28 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu May 28 10:23:21 2009 -0400 @@ -236,98 +236,75 @@ class SharkTopLevelBlock : public SharkB int bci, SharkState* saved_state, llvm::BasicBlock* continue_block); + // Exceptions + enum ExceptionAction { + EX_CHECK_NONE, // don't check for pending exceptions + EX_CHECK_NO_CATCH, // if there is a pending exception then throw it + EX_CHECK_FULL // if there is a pending exception then catch it + }; // if it has a handler or throw it otherwise + void check_pending_exception(ExceptionAction action); + void handle_exception(llvm::Value* exception, ExceptionAction action); // VM calls private: - llvm::CallInst* call_vm_nocheck(llvm::Constant* callee, - llvm::Value** args_start, - llvm::Value** args_end) + llvm::CallInst* call_vm(llvm::Constant* callee, + llvm::Value** args_start, + llvm::Value** args_end, + ExceptionAction ea) { current_state()->decache_for_VM_call(); function()->set_last_Java_frame(); llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); + if (ea != EX_CHECK_NONE) + check_pending_exception(ea); return res; } - llvm::CallInst* call_vm(llvm::Constant* callee, - llvm::Value** args_start, - llvm::Value** args_end) - { - llvm::CallInst* res = call_vm_nocheck(callee, args_start, args_end); - check_pending_exception(); - return res; - } - - public: - llvm::CallInst* call_vm(llvm::Constant* callee) + public: + llvm::CallInst* call_vm(llvm::Constant* callee, + ExceptionAction ea) { llvm::Value *args[] = {thread()}; - return call_vm(callee, args, args + 1); - } - llvm::CallInst* call_vm(llvm::Constant* callee, - llvm::Value* arg1) + return call_vm(callee, args, args + 1, ea); + } + llvm::CallInst* call_vm(llvm::Constant* callee, + llvm::Value* arg1, + ExceptionAction ea) { llvm::Value *args[] = {thread(), arg1}; - return call_vm(callee, args, args + 2); - } - llvm::CallInst* call_vm(llvm::Constant* callee, - llvm::Value* arg1, - llvm::Value* arg2) - { - llvm::Value *args[] = {thread(), arg1, arg2}; - return call_vm(callee, args, args + 3); + return call_vm(callee, args, args + 2, ea); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, - llvm::Value* arg3) + ExceptionAction ea) + { + llvm::Value *args[] = {thread(), arg1, arg2}; + return call_vm(callee, args, args + 3, ea); + } + llvm::CallInst* call_vm(llvm::Constant* callee, + llvm::Value* arg1, + llvm::Value* arg2, + llvm::Value* arg3, + ExceptionAction ea) { llvm::Value *args[] = {thread(), arg1, arg2, arg3}; - return call_vm(callee, args, args + 4); - } - - llvm::CallInst* call_vm_nocheck(llvm::Constant* callee) - { - llvm::Value *args[] = {thread()}; - return call_vm_nocheck(callee, args, args + 1); - } - llvm::CallInst* call_vm_nocheck(llvm::Constant* callee, - llvm::Value* arg1) - { - llvm::Value *args[] = {thread(), arg1}; - return call_vm_nocheck(callee, args, args + 2); - } - llvm::CallInst* call_vm_nocheck(llvm::Constant* callee, - llvm::Value* arg1, - llvm::Value* arg2) - { - llvm::Value *args[] = {thread(), arg1, arg2}; - return call_vm_nocheck(callee, args, args + 3); - } - llvm::CallInst* call_vm_nocheck(llvm::Constant* callee, - llvm::Value* arg1, - llvm::Value* arg2, - llvm::Value* arg3) - { - llvm::Value *args[] = {thread(), arg1, arg2, arg3}; - return call_vm_nocheck(callee, args, args + 4); + return call_vm(callee, args, args + 4, ea); } // Synchronization private: - void acquire_lock(llvm::Value* lockee); - void release_lock(); + void acquire_lock(llvm::Value* lockee, ExceptionAction ea); + void release_lock(ExceptionAction ea); public: void acquire_method_lock(); - // Error checking + // Bounds checks private: void check_bounds(SharkValue* array, SharkValue* index); - void check_pending_exception(bool attempt_catch = true); - void handle_exception(llvm::Value* exception, bool attempt_catch = true); // Safepoints private: From gbenson at redhat.com Wed Jun 10 13:45:37 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:37 +0000 Subject: changeset in /hg/icedtea: 2009-06-05 Gary Benson changeset 62021319ded8 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=62021319ded8 description: 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_new): Removed constant pool lookup. (SharkTopLevelBlock::scan_for_traps): Add traps for new. diffstat: 2 files changed, 35 insertions(+), 16 deletions(-) ChangeLog | 6 ++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 45 +++++++++------ diffs (121 lines): diff -r dbed112d4f85 -r 62021319ded8 ChangeLog --- a/ChangeLog Thu Jun 04 11:07:53 2009 -0400 +++ b/ChangeLog Fri Jun 05 06:47:14 2009 -0400 @@ -1,3 +1,9 @@ 2009-06-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_new): Removed constant pool lookup. + (SharkTopLevelBlock::scan_for_traps): Add traps for new. + 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r dbed112d4f85 -r 62021319ded8 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 11:07:53 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 06:47:14 2009 -0400 @@ -40,6 +40,7 @@ void SharkTopLevelBlock::scan_for_traps( ciField *field; ciMethod *method; + ciInstanceKlass *klass; bool will_link; bool is_field; @@ -98,6 +99,30 @@ void SharkTopLevelBlock::scan_for_traps( // Continue to the check index = iter()->get_method_index(); + break; + + case Bytecodes::_new: + klass = iter()->get_klass(will_link)->as_instance_klass(); + assert(will_link, "typeflow responsibility"); + + // Bail out if the class is unloaded + if (iter()->is_unresolved_klass() || !klass->is_initialized()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } + + // Bail out if the class cannot be instantiated + if (klass->is_abstract() || klass->is_interface() || + klass->name() == ciSymbol::java_lang_Class()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_unhandled, + Deoptimization::Action_reinterpret), bci()); + return; + } break; } @@ -1291,7 +1316,6 @@ void SharkTopLevelBlock::do_new() ciInstanceKlass* klass = iter()->get_klass(will_link)->as_instance_klass(); assert(will_link, "typeflow responsibility"); - BasicBlock *tlab_alloc = NULL; BasicBlock *got_tlab = NULL; BasicBlock *heap_alloc = NULL; BasicBlock *retry = NULL; @@ -1310,33 +1334,22 @@ void SharkTopLevelBlock::do_new() Value *slow_object = NULL; Value *object = NULL; - SharkConstantPool constants(this); - // The fast path if (!Klass::layout_helper_needs_slow_path(klass->layout_helper())) { if (UseTLAB) { - tlab_alloc = function()->CreateBlock("tlab_alloc"); got_tlab = function()->CreateBlock("got_tlab"); + heap_alloc = function()->CreateBlock("heap_alloc"); } - heap_alloc = function()->CreateBlock("heap_alloc"); retry = function()->CreateBlock("retry"); got_heap = function()->CreateBlock("got_heap"); initialize = function()->CreateBlock("initialize"); slow_alloc_and_init = function()->CreateBlock("slow_alloc_and_init"); push_object = function()->CreateBlock("push_object"); - builder()->CreateCondBr( - builder()->CreateICmpEQ( - constants.tag_at(iter()->get_klass_index()), - LLVMValue::jbyte_constant(JVM_CONSTANT_Class)), - UseTLAB ? tlab_alloc : heap_alloc, slow_alloc_and_init); - size_t size_in_bytes = klass->size_helper() << LogHeapWordSize; // Thread local allocation if (UseTLAB) { - builder()->SetInsertPoint(tlab_alloc); - Value *top_addr = builder()->CreateAddressOfStructEntry( thread(), Thread::tlab_top_offset(), PointerType::getUnqual(SharkType::intptr_type()), @@ -1361,11 +1374,11 @@ void SharkTopLevelBlock::do_new() builder()->CreateStore(new_top, top_addr); builder()->CreateBr(initialize); + + builder()->SetInsertPoint(heap_alloc); } // Heap allocation - builder()->SetInsertPoint(heap_alloc); - Value *top_addr = builder()->CreateIntToPtr( builder()->pointer_constant(Universe::heap()->top_addr()), PointerType::getUnqual(SharkType::intptr_type()), @@ -1438,7 +1451,7 @@ void SharkTopLevelBlock::do_new() builder()->CreateStore(LLVMValue::intptr_constant(mark), mark_addr); // Set the class - Value *rtklass = constants.object_at(iter()->get_klass_index()); + Value *rtklass = builder()->CreateInlineOop(klass); builder()->CreateStore(rtklass, klass_addr); got_fast = builder()->GetInsertBlock(); From gbenson at redhat.com Wed Jun 10 13:45:36 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:36 +0000 Subject: changeset in /hg/icedtea: 2009-06-04 Gary Benson changeset dbed112d4f85 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=dbed112d4f85 description: 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::lookup_for_field_access): Removed. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::do_field_access): Inline receiver for static fields. (SharkBlock::lookup_for_field_access): Removed. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlinerHelper::do_field_access): Allow static fields. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkBlock::lookup_for_field_access): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Removed static field traps. (SharkBlock::lookup_for_field_access): Removed. diffstat: 6 files changed, 22 insertions(+), 41 deletions(-) ChangeLog | 17 ++++++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 7 ---- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 8 +--- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 25 --------------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 5 +-- diffs (134 lines): diff -r 51053321f7b4 -r dbed112d4f85 ChangeLog --- a/ChangeLog Thu Jun 04 09:48:19 2009 -0400 +++ b/ChangeLog Thu Jun 04 11:07:53 2009 -0400 @@ -1,3 +1,20 @@ 2009-06-04 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::lookup_for_field_access): Removed. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::do_field_access): Inline receiver for static fields. + (SharkBlock::lookup_for_field_access): Removed. + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::do_field_access): Allow static fields. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkBlock::lookup_for_field_access): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Removed static field traps. + (SharkBlock::lookup_for_field_access): Removed. + 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. diff -r 51053321f7b4 -r dbed112d4f85 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 11:07:53 2009 -0400 @@ -1002,7 +1002,7 @@ void SharkBlock::do_field_access(bool is } if (!is_get || value == NULL) { if (!is_field) - object = lookup_for_field_access(); + object = builder()->CreateInlineOop(field->holder()); BasicType basic_type = field->type()->basic_type(); const Type *stack_type = SharkType::to_stackType(basic_type); @@ -1165,11 +1165,6 @@ void SharkBlock::do_trap(int trap_reques ShouldNotCallThis(); } -Value* SharkBlock::lookup_for_field_access() -{ - ShouldNotCallThis(); -} - void SharkBlock::do_arraylength() { ShouldNotCallThis(); diff -r 51053321f7b4 -r dbed112d4f85 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 11:07:53 2009 -0400 @@ -202,7 +202,6 @@ class SharkBlock : public ResourceObj { // Helpers protected: virtual void do_zero_check(SharkValue* value); - virtual llvm::Value* lookup_for_field_access(); // Leaf calls protected: diff -r 51053321f7b4 -r dbed112d4f85 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 11:07:53 2009 -0400 @@ -760,12 +760,8 @@ bool SharkInlinerHelper::do_field_access } } - if (!result_pushed) { - if (!is_field) - return false; - - push(false); - } + if (!result_pushed) + push(false); if (field->type()->is_two_word()) push(false); diff -r 51053321f7b4 -r dbed112d4f85 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 11:07:53 2009 -0400 @@ -74,20 +74,6 @@ void SharkTopLevelBlock::scan_for_traps( Deoptimization::Action_none), bci()); return; } - - // 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 constant getstatic - if (bc() == Bytecodes::_getstatic && field->is_constant()) { - if (SharkConstant::for_field(iter())->is_loaded()) - break; - } - - // Continue to the check - index = iter()->get_field_index(); break; case Bytecodes::_invokevirtual: @@ -608,17 +594,6 @@ void SharkTopLevelBlock::handle_return(B builder()->CreateRetVoid(); } -Value* SharkTopLevelBlock::lookup_for_field_access() -{ - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_field_index()); - - return builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f1_offset(), - SharkType::jobject_type(), - "object"); -} - void SharkTopLevelBlock::do_arraylength() { SharkValue *array = pop(); diff -r 51053321f7b4 -r dbed112d4f85 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 09:48:19 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 11:07:53 2009 -0400 @@ -220,9 +220,8 @@ class SharkTopLevelBlock : public SharkB public: void emit_IR(); - // Helpers - private: - llvm::Value* lookup_for_field_access(); + // Branch helpers + private: void do_branch(int successor_index); // Zero checks From gbenson at redhat.com Wed Jun 10 13:45:33 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:33 +0000 Subject: changeset in /hg/icedtea: 2009-05-28 Gary Benson changeset 6e7eb4f8bc66 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6e7eb4f8bc66 description: 2009-05-28 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_return): Always call add_safepoint. diffstat: 2 files changed, 7 insertions(+), 3 deletions(-) ChangeLog | 7 ++++++- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 3 +-- diffs (34 lines): diff -r 80b9af346dc0 -r 6e7eb4f8bc66 ChangeLog --- a/ChangeLog Thu May 28 10:23:21 2009 -0400 +++ b/ChangeLog Thu May 28 16:56:19 2009 +0100 @@ -1,3 +1,8 @@ 2009-05-28 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_return): Always call add_safepoint. + 2009-05-28 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp @@ -10,7 +15,7 @@ 2009-05-28 Gary Benson intrinsic_id() == vmIntrinsics::_Object_init) call_register_finalizer(local(0)->jobject_value()); - else - add_safepoint(); + add_safepoint(); handle_return(type, NULL); } From gbenson at redhat.com Wed Jun 10 13:45:36 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:36 +0000 Subject: changeset in /hg/icedtea: 2009-06-03 Gary Benson changeset 6dedbb6d0a87 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6dedbb6d0a87 description: 2009-06-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::_code_buffer): New field. (SharkBuilder::code_buffer): New method. (SharkBuilder::set_code_buffer): Likewise. (SharkBuilder::code_buffer_address): Likewise. (SharkBuilder::CreateInlineOop): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Use a SharkCodeBuffer instead of a normal CodeBuffer and MacroAssembler, and hook it into the SharkBuilder. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::SharkFunction): Removed masm argument and initialization. (SharkFunction::_masm): Removed. (SharkFunction::_base_pc): Likewise. (SharkFunction::masm): Likewise. (SharkFunction::base_pc): Likewise. (SharkFunction::create_unique_pc_offset): Likewise. (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Use the new code to allocate the SharkEntry, and set the base_pc for the SharkCodeBuffer. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::get_direct_callee): Use new code. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Use new code. (SharkDecacher::start_stack): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 9 files changed, 194 insertions(+), 55 deletions(-) ChangeLog | 40 ++++++ ports/hotspot/src/share/vm/includeDB_shark | 7 - ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 31 ++++ ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 4 ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp | 94 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 18 +- ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 9 - ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 38 ------ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 8 - diffs (400 lines): diff -r cfde2b7253fe -r 6dedbb6d0a87 ChangeLog --- a/ChangeLog Wed Jun 03 09:37:51 2009 -0400 +++ b/ChangeLog Wed Jun 03 11:15:36 2009 -0400 @@ -1,3 +1,43 @@ 2009-06-03 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: + New file. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::_code_buffer): New field. + (SharkBuilder::code_buffer): New method. + (SharkBuilder::set_code_buffer): Likewise. + (SharkBuilder::code_buffer_address): Likewise. + (SharkBuilder::CreateInlineOop): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Use a SharkCodeBuffer + instead of a normal CodeBuffer and MacroAssembler, and + hook it into the SharkBuilder. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::SharkFunction): Removed masm argument + and initialization. + (SharkFunction::_masm): Removed. + (SharkFunction::_base_pc): Likewise. + (SharkFunction::masm): Likewise. + (SharkFunction::base_pc): Likewise. + (SharkFunction::create_unique_pc_offset): Likewise. + (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. + (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Use the new code to allocate + the SharkEntry, and set the base_pc for the SharkCodeBuffer. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::get_direct_callee): Use new code. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Use new code. + (SharkDecacher::start_stack): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 11:15:36 2009 -0400 @@ -107,6 +107,7 @@ sharkBuilder.hpp sharkBuilder.hpp llvmHeaders.hpp sharkBuilder.hpp llvmValue.hpp sharkBuilder.hpp sizes.hpp +sharkBuilder.hpp sharkCodeBuffer.hpp sharkBuilder.hpp sharkCompiler.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.hpp @@ -128,10 +129,13 @@ sharkCacheDecache.hpp sharkCacheDecache.hpp sharkFunction.hpp sharkCacheDecache.hpp sharkStateScanner.hpp +sharkCodeBuffer.hpp allocation.hpp +sharkCodeBuffer.hpp codeBuffer.hpp +sharkCodeBuffer.hpp llvmHeaders.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 @@ -141,6 +145,7 @@ sharkCompiler.cpp sharkCompiler.cpp oopRecorder.hpp sharkCompiler.cpp shark_globals.hpp sharkCompiler.cpp sharkBuilder.hpp +sharkCompiler.cpp sharkCodeBuffer.hpp sharkCompiler.cpp sharkCompiler.hpp sharkCompiler.cpp sharkEntry.hpp sharkCompiler.cpp sharkFunction.hpp diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -360,4 +360,35 @@ class SharkBuilder : public llvm::IRBuil LLVMValue::intptr_constant(~(s - 1)), name); } + + // CodeBuffer interface + private: + SharkCodeBuffer* _code_buffer; + + public: + SharkCodeBuffer* code_buffer() const + { + return _code_buffer; + } + void set_code_buffer(SharkCodeBuffer* code_buffer) + { + _code_buffer = code_buffer; + } + + public: + llvm::Value* code_buffer_address(int offset) + { + return CreateAdd( + code_buffer()->base_pc(), LLVMValue::intptr_constant(offset)); + } + + public: + llvm::Value* CreateInlineOop(ciObject* object, const char* name = "") + { + return CreateLoad( + CreateIntToPtr( + code_buffer_address(code_buffer()->inline_oop(object)), + llvm::PointerType::getUnqual(SharkType::jobject_type())), + name); + } }; diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -31,7 +31,7 @@ void SharkDecacher::start_frame() void SharkDecacher::start_frame() { // Start recording the debug information - _pc_offset = function()->create_unique_pc_offset(); + _pc_offset = builder()->code_buffer()->create_unique_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), oopmap_slot_munge(function()->arg_size())); @@ -119,7 +119,7 @@ void SharkDecacher::process_pc_slot(int { // Record the PC builder()->CreateStore( - function()->CreateAddressOfCodeBufferEntry(pc_offset()), + builder()->code_buffer_address(pc_offset()), function()->CreateAddressOfFrameEntry(offset)); } diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -0,0 +1,94 @@ +/* + * 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 SharkCodeBuffer : public StackObj { + public: + SharkCodeBuffer(OopRecorder* oop_recorder) + : _cb("Shark", 256 * K, 64 * K), + _masm(new MacroAssembler(&_cb)), + _base_pc(NULL) + { + cb()->initialize_oop_recorder(oop_recorder); + } + + private: + CodeBuffer _cb; + MacroAssembler* _masm; + llvm::Value* _base_pc; + + public: + CodeBuffer* cb() + { + return &_cb; + } + + private: + MacroAssembler* masm() const + { + return _masm; + } + + public: + llvm::Value* base_pc() const + { + return _base_pc; + } + void set_base_pc(llvm::Value* base_pc) + { + assert(_base_pc == NULL, "only do this once"); + _base_pc = base_pc; + } + + // Allocate some space in the buffer and return its address. + // This buffer will have been relocated by the time the method + // is installed, so you can't inline the result in code. + public: + void* malloc(size_t size) const + { + masm()->align(BytesPerWord); + void *result = masm()->pc(); + masm()->advance(size); + return result; + } + + // Create a unique offset in the buffer. + public: + int create_unique_offset() const + { + int offset = masm()->offset(); + masm()->advance(1); + return offset; + } + + // Inline an oop into the buffer and return its offset. + public: + int inline_oop(ciObject* object) const + { + masm()->align(BytesPerWord); + int offset = masm()->offset(); + masm()->store_oop(object->encoding()); + return offset; + } +}; diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -115,14 +115,16 @@ void SharkCompiler::compile_method(ciEnv env->debug_info()->set_oopmaps(&oopmaps); env->set_dependencies(new Dependencies(env)); - // Create the CodeBuffer and MacroAssembler - CodeBuffer cb("Shark", 256 * K, 64 * K); - cb.initialize_oop_recorder(env->oop_recorder()); - MacroAssembler *masm = new MacroAssembler(&cb); - - // Compile the method into the CodeBuffer + // Create the code buffer and hook it into the builder + SharkCodeBuffer cb(env->oop_recorder()); + builder()->set_code_buffer(&cb); + + // Compile the method ciBytecodeStream iter(target); - SharkFunction function(this, name, flow, &iter, masm); + SharkFunction function(this, name, flow, &iter); + + // Unhook the code buffer + builder()->set_code_buffer(NULL); // Install the method into the VM CodeOffsets offsets; @@ -138,7 +140,7 @@ void SharkCompiler::compile_method(ciEnv entry_bci, &offsets, 0, - &cb, + cb.cb(), 0, &oopmaps, &handler_table, diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -33,8 +33,8 @@ void SharkFunction::initialize() void SharkFunction::initialize() { // Emit the entry point - SharkEntry *entry = (SharkEntry *) masm()->pc(); - masm()->advance(sizeof(SharkEntry)); + SharkEntry *entry = + (SharkEntry *) builder()->code_buffer()->malloc(sizeof(SharkEntry)); // Create the function _function = builder()->CreateFunction(name()); @@ -45,8 +45,9 @@ void SharkFunction::initialize() Function::arg_iterator ai = function()->arg_begin(); Argument *method = ai++; method->setName("method"); - _base_pc = ai++; - _base_pc->setName("base_pc"); + Argument *base_pc = ai++; + base_pc->setName("base_pc"); + builder()->code_buffer()->set_base_pc(base_pc); _thread = ai++; _thread->setName("thread"); diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 03 11:15:36 2009 -0400 @@ -32,13 +32,11 @@ class SharkFunction : public StackObj { SharkFunction(SharkCompiler* compiler, const char* name, ciTypeFlow* flow, - ciBytecodeStream* iter, - MacroAssembler* masm) + ciBytecodeStream* iter) : _compiler(compiler), _name(name), _flow(flow), - _iter(iter), - _masm(masm) + _iter(iter) { initialize(); } private: @@ -49,10 +47,8 @@ class SharkFunction : public StackObj { const char* _name; ciTypeFlow* _flow; ciBytecodeStream* _iter; - MacroAssembler* _masm; llvm::Function* _function; SharkTopLevelBlock** _blocks; - llvm::Value* _base_pc; llvm::Value* _thread; int _max_monitors; GrowableArray _deferred_zero_checks; @@ -74,10 +70,6 @@ class SharkFunction : public StackObj { { return _iter; } - MacroAssembler* masm() const - { - return _masm; - } llvm::Function* function() const { return _function; @@ -86,10 +78,6 @@ class SharkFunction : public StackObj { { return _blocks[i]; } - llvm::Value* base_pc() const - { - return _base_pc; - } llvm::Value* thread() const { return _thread; @@ -135,28 +123,6 @@ class SharkFunction : public StackObj { ciMethod* target() const { return flow()->method(); - } - - // CodeBuffer interface - public: - int create_unique_pc_offset() const - { - int offset = masm()->offset(); - masm()->advance(1); - return offset; - } - llvm::Value* CreateAddressOfCodeBufferEntry(int offset) const - { - return builder()->CreateAdd(base_pc(), LLVMValue::intptr_constant(offset)); - } - llvm::Value* CreateAddressOfOopInCodeBuffer(ciObject* object) const - { - masm()->align(BytesPerWord); - int offset = masm()->offset(); - masm()->store_oop(object->encoding()); - return builder()->CreateIntToPtr( - CreateAddressOfCodeBufferEntry(offset), - llvm::PointerType::getUnqual(SharkType::jobject_type())); } // Block management diff -r cfde2b7253fe -r 6dedbb6d0a87 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 09:37:51 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 11:15:36 2009 -0400 @@ -895,10 +895,10 @@ Value *SharkTopLevelBlock::get_callee(Ca // invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { - return builder()->CreateLoad( - builder()->CreateBitCast( - function()->CreateAddressOfOopInCodeBuffer(method), - PointerType::getUnqual(SharkType::methodOop_type())), "callee"); + return builder()->CreateBitCast( + builder()->CreateInlineOop(method), + SharkType::methodOop_type(), + "callee"); } // Non-direct virtual calls are handled here From gbenson at redhat.com Wed Jun 10 13:45:35 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:35 +0000 Subject: changeset in /hg/icedtea: 2009-06-02 Gary Benson changeset 951871126dda in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=951871126dda description: 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::release_lock): Bugfix. (SharkTopLevelBlock::check_pending_exception): Updated comment to account for the above. diffstat: 2 files changed, 10 insertions(+), 6 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 9 +++------ diffs (40 lines): diff -r 1efa073c96fa -r 951871126dda ChangeLog --- a/ChangeLog Tue Jun 02 15:30:30 2009 +0100 +++ b/ChangeLog Tue Jun 02 15:41:45 2009 +0100 @@ -1,3 +1,10 @@ 2009-06-02 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::release_lock): Bugfix. + (SharkTopLevelBlock::check_pending_exception): Updated + comment to account for the above. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 1efa073c96fa -r 951871126dda ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:30:30 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:41:45 2009 +0100 @@ -351,9 +351,8 @@ void SharkTopLevelBlock::check_pending_e SharkState *saved_state = current_state()->copy(); if (action & EAM_MONITOR_FUDGE) { // The top monitor is marked live, but the exception was thrown - // while setting it up or tearing it down. We need to mark it - // dead before we enter any exception handlers as they will not - // expect it to be there. + // while setting it up so we need to mark it dead before we enter + // any exception handlers as they will not expect it to be there. set_num_monitors(num_monitors() - 1); action ^= EAM_MONITOR_FUDGE; } @@ -1766,9 +1765,7 @@ void SharkTopLevelBlock::release_lock(in // Need to drop into the runtime to release this one builder()->SetInsertPoint(slow_path); - call_vm( - SharkRuntime::monitorexit(), monitor_addr, - exception_action | EAM_MONITOR_FUDGE); + call_vm(SharkRuntime::monitorexit(), monitor_addr, exception_action); BasicBlock *released_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_released); From ahughes at redhat.com Wed Jun 10 13:45:35 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:35 +0000 Subject: changeset in /hg/icedtea: Forwardport Shark. Message-ID: changeset de86c471691b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=de86c471691b description: Forwardport Shark. 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp (MacroAssembler::store_oop): New method. * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp (MacroAssembler::store_oop): Likewise. * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp (Relocation::pd_address_in_code): Implement. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Create CodeBuffer with space for relocations. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::code_offset): Renamed as... (SharkFunction::create_unique_pc_offset): New method. (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Updated to use new offset code. (SharkDecacher::start_stack): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Direct calls need no checking. (SharkTopLevelBlock::get_direct_callee): Replace constant pool lookup with oop load from CodeBuffer. diffstat: 8 files changed, 84 insertions(+), 47 deletions(-) ChangeLog | 30 ++++++++++ ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp | 6 ++ ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp | 3 - ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp | 3 - ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 5 - ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 6 -- ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 33 +++++++---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 45 ++++++--------- diffs (246 lines): diff -r 951871126dda -r de86c471691b ChangeLog --- a/ChangeLog Tue Jun 02 15:41:45 2009 +0100 +++ b/ChangeLog Wed Jun 10 17:11:59 2009 +0100 @@ -1,3 +1,33 @@ 2009-06-02 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp + (MacroAssembler::store_oop): New method. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp + (MacroAssembler::store_oop): Likewise. + + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp + (Relocation::pd_address_in_code): Implement. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Create CodeBuffer + with space for relocations. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::code_offset): Renamed as... + (SharkFunction::create_unique_pc_offset): New method. + (SharkFunction::CreateAddressOfCodeBufferEntry): Likewise. + (SharkFunction::CreateAddressOfOopInCodeBuffer): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Updated to use new offset code. + (SharkDecacher::start_stack): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Direct calls need no + checking. + (SharkTopLevelBlock::get_direct_callee): Replace constant + pool lookup with oop load from CodeBuffer. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 951871126dda -r de86c471691b ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 10 17:11:59 2009 +0100 @@ -66,6 +66,12 @@ RegisterOrConstant MacroAssembler::delay Unimplemented(); } +void MacroAssembler::store_oop(jobject obj) +{ + code_section()->relocate(pc(), oop_Relocation::spec_for_immediate()); + emit_address((address) obj); +} + static void _UnimplementedStub() { report_unimplemented(__FILE__, __LINE__); diff -r 951871126dda -r de86c471691b ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Wed Jun 10 17:11:59 2009 +0100 @@ -1,6 +1,6 @@ /* * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 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 @@ -49,6 +49,7 @@ class MacroAssembler : public Assembler Register tmp, int offset); public: void advance(int bytes); + void store_oop(jobject obj); }; #ifdef ASSERT diff -r 951871126dda -r de86c471691b ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 10 17:11:59 2009 +0100 @@ -48,7 +48,8 @@ address Relocation::pd_get_address_from_ address* Relocation::pd_address_in_code() { - Unimplemented(); + // Relocations in Shark are just stored directly + return (address *) addr(); } int Relocation::pd_breakpoint_size() diff -r 951871126dda -r de86c471691b ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 10 17:11:59 2009 +0100 @@ -31,7 +31,7 @@ void SharkDecacher::start_frame() void SharkDecacher::start_frame() { // Start recording the debug information - _pc_offset = function()->code_offset(); + _pc_offset = function()->create_unique_pc_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), oopmap_slot_munge(function()->arg_size())); @@ -119,8 +119,7 @@ void SharkDecacher::process_pc_slot(int { // Record the PC builder()->CreateStore( - builder()->CreateAdd( - function()->base_pc(), LLVMValue::intptr_constant(pc_offset())), + function()->CreateAddressOfCodeBufferEntry(pc_offset()), function()->CreateAddressOfFrameEntry(offset)); } diff -r 951871126dda -r de86c471691b ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Wed Jun 10 17:11:59 2009 +0100 @@ -116,8 +116,7 @@ void SharkCompiler::compile_method(ciEnv env->set_dependencies(new Dependencies(env)); // Create the CodeBuffer and MacroAssembler - BufferBlob *bb = BufferBlob::create("shark_temp", 256 * K); - CodeBuffer cb(bb->instructions_begin(), bb->instructions_size()); + CodeBuffer cb("Shark", 256 * K, 64 * K); cb.initialize_oop_recorder(env->oop_recorder()); MacroAssembler *masm = new MacroAssembler(&cb); @@ -148,9 +147,6 @@ void SharkCompiler::compile_method(ciEnv env->comp_level(), false, false); - - // Free the BufferBlob - BufferBlob::free(bb); } diff -r 951871126dda -r de86c471691b ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Wed Jun 10 17:11:59 2009 +0100 @@ -137,6 +137,28 @@ class SharkFunction : public StackObj { return flow()->method(); } + // CodeBuffer interface + public: + int create_unique_pc_offset() const + { + int offset = masm()->offset(); + masm()->advance(1); + return offset; + } + llvm::Value* CreateAddressOfCodeBufferEntry(int offset) const + { + return builder()->CreateAdd(base_pc(), LLVMValue::intptr_constant(offset)); + } + llvm::Value* CreateAddressOfOopInCodeBuffer(ciObject* object) const + { + masm()->align(BytesPerWord); + int offset = masm()->offset(); + masm()->store_oop(object->encoding()); + return builder()->CreateIntToPtr( + CreateAddressOfCodeBufferEntry(offset), + llvm::PointerType::getUnqual(SharkType::jobject_type())); + } + // Block management private: llvm::BasicBlock* _block_insertion_point; @@ -216,17 +238,6 @@ class SharkFunction : public StackObj { const char* name = "") const; private: llvm::Value* CreateBuildFrame(); - - // OopMap support - public: - // Every time a new, distinct pc is required, an extra byte is - // emitted into the codebuffer - int code_offset() const - { - int offset = masm()->offset(); - masm()->advance(1); // keeps PCs unique - return offset; - } private: int _extended_frame_size; diff -r 951871126dda -r de86c471691b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:41:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 17:11:59 2009 +0100 @@ -91,27 +91,25 @@ void SharkTopLevelBlock::scan_for_traps( index = iter()->get_field_index(); break; - case Bytecodes::_invokespecial: - case Bytecodes::_invokestatic: case Bytecodes::_invokevirtual: + method = iter()->get_method(will_link); + assert(will_link, "typeflow responsibility"); + + // If this is a non-final invokevirtual then we need to + // check that its holder is linked, because its vtable + // won't have been set up otherwise. + if (!method->is_final_method() && !method->holder()->is_linked()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } + break; + 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()) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } - break; - } // Continue to the check index = iter()->get_method_index(); @@ -897,15 +895,10 @@ Value *SharkTopLevelBlock::get_callee(Ca // invokevirtual is direct in some circumstances. Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - return builder()->CreateValueOfStructEntry( - cache, - bc() == Bytecodes::_invokevirtual ? - ConstantPoolCacheEntry::f2_offset() : - ConstantPoolCacheEntry::f1_offset(), - SharkType::methodOop_type(), - "callee"); + return builder()->CreateLoad( + builder()->CreateBitCast( + function()->CreateAddressOfOopInCodeBuffer(method), + PointerType::getUnqual(SharkType::methodOop_type())), "callee"); } // Non-direct virtual calls are handled here From gbenson at redhat.com Wed Jun 10 13:45:34 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:34 +0000 Subject: changeset in /hg/icedtea: 2009-05-29 Gary Benson changeset 30e7e69f5c8b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=30e7e69f5c8b description: 2009-05-29 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::maybe_add_safepoint): Replaced with... (SharkBlock::maybe_add_backedge_safepoint): New method. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::maybe_add_safepoint): Replaced with... (SharkBlock::maybe_add_backedge_safepoint): New method. (SharkBlock::parse_bytecode): Updated for above. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkBlock::maybe_add_backedge_safepoint): New method. (SharkBlock::_can_reach_visited): New field. (SharkBlock::can_reach): New method. (SharkBlock::can_reach_helper): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkBlock::maybe_add_backedge_safepoint): New method. (SharkBlock::can_reach): Likewise. (SharkBlock::can_reach_helper): Likewise. diffstat: 5 files changed, 79 insertions(+), 6 deletions(-) ChangeLog | 20 ++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 10 +-- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 2 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 45 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 8 ++ diffs (153 lines): diff -r 8172797b7706 -r 30e7e69f5c8b ChangeLog --- a/ChangeLog Fri May 29 10:12:01 2009 +0100 +++ b/ChangeLog Fri May 29 12:38:51 2009 +0100 @@ -1,3 +1,23 @@ 2009-05-29 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::maybe_add_safepoint): Replaced with... + (SharkBlock::maybe_add_backedge_safepoint): New method. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_add_safepoint): Replaced with... + (SharkBlock::maybe_add_backedge_safepoint): New method. + (SharkBlock::parse_bytecode): Updated for above. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkBlock::maybe_add_backedge_safepoint): New method. + (SharkBlock::_can_reach_visited): New field. + (SharkBlock::can_reach): New method. + (SharkBlock::can_reach_helper): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkBlock::maybe_add_backedge_safepoint): New method. + (SharkBlock::can_reach): Likewise. + (SharkBlock::can_reach_helper): Likewise. + 2009-05-29 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.hpp diff -r 8172797b7706 -r 30e7e69f5c8b ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri May 29 10:12:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri May 29 12:38:51 2009 +0100 @@ -74,24 +74,24 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_if_icmpgt: case Bytecodes::_if_icmpge: if (iter()->get_dest() <= bci()) - maybe_add_safepoint(); + maybe_add_backedge_safepoint(); break; case Bytecodes::_goto_w: if (iter()->get_far_dest() <= bci()) - maybe_add_safepoint(); + maybe_add_backedge_safepoint(); break; case Bytecodes::_tableswitch: case Bytecodes::_lookupswitch: if (switch_default_dest() <= bci()) { - maybe_add_safepoint(); + maybe_add_backedge_safepoint(); break; } int len = switch_table_length(); for (int i = 0; i < len; i++) { if (switch_dest(i) <= bci()) { - maybe_add_safepoint(); + maybe_add_backedge_safepoint(); break; } } @@ -1138,7 +1138,7 @@ void SharkBlock::do_zero_check(SharkValu ShouldNotCallThis(); } -void SharkBlock::maybe_add_safepoint() +void SharkBlock::maybe_add_backedge_safepoint() { ShouldNotCallThis(); } diff -r 8172797b7706 -r 30e7e69f5c8b ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri May 29 10:12:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri May 29 12:38:51 2009 +0100 @@ -231,7 +231,7 @@ class SharkBlock : public ResourceObj { // Safepoints protected: - virtual void maybe_add_safepoint(); + virtual void maybe_add_backedge_safepoint(); // Traps protected: diff -r 8172797b7706 -r 30e7e69f5c8b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri May 29 10:12:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri May 29 12:38:51 2009 +0100 @@ -469,6 +469,51 @@ void SharkTopLevelBlock::maybe_add_safep current_state()->set_has_safepointed(true); } +void SharkTopLevelBlock::maybe_add_backedge_safepoint() +{ + if (current_state()->has_safepointed()) + return; + + for (int i = 0; i < num_successors(); i++) { + if (successor(i)->can_reach(this)) { + maybe_add_safepoint(); + break; + } + } +} + +bool SharkTopLevelBlock::can_reach(SharkTopLevelBlock* other) +{ + for (int i = 0; i < function()->block_count(); i++) + function()->block(i)->_can_reach_visited = false; + + return can_reach_helper(other); +} + +bool SharkTopLevelBlock::can_reach_helper(SharkTopLevelBlock* other) +{ + if (this == other) + return true; + + if (_can_reach_visited) + return false; + _can_reach_visited = true; + + if (!has_trap()) { + for (int i = 0; i < num_successors(); i++) { + if (successor(i)->can_reach_helper(other)) + return true; + } + } + + for (int i = 0; i < num_exceptions(); i++) { + if (exception(i)->can_reach_helper(other)) + return true; + } + + return false; +} + void SharkTopLevelBlock::do_trap(int trap_request) { current_state()->decache_for_trap(); diff -r 8172797b7706 -r 30e7e69f5c8b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri May 29 10:12:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri May 29 12:38:51 2009 +0100 @@ -311,6 +311,14 @@ class SharkTopLevelBlock : public SharkB // Safepoints private: void maybe_add_safepoint(); + void maybe_add_backedge_safepoint(); + + // Loop safepoint removal + private: + bool _can_reach_visited; + + bool can_reach(SharkTopLevelBlock* other); + bool can_reach_helper(SharkTopLevelBlock* other); // Traps private: From gbenson at redhat.com Wed Jun 10 13:45:34 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:34 +0000 Subject: changeset in /hg/icedtea: 2009-06-02 Gary Benson changeset 1efa073c96fa in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1efa073c96fa description: 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::call_vm): Bugfix. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 +- diffs (24 lines): diff -r ef4d96a390a9 -r 1efa073c96fa ChangeLog --- a/ChangeLog Tue Jun 02 15:14:15 2009 +0100 +++ b/ChangeLog Tue Jun 02 15:30:30 2009 +0100 @@ -1,3 +1,8 @@ 2009-06-02 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::call_vm): Bugfix. + 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r ef4d96a390a9 -r 1efa073c96fa ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:14:15 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:30:30 2009 +0100 @@ -263,7 +263,7 @@ class SharkTopLevelBlock : public SharkB llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); - if (exception_action) { + if (exception_action & EAM_CHECK) { check_pending_exception(exception_action); current_state()->set_has_safepointed(true); } From gbenson at redhat.com Wed Jun 10 13:45:34 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:34 +0000 Subject: changeset in /hg/icedtea: 2009-06-02 Gary Benson changeset ef4d96a390a9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ef4d96a390a9 description: 2009-06-02 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::ExceptionAction): Replaced with... (SharkTopLevelBlock::ExceptionActionMask): New enum. (SharkTopLevelBlock::check_pending_exception): Changed type of action argument from ExceptionAction to int. (SharkTopLevelBlock::handle_exception): Likewise. (SharkTopLevelBlock::call_vm): Likewise. (SharkTopLevelBlock::acquire_lock): Likewise. (SharkTopLevelBlock::release_lock): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::check_pending_exception): Changed type of action argument from ExceptionAction to int, and added monitor-fudging support. (SharkTopLevelBlock::handle_exception): Changed type of action argument from ExceptionAction to int. (SharkTopLevelBlock::acquire_lock): Changed type of action argument from ExceptionAction to int, and added monitor- fudging to the VM call. (SharkTopLevelBlock::release_lock): Likewise. diffstat: 3 files changed, 71 insertions(+), 32 deletions(-) ChangeLog | 22 +++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 35 +++++++---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 46 ++++++++------- diffs (213 lines): diff -r 30e7e69f5c8b -r ef4d96a390a9 ChangeLog --- a/ChangeLog Fri May 29 12:38:51 2009 +0100 +++ b/ChangeLog Tue Jun 02 15:14:15 2009 +0100 @@ -1,3 +1,25 @@ 2009-05-29 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::ExceptionAction): Replaced with... + (SharkTopLevelBlock::ExceptionActionMask): New enum. + (SharkTopLevelBlock::check_pending_exception): Changed type + of action argument from ExceptionAction to int. + (SharkTopLevelBlock::handle_exception): Likewise. + (SharkTopLevelBlock::call_vm): Likewise. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::check_pending_exception): Changed type + of action argument from ExceptionAction to int, and added + monitor-fudging support. + (SharkTopLevelBlock::handle_exception): Changed type of + action argument from ExceptionAction to int. + (SharkTopLevelBlock::acquire_lock): Changed type of action + argument from ExceptionAction to int, and added monitor- + fudging to the VM call. + (SharkTopLevelBlock::release_lock): Likewise. + 2009-05-29 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r 30e7e69f5c8b -r ef4d96a390a9 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri May 29 12:38:51 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 02 15:14:15 2009 +0100 @@ -331,9 +331,9 @@ void SharkTopLevelBlock::check_bounds(Sh builder()->SetInsertPoint(in_bounds); } -void SharkTopLevelBlock::check_pending_exception(ExceptionAction action) -{ - assert(action != EX_CHECK_NONE, "shouldn't be"); +void SharkTopLevelBlock::check_pending_exception(int action) +{ + assert(action & EAM_CHECK, "should be"); BasicBlock *exception = function()->CreateBlock("exception"); BasicBlock *no_exception = function()->CreateBlock("no_exception"); @@ -349,16 +349,23 @@ void SharkTopLevelBlock::check_pending_e builder()->SetInsertPoint(exception); builder()->CreateStore(LLVMValue::null(), pending_exception_addr); SharkState *saved_state = current_state()->copy(); - handle_exception(pending_exception, action); + if (action & EAM_MONITOR_FUDGE) { + // The top monitor is marked live, but the exception was thrown + // while setting it up or tearing it down. We need to mark it + // dead before we enter any exception handlers as they will not + // expect it to be there. + set_num_monitors(num_monitors() - 1); + action ^= EAM_MONITOR_FUDGE; + } + handle_exception(pending_exception, action); set_current_state(saved_state); builder()->SetInsertPoint(no_exception); } -void SharkTopLevelBlock::handle_exception(Value* exception, - ExceptionAction action) -{ - if (action == EX_CHECK_FULL && num_exceptions() != 0) { +void SharkTopLevelBlock::handle_exception(Value* exception, int action) +{ + if (action & EAM_HANDLE && num_exceptions() != 0) { // Clear the stack and push the exception onto it. // We do this now to protect it across the VM call // we may be about to make. @@ -1631,7 +1638,7 @@ void SharkTopLevelBlock::do_monitorexit( release_lock(EX_CHECK_FULL); } -void SharkTopLevelBlock::acquire_lock(Value *lockee, ExceptionAction ea) +void SharkTopLevelBlock::acquire_lock(Value *lockee, int exception_action) { BasicBlock *try_recursive = function()->CreateBlock("try_recursive"); BasicBlock *got_recursive = function()->CreateBlock("got_recursive"); @@ -1705,7 +1712,9 @@ void SharkTopLevelBlock::acquire_lock(Va // It's not a recursive case so we need to drop into the runtime builder()->SetInsertPoint(not_recursive); - call_vm(SharkRuntime::monitorenter(), monitor_addr, ea); + call_vm( + SharkRuntime::monitorenter(), monitor_addr, + exception_action | EAM_MONITOR_FUDGE); BasicBlock *acquired_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_acquired); @@ -1714,7 +1723,7 @@ void SharkTopLevelBlock::acquire_lock(Va current_state()->merge(fast_state, acquired_fast, acquired_slow); } -void SharkTopLevelBlock::release_lock(ExceptionAction ea) +void SharkTopLevelBlock::release_lock(int exception_action) { BasicBlock *not_recursive = function()->CreateBlock("not_recursive"); BasicBlock *released_fast = function()->CreateBlock("released_fast"); @@ -1757,7 +1766,9 @@ void SharkTopLevelBlock::release_lock(Ex // Need to drop into the runtime to release this one builder()->SetInsertPoint(slow_path); - call_vm(SharkRuntime::monitorexit(), monitor_addr, ea); + call_vm( + SharkRuntime::monitorexit(), monitor_addr, + exception_action | EAM_MONITOR_FUDGE); BasicBlock *released_slow = builder()->GetInsertBlock(); builder()->CreateBr(lock_released); diff -r 30e7e69f5c8b -r ef4d96a390a9 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri May 29 12:38:51 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 02 15:14:15 2009 +0100 @@ -237,28 +237,34 @@ class SharkTopLevelBlock : public SharkB SharkState* saved_state, llvm::BasicBlock* continue_block); // Exceptions - enum ExceptionAction { - EX_CHECK_NONE, // don't check for pending exceptions - EX_CHECK_NO_CATCH, // if there is a pending exception then throw it - EX_CHECK_FULL // if there is a pending exception then catch it - }; // if it has a handler or throw it otherwise - void check_pending_exception(ExceptionAction action); - void handle_exception(llvm::Value* exception, ExceptionAction action); + enum ExceptionActionMask { + // The actual bitmasks that things test against + EAM_CHECK = 1, // whether to check for pending exceptions + EAM_HANDLE = 2, // whether to attempt to handle pending exceptions + EAM_MONITOR_FUDGE = 4, // whether the monitor count needs adjusting + + // More convenient values for passing + EX_CHECK_NONE = 0, + EX_CHECK_NO_CATCH = EAM_CHECK, + EX_CHECK_FULL = EAM_CHECK | EAM_HANDLE + }; + void check_pending_exception(int action); + void handle_exception(llvm::Value* exception, int action); // VM calls private: llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value** args_start, llvm::Value** args_end, - ExceptionAction ea) + int exception_action) { current_state()->decache_for_VM_call(); function()->set_last_Java_frame(); llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); - if (ea != EX_CHECK_NONE) { - check_pending_exception(ea); + if (exception_action) { + check_pending_exception(exception_action); current_state()->set_has_safepointed(true); } return res; @@ -266,40 +272,40 @@ class SharkTopLevelBlock : public SharkB public: llvm::CallInst* call_vm(llvm::Constant* callee, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread()}; - return call_vm(callee, args, args + 1, ea); + return call_vm(callee, args, args + 1, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1}; - return call_vm(callee, args, args + 2, ea); + return call_vm(callee, args, args + 2, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1, arg2}; - return call_vm(callee, args, args + 3, ea); + return call_vm(callee, args, args + 3, exception_action); } llvm::CallInst* call_vm(llvm::Constant* callee, llvm::Value* arg1, llvm::Value* arg2, llvm::Value* arg3, - ExceptionAction ea) + int exception_action) { llvm::Value *args[] = {thread(), arg1, arg2, arg3}; - return call_vm(callee, args, args + 4, ea); + return call_vm(callee, args, args + 4, exception_action); } // Synchronization private: - void acquire_lock(llvm::Value* lockee, ExceptionAction ea); - void release_lock(ExceptionAction ea); + void acquire_lock(llvm::Value* lockee, int exception_action); + void release_lock(int exception_action); public: void acquire_method_lock(); From gbenson at redhat.com Wed Jun 10 13:45:35 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:35 +0000 Subject: changeset in /hg/icedtea: 2009-06-03 Gary Benson changeset cfde2b7253fe in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=cfde2b7253fe description: 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: Updated copyright year. * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp: Likewise. diffstat: 3 files changed, 9 insertions(+), 2 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp | 2 +- ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp | 2 +- diffs (36 lines): diff -r de86c471691b -r cfde2b7253fe ChangeLog --- a/ChangeLog Wed Jun 10 17:11:59 2009 +0100 +++ b/ChangeLog Wed Jun 03 09:37:51 2009 -0400 @@ -1,3 +1,10 @@ 2009-06-03 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: + Updated copyright year. + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp: + Likewise. + 2009-06-03 Gary Benson * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp diff -r de86c471691b -r cfde2b7253fe ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 10 17:11:59 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Wed Jun 03 09:37:51 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 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 diff -r de86c471691b -r cfde2b7253fe ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 10 17:11:59 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Wed Jun 03 09:37:51 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007 Red Hat, Inc. + * Copyright 2007, 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 From gbenson at redhat.com Wed Jun 10 13:45:36 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:36 +0000 Subject: changeset in /hg/icedtea: 2009-06-04 Gary Benson changeset 51053321f7b4 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=51053321f7b4 description: 2009-06-04 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkConstant.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::lookup_for_ldc): Removed. (SharkBlock::do_ldc): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Use new code for ldc and friends. (SharkBlock::do_field_access): Use new code for constant fields. (SharkBlock::lookup_for_ldc): Removed. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlinerHelper::is_inlinable): Use new code for ldc and friends. (SharkInlinerHelper::do_field_access): Use new code for constant fields. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::lookup_for_ldc): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Use new code to for ldc and constant field traps. (SharkTopLevelBlock::lookup_for_ldc): Removed. * ports/hotspot/src/share/vm/shark/sharkValue.hpp (SharkValue::from_ciConstant): Removed. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 10 files changed, 247 insertions(+), 101 deletions(-) ChangeLog | 29 +++ ports/hotspot/src/share/vm/includeDB_shark | 14 + ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 11 - ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 11 - ports/hotspot/src/share/vm/shark/sharkConstant.cpp | 121 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkConstant.hpp | 68 ++++++++ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 16 - ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 38 ---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkValue.hpp | 39 ---- diffs (truncated from 512 to 500 lines): diff -r 6dedbb6d0a87 -r 51053321f7b4 ChangeLog --- a/ChangeLog Wed Jun 03 11:15:36 2009 -0400 +++ b/ChangeLog Thu Jun 04 09:48:19 2009 -0400 @@ -1,3 +1,32 @@ 2009-06-03 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkConstant.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkConstant.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::lookup_for_ldc): Removed. + (SharkBlock::do_ldc): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Use new code for ldc and friends. + (SharkBlock::do_field_access): Use new code for constant fields. + (SharkBlock::lookup_for_ldc): Removed. + + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlinerHelper::is_inlinable): Use new code for ldc and friends. + (SharkInlinerHelper::do_field_access): Use new code for constant fields. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::lookup_for_ldc): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Use new code to for ldc and + constant field traps. + (SharkTopLevelBlock::lookup_for_ldc): Removed. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::from_ciConstant): Removed. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Jun 04 09:48:19 2009 -0400 @@ -73,6 +73,7 @@ sharkBlock.cpp sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp +sharkBlock.cpp sharkConstant.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp sharkBlock.cpp sharkValue.hpp @@ -83,6 +84,7 @@ sharkBlock.hpp sharkBlock.hpp debug.hpp sharkBlock.hpp llvmHeaders.hpp sharkBlock.hpp sharkBuilder.hpp +sharkBlock.hpp sharkConstant.hpp sharkBlock.hpp sharkState.hpp sharkBlock.hpp sharkValue.hpp @@ -158,6 +160,16 @@ sharkCompiler.hpp sharkCompiler.hpp llvmHeaders.hpp sharkCompiler.hpp sharkMemoryManager.hpp +sharkConstant.cpp ciStreams.hpp +sharkConstant.cpp sharkBuilder.hpp +sharkConstant.cpp sharkConstant.hpp +sharkConstant.cpp sharkValue.hpp + +sharkConstant.hpp allocation.hpp +sharkConstant.hpp ciStreams.hpp +sharkConstant.hpp sharkBuilder.hpp +sharkConstant.hpp sharkValue.hpp + sharkConstantPool.cpp allocation.hpp sharkConstantPool.cpp constantPoolOop.hpp sharkConstantPool.cpp cpCacheOop.hpp @@ -215,6 +227,7 @@ sharkInliner.cpp sharkInliner.cpp ciMethod.hpp sharkInliner.cpp ciStreams.hpp sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkConstant.hpp sharkInliner.cpp sharkInliner.hpp sharkInliner.cpp sharkIntrinsics.hpp sharkInliner.cpp sharkState.inline.hpp @@ -302,6 +315,7 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp shark_globals.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp +sharkTopLevelBlock.cpp sharkConstant.hpp sharkTopLevelBlock.cpp sharkConstantPool.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -163,7 +163,7 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_ldc: case Bytecodes::_ldc_w: case Bytecodes::_ldc2_w: - do_ldc(); + push(SharkConstant::for_ldc(iter())->value(builder())); break; case Bytecodes::_iload_0: @@ -996,7 +996,9 @@ void SharkBlock::do_field_access(bool is object = value->generic_value(); } if (is_get && field->is_constant()) { - value = SharkValue::from_ciConstant(field->constant_value()); + SharkConstant *constant = SharkConstant::for_field(iter()); + if (constant->is_loaded()) + value = constant->value(builder()); } if (!is_get || value == NULL) { if (!is_field) @@ -1163,11 +1165,6 @@ void SharkBlock::do_trap(int trap_reques ShouldNotCallThis(); } -Value* SharkBlock::lookup_for_ldc() -{ - ShouldNotCallThis(); -} - Value* SharkBlock::lookup_for_field_access() { ShouldNotCallThis(); diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -202,7 +202,6 @@ class SharkBlock : public ResourceObj { // Helpers protected: virtual void do_zero_check(SharkValue* value); - virtual llvm::Value* lookup_for_ldc(); virtual llvm::Value* lookup_for_field_access(); // Leaf calls @@ -240,16 +239,6 @@ class SharkBlock : public ResourceObj { virtual int trap_bci(); virtual void do_trap(int trap_request); - // ldc* - private: - void do_ldc() - { - SharkValue *value = SharkValue::from_ciConstant(iter()->get_constant()); - if (value == NULL) - value = SharkValue::create_jobject(lookup_for_ldc(), true); - push(value); - } - // arraylength protected: virtual void do_arraylength(); diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkConstant.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -0,0 +1,121 @@ +/* + * 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/_sharkConstant.cpp.incl" + +using namespace llvm; + +SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) +{ + return new SharkConstant(iter->get_constant(), NULL); +} + +SharkConstant* SharkConstant::for_field(ciBytecodeStream *iter) +{ + bool will_link; + ciField *field = iter->get_field(will_link); + assert(will_link, "typeflow responsibility"); + + return new SharkConstant(field->constant_value(), field->type()); +} + +SharkConstant::SharkConstant(ciConstant constant, ciType *type) +{ + SharkValue *value = NULL; + + switch (constant.basic_type()) { + case T_BOOLEAN: + case T_BYTE: + case T_CHAR: + case T_SHORT: + case T_INT: + value = SharkValue::jint_constant(constant.as_int()); + break; + + case T_LONG: + value = SharkValue::jlong_constant(constant.as_long()); + break; + + case T_FLOAT: + value = SharkValue::jfloat_constant(constant.as_float()); + break; + + case T_DOUBLE: + value = SharkValue::jdouble_constant(constant.as_double()); + break; + + case T_OBJECT: + case T_ARRAY: + break; + + case T_ILLEGAL: + // out of memory + _is_loaded = false; + return; + + default: + tty->print_cr("Unhandled type %s", type2name(constant.basic_type())); + ShouldNotReachHere(); + } + + // Handle primitive types. We create SharkValues for these + // now; doing so doesn't emit any code, and it allows us to + // delegate a bunch of stuff to the SharkValue code. + if (value) { + _value = value; + _is_loaded = true; + _is_nonzero = value->zero_checked(); + _is_two_word = value->is_two_word(); + return; + } + + // Handle reference types. This is tricky because some + // ciObjects are psuedo-objects that refer to oops which + // have yet to be created. We need to spot the unloaded + // objects (which differ between ldc* and get*, thanks!) + ciObject *object = constant.as_object(); + if (object->is_klass()) { + // The constant returned for a klass is the ciKlass + // for the entry, but we want the java_mirror. + ciKlass *klass = object->as_klass(); + if (!klass->is_loaded()) { + _is_loaded = false; + return; + } + object = klass->java_mirror(); + } + if (object->is_null_object() || !object->has_encoding()) { + _is_loaded = false; + return; + } + + _value = NULL; + _object = object; + _type = type ? type : ciType::make(T_OBJECT); + _is_loaded = true; + _is_nonzero = true; + _is_two_word = false; +} diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkConstant.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -0,0 +1,68 @@ +/* + * 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 SharkConstant : public ResourceObj { + public: + static SharkConstant* for_ldc(ciBytecodeStream* iter); + static SharkConstant* for_field(ciBytecodeStream* iter); + + private: + SharkConstant(ciConstant constant, ciType* type); + + private: + SharkValue* _value; + ciObject* _object; + ciType* _type; + bool _is_loaded; + bool _is_nonzero; + bool _is_two_word; + + public: + bool is_loaded() const + { + return _is_loaded; + } + bool is_nonzero() const + { + assert(is_loaded(), "should be"); + return _is_nonzero; + } + bool is_two_word() const + { + assert(is_loaded(), "should be"); + return _is_two_word; + } + + public: + SharkValue* value(SharkBuilder* builder) + { + assert(is_loaded(), "should be"); + if (_value == NULL) { + _value = SharkValue::create_generic( + _type, builder->CreateInlineOop(_object), _is_nonzero); + } + return _value; + } +}; diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkInliner.cpp --- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -267,7 +267,7 @@ bool SharkInlinerHelper::is_inlinable() ResourceMark rm; initialize_for_check(); - SharkValue *sv; + SharkConstant *sc; bool a, b, c, d; iter()->reset_to_bci(0); @@ -323,11 +323,11 @@ bool SharkInlinerHelper::is_inlinable() case Bytecodes::_ldc: case Bytecodes::_ldc_w: case Bytecodes::_ldc2_w: - sv = SharkValue::from_ciConstant(iter()->get_constant()); - if (sv == NULL) + sc = SharkConstant::for_ldc(iter()); + if (!sc->is_loaded()) return false; - push(sv->zero_checked()); - if (sv->is_two_word()) + push(sc->is_nonzero()); + if (sc->is_two_word()) push(false); break; @@ -753,9 +753,9 @@ bool SharkInlinerHelper::do_field_access if (is_get) { bool result_pushed = false; if (field->is_constant()) { - SharkValue *value = SharkValue::from_ciConstant(field->constant_value()); - if (value != NULL) { - push(value->zero_checked()); + SharkConstant *sc = SharkConstant::for_field(iter()); + if (sc->is_loaded()) { + push(sc->is_nonzero()); result_pushed = true; } } diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 04 09:48:19 2009 -0400 @@ -48,7 +48,7 @@ void SharkTopLevelBlock::scan_for_traps( switch (bc()) { case Bytecodes::_ldc: case Bytecodes::_ldc_w: - if (iter()->is_unresolved_string() || iter()->is_unresolved_klass()) { + if (!SharkConstant::for_ldc(iter())->is_loaded()) { set_trap( Deoptimization::make_trap_request( Deoptimization::Reason_uninitialized, @@ -80,10 +80,9 @@ void SharkTopLevelBlock::scan_for_traps( if (is_field) break; - // There won't be a pool access if this is a getstatic that - // resolves to a handled constant either + // There won't be a pool access if this is a constant getstatic if (bc() == Bytecodes::_getstatic && field->is_constant()) { - if (SharkValue::from_ciConstant(field->constant_value())) + if (SharkConstant::for_field(iter())->is_loaded()) break; } @@ -609,37 +608,6 @@ void SharkTopLevelBlock::handle_return(B builder()->CreateRetVoid(); } -Value *SharkTopLevelBlock::lookup_for_ldc() -{ - int index = iter()->get_constant_index(); - constantTag tag = target()->holder()->constant_pool_tag_at(index); - - SharkConstantPool constants(this); - Value *entry = constants.object_at(index); - - Value *klass_part; - switch (tag.value()) { - case JVM_CONSTANT_String: - return entry; - - case JVM_CONSTANT_Class: - klass_part = builder()->CreateAddressOfStructEntry( - entry, - in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), - SharkType::klass_type(), - "klass_part"); - // XXX FIXME: We need a memory barrier before this load - return builder()->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror"); - - default: - ShouldNotReachHere(); - } -} - Value* SharkTopLevelBlock::lookup_for_field_access() { SharkConstantPool constants(this); diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -222,7 +222,6 @@ class SharkTopLevelBlock : public SharkB // Helpers private: - llvm::Value* lookup_for_ldc(); llvm::Value* lookup_for_field_access(); void do_branch(int successor_index); diff -r 6dedbb6d0a87 -r 51053321f7b4 ports/hotspot/src/share/vm/shark/sharkValue.hpp --- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Wed Jun 03 11:15:36 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Thu Jun 04 09:48:19 2009 -0400 @@ -146,45 +146,6 @@ class SharkValue : public ResourceObj { } static inline SharkValue* address_constant(int bci); - // Typed conversion from HotSpot ciConstants - public: - static SharkValue* from_ciConstant(ciConstant value) - { - switch (value.basic_type()) { - case T_BOOLEAN: - return SharkValue::jint_constant(value.as_boolean()); - - case T_BYTE: - return SharkValue::jint_constant(value.as_byte()); - - case T_CHAR: - return SharkValue::jint_constant(value.as_char()); - - case T_SHORT: - return SharkValue::jint_constant(value.as_short()); - - case T_INT: - return SharkValue::jint_constant(value.as_int()); - - case T_LONG: - return SharkValue::jlong_constant(value.as_long()); - - case T_FLOAT: - return SharkValue::jfloat_constant(value.as_float()); - - case T_DOUBLE: - return SharkValue::jdouble_constant(value.as_double()); - - case T_OBJECT: From gbenson at redhat.com Wed Jun 10 13:45:33 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:33 +0000 Subject: changeset in /hg/icedtea: 2009-05-29 Gary Benson changeset 8172797b7706 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8172797b7706 description: 2009-05-29 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState::_has_safepointed): New field. (SharkState::has_safepointed): New method. (SharkState::set_has_safepointed): Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::SharkState): Initialize the above. (SharkState::equal_to): Compare the above. (SharkState::merge): Merge the above. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::add_safepoint): Replaced with... (SharkBlock::maybe_add_safepoint): New method. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::add_safepoint): Replaced with... (SharkBlock::maybe_add_safepoint): New method. (SharkBlock::parse_bytecode): Updated for above. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::add_safepoint): Replaced with... (SharkTopLevelBlock::maybe_add_safepoint): New method. (SharkTopLevelBlock::call_vm): Mark that a safepoint check has occurred if a full VM call is made. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::add_safepoint): Replaced with... (SharkTopLevelBlock::maybe_add_safepoint): New method. (SharkTopLevelBlock::do_return): Updated for above. (SharkTopLevelBlock::do_call): Mark that a safepoint check has occurred if a non-inlined Java call is made. diffstat: 7 files changed, 74 insertions(+), 13 deletions(-) ChangeLog | 31 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 10 ++-- ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 2 ports/hotspot/src/share/vm/shark/sharkState.cpp | 12 ++++- ports/hotspot/src/share/vm/shark/sharkState.hpp | 12 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 14 +++++- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 6 +- diffs (232 lines): diff -r 6e7eb4f8bc66 -r 8172797b7706 ChangeLog --- a/ChangeLog Thu May 28 16:56:19 2009 +0100 +++ b/ChangeLog Fri May 29 10:12:01 2009 +0100 @@ -1,3 +1,34 @@ 2009-05-28 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::_has_safepointed): New field. + (SharkState::has_safepointed): New method. + (SharkState::set_has_safepointed): Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::SharkState): Initialize the above. + (SharkState::equal_to): Compare the above. + (SharkState::merge): Merge the above. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::add_safepoint): Replaced with... + (SharkBlock::maybe_add_safepoint): New method. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::add_safepoint): Replaced with... + (SharkBlock::maybe_add_safepoint): New method. + (SharkBlock::parse_bytecode): Updated for above. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::add_safepoint): Replaced with... + (SharkTopLevelBlock::maybe_add_safepoint): New method. + (SharkTopLevelBlock::call_vm): Mark that a safepoint check + has occurred if a full VM call is made. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::add_safepoint): Replaced with... + (SharkTopLevelBlock::maybe_add_safepoint): New method. + (SharkTopLevelBlock::do_return): Updated for above. + (SharkTopLevelBlock::do_call): Mark that a safepoint check + has occurred if a non-inlined Java call is made. + 2009-05-28 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 6e7eb4f8bc66 -r 8172797b7706 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu May 28 16:56:19 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri May 29 10:12:01 2009 +0100 @@ -74,24 +74,24 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_if_icmpgt: case Bytecodes::_if_icmpge: if (iter()->get_dest() <= bci()) - add_safepoint(); + maybe_add_safepoint(); break; case Bytecodes::_goto_w: if (iter()->get_far_dest() <= bci()) - add_safepoint(); + maybe_add_safepoint(); break; case Bytecodes::_tableswitch: case Bytecodes::_lookupswitch: if (switch_default_dest() <= bci()) { - add_safepoint(); + maybe_add_safepoint(); break; } int len = switch_table_length(); for (int i = 0; i < len; i++) { if (switch_dest(i) <= bci()) { - add_safepoint(); + maybe_add_safepoint(); break; } } @@ -1138,7 +1138,7 @@ void SharkBlock::do_zero_check(SharkValu ShouldNotCallThis(); } -void SharkBlock::add_safepoint() +void SharkBlock::maybe_add_safepoint() { ShouldNotCallThis(); } diff -r 6e7eb4f8bc66 -r 8172797b7706 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu May 28 16:56:19 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri May 29 10:12:01 2009 +0100 @@ -231,7 +231,7 @@ class SharkBlock : public ResourceObj { // Safepoints protected: - virtual void add_safepoint(); + virtual void maybe_add_safepoint(); // Traps protected: diff -r 6e7eb4f8bc66 -r 8172797b7706 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Thu May 28 16:56:19 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri May 29 10:12:01 2009 +0100 @@ -33,7 +33,8 @@ SharkState::SharkState(SharkBlock* block _function(function), _method(NULL), _oop_tmp(NULL), - _frame_cache(NULL) + _frame_cache(NULL), + _has_safepointed(false) { initialize(NULL); } @@ -43,7 +44,8 @@ SharkState::SharkState(SharkBlock* block _function(state->function()), _method(state->method()), _oop_tmp(state->oop_tmp()), - _frame_cache(NULL) + _frame_cache(NULL), + _has_safepointed(state->has_safepointed()) { initialize(state); } @@ -103,6 +105,9 @@ bool SharkState::equal_to(SharkState *ot return false; if (num_monitors() != other->num_monitors()) + return false; + + if (has_safepointed() != other->has_safepointed()) return false; // Local variables @@ -215,6 +220,9 @@ void SharkState::merge(SharkState* other // Frame cache frame_cache()->merge(other->frame_cache()); + + // Safepointed status + set_has_safepointed(this->has_safepointed() && other->has_safepointed()); } void SharkState::decache_for_Java_call(ciMethod* callee) diff -r 6e7eb4f8bc66 -r 8172797b7706 ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Thu May 28 16:56:19 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri May 29 10:12:01 2009 +0100 @@ -45,6 +45,7 @@ class SharkState : public ResourceObj { SharkValue** _sp; int _num_monitors; llvm::Value* _oop_tmp; + bool _has_safepointed; public: SharkBlock *block() const @@ -159,6 +160,17 @@ class SharkState : public ResourceObj { void set_oop_tmp(llvm::Value* oop_tmp) { _oop_tmp = oop_tmp; + } + + // Safepointed status + public: + bool has_safepointed() const + { + return _has_safepointed; + } + void set_has_safepointed(bool has_safepointed) + { + _has_safepointed = has_safepointed; } // Comparison diff -r 6e7eb4f8bc66 -r 8172797b7706 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu May 28 16:56:19 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri May 29 10:12:01 2009 +0100 @@ -435,8 +435,11 @@ void SharkTopLevelBlock::handle_exceptio handle_return(T_VOID, exception); } -void SharkTopLevelBlock::add_safepoint() -{ +void SharkTopLevelBlock::maybe_add_safepoint() +{ + if (current_state()->has_safepointed()) + return; + BasicBlock *orig_block = builder()->GetInsertBlock(); SharkState *orig_state = current_state()->copy(); @@ -462,6 +465,8 @@ void SharkTopLevelBlock::add_safepoint() builder()->SetInsertPoint(safepointed); current_state()->merge(orig_state, orig_block, safepointed_block); + + current_state()->set_has_safepointed(true); } void SharkTopLevelBlock::do_trap(int trap_request) @@ -720,7 +725,7 @@ void SharkTopLevelBlock::do_return(Basic { if (target()->intrinsic_id() == vmIntrinsics::_Object_init) call_register_finalizer(local(0)->jobject_value()); - add_safepoint(); + maybe_add_safepoint(); handle_return(type, NULL); } @@ -1142,6 +1147,9 @@ void SharkTopLevelBlock::do_call() // Check for pending exceptions check_pending_exception(EX_CHECK_FULL); + + // Mark that a safepoint check has occurred + current_state()->set_has_safepointed(true); } void SharkTopLevelBlock::do_instance_check() diff -r 6e7eb4f8bc66 -r 8172797b7706 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu May 28 16:56:19 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri May 29 10:12:01 2009 +0100 @@ -257,8 +257,10 @@ class SharkTopLevelBlock : public SharkB llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); function()->reset_last_Java_frame(); current_state()->cache_after_VM_call(); - if (ea != EX_CHECK_NONE) + if (ea != EX_CHECK_NONE) { check_pending_exception(ea); + current_state()->set_has_safepointed(true); + } return res; } @@ -308,7 +310,7 @@ class SharkTopLevelBlock : public SharkB // Safepoints private: - void add_safepoint(); + void maybe_add_safepoint(); // Traps private: From gbenson at redhat.com Wed Jun 10 13:45:37 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:37 +0000 Subject: changeset in /hg/icedtea: 2009-06-05 Gary Benson changeset 99fc93351f7f in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=99fc93351f7f description: 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::acquire_method_lock): Removed constant pool lookup. diffstat: 2 files changed, 13 insertions(+), 7 deletions(-) ChangeLog | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 14 +++++++------- diffs (38 lines): diff -r 62021319ded8 -r 99fc93351f7f ChangeLog --- a/ChangeLog Fri Jun 05 06:47:14 2009 -0400 +++ b/ChangeLog Fri Jun 05 12:12:00 2009 +0100 @@ -1,3 +1,9 @@ 2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::acquire_method_lock): Removed constant + pool lookup. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 62021319ded8 -r 99fc93351f7f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 06:47:14 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 12:12:00 2009 +0100 @@ -1563,14 +1563,14 @@ void SharkTopLevelBlock::do_multianewarr void SharkTopLevelBlock::acquire_method_lock() { + Value *lockee; + if (target()->is_static()) + lockee = builder()->CreateInlineOop(target()->holder()->java_mirror()); + else + lockee = local(0)->jobject_value(); + iter()->force_bci(start()); // for the decache in acquire_lock - if (target()->is_static()) { - SharkConstantPool constants(this); - acquire_lock(constants.java_mirror(), EX_CHECK_NO_CATCH); - } - else { - acquire_lock(local(0)->jobject_value(), EX_CHECK_NO_CATCH); - } + acquire_lock(lockee, EX_CHECK_NO_CATCH); } void SharkTopLevelBlock::do_monitorenter() From gbenson at redhat.com Wed Jun 10 13:45:40 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:40 +0000 Subject: changeset in /hg/icedtea: 2009-06-10 Gary Benson changeset 29be67755005 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=29be67755005 description: 2009-06-10 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::CallType): Removed. (SharkTopLevelBlock::get_call_type): Likewise. (SharkTopLevelBlock::get_callee): Likewise. (SharkTopLevelBlock::improve_virtual_call): New method. (SharkTopLevelBlock::get_virtual_callee): Updated. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Updated call traps. (SharkTopLevelBlock::get_call_type): Removed. (SharkTopLevelBlock::get_callee): Likewise. (SharkTopLevelBlock::improve_virtual_call): New method. (SharkTopLevelBlock::get_virtual_callee): Updated. (SharkTopLevelBlock::do_call): Replaced callee selection. diffstat: 3 files changed, 155 insertions(+), 85 deletions(-) ChangeLog | 16 + ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 208 +++++++++------ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 16 - diffs (329 lines): diff -r 19e7ed3a153a -r 29be67755005 ChangeLog --- a/ChangeLog Wed Jun 10 18:10:29 2009 +0100 +++ b/ChangeLog Wed Jun 10 13:22:21 2009 +0100 @@ -1,3 +1,19 @@ 2009-06-09 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::CallType): Removed. + (SharkTopLevelBlock::get_call_type): Likewise. + (SharkTopLevelBlock::get_callee): Likewise. + (SharkTopLevelBlock::improve_virtual_call): New method. + (SharkTopLevelBlock::get_virtual_callee): Updated. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Updated call traps. + (SharkTopLevelBlock::get_call_type): Removed. + (SharkTopLevelBlock::get_callee): Likewise. + (SharkTopLevelBlock::improve_virtual_call): New method. + (SharkTopLevelBlock::get_virtual_callee): Updated. + (SharkTopLevelBlock::do_call): Replaced callee selection. + 2009-06-09 Gary Benson * patches/hotspot/default/icedtea-shark.patch diff -r 19e7ed3a153a -r 29be67755005 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 18:10:29 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 13:22:21 2009 +0100 @@ -75,37 +75,13 @@ void SharkTopLevelBlock::scan_for_traps( } break; + case Bytecodes::_invokestatic: + case Bytecodes::_invokespecial: case Bytecodes::_invokevirtual: - method = iter()->get_method(will_link); - assert(will_link, "typeflow responsibility"); - - // If this is a non-final invokevirtual then we need to - // check that its holder is linked, because its vtable - // won't have been set up otherwise. - if (!method->is_final_method() && !method->holder()->is_linked()) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } - break; - case Bytecodes::_invokeinterface: method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); - // Handle 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 legal corner case in the spec, and while javac does not - // generate this code there's no reason a compliant Java - // compiler should not. See cpCacheOop.cpp and - // interpreterRuntime.cpp for more details. - if (method->holder() == function()->env()->Object_klass()) - Unimplemented(); - - // Bail out if the holder is unloaded if (!method->holder()->is_linked()) { set_trap( Deoptimization::make_trap_request( @@ -841,39 +817,78 @@ void SharkTopLevelBlock::do_switch() } } -// Figure out what type of call this is. -// - Direct calls are where the callee is fixed. -// - Interface and Virtual calls require lookup at runtime. -// NB some invokevirtuals can be resolved to direct calls. -SharkTopLevelBlock::CallType SharkTopLevelBlock::get_call_type(ciMethod* method) -{ - if (bc() == Bytecodes::_invokeinterface) - return CALL_INTERFACE; - else if (bc() == Bytecodes::_invokevirtual && !method->is_final_method()) - return CALL_VIRTUAL; - else - return CALL_DIRECT; -} - -Value *SharkTopLevelBlock::get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver) -{ - switch (call_type) { - case CALL_DIRECT: - return get_direct_callee(method); - case CALL_VIRTUAL: - return get_virtual_callee(receiver, method); - case CALL_INTERFACE: - return get_interface_callee(receiver, method); - default: - ShouldNotReachHere(); - } -} - -// Direct calls can be made when the callee is fixed. -// invokestatic and invokespecial are always direct; -// invokevirtual is direct in some circumstances. +ciMethod* SharkTopLevelBlock::improve_virtual_call(ciMethod* caller, + ciInstanceKlass* klass, + ciMethod* dest_method, + ciType* receiver_type) +{ + // If the method is obviously final then we are already done + if (dest_method->can_be_statically_bound()) + return dest_method; + + // Array methods are all inherited from Object and are monomorphic + if (receiver_type->is_array_klass() && + dest_method->holder() == function()->env()->Object_klass()) + return dest_method; + + // All other interesting cases are instance classes + if (!receiver_type->is_instance_klass()) + return NULL; + + // Attempt to improve the receiver + ciInstanceKlass* actual_receiver = klass; + ciInstanceKlass *improved_receiver = receiver_type->as_instance_klass(); + if (improved_receiver->is_loaded() && + improved_receiver->is_initialized() && + !improved_receiver->is_interface() && + improved_receiver->is_subtype_of(actual_receiver)) { + actual_receiver = improved_receiver; + } + + // Attempt to find a monomorphic target for this call using + // class heirachy analysis. + ciInstanceKlass *calling_klass = caller->holder(); + ciMethod* monomorphic_target = + dest_method->find_monomorphic_target(calling_klass, klass, actual_receiver); + if (monomorphic_target != NULL) { + assert(!monomorphic_target->is_abstract(), "shouldn't be"); + + // Opto has a bunch of type checking here that I don't + // understand. It's to inhibit casting in one direction, + // possibly because objects in Opto can have inexact + // types, but I can't even tell which direction it + // doesn't like. For now I'm going to block *any* cast. + if (monomorphic_target != dest_method) { +#ifndef PRODUCT + tty->print_cr("found monomorphic target, but inhibited cast:"); + tty->print(" dest_method = "); + dest_method->print_short_name(tty); + tty->cr(); + tty->print(" monomorphic_target = "); + monomorphic_target->print_short_name(tty); + tty->cr(); +#endif // !PRODUCT + monomorphic_target = NULL; + } + } + + // Replace the virtual call with a direct one. This makes + // us dependent on that target method not getting overridden + // by dynamic class loading. + if (monomorphic_target != NULL) { + function()->env()->dependencies()->assert_unique_concrete_method( + actual_receiver, monomorphic_target); + return monomorphic_target; + } + + // Because Opto distinguishes exact types from inexact ones + // it can perform a further optimization to replace calls + // with non-monomorphic targets if the receiver has an exact + // type. We don't mark types this way, so we can't do this. + + return NULL; +} + Value *SharkTopLevelBlock::get_direct_callee(ciMethod* method) { return builder()->CreateBitCast( @@ -882,9 +897,8 @@ Value *SharkTopLevelBlock::get_direct_ca "callee"); } -// Non-direct virtual calls are handled here Value *SharkTopLevelBlock::get_virtual_callee(SharkValue* receiver, - ciMethod* method) + int vtable_index) { Value *klass = builder()->CreateValueOfStructEntry( receiver->jobject_value(), @@ -898,11 +912,10 @@ Value *SharkTopLevelBlock::get_virtual_c SharkType::methodOop_type(), vtableEntry::size() * wordSize, in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - LLVMValue::intptr_constant(method->vtable_index())), + LLVMValue::intptr_constant(vtable_index)), "callee"); } -// Interface calls are handled here Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver, ciMethod* method) { @@ -1013,31 +1026,78 @@ Value* SharkTopLevelBlock::get_interface void SharkTopLevelBlock::do_call() { + // Set frequently used booleans + bool is_static = bc() == Bytecodes::_invokestatic; + bool is_virtual = bc() == Bytecodes::_invokevirtual; + bool is_interface = bc() == Bytecodes::_invokeinterface; + + // Find the method being called bool will_link; - ciMethod *method = iter()->get_method(will_link); + ciMethod *dest_method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); - - // Figure out what type of call this is - CallType call_type = get_call_type(method); + assert(dest_method->is_static() == is_static, "must match bc"); + + // Find the class of the method being called. Note + // that the superclass check in the second assertion + // is to cope with a hole in the spec that allows for + // invokeinterface instructions where the resolved + // method is a virtual method in java.lang.Object. + // javac doesn't generate code like that, but there's + // no reason a compliant Java compiler might not. + ciInstanceKlass *holder_klass = dest_method->holder(); + assert(holder_klass->is_loaded(), "scan_for_traps responsibility"); + assert(holder_klass->is_interface() || + holder_klass->super() == NULL || + !is_interface, "must match bc"); + ciKlass *holder = iter()->get_declared_method_holder(); + ciInstanceKlass *klass = + ciEnv::get_instance_klass_for_declared_method_holder(holder); // Find the receiver in the stack. We do this before // trying to inline because the inliner can only use // zero-checked values, not being able to perform the // check itself. SharkValue *receiver = NULL; - if (bc() != Bytecodes::_invokestatic) { - receiver = xstack(method->arg_size() - 1); + if (!is_static) { + receiver = xstack(dest_method->arg_size() - 1); check_null(receiver); } + // Try to improve non-direct calls + bool call_is_virtual = is_virtual || is_interface; + ciMethod *call_method = dest_method; + if (call_is_virtual) { + ciMethod *optimized_method = improve_virtual_call( + target(), klass, dest_method, receiver->type()); + if (optimized_method) { + call_method = optimized_method; + call_is_virtual = false; + } + } + // Try to inline the call - if (call_type == CALL_DIRECT) { - if (SharkInliner::attempt_inline(method, current_state(), thread())) + if (!call_is_virtual) { + if (SharkInliner::attempt_inline(call_method, current_state(), thread())) return; } // Find the method we are calling - Value *callee = get_callee(call_type, method, receiver); + Value *callee; + if (call_is_virtual) { + if (is_virtual) { + int vtable_index = call_method->resolve_vtable_index( + target()->holder(), klass); + assert(vtable_index >= 0, "should be"); + callee = get_virtual_callee(receiver, vtable_index); + } + else { + assert(is_interface, "should be"); + callee = get_interface_callee(receiver, call_method); + } + } + else { + callee = get_direct_callee(call_method); + } // Load the SharkEntry from the callee Value *base_pc = builder()->CreateValueOfStructEntry( @@ -1056,9 +1116,9 @@ void SharkTopLevelBlock::do_call() "entry_point"); // Make the call - current_state()->decache_for_Java_call(method); + current_state()->decache_for_Java_call(call_method); builder()->CreateCall3(entry_point, callee, base_pc, thread()); - current_state()->cache_after_Java_call(method); + current_state()->cache_after_Java_call(call_method); // Check for pending exceptions check_pending_exception(EX_CHECK_FULL); diff -r 19e7ed3a153a -r 29be67755005 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 18:10:29 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 13:22:21 2009 +0100 @@ -371,18 +371,12 @@ class SharkTopLevelBlock : public SharkB // invoke* private: - enum CallType { - CALL_DIRECT, - CALL_VIRTUAL, - CALL_INTERFACE - }; - CallType get_call_type(ciMethod* method); - llvm::Value* get_callee(CallType call_type, - ciMethod* method, - SharkValue* receiver); - + ciMethod* improve_virtual_call(ciMethod* caller, + ciInstanceKlass* klass, + ciMethod* dest_method, + ciType* receiver_type); llvm::Value* get_direct_callee(ciMethod* method); - llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); + llvm::Value* get_virtual_callee(SharkValue* receiver, int vtable_index); llvm::Value* get_interface_callee(SharkValue* receiver, ciMethod* method); void do_call(); From gbenson at redhat.com Wed Jun 10 13:45:37 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:37 +0000 Subject: changeset in /hg/icedtea: 2009-06-05 Gary Benson changeset 2493b242458e in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2493b242458e description: 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_full_instance_check): Add class argument. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_instance_check): Removed constant pool check. (SharkTopLevelBlock::do_full_instance_check): Removed constant pool lookup. diffstat: 3 files changed, 20 insertions(+), 18 deletions(-) ChangeLog | 9 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 27 +++++---------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 - diffs (74 lines): diff -r 99fc93351f7f -r 2493b242458e ChangeLog --- a/ChangeLog Fri Jun 05 12:12:00 2009 +0100 +++ b/ChangeLog Fri Jun 05 08:17:22 2009 -0400 @@ -1,3 +1,12 @@ 2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_full_instance_check): Add class argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_instance_check): Removed constant pool check. + (SharkTopLevelBlock::do_full_instance_check): Removed constant + pool lookup. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 99fc93351f7f -r 2493b242458e ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 12:12:00 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 08:17:22 2009 -0400 @@ -1166,23 +1166,17 @@ void SharkTopLevelBlock::do_call() void SharkTopLevelBlock::do_instance_check() { - constantTag tag = - target()->holder()->constant_pool_tag_at(iter()->get_klass_index()); - if (!tag.is_klass()) { - assert(tag.is_unresolved_klass(), "should be"); - do_trapping_instance_check(); - } - else { - do_full_instance_check(); - } -} - -void SharkTopLevelBlock::do_full_instance_check() -{ bool will_link; ciKlass *klass = iter()->get_klass(will_link); - assert(will_link, "should do"); - + + if (will_link) + do_full_instance_check(klass); + else + do_trapping_instance_check(); +} + +void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) +{ BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *subtype_check = function()->CreateBlock("subtype_check"); BasicBlock *is_instance = function()->CreateBlock("is_instance"); @@ -1208,8 +1202,7 @@ void SharkTopLevelBlock::do_full_instanc // Get the class we're checking against builder()->SetInsertPoint(not_null); - SharkConstantPool constants(this); - Value *check_klass = constants.object_at(iter()->get_klass_index()); + Value *check_klass = builder()->CreateInlineOop(klass); // Get the class of the object being tested Value *object_klass = builder()->CreateValueOfStructEntry( diff -r 99fc93351f7f -r 2493b242458e ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 12:12:00 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 08:17:22 2009 -0400 @@ -386,7 +386,7 @@ class SharkTopLevelBlock : public SharkB // checkcast and instanceof private: - void do_full_instance_check(); + void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(); void do_instance_check(); From gbenson at redhat.com Wed Jun 10 13:45:39 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:39 +0000 Subject: changeset in /hg/icedtea: 2009-06-08 Gary Benson changeset 12b58111793f in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=12b58111793f description: 2009-06-08 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::get_virtual_callee): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Catch invokeinterface edge case. (SharkTopLevelBlock::get_interface_callee): Removed code to handle invokeinterface edge case. (SharkTopLevelBlock::get_virtual_callee): Removed. diffstat: 3 files changed, 26 insertions(+), 104 deletions(-) ChangeLog | 11 + ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 117 +-------------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 diffs (201 lines): diff -r 085521a03c8b -r 12b58111793f ChangeLog --- a/ChangeLog Wed Jun 10 17:17:50 2009 +0100 +++ b/ChangeLog Mon Jun 08 05:59:35 2009 -0400 @@ -1,3 +1,14 @@ 2009-06-06 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::get_virtual_callee): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Catch invokeinterface + edge case. + (SharkTopLevelBlock::get_interface_callee): Removed code to + handle invokeinterface edge case. + (SharkTopLevelBlock::get_virtual_callee): Removed. + 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp diff -r 085521a03c8b -r 12b58111793f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 17:17:50 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Jun 08 05:59:35 2009 -0400 @@ -97,6 +97,16 @@ void SharkTopLevelBlock::scan_for_traps( method = iter()->get_method(will_link); assert(will_link, "typeflow responsibility"); + // Handle 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 legal corner case in the spec, and while javac does not + // generate this code there's no reason a compliant Java + // compiler should not. See cpCacheOop.cpp and + // interpreterRuntime.cpp for more details. + if (method->holder() == function()->env()->Object_klass()) + Unimplemented(); + // Continue to the check index = iter()->get_method_index(); break; @@ -900,107 +910,19 @@ Value *SharkTopLevelBlock::get_virtual_c "callee"); } -// Interpreter-style virtual call lookup -Value* SharkTopLevelBlock::get_virtual_callee(Value *cache, - SharkValue *receiver) -{ - BasicBlock *final = function()->CreateBlock("final"); - BasicBlock *not_final = function()->CreateBlock("not_final"); - BasicBlock *got_callee = function()->CreateBlock("got_callee"); - - Value *flags = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::flags_offset(), - SharkType::intptr_type(), - "flags"); - - const int mask = 1 << ConstantPoolCacheEntry::vfinalMethod; - builder()->CreateCondBr( - builder()->CreateICmpNE( - builder()->CreateAnd(flags, LLVMValue::intptr_constant(mask)), - LLVMValue::intptr_constant(0)), - final, not_final); - - // For final methods f2 is the actual address of the method - builder()->SetInsertPoint(final); - Value *final_callee = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::methodOop_type(), - "final_callee"); - builder()->CreateBr(got_callee); - - // For non-final methods f2 is the index into the vtable - builder()->SetInsertPoint(not_final); - Value *klass = builder()->CreateValueOfStructEntry( - receiver->jobject_value(), - in_ByteSize(oopDesc::klass_offset_in_bytes()), - SharkType::jobject_type(), - "klass"); - - Value *index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - - Value *nonfinal_callee = builder()->CreateLoad( - builder()->CreateArrayAddress( - klass, - SharkType::methodOop_type(), - vtableEntry::size() * wordSize, - in_ByteSize(instanceKlass::vtable_start_offset() * wordSize), - index), - "nonfinal_callee"); - builder()->CreateBr(got_callee); - - builder()->SetInsertPoint(got_callee); - PHINode *callee = builder()->CreatePHI( - SharkType::methodOop_type(), "callee"); - callee->addIncoming(final_callee, final); - callee->addIncoming(nonfinal_callee, not_final); - - return callee; -} - -// Interpreter-style interface call lookup +// Interface calls are handled here Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver) { SharkConstantPool constants(this); Value *cache = constants.cache_entry_at(iter()->get_method_index()); - BasicBlock *hacky = function()->CreateBlock("hacky"); - BasicBlock *normal = function()->CreateBlock("normal"); BasicBlock *loop = function()->CreateBlock("loop"); BasicBlock *got_null = function()->CreateBlock("got_null"); BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *next = function()->CreateBlock("next"); BasicBlock *got_entry = function()->CreateBlock("got_entry"); - BasicBlock *got_callee = function()->CreateBlock("got_callee"); - - Value *flags = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::flags_offset(), - SharkType::intptr_type(), - "flags"); - - const int mask = 1 << ConstantPoolCacheEntry::methodInterface; - builder()->CreateCondBr( - builder()->CreateICmpNE( - builder()->CreateAnd(flags, LLVMValue::intptr_constant(mask)), - LLVMValue::intptr_constant(0)), - hacky, normal); - - // 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. - builder()->SetInsertPoint(hacky); - Value *hacky_callee = get_virtual_callee(cache, receiver); - BasicBlock *got_hacky = builder()->GetInsertBlock(); - builder()->CreateBr(got_callee); // Locate the receiver's itable - builder()->SetInsertPoint(normal); Value *object_klass = builder()->CreateValueOfStructEntry( receiver->jobject_value(), in_ByteSize(oopDesc::klass_offset_in_bytes()), SharkType::jobject_type(), @@ -1038,11 +960,12 @@ Value* SharkTopLevelBlock::get_interface SharkType::jobject_type(), "iklass"); + BasicBlock *loop_entry = builder()->GetInsertBlock(); builder()->CreateBr(loop); builder()->SetInsertPoint(loop); PHINode *itable_entry_addr = builder()->CreatePHI( SharkType::intptr_type(), "itable_entry_addr"); - itable_entry_addr->addIncoming(itable_start, normal); + itable_entry_addr->addIncoming(itable_start, loop_entry); Value *itable_entry = builder()->CreateIntToPtr( itable_entry_addr, SharkType::itableOffsetEntry_type(), "itable_entry"); @@ -1091,7 +1014,7 @@ Value* SharkTopLevelBlock::get_interface SharkType::intptr_type(), "index"); - Value *normal_callee = builder()->CreateLoad( + return builder()->CreateLoad( builder()->CreateIntToPtr( builder()->CreateAdd( builder()->CreateAdd( @@ -1106,17 +1029,7 @@ Value* SharkTopLevelBlock::get_interface LLVMValue::intptr_constant( itableMethodEntry::method_offset_in_bytes())), PointerType::getUnqual(SharkType::methodOop_type())), - "normal_callee"); - BasicBlock *got_normal = builder()->GetInsertBlock(); - builder()->CreateBr(got_callee); - - builder()->SetInsertPoint(got_callee); - PHINode *callee = builder()->CreatePHI( - SharkType::methodOop_type(), "callee"); - callee->addIncoming(hacky_callee, got_hacky); - callee->addIncoming(normal_callee, got_normal); - - return callee; + "callee"); } void SharkTopLevelBlock::do_call() diff -r 085521a03c8b -r 12b58111793f ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 17:17:50 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Jun 08 05:59:35 2009 -0400 @@ -383,8 +383,6 @@ class SharkTopLevelBlock : public SharkB llvm::Value* get_direct_callee(ciMethod* method); llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); - - llvm::Value* get_virtual_callee(llvm::Value* cache, SharkValue* receiver); llvm::Value* get_interface_callee(SharkValue* receiver); void do_call(); From gbenson at redhat.com Wed Jun 10 13:45:38 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:38 +0000 Subject: changeset in /hg/icedtea: 2009-06-06 Gary Benson changeset 8783e4b809e0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8783e4b809e0 description: 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_optimized_instance_check): New method. (SharkTopLevelBlock::do_full_instance_check): Add class argument. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_instance_check): Add compile time type checks. (SharkTopLevelBlock::do_optimized_instance_check): New method. (SharkTopLevelBlock::do_trapping_instance_check): Update the object with the new class if its a checkcast that passes. diffstat: 3 files changed, 65 insertions(+), 9 deletions(-) ChangeLog | 12 +++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 59 ++++++++++++--- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 3 diffs (119 lines): diff -r 2493b242458e -r 8783e4b809e0 ChangeLog --- a/ChangeLog Fri Jun 05 08:17:22 2009 -0400 +++ b/ChangeLog Fri Jun 05 14:46:31 2009 +0100 @@ -1,3 +1,15 @@ 2009-06-05 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_optimized_instance_check): New method. + (SharkTopLevelBlock::do_full_instance_check): Add class argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_instance_check): Add compile time type + checks. + (SharkTopLevelBlock::do_optimized_instance_check): New method. + (SharkTopLevelBlock::do_trapping_instance_check): Update the + object with the new class if its a checkcast that passes. + 2009-06-05 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 2493b242458e -r 8783e4b809e0 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 08:17:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 14:46:31 2009 +0100 @@ -1166,15 +1166,55 @@ void SharkTopLevelBlock::do_call() void SharkTopLevelBlock::do_instance_check() { + // Get the class we're checking against bool will_link; - ciKlass *klass = iter()->get_klass(will_link); - + ciKlass *check_klass = iter()->get_klass(will_link); + + // If the class we're checking against is java.lang.Object + // then this is a no brainer. Apparently this can happen + // in reflective code... + if (check_klass == function()->env()->Object_klass()) { + do_optimized_instance_check(); + return; + } + + // Get the class of the object we're checking + ciKlass *object_klass = xstack(0)->type()->as_klass(); + + // If the classes are defined enough now then we + // don't need a runtime check. NB opto's code for + // this (GraphKit::static_subtype_check) says we + // cannot trust static interface types yet, hence + // the extra check + if (!object_klass->is_interface()) { + if (object_klass == check_klass) { + do_optimized_instance_check(); + return; + } + + if (object_klass->is_loaded() && check_klass->is_loaded()) { + if (object_klass->is_subtype_of(check_klass)) { + do_optimized_instance_check(); + return; + } + } + } + + // Need to check this one at runtime if (will_link) - do_full_instance_check(klass); + do_full_instance_check(check_klass); else - do_trapping_instance_check(); -} - + do_trapping_instance_check(check_klass); +} + +void SharkTopLevelBlock::do_optimized_instance_check() +{ + if (bc() == Bytecodes::_instanceof) { + pop(); + push(SharkValue::jint_constant(1)); + } +} + void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -1275,7 +1315,7 @@ void SharkTopLevelBlock::do_full_instanc } } -void SharkTopLevelBlock::do_trapping_instance_check() +void SharkTopLevelBlock::do_trapping_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *is_null = function()->CreateBlock("null"); @@ -1297,7 +1337,10 @@ void SharkTopLevelBlock::do_trapping_ins // If it's null then we're ok builder()->SetInsertPoint(is_null); set_current_state(saved_state); - if (bc() == Bytecodes::_instanceof) { + if (bc() == Bytecodes::_checkcast) { + push(SharkValue::create_generic(klass, pop()->jobject_value(), false)); + } + else { pop(); push(SharkValue::jint_constant(0)); } diff -r 2493b242458e -r 8783e4b809e0 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 08:17:22 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 14:46:31 2009 +0100 @@ -386,8 +386,9 @@ class SharkTopLevelBlock : public SharkB // checkcast and instanceof private: + void do_optimized_instance_check(); void do_full_instance_check(ciKlass* klass); - void do_trapping_instance_check(); + void do_trapping_instance_check(ciKlass* klass); void do_instance_check(); From ahughes at redhat.com Wed Jun 10 13:45:40 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:40 +0000 Subject: changeset in /hg/icedtea: Forwardport Shark. Message-ID: changeset 19e7ed3a153a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=19e7ed3a153a description: Forwardport Shark. 2009-06-09 Gary Benson * patches/hotspot/default/icedtea-shark.patch (ciInstanceKlass::is_cache_entry_resolved): Removed. (ciInstanceKlass::constant_pool_tag_at): Likewise. diffstat: 2 files changed, 66 insertions(+), 57 deletions(-) ChangeLog | 6 + patches/hotspot/default/icedtea-shark.patch | 117 +++++++++++++-------------- diffs (234 lines): diff -r 600e54c4e646 -r 19e7ed3a153a ChangeLog --- a/ChangeLog Wed Jun 10 17:20:46 2009 +0100 +++ b/ChangeLog Wed Jun 10 18:10:29 2009 +0100 @@ -1,3 +1,9 @@ 2009-06-09 Gary Benson + + * patches/hotspot/default/icedtea-shark.patch + (ciInstanceKlass::is_cache_entry_resolved): Removed. + (ciInstanceKlass::constant_pool_tag_at): Likewise. + 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 600e54c4e646 -r 19e7ed3a153a patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Wed Jun 10 17:20:46 2009 +0100 +++ b/patches/hotspot/default/icedtea-shark.patch Wed Jun 10 18:10:29 2009 +0100 @@ -1,49 +1,23 @@ diff -Nru openjdk.orig/hotspot/src/share diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.cpp openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp ---- openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp 2009-05-19 16:10:18.000000000 +0100 -@@ -548,3 +548,23 @@ +--- openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.cpp 2009-03-30 17:15:27.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.cpp 2009-06-10 18:05:39.000000000 +0100 +@@ -548,3 +548,4 @@ } return impl; } + -+#ifdef SHARK -+// ------------------------------------------------------------------ -+// ciInstanceKlass::constant_pool_tag_at -+// -+// What is in this constant pool slot? -+constantTag ciInstanceKlass::constant_pool_tag_at(int index) { -+ VM_ENTRY_MARK; -+ return get_instanceKlass()->constants()->tag_at(index); -+} -+ -+// ------------------------------------------------------------------ -+// ciInstanceKlass::is_cache_entry_resolved -+// -+// Is this entry in the constant pool cache resolved? -+bool ciInstanceKlass::is_cache_entry_resolved(int index, Bytecodes::Code opcode) { -+ VM_ENTRY_MARK; -+ return get_instanceKlass()->constants()->cache()->entry_at(index)->is_resolved(opcode); -+} -+#endif // SHARK diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.hpp openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp ---- openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.hpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp 2009-05-19 16:11:21.000000000 +0100 -@@ -198,4 +198,12 @@ +--- openjdk.orig/hotspot/src/share/vm/ci/ciInstanceKlass.hpp 2009-03-30 17:15:27.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciInstanceKlass.hpp 2009-06-10 18:05:45.000000000 +0100 +@@ -198,4 +198,5 @@ // What kind of ciObject is this? bool is_instance_klass() { return true; } bool is_java_klass() { return true; } + -+#ifdef SHARK -+ // What is in this constant pool slot? -+ constantTag constant_pool_tag_at(int index); -+ -+ // Is this entry in the constant pool cache resolved? -+ bool is_cache_entry_resolved(int index, Bytecodes::Code opcode); -+#endif // SHARK }; diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciMethod.cpp openjdk/hotspot/src/share/vm/ci/ciMethod.cpp ---- openjdk.orig/hotspot/src/share/vm/ci/ciMethod.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/ci/ciMethod.cpp 2009-05-08 17:40:25.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp 2009-06-10 18:07:13.000000000 +0100 @@ -56,9 +56,9 @@ _liveness = NULL; _bcea = NULL; @@ -68,7 +42,26 @@ diff -Nru openjdk.orig/hotspot/src/share } -@@ -294,34 +294,34 @@ +@@ -228,6 +228,18 @@ + return get_methodOop()->vtable_index(); + } + ++#ifdef SHARK ++// ------------------------------------------------------------------ ++// ciMethod::itable_index ++// ++// Get the position of this method's entry in the itable, if any. ++int ciMethod::itable_index() { ++ check_is_loaded(); ++ assert(holder()->is_linked(), "must be linked"); ++ VM_ENTRY_MARK; ++ return klassItable::compute_itable_index(get_methodOop()); ++} ++#endif // SHARK + + // ------------------------------------------------------------------ + // ciMethod::native_entry +@@ -294,34 +306,34 @@ // ------------------------------------------------------------------ // ciMethod::get_flow_analysis ciTypeFlow* ciMethod::get_flow_analysis() { @@ -110,8 +103,8 @@ diff -Nru openjdk.orig/hotspot/src/share // ------------------------------------------------------------------ diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciMethod.hpp openjdk/hotspot/src/share/vm/ci/ciMethod.hpp ---- openjdk.orig/hotspot/src/share/vm/ci/ciMethod.hpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/ci/ciMethod.hpp 2009-05-08 17:40:25.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp 2009-06-10 18:07:39.000000000 +0100 @@ -69,7 +69,7 @@ // Optional liveness analyzer. @@ -121,9 +114,19 @@ diff -Nru openjdk.orig/hotspot/src/share ciTypeFlow* _flow; #endif +@@ -139,6 +139,9 @@ + + // Runtime information. + int vtable_index(); ++#ifdef SHARK ++ int itable_index(); ++#endif // SHARK + address native_entry(); + address interpreter_entry(); + diff -Nru openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp openjdk/hotspot/src/share/vm/code/nmethod.cpp ---- openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp 2009-03-30 23:08:41.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp 2009-06-10 18:04:13.000000000 +0100 @@ -65,6 +65,11 @@ assert(compiler() != NULL, "must be"); return compiler()->is_c2(); @@ -162,8 +165,8 @@ diff -Nru openjdk.orig/hotspot/src/share tty->print("(nm) "); } diff -Nru openjdk.orig/hotspot/src/share/vm/code/nmethod.hpp openjdk/hotspot/src/share/vm/code/nmethod.hpp ---- openjdk.orig/hotspot/src/share/vm/code/nmethod.hpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/code/nmethod.hpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/code/nmethod.hpp 2009-03-30 23:08:41.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/code/nmethod.hpp 2009-06-10 18:04:13.000000000 +0100 @@ -318,6 +318,7 @@ bool is_compiled_by_c1() const; @@ -173,8 +176,8 @@ diff -Nru openjdk.orig/hotspot/src/share // boundaries for different parts address code_begin () const { return _entry_point; } diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/abstractCompiler.hpp openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp ---- openjdk.orig/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2009-03-30 17:15:27.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp 2009-06-10 18:04:13.000000000 +0100 @@ -45,18 +45,26 @@ // Missing feature tests virtual bool supports_native() { return true; } @@ -204,8 +207,8 @@ diff -Nru openjdk.orig/hotspot/src/share // Customization diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/compileBroker.cpp openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp ---- openjdk.orig/hotspot/src/share/vm/compiler/compileBroker.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/compiler/compileBroker.cpp 2009-03-30 17:15:27.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp 2009-06-10 18:04:13.000000000 +0100 @@ -554,6 +554,14 @@ #endif #endif // COMPILER2 @@ -222,8 +225,8 @@ diff -Nru openjdk.orig/hotspot/src/share _task_free_list = NULL; diff -Nru openjdk.orig/hotspot/src/share/vm/memory/cardTableModRefBS.hpp openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp ---- openjdk.orig/hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2009-03-30 23:08:41.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2009-06-10 18:04:13.000000000 +0100 @@ -44,6 +44,7 @@ friend class VMStructs; friend class CardTableRS; @@ -233,8 +236,8 @@ diff -Nru openjdk.orig/hotspot/src/share // For debugging. friend class GuaranteeNotModClosure; diff -Nru openjdk.orig/hotspot/src/share/vm/oops/methodOop.cpp openjdk/hotspot/src/share/vm/oops/methodOop.cpp ---- openjdk.orig/hotspot/src/share/vm/oops/methodOop.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/oops/methodOop.cpp 2009-05-08 17:40:29.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp 2009-06-10 18:04:13.000000000 +0100 @@ -738,10 +738,14 @@ } @@ -251,8 +254,8 @@ diff -Nru openjdk.orig/hotspot/src/share } diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp 2009-03-30 17:15:28.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp 2009-06-10 18:04:13.000000000 +0100 @@ -229,6 +229,7 @@ } @@ -328,8 +331,8 @@ diff -Nru openjdk.orig/hotspot/src/share -#endif // COMPILER2 +#endif // COMPILER2 || SHARK diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.cpp openjdk/hotspot/src/share/vm/runtime/globals.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/globals.cpp 2009-05-14 18:57:58.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/globals.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/runtime/globals.cpp 2009-03-30 17:15:28.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/globals.cpp 2009-06-10 18:04:13.000000000 +0100 @@ -176,6 +176,18 @@ #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT }, #endif @@ -360,8 +363,8 @@ diff -Nru openjdk.orig/hotspot/src/share }; diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp 2009-05-19 01:11:05.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp 2009-06-10 17:54:59.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2009-06-10 18:04:13.000000000 +0100 @@ -22,7 +22,7 @@ * */ @@ -372,8 +375,8 @@ diff -Nru openjdk.orig/hotspot/src/share define_pd_global(bool, UseTLAB, false); define_pd_global(bool, CICompileOSR, false); diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2009-05-19 01:11:05.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2009-05-19 16:07:37.000000000 +0100 +--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2009-06-10 17:54:59.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2009-06-10 18:04:13.000000000 +0100 @@ -94,6 +94,9 @@ #ifdef TIERED #define VMTYPE "Server" From ahughes at redhat.com Wed Jun 10 13:45:39 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:39 +0000 Subject: changeset in /hg/icedtea: Forwardport Shark. Message-ID: changeset 600e54c4e646 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=600e54c4e646 description: Forwardport Shark. 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Removed unused code. * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Removed. * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 5 files changed, 10 insertions(+), 233 deletions(-) ChangeLog | 10 + ports/hotspot/src/share/vm/includeDB_shark | 19 -- ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp | 125 --------------- ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp | 75 --------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 14 - diffs (292 lines): diff -r e5e58bda8299 -r 600e54c4e646 ChangeLog --- a/ChangeLog Tue Jun 09 06:22:07 2009 -0400 +++ b/ChangeLog Wed Jun 10 17:20:46 2009 +0100 @@ -1,3 +1,13 @@ 2009-06-09 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Removed unused code. + + * ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Removed. + * ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r e5e58bda8299 -r 600e54c4e646 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Tue Jun 09 06:22:07 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 10 17:20:46 2009 +0100 @@ -170,24 +170,6 @@ sharkConstant.hpp sharkConstant.hpp sharkBuilder.hpp sharkConstant.hpp sharkValue.hpp -sharkConstantPool.cpp allocation.hpp -sharkConstantPool.cpp constantPoolOop.hpp -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.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 @@ -316,7 +298,6 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp sharkTopLevelBlock.cpp sharkConstant.hpp -sharkTopLevelBlock.cpp sharkConstantPool.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp sharkTopLevelBlock.cpp sharkState.inline.hpp diff -r e5e58bda8299 -r 600e54c4e646 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp Tue Jun 09 06:22:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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/_sharkConstantPool.cpp.incl" - -using namespace llvm; - -Value *SharkConstantPool::constants() -{ - Value *m = method(); - if (m != _constants_method) { - _constants = builder()->CreateValueOfStructEntry( - m, methodOopDesc::constants_offset(), - SharkType::oop_type(), "constants"); - _constants_method = m; - } - return _constants; -} - -Value *SharkConstantPool::tags() -{ - Value *cp = constants(); - if (cp != _tags_constants) { - _tags = builder()->CreateValueOfStructEntry( - cp, in_ByteSize(constantPoolOopDesc::tags_offset_in_bytes()), - SharkType::oop_type(), "tags"); - _tags_constants = cp; - } - return _tags; -} - -Value *SharkConstantPool::cache() -{ - Value *cp = constants(); - if (cp != _cache_constants) { - _cache = builder()->CreateValueOfStructEntry( - cp, in_ByteSize(constantPoolOopDesc::cache_offset_in_bytes()), - SharkType::oop_type(), "cache"); - _cache_constants = cp; - } - return _cache; -} - -Value *SharkConstantPool::object_at(int which) -{ - return builder()->CreateLoad( - builder()->CreateArrayAddress( - constants(), - T_OBJECT, in_ByteSize(sizeof(constantPoolOopDesc)), - LLVMValue::jint_constant(which))); -} - -Value *SharkConstantPool::tag_at(int which) -{ - return builder()->CreateLoad( - builder()->CreateArrayAddress( - tags(), T_BYTE, LLVMValue::jint_constant(which))); -} - -Value *SharkConstantPool::cache_entry_at(int which) -{ - // Takes a constant pool cache index in byte-swapped byte order - // (which comes from the bytecodes after rewriting). This is a - // 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"); - - return builder()->CreateIntToPtr( - builder()->CreateAdd( - builder()->CreatePtrToInt( - cache(), SharkType::intptr_type()), - LLVMValue::intptr_constant( - in_bytes(constantPoolCacheOopDesc::base_offset()) + - which * sizeof(ConstantPoolCacheEntry))), - SharkType::cpCacheEntry_type()); -} - -Value *SharkConstantPool::java_mirror() -{ - Value *cp = constants(); - - Value *pool_holder = builder()->CreateValueOfStructEntry( - cp, - in_ByteSize(constantPoolOopDesc::pool_holder_offset_in_bytes()), - SharkType::oop_type(), - "pool_holder"); - - Value *klass_part = builder()->CreateAddressOfStructEntry( - pool_holder, - in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()), - SharkType::klass_type(), - "klass_part"); - - // XXX should there be a memory barrier before this load? - return builder()->CreateValueOfStructEntry( - klass_part, - in_ByteSize(Klass::java_mirror_offset_in_bytes()), - SharkType::oop_type(), - "java_mirror"); -} diff -r e5e58bda8299 -r 600e54c4e646 ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp --- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp Tue Jun 09 06:22:07 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +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. - * - */ - -class SharkConstantPool : public StackObj { - public: - SharkConstantPool(SharkTopLevelBlock* block) - : _block(block), - _constants_method(NULL), - _tags_constants(NULL), - _cache_constants(NULL) {} - - private: - SharkTopLevelBlock* _block; - - private: - SharkTopLevelBlock* block() const - { - return _block; - } - SharkBuilder* builder() const - { - return block()->builder(); - } - ciMethod* target() const - { - return block()->target(); - } - llvm::Value* method() const - { - return block()->method(); - } - - private: - llvm::Value* _constants; // The constant pool, a constantPoolOop - llvm::Value* _constants_method; // The method _constants was loaded from - - llvm::Value* _tags; // The tags array, a typeArrayOop - llvm::Value* _tags_constants; // The constantPoolOop _tags is in - - llvm::Value* _cache; // The cache, a constantPoolCacheOop - llvm::Value* _cache_constants; // The constantPoolCacheOop _cache is in - - private: - llvm::Value* constants(); - llvm::Value* tags(); - llvm::Value* cache(); - - public: - llvm::Value* object_at(int which); - llvm::Value* tag_at(int which); - llvm::Value* cache_entry_at(int which); - llvm::Value* java_mirror(); -}; diff -r e5e58bda8299 -r 600e54c4e646 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 06:22:07 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 17:20:46 2009 +0100 @@ -44,8 +44,6 @@ void SharkTopLevelBlock::scan_for_traps( bool will_link; bool is_field; - int index = -1; - switch (bc()) { case Bytecodes::_ldc: case Bytecodes::_ldc_w: @@ -140,18 +138,6 @@ void SharkTopLevelBlock::scan_for_traps( return; } 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())) { - set_trap( - Deoptimization::make_trap_request( - Deoptimization::Reason_uninitialized, - Deoptimization::Action_reinterpret), bci()); - return; - } } } From gbenson at redhat.com Wed Jun 10 13:45:39 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 10 Jun 2009 20:45:39 +0000 Subject: changeset in /hg/icedtea: 2009-06-09 Gary Benson changeset e5e58bda8299 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=e5e58bda8299 description: 2009-06-09 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::get_interface_callee): New argument. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::scan_for_traps): Update traps for invokeinterface. (SharkTopLevelBlock::get_callee): Pass method to get_interface_callee. (SharkTopLevelBlock::get_interface_callee): Removed constant pool lookup. * patches/hotspot/default/icedtea-shark.patch (ciMethod::itable_index): New method. diffstat: 3 files changed, 31 insertions(+), 23 deletions(-) ChangeLog | 15 ++++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 37 ++++++--------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 2 diffs (116 lines): diff -r 12b58111793f -r e5e58bda8299 ChangeLog --- a/ChangeLog Mon Jun 08 05:59:35 2009 -0400 +++ b/ChangeLog Tue Jun 09 06:22:07 2009 -0400 @@ -1,3 +1,18 @@ 2009-06-08 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::get_interface_callee): New argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::scan_for_traps): Update traps for + invokeinterface. + (SharkTopLevelBlock::get_callee): Pass method to + get_interface_callee. + (SharkTopLevelBlock::get_interface_callee): Removed constant + pool lookup. + + * patches/hotspot/default/icedtea-shark.patch + (ciMethod::itable_index): New method. + 2009-06-08 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 12b58111793f -r e5e58bda8299 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Mon Jun 08 05:59:35 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue Jun 09 06:22:07 2009 -0400 @@ -107,8 +107,14 @@ void SharkTopLevelBlock::scan_for_traps( if (method->holder() == function()->env()->Object_klass()) Unimplemented(); - // Continue to the check - index = iter()->get_method_index(); + // Bail out if the holder is unloaded + if (!method->holder()->is_linked()) { + set_trap( + Deoptimization::make_trap_request( + Deoptimization::Reason_uninitialized, + Deoptimization::Action_reinterpret), bci()); + return; + } break; case Bytecodes::_new: @@ -873,7 +879,7 @@ Value *SharkTopLevelBlock::get_callee(Ca case CALL_VIRTUAL: return get_virtual_callee(receiver, method); case CALL_INTERFACE: - return get_interface_callee(receiver); + return get_interface_callee(receiver, method); default: ShouldNotReachHere(); } @@ -911,11 +917,9 @@ Value *SharkTopLevelBlock::get_virtual_c } // Interface calls are handled here -Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver) -{ - SharkConstantPool constants(this); - Value *cache = constants.cache_entry_at(iter()->get_method_index()); - +Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver, + ciMethod* method) +{ BasicBlock *loop = function()->CreateBlock("loop"); BasicBlock *got_null = function()->CreateBlock("got_null"); BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -955,11 +959,7 @@ Value* SharkTopLevelBlock::get_interface itable_start, BytesPerLong, itable_start_name); // Locate this interface's entry in the table - Value *iklass = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f1_offset(), - SharkType::jobject_type(), - "iklass"); - + Value *iklass = builder()->CreateInlineOop(method->holder()); BasicBlock *loop_entry = builder()->GetInsertBlock(); builder()->CreateBr(loop); builder()->SetInsertPoint(loop); @@ -1009,11 +1009,6 @@ Value* SharkTopLevelBlock::get_interface offset = builder()->CreateIntCast(offset, SharkType::intptr_type(), false); - Value *index = builder()->CreateValueOfStructEntry( - cache, ConstantPoolCacheEntry::f2_offset(), - SharkType::intptr_type(), - "index"); - return builder()->CreateLoad( builder()->CreateIntToPtr( builder()->CreateAdd( @@ -1022,10 +1017,8 @@ Value* SharkTopLevelBlock::get_interface builder()->CreatePtrToInt( object_klass, SharkType::intptr_type()), offset), - builder()->CreateShl( - index, - LLVMValue::intptr_constant( - exact_log2(itableMethodEntry::size() * wordSize)))), + LLVMValue::intptr_constant( + method->itable_index() * itableMethodEntry::size() * wordSize)), LLVMValue::intptr_constant( itableMethodEntry::method_offset_in_bytes())), PointerType::getUnqual(SharkType::methodOop_type())), diff -r 12b58111793f -r e5e58bda8299 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Mon Jun 08 05:59:35 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Tue Jun 09 06:22:07 2009 -0400 @@ -383,7 +383,7 @@ class SharkTopLevelBlock : public SharkB llvm::Value* get_direct_callee(ciMethod* method); llvm::Value* get_virtual_callee(SharkValue* receiver, ciMethod* method); - llvm::Value* get_interface_callee(SharkValue* receiver); + llvm::Value* get_interface_callee(SharkValue* receiver, ciMethod* method); void do_call(); From ahughes at redhat.com Wed Jun 10 13:45:38 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:38 +0000 Subject: changeset in /hg/icedtea: Forwardport Shark. Message-ID: changeset 085521a03c8b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=085521a03c8b description: Forwardport Shark. 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::maybe_do_instanceof_if): New method. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::maybe_do_instanceof_if): New method. (SharkBlock::parse_bytecode): Use the above for instanceof immediately followed by ifeq or ifne. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::do_if_helper): New method. (SharkTopLevelBlock::static_subtype_check): Likewise. (SharkTopLevelBlock::maybe_do_instanceof_if): Likewise. (SharkTopLevelBlock::do_optimized_instance_check): Removed. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::do_if_helper): New method. (SharkTopLevelBlock::do_if): Use the above. (SharkTopLevelBlock::static_subtype_check): New method. (SharkTopLevelBlock::do_instance_check): Use the above. (SharkTopLevelBlock::maybe_do_instanceof_if): New method. (SharkTopLevelBlock::do_optimized_instance_check): Removed. (SharkTopLevelBlock::do_full_instance_check): Removed now-unnecessary state copy and merge. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState::replace_all): New method. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::replace_all): Likewise. diffstat: 7 files changed, 204 insertions(+), 42 deletions(-) ChangeLog | 29 ++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 37 +++ ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 1 ports/hotspot/src/share/vm/shark/sharkState.cpp | 15 + ports/hotspot/src/share/vm/shark/sharkState.hpp | 4 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 152 +++++++++++---- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 8 diffs (383 lines): diff -r 8783e4b809e0 -r 085521a03c8b ChangeLog --- a/ChangeLog Fri Jun 05 14:46:31 2009 +0100 +++ b/ChangeLog Wed Jun 10 17:17:50 2009 +0100 @@ -1,3 +1,32 @@ 2009-06-06 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::maybe_do_instanceof_if): New method. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_do_instanceof_if): New method. + (SharkBlock::parse_bytecode): Use the above for + instanceof immediately followed by ifeq or ifne. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_if_helper): New method. + (SharkTopLevelBlock::static_subtype_check): Likewise. + (SharkTopLevelBlock::maybe_do_instanceof_if): Likewise. + (SharkTopLevelBlock::do_optimized_instance_check): Removed. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_if_helper): New method. + (SharkTopLevelBlock::do_if): Use the above. + (SharkTopLevelBlock::static_subtype_check): New method. + (SharkTopLevelBlock::do_instance_check): Use the above. + (SharkTopLevelBlock::maybe_do_instanceof_if): New method. + (SharkTopLevelBlock::do_optimized_instance_check): Removed. + (SharkTopLevelBlock::do_full_instance_check): Removed + now-unnecessary state copy and merge. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::replace_all): New method. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::replace_all): Likewise. + 2009-06-06 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 8783e4b809e0 -r 085521a03c8b ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jun 05 14:46:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Jun 10 17:17:50 2009 +0100 @@ -825,8 +825,38 @@ void SharkBlock::parse_bytecode(int star do_call(); break; + case Bytecodes::_instanceof: + // This is a very common construct: + // + // if (object instanceof Klass) { + // something = (Klass) object; + // ... + // } + // + // which gets compiled to something like this: + // + // 28: aload 9 + // 30: instanceof + // 33: ifeq 52 + // 36: aload 9 + // 38: checkcast + // + // Handling both bytecodes at once allows us + // to eliminate the checkcast. + if (iter()->next_bci() < limit && + (iter()->next_bc() == Bytecodes::_ifeq || + iter()->next_bc() == Bytecodes::_ifne) && + (!UseLoopSafepoints || + iter()->next_get_dest() > iter()->next_bci())) { + if (maybe_do_instanceof_if()) { + iter()->next(); + if (SharkTraceBytecodes) + tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc())); + break; + } + } + // fall through case Bytecodes::_checkcast: - case Bytecodes::_instanceof: do_instance_check(); break; @@ -1225,6 +1255,11 @@ void SharkBlock::do_instance_check() ShouldNotCallThis(); } +bool SharkBlock::maybe_do_instanceof_if() +{ + ShouldNotCallThis(); +} + void SharkBlock::do_new() { ShouldNotCallThis(); diff -r 8783e4b809e0 -r 085521a03c8b ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Jun 05 14:46:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Jun 10 17:17:50 2009 +0100 @@ -326,6 +326,7 @@ class SharkBlock : public ResourceObj { // checkcast and instanceof protected: virtual void do_instance_check(); + virtual bool maybe_do_instanceof_if(); // new and *newarray protected: diff -r 8783e4b809e0 -r 085521a03c8b ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Jun 05 14:46:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Wed Jun 10 17:17:50 2009 +0100 @@ -223,6 +223,21 @@ void SharkState::merge(SharkState* other // Safepointed status set_has_safepointed(this->has_safepointed() && other->has_safepointed()); +} + +void SharkState::replace_all(SharkValue* old_value, SharkValue* new_value) +{ + // Local variables + for (int i = 0; i < max_locals(); i++) { + if (local(i) == old_value) + set_local(i, new_value); + } + + // Expression stack + for (int i = 0; i < stack_depth(); i++) { + if (stack(i) == old_value) + set_stack(i, new_value); + } } void SharkState::decache_for_Java_call(ciMethod* callee) diff -r 8783e4b809e0 -r 085521a03c8b ports/hotspot/src/share/vm/shark/sharkState.hpp --- a/ports/hotspot/src/share/vm/shark/sharkState.hpp Fri Jun 05 14:46:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.hpp Wed Jun 10 17:17:50 2009 +0100 @@ -187,6 +187,10 @@ class SharkState : public ResourceObj { llvm::BasicBlock* other_block, llvm::BasicBlock* this_block); + // Value replacement + public: + void replace_all(SharkValue* old_value, SharkValue* new_value); + // Cache and decache public: void decache_for_Java_call(ciMethod* callee); diff -r 8783e4b809e0 -r 085521a03c8b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 14:46:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed Jun 10 17:17:50 2009 +0100 @@ -772,8 +772,11 @@ void SharkTopLevelBlock::do_ret() } // All propagation of state from one block to the next (via -// dest->add_incoming) is handled by the next three methods -// (do_branch, do_if and do_switch) and by handle_exception. +// dest->add_incoming) is handled by these methods: +// do_branch +// do_if_helper +// do_switch +// handle_exception void SharkTopLevelBlock::do_branch(int successor_index) { @@ -795,16 +798,24 @@ void SharkTopLevelBlock::do_if(ICmpInst: llvm_a = a->jint_value(); llvm_b = b->jint_value(); } - + do_if_helper(p, llvm_b, llvm_a, current_state(), current_state()); +} + +void SharkTopLevelBlock::do_if_helper(ICmpInst::Predicate p, + Value* b, + Value* a, + SharkState* if_taken_state, + SharkState* not_taken_state) +{ SharkTopLevelBlock *if_taken = successor(ciTypeFlow::IF_TAKEN); SharkTopLevelBlock *not_taken = successor(ciTypeFlow::IF_NOT_TAKEN); builder()->CreateCondBr( - builder()->CreateICmp(p, llvm_a, llvm_b), + builder()->CreateICmp(p, a, b), if_taken->entry_block(), not_taken->entry_block()); - if_taken->add_incoming(current_state()); - not_taken->add_incoming(current_state()); + if_taken->add_incoming(if_taken_state); + not_taken->add_incoming(not_taken_state); } void SharkTopLevelBlock::do_switch() @@ -1164,40 +1175,48 @@ void SharkTopLevelBlock::do_call() current_state()->set_has_safepointed(true); } +bool SharkTopLevelBlock::static_subtype_check(ciKlass* check_klass, + ciKlass* object_klass) +{ + // If the class we're checking against is java.lang.Object + // then this is a no brainer. Apparently this can happen + // in reflective code... + if (check_klass == function()->env()->Object_klass()) + return true; + + // Perform a subtype check. NB in opto's code for this + // (GraphKit::static_subtype_check) it says that static + // interface types cannot be trusted, and if opto can't + // trust them then I assume we can't either. + if (!object_klass->is_interface()) { + if (object_klass == check_klass) + return true; + + if (object_klass->is_loaded() && check_klass->is_loaded()) { + if (object_klass->is_subtype_of(check_klass)) + return true; + } + } + + return false; +} + void SharkTopLevelBlock::do_instance_check() { // Get the class we're checking against bool will_link; ciKlass *check_klass = iter()->get_klass(will_link); - // If the class we're checking against is java.lang.Object - // then this is a no brainer. Apparently this can happen - // in reflective code... - if (check_klass == function()->env()->Object_klass()) { - do_optimized_instance_check(); - return; - } - // Get the class of the object we're checking ciKlass *object_klass = xstack(0)->type()->as_klass(); - // If the classes are defined enough now then we - // don't need a runtime check. NB opto's code for - // this (GraphKit::static_subtype_check) says we - // cannot trust static interface types yet, hence - // the extra check - if (!object_klass->is_interface()) { - if (object_klass == check_klass) { - do_optimized_instance_check(); - return; + // Can we optimize this check away? + if (static_subtype_check(check_klass, object_klass)) { + if (bc() == Bytecodes::_instanceof) { + pop(); + push(SharkValue::jint_constant(1)); } - - if (object_klass->is_loaded() && check_klass->is_loaded()) { - if (object_klass->is_subtype_of(check_klass)) { - do_optimized_instance_check(); - return; - } - } + return; } // Need to check this one at runtime @@ -1207,14 +1226,69 @@ void SharkTopLevelBlock::do_instance_che do_trapping_instance_check(check_klass); } -void SharkTopLevelBlock::do_optimized_instance_check() -{ - if (bc() == Bytecodes::_instanceof) { - pop(); - push(SharkValue::jint_constant(1)); - } -} - +bool SharkTopLevelBlock::maybe_do_instanceof_if() +{ + // Get the class we're checking against + bool will_link; + ciKlass *check_klass = iter()->get_klass(will_link); + + // If the class is unloaded then the instanceof + // cannot possibly succeed. + if (!will_link) + return false; + + // Keep a copy of the object we're checking + SharkValue *old_object = xstack(0); + + // Get the class of the object we're checking + ciKlass *object_klass = old_object->type()->as_klass(); + + // If the instanceof can be optimized away at compile time + // then any subsequent checkcasts will be too so we handle + // it normally. + if (static_subtype_check(check_klass, object_klass)) + return false; + + // Perform the instance check + do_full_instance_check(check_klass); + Value *result = pop()->jint_value(); + + // Create the casted object + SharkValue *new_object = SharkValue::create_generic( + check_klass, old_object->jobject_value(), old_object->zero_checked()); + + // Create two copies of the current state, one with the + // original object and one with all instances of the + // original object replaced with the new, casted object. + SharkState *new_state = current_state(); + SharkState *old_state = new_state->copy(); + new_state->replace_all(old_object, new_object); + + // Perform the check-and-branch + switch (iter()->next_bc()) { + case Bytecodes::_ifeq: + // branch if not an instance + do_if_helper( + ICmpInst::ICMP_EQ, + LLVMValue::jint_constant(0), result, + old_state, new_state); + break; + + case Bytecodes::_ifne: + // branch if an instance + do_if_helper( + ICmpInst::ICMP_NE, + LLVMValue::jint_constant(0), result, + new_state, old_state); + break; + + default: + ShouldNotReachHere(); + } + + return true; +} + void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { BasicBlock *not_null = function()->CreateBlock("not_null"); @@ -1238,7 +1312,6 @@ void SharkTopLevelBlock::do_full_instanc builder()->CreateICmpEQ(object, LLVMValue::null()), merge2, not_null); BasicBlock *null_block = builder()->GetInsertBlock(); - SharkState *null_state = current_state()->copy(); // Get the class we're checking against builder()->SetInsertPoint(not_null); @@ -1282,7 +1355,6 @@ void SharkTopLevelBlock::do_full_instanc // Second merge builder()->SetInsertPoint(merge2); - current_state()->merge(null_state, null_block, nonnull_block); PHINode *result = builder()->CreatePHI( SharkType::jint_type(), "result"); result->addIncoming(LLVMValue::jint_constant(IC_IS_NULL), null_block); diff -r 8783e4b809e0 -r 085521a03c8b ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 14:46:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Wed Jun 10 17:17:50 2009 +0100 @@ -358,6 +358,11 @@ class SharkTopLevelBlock : public SharkB // if* private: + void do_if_helper(llvm::ICmpInst::Predicate p, + llvm::Value* b, + llvm::Value* a, + SharkState* if_taken_state, + SharkState* not_taken_state); void do_if(llvm::ICmpInst::Predicate p, SharkValue* b, SharkValue* a); // tableswitch and lookupswitch @@ -386,11 +391,12 @@ class SharkTopLevelBlock : public SharkB // checkcast and instanceof private: - void do_optimized_instance_check(); + bool static_subtype_check(ciKlass* check_klass, ciKlass* object_klass); void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(ciKlass* klass); void do_instance_check(); + bool maybe_do_instanceof_if(); // new and *newarray private: From ahughes at redhat.com Wed Jun 10 13:45:40 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 10 Jun 2009 20:45:40 +0000 Subject: changeset in /hg/icedtea: Fix Shark build. Message-ID: changeset 05f411adf2f1 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=05f411adf2f1 description: Fix Shark build. 2009-06-10 Andrew John Hughes * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Replace PTR_FORMAT with %p as pointer is of type unsigned char*. diffstat: 2 files changed, 8 insertions(+), 2 deletions(-) ChangeLog | 6 ++++++ ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 4 ++-- diffs (34 lines): diff -r 29be67755005 -r 05f411adf2f1 ChangeLog --- a/ChangeLog Wed Jun 10 13:22:21 2009 +0100 +++ b/ChangeLog Wed Jun 10 20:49:02 2009 +0100 @@ -1,3 +1,9 @@ 2009-06-10 Gary Benson + + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: + Replace PTR_FORMAT with %p as pointer is of type + unsigned char*. + 2009-06-10 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp diff -r 29be67755005 -r 05f411adf2f1 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Jun 10 13:22:21 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Jun 10 20:49:02 2009 +0100 @@ -117,7 +117,7 @@ class ZeroStackPrinter { field = "istate->_method"; } else if (is_valid && !strcmp(field, "_bcp") && istate->bcp()) { - snprintf(_buf, _buflen, PTR_FORMAT " (bci %d)", istate->bcp(), + snprintf(_buf, _buflen, "%p (bci %d)", istate->bcp(), istate->method()->bci_from(istate->bcp())); value = _buf; field = "istate->_bcp"; @@ -209,7 +209,7 @@ class ZeroStackPrinter { address pc = sf->pc(); if (code->pc_desc_at(pc)) { SimpleScopeDesc ssd(code, pc); - snprintf(_buf, _buflen, PTR_FORMAT " (bci %d)", pc, ssd.bci()); + snprintf(_buf, _buflen, "%p (bci %d)", pc, ssd.bci()); value = _buf; } } From gnu_andrew at member.fsf.org Wed Jun 10 16:48:09 2009 From: gnu_andrew at member.fsf.org (gnu_andrew at member.fsf.org) Date: Thu, 11 Jun 2009 00:48:09 +0100 Subject: [PATCH 1 of 1] Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk In-Reply-To: References: Message-ID: <0c6e0b7c31838efcdd5a.1244677689@rivendell.middle-earth.co.uk> # HG changeset patch # User Andrew John Hughes # Date 1244676679 -3600 # Node ID 0c6e0b7c31838efcdd5a9cce619958e87dff8512 # Parent 0b4d2e77cf9744daae05bf05b49899b21d90203e Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk. 2009-06-10 Andrew John Hughes * Makefile.am: Remove duplicate WITH_ICEDTEA blocks. * acinclude.m4: (AC_CHECK_FOR_OPENJDK): Updated so that no turns off the option rather than dropping out. (AC_CHECK_FOR_ICEDTEA): Removed. * configure.ac: Remove --with-icedtea and --with-openjdk blocks and duplicate --with-icedtea logic. diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 Makefile.am --- a/Makefile.am Wed Jun 10 12:00:53 2009 -0400 +++ b/Makefile.am Thu Jun 11 00:31:19 2009 +0100 @@ -986,14 +986,9 @@ BOOTSTRAP_DIRECTORY_STAMP = ICEDTEA_HOME = $(SYSTEM_OPENJDK_DIR) else -if WITH_ICEDTEA - BOOTSTRAP_DIRECTORY_STAMP = - ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR) -else BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea endif -endif # bootstrap/jdk1.6.0 to bootstrap/icedtea symlink. stamps/bootstrap-directory-symlink.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) @@ -1080,15 +1075,11 @@ # OpenJDK Targets # =============== -if WITH_ICEDTEA +if WITH_OPENJDK MEMORY_LIMIT = -J-Xmx1024m else -if WITH_OPENJDK - MEMORY_LIMIT = -J-Xmx512m -else MEMORY_LIMIT = endif -endif if WITH_CACAO ICEDTEA_BUILD_TARGET=j2se_only diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 acinclude.m4 --- a/acinclude.m4 Wed Jun 10 12:00:53 2009 -0400 +++ b/acinclude.m4 Thu Jun 11 00:31:19 2009 +0100 @@ -998,18 +998,20 @@ AC_SUBST(SYSTEM_GCJ_DIR) ]) +dnl This option allows the initial build to be skipped, and a single build +dnl to be completed using an existing OpenJDK installation. It can be used +dnl in three ways: +dnl * --with-openjdk: look for OpenJDK in one of a series of predefined dirs +dnl * --without-openjdk (default): do a full bootstrap, no OpenJDK required +dnl * --with-openjdk=${path}: use the OpenJDK installed in the specified location AC_DEFUN([AC_CHECK_FOR_OPENJDK], [ AC_MSG_CHECKING([for an existing OpenJDK installation]) - AC_ARG_WITH([openjdk-home], - [AS_HELP_STRING([--with-openjdk-home], - [OpenJDK home directory \ - (default is /usr/lib/jvm/java-openjdk)])], + AC_ARG_WITH([openjdk], + [AS_HELP_STRING([--with-openjdk], + [perform a quick build with an installed copy of OpenJDK])], [ - if test "x${withval}" = xyes - then - SYSTEM_OPENJDK_DIR= - elif test "x${withval}" = xno + if test "x${withval}" = xno then SYSTEM_OPENJDK_DIR= else @@ -1019,55 +1021,22 @@ [ SYSTEM_OPENJDK_DIR= ]) - if test -z "${SYSTEM_OPENJDK_DIR}"; then - for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk ; do + if test "x${SYSTEM_OPENJDK_DIR}" = xyes; then + for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk \ + /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ + /usr/lib/jvm/java-icedtea ; do if test -d $dir; then SYSTEM_OPENJDK_DIR=$dir break fi done + elif ! test -z "${SYSTEM_OPENJDK_DIR}"; then + if ! test -d "${SYSTEM_OPENJDK_DIR}"; then + AC_MSG_ERROR("An OpenJDK home directory could not be found.") + fi fi + AM_CONDITIONAL(WITH_OPENJDK, test "x${SYSTEM_OPENJDK_DIR}" != x) AC_MSG_RESULT(${SYSTEM_OPENJDK_DIR}) - if ! test -d "${SYSTEM_OPENJDK_DIR}"; then - AC_MSG_ERROR("An OpenJDK home directory could not be found.") - fi AC_SUBST(SYSTEM_OPENJDK_DIR) ]) -AC_DEFUN([AC_CHECK_FOR_ICEDTEA], -[ - AC_MSG_CHECKING(for an existing IcedTea installation) - AC_ARG_WITH([icedtea-home], - [AS_HELP_STRING([--with-icedtea-home], - [IcedTea home directory \ - (default is /usr/lib/jvm/java-icedtea)])], - [ - if test "x${withval}" = xyes - then - SYSTEM_ICEDTEA_DIR= - elif test "x${withval}" = xno - then - SYSTEM_ICEDTEA_DIR= - else - SYSTEM_ICEDTEA_DIR=${withval} - fi - ], - [ - SYSTEM_ICEDTEA_DIR= - ]) - if test -z "${SYSTEM_ICEDTEA_DIR}"; then - for dir in /usr/lib/jvm/java-icedtea /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk ; do - if test -d $dir; then - SYSTEM_ICEDTEA_DIR=$dir - break - fi - done - fi - AC_MSG_RESULT(${SYSTEM_ICEDTEA_DIR}) - if ! test -d "${SYSTEM_ICEDTEA_DIR}"; then - AC_MSG_ERROR("An IcedTea home directory could not be found.") - fi - AC_SUBST(SYSTEM_ICEDTEA_DIR) -]) - - diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 configure.ac --- a/configure.ac Wed Jun 10 12:00:53 2009 -0400 +++ b/configure.ac Thu Jun 11 00:31:19 2009 +0100 @@ -46,24 +46,7 @@ AC_CHECK_WITH_HOTSPOT_BUILD AC_PATH_TOOL([LINUX32],[linux32]) AC_CHECK_GCC_VERSION - -AC_MSG_CHECKING([whether to build using an existing installation of IcedTea]) -AC_ARG_WITH([icedtea], - [AS_HELP_STRING([--with-icedtea], - [build IcedTea with system-installed IcedTea])], - [ - if test "x${withval}" != xno - then - with_icedtea=true - else - with_icedtea=false - fi - ], - [ - with_icedtea=false - ]) -AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" = true) -AC_MSG_RESULT(${with_icedtea}) +AC_CHECK_FOR_OPENJDK AC_MSG_CHECKING([for a NetBeans installation]) AC_ARG_WITH([netbeans-home], @@ -83,24 +66,6 @@ AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) AC_SUBST(SYSTEM_NETBEANS_DIR) -AC_MSG_CHECKING([whether to build using an existing installation of OpenJDK]) -AC_ARG_WITH([openjdk], - [AS_HELP_STRING([--with-openjdk], - [build IcedTea with system-installed OpenJDK])], - [ - if test "x${withval}" != xno - then - with_openjdk=true - else - with_openjdk=false - fi - ], - [ - with_openjdk=false - ]) -AM_CONDITIONAL(WITH_OPENJDK, test "${with_openjdk}" = true) -AC_MSG_RESULT(${with_openjdk}) - AC_MSG_CHECKING(for Ant home directory) AC_ARG_WITH([ant-home], [AS_HELP_STRING([--with-ant-home], @@ -238,7 +203,6 @@ if test "${with_openjdk}" = true then - AC_CHECK_FOR_OPENJDK JAVA=$SYSTEM_OPENJDK_DIR/bin/java AC_SUBST(JAVA) JAVAC=${SYSTEM_OPENJDK_DIR}/bin/javac @@ -250,20 +214,6 @@ RMIC=${SYSTEM_OPENJDK_DIR}/bin/rmic AC_SUBST(RMIC) else -if test "${with_icedtea}" = true -then - AC_CHECK_FOR_ICEDTEA - JAVA=$SYSTEM_ICEDTEA_DIR/bin/java - AC_SUBST(JAVA) - JAVAC=${SYSTEM_ICEDTEA_DIR}/bin/javac - AC_SUBST(JAVAC) - JAVAH=${SYSTEM_ICEDTEA_DIR}/bin/javah - AC_SUBST(JAVAH) - JAR=${SYSTEM_ICEDTEA_DIR}/bin/jar - AC_SUBST(JAR) - RMIC=${SYSTEM_ICEDTEA_DIR}/bin/rmic - AC_SUBST(RMIC) -else AC_CHECK_FOR_GCJ_JDK FIND_JAVA FIND_JAVAC @@ -277,7 +227,6 @@ AC_CONFIG_FILES([javac], [chmod +x javac]) AC_CONFIG_FILES([javap], [chmod +x javap]) fi -fi FIND_RHINO_JAR WITH_OPENJDK_SRC_ZIP WITH_HOTSPOT_SRC_ZIP From gnu_andrew at member.fsf.org Wed Jun 10 16:48:08 2009 From: gnu_andrew at member.fsf.org (gnu_andrew at member.fsf.org) Date: Thu, 11 Jun 2009 00:48:08 +0100 Subject: [PATCH 0 of 1] Remove duplicate --with-icedtea/--with-icedtea-home options Message-ID: The patch in the following email removes --with-icedtea and --with-icedtea-home, moving any unique elements into --with-openjdk and removing duplication. It also merges --with-openjdk and --with-openjdk-home into one option, so it does the usual search without an option and can be given a specific path when needed. From bugzilla-daemon at icedtea.classpath.org Thu Jun 11 02:27:13 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 11 Jun 2009 09:27:13 +0000 Subject: [Bug 324] Shark assert(is_jarray(), "should be") during Java2Demo demos.Mix.JavaMedia Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=324 gbenson at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|gbenson at redhat.com |.org | ------- Comment #3 from gbenson at redhat.com 2009-06-11 09:27 ------- Ok, I found the bug. It happens at the arraylength instruction at bci 484 in com.sun.media.sound.SoftMainMixer::processAudioBuffers, in typeflow block #83 rpo#33 [479 - 493): 479: aload 5 481: dup 482: astore 15 484: arraylength 485: istore 14 487: iconst_0 488: istore 13 490: goto 906 At 479, where block #83 enters, typeflow thinks the state look like this: State : locals 22, stack 0, monitors 0 local 0 : com/sun/media/sound/SoftMainMixer local 1 : double local 2 : double2 local 3 : double local 4 : double2 local 5 : null local 6 : com/sun/media/sound/SoftAudioBuffer local 7 : com/sun/media/sound/SoftAudioBuffer local 8 : com/sun/media/sound/SoftAudioBuffer local 9 : int local 10 : [[F local 11 : [[F local 12 : bottom local 13 : bottom local 14 : bottom local 15 : bottom local 16 : bottom local 17 : bottom local 18 : bottom local 19 : bottom local 20 : bottom local 21 : bottom Typeflow has decided that local 5 (the array argument to the arraylength instruction) is null -- which has no type. Shark has worked around this by assuming that all null objects are straight objects, not arrays. I can see a fix this, sort of, but I'm going to have to rearrange the parser so it's going to take a 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. You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Thu Jun 11 08:56:09 2009 From: omajid at redhat.com (Omair Majid) Date: Thu, 11 Jun 2009 11:56:09 -0400 Subject: RFC: Make netscape.javascript package visible to javac Message-ID: <4A312919.6070802@redhat.com> Hi, The netscape.javascript package is not visible to javac in IcedTea6. Example: $ javac Main.java Main.java:59: package netscape.javascript does not exist import netscape.javascript.JSObject; $ javac -XDignore.symbol.file Main.java Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. The attached patch makes the netscape.javascript package visible when IcedTea6 is built with liveconnect support. ChangeLog: 2009-06-11 Omair Majid * patches/icedtea-liveconnect.patch: Add netscape.javascript package to non-core package list. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: liveconnect-make-netscape-javascript-package-visible.patch Type: text/x-patch Size: 913 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090611/d8aa1df1/liveconnect-make-netscape-javascript-package-visible.patch From langel at redhat.com Thu Jun 11 09:49:28 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 11 Jun 2009 12:49:28 -0400 Subject: [PATCH 1 of 1] Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk In-Reply-To: <0c6e0b7c31838efcdd5a.1244677689@rivendell.middle-earth.co.uk> References: <0c6e0b7c31838efcdd5a.1244677689@rivendell.middle-earth.co.uk> Message-ID: <4A313598.7030305@redhat.com> Thanks a lot for doing this. I very much approve. Cheers, Lillian gnu_andrew at member.fsf.org wrote: > # HG changeset patch > # User Andrew John Hughes > # Date 1244676679 -3600 > # Node ID 0c6e0b7c31838efcdd5a9cce619958e87dff8512 > # Parent 0b4d2e77cf9744daae05bf05b49899b21d90203e > Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk. > > 2009-06-10 Andrew John Hughes > > * Makefile.am: > Remove duplicate WITH_ICEDTEA blocks. > * acinclude.m4: > (AC_CHECK_FOR_OPENJDK): Updated so that no > turns off the option rather than dropping out. > (AC_CHECK_FOR_ICEDTEA): Removed. > * configure.ac: > Remove --with-icedtea and --with-openjdk blocks > and duplicate --with-icedtea logic. > > diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 Makefile.am > --- a/Makefile.am Wed Jun 10 12:00:53 2009 -0400 > +++ b/Makefile.am Thu Jun 11 00:31:19 2009 +0100 > @@ -986,14 +986,9 @@ > BOOTSTRAP_DIRECTORY_STAMP = > ICEDTEA_HOME = $(SYSTEM_OPENJDK_DIR) > else > -if WITH_ICEDTEA > - BOOTSTRAP_DIRECTORY_STAMP = > - ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR) > -else > BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp > ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea > endif > -endif > > # bootstrap/jdk1.6.0 to bootstrap/icedtea symlink. > stamps/bootstrap-directory-symlink.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) > @@ -1080,15 +1075,11 @@ > # OpenJDK Targets > # =============== > > -if WITH_ICEDTEA > +if WITH_OPENJDK > MEMORY_LIMIT = -J-Xmx1024m > else > -if WITH_OPENJDK > - MEMORY_LIMIT = -J-Xmx512m > -else > MEMORY_LIMIT = > endif > -endif > > if WITH_CACAO > ICEDTEA_BUILD_TARGET=j2se_only > diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 acinclude.m4 > --- a/acinclude.m4 Wed Jun 10 12:00:53 2009 -0400 > +++ b/acinclude.m4 Thu Jun 11 00:31:19 2009 +0100 > @@ -998,18 +998,20 @@ > AC_SUBST(SYSTEM_GCJ_DIR) > ]) > > +dnl This option allows the initial build to be skipped, and a single build > +dnl to be completed using an existing OpenJDK installation. It can be used > +dnl in three ways: > +dnl * --with-openjdk: look for OpenJDK in one of a series of predefined dirs > +dnl * --without-openjdk (default): do a full bootstrap, no OpenJDK required > +dnl * --with-openjdk=${path}: use the OpenJDK installed in the specified location > AC_DEFUN([AC_CHECK_FOR_OPENJDK], > [ > AC_MSG_CHECKING([for an existing OpenJDK installation]) > - AC_ARG_WITH([openjdk-home], > - [AS_HELP_STRING([--with-openjdk-home], > - [OpenJDK home directory \ > - (default is /usr/lib/jvm/java-openjdk)])], > + AC_ARG_WITH([openjdk], > + [AS_HELP_STRING([--with-openjdk], > + [perform a quick build with an installed copy of OpenJDK])], > [ > - if test "x${withval}" = xyes > - then > - SYSTEM_OPENJDK_DIR= > - elif test "x${withval}" = xno > + if test "x${withval}" = xno > then > SYSTEM_OPENJDK_DIR= > else > @@ -1019,55 +1021,22 @@ > [ > SYSTEM_OPENJDK_DIR= > ]) > - if test -z "${SYSTEM_OPENJDK_DIR}"; then > - for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk ; do > + if test "x${SYSTEM_OPENJDK_DIR}" = xyes; then > + for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk \ > + /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ > + /usr/lib/jvm/java-icedtea ; do > if test -d $dir; then > SYSTEM_OPENJDK_DIR=$dir > break > fi > done > + elif ! test -z "${SYSTEM_OPENJDK_DIR}"; then > + if ! test -d "${SYSTEM_OPENJDK_DIR}"; then > + AC_MSG_ERROR("An OpenJDK home directory could not be found.") > + fi > fi > + AM_CONDITIONAL(WITH_OPENJDK, test "x${SYSTEM_OPENJDK_DIR}" != x) > AC_MSG_RESULT(${SYSTEM_OPENJDK_DIR}) > - if ! test -d "${SYSTEM_OPENJDK_DIR}"; then > - AC_MSG_ERROR("An OpenJDK home directory could not be found.") > - fi > AC_SUBST(SYSTEM_OPENJDK_DIR) > ]) > > -AC_DEFUN([AC_CHECK_FOR_ICEDTEA], > -[ > - AC_MSG_CHECKING(for an existing IcedTea installation) > - AC_ARG_WITH([icedtea-home], > - [AS_HELP_STRING([--with-icedtea-home], > - [IcedTea home directory \ > - (default is /usr/lib/jvm/java-icedtea)])], > - [ > - if test "x${withval}" = xyes > - then > - SYSTEM_ICEDTEA_DIR= > - elif test "x${withval}" = xno > - then > - SYSTEM_ICEDTEA_DIR= > - else > - SYSTEM_ICEDTEA_DIR=${withval} > - fi > - ], > - [ > - SYSTEM_ICEDTEA_DIR= > - ]) > - if test -z "${SYSTEM_ICEDTEA_DIR}"; then > - for dir in /usr/lib/jvm/java-icedtea /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk ; do > - if test -d $dir; then > - SYSTEM_ICEDTEA_DIR=$dir > - break > - fi > - done > - fi > - AC_MSG_RESULT(${SYSTEM_ICEDTEA_DIR}) > - if ! test -d "${SYSTEM_ICEDTEA_DIR}"; then > - AC_MSG_ERROR("An IcedTea home directory could not be found.") > - fi > - AC_SUBST(SYSTEM_ICEDTEA_DIR) > -]) > - > - > diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 configure.ac > --- a/configure.ac Wed Jun 10 12:00:53 2009 -0400 > +++ b/configure.ac Thu Jun 11 00:31:19 2009 +0100 > @@ -46,24 +46,7 @@ > AC_CHECK_WITH_HOTSPOT_BUILD > AC_PATH_TOOL([LINUX32],[linux32]) > AC_CHECK_GCC_VERSION > - > -AC_MSG_CHECKING([whether to build using an existing installation of IcedTea]) > -AC_ARG_WITH([icedtea], > - [AS_HELP_STRING([--with-icedtea], > - [build IcedTea with system-installed IcedTea])], > - [ > - if test "x${withval}" != xno > - then > - with_icedtea=true > - else > - with_icedtea=false > - fi > - ], > - [ > - with_icedtea=false > - ]) > -AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" = true) > -AC_MSG_RESULT(${with_icedtea}) > +AC_CHECK_FOR_OPENJDK > > AC_MSG_CHECKING([for a NetBeans installation]) > AC_ARG_WITH([netbeans-home], > @@ -83,24 +66,6 @@ > AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) > AC_SUBST(SYSTEM_NETBEANS_DIR) > > -AC_MSG_CHECKING([whether to build using an existing installation of OpenJDK]) > -AC_ARG_WITH([openjdk], > - [AS_HELP_STRING([--with-openjdk], > - [build IcedTea with system-installed OpenJDK])], > - [ > - if test "x${withval}" != xno > - then > - with_openjdk=true > - else > - with_openjdk=false > - fi > - ], > - [ > - with_openjdk=false > - ]) > -AM_CONDITIONAL(WITH_OPENJDK, test "${with_openjdk}" = true) > -AC_MSG_RESULT(${with_openjdk}) > - > AC_MSG_CHECKING(for Ant home directory) > AC_ARG_WITH([ant-home], > [AS_HELP_STRING([--with-ant-home], > @@ -238,7 +203,6 @@ > > if test "${with_openjdk}" = true > then > - AC_CHECK_FOR_OPENJDK > JAVA=$SYSTEM_OPENJDK_DIR/bin/java > AC_SUBST(JAVA) > JAVAC=${SYSTEM_OPENJDK_DIR}/bin/javac > @@ -250,20 +214,6 @@ > RMIC=${SYSTEM_OPENJDK_DIR}/bin/rmic > AC_SUBST(RMIC) > else > -if test "${with_icedtea}" = true > -then > - AC_CHECK_FOR_ICEDTEA > - JAVA=$SYSTEM_ICEDTEA_DIR/bin/java > - AC_SUBST(JAVA) > - JAVAC=${SYSTEM_ICEDTEA_DIR}/bin/javac > - AC_SUBST(JAVAC) > - JAVAH=${SYSTEM_ICEDTEA_DIR}/bin/javah > - AC_SUBST(JAVAH) > - JAR=${SYSTEM_ICEDTEA_DIR}/bin/jar > - AC_SUBST(JAR) > - RMIC=${SYSTEM_ICEDTEA_DIR}/bin/rmic > - AC_SUBST(RMIC) > -else > AC_CHECK_FOR_GCJ_JDK > FIND_JAVA > FIND_JAVAC > @@ -277,7 +227,6 @@ > AC_CONFIG_FILES([javac], [chmod +x javac]) > AC_CONFIG_FILES([javap], [chmod +x javap]) > fi > -fi > FIND_RHINO_JAR > WITH_OPENJDK_SRC_ZIP > WITH_HOTSPOT_SRC_ZIP > From ahughes at redhat.com Thu Jun 11 10:01:34 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 11 Jun 2009 17:01:34 +0000 Subject: changeset in /hg/icedtea6: Fold --with-icedtea, --with-icedtea-h... Message-ID: changeset 0a1a8cd8eda3 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0a1a8cd8eda3 description: Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk. 2009-06-10 Andrew John Hughes * Makefile.am: Remove duplicate WITH_ICEDTEA blocks. * acinclude.m4: (AC_CHECK_FOR_OPENJDK): Updated so that no turns off the option rather than dropping out. (AC_CHECK_FOR_ICEDTEA): Removed. * configure.ac: Remove --with-icedtea and --with-openjdk blocks and duplicate --with-icedtea logic. diffstat: 4 files changed, 34 insertions(+), 113 deletions(-) ChangeLog | 12 +++++++++ Makefile.am | 11 -------- acinclude.m4 | 71 ++++++++++++++++------------------------------------------ configure.ac | 53 ------------------------------------------- diffs (241 lines): diff -r 0b4d2e77cf97 -r 0a1a8cd8eda3 ChangeLog --- a/ChangeLog Wed Jun 10 12:00:53 2009 -0400 +++ b/ChangeLog Thu Jun 11 18:02:04 2009 +0100 @@ -1,3 +1,15 @@ 2009-06-10 Omair Majid + + * Makefile.am: + Remove duplicate WITH_ICEDTEA blocks. + * acinclude.m4: + (AC_CHECK_FOR_OPENJDK): Updated so that no + turns off the option rather than dropping out. + (AC_CHECK_FOR_ICEDTEA): Removed. + * configure.ac: + Remove --with-icedtea and --with-openjdk blocks + and duplicate --with-icedtea logic. + 2009-06-10 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java diff -r 0b4d2e77cf97 -r 0a1a8cd8eda3 Makefile.am --- a/Makefile.am Wed Jun 10 12:00:53 2009 -0400 +++ b/Makefile.am Thu Jun 11 18:02:04 2009 +0100 @@ -986,13 +986,8 @@ if WITH_OPENJDK BOOTSTRAP_DIRECTORY_STAMP = ICEDTEA_HOME = $(SYSTEM_OPENJDK_DIR) else -if WITH_ICEDTEA - BOOTSTRAP_DIRECTORY_STAMP = - ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR) -else BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea -endif endif # bootstrap/jdk1.6.0 to bootstrap/icedtea symlink. @@ -1080,14 +1075,10 @@ clean-bootstrap-directory-symlink-ecj: # OpenJDK Targets # =============== -if WITH_ICEDTEA +if WITH_OPENJDK MEMORY_LIMIT = -J-Xmx1024m else -if WITH_OPENJDK - MEMORY_LIMIT = -J-Xmx512m -else MEMORY_LIMIT = -endif endif if WITH_CACAO diff -r 0b4d2e77cf97 -r 0a1a8cd8eda3 acinclude.m4 --- a/acinclude.m4 Wed Jun 10 12:00:53 2009 -0400 +++ b/acinclude.m4 Thu Jun 11 18:02:04 2009 +0100 @@ -998,18 +998,20 @@ AC_DEFUN([AC_CHECK_FOR_GCJ_JDK], AC_SUBST(SYSTEM_GCJ_DIR) ]) +dnl This option allows the initial build to be skipped, and a single build +dnl to be completed using an existing OpenJDK installation. It can be used +dnl in three ways: +dnl * --with-openjdk: look for OpenJDK in one of a series of predefined dirs +dnl * --without-openjdk (default): do a full bootstrap, no OpenJDK required +dnl * --with-openjdk=${path}: use the OpenJDK installed in the specified location AC_DEFUN([AC_CHECK_FOR_OPENJDK], [ AC_MSG_CHECKING([for an existing OpenJDK installation]) - AC_ARG_WITH([openjdk-home], - [AS_HELP_STRING([--with-openjdk-home], - [OpenJDK home directory \ - (default is /usr/lib/jvm/java-openjdk)])], + AC_ARG_WITH([openjdk], + [AS_HELP_STRING([--with-openjdk], + [perform a quick build with an installed copy of OpenJDK])], [ - if test "x${withval}" = xyes - then - SYSTEM_OPENJDK_DIR= - elif test "x${withval}" = xno + if test "x${withval}" = xno then SYSTEM_OPENJDK_DIR= else @@ -1019,55 +1021,22 @@ AC_DEFUN([AC_CHECK_FOR_OPENJDK], [ SYSTEM_OPENJDK_DIR= ]) - if test -z "${SYSTEM_OPENJDK_DIR}"; then - for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk ; do + if test "x${SYSTEM_OPENJDK_DIR}" = xyes; then + for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk \ + /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ + /usr/lib/jvm/java-icedtea ; do if test -d $dir; then SYSTEM_OPENJDK_DIR=$dir break fi done - fi + elif ! test -z "${SYSTEM_OPENJDK_DIR}"; then + if ! test -d "${SYSTEM_OPENJDK_DIR}"; then + AC_MSG_ERROR("An OpenJDK home directory could not be found.") + fi + fi + AM_CONDITIONAL(WITH_OPENJDK, test "x${SYSTEM_OPENJDK_DIR}" != x) AC_MSG_RESULT(${SYSTEM_OPENJDK_DIR}) - if ! test -d "${SYSTEM_OPENJDK_DIR}"; then - AC_MSG_ERROR("An OpenJDK home directory could not be found.") - fi AC_SUBST(SYSTEM_OPENJDK_DIR) ]) -AC_DEFUN([AC_CHECK_FOR_ICEDTEA], -[ - AC_MSG_CHECKING(for an existing IcedTea installation) - AC_ARG_WITH([icedtea-home], - [AS_HELP_STRING([--with-icedtea-home], - [IcedTea home directory \ - (default is /usr/lib/jvm/java-icedtea)])], - [ - if test "x${withval}" = xyes - then - SYSTEM_ICEDTEA_DIR= - elif test "x${withval}" = xno - then - SYSTEM_ICEDTEA_DIR= - else - SYSTEM_ICEDTEA_DIR=${withval} - fi - ], - [ - SYSTEM_ICEDTEA_DIR= - ]) - if test -z "${SYSTEM_ICEDTEA_DIR}"; then - for dir in /usr/lib/jvm/java-icedtea /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk ; do - if test -d $dir; then - SYSTEM_ICEDTEA_DIR=$dir - break - fi - done - fi - AC_MSG_RESULT(${SYSTEM_ICEDTEA_DIR}) - if ! test -d "${SYSTEM_ICEDTEA_DIR}"; then - AC_MSG_ERROR("An IcedTea home directory could not be found.") - fi - AC_SUBST(SYSTEM_ICEDTEA_DIR) -]) - - diff -r 0b4d2e77cf97 -r 0a1a8cd8eda3 configure.ac --- a/configure.ac Wed Jun 10 12:00:53 2009 -0400 +++ b/configure.ac Thu Jun 11 18:02:04 2009 +0100 @@ -46,24 +46,7 @@ AC_CHECK_WITH_HOTSPOT_BUILD AC_CHECK_WITH_HOTSPOT_BUILD AC_PATH_TOOL([LINUX32],[linux32]) AC_CHECK_GCC_VERSION - -AC_MSG_CHECKING([whether to build using an existing installation of IcedTea]) -AC_ARG_WITH([icedtea], - [AS_HELP_STRING([--with-icedtea], - [build IcedTea with system-installed IcedTea])], - [ - if test "x${withval}" != xno - then - with_icedtea=true - else - with_icedtea=false - fi - ], - [ - with_icedtea=false - ]) -AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" = true) -AC_MSG_RESULT(${with_icedtea}) +AC_CHECK_FOR_OPENJDK AC_MSG_CHECKING([for a NetBeans installation]) AC_ARG_WITH([netbeans-home], @@ -83,24 +66,6 @@ AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) AC_SUBST(SYSTEM_NETBEANS_DIR) -AC_MSG_CHECKING([whether to build using an existing installation of OpenJDK]) -AC_ARG_WITH([openjdk], - [AS_HELP_STRING([--with-openjdk], - [build IcedTea with system-installed OpenJDK])], - [ - if test "x${withval}" != xno - then - with_openjdk=true - else - with_openjdk=false - fi - ], - [ - with_openjdk=false - ]) -AM_CONDITIONAL(WITH_OPENJDK, test "${with_openjdk}" = true) -AC_MSG_RESULT(${with_openjdk}) - AC_MSG_CHECKING(for Ant home directory) AC_ARG_WITH([ant-home], [AS_HELP_STRING([--with-ant-home], @@ -238,7 +203,6 @@ SET_OS_DIRS if test "${with_openjdk}" = true then - AC_CHECK_FOR_OPENJDK JAVA=$SYSTEM_OPENJDK_DIR/bin/java AC_SUBST(JAVA) JAVAC=${SYSTEM_OPENJDK_DIR}/bin/javac @@ -248,20 +212,6 @@ then JAR=${SYSTEM_OPENJDK_DIR}/bin/jar AC_SUBST(JAR) RMIC=${SYSTEM_OPENJDK_DIR}/bin/rmic - AC_SUBST(RMIC) -else -if test "${with_icedtea}" = true -then - AC_CHECK_FOR_ICEDTEA - JAVA=$SYSTEM_ICEDTEA_DIR/bin/java - AC_SUBST(JAVA) - JAVAC=${SYSTEM_ICEDTEA_DIR}/bin/javac - AC_SUBST(JAVAC) - JAVAH=${SYSTEM_ICEDTEA_DIR}/bin/javah - AC_SUBST(JAVAH) - JAR=${SYSTEM_ICEDTEA_DIR}/bin/jar - AC_SUBST(JAR) - RMIC=${SYSTEM_ICEDTEA_DIR}/bin/rmic AC_SUBST(RMIC) else AC_CHECK_FOR_GCJ_JDK @@ -276,7 +226,6 @@ else FIND_XERCES2_JAR AC_CONFIG_FILES([javac], [chmod +x javac]) AC_CONFIG_FILES([javap], [chmod +x javap]) -fi fi FIND_RHINO_JAR WITH_OPENJDK_SRC_ZIP From gnu_andrew at member.fsf.org Thu Jun 11 10:07:13 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 11 Jun 2009 18:07:13 +0100 Subject: [PATCH 1 of 1] Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk In-Reply-To: <4A313598.7030305@redhat.com> References: <0c6e0b7c31838efcdd5a.1244677689@rivendell.middle-earth.co.uk> <4A313598.7030305@redhat.com> Message-ID: <17c6771e0906111007u5f8ad950hda3be1fb56af1ffb@mail.gmail.com> 2009/6/11 Lillian Angel : > Thanks a lot for doing this. I very much approve. > > > Cheers, > Lillian > Thanks for reviewing. Pushed. Cheers, -- Andrew :) > > gnu_andrew at member.fsf.org wrote: >> >> # HG changeset patch >> # User Andrew John Hughes >> # Date 1244676679 -3600 >> # Node ID 0c6e0b7c31838efcdd5a9cce619958e87dff8512 >> # Parent ?0b4d2e77cf9744daae05bf05b49899b21d90203e >> Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into >> --with-openjdk. >> >> 2009-06-10 ?Andrew John Hughes ? >> >> ? ? ? ?* Makefile.am: >> ? ? ? ?Remove duplicate WITH_ICEDTEA blocks. >> ? ? ? ?* acinclude.m4: >> ? ? ? ?(AC_CHECK_FOR_OPENJDK): Updated so that no >> ? ? ? ?turns off the option rather than dropping out. >> ? ? ? ?(AC_CHECK_FOR_ICEDTEA): Removed. >> ? ? ? ?* configure.ac: >> ? ? ? ?Remove --with-icedtea and --with-openjdk blocks >> ? ? ? ?and duplicate --with-icedtea logic. >> >> diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 Makefile.am >> --- a/Makefile.am ? ? ? Wed Jun 10 12:00:53 2009 -0400 >> +++ b/Makefile.am ? ? ? Thu Jun 11 00:31:19 2009 +0100 >> @@ -986,14 +986,9 @@ >> ? BOOTSTRAP_DIRECTORY_STAMP = >> ? ICEDTEA_HOME = $(SYSTEM_OPENJDK_DIR) >> ?else >> -if WITH_ICEDTEA >> - ?BOOTSTRAP_DIRECTORY_STAMP = >> - ?ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR) >> -else >> ? BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp >> ? ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea >> ?endif >> -endif >> ??# bootstrap/jdk1.6.0 to bootstrap/icedtea symlink. >> ?stamps/bootstrap-directory-symlink.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) >> @@ -1080,15 +1075,11 @@ >> ?# OpenJDK Targets >> ?# =============== >> ?-if WITH_ICEDTEA >> +if WITH_OPENJDK >> ? MEMORY_LIMIT = -J-Xmx1024m >> ?else >> -if WITH_OPENJDK >> - ?MEMORY_LIMIT = -J-Xmx512m >> -else >> ? MEMORY_LIMIT = >> ?endif >> -endif >> ??if WITH_CACAO >> ? ICEDTEA_BUILD_TARGET=j2se_only >> diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 acinclude.m4 >> --- a/acinclude.m4 ? ? ?Wed Jun 10 12:00:53 2009 -0400 >> +++ b/acinclude.m4 ? ? ?Thu Jun 11 00:31:19 2009 +0100 >> @@ -998,18 +998,20 @@ >> ? AC_SUBST(SYSTEM_GCJ_DIR) >> ?]) >> ?+dnl This option allows the initial build to be skipped, and a single >> build >> +dnl to be completed using an existing OpenJDK installation. ?It can be >> used >> +dnl in three ways: >> +dnl ? * --with-openjdk: look for OpenJDK in one of a series of predefined >> dirs >> +dnl ? * --without-openjdk (default): do a full bootstrap, no OpenJDK >> required >> +dnl ? * --with-openjdk=${path}: use the OpenJDK installed in the >> specified location >> ?AC_DEFUN([AC_CHECK_FOR_OPENJDK], >> ?[ >> ? AC_MSG_CHECKING([for an existing OpenJDK installation]) >> - ?AC_ARG_WITH([openjdk-home], >> - ? ? ? ? ? ? ?[AS_HELP_STRING([--with-openjdk-home], >> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[OpenJDK home directory \ >> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (default is /usr/lib/jvm/java-openjdk)])], >> + ?AC_ARG_WITH([openjdk], >> + ? ? ? ? ? ? ?[AS_HELP_STRING([--with-openjdk], >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[perform a quick build with an installed >> copy of OpenJDK])], >> ? ? ? ? ? ? ? [ >> - ? ? ? ? ? ? ? ?if test "x${withval}" = xyes >> - ? ? ? ? ? ? ? ?then >> - ? ? ? ? ? ? ? ? ?SYSTEM_OPENJDK_DIR= >> - ? ? ? ? ? ? ? ?elif test "x${withval}" = xno >> + ? ? ? ? ? ? ? ?if test "x${withval}" = xno >> ? ? ? ? ? ? ? ? then >> ? ? ? ? ? ? ? ? ?SYSTEM_OPENJDK_DIR= >> ? ? ? ? ? ? ? ?else >> @@ -1019,55 +1021,22 @@ >> ? ? ? ? ? ? ? [ >> ? ? ? ? ? ? ? ? SYSTEM_OPENJDK_DIR= >> ? ? ? ? ? ? ? ]) >> - ?if test -z "${SYSTEM_OPENJDK_DIR}"; then >> - ? ?for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk ; do >> + ?if test "x${SYSTEM_OPENJDK_DIR}" = xyes; then >> + ? ?for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk \ >> + ? ? ? ? ? ? ?/usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ >> + ? ? ? ? ? ? ?/usr/lib/jvm/java-icedtea ; do >> ? ? ? ?if test -d $dir; then >> ? ? ? ? ?SYSTEM_OPENJDK_DIR=$dir >> ? ? ? ? break >> ? ? ? ?fi >> ? ? done >> + ?elif ! test -z "${SYSTEM_OPENJDK_DIR}"; then >> + ? ?if ! test -d "${SYSTEM_OPENJDK_DIR}"; then >> + ? ? ?AC_MSG_ERROR("An OpenJDK home directory could not be found.") >> + ? ?fi >> ? fi >> + ?AM_CONDITIONAL(WITH_OPENJDK, test "x${SYSTEM_OPENJDK_DIR}" != x) >> ? AC_MSG_RESULT(${SYSTEM_OPENJDK_DIR}) >> - ?if ! test -d "${SYSTEM_OPENJDK_DIR}"; then >> - ? ?AC_MSG_ERROR("An OpenJDK home directory could not be found.") >> - ?fi >> ? AC_SUBST(SYSTEM_OPENJDK_DIR) >> ?]) >> ?-AC_DEFUN([AC_CHECK_FOR_ICEDTEA], >> -[ >> - ?AC_MSG_CHECKING(for an existing IcedTea installation) >> - ?AC_ARG_WITH([icedtea-home], >> - ? ? ? ? ? ? ?[AS_HELP_STRING([--with-icedtea-home], >> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[IcedTea home directory \ >> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (default is /usr/lib/jvm/java-icedtea)])], >> - ? ? ? ? ? ? ?[ >> - ? ? ? ? ? ? ? ?if test "x${withval}" = xyes >> - ? ? ? ? ? ? ? ?then >> - ? ? ? ? ? ? ? ? ?SYSTEM_ICEDTEA_DIR= >> - ? ? ? ? ? ? ? ?elif test "x${withval}" = xno >> - ? ? ? ? ? ? ? ?then >> - ? ? ? ? ? ? ? ? SYSTEM_ICEDTEA_DIR= >> - ? ? ? ? ? ? ? else >> - ? ? ? ? ? ? ? ? ?SYSTEM_ICEDTEA_DIR=${withval} >> - ? ? ? ? ? ? ? ?fi >> - ? ? ? ? ? ? ?], >> - ? ? ? ? ? ? ?[ >> - ? ? ? ? ? ? ? ?SYSTEM_ICEDTEA_DIR= >> - ? ? ? ? ? ? ?]) >> - ?if test -z "${SYSTEM_ICEDTEA_DIR}"; then >> - ? ?for dir in /usr/lib/jvm/java-icedtea /usr/lib/jvm/icedtea6 >> /usr/lib/jvm/java-6-openjdk ; do >> - ? ? ? if test -d $dir; then >> - ? ? ? ? SYSTEM_ICEDTEA_DIR=$dir >> - ? ? ? ?break >> - ? ? ? fi >> - ? ?done >> - ?fi >> - ?AC_MSG_RESULT(${SYSTEM_ICEDTEA_DIR}) >> - ?if ! test -d "${SYSTEM_ICEDTEA_DIR}"; then >> - ? ?AC_MSG_ERROR("An IcedTea home directory could not be found.") >> - ?fi >> - ?AC_SUBST(SYSTEM_ICEDTEA_DIR) >> -]) >> - >> - >> diff -r 0b4d2e77cf97 -r 0c6e0b7c3183 configure.ac >> --- a/configure.ac ? ? ?Wed Jun 10 12:00:53 2009 -0400 >> +++ b/configure.ac ? ? ?Thu Jun 11 00:31:19 2009 +0100 >> @@ -46,24 +46,7 @@ >> ?AC_CHECK_WITH_HOTSPOT_BUILD >> ?AC_PATH_TOOL([LINUX32],[linux32]) >> ?AC_CHECK_GCC_VERSION >> - >> -AC_MSG_CHECKING([whether to build using an existing installation of >> IcedTea]) >> -AC_ARG_WITH([icedtea], >> - ? ? ? ?[AS_HELP_STRING([--with-icedtea], >> - ? ? ? ? ? ? ? ? ? ? ? ?[build IcedTea with system-installed IcedTea])], >> - ? ? ? ?[ >> - ? ? ? ? ?if test "x${withval}" != xno >> - ? ? ? ? ?then >> - ? ? ? ? ? ?with_icedtea=true >> - ? ? ? ? ?else >> - ? ? ? ? ? ?with_icedtea=false >> - ? ? ? ? ?fi >> - ? ? ? ?], >> - ? ? ? ?[ >> - ? ? ? ? ?with_icedtea=false >> - ? ? ? ?]) >> -AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" = true) >> -AC_MSG_RESULT(${with_icedtea}) >> +AC_CHECK_FOR_OPENJDK >> ??AC_MSG_CHECKING([for a NetBeans installation]) >> ?AC_ARG_WITH([netbeans-home], >> @@ -83,24 +66,6 @@ >> ?AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) >> ?AC_SUBST(SYSTEM_NETBEANS_DIR) >> ?-AC_MSG_CHECKING([whether to build using an existing installation of >> OpenJDK]) >> -AC_ARG_WITH([openjdk], >> - ? ? ? ?[AS_HELP_STRING([--with-openjdk], >> - ? ? ? ? ? ? ? ? ? ? ? ?[build IcedTea with system-installed OpenJDK])], >> - ? ? ? ?[ >> - ? ? ? ? ?if test "x${withval}" != xno >> - ? ? ? ? ?then >> - ? ? ? ? ? ?with_openjdk=true >> - ? ? ? ? ?else >> - ? ? ? ? ? ?with_openjdk=false >> - ? ? ? ? ?fi >> - ? ? ? ?], >> - ? ? ? ?[ >> - ? ? ? ? ?with_openjdk=false >> - ? ? ? ?]) >> -AM_CONDITIONAL(WITH_OPENJDK, test "${with_openjdk}" = true) >> -AC_MSG_RESULT(${with_openjdk}) >> - >> ?AC_MSG_CHECKING(for Ant home directory) >> ?AC_ARG_WITH([ant-home], >> ? ? ? ? ? ? [AS_HELP_STRING([--with-ant-home], >> @@ -238,7 +203,6 @@ >> ??if test "${with_openjdk}" = true >> ?then >> - ?AC_CHECK_FOR_OPENJDK >> ? JAVA=$SYSTEM_OPENJDK_DIR/bin/java >> ? AC_SUBST(JAVA) >> ? JAVAC=${SYSTEM_OPENJDK_DIR}/bin/javac >> @@ -250,20 +214,6 @@ >> ? RMIC=${SYSTEM_OPENJDK_DIR}/bin/rmic >> ? AC_SUBST(RMIC) >> ?else >> -if test "${with_icedtea}" = true >> -then >> - ?AC_CHECK_FOR_ICEDTEA >> - ?JAVA=$SYSTEM_ICEDTEA_DIR/bin/java >> - ?AC_SUBST(JAVA) >> - ?JAVAC=${SYSTEM_ICEDTEA_DIR}/bin/javac >> - ?AC_SUBST(JAVAC) >> - ?JAVAH=${SYSTEM_ICEDTEA_DIR}/bin/javah >> - ?AC_SUBST(JAVAH) >> - ?JAR=${SYSTEM_ICEDTEA_DIR}/bin/jar >> - ?AC_SUBST(JAR) >> - ?RMIC=${SYSTEM_ICEDTEA_DIR}/bin/rmic >> - ?AC_SUBST(RMIC) >> -else >> ? AC_CHECK_FOR_GCJ_JDK >> ? FIND_JAVA >> ? FIND_JAVAC >> @@ -277,7 +227,6 @@ >> ? AC_CONFIG_FILES([javac], [chmod +x javac]) >> ? AC_CONFIG_FILES([javap], [chmod +x javap]) >> ?fi >> -fi >> ?FIND_RHINO_JAR >> ?WITH_OPENJDK_SRC_ZIP >> ?WITH_HOTSPOT_SRC_ZIP >> > > -- 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 dbhole at redhat.com Thu Jun 11 13:19:57 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 11 Jun 2009 16:19:57 -0400 Subject: RFC: Make netscape.javascript package visible to javac In-Reply-To: <4A312919.6070802@redhat.com> References: <4A312919.6070802@redhat.com> Message-ID: <20090611201957.GA31445@redhat.com> * Omair Majid [2009-06-11 11:56]: > Hi, > > The netscape.javascript package is not visible to javac in IcedTea6. > Example: > $ javac Main.java > Main.java:59: package netscape.javascript does not exist > import netscape.javascript.JSObject; > $ javac -XDignore.symbol.file Main.java > Note: Main.java uses unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > > The attached patch makes the netscape.javascript package visible when > IcedTea6 is built with liveconnect support. > > ChangeLog: > 2009-06-11 Omair Majid > > * patches/icedtea-liveconnect.patch: Add netscape.javascript package > to non-core package list. > Looks good. Assuming you have tested this, go ahead and commit. Cheers, Deepak > Cheers, > Omair From bugzilla-daemon at icedtea.classpath.org Thu Jun 11 14:31:44 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 11 Jun 2009 21:31:44 +0000 Subject: [Bug 348] New: Failure when bootstrapping with Shark on OpenJDK7/x86_64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=348 Summary: Failure when bootstrapping with Shark on OpenJDK7/x86_64 Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: gnu_andrew at member.fsf.org rm -f /mnt/builder/shark/openjdk/build/linux-amd64/lib/fontconfig.bfc /home/andrew/builder/shark/bootstrap/jdk1.6.0/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -jar /mnt/builder/shark/openjdk/build/linux-amd64/btjars/compilefontconfig.jar ../../../src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.properties /mnt/builder/shark/openjdk/build/linux-amd64/lib/fontconfig.bfc Stack dump: 0. Running pass 'Optimize for code generation' on function 'java: /home/andrew/projects/openjdk/llvm/lib/VMCore/LeakDetector.cpp:43: void::LeakDetectorImpl::addGarbage(const T*) [with T = llvm::Value]: Assertion `Ts.count(Cache) == 0 && "Object already in set!"' failed. make[5]: *** [/mnt/builder/shark/openjdk/build/linux-amd64/lib/fontconfig.bfc] Aborted make[5]: *** Deleting file `/mnt/builder/shark/openjdk/build/linux-amd64/lib/fontconfig.bfc' make[5]: Leaving directory `/mnt/builder/shark/openjdk/jdk/make/sun/awt' Running make again causes the build to complete. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Jun 11 14:33:27 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 11 Jun 2009 21:33:27 +0000 Subject: [Bug 348] Failure when bootstrapping with Shark on OpenJDK7/x86_64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=348 ------- Comment #1 from gnu_andrew at member.fsf.org 2009-06-11 21:33 ------- ~/projects/openjdk/llvm $ svn info Path: . URL: http://llvm.org/svn/llvm-project/llvm/trunk Repository Root: http://llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 72522 Node Kind: directory Schedule: normal Last Changed Author: sgupta Last Changed Rev: 72521 Last Changed Date: 2009-05-28 07:59:57 +0100 (Thu, 28 May 2009) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Thu Jun 11 14:39:17 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 11 Jun 2009 21:39:17 +0000 Subject: changeset in /hg/icedtea: Fix version to be 1.11-pre. Message-ID: changeset f95ae75a68c6 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f95ae75a68c6 description: Fix version to be 1.11-pre. 2009-06-11 Andrew John Hughes * configure.ac: Bump to 1.11-pre. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ configure.ac | 2 +- diffs (21 lines): diff -r 05f411adf2f1 -r f95ae75a68c6 ChangeLog --- a/ChangeLog Wed Jun 10 20:49:02 2009 +0100 +++ b/ChangeLog Thu Jun 11 22:40:38 2009 +0100 @@ -1,3 +1,8 @@ 2009-06-10 Andrew John Hughes + + * configure.ac: + Bump to 1.11-pre. + 2009-06-10 Andrew John Hughes * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: diff -r 05f411adf2f1 -r f95ae75a68c6 configure.ac --- a/configure.ac Wed Jun 10 20:49:02 2009 +0100 +++ b/configure.ac Thu Jun 11 22:40:38 2009 +0100 @@ -1,4 +1,4 @@ AC_INIT([icedtea], [1.10], [distro-pkg-d -AC_INIT([icedtea], [1.10], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [1.11-pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From omajid at redhat.com Fri Jun 12 07:05:23 2009 From: omajid at redhat.com (Omair Majid) Date: Fri, 12 Jun 2009 14:05:23 +0000 Subject: changeset in /hg/icedtea6: 2009-06-12 Omair Majid changeset eb47e16e3ace in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=eb47e16e3ace description: 2009-06-12 Omair Majid * patches/icedtea-liveconnect.patch: Make netscape.javascript package visible to javac by adding it to the non-core package list. diffstat: 2 files changed, 22 insertions(+) ChangeLog | 5 +++++ patches/icedtea-liveconnect.patch | 17 +++++++++++++++++ diffs (36 lines): diff -r 0a1a8cd8eda3 -r eb47e16e3ace ChangeLog --- a/ChangeLog Thu Jun 11 18:02:04 2009 +0100 +++ b/ChangeLog Fri Jun 12 10:05:15 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-10 Andrew John Hughes + + * patches/icedtea-liveconnect.patch: Make netscape.javascript package + visible to javac by adding it to the non-core package list. + 2009-06-10 Andrew John Hughes * Makefile.am: diff -r 0a1a8cd8eda3 -r eb47e16e3ace patches/icedtea-liveconnect.patch --- a/patches/icedtea-liveconnect.patch Thu Jun 11 18:02:04 2009 +0100 +++ b/patches/icedtea-liveconnect.patch Fri Jun 12 10:05:15 2009 -0400 @@ -143,3 +143,20 @@ diff -urN openjdk.orig/jdk/make/sun/plug +JAVA_ARGS = "{ \"sun.applet.PluginMain\" }" +include $(BUILDDIR)/common/Program.gmk + +--- openjdk/jdk/make/docs/NON_CORE_PKGS.gmk.orig 2009-06-10 17:48:57.000000000 -0400 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2009-06-10 17:49:59.000000000 -0400 +@@ -82,11 +82,14 @@ + TREEAPI_PKGS = com.sun.source.tree \ + com.sun.source.util + ++JAVASCRIPT_PKGS = netscape.javascript ++ + SMARTCARDIO_PKGS = javax.smartcardio + + # non-core packages in rt.jar + NON_CORE_PKGS = $(DOMAPI_PKGS) \ + $(MGMT_PKGS) \ ++ $(JAVASCRIPT_PKGS) \ + $(JAAS_PKGS) \ + $(JGSS_PKGS) \ + $(OLD_JSSE_PKGS) \ From langel at redhat.com Fri Jun 12 08:52:13 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 12 Jun 2009 15:52:13 +0000 Subject: changeset in /hg/icedtea6: 2009-06-12 Lillian Angel changeset abb60b806ed6 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=abb60b806ed6 description: 2009-06-12 Lillian Angel * acinclude.m4: (AC_CHECK_FOR_OPENJDK): Properly export with_openjdk var. diffstat: 2 files changed, 11 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ acinclude.m4 | 8 ++++++-- diffs (40 lines): diff -r eb47e16e3ace -r abb60b806ed6 ChangeLog --- a/ChangeLog Fri Jun 12 10:05:15 2009 -0400 +++ b/ChangeLog Fri Jun 12 11:53:38 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-12 Omair Majid + + * acinclude.m4: + (AC_CHECK_FOR_OPENJDK): Properly export with_openjdk var. + 2009-06-12 Omair Majid * patches/icedtea-liveconnect.patch: Make netscape.javascript package diff -r eb47e16e3ace -r abb60b806ed6 acinclude.m4 --- a/acinclude.m4 Fri Jun 12 10:05:15 2009 -0400 +++ b/acinclude.m4 Fri Jun 12 11:53:38 2009 -0400 @@ -1014,12 +1014,15 @@ AC_DEFUN([AC_CHECK_FOR_OPENJDK], if test "x${withval}" = xno then SYSTEM_OPENJDK_DIR= + with_openjdk=false else SYSTEM_OPENJDK_DIR=${withval} + with_openjdk=true fi ], [ SYSTEM_OPENJDK_DIR= + with_openjdk=false ]) if test "x${SYSTEM_OPENJDK_DIR}" = xyes; then for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk \ @@ -1038,5 +1041,6 @@ AC_DEFUN([AC_CHECK_FOR_OPENJDK], AM_CONDITIONAL(WITH_OPENJDK, test "x${SYSTEM_OPENJDK_DIR}" != x) AC_MSG_RESULT(${SYSTEM_OPENJDK_DIR}) AC_SUBST(SYSTEM_OPENJDK_DIR) -]) - + AC_SUBST(with_openjdk) +]) + From doko at ubuntu.com Fri Jun 12 10:24:57 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 12 Jun 2009 17:24:57 +0000 Subject: changeset in /hg/icedtea6: Makefile.am (ADD_ZERO_CONFIGURE_ARGS)... Message-ID: changeset a5464a5c3e45 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a5464a5c3e45 description: Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Use --with-openjdk only diffstat: 2 files changed, 6 insertions(+), 4 deletions(-) ChangeLog | 4 ++++ Makefile.am | 6 ++---- diffs (34 lines): diff -r abb60b806ed6 -r a5464a5c3e45 ChangeLog --- a/ChangeLog Fri Jun 12 11:53:38 2009 -0400 +++ b/ChangeLog Fri Jun 12 19:20:11 2009 +0200 @@ -1,3 +1,7 @@ 2009-06-12 Lillian Angel + + * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Use --with-openjdk only. + 2009-06-12 Lillian Angel * acinclude.m4: diff -r abb60b806ed6 -r a5464a5c3e45 Makefile.am --- a/Makefile.am Fri Jun 12 11:53:38 2009 -0400 +++ b/Makefile.am Fri Jun 12 19:20:11 2009 +0200 @@ -1788,8 +1788,7 @@ endif # configure script arguments, quoted in single quotes CONFIGURE_ARGS = @CONFIGURE_ARGS@ ADD_ZERO_CONFIGURE_ARGS = \ - --with-openjdk \ - --with-openjdk-home=$(abs_top_builddir)/$(BUILD_OUTPUT_DIR)/j2sdk-image \ + --with-openjdk=$(abs_top_builddir)/$(BUILD_OUTPUT_DIR)/j2sdk-image \ --enable-zero if ADD_SHARK_BUILD ADD_ZERO_CONFIGURE_ARGS += \ @@ -1800,8 +1799,7 @@ ADD_ZERO_CONFIGURE_ARGS += \ $(filter-out '--with-gcj-home=% '--with-ecj=% \ '--with-java=% '--with-javah=% \ '--with-rmic=% '--with-additional-vms=% \ - '--with-icedtea '--with-icedtea-home=% \ - '--with-openjdk '--with-openjdk-home=% , \ + '--with-openjdk '--with-openjdk=% , \ $(CONFIGURE_ARGS)) ADD_ZERO_EXTRA_BUILD_ENV = \ From bugzilla-daemon at icedtea.classpath.org Sat Jun 13 05:35:46 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 13 Jun 2009 12:35:46 +0000 Subject: [Bug 333] JVM crashes when try load LibGlade file Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=333 ------- Comment #2 from saulotoledo at gmail.com 2009-06-13 12:35 ------- Created an attachment (id=218) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=218&action=view) The JAVA/libglade source code who causes JAVA crashes -- 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 Jun 13 05:36:22 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 13 Jun 2009 12:36:22 +0000 Subject: [Bug 333] JVM crashes when try load LibGlade file Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=333 ------- Comment #3 from saulotoledo at gmail.com 2009-06-13 12:36 ------- Debian SID, and the following packages installed: libglade2-0 - 1:2.6.4-1 libglade2-dev - 1:2.6.4-1 libglade-cni - 2.12.8-6 libglade-java - 2.12.8-6 libglade-java-dev - 2.12.8-6 libglade-java-doc - 2.12.8-6 libglade-java-gcj - 2.12.8-6 libglade-jni - 2.12.8-6 libgladeui-1-9 - 3.6.3-1 The GTK+2 interface was built in glade, version 3.6.3-1 The basic JAVA packages installed: java-common - 0.32 java-gcj-compat - 1.0.80-5 java-gcj-compat-headless - 1.0.80-5 sun-java6-bin - 6-14-1 sun-java6-fonts - 6-14-1 sun-java6-Debian SID, and the following packages installed: libglade2-0 - 1:2.6.4-1 libglade2-dev - 1:2.6.4-1 libglade-cni - 2.12.8-6 libglade-java - 2.12.8-6 libglade-java-dev - 2.12.8-6 libglade-java-doc - 2.12.8-6 libglade-java-gcj - 2.12.8-6 libglade-jni - 2.12.8-6 libgladeui-1-9 - 3.6.3-1 The GTK+2 interface was built in glade, version 3.6.3-1 The basic JAVA packages installed: java-common - 0.32 java-gcj-compat - 1.0.80-5 java-gcj-compat-headless - 1.0.80-5 sun-java6-bin - 6-14-1 sun-java6-fonts - 6-14-1 sun-java6-javadb - 6-14-1 sun-java6-jdk - 6-14-1 sun-java6-jre - 6-14-1 sun-java6-source - 6-14-1 I'm attaching the full source code with problem. The Glade GTK interface file is at project directory with the name "MainApp.glade". This code was only a simple test, not a full application.javadb - 6-14-1 sun-java6-jdk - 6-14-1 sun-java6-jre - 6-14-1 sun-java6-source - 6-14-1 I'm attaching the full source code with problem. The Glade GTK interface file is at project directory with the name "MainApp.glade". This code was only a simple test, not a full application. -- 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 brcisna at eazylivin.net Sat Jun 13 14:33:53 2009 From: brcisna at eazylivin.net (Barry R Cisna) Date: Sat, 13 Jun 2009 16:33:53 -0500 Subject: 1.7.0 -icedtea - webmin ssl problem Message-ID: <1244928833.19553.6.camel@localhost.localdomain> Hello, Done a default install of FC8 which ships with java-1.7.0-icedtea and plugin. When trying to access both the Webmin module ssh/telnet and the File Manger (java applet) they both fail with ' start: applet initialzed failed'. If I disable ssl in the Webmin config,then the ssl/telnet applet does launch and run correctly but the File Manger applet still fails(gray background). Also I have tested this new install of FC8 on some known java test applets and only about half of the sites will open/run . The others simply come up to a blank page? FC8 java-1.7.0-icedtea firefox-2.0.2 Webmin-1.470(and Webmin 1.320)--rpms Thank You, Barry From bugzilla-daemon at icedtea.classpath.org Sun Jun 14 08:49:01 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 14 Jun 2009 15:49:01 +0000 Subject: [Bug 333] JVM crashes when try load LibGlade file Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=333 ------- Comment #4 from mark at klomp.org 2009-06-14 15:49 ------- Although your original comment suggests you are running IcedTea, your package list from comment #3 only shows the proprietary sun java installed. Please double check whether or not you are actually running icedtea/openjdk on the examples you show. How exactly do you run the example you attached in comment #3? A full command line would be helpful. I suspect this might just be buggy JNI glade code. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From mark at klomp.org Sun Jun 14 08:53:57 2009 From: mark at klomp.org (Mark Wielaard) Date: Sun, 14 Jun 2009 17:53:57 +0200 Subject: 1.7.0 -icedtea - webmin ssl problem In-Reply-To: <1244928833.19553.6.camel@localhost.localdomain> References: <1244928833.19553.6.camel@localhost.localdomain> Message-ID: <1244994837.3633.47.camel@hermans.wildebeest.org> Hi Barry, On Sat, 2009-06-13 at 16:33 -0500, Barry R Cisna wrote: > Done a default install of FC8 which ships with java-1.7.0-icedtea and > plugin. When trying to access both the Webmin module ssh/telnet and the > File Manger (java applet) they both fail with ' start: applet initialzed > failed'. If I disable ssl in the Webmin config,then the ssl/telnet > applet does launch and run correctly but the File Manger applet still > fails(gray background). Also I have tested this new install of FC8 on > some known java test applets and only about half of the sites will > open/run . The others simply come up to a blank page? > > FC8 > java-1.7.0-icedtea > firefox-2.0.2 > Webmin-1.470(and Webmin 1.320)--rpms This is a very old version. Could you possibly update and retry? Especially the plugin has seen many updates since the IcedTea version that went into Fedora 8 (which isn't being maintained anymore since it was released 2 years ago). Cheers, Mark From mark at klomp.org Sun Jun 14 09:02:17 2009 From: mark at klomp.org (Mark Wielaard) Date: Sun, 14 Jun 2009 18:02:17 +0200 Subject: Documentation, man pages, updates and sources (Was: On ecj and @Override annotations for interface methods) In-Reply-To: <48E5AF02.7060801@sun.com> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <17c6771e0809180426o5483138cnd801325aa004a7ee@mail.gmail.com> <1221737607.3256.22.camel@dijkstra.wildebeest.org> <20080918113722.GG10250@bamboo.destinee.acro.gen.nz> <1221738084.3256.24.camel@dijkstra.wildebeest.org> <1221739400.3256.34.camel@dijkstra.wildebeest.org> <48D263FD.1080702@sun.com> <1221748518.3256.59.camel@dijkstra.wildebeest.org> <48D2A430.2070903@sun.com> <1222164188.3178.42.camel@dijkstra.wildebeest.org> <48D8F940.40600@sun.com> <1222517020.22140.19.camel@hermans.wildebeest.org> <48E5AF02.7060801@sun.com> Message-ID: <1244995337.3633.52.camel@hermans.wildebeest.org> Hi Joe, On Thu, 2008-10-02 at 22:34 -0700, Joseph D. Darcy wrote: > Mark Wielaard wrote: > > On Tue, 2008-09-23 at 07:12 -0700, Joseph D. Darcy wrote: > > > >>> Are these manpages written by hand these days? It has a comment that > >>> says: "Generated by html2man", but it doesn't say what the original html > >>> file is that it was generated from. > >>> > >> The process used in the past for man pages was that the docs team works > >> with us developers to write the HTML man pages, which are in turn > >> converted to SGML and *roff for Solaris and Linux, respectively. It > >> looks like the last update to the HTML page, 6392810 "javac manpage > >> needs to be updated to include JSR 269 and other Mustang options," did > >> not get converted to the other formats. If the actual *nix man pages, > >> regardless of format, are supposed to be generated in this fashion, it > >> would admittedly be a better architecture to have them as generated > >> files during the build and not track all three versions of the man page > >> under version control. > > > > So if the preferred form of the for making modifications to these > > documents is the HTML or SGML version that the doc team maintains it > > would be good to get those in the openjdk tree. > > Agreed. > > > Does the documentation > > team maintain their own repository for these documents? > > Yes; at the moment there is a Sun-internal-only repository for these > documents. IMO, at least the master manpages should be moved to a > public repository for JDK 7 and the build rearranged so that the *roff > and SGML files are generated and not separated tracked under version > control. I'll broach this with the docs team for later in JDK 7. Any progress on this? I saw the following Fedora bug report: "wsgen man page errors" https://bugzilla.redhat.com/show_bug.cgi?id=477700 As the comments explain that is really hard to fix without the corresponding source code of the manual pages available. Thanks, Mark From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 05:18:09 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 12:18:09 +0000 Subject: [Bug 349] New: Font2DTest crash when using Range: Sinhala Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=349 Summary: Font2DTest crash when using Range: Sinhala Product: IcedTea Version: unspecified Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: xerxes at zafena.se The Font2DTest crashes when running Font2DTest and selecting Sinhala in the Range combobox in jni code. It aborts with glibc free(): invalid next size (fast) How to reproduce: 1. java -jar ../demo/jfc/Font2DTest/Font2DTest.jar 2. manually select Sinhala in the Range: combobox. 3. *crash* I have tested this with various jvm's on various platforms running Linux. Icedtea7/cacao ia32 , Icedtea6/hotspot ia32 , Icedtea6/zero arm -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 05:21:10 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 12:21:10 +0000 Subject: [Bug 349] Font2DTest crash when using Range: Sinhala Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=349 ------- Comment #1 from xerxes at zafena.se 2009-06-15 12:21 ------- Created an attachment (id=219) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=219&action=view) gdb backtrace -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 05:22:08 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 12:22:08 +0000 Subject: [Bug 349] Font2DTest crash when using Range: Sinhala Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=349 ------- Comment #2 from xerxes at zafena.se 2009-06-15 12:22 ------- Created an attachment (id=220) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=220&action=view) jvm output no regular jvm crash log where created instead this output are displayed. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 06:25:44 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 13:25:44 +0000 Subject: [Bug 333] JVM crashes when try load LibGlade file Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=333 ------- Comment #5 from saulotoledo at gmail.com 2009-06-15 13:25 ------- You're correct, this packages are installed: icedtea-6-jre-cacao openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib Uninstall them will remove hre this packages: azureus (<- I use this here...) ca-certificates-java I'm running the code from Eclipse 3.2.0 interface, created the project, the files and run. No changes at basic run config inside eclipse. -- 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 vogt at itwm.fraunhofer.de Mon Jun 15 10:14:27 2009 From: vogt at itwm.fraunhofer.de (Martin Vogt) Date: Mon, 15 Jun 2009 19:14:27 +0200 Subject: [BUG] icedTea and NO_PROXY settings. Message-ID: <4A368173.2060508@itwm.fraunhofer.de> Hello list, the recent icedtea versions evaluates proxy settings like: export HTTP_PROXY="http://squid.mydomain:1234/" But somehow it ignores the NO_PROXY settings in the system! export NO_PROXY="some.other.domain" As a result I can select: - edit "net.properties" to browse the applets on the internet - edit it again to use the ones behind the proxy. :( I think this is a bug. How can I fix this? regards, Martin From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 10:45:30 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 17:45:30 +0000 Subject: [Bug 350] New: Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 Summary: Shark on 32bit PPC truncates 3D linear algebra functions Product: IcedTea Version: unspecified Platform: Macintosh OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: xerxes at zafena.se When running some of the linear algebra 3D demo applets like the MoleculeViewer or WireFrame applet on Linux PPC/Shark the Matrix3d::* 3D calculation functions gets truncated after being compiled by shark. ./appletviewer ../demo/applets/MoleculeViewer/example1.html First when the applet starts up everything runs OK (fig 0) around 140 compiled methods Matrix3D::transfrom gets jitted and the nice molecule turns into a smashed pancake at the top of the window (fig 1) around 350 compiled methods Matrix3D::xrot and yrot gets jitted and the nice molecule turns into a ordered string of pearls (fig 2) around 400 compiled methods Matrix3D::scale gets jitted and the nice molecule starts walking away from the center and starts to behave like a Bose?Einstein condensate and soon leaves the screen (fig 3) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 10:50:48 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 17:50:48 +0000 Subject: [Bug 350] Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 ------- Comment #1 from xerxes at zafena.se 2009-06-15 17:50 ------- Created an attachment (id=221) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=221&action=view) fig 0_MoleculeViewer_PPC_all_OK.png -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 10:51:28 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 17:51:28 +0000 Subject: [Bug 350] Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 ------- Comment #2 from xerxes at zafena.se 2009-06-15 17:51 ------- Created an attachment (id=222) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=222&action=view) fig 1_MoleculeViewer_PPC_after_compile_of_Matrix3D::transform.png -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 10:51:54 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 17:51:54 +0000 Subject: [Bug 350] Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 ------- Comment #3 from xerxes at zafena.se 2009-06-15 17:51 ------- Created an attachment (id=223) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=223&action=view) fig 2_MoleculeViewer_PPC_after_compile_of_Matrix3D::xrot_and_yrot.png -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 10:52:15 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 17:52:15 +0000 Subject: [Bug 350] Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 ------- Comment #4 from xerxes at zafena.se 2009-06-15 17:52 ------- Created an attachment (id=224) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=224&action=view) fig 3_MoleculeViewer_PPC_after_compile_of_Matrix3D::scale.png -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Jun 15 11:31:17 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Jun 2009 18:31:17 +0000 Subject: [Bug 350] Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 ------- Comment #5 from xerxes at zafena.se 2009-06-15 18:31 ------- This bugreport have been generated using java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.5-r0b4d2e77cf97) (build 1.6.0_0-b16) OpenJDK Shark VM (build 14.0-b15, mixed mode) LLVM 2.5 PPC PowerBook G4 with CPU 7447A, altivec supported Fedora 10 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Mon Jun 15 12:43:01 2009 From: langel at redhat.com (Lillian Angel) Date: Mon, 15 Jun 2009 19:43:01 +0000 Subject: changeset in /hg/icedtea6: 2009-06-15 Lillian Angel changeset b88686f19b34 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b88686f19b34 description: 2009-06-15 Lillian Angel * Makefile.am (ICEDTEA_PATCHES): Removed icedtea-demos.patch from the list. * patches/icedtea-demos.patch: Removed. Demo jars are built fine upstream. diffstat: 3 files changed, 7 insertions(+), 324 deletions(-) ChangeLog | 7 Makefile.am | 1 patches/icedtea-demos.patch | 323 ------------------------------------------- diffs (352 lines): diff -r a5464a5c3e45 -r b88686f19b34 ChangeLog --- a/ChangeLog Fri Jun 12 19:20:11 2009 +0200 +++ b/ChangeLog Mon Jun 15 15:44:37 2009 -0400 @@ -1,3 +1,10 @@ 2009-06-12 Matthias Klose + + * Makefile.am + (ICEDTEA_PATCHES): Removed icedtea-demos.patch from the list. + * patches/icedtea-demos.patch: Removed. Demo jars are built fine + upstream. + 2009-06-12 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Use --with-openjdk only. diff -r a5464a5c3e45 -r b88686f19b34 Makefile.am --- a/Makefile.am Fri Jun 12 19:20:11 2009 +0200 +++ b/Makefile.am Mon Jun 15 15:44:37 2009 -0400 @@ -520,7 +520,6 @@ ICEDTEA_PATCHES = \ patches/icedtea-webstart-umask.patch \ patches/icedtea-rmi_amd64.patch \ patches/icedtea-tools.patch \ - patches/icedtea-demos.patch \ patches/icedtea-timezone.patch \ patches/icedtea-use-system-tzdata.patch \ patches/icedtea-headers.patch \ diff -r a5464a5c3e45 -r b88686f19b34 patches/icedtea-demos.patch --- a/patches/icedtea-demos.patch Fri Jun 12 19:20:11 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,323 +0,0 @@ ---- openjdkb18/jdk/src/share/demo/jvmti/gctest/sample.makefile.txt 2007-08-16 03:33:19.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/gctest/sample.makefile.txt 2007-08-23 16:12:59.000000000 -0400 -@@ -43,7 +43,7 @@ - - # Source lists - LIBNAME=gctest --SOURCES=gctest.c ../agent_util/agent_util.c -+SOURCES=gctest.c ../../agent_util/src/agent_util.c - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -89,7 +89,7 @@ - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -+ LIBRARY=../lib/lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text - # Libraries we are dependent on - LIBRARIES=-lc -@@ -122,7 +122,7 @@ - - # Common -I options - CFLAGS += -I. --CFLAGS += -I../agent_util -+CFLAGS += -I../../agent_util/src - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - - # Default rule ---- openjdkb18/jdk/src/share/demo/jvmti/heapTracker/sample.makefile.txt 2007-08-16 03:33:20.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/heapTracker/sample.makefile.txt 2007-08-24 15:15:40.000000000 -0400 -@@ -41,13 +41,15 @@ - # - ######################################################################## - -+JAVA_CRW_DEMO=../../java_crw_demo/src/libjava_crw_demo.so -+ - # Source lists - LIBNAME=heapTracker --SOURCES=heapTracker.c ../agent_util/agent_util.c -+SOURCES=heapTracker.c ../../agent_util/src/agent_util.c - JAVA_SOURCES=HeapTracker.java - - # Name of jar file that needs to be created --JARFILE=heapTracker.jar -+JARFILE=../heapTracker.jar - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -93,10 +95,10 @@ - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -+ LIBRARY=../lib/lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text - # Libraries we are dependent on -- LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc -+ LIBRARIES=-L../../java_crw_demo/src/ -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ - endif -@@ -128,15 +130,18 @@ - - # Common -I options - CFLAGS += -I. --CFLAGS += -I../agent_util --CFLAGS += -I../java_crw_demo -+CFLAGS += -I../../agent_util/src -+CFLAGS += -I../../java_crw_demo/src - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - - # Default rule (build both native library and jar file) - all: $(LIBRARY) $(JARFILE) - -+$(JAVA_CRW_DEMO): -+ make JDK=$(JDK) OSNAME=$(OSNAME) -C ../../java_crw_demo/src -f sample.makefile.txt -+ - # Build native library --$(LIBRARY): $(OBJECTS) -+$(LIBRARY): $(OBJECTS) $(JAVA_CRW_DEMO) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - - # Build jar file ---- openjdkb18/jdk/src/share/demo/jvmti/heapViewer/sample.makefile.txt 2007-08-16 03:33:20.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/heapViewer/sample.makefile.txt 2007-08-23 16:13:00.000000000 -0400 -@@ -43,7 +43,7 @@ - - # Source lists - LIBNAME=heapViewer --SOURCES=heapViewer.c ../agent_util/agent_util.c -+SOURCES=heapViewer.c ../../agent_util/src/agent_util.c - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -89,7 +89,7 @@ - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -+ LIBRARY=../lib/lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text - # Libraries we are dependent on - LIBRARIES=-lc -@@ -123,6 +123,7 @@ - # Common -I options - CFLAGS += -I. - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) -+CFLAGS += -I../../agent_util/src - - # Default rule - all: $(LIBRARY) ---- openjdkb18/jdk/src/share/demo/jvmti/hprof/sample.makefile.txt 2007-08-16 03:33:21.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/hprof/sample.makefile.txt 2007-08-23 16:12:58.000000000 -0400 -@@ -73,7 +73,7 @@ - JAVA_SOURCES=Tracker.java - - # Name of jar file that needs to be created --#JARFILE=hprof.jar -+JARFILE=../hprof.jar - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -110,7 +110,7 @@ - # Linux GNU C Compiler - ifeq ($(OSNAME), linux) - # GNU Compiler options needed to build it -- COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer -+ COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer -DSKIP_NPT - # Options that help find errors - COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses - # To allow access to dladdr() -@@ -166,7 +166,7 @@ - - # Common -I options - CFLAGS += -I. --CFLAGS += -I../java_crw_demo -+CFLAGS += -I../../java_crw_demo/src - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - - # Default rule (build both native library and jar file) ---- openjdkb18/jdk/src/share/demo/jvmti/minst/sample.makefile.txt 2007-08-16 03:33:21.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/minst/sample.makefile.txt 2007-08-24 15:16:17.000000000 -0400 -@@ -41,13 +41,15 @@ - # - ######################################################################## - -+JAVA_CRW_DEMO=../../java_crw_demo/src/libjava_crw_demo.so -+ - # Source lists - LIBNAME=minst --SOURCES=minst.c ../agent_util/agent_util.c -+SOURCES=minst.c ../../agent_util/src/agent_util.c - JAVA_SOURCES=Minst.java - - # Name of jar file that needs to be created --JARFILE=minst.jar -+JARFILE=../minst.jar - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -93,10 +95,10 @@ - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -+ LIBRARY=../lib/lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text - # Libraries we are dependent on -- LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc -+ LIBRARIES=-L../../java_crw_demo/src/ -ljava_crw_demo -lc - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ - endif -@@ -128,15 +130,18 @@ - - # Common -I options - CFLAGS += -I. --CFLAGS += -I../agent_util --CFLAGS += -I../java_crw_demo -+CFLAGS += -I../../agent_util/src -+CFLAGS += -I../../java_crw_demo/src - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - - # Default rule (build both native library and jar file) - all: $(LIBRARY) $(JARFILE) - -+$(JAVA_CRW_DEMO): -+ make JDK=$(JDK) OSNAME=$(OSNAME) -C ../../java_crw_demo/src -f sample.makefile.txt -+ - # Build native library --$(LIBRARY): $(OBJECTS) -+$(LIBRARY): $(OBJECTS) $(JAVA_CRW_DEMO) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - - # Build jar file ---- openjdkb18/jdk/src/share/demo/jvmti/mtrace/sample.makefile.txt 2007-08-16 03:33:21.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/mtrace/sample.makefile.txt 2007-08-24 15:16:01.000000000 -0400 -@@ -41,13 +41,15 @@ - # - ######################################################################## - -+JAVA_CRW_DEMO=../../java_crw_demo/src/libjava_crw_demo.so -+ - # Source lists - LIBNAME=mtrace --SOURCES=mtrace.c ../agent_util/agent_util.c -+SOURCES=mtrace.c ../../agent_util/src/agent_util.c - JAVA_SOURCES=Mtrace.java - - # Name of jar file that needs to be created --JARFILE=mtrace.jar -+JARFILE=../mtrace.jar - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -93,10 +95,11 @@ - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -+ LIBRARY=../lib/lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text - # Libraries we are dependent on -- LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc -+ LIBRARIES=-L../../java_crw_demo/src -ljava_crw_demo -lc -+ - # Building a shared library - LINK_SHARED=$(LINK.c) -shared -o $@ - endif -@@ -128,15 +131,18 @@ - - # Common -I options - CFLAGS += -I. --CFLAGS += -I../agent_util --CFLAGS += -I../java_crw_demo -+CFLAGS += -I../../agent_util/src -+CFLAGS += -I../../java_crw_demo/src - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - - # Default rule (build both native library and jar file) - all: $(LIBRARY) $(JARFILE) - -+$(JAVA_CRW_DEMO): -+ make JDK=$(JDK) OSNAME=$(OSNAME) -C ../../java_crw_demo/src -f sample.makefile.txt -+ - # Build native library --$(LIBRARY): $(OBJECTS) -+$(LIBRARY): $(OBJECTS) $(JAVA_CRW_DEMO) - $(LINK_SHARED) $(OBJECTS) $(LIBRARIES) - - # Build jar file ---- openjdkb18/jdk/src/share/demo/jvmti/versionCheck/sample.makefile.txt 2007-08-16 03:33:21.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/versionCheck/sample.makefile.txt 2007-08-23 16:12:58.000000000 -0400 -@@ -1,4 +1,4 @@ --# -+ - # Copyright 2004-2005 Sun Microsystems, Inc. All Rights Reserved. - # - # Redistribution and use in source and binary forms, with or without -@@ -43,7 +43,7 @@ - - # Source lists - LIBNAME=versionCheck --SOURCES=versionCheck.c ../agent_util/agent_util.c -+SOURCES=versionCheck.c ../../agent_util/src/agent_util.c - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -89,7 +89,7 @@ - # Object files needed to create library - OBJECTS=$(SOURCES:%.c=%.o) - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -+ LIBRARY=../lib/lib$(LIBNAME).so - LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text - # Libraries we are dependent on - LIBRARIES=-lc -@@ -122,7 +122,7 @@ - - # Common -I options - CFLAGS += -I. --CFLAGS += -I../agent_util -+CFLAGS += -I../../agent_util/src - CFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - - # Default rule ---- openjdkb18/jdk/src/share/demo/jvmti/waiters/sample.makefile.txt 2007-08-16 03:33:21.000000000 -0400 -+++ openjdk/jdk/src/share/demo/jvmti/waiters/sample.makefile.txt 2007-08-23 16:13:06.000000000 -0400 -@@ -43,7 +43,7 @@ - - # Source lists - LIBNAME=waiters --SOURCES=waiters.cpp Agent.cpp Thread.cpp Monitor.cpp ../agent_util/agent_util.c -+SOURCES=waiters.cpp Agent.cpp Thread.cpp Monitor.cpp - - # Solaris Sun C Compiler Version 5.5 - ifeq ($(OSNAME), solaris) -@@ -89,9 +89,10 @@ - endif - # Object files needed to create library - OBJECTS=$(SOURCES:%.cpp=%.o) -+ OBJECTS+=../../agent_util/src/agent_util.o - # Library name and options needed to build it -- LIBRARY=lib$(LIBNAME).so -- LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text -+ LIBRARY=../lib/lib$(LIBNAME).so -+ LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc - # Libraries we are dependent on - LIBRARIES= - # Building a shared library -@@ -123,9 +124,10 @@ - - # Common -I options - CXXFLAGS += -I. --CXXFLAGS += -I../agent_util -+CXXFLAGS += -I../../agent_util/src - CXXFLAGS += -I$(JDK)/include -I$(JDK)/include/$(OSNAME) - -+CFLAGS = $(CXXFLAGS) - # Default rule - all: $(LIBRARY) - From omajid at redhat.com Mon Jun 15 13:38:54 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 15 Jun 2009 16:38:54 -0400 Subject: RFC: Netx - Fix service exceptions thrown by the proxy Message-ID: <4A36B15E.9060200@redhat.com> Hi, Netx uses dynamic proxies to wrap all calls to the various JNLP services and run them in privileged mode. If any method called throws an exception, it is wrapped in a InvocationTargetException. And then in a PrivilegedActionException. Now a client JNLP program doesnt know (and shouldnt know!) that we are using proxies. So it gets a totally unexpected exception and cant deal with the situation properly. [1] describes the bug in much more detail. The attached patch fixes the problem by throwing the exception that caused the problem. ChangeLog: 2009-10-15 Omair Majid * rt/net/sourceforge/jnlp/services/ServiceUtil.java: (invoke): Throw the exception that caused the problem. [1] http://benpryor.com/blog/2006/08/15/java-dynamic-proxies-and-invocationtargetexception/ -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-unwrap-proxy-exceptions.patch Type: text/x-patch Size: 1340 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090615/4ad6d698/netx-unwrap-proxy-exceptions.patch From omajid at redhat.com Mon Jun 15 14:05:47 2009 From: omajid at redhat.com (Omair Majid) Date: Mon, 15 Jun 2009 17:05:47 -0400 Subject: RFC: Netx - Add interfaces required for single instance jnlp applications Message-ID: <4A36B7AB.3050606@redhat.com> Hi, The attached patch adds the two javax.jnlp interfaces that are required by programs that want to make sure that only one instance of an application is ever running. While these interfaces dont do anything, they are enough to get a few applications (like SweetHome3D) running. ChangeLog: 2009-10-15 Omair Majid * rt/javax/jnlp/SingleInstanceListener.java: New file. * rt/javax/jnlp/SingleInstanceService.java: New file. Any Comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-single-instance-classes.patch Type: text/x-patch Size: 1466 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090615/62d319a7/netx-single-instance-classes.patch From Joe.Darcy at Sun.COM Mon Jun 15 14:45:12 2009 From: Joe.Darcy at Sun.COM (Joe Darcy) Date: Mon, 15 Jun 2009 14:45:12 -0700 Subject: RFC: Make javax.jnlp package visible to javac In-Reply-To: <4A292042.50908@redhat.com> References: <4A2817A3.2070807@redhat.com> <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> <4A292042.50908@redhat.com> Message-ID: <4A36C0E8.4040700@sun.com> Omair Majid wrote: > Andrew John Hughes wrote: >> 2009/6/4 Omair Majid : >>> Hi, >>> >>> Sun's documentation states that javac should be able to compile >>> code that uses javax.jnlp once jnlp.jar is added to the classpath >>> [1]. IcedTea6, however, has no jnlp.jar, and javax.jnlp.* classes >>> are already in rt.jar. It turns out that you have to use 'javac >>> -XDignore.symbol.file OnlineTest.java' for this to work [2]. >>> >>> The attached patch adds javax.jnlp to NON_CORE_PKGS list, making >>> it visible to javac. >>> >>> ChangeLog: 2009-06-04 Omair Majid >>> >>> * patches/icedtea-webstart.patch: Make javax.jnlp classes >>> visible. >>> >>> Ok to commit? >>> >>> Cheers, Omair >>> >>> >>> [1] >>> http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/examples.html#Introduction >>> >>> >>> [2] http://andrew-haley.livejournal.com/695.html >>> >> >> Looks good to me (though seems strange the Makefile is under >> docs...). > I could move the Makefile in the patch ;) > >> >> Did we ever work out if there was a good reason for keeping this >> symbol mapping stuff? > > Nothing formally. If I recall correctly, Andrew Haley mentioned that > it might make javac faster. Presumably anything not visible to javac > is not really part of the Java API and there should be no need for > programmers to use those classes (but this doesnt hold true for some > parts of IcedTea). > > Cheers, Omair Hello. The ct.sym file is a mechanism used be javac for a variety of reasons, including to serve as a stepping stone toward modules. Peter Ahe wrote about it his blog entry: http://blogs.sun.com/ahe/entry/b86_compiler_fixes > "Finally, I would like to mention that we have made a great > improvement for cross-platform compatibility. Previously, all > packages in rt.jar are visible at compile time. However, many of the > packages in that file are Sun proprietary unsupported implementation > details. Some come to mistakenly rely on this which can cause > problems when upgrading from one version of Sun's JDK to another (as > we don't make any guarantees). Also, it can cause problems when > running on other vendors' platforms as they might not have these > classes. > > To address this problem, undocumented packages (that are new in > Mustang) will not be visible at compile time. For example, while the > package sun.reflect.misc is in rt.jar, javac will not be able to see > it. Later we hope to emit warnings for packages that are undocumented > but visible because of legacy from older releases. For example, the > package sun.io will remain visible but use of it may lead to a > warning. > > To hide these packages, javac will not be reading rt.jar anymore. > Instead it will read a symbol file (in some unsupported unspecified > format: we are planning on adding a real module system in Dolphin). > This symbol file idea was pioneered by Tom Ball to speed up > compilation (and save memory). However, while this helps in scenarios > like app servers, Jackpot, and NetBeans, it may not do much for > regular batch compilations. Once we have done some profiling of the > file manager in javac, I hope it will be much faster than the Tiger > version." -Joe From bugzilla-daemon at icedtea.classpath.org Tue Jun 16 01:01:09 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Jun 2009 08:01:09 +0000 Subject: [Bug 350] Shark on 32bit PPC truncates 3D linear algebra functions Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=350 gbenson at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|gbenson at redhat.com |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Jun 16 01:03:53 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Jun 2009 08:03:53 +0000 Subject: [Bug 351] New: Spontaneous crashes in rawhide Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=351 Summary: Spontaneous crashes in rawhide Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: linuxhippy at gmail.com I see random crashes with IcedTea since I've updated to Rawhide, sometimes crashes at startup, sometimes when running Azureaus for a long time. The problem seems to get worse when the system has been running for some time, in one case I couldn't even start Eclipse, it always stopped with "Aborted" and one time generated a hs_err file. The first hs_err_file was created when starting java2Demo crashed (in 95% I simply got "Aborted"), the second when eclipse died during startup with the same behaviour. java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.5) (fedora-23.b16.fc12-i386) OpenJDK Server VM (build 14.0-b15, mixed mode) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Jun 16 01:04:12 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Jun 2009 08:04:12 +0000 Subject: [Bug 351] Spontaneous crashes in rawhide Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=351 ------- Comment #1 from linuxhippy at gmail.com 2009-06-16 08:04 ------- Created an attachment (id=225) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=225&action=view) Crash when starting Java2Demo -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Jun 16 01:04:37 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Jun 2009 08:04:37 +0000 Subject: [Bug 351] Spontaneous crashes in rawhide Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=351 ------- Comment #2 from linuxhippy at gmail.com 2009-06-16 08:04 ------- Created an attachment (id=226) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=226&action=view) Crash starting Eclipse-3.4 -- 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 fweimer at bfk.de Tue Jun 16 02:05:57 2009 From: fweimer at bfk.de (Florian Weimer) Date: Tue, 16 Jun 2009 11:05:57 +0200 Subject: RFC: Make javax.jnlp package visible to javac In-Reply-To: <4A36C0E8.4040700@sun.com> (Joe Darcy's message of "Mon\, 15 Jun 2009 14\:45\:12 -0700") References: <4A2817A3.2070807@redhat.com> <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> <4A292042.50908@redhat.com> <4A36C0E8.4040700@sun.com> Message-ID: <823aa0y2dm.fsf@mid.bfk.de> * Joe Darcy: > The ct.sym file is a mechanism used be javac for a variety of reasons, > including to serve as a stepping stone toward modules. Peter Ahe wrote > about it his blog entry: > http://blogs.sun.com/ahe/entry/b86_compiler_fixes Will you accept patches which move particularly useful functionality (the base64 decoder comes to my mind, or the X500Name class and other ASN.1-related helpers) to com.sun.* or javax.*? -- Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra?e 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99 From ahughes at redhat.com Tue Jun 16 03:03:28 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 16 Jun 2009 10:03:28 +0000 Subject: changeset in /hg/icedtea: Bump to b60. Message-ID: changeset 8e5de53d67cd in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8e5de53d67cd description: Bump to b60. 2009-06-11 Andrew John Hughes * patches/hotspot/default/icedtea-debuginfo.patch, * patches/icedtea-debuginfo.patch, * patches/icedtea-javac-debuginfo.patch: Removed, replaced by aph's upstream patches. * Makefile.am: Bump to b60, turn on DEBUG_CLASSFILES and DEBUG_BINARIES. * patches/ecj/icedtea.patch, * patches/hotspot/default/icedtea-zero-build.patch: Rerolled. diffstat: 7 files changed, 116 insertions(+), 282 deletions(-) ChangeLog | 12 ++ Makefile.am | 45 ++++--- patches/ecj/icedtea.patch | 126 +++++++++++----------- patches/hotspot/default/icedtea-debuginfo.patch | 15 -- patches/hotspot/default/icedtea-zero-build.patch | 34 ++--- patches/icedtea-debuginfo.patch | 64 ----------- patches/icedtea-javac-debuginfo.patch | 102 ----------------- diffs (truncated from 756 to 500 lines): diff -r f95ae75a68c6 -r 8e5de53d67cd ChangeLog --- a/ChangeLog Thu Jun 11 22:40:38 2009 +0100 +++ b/ChangeLog Tue Jun 16 11:04:53 2009 +0100 @@ -1,3 +1,15 @@ 2009-06-11 Andrew John Hughes + + * patches/hotspot/default/icedtea-debuginfo.patch, + * patches/icedtea-debuginfo.patch, + * patches/icedtea-javac-debuginfo.patch: + Removed, replaced by aph's upstream patches. + * Makefile.am: + Bump to b60, turn on DEBUG_CLASSFILES and DEBUG_BINARIES. + * patches/ecj/icedtea.patch, + * patches/hotspot/default/icedtea-zero-build.patch: + Rerolled. + 2009-06-11 Andrew John Hughes * configure.ac: diff -r f95ae75a68c6 -r 8e5de53d67cd Makefile.am --- a/Makefile.am Thu Jun 11 22:40:38 2009 +0100 +++ b/Makefile.am Tue Jun 16 11:04:53 2009 +0100 @@ -1,20 +1,20 @@ OPENJDK_VERSION = b59 -OPENJDK_VERSION = b59 - -OPENJDK_CHANGESET = 0d76c4da605f -CORBA_CHANGESET = e9ba2b962ddf -JAXP_CHANGESET = 748976d69503 -JAXWS_CHANGESET = faac46e2e60f -JDK_CHANGESET = 3d024b86523a -LANGTOOLS_CHANGESET = 0f653be1a42f -HOTSPOT_CHANGESET = aa0c48844632 - -OPENJDK_MD5SUM = 51beb96e5d6bc4b875b4316f4ef724d7 -CORBA_MD5SUM = 13b64a402845a469cae31e04ffc5ee80 -JAXP_MD5SUM = 18c922319545d7e907a2d6cbb265865d -JAXWS_MD5SUM = b2c0a779e349f82427a78485ef53321b -JDK_MD5SUM = 16f6bbc35c99de1996b545b6b500f668 -LANGTOOLS_MD5SUM = ccad721f71ab49a61bbf684039b4d55d -HOTSPOT_MD5SUM = c40c25a481a1c33ac15a89812a0b9f8c +OPENJDK_VERSION = b60 + +OPENJDK_CHANGESET = 472c21584cfd +CORBA_CHANGESET = e906b16a12a9 +JAXP_CHANGESET = f1ac756616ea +JAXWS_CHANGESET = 55ffcbca5f46 +JDK_CHANGESET = 1a01c90431a7 +LANGTOOLS_CHANGESET = 522520757dd3 +HOTSPOT_CHANGESET = 86092459c54d + +OPENJDK_MD5SUM = 9f5e15067cf5207760a83cea8ba41da8 +CORBA_MD5SUM = 7f00e0b5d16046d116cd53c9f43c7122 +JAXP_MD5SUM = 2de0ec54014eb7f25c811e40fc2e3e3f +JAXWS_MD5SUM = 9c0131755eefaa929ca8e47abe21cc58 +JDK_MD5SUM = 1fd637880521f3e2c274a1db8bfed89b +LANGTOOLS_MD5SUM = e7c0ac7a9d67d361cc64fc15312d4a85 +HOTSPOT_MD5SUM = 18c922319545d7e907a2d6cbb265865d CACAO_VERSION = 0.99.4 CACAO_MD5SUM = 63220327925ace13756ae334c55a3baa @@ -1571,7 +1571,9 @@ ICEDTEA_ENV = \ "DISTRIBUTION_ID=$(DIST_ID)" \ "ALT_JIBX_LIBS_PATH=$(JIBX_DEPS_DIR)" \ "ALT_NETX_DIST=$(abs_top_builddir)/netx.build" \ - "ALT_LIVECONNECT_DIST=$(abs_top_builddir)" + "ALT_LIVECONNECT_DIST=$(abs_top_builddir)" \ + "DEBUG_CLASSFILES=true" \ + "DEBUG_BINARIES=true" if WITH_CACAO ICEDTEA_ENV += \ @@ -1655,7 +1657,9 @@ ICEDTEA_ENV_ECJ = \ "JAR_ACCEPTS_STDIN_LIST=$(JAR_ACCEPTS_STDIN_LIST)" \ "DISABLE_NIMBUS=true" \ "ALT_NETX_DIST=$(abs_top_builddir)/netx.build" \ - "ALT_LIVECONNECT_DIST=$(abs_top_builddir)" + "ALT_LIVECONNECT_DIST=$(abs_top_builddir)" \ + "DEBUG_CLASSFILES=true" \ + "DEBUG_BINARIES=true" if WITH_CACAO ICEDTEA_ENV_ECJ += \ @@ -1997,8 +2001,6 @@ ICEDTEA_PATCHES = \ patches/icedtea-copy-plugs.patch \ patches/hotspot/$(HSBUILD)/icedtea-text-relocations.patch \ patches/icedtea-graphics.patch \ - patches/icedtea-debuginfo.patch \ - patches/hotspot/$(HSBUILD)/icedtea-debuginfo.patch \ patches/icedtea-ssl.patch \ $(PLUGIN_PATCH) \ patches/icedtea-webstart.patch \ @@ -2051,7 +2053,6 @@ ICEDTEA_PATCHES = \ patches/icedtea-signed-types.patch \ patches/icedtea-lc_ctype.patch \ patches/icedtea-messageutils.patch \ - patches/icedtea-javac-debuginfo.patch \ patches/icedtea-xjc.patch \ patches/icedtea-renderer-crossing.patch \ patches/icedtea-tests-jdk.patch \ diff -r f95ae75a68c6 -r 8e5de53d67cd patches/ecj/icedtea.patch --- a/patches/ecj/icedtea.patch Thu Jun 11 22:40:38 2009 +0100 +++ b/patches/ecj/icedtea.patch Tue Jun 16 11:04:53 2009 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk-ecj.orig/corba/make/co diff -Nru openjdk-ecj.orig/corba/make/com/sun/corba/se/Makefile openjdk-ecj/corba/make/com/sun/corba/se/Makefile --- openjdk-ecj.orig/corba/make/com/sun/corba/se/Makefile 2009-03-30 17:13:01.000000000 +0100 -+++ openjdk-ecj/corba/make/com/sun/corba/se/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/corba/make/com/sun/corba/se/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -42,7 +42,7 @@ # the rmic iiop backend needs some classes that are part of the impl/util # package. These classes use log wrappers, so they must be built after @@ -54,7 +54,7 @@ diff -Nru openjdk-ecj.orig/corba/make/co +include $(BUILDDIR)/common/Classes.gmk diff -Nru openjdk-ecj.orig/corba/make/common/Defs.gmk openjdk-ecj/corba/make/common/Defs.gmk --- openjdk-ecj.orig/corba/make/common/Defs.gmk 2009-03-30 17:13:01.000000000 +0100 -+++ openjdk-ecj/corba/make/common/Defs.gmk 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/corba/make/common/Defs.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -53,6 +53,13 @@ _OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH) @@ -88,8 +88,8 @@ diff -Nru openjdk-ecj.orig/corba/make/co vpath %.java $(VPATH.java) vpath %.class $(CLASSBINDIR) diff -Nru openjdk-ecj.orig/corba/make/common/Defs-linux.gmk openjdk-ecj/corba/make/common/Defs-linux.gmk ---- openjdk-ecj.orig/corba/make/common/Defs-linux.gmk 2009-05-28 03:44:57.000000000 +0100 -+++ openjdk-ecj/corba/make/common/Defs-linux.gmk 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/corba/make/common/Defs-linux.gmk 2009-06-15 17:14:30.000000000 +0100 ++++ openjdk-ecj/corba/make/common/Defs-linux.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -276,7 +276,7 @@ fi; \ done) @@ -101,7 +101,7 @@ diff -Nru openjdk-ecj.orig/corba/make/co # We want to privatize JVM symbols on Solaris. This is so the user can diff -Nru openjdk-ecj.orig/corba/make/common/Rules.gmk openjdk-ecj/corba/make/common/Rules.gmk --- openjdk-ecj.orig/corba/make/common/Rules.gmk 2009-03-30 23:07:09.000000000 +0100 -+++ openjdk-ecj/corba/make/common/Rules.gmk 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/corba/make/common/Rules.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -201,8 +201,10 @@ $(ECHO) "# Java sources to be compiled: (listed in file $(JAVA_SOURCE_LIST))"; \ $(CAT) $(JAVA_SOURCE_LIST); \ @@ -116,9 +116,9 @@ diff -Nru openjdk-ecj.orig/corba/make/co @$(java-vm-cleanup) diff -Nru openjdk-ecj.orig/corba/make/common/shared/Defs-java.gmk openjdk-ecj/corba/make/common/shared/Defs-java.gmk ---- openjdk-ecj.orig/corba/make/common/shared/Defs-java.gmk 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/corba/make/common/shared/Defs-java.gmk 2009-05-28 09:03:57.000000000 +0100 -@@ -113,31 +113,14 @@ +--- openjdk-ecj.orig/corba/make/common/shared/Defs-java.gmk 2009-03-30 23:07:09.000000000 +0100 ++++ openjdk-ecj/corba/make/common/shared/Defs-java.gmk 2009-06-15 17:19:32.000000000 +0100 +@@ -120,31 +120,14 @@ JAVACFLAGS += $(OTHER_JAVACFLAGS) # Needed for javah @@ -158,7 +158,7 @@ diff -Nru openjdk-ecj.orig/corba/make/co ifdef JAVAC diff -Nru openjdk-ecj.orig/corba/make/org/omg/sources/Makefile openjdk-ecj/corba/make/org/omg/sources/Makefile --- openjdk-ecj.orig/corba/make/org/omg/sources/Makefile 2009-03-30 17:13:01.000000000 +0100 -+++ openjdk-ecj/corba/make/org/omg/sources/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/corba/make/org/omg/sources/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -93,8 +93,6 @@ POAHELHOLFILES = $(POA_GENERATED_HELP_HOL_java:%=$(GENSRCDIR)/%) @@ -237,7 +237,7 @@ diff -Nru openjdk-ecj.orig/corba/make/or diff -Nru openjdk-ecj.orig/corba/make/sun/rmi/corbalogsources/Makefile openjdk-ecj/corba/make/sun/rmi/corbalogsources/Makefile --- openjdk-ecj.orig/corba/make/sun/rmi/corbalogsources/Makefile 2009-03-30 23:07:09.000000000 +0100 -+++ openjdk-ecj/corba/make/sun/rmi/corbalogsources/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/corba/make/sun/rmi/corbalogsources/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -172,7 +172,6 @@ ACTIVATIONFILES = $(com_sun_corba_se_spi_activation_java:%=$(GENSRCDIR)/%) @@ -255,8 +255,8 @@ diff -Nru openjdk-ecj.orig/corba/make/su portableactivation.idl.compile: $(PORTABLEACTIVATIONFILES) diff -Nru openjdk-ecj.orig/jaxp/make/build.xml openjdk-ecj/jaxp/make/build.xml ---- openjdk-ecj.orig/jaxp/make/build.xml 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jaxp/make/build.xml 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jaxp/make/build.xml 2009-06-15 14:57:04.000000000 +0100 ++++ openjdk-ecj/jaxp/make/build.xml 2009-06-15 17:21:10.000000000 +0100 @@ -71,7 +71,10 @@ -@@ -86,6 +89,8 @@ +@@ -86,7 +89,9 @@ memoryInitialSize="${javac.memoryInitialSize}" memoryMaximumSize="${javac.memoryMaximumSize}" - target="${javac.target}" + debug="${javac.debug}" +- target="${javac.target}"> ++ target="${javac.target}" + executable="${javac.executable}" -+ source="1.5" - debug="${javac.debug}"> ++ source="1.5"> + diff -Nru openjdk-ecj.orig/jaxp/make/Makefile openjdk-ecj/jaxp/make/Makefile ---- openjdk-ecj.orig/jaxp/make/Makefile 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jaxp/make/Makefile 2009-05-28 09:03:57.000000000 +0100 -@@ -75,7 +75,7 @@ +--- openjdk-ecj.orig/jaxp/make/Makefile 2009-06-15 17:14:26.000000000 +0100 ++++ openjdk-ecj/jaxp/make/Makefile 2009-06-15 17:19:32.000000000 +0100 +@@ -84,7 +84,7 @@ endif ifdef ALT_BOOTDIR @@ -291,9 +293,9 @@ diff -Nru openjdk-ecj.orig/jaxp/make/Mak ifdef ALT_OUTPUTDIR diff -Nru openjdk-ecj.orig/jaxws/make/build.properties openjdk-ecj/jaxws/make/build.properties ---- openjdk-ecj.orig/jaxws/make/build.properties 2009-05-28 03:44:57.000000000 +0100 -+++ openjdk-ecj/jaxws/make/build.properties 2009-05-28 09:03:57.000000000 +0100 -@@ -37,7 +37,7 @@ +--- openjdk-ecj.orig/jaxws/make/build.properties 2009-06-15 17:14:30.000000000 +0100 ++++ openjdk-ecj/jaxws/make/build.properties 2009-06-15 17:19:32.000000000 +0100 +@@ -36,7 +36,7 @@ # set the following to -version to verify the versions of javac being used javac.version.opt = # in time, there should be no exceptions to -Xlint:all @@ -303,8 +305,8 @@ diff -Nru openjdk-ecj.orig/jaxws/make/bu # JVM memory size javac.memoryInitialSize = 128m diff -Nru openjdk-ecj.orig/jaxws/make/build.xml openjdk-ecj/jaxws/make/build.xml ---- openjdk-ecj.orig/jaxws/make/build.xml 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jaxws/make/build.xml 2009-05-28 09:05:20.000000000 +0100 +--- openjdk-ecj.orig/jaxws/make/build.xml 2009-06-15 14:57:13.000000000 +0100 ++++ openjdk-ecj/jaxws/make/build.xml 2009-06-15 17:22:06.000000000 +0100 @@ -93,7 +93,10 @@ + excludes="com/sun/tools/internal/txw2/**" + source="1.5"> @@ -334,9 +336,9 @@ diff -Nru openjdk-ecj.orig/jaxws/make/bu diff -Nru openjdk-ecj.orig/jaxws/make/Makefile openjdk-ecj/jaxws/make/Makefile ---- openjdk-ecj.orig/jaxws/make/Makefile 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jaxws/make/Makefile 2009-05-28 09:03:57.000000000 +0100 -@@ -75,8 +75,8 @@ +--- openjdk-ecj.orig/jaxws/make/Makefile 2009-06-15 17:14:26.000000000 +0100 ++++ openjdk-ecj/jaxws/make/Makefile 2009-06-15 17:19:32.000000000 +0100 +@@ -84,8 +84,8 @@ endif ifdef ALT_BOOTDIR @@ -349,7 +351,7 @@ diff -Nru openjdk-ecj.orig/jaxws/make/Ma ifdef ALT_OUTPUTDIR diff -Nru openjdk-ecj.orig/jdk/make/common/BuildToolJar.gmk openjdk-ecj/jdk/make/common/BuildToolJar.gmk --- openjdk-ecj.orig/jdk/make/common/BuildToolJar.gmk 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk-ecj/jdk/make/common/BuildToolJar.gmk 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/common/BuildToolJar.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -43,7 +43,8 @@ @$(prep-target) @$(MKDIR) -p $(BUILDTOOLCLASSDIR) @@ -361,8 +363,8 @@ diff -Nru openjdk-ecj.orig/jdk/make/comm -C $(BUILDTOOLCLASSDIR) $(PKGDIR) \ $(BOOT_JAR_JFLAGS) || $(RM) $@ diff -Nru openjdk-ecj.orig/jdk/make/common/Release.gmk openjdk-ecj/jdk/make/common/Release.gmk ---- openjdk-ecj.orig/jdk/make/common/Release.gmk 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jdk/make/common/Release.gmk 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jdk/make/common/Release.gmk 2009-06-15 17:14:31.000000000 +0100 ++++ openjdk-ecj/jdk/make/common/Release.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -654,10 +654,23 @@ $(RES_JAR_ARGLIST): $(RES_JAR_FILELIST) $(prep-target) @@ -449,7 +451,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/comm endif # !windows diff -Nru openjdk-ecj.orig/jdk/make/common/Rules.gmk openjdk-ecj/jdk/make/common/Rules.gmk --- openjdk-ecj.orig/jdk/make/common/Rules.gmk 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk-ecj/jdk/make/common/Rules.gmk 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/common/Rules.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -237,8 +237,9 @@ $(ECHO) "# Java sources to be compiled: (listed in file $<)"; \ $(CAT) $<.filtered; \ @@ -476,9 +478,9 @@ diff -Nru openjdk-ecj.orig/jdk/make/comm @$(TOUCH) $@ diff -Nru openjdk-ecj.orig/jdk/make/common/shared/Defs-java.gmk openjdk-ecj/jdk/make/common/shared/Defs-java.gmk ---- openjdk-ecj.orig/jdk/make/common/shared/Defs-java.gmk 2009-05-28 03:44:57.000000000 +0100 -+++ openjdk-ecj/jdk/make/common/shared/Defs-java.gmk 2009-05-28 09:03:57.000000000 +0100 -@@ -129,33 +129,22 @@ +--- openjdk-ecj.orig/jdk/make/common/shared/Defs-java.gmk 2009-06-15 17:14:30.000000000 +0100 ++++ openjdk-ecj/jdk/make/common/shared/Defs-java.gmk 2009-06-15 17:19:32.000000000 +0100 +@@ -135,33 +135,22 @@ JAVACFLAGS += $(OTHER_JAVACFLAGS) # Needed for javah @@ -514,8 +516,8 @@ diff -Nru openjdk-ecj.orig/jdk/make/comm # Override of what javac to use (see deploy workspace) diff -Nru openjdk-ecj.orig/jdk/make/java/nio/Makefile openjdk-ecj/jdk/make/java/nio/Makefile ---- openjdk-ecj.orig/jdk/make/java/nio/Makefile 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jdk/make/java/nio/Makefile 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jdk/make/java/nio/Makefile 2009-06-15 17:14:31.000000000 +0100 ++++ openjdk-ecj/jdk/make/java/nio/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -31,7 +31,7 @@ PACKAGE = java.nio LIBRARY = nio @@ -527,7 +529,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/java NIO_SRC = $(SHARE_SRC)/classes/java/nio diff -Nru openjdk-ecj.orig/jdk/make/java/text/Makefile openjdk-ecj/jdk/make/java/text/Makefile --- openjdk-ecj.orig/jdk/make/java/text/Makefile 2009-05-08 16:10:43.000000000 +0100 -+++ openjdk-ecj/jdk/make/java/text/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/java/text/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -81,8 +81,8 @@ -sourcepath $(TEXT_SRCDIR) \ $(TEXT_SOURCES) @@ -541,7 +543,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/java @$(java-vm-cleanup) diff -Nru openjdk-ecj.orig/jdk/make/Makefile openjdk-ecj/jdk/make/Makefile --- openjdk-ecj.orig/jdk/make/Makefile 2009-05-08 16:10:43.000000000 +0100 -+++ openjdk-ecj/jdk/make/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -239,7 +239,7 @@ all build:: sanity-all post-sanity-all @@ -553,7 +555,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/Make diff -Nru openjdk-ecj.orig/jdk/make/sun/awt/FILES_export_unix.gmk openjdk-ecj/jdk/make/sun/awt/FILES_export_unix.gmk --- openjdk-ecj.orig/jdk/make/sun/awt/FILES_export_unix.gmk 2009-05-08 16:10:44.000000000 +0100 -+++ openjdk-ecj/jdk/make/sun/awt/FILES_export_unix.gmk 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/sun/awt/FILES_export_unix.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -189,3 +189,5 @@ java/awt/dnd/DnDConstants.java \ sun/awt/CausedFocusEvent.java @@ -562,7 +564,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/sun/ + sun.java2d.opengl.OGLContext$$OGLContextCaps diff -Nru openjdk-ecj.orig/jdk/make/sun/awt/Makefile openjdk-ecj/jdk/make/sun/awt/Makefile --- openjdk-ecj.orig/jdk/make/sun/awt/Makefile 2009-05-08 16:10:44.000000000 +0100 -+++ openjdk-ecj/jdk/make/sun/awt/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/sun/awt/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -401,10 +401,9 @@ COMPILEFONTCONFIG_JARFILE = $(BUILDTOOLJARDIR)/compilefontconfig.jar @@ -579,7 +581,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/sun/ fontconfigs.clean : diff -Nru openjdk-ecj.orig/jdk/make/sun/javazic/Makefile openjdk-ecj/jdk/make/sun/javazic/Makefile --- openjdk-ecj.orig/jdk/make/sun/javazic/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk-ecj/jdk/make/sun/javazic/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/sun/javazic/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -62,7 +62,8 @@ $(WORKDIR)/$(MAPFILE): $(BUILDTOOLJARDIR)/javazic.jar $(TZFILES) $(RM) -r $(@D) @@ -592,7 +594,7 @@ diff -Nru openjdk-ecj.orig/jdk/make/sun/ $(INSTALLDIR)/$(MAPFILE): $(WORKDIR)/$(MAPFILE) diff -Nru openjdk-ecj.orig/jdk/make/sun/text/Makefile openjdk-ecj/jdk/make/sun/text/Makefile --- openjdk-ecj.orig/jdk/make/sun/text/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk-ecj/jdk/make/sun/text/Makefile 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/make/sun/text/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -85,8 +85,9 @@ $(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \ -sourcepath $(TEXT_SRCDIR) \ @@ -606,8 +608,8 @@ diff -Nru openjdk-ecj.orig/jdk/make/sun/ -spec $(UNICODEDATA)/UnicodeData.txt \ -language th diff -Nru openjdk-ecj.orig/jdk/make/sun/xawt/Makefile openjdk-ecj/jdk/make/sun/xawt/Makefile ---- openjdk-ecj.orig/jdk/make/sun/xawt/Makefile 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/jdk/make/sun/xawt/Makefile 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jdk/make/sun/xawt/Makefile 2009-06-15 17:14:31.000000000 +0100 ++++ openjdk-ecj/jdk/make/sun/xawt/Makefile 2009-06-15 17:19:32.000000000 +0100 @@ -294,11 +294,7 @@ TEMPDIR_CLASSES = $(TEMPDIR)/classes @@ -645,8 +647,8 @@ diff -Nru openjdk-ecj.orig/jdk/make/sun/ done $(TOUCH) $@ diff -Nru openjdk-ecj.orig/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java openjdk-ecj/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java ---- openjdk-ecj.orig/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java 2009-05-28 03:44:01.000000000 +0100 -+++ openjdk-ecj/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java 2009-06-15 17:13:39.000000000 +0100 ++++ openjdk-ecj/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java 2009-06-15 17:19:32.000000000 +0100 @@ -647,9 +647,6 @@ throws FileNotFoundException, IOException { BufferedReader in = new BufferedReader(new FileReader(theTemplateFileName)); @@ -666,8 +668,8 @@ diff -Nru openjdk-ecj.orig/jdk/make/tool if (plane == 0 && bLatin1 == false) { genCaseMapTableDeclaration(result); diff -Nru openjdk-ecj.orig/jdk/src/share/classes/java/lang/Double.java openjdk-ecj/jdk/src/share/classes/java/lang/Double.java ---- openjdk-ecj.orig/jdk/src/share/classes/java/lang/Double.java 2009-05-28 03:43:50.000000000 +0100 -+++ openjdk-ecj/jdk/src/share/classes/java/lang/Double.java 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jdk/src/share/classes/java/lang/Double.java 2009-06-15 17:13:27.000000000 +0100 ++++ openjdk-ecj/jdk/src/share/classes/java/lang/Double.java 2009-06-15 17:19:32.000000000 +0100 @@ -76,7 +76,7 @@ * {@code 0x1.fffffffffffffP+1023} and also equal to * {@code Double.longBitsToDouble(0x7fefffffffffffffL)}. @@ -696,8 +698,8 @@ diff -Nru openjdk-ecj.orig/jdk/src/share /** * Maximum exponent a finite {@code double} variable may have. diff -Nru openjdk-ecj.orig/jdk/src/share/classes/java/lang/Float.java openjdk-ecj/jdk/src/share/classes/java/lang/Float.java ---- openjdk-ecj.orig/jdk/src/share/classes/java/lang/Float.java 2009-05-28 03:43:50.000000000 +0100 -+++ openjdk-ecj/jdk/src/share/classes/java/lang/Float.java 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/jdk/src/share/classes/java/lang/Float.java 2009-06-15 17:13:27.000000000 +0100 ++++ openjdk-ecj/jdk/src/share/classes/java/lang/Float.java 2009-06-15 17:19:32.000000000 +0100 @@ -76,7 +76,7 @@ * {@code 0x1.fffffeP+127f} and also equal to * {@code Float.intBitsToFloat(0x7f7fffff)}. @@ -727,7 +729,7 @@ diff -Nru openjdk-ecj.orig/jdk/src/share * Maximum exponent a finite {@code float} variable may have. It diff -Nru openjdk-ecj.orig/jdk/src/share/native/sun/java2d/opengl/OGLContext.h openjdk-ecj/jdk/src/share/native/sun/java2d/opengl/OGLContext.h --- openjdk-ecj.orig/jdk/src/share/native/sun/java2d/opengl/OGLContext.h 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk-ecj/jdk/src/share/native/sun/java2d/opengl/OGLContext.h 2009-05-28 09:03:57.000000000 +0100 ++++ openjdk-ecj/jdk/src/share/native/sun/java2d/opengl/OGLContext.h 2009-06-15 17:19:32.000000000 +0100 @@ -27,6 +27,7 @@ #define OGLContext_h_Included @@ -793,9 +795,9 @@ diff -Nru openjdk-ecj.orig/jdk/src/share /** * Evaluates to true if the given capability bitmask is present for the diff -Nru openjdk-ecj.orig/langtools/make/build.xml openjdk-ecj/langtools/make/build.xml ---- openjdk-ecj.orig/langtools/make/build.xml 2009-03-30 17:23:27.000000000 +0100 -+++ openjdk-ecj/langtools/make/build.xml 2009-05-28 09:03:57.000000000 +0100 -@@ -502,7 +502,9 @@ +--- openjdk-ecj.orig/langtools/make/build.xml 2009-06-15 14:59:52.000000000 +0100 ++++ openjdk-ecj/langtools/make/build.xml 2009-06-15 17:19:32.000000000 +0100 +@@ -509,7 +509,9 @@ includes="@{includes}" sourcepath="" includeAntRuntime="no" @@ -806,7 +808,7 @@ diff -Nru openjdk-ecj.orig/langtools/mak -@@ -517,7 +519,9 @@ +@@ -524,7 +526,9 @@ includeAntRuntime="no" target="@{javac.target}" debug="${javac.debug}" @@ -817,7 +819,7 @@ diff -Nru openjdk-ecj.orig/langtools/mak -@@ -571,7 +575,8 @@ +@@ -578,7 +582,8 @@ executable="${boot.java.home}/bin/javac" srcdir="${make.tools.dir}/CompileProperties" destdir="${build.toolclasses.dir}/" @@ -828,9 +830,9 @@ diff -Nru openjdk-ecj.orig/langtools/mak classname="CompilePropertiesTask" classpath="${build.toolclasses.dir}/"/> diff -Nru openjdk-ecj.orig/langtools/make/Makefile openjdk-ecj/langtools/make/Makefile ---- openjdk-ecj.orig/langtools/make/Makefile 2009-05-28 03:45:02.000000000 +0100 -+++ openjdk-ecj/langtools/make/Makefile 2009-05-28 09:03:57.000000000 +0100 -@@ -112,7 +112,7 @@ +--- openjdk-ecj.orig/langtools/make/Makefile 2009-06-15 17:14:26.000000000 +0100 ++++ openjdk-ecj/langtools/make/Makefile 2009-06-15 17:19:32.000000000 +0100 +@@ -122,7 +122,7 @@ ifdef ALT_BOOTDIR ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR) @@ -840,8 +842,8 @@ diff -Nru openjdk-ecj.orig/langtools/mak ifdef ALT_OUTPUTDIR diff -Nru openjdk-ecj.orig/make/jdk-rules.gmk openjdk-ecj/make/jdk-rules.gmk ---- openjdk-ecj.orig/make/jdk-rules.gmk 2009-05-28 03:44:57.000000000 +0100 -+++ openjdk-ecj/make/jdk-rules.gmk 2009-05-28 09:03:57.000000000 +0100 +--- openjdk-ecj.orig/make/jdk-rules.gmk 2009-06-15 17:14:30.000000000 +0100 ++++ openjdk-ecj/make/jdk-rules.gmk 2009-06-15 17:19:32.000000000 +0100 @@ -58,7 +58,7 @@ endif diff -r f95ae75a68c6 -r 8e5de53d67cd patches/hotspot/default/icedtea-debuginfo.patch --- a/patches/hotspot/default/icedtea-debuginfo.patch Thu Jun 11 22:40:38 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-08-20 22:58:22.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-08-20 23:01:45.000000000 +0100 -@@ -62,6 +62,10 @@ - CFLAGS += -D_REENTRANT - CFLAGS += -fcheck-new - -+# Always generate full debuginfo on Linux. It'll be in a separate -+# debuginfo package when building RPMs. -+CFLAGS += -g -+ - ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) - ARCHFLAG/i486 = -m32 -march=i586 - ARCHFLAG/amd64 = -m64 - diff -r f95ae75a68c6 -r 8e5de53d67cd patches/hotspot/default/icedtea-zero-build.patch --- a/patches/hotspot/default/icedtea-zero-build.patch Thu Jun 11 22:40:38 2009 +0100 +++ b/patches/hotspot/default/icedtea-zero-build.patch Tue Jun 16 11:04:53 2009 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/hotspot/make/defs diff -Nru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make ---- openjdk.orig/hotspot/make/defs.make 2008-11-22 00:11:18.000000000 +0000 -+++ openjdk/hotspot/make/defs.make 2008-11-29 02:14:15.000000000 +0000 +--- openjdk.orig/hotspot/make/defs.make 2009-03-30 17:15:27.000000000 +0100 ++++ openjdk/hotspot/make/defs.make 2009-06-15 17:09:12.000000000 +0100 From xerxes at zafena.se Tue Jun 16 06:13:38 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 16 Jun 2009 15:13:38 +0200 Subject: [patch] RFC: shark llvm 2.6svn r73431 api breakage fix Message-ID: <4A379A82.9060902@zafena.se> http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-June/023073.html Add Sub Mul Neg have been split into FAdd FSub FMul FNeg for improved integer / floatingpoint operation llvm_api_breakage.patch improves floatingpoint performance by taking advandtage of this change. The llvm 2.6svn tip have improved support for vector types since r73431 and some api's have changed to return Constant* instead of ConstantFP* llvm_api_breakage_2.patch fixes this issue. Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm_api_breakage.patch Type: text/x-patch Size: 2850 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090616/d9beef0c/llvm_api_breakage.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm_api_breakage_2.patch Type: text/x-patch Size: 917 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090616/d9beef0c/llvm_api_breakage_2.patch From dbhole at redhat.com Tue Jun 16 06:42:51 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 16 Jun 2009 09:42:51 -0400 Subject: RFC: Netx - Fix service exceptions thrown by the proxy In-Reply-To: <4A36B15E.9060200@redhat.com> References: <4A36B15E.9060200@redhat.com> Message-ID: <20090616134251.GA26140@redhat.com> * Omair Majid [2009-06-15 16:39]: > Hi, > > Netx uses dynamic proxies to wrap all calls to the various JNLP services > and run them in privileged mode. If any method called throws an > exception, it is wrapped in a InvocationTargetException. And then in a > PrivilegedActionException. Now a client JNLP program doesnt know (and > shouldnt know!) that we are using proxies. So it gets a totally > unexpected exception and cant deal with the situation properly. [1] > describes the bug in much more detail. > > The attached patch fixes the problem by throwing the exception that > caused the problem. > Looks good. Can you change the getCause() in case of ITE to be getTargetException instead? From the last line on the link you posted: One commenter noted that InvocationTargetException.getTargetException() should be used instead of getCause(). The two methods are actually equivalent for InvocationTargetException, so using either works. After above change, good to commit. Cheers, Deepak > ChangeLog: > 2009-10-15 Omair Majid > > * rt/net/sourceforge/jnlp/services/ServiceUtil.java: > (invoke): Throw the exception that caused the problem. > > > [1] > http://benpryor.com/blog/2006/08/15/java-dynamic-proxies-and-invocationtargetexception/ From dbhole at redhat.com Tue Jun 16 06:43:14 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 16 Jun 2009 09:43:14 -0400 Subject: RFC: Netx - Add interfaces required for single instance jnlp applications In-Reply-To: <4A36B7AB.3050606@redhat.com> References: <4A36B7AB.3050606@redhat.com> Message-ID: <20090616134314.GB26140@redhat.com> * Omair Majid [2009-06-15 17:06]: > Hi, > > The attached patch adds the two javax.jnlp interfaces that are required > by programs that want to make sure that only one instance of an > application is ever running. While these interfaces dont do anything, > they are enough to get a few applications (like SweetHome3D) running. > > ChangeLog: > 2009-10-15 Omair Majid > > * rt/javax/jnlp/SingleInstanceListener.java: New file. > * rt/javax/jnlp/SingleInstanceService.java: New file. > > Any Comments? > Looks good! Deepak > Cheers, > Omair From omajid at redhat.com Tue Jun 16 06:57:28 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 09:57:28 -0400 Subject: RFC: Netx - Fix service exceptions thrown by the proxy In-Reply-To: <20090616134251.GA26140@redhat.com> References: <4A36B15E.9060200@redhat.com> <20090616134251.GA26140@redhat.com> Message-ID: <4A37A4C8.4090008@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-15 16:39]: >> Hi, >> >> Netx uses dynamic proxies to wrap all calls to the various JNLP services >> and run them in privileged mode. If any method called throws an >> exception, it is wrapped in a InvocationTargetException. And then in a >> PrivilegedActionException. Now a client JNLP program doesnt know (and >> shouldnt know!) that we are using proxies. So it gets a totally >> unexpected exception and cant deal with the situation properly. [1] >> describes the bug in much more detail. >> >> The attached patch fixes the problem by throwing the exception that >> caused the problem. >> > > > Looks good. Can you change the getCause() in case of ITE to be > getTargetException instead? From the last line on the link you posted: > > One commenter noted that InvocationTargetException.getTargetException() > should be used instead of getCause(). The two methods are actually > equivalent for InvocationTargetException, so using either works. I was going to use getTargetException() but then I saw this note in the java-docs [1]: "The Throwable.getCause() method is now the preferred means of obtaining this information". I have no preference either way; what do you think makes more sense? > > After above change, good to commit. > Thanks for the review. Cheers, Omair [1] http://java.sun.com/javase/6/docs/api/java/lang/reflect/InvocationTargetException.html#getTargetException() From dbhole at redhat.com Tue Jun 16 07:12:36 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 16 Jun 2009 10:12:36 -0400 Subject: RFC: Netx - Fix service exceptions thrown by the proxy In-Reply-To: <4A37A4C8.4090008@redhat.com> References: <4A36B15E.9060200@redhat.com> <20090616134251.GA26140@redhat.com> <4A37A4C8.4090008@redhat.com> Message-ID: <20090616141236.GC26140@redhat.com> * Omair Majid [2009-06-16 09:57]: > Deepak Bhole wrote: >> * Omair Majid [2009-06-15 16:39]: >>> Hi, >>> >>> Netx uses dynamic proxies to wrap all calls to the various JNLP >>> services and run them in privileged mode. If any method called >>> throws an exception, it is wrapped in a InvocationTargetException. >>> And then in a PrivilegedActionException. Now a client JNLP program >>> doesnt know (and shouldnt know!) that we are using proxies. So it >>> gets a totally unexpected exception and cant deal with the situation >>> properly. [1] describes the bug in much more detail. >>> >>> The attached patch fixes the problem by throwing the exception that >>> caused the problem. >>> >> >> >> Looks good. Can you change the getCause() in case of ITE to be >> getTargetException instead? From the last line on the link you posted: >> >> One commenter noted that InvocationTargetException.getTargetException() >> should be used instead of getCause(). The two methods are actually >> equivalent for InvocationTargetException, so using either works. > > I was going to use getTargetException() but then I saw this note in the > java-docs [1]: "The Throwable.getCause() method is now the preferred > means of obtaining this information". I have no preference either way; > what do you think makes more sense? > Ah okay. Javadocs is the preferred source of info. What you have is the right way then, no need to change anything. Cheers, Deepak >> >> After above change, good to commit. >> > Thanks for the review. > > Cheers, > Omair > > > [1] > http://java.sun.com/javase/6/docs/api/java/lang/reflect/InvocationTargetException.html#getTargetException() From xerxes at zafena.se Tue Jun 16 07:17:50 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 16 Jun 2009 16:17:50 +0200 Subject: [patch] RFC: shark llvm 2.6svn r73431 api breakage fix - changelog entry In-Reply-To: <4A379A82.9060902@zafena.se> References: <4A379A82.9060902@zafena.se> Message-ID: <4A37A98E.2020500@zafena.se> Suggested changelog entry: 2009-06-16 Xerxes R?nby * ports/hotspot/src/share/vm/shark/llvmValue.hpp (jfloat_constant): Return llvm::Constant* when llvm version are 2.6 or later to handle llvm r73431 API change. (jdouble_constant): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Updated to use CreateFAdd CreateFSub, CreateFMul and CreateFNeg for jfloat and jdouble when llvm version are 2.6 or later. Xerxes R?nby skrev: > http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-June/023073.html > Add Sub Mul Neg have been split into FAdd FSub FMul FNeg for improved > integer / floatingpoint operation > llvm_api_breakage.patch > improves floatingpoint performance by taking advandtage of this change. > > The llvm 2.6svn tip have improved support for vector types since > r73431 and some api's have changed to return Constant* instead of > ConstantFP* > llvm_api_breakage_2.patch > fixes this issue. > > Cheers > Xerxes From mwong at redhat.com Tue Jun 16 07:36:53 2009 From: mwong at redhat.com (Man Wong) Date: Tue, 16 Jun 2009 10:36:53 -0400 (EDT) Subject: Patch for LayoutExtraGaps In-Reply-To: <1008673316.85911245162996877.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <1170721816.85981245163013484.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi, I was looking over one of the failures for a jtreg test on openjdk and the test case did not make sense to me, which led me to make changes to the test case. First of all, the test was in java/awt/GridLayout/LayoutExtraGaps.java. The test currently under the openjdk I believe was trying to test whether a GridLayout object centre its component properly (based on the message printed by the exception). It tested that by checking if the origin coordinate of the first component (each component is a rectangle, and there are 29 rectangles in a panel and there are 4 panels in the main window) is (0,0). If both x and y are 0 for any of the panels, then the test fails. I also think that the reason why they chose (0,0) as the failing point because base on the values they passed in, x and y cannot both be at (0,0). This is not valid because the error that was output states, "Test failed. GridLayout doesn't center component.", but the components are in fact centred, since all opposite boarders have equal dimension. When I looked at the gui generated, there are boarders between the rectangles and its parent panel. And the boarder changes as the gui window resizes (not sure if that is another problem in java or if it was intentional). Not surprisingly, two of the panels were initialized such that there is no boarder between itself and the rectangles, causing the test to fail. Which the test should not have failed because everything was centred properly. I created a fix to the test case (attached to this email) that checks if the boarder at the right equals the boarder at the left, and if the boarder at the top equals the boarder at the bottom. Instead of checking whether the origin coordinate of the first component is (0,0). Thanks for looking things over, and hope to hear from you soon. Man Lung Wong From mwong at redhat.com Tue Jun 16 07:40:04 2009 From: mwong at redhat.com (Man Wong) Date: Tue, 16 Jun 2009 10:40:04 -0400 (EDT) Subject: Patch for LayoutExtraGaps (forgot attachment) In-Reply-To: <1965920142.86151245163139106.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <479559993.86191245163204928.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi, Sorry about the last email without the attachment. Here it is. Man Lung Wong -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-jtreg-layoutextragaps.patch Type: text/x-patch Size: 5739 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090616/f58b83d1/icedtea-jtreg-layoutextragaps.patch From omajid at redhat.com Tue Jun 16 09:22:36 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 16:22:36 +0000 Subject: changeset in /hg/icedtea6: 2009-06-16 Omair Majid changeset e6350d5249d3 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e6350d5249d3 description: 2009-06-16 Omair Majid * rt/javax/jnlp/SingleInstanceListener.java: New file. * rt/javax/jnlp/SingleInstanceService.java: New file. diffstat: 3 files changed, 86 insertions(+) ChangeLog | 5 +++ rt/javax/jnlp/SingleInstanceListener.java | 35 ++++++++++++++++++++++ rt/javax/jnlp/SingleInstanceService.java | 46 +++++++++++++++++++++++++++++ diffs (101 lines): diff -r 450de765ec22 -r e6350d5249d3 ChangeLog --- a/ChangeLog Tue Jun 16 10:23:45 2009 -0400 +++ b/ChangeLog Tue Jun 16 10:58:00 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-16 Omair Majid + + * rt/javax/jnlp/SingleInstanceListener.java: New file. + * rt/javax/jnlp/SingleInstanceService.java: New file. + 2009-06-16 Omair Majid * rt/net/sourceforge/jnlp/services/ServiceUtil.java: diff -r 450de765ec22 -r e6350d5249d3 rt/javax/jnlp/SingleInstanceListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/javax/jnlp/SingleInstanceListener.java Tue Jun 16 10:58:00 2009 -0400 @@ -0,0 +1,35 @@ +// Copyright (C) 2009 Red Hat, Inc. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +package javax.jnlp; + +/** + * This interface specifies a listener which is notified whenever a new instance + * of the web start application is launched. + * + */ +public interface SingleInstanceListener { + + /** + * This method is called when a new instance of the application is launched. + * The arguments passed to the new instance are passed into this method. + * + * @param arguments the arguments passed to the new instance of the + * application + */ + void newActivation(String[] arguments); + +} diff -r 450de765ec22 -r e6350d5249d3 rt/javax/jnlp/SingleInstanceService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/javax/jnlp/SingleInstanceService.java Tue Jun 16 10:58:00 2009 -0400 @@ -0,0 +1,46 @@ +// Copyright (C) 2009 Red Hat, Inc. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +package javax.jnlp; + +/** + * The SingleInstanceService provides a way to ensure that only one instance of + * the application is ever running - singleton behavior at the application + * level. + * + */ +public interface SingleInstanceService { + + /** + * Adds the specified SingleInstanceListener to the notification list. This + * listener is notified when a new instance of the application is started. + * + * + * @param listener the single instance listener to be added. No action is + * performed if it is null. + */ + void addSingleInstanceListener(SingleInstanceListener listener); + + /** + * Removes the specified SingleInstanceListener from the notification list. + * This listener will not be notified if a new instance of the application + * is started. + * + * @param listener the single instance listener to be removed. No action is + * performed if it is null or not in the notification list. + */ + void removeSingleInstanceListener(SingleInstanceListener listener); +} From omajid at redhat.com Tue Jun 16 09:22:35 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 16:22:35 +0000 Subject: changeset in /hg/icedtea6: 2009-06-16 Omair Majid changeset 450de765ec22 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=450de765ec22 description: 2009-06-16 Omair Majid * rt/net/sourceforge/jnlp/services/ServiceUtil.java: (invoke): Throw the original exception that caused the problem. diffstat: 2 files changed, 24 insertions(+), 6 deletions(-) ChangeLog | 5 ++++ rt/net/sourceforge/jnlp/services/ServiceUtil.java | 25 +++++++++++++++------ diffs (47 lines): diff -r b88686f19b34 -r 450de765ec22 ChangeLog --- a/ChangeLog Mon Jun 15 15:44:37 2009 -0400 +++ b/ChangeLog Tue Jun 16 10:23:45 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-15 Lillian Angel + + * rt/net/sourceforge/jnlp/services/ServiceUtil.java: + (invoke): Throw the original exception that caused the problem. + 2009-06-15 Lillian Angel * Makefile.am diff -r b88686f19b34 -r 450de765ec22 rt/net/sourceforge/jnlp/services/ServiceUtil.java --- a/rt/net/sourceforge/jnlp/services/ServiceUtil.java Mon Jun 15 15:44:37 2009 -0400 +++ b/rt/net/sourceforge/jnlp/services/ServiceUtil.java Tue Jun 16 10:23:45 2009 -0400 @@ -159,12 +159,25 @@ public class ServiceUtil { } }; - Object result = AccessController.doPrivileged(invoker); - - if (JNLPRuntime.isDebug()) - System.err.println(" result: "+result); - - return result; + try { + Object result = AccessController.doPrivileged(invoker); + + if (JNLPRuntime.isDebug()) + System.err.println(" result: "+result); + + return result; + } catch (PrivilegedActionException e) { + // Any exceptions thrown by the actual methods are wrapped by a + // InvocationTargetException, which is further wrapped by the + // PrivilegedActionException. Lets unwrap them to make the + // proxy transparent to the callers + if (e.getCause() instanceof InvocationTargetException) { + throw e.getCause().getCause(); + } else { + throw e.getCause(); + } + } + } }; From omajid at redhat.com Tue Jun 16 09:27:09 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 12:27:09 -0400 Subject: RFC: Netx - Fix service exceptions thrown by the proxy In-Reply-To: <20090616141236.GC26140@redhat.com> References: <4A36B15E.9060200@redhat.com> <20090616134251.GA26140@redhat.com> <4A37A4C8.4090008@redhat.com> <20090616141236.GC26140@redhat.com> Message-ID: <4A37C7DD.8000405@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-16 09:57]: >> Deepak Bhole wrote: >>> * Omair Majid [2009-06-15 16:39]: >>>> Hi, >>>> >>>> Netx uses dynamic proxies to wrap all calls to the various JNLP >>>> services and run them in privileged mode. If any method called >>>> throws an exception, it is wrapped in a InvocationTargetException. >>>> And then in a PrivilegedActionException. Now a client JNLP program >>>> doesnt know (and shouldnt know!) that we are using proxies. So it >>>> gets a totally unexpected exception and cant deal with the situation >>>> properly. [1] describes the bug in much more detail. >>>> >>>> The attached patch fixes the problem by throwing the exception that >>>> caused the problem. >>>> >>> >>> Looks good. Can you change the getCause() in case of ITE to be >>> getTargetException instead? From the last line on the link you posted: >>> >>> One commenter noted that InvocationTargetException.getTargetException() >>> should be used instead of getCause(). The two methods are actually >>> equivalent for InvocationTargetException, so using either works. >> I was going to use getTargetException() but then I saw this note in the >> java-docs [1]: "The Throwable.getCause() method is now the preferred >> means of obtaining this information". I have no preference either way; >> what do you think makes more sense? >> > > Ah okay. Javadocs is the preferred source of info. What you have is the > right way then, no need to change anything. > Committed as: changeset 450de765ec22 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=450de765ec22 description: 2009-06-16 Omair Majid * rt/net/sourceforge/jnlp/services/ServiceUtil.java: (invoke): Throw the original exception that caused the problem. Thanks, Omair From omajid at redhat.com Tue Jun 16 09:28:52 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 12:28:52 -0400 Subject: RFC: Netx - Add interfaces required for single instance jnlp applications In-Reply-To: <20090616134314.GB26140@redhat.com> References: <4A36B7AB.3050606@redhat.com> <20090616134314.GB26140@redhat.com> Message-ID: <4A37C844.2090307@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-06-15 17:06]: >> Hi, >> >> The attached patch adds the two javax.jnlp interfaces that are required >> by programs that want to make sure that only one instance of an >> application is ever running. While these interfaces dont do anything, >> they are enough to get a few applications (like SweetHome3D) running. >> >> ChangeLog: >> 2009-10-15 Omair Majid >> >> * rt/javax/jnlp/SingleInstanceListener.java: New file. >> * rt/javax/jnlp/SingleInstanceService.java: New file. >> >> Any Comments? >> > > Looks good! > Committed as: changeset e6350d5249d3 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e6350d5249d3 description: 2009-06-16 Omair Majid * rt/javax/jnlp/SingleInstanceListener.java: New file. * rt/javax/jnlp/SingleInstanceService.java: New file. Thanks, Omair From martinrb at google.com Tue Jun 16 09:47:45 2009 From: martinrb at google.com (Martin Buchholz) Date: Tue, 16 Jun 2009 09:47:45 -0700 Subject: RFC: Make javax.jnlp package visible to javac In-Reply-To: <823aa0y2dm.fsf@mid.bfk.de> References: <4A2817A3.2070807@redhat.com> <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> <4A292042.50908@redhat.com> <4A36C0E8.4040700@sun.com> <823aa0y2dm.fsf@mid.bfk.de> Message-ID: <1ccfd1c10906160947q24ac324dj666b8c230fa62e19@mail.gmail.com> The Java world has always made a bigger distinction between interface and implementation than other projects, especially since (most of) the interface is (at least in principle) controlled by the JCP (this includes javax.* but not com.sun.*). Moving an API to a more public location is as big a deal as creating that new API in the first place. Currently the process for making small (i.e. non-JSR) changes to the JDK is in flux. In the past (and still at present) one needs a Sun-internal sponsor to push such a change. In future probably there will be a more public process that anyone can participate in. In the particular case of base64, this is a long-standing RFE. An inhibitor may be the fact that base64 is a byte-to-byte coder, while the JDK is used to handling byte-to-char coders, which makes the API design non-obvious. Martin On Tue, Jun 16, 2009 at 02:05, Florian Weimer wrote: > * Joe Darcy: > > > The ct.sym file is a mechanism used be javac for a variety of reasons, > > including to serve as a stepping stone toward modules. Peter Ahe wrote > > about it his blog entry: > > http://blogs.sun.com/ahe/entry/b86_compiler_fixes > > Will you accept patches which move particularly useful functionality > (the base64 decoder comes to my mind, or the X500Name class and other > ASN.1-related helpers) to com.sun.* or javax.*? > > -- > Florian Weimer > BFK edv-consulting GmbH http://www.bfk.de/ > Kriegsstra?e 100 tel: +49-721-96201-1 > D-76133 Karlsruhe fax: +49-721-96201-99 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090616/7034d2a7/attachment.html From Joe.Darcy at Sun.COM Tue Jun 16 09:59:48 2009 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Tue, 16 Jun 2009 09:59:48 -0700 Subject: RFC: Make javax.jnlp package visible to javac In-Reply-To: <1ccfd1c10906160947q24ac324dj666b8c230fa62e19@mail.gmail.com> References: <4A2817A3.2070807@redhat.com> <17c6771e0906041749u5e01ae27u27e8261c9717d42c@mail.gmail.com> <4A292042.50908@redhat.com> <4A36C0E8.4040700@sun.com> <823aa0y2dm.fsf@mid.bfk.de> <1ccfd1c10906160947q24ac324dj666b8c230fa62e19@mail.gmail.com> Message-ID: <4A37CF84.9030301@sun.com> Martin Buchholz wrote: > The Java world has always made a bigger distinction > between interface and implementation than other projects, > especially since (most of) the interface is (at least in principle) > controlled by the JCP (this includes javax.* but not com.sun.*). > Moving an API to a more public location is as big a deal > as creating that new API in the first place. > > Currently the process for making small (i.e. non-JSR) > changes to the JDK is in flux. In the past (and still at present) > one needs a Sun-internal sponsor to push such a change. > In future probably there will be a more public process that > anyone can participate in. Yes, adding classes/packages in the javax.* namespace is generally out of scope for OpenJDK 6, but it is possible they could be added in JDK 7. -Joe From xerxes at zafena.se Tue Jun 16 11:02:21 2009 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 16 Jun 2009 20:02:21 +0200 Subject: [patch] RFC: shark llvm 2.6svn r73431 api breakage fix In-Reply-To: <4A379A82.9060902@zafena.se> References: <4A379A82.9060902@zafena.se> Message-ID: <4A37DE2D.3050808@zafena.se> Den 2009-06-16 15:13, Xerxes R?nby skrev: > +#ifdef SHARK_LLVM_VERSION>= 26 > note to self: change this to +#if SHARK_LLVM_VERSION >= 26 in llvm_api_breakage_2.patch From dbhole at redhat.com Tue Jun 16 12:18:32 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 16 Jun 2009 15:18:32 -0400 Subject: RFC: Fixes for some race conditions in the plugin Message-ID: <20090616191832.GB28527@redhat.com> Hi, Attached patch fixes a bunch of race conditions currently prevalent in the plugin. These conditions manifest as a result of the multi stage asynch. init process -- init is 2 stage, and between those stages, messages like size information and dispose can come through. This patch ensures that the various orders are accounted for. ChangeLog: * IcedTeaPlugin.cc: Fix race condition that led to segfault. * plugin/icedtea/sun/applet/PluginAppletViewer.java: Fix a host of race conditions brought about by the multi stage asynchronous initialization design. * rt/net/sourceforge/jnlp/NetxPanel.java: Account for case where handler may be null due to an error above. Deepak -------------- next part -------------- diff -r e6350d5249d3 ChangeLog --- a/ChangeLog Tue Jun 16 10:58:00 2009 -0400 +++ b/ChangeLog Tue Jun 16 15:13:28 2009 -0400 @@ -1,3 +1,12 @@ +2009-06-16 Deepak Bhole + + * IcedTeaPlugin.cc: Fix race condition that led to segfault. + * plugin/icedtea/sun/applet/PluginAppletViewer.java: Fix a host of race + conditions brought about by the multi stage asynchronous initialization + design. + * rt/net/sourceforge/jnlp/NetxPanel.java: Account for case where handler + may be null due to an error above. + 2009-06-16 Omair Majid * rt/javax/jnlp/SingleInstanceListener.java: New file. diff -r e6350d5249d3 IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Tue Jun 16 10:58:00 2009 -0400 +++ b/IcedTeaPlugin.cc Tue Jun 16 15:13:28 2009 -0400 @@ -1065,6 +1065,7 @@ gpointer window_handle; guint32 window_width; guint32 window_height; + PRBool is_active; // FIXME: nsCOMPtr. IcedTeaPluginFactory* factory; PRUint32 instance_identifier; @@ -2447,6 +2448,7 @@ nsCString destroyMessage (instanceIdentifierPrefix); destroyMessage += "destroy"; factory->SendMessageToAppletViewer (destroyMessage); + is_active = PR_FALSE; return NS_OK; } @@ -2475,7 +2477,9 @@ long startTime = get_time_in_s(); PRBool timedOut = PR_FALSE; - while (initialized == PR_FALSE && this->fatalErrorOccurred == PR_FALSE) + while (initialized == PR_FALSE && + this->fatalErrorOccurred == PR_FALSE && + this->is_active == PR_FALSE) { PROCESS_PENDING_EVENTS; @@ -2638,7 +2642,9 @@ long startTime = get_time_in_s(); PRBool timedOut = PR_FALSE; - while (initialized == PR_FALSE && this->fatalErrorOccurred == PR_FALSE) + while (initialized == PR_FALSE && + this->fatalErrorOccurred == PR_FALSE && + this->is_active == PR_FALSE) { PROCESS_PENDING_EVENTS; @@ -4115,6 +4121,7 @@ liveconnect_window (0), initialized(PR_FALSE), fatalErrorOccurred(PR_FALSE), + is_active(PR_TRUE), instanceIdentifierPrefix ("") { PLUGIN_TRACE_INSTANCE (); @@ -4134,6 +4141,7 @@ nsresult result; PLUGIN_DEBUG_1ARG ("HERE 22: %d\n", liveconnect_window); + // principalsArray, numPrincipals and securitySupports // are ignored by GetWindow. See: // @@ -4144,6 +4152,16 @@ if (factory->proxyEnv != NULL) { PLUGIN_DEBUG_2ARG ("HERE 23: %d, %p\n", liveconnect_window, current_thread ()); + + // there is a bad race condition here where if the instance is active, + // this code remains active after destruction.. so double check + if (is_active != PR_TRUE) + { + PLUGIN_DEBUG_1ARG("Plugin %d is no longer active. Bypassing \ + GetWindow request.\n", instance_identifier); + return; + } + result = factory->liveconnect->GetWindow(factory->proxyEnv, this, NULL, 0, NULL, diff -r e6350d5249d3 plugin/icedtea/sun/applet/PluginAppletViewer.java --- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Tue Jun 16 10:58:00 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Tue Jun 16 15:13:28 2009 -0400 @@ -145,6 +145,8 @@ */ private static String defaultSaveFile = "Applet.ser"; + private static enum PAV_INIT_STATUS {PRE_INIT, ACTIVE, INACTIVE}; + /** * The panel in which the applet is being displayed. */ @@ -168,17 +170,23 @@ int identifier; - private static HashMap requests = new HashMap(); + private static HashMap requests = + new HashMap(); // Instance identifier -> PluginAppletViewer object. - private static HashMap applets = new HashMap(); + private static HashMap applets = + new HashMap(); private static PluginStreamHandler streamhandler; private static PluginCallRequestFactory requestFactory; - private static HashMap siteCookies = new HashMap(); - + private static HashMap siteCookies = + new HashMap(); + + private static HashMap status = + new HashMap(); + private double proposedHeightFactor; private double proposedWidthFactor; @@ -312,7 +320,7 @@ Applet a; while ((a = panel.getApplet()) == null && ((NetxPanel) panel).isAlive()) { try { - Thread.sleep(2000); + Thread.sleep(1000); PluginDebug.debug("Waiting for applet to initialize... "); } catch (InterruptedException ie) { ie.printStackTrace(); @@ -328,7 +336,8 @@ PluginDebug.debug("Applet initialized"); // Applet initialized. Find out it's classloader and add it to the list - String codeBase = doc.getProtocol() + "://" + doc.getHost(); + String portComponent = doc.getPort() != -1 ? ":" + doc.getPort() : ""; + String codeBase = doc.getProtocol() + "://" + doc.getHost() + portComponent; if (atts.get("codebase") != null) { try { @@ -373,6 +382,21 @@ // may happen in independent threads synchronized(requests) { + + // Check if we should proceed with init + // (=> no if destroy was called after tag, but before + // handle) + if (status.containsKey(identifier) && + status.get(identifier).equals(PAV_INIT_STATUS.INACTIVE)) { + + PluginDebug.debug("Inactive flag set. Refusing to initialize instance " + identifier); + requests.remove(identifier); + return; + + } + + status.put(identifier, PAV_INIT_STATUS.PRE_INIT); + PluginParseRequest request = requests.get(identifier); if (request == null) { request = new PluginParseRequest(); @@ -393,6 +417,17 @@ new StringReader(request.tag), new URL(request.documentbase)); requests.remove(identifier); + + // Panel initialization cannot be aborted mid-way. + // Once it is initialized, double check to see if this + // panel needs to stay around.. + if (status.get(identifier).equals(PAV_INIT_STATUS.INACTIVE)) { + PluginDebug.debug("Inactive flag set. Destroying applet instance " + identifier); + applets.get(identifier).handleMessage(-1, "destroy"); + } else { + status.put(identifier, PAV_INIT_STATUS.ACTIVE); + } + } else { PluginDebug.debug ("REQUEST HANDLE NOT SET: " + request.handle + ". BYPASSING"); } @@ -400,6 +435,21 @@ } else if (message.startsWith("handle")) { synchronized(requests) { + + // Check if we should proceed with init + // (=> no if destroy was called after handle, but before + // tag) + if (status.containsKey(identifier) && + status.get(identifier).equals(PAV_INIT_STATUS.INACTIVE)) { + + PluginDebug.debug("Inactive flag set. Refusing to initialize instance " + identifier); + requests.remove(identifier); + return; + + } + + status.put(identifier, PAV_INIT_STATUS.PRE_INIT); + PluginParseRequest request = requests.get(identifier); if (request == null) { request = new PluginParseRequest(); @@ -418,6 +468,17 @@ requests.remove(identifier); PluginDebug.debug ("REQUEST HANDLE, DONE PARSING " + Thread.currentThread()); + + // Panel initialization cannot be aborted mid-way. + // Once it is initialized, double check to see if this + // panel needs to stay around.. + if (status.get(identifier).equals(PAV_INIT_STATUS.INACTIVE)) { + PluginDebug.debug("Inactive flag set. Destroying applet instance " + identifier); + applets.get(identifier).handleMessage(-1, "destroy"); + } else { + status.put(identifier, PAV_INIT_STATUS.ACTIVE); + } + } else { PluginDebug.debug ("REQUEST TAG NOT SET: " + request.tag + ". BYPASSING"); } @@ -433,12 +494,57 @@ // Always set the cookie -- even if it is null siteCookies.put(identifier, cookieStr); } else { - PluginDebug.debug ("HANDLING MESSAGE " + message + " instance " + identifier + " " + Thread.currentThread()); + PluginDebug.debug ("Handling message: " + message + " instance " + identifier + " " + Thread.currentThread()); + + // Destroy may be called while initialization is still going + // on. We therefore special case it. + if (!applets.containsKey(identifier) && message.equals("destroy")) { + + // Set the status to inactive right away. Doesn't matter if it + // gets clobbered during init. due to a race. That is what the + // double check below is for. + PluginDebug.debug("Destroy called during initialization. Delaying destruction."); + status.put(identifier, PAV_INIT_STATUS.INACTIVE); + + // We have set the flags. We now lock what stage 1 and 2 + // lock on, and force a synchronous status check+action. + synchronized (requests) { + // re-check (inside lock) if the applet is + // initialized at this point. + if (applets.containsKey(identifier)) { + PluginDebug.debug("Init done. destroying normally."); + applets.get(identifier).handleMessage(reference, message); + } else { + } + } // unlock + + // we're done here + return; + } + + // For messages other than destroy, wait till initialization finishes + while (!applets.containsKey(identifier) && + ( + !status.containsKey(identifier) || + status.get(identifier).equals(PAV_INIT_STATUS.PRE_INIT) + ) + ); + + // don't bother processing further for inactive applets + if (status.get(identifier).equals(PAV_INIT_STATUS.INACTIVE)) + return; + applets.get(identifier).handleMessage(reference, message); } } catch (Exception e) { - throw new RuntimeException("Failed to handle message: " + message + " " + - Thread.currentThread(), e); + + // If an exception happened during pre-init, we need to update status + if (status.get(identifier).equals(PAV_INIT_STATUS.PRE_INIT)) + status.put(identifier, PAV_INIT_STATUS.INACTIVE); + + throw new RuntimeException("Failed to handle message: " + + message + " for instance " + identifier + " " + + Thread.currentThread(), e); } } @@ -487,6 +593,7 @@ } } else if (message.startsWith("destroy")) { dispose(); + status.put(identifier, PAV_INIT_STATUS.INACTIVE); } else if (message.startsWith("GetJavaObject")) { // FIXME: how do we determine what security context this // object should belong to? @@ -1291,26 +1398,28 @@ * the last applet. */ void appletClose() { - - // The caller thread is event dispatch thread, so - // spawn a new thread to avoid blocking the event queue - // when calling appletShutdown. - // - final AppletPanel p = panel; - - new Thread(new Runnable() - { - public void run() - { - appletShutdown(p); - appletPanels.removeElement(p); - dispose(); - - if (countApplets() == 0) { - appletSystemExit(); - } - } - }).start(); + + // The caller thread is event dispatch thread, so + // spawn a new thread to avoid blocking the event queue + // when calling appletShutdown. + // + final AppletPanel p = panel; + + new Thread(new Runnable() + { + public void run() + { + appletShutdown(p); + appletPanels.removeElement(p); + dispose(); + + if (countApplets() == 0) { + appletSystemExit(); + } + } + }).start(); + + status.put(identifier, PAV_INIT_STATUS.INACTIVE); } /** diff -r e6350d5249d3 rt/net/sourceforge/jnlp/NetxPanel.java --- a/rt/net/sourceforge/jnlp/NetxPanel.java Tue Jun 16 10:58:00 2009 -0400 +++ b/rt/net/sourceforge/jnlp/NetxPanel.java Tue Jun 16 15:13:28 2009 -0400 @@ -144,7 +144,7 @@ } public boolean isAlive() { - return handler.isAlive() && this.appletAlive; + return handler != null && handler.isAlive() && this.appletAlive; } } From omajid at redhat.com Tue Jun 16 12:49:52 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 15:49:52 -0400 Subject: RFC: Netx - Refactor paths Message-ID: <4A37F760.3050904@redhat.com> Hi, This patch consolidates file paths spread throughout netx code into JNLPRuntime.java. ChangeLog: 2009-06-16 Omair Majid * rt/net/sourceforge/jnlp/runtime/Boot.java: Remove aboutFile. (getAboutFile): Get path from JNLPRuntime. (getBaseDir): Fix comments. * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java Add HOME_DIR, NETXRC_FILE, NETX_DIR, SECURITY_DIR, CERTIFICATES_FILE, LOCKS_DIR, and NETX_ABOUT_FILE. (getDefaultBaseDir): Remove calls to loadWindowIcon and isHeadless() because they are unused. Use HOME_DIR and NETX_DIR. (getProperties): Use NETXRC_FILE instead of hardcoded file name. * rt/net/sourceforge/jnlp/security/SecurityUtil.java Remove homeDir, certDir and certFile. (getTrustedCertsFilename): Use HOME_DIR and CERTIFICATES_FILE. (checkTrustedCertsFile): Find parent directory from certFile. Any comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-refactor-file-paths.patch Type: text/x-patch Size: 5804 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090616/81128eb7/netx-refactor-file-paths.patch From gnu_andrew at member.fsf.org Tue Jun 16 13:15:25 2009 From: gnu_andrew at member.fsf.org (gnu_andrew at member.fsf.org) Date: Tue, 16 Jun 2009 21:15:25 +0100 Subject: [PATCH 1 of 2] Fix CACAO build with GCC 4.4 In-Reply-To: References: Message-ID: <883001a6b00ead3fa58f.1245183325@rivendell.middle-earth.co.uk> # HG changeset patch # User Andrew John Hughes # Date 1245174543 -3600 # Node ID 883001a6b00ead3fa58f0c12ac60ced3832ba326 # Parent b88686f19b34952c3c0e581d52507695aecb2ff2 Fix CACAO build with GCC 4.4 diff -r b88686f19b34 -r 883001a6b00e Makefile.am --- a/Makefile.am Mon Jun 15 15:44:37 2009 -0400 +++ b/Makefile.am Tue Jun 16 18:49:03 2009 +0100 @@ -614,7 +614,8 @@ if BUILD_CACAO ICEDTEA_PATCHES += \ patches/icedtea-cacao.patch \ - patches/icedtea-cacao-no-mmap-first-page.patch + patches/icedtea-cacao-no-mmap-first-page.patch \ + patches/cacao/no-strict-aliasing.patch endif if WITH_CACAO ICEDTEA_PATCHES += \ diff -r b88686f19b34 -r 883001a6b00e patches/cacao/no-strict-aliasing.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/no-strict-aliasing.patch Tue Jun 16 18:49:03 2009 +0100 @@ -0,0 +1,12 @@ +diff -ur cacao-0.99.4.orig/configure cacao-0.99.4/configure +--- cacao.orig/cacao/configure 2009-03-16 12:44:25.000000000 +0100 ++++ cacao/cacao/configure 2009-06-05 17:58:48.000000000 +0200 +@@ -2825,7 +2825,7 @@ + + + if test x"$CFLAGS" = "x"; then +- OPT_CFLAGS="-g -O2" ++ OPT_CFLAGS="-g -O2 -fno-strict-aliasing" + else + OPT_CFLAGS=$CFLAGS + fi From gnu_andrew at member.fsf.org Tue Jun 16 13:15:24 2009 From: gnu_andrew at member.fsf.org (gnu_andrew at member.fsf.org) Date: Tue, 16 Jun 2009 21:15:24 +0100 Subject: [PATCH 0 of 2] CACAO build fixes Message-ID: The following two patches make changes to the CACAO build on IcedTea6. The first includes a patch already in IcedTea7 so that CACAO works again when compiled with GCC 4.4 on x86_64. The second moves the cacao patches to their own subdirectory, again as on IcedTea7. Ok to commit? Can we also backport the first patch to 1.5? -- Andrew :) From gnu_andrew at member.fsf.org Tue Jun 16 13:15:26 2009 From: gnu_andrew at member.fsf.org (gnu_andrew at member.fsf.org) Date: Tue, 16 Jun 2009 21:15:26 +0100 Subject: [PATCH 2 of 2] Move CACAO patches to cacao subdirectory In-Reply-To: References: Message-ID: <21664ac311a478a1cc94.1245183326@rivendell.middle-earth.co.uk> # HG changeset patch # User Andrew John Hughes # Date 1245175876 -3600 # Node ID 21664ac311a478a1cc94f22153320b6416b9332d # Parent 883001a6b00ead3fa58f0c12ac60ced3832ba326 Move CACAO patches to cacao subdirectory diff -r 883001a6b00e -r 21664ac311a4 Makefile.am --- a/Makefile.am Tue Jun 16 18:49:03 2009 +0100 +++ b/Makefile.am Tue Jun 16 19:11:16 2009 +0100 @@ -613,14 +613,14 @@ if BUILD_CACAO ICEDTEA_PATCHES += \ - patches/icedtea-cacao.patch \ - patches/icedtea-cacao-no-mmap-first-page.patch \ + patches/cacao/launcher.patch \ + patches/cacao/no-mmap-first-page.patch \ patches/cacao/no-strict-aliasing.patch endif if WITH_CACAO ICEDTEA_PATCHES += \ - patches/icedtea-cacao-ignore-jdi-tests.patch \ - patches/icedtea-cacao-ignore-tests.patch + patches/cacao/ignore-jdi-tests.patch \ + patches/cacao/ignore-tests.patch endif if ENABLE_PULSE_JAVA diff -r 883001a6b00e -r 21664ac311a4 patches/cacao/ignore-jdi-tests.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/ignore-jdi-tests.patch Tue Jun 16 19:11:16 2009 +0100 @@ -0,0 +1,1359 @@ +--- openjdk/jdk/test/com/sun/jdi/TemplateTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/TemplateTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -26,6 +26,7 @@ + // TEMPLATE: delete TEMPLATE lines + /** + * @test ++ * @ignore cacao nyi + * @bug 0000000 + * @summary

+ * +--- openjdk/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 6394084 + # @summary Redefine class can't handle addition of 64 bit constants in JDK1.5.0_05 + # +--- openjdk/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test/nodynamiccopyright/ ++ * @ignore cacao nyi + * @bug 4952629 4870514 + * @summary REGRESSION: javac generates a spurious line number entry on } else { + * +--- openjdk/jdk/test/com/sun/jdi/Redefine-g.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/Redefine-g.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4777868 + # @summary Compile with java -g, do a RedefineClasses, and you don't get local vars + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/RedefineClasses.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineClasses.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4628760 + # @summary RedefineClasses gets assertion: "Should be a method entry in cpcache!" + # @author jjh +--- openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6431735 + * @summary Unexpected ClassCastException in ThreadReference.forceEarlyReturn + * @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4513488 + * @summary Test for JDI: Internal JDI helper threads should setDaemon(true) + * +--- openjdk/jdk/test/com/sun/jdi/RedefineException.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineException.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4559100 + # @summary The VM crashes when a method in a redefined class throws an exception. + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/LocationTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/LocationTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4419453 + * @summary Test that Method.location() returns the right values + * +--- openjdk/jdk/test/com/sun/jdi/LineNumberInfo.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/LineNumberInfo.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4238644 4238643 4238641 4944198 + * @summary Test javac regressions in the generation of line number info + * @author Gordon Hirsch +--- openjdk/jdk/test/com/sun/jdi/GetSetLocalTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/GetSetLocalTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** hard coded linenumbers in other tests - DO NOT CHANGE + * @test/nodynamiccopyright/ ++ * @ignore cacao nyi + * @bug 4300412 + * @summary Test GetLocal* and SetLocal* functions + * +--- openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4507088 + # @summary TTY: Add a comment delimiter to the jdb command set + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/WatchFramePop.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/WatchFramePop.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4546478 + # @summary Enabling a watchpoint can kill following NotifyFramePops + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/FinalLocalsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FinalLocalsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4326648 4768329 + * @summary Test to verify that table entries are generated for all final + * locals when a class is built for debug, even if they could be +--- openjdk/jdk/test/com/sun/jdi/ClassesByName.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ClassesByName.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4287992 + * @author Robert Field + * +--- openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4525714 + # @summary jtreg test PopAsynchronousTest fails in build 85 with -Xcomp + # @author Jim Holmlund/Swamy Venkataramanappa +--- openjdk/jdk/test/com/sun/jdi/OptionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/OptionTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /* + * @test OptionTest ++ * @ignore cacao nyi + * @bug 5095072 + * @summary Test for misc jdwp options, just that the option is parsed + * @author Kelly O'Hair (copied from Tim Bell's NoLaunchOptionTest) +--- openjdk/jdk/test/com/sun/jdi/VMDeathLastTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/VMDeathLastTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4420844 4449394 + * @summary Checks that no events are sent after VMDeath, and test vm.canBeModified + * +--- openjdk/jdk/test/com/sun/jdi/InstanceFilter.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/InstanceFilter.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4312961 + * @summary Verify that an instance filter on a MethodEntryRequest works + * properly. +--- openjdk/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4448658 + # @summary javac produces the inconsistent variable debug in while loops. + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/SuspendThreadTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/SuspendThreadTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6485605 + * @summary com.sun.jdi.InternalException: Inconsistent suspend policy in internal event handler + * +--- openjdk/jdk/test/com/sun/jdi/UTF8Test.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/UTF8Test.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 5033550 + * @summary JDWP back end uses modified UTF-8 + * +--- openjdk/jdk/test/com/sun/jdi/RedefineStep.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineStep.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4689395 + # @summary "step over" after a class is redefined acts like "step out" + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/RedefineTTYLineNumber.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineTTYLineNumber.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4660756 + # @summary TTY: Need to clear source cache after doing a redefine class + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/JdbMethodExitTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JdbMethodExitTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 6202891 + # @summary TTY: Add support for method exit event return values to jdb + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 6270982 + # @summary Redefine a class so that the order of external classes in + # the constant pool are changed. +--- openjdk/jdk/test/com/sun/jdi/ListenAddress.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ListenAddress.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 4932074 + * @summary Test that startListening(Map) method of the com.sun.jdi.SocketListen + * Connector returns an address that is usable for the address option on +--- openjdk/jdk/test/com/sun/jdi/ClassesByName2Test.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ClassesByName2Test.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4406439 4925740 + * @summary ClassesByName2 verifies that all the classes in the loaded class list can be found with classesByName.. + * +--- openjdk/jdk/test/com/sun/jdi/UnpreparedByName.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/UnpreparedByName.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4368402 + * @summary UnpreparedByName verifies that unprepared classes + * won't be returned by classesByName. +--- openjdk/jdk/test/com/sun/jdi/RedefineFinal.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineFinal.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4788344 + # @summary RedefineClasses is an apparent no-op if instance method is final + # +--- openjdk/jdk/test/com/sun/jdi/FramesTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FramesTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4434232 + * @summary Test ThreadReference.frames(int,int) + * +--- openjdk/jdk/test/com/sun/jdi/ArrayRangeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ArrayRangeTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4439631 + * @bug 4448721 + * @bug 4448603 +--- openjdk/jdk/test/com/sun/jdi/AfterThreadDeathTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/AfterThreadDeathTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4364671 + * @summary Creating a StepRequest on a nonexistant thread fails + * +--- openjdk/jdk/test/com/sun/jdi/LaunchCommandLine.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/LaunchCommandLine.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4245011 + * @summary Test launcher command line construction + * @author Gordon Hirsch +--- openjdk/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4453310 + * @summary Test the deletion of event requests that are expired + * by virtue of addCountFilter. +--- openjdk/jdk/test/com/sun/jdi/SDENullTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/SDENullTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4621289 + * @summary vm.setDefaultStratum(null) causes a Null Ptr exception + * +--- openjdk/jdk/test/com/sun/jdi/RedefineAnnotation.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineAnnotation.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 5002251 6407335 6412391 + # @summary Redefine a class that has an annotation and verify that the + # new annotation is returned. +--- openjdk/jdk/test/com/sun/jdi/VMDeathRequestTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/VMDeathRequestTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4419314 + * @author Robert Field + * +--- openjdk/jdk/test/com/sun/jdi/PopAsynchronousTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/PopAsynchronousTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4467564 + * @summary Test the popping of frames in an asynchronous context + * (that is, when suspended by the debugger at random points) +--- openjdk/jdk/test/com/sun/jdi/InvokeHangTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/InvokeHangTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6293795 + * @summary Backend hangs when invokeMethod is called from a JDI eventHandler + * +--- openjdk/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4425852 + * @author Robert Field + * +--- openjdk/jdk/test/com/sun/jdi/EarlyReturnTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/EarlyReturnTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /* + * @test ++ * @ignore cacao nyi + * @bug 6175634 + * @summary Allow early return from methods + * +--- openjdk/jdk/test/com/sun/jdi/ArgumentValuesTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ArgumentValuesTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** hard coded linenumbers in other tests - DO NOT CHANGE + * @test/nodynamiccopyright/ ++ * @ignore cacao nyi + * @bug 4490824 + * @summary JDI: provide arguments when no debug attributes present + * +--- openjdk/jdk/test/com/sun/jdi/ImmutableResourceTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 6287579 + # @summary SubClasses of ListResourceBundle should fix getContents() + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/ProcessAttachTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ProcessAttachTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + + # @test ++# @ignore cacao nyi + # @bug 4527279 + # @summary Unit test for ProcessAttachingConnector + # +--- openjdk/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4195445 6204179 + * @summary JDWP, JDI: Add return value to Method Exit Event + * @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/PopAndStepTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/PopAndStepTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -2,6 +2,7 @@ + // THIS TEST IS LINE NUMBER SENSITIVE + /** + * @test ++ * @ignore cacao nyi + * @bug 4530424 + * @summary Hin says that doing a step over after a popframe acts like a resume. + * +--- openjdk/jdk/test/com/sun/jdi/PopAndInvokeTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/PopAndInvokeTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6517249 + * @summary JDWP: Cannot do an invokeMethod after a popFrames operation + * +--- openjdk/jdk/test/com/sun/jdi/JdbArgTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JdbArgTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4684386 + # @summary TTY: jdb throws IllegalArumentException on cmd line args + # @author Jim/suvasis +--- openjdk/jdk/test/com/sun/jdi/PrivateTransportTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/PrivateTransportTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test PrivateTransportTest.sh ++# @ignore cacao nyi + # @bug 6225664 6220618 + # @summary Test for when private transport library outside jdk + # @author Kelly O'Hair +--- openjdk/jdk/test/com/sun/jdi/CountFilterTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CountFilterTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4321339 + * @summary Check correct processing of filters after a count filter + * +--- openjdk/jdk/test/com/sun/jdi/TwoThreadsTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/TwoThreadsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6296125 + * @summary JDI: Disabling an EventRequest can cause a multi-threaded debuggee to hang + * +--- openjdk/jdk/test/com/sun/jdi/ThreadGroupTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ThreadGroupTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4893530 + * @summary If JDI is initially started from a thread group that is subsequently + * destroyed this should not impact subsequent thread creation by +--- openjdk/jdk/test/com/sun/jdi/InvokeTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/InvokeTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4451941 4527072 + * @summary Test argument types for invoke + * +--- openjdk/jdk/test/com/sun/jdi/NewInstanceTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/NewInstanceTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4419450 + * @summary Test newInstance() for arrays - currently covers + * only reference type arrays (see bug #4450091). +--- openjdk/jdk/test/com/sun/jdi/MixedSuspendTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/MixedSuspendTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 6224859 + # @summary JDWP: Mixing application suspends and debugger suspends can cause hangs + # +--- openjdk/jdk/test/com/sun/jdi/InterruptHangTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/InterruptHangTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test ++ * @ignore cacao nyi + * @bug 6459476 + * @summary Debuggee is blocked, looks like running + * +--- openjdk/jdk/test/com/sun/jdi/MonitorEventTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/MonitorEventTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4401399 + * @summary Simple basic test of jdi Monitor request and event. + * +--- openjdk/jdk/test/com/sun/jdi/AcceptTimeout.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/AcceptTimeout.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 6198277 + * @summary Test that each ListeningConnector that supports a "timeout" argument will + * timeout with TransportTimeoutException +--- openjdk/jdk/test/com/sun/jdi/ZZZcleanup.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ZZZcleanup.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 1234567 + # @summary no bug + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/ConstantPoolInfo.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ConstantPoolInfo.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 5024104 + * @summary Test ReferenceType.majorVersion(), minorVersion, constantPoolCount and ConstantPool apis. + * +--- openjdk/jdk/test/com/sun/jdi/CatchCaughtTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CatchCaughtTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4788864 + # @summary TTY: 'catch caught' with no class pattern throws NullPointerException + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/JdbMissStep.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JdbMissStep.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4762765 + # @summary REGRESSION: jdb / jdi not stopping at some breakpoints and steps in j2sdk1.4. + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/Vars.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/Vars.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @summary Test Method.variables() and the like. + * + * @author Robert Field +--- openjdk/jdk/test/com/sun/jdi/UnpreparedClasses.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/UnpreparedClasses.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4368402 + * @summary UnpreparedClasses verifies that all the classes in the + * loaded class list are prepared classes. +--- openjdk/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4331872 + * @summary erm.deleteEventRequests(erm.breakpointRequests()) throws exception + * +--- openjdk/jdk/test/com/sun/jdi/PopSynchronousTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/PopSynchronousTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4467564 + * @summary Test the popping of frames in synchronous context + * (that is, when stopped at an event) +--- openjdk/jdk/test/com/sun/jdi/MultiBreakpointsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/MultiBreakpointsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4359247 + * @summary Breakpoints on multiple threads have problems. + * +--- openjdk/jdk/test/com/sun/jdi/RedefineCrossStart.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineCrossStart.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4628726 + * @summary Test class redefinition at start only (they use breakpoint + * or resumeTo()) cross tested with other tests. +--- openjdk/jdk/test/com/sun/jdi/SourceNameFilterTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/SourceNameFilterTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4836939 + * @summary JDI add addSourceNameFilter to ClassPrepareRequest + * +--- openjdk/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4422141 4695338 + # @summary TTY: .length field for arrays in print statements in jdb not recognized + # TTY: dump command not implemented. +--- openjdk/jdk/test/com/sun/jdi/CatchAllTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CatchAllTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4749692 + # @summary REGRESSION: jdb rejects the syntax catch java.lang.IndexOutOfBoundsException + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/JdbLockTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JdbLockTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4847812 + # @summary TTY: jdb lock command displays incorrect data + # @author Jim Holmlund +--- openjdk/jdk/test/com/sun/jdi/CountEvent.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CountEvent.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4315352 + * @summary disabling EventRequest expired with addCountFilter() throws + * InternalException. +--- openjdk/jdk/test/com/sun/jdi/StringConvertTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/StringConvertTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4511950 4843082 + # @summary 1. jdb's expression evaluation doesn't perform string conversion properly + # 2. TTY: run on expression evaluation +--- openjdk/jdk/test/com/sun/jdi/EnumTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/EnumTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4728816 + * @summary JPDA: Add support for enums + * +--- openjdk/jdk/test/com/sun/jdi/redefine/RedefineTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/redefine/RedefineTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4287595 + * @bug 4462989 + * @bug 4531511 +--- openjdk/jdk/test/com/sun/jdi/RedefineMulti.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineMulti.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4724076 + # @summary Redefine does not work in for/while loop + # @author Jim Holmlund/Swamy Venkataramanappa +--- openjdk/jdk/test/com/sun/jdi/FinalizerTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FinalizerTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4272800 4274208 4392010 + * @summary Test debugger operations in finalize() methods + * @author Gordon Hirsch (modified for HotSpot by tbell & rfield) +--- openjdk/jdk/test/com/sun/jdi/RedefineCrossEvent.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineCrossEvent.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4628726 + * @summary Test class redefinition at each event cross tested with other tests + * +--- openjdk/jdk/test/com/sun/jdi/NoLocInfoTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/NoLocInfoTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4642611 + * @summary Test that method.allLineLocations() should + * throw AbsentInformationException exception +--- openjdk/jdk/test/com/sun/jdi/MethodEntryExitEvents.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/MethodEntryExitEvents.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4409241 4432820 + * @summary Test the bug fix for: MethodExitEvents disappear when Object-Methods are called from main + * @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/GetLocalVariables2Test.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables2Test.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4349534 4690242 4695338 + * @summary regression - bad LocalVariableTable attribute when no initialization needed + * +--- openjdk/jdk/test/com/sun/jdi/AccessSpecifierTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/AccessSpecifierTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4359628 + * @summary Test fix for JDI: methods Accessible.is...() lie about array types + * +--- openjdk/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4450091 + * @summary Test ClassLoaderReference.visibleClasses() which is + * a direct pass-through of the JVMDI function GetClassLoaderClasses +--- openjdk/jdk/test/com/sun/jdi/DoubleAgentTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/DoubleAgentTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 6354345 + * @summary Check that a double agent request fails + * +--- openjdk/jdk/test/com/sun/jdi/JdbVarargsTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JdbVarargsTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4870984 + # @summary JPDA: Add support for RFE 4856541 - varargs + # +--- openjdk/jdk/test/com/sun/jdi/FilterNoMatch.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FilterNoMatch.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4331522 + * @summary addClassFilter("Foo") acts like "Foo*" + * +--- openjdk/jdk/test/com/sun/jdi/ExceptionEvents.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ExceptionEvents.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4407397 + * @summary Test the requesting of exception events + * +--- openjdk/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4528948 + * @summary Unable to finish a debugging in NetBeans IDE + * +--- openjdk/jdk/test/com/sun/jdi/CompatibleConnectors.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CompatibleConnectors.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 4287596 + * @summary Unit test for "Pluggable Connectors and Transports" feature. + * +--- openjdk/jdk/test/com/sun/jdi/EvalArgs.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/EvalArgs.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4663146 + # @summary Arguments match no method error + # @author Jim Holmlund/Suvasis +--- openjdk/jdk/test/com/sun/jdi/BadHandshakeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/BadHandshakeTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 6306165 + * @summary Check that a bad handshake doesn't cause a debuggee to abort + * +--- openjdk/jdk/test/com/sun/jdi/ConnectedVMs.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ConnectedVMs.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4329140 + * @author Robert Field + * +--- openjdk/jdk/test/com/sun/jdi/RepStep.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RepStep.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4334008 + * @author Robert Field + * +--- openjdk/jdk/test/com/sun/jdi/RedefineImplementor.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineImplementor.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 6173560 + # @summary Redefine a class that implements an interface + # and verify that a subclass calls the right method. +--- openjdk/jdk/test/com/sun/jdi/NullLocalVariable.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/NullLocalVariable.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4690242 4695338 + # @summary TTY: jdb throws NullPointerException when printing local variables + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/BacktraceFieldTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/BacktraceFieldTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4446677 + * @summary debuggee crashes when debugging under jbuilder + * +--- openjdk/jdk/test/com/sun/jdi/SuspendNoFlagTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/SuspendNoFlagTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test SuspendNoFlagTest.sh ++# @ignore cacao nyi + # @bug 4914611 + # @summary Test for JDWP: -agentlib:jdwp=suspend=n hanging + # @author Kelly O'Hair +--- openjdk/jdk/test/com/sun/jdi/StepTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/StepTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4270488 4787861 + * @author Gordon Hirsch + * +--- openjdk/jdk/test/com/sun/jdi/VarargsTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/VarargsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4870984 + * @summary JPDA: Add support for RFE 4856541 - varargs + * +--- openjdk/jdk/test/com/sun/jdi/FilterMatch.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FilterMatch.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4331522 + * @summary addClassFilter("Foo") acts like "Foo*" + * +--- openjdk/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4628726 + * @summary Test class redefinition - method data line numbers and local vars, + * +--- openjdk/jdk/test/com/sun/jdi/NotAField.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/NotAField.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4467887 4913748 + # @summary TTY: NullPointerException at + # com.sun.tools.jdi.MirrorImpl.validateMirrors +--- openjdk/jdk/test/com/sun/jdi/MonitorFrameInfo.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/MonitorFrameInfo.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6230699 + * @summary Test ThreadReference.ownedMonitorsAndFrames() + * +--- openjdk/jdk/test/com/sun/jdi/NoLaunchOptionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/NoLaunchOptionTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /* + * @test NoLaunchOptionTest.java ++ * @ignore cacao nyi + * @bug 4554734 4724714 + * @summary Test for -Xrunjdwp:[onthrow,onuncaught] suboptions require launch suboption + * @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/AllLineLocations.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/AllLineLocations.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4248728 + * @summary Test ReferenceType.allLineLocations + * @author Gordon Hirsch +--- openjdk/jdk/test/com/sun/jdi/FieldWatchpoints.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FieldWatchpoints.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4408582 + * @summary Test fix for: JDWP: WatchpointEvents outside of class filtered out + * +--- openjdk/jdk/test/com/sun/jdi/RedefineClearBreakpoint.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefineClearBreakpoint.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4705330 + # @summary Netbeans Fix and Continue crashes JVM + # @author Jim Holmlund/Swamy Venkataramanappa +--- openjdk/jdk/test/com/sun/jdi/CatchPatternTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/CatchPatternTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4671838 + # @summary TTY: surprising ExceptionSpec.resolveEventRequest() wildcard results + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test Solaris32AndSolaris64Test.sh ++# @ignore cacao nyi + # @bug 4478312 4780570 4913748 + # @summary Test debugging with mixed 32/64bit VMs. + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/GenericsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/GenericsTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4421040 + * @summary JPDA: Add support for JSR-014 Generics + * +--- openjdk/jdk/test/com/sun/jdi/BreakpointTest.java.orig 2008-08-28 08:19:45.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/BreakpointTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 6496524 + * @summary Setting breakpoint in jdb crashes Hotspot JVM + * +--- openjdk/jdk/test/com/sun/jdi/OnThrowTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/OnThrowTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /* + * @test OnThrowTest.java ++ * @ignore cacao nyi + * @bug 6263814 + * @summary Test for -agentlib::[onthrow,launch] + * @author Kelly O'Hair +--- openjdk/jdk/test/com/sun/jdi/GetLocalVariables.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** hard coded linenumbers in this test - DO NOT CHANGE + * @test/nodynamiccopyright/ ++ * @ignore cacao nyi + * @bug 4359312 4450091 + * @summary Test PTR 1421 JVM exceptions making a call to LocalVariable.type().name() + * +--- openjdk/jdk/test/com/sun/jdi/LocalVariableEqual.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/LocalVariableEqual.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4916263 + * @summary Test + * +--- openjdk/jdk/test/com/sun/jdi/Java_gTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/Java_gTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4500906 4433599 4740097 + * @summary vmexec= debug java fails for SunCommandLineLauncher + * +--- openjdk/jdk/test/com/sun/jdi/ExclusiveBind.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ExclusiveBind.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 4531526 + * @summary Test that more than one debuggee cannot bind to same port + * at the same time. +--- openjdk/jdk/test/com/sun/jdi/sde/MangleStepTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/sde/MangleStepTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test ++ * @ignore cacao nyi + * @bug 4390869 + * @bug 4460328 + * @summary Test Stepping in the new SourceDebugExtension facility +--- openjdk/jdk/test/com/sun/jdi/sde/MangleTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/sde/MangleTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test ++ * @ignore cacao nyi + * @bug 4390869 + * @bug 4460328 + * @summary Test the new SourceDebugExtension facility +--- openjdk/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test ++ * @ignore cacao nyi + * @bug 4390869 + * @bug 4460328 + * @summary Test the new SourceDebugExtension facility +--- openjdk/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test ++ * @ignore cacao nyi + * @bug 4390869 + * @bug 4460328 + * @summary Test the new SourceDebugExtension facility +--- openjdk/jdk/test/com/sun/jdi/sde/FilterMangleTest.java.orig 2008-08-28 08:19:48.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/sde/FilterMangleTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** + * @test ++ * @ignore cacao nyi + * @bug 4836939 + * @summary JDI add addSourceNameFilter to ClassPrepareRequest + * +--- openjdk/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 5055681 + # @summary Test loading JDI classes via custom class loader + +--- openjdk/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 4287596 + * @summary Unit test for "Pluggable Connectors and Transports" feature. + * +--- openjdk/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 4287596 + * @summary Unit test for "Pluggable Connectors and Transports" feature. + * +--- openjdk/jdk/test/com/sun/jdi/ReferrersTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ReferrersTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 5089849 + * @summary Add support for backtracking reference graph. + * @author jjh +--- openjdk/jdk/test/com/sun/jdi/RedefinePop.sh.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RedefinePop.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -24,6 +24,7 @@ + # + + # @test ++# @ignore cacao nyi + # @bug 4622663 + # @summary redefine and pop top frame from jdb gets assertion failure + # @author Jim Holmlund/Swamy Venkataramanappa +--- openjdk/jdk/test/com/sun/jdi/JITDebug.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JITDebug.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test JITDebug.sh 1.7 03/09/05 ++# @ignore cacao nyi + # @bug 4291701 4376819 4422312 4522770 4913748 + # @summary Test JIT debugging - assure that launching on + # uncaught exception works +--- openjdk/jdk/test/com/sun/jdi/ModificationWatchpoints.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/ModificationWatchpoints.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4409582 + * @summary Test all info returned by modification watchpoints + * +--- openjdk/jdk/test/com/sun/jdi/FetchLocals.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/FetchLocals.java 2008-10-19 15:21:54.000000000 +0000 +@@ -1,5 +1,6 @@ + /** hard coded linenumbers in test - DO NOT CHANGE + * @test/nodynamiccopyright/ ++ * @ignore cacao nyi + * @bug 4386002 4429245 + * @summary Test fix for: Incorrect values reported for some locals of type long + * +--- openjdk/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4981536 + # @summary TTY: .jdbrc is read twice if jdb is run in the user's home dir + # @author jjh +--- openjdk/jdk/test/com/sun/jdi/HomeTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/HomeTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4446294 + * @summary JDI spec/impl: default "home" for CommandLineLaunch isn't java.home + * +--- openjdk/jdk/test/com/sun/jdi/RequestReflectionTest.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RequestReflectionTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 4425840 + * @author Robert Field + * +--- openjdk/jdk/test/com/sun/jdi/RunToExit.java.orig 2008-08-28 08:19:47.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/RunToExit.java 2008-10-19 15:21:54.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + /* @test ++ * @ignore cacao nyi + * @bug 4997445 + * @summary Test that with server=y, when VM runs to System.exit() no error happens + * +--- openjdk/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh 2008-10-19 15:21:54.000000000 +0000 +@@ -25,6 +25,7 @@ + + # + # @test ++# @ignore cacao nyi + # @bug 4070747 4486859 + # @summary Compiler fails to generate local var tbl entry for exception passed to catch + # @author Tim Bell +--- openjdk/jdk/test/com/sun/jdi/InstancesTest.java.orig 2008-08-28 08:19:46.000000000 +0000 ++++ openjdk/jdk/test/com/sun/jdi/InstancesTest.java 2008-10-19 15:21:54.000000000 +0000 +@@ -23,6 +23,7 @@ + + /** + * @test ++ * @ignore cacao nyi + * @bug 5024119 + * @summary Add ReferenceType.getAllInstances () method to JDI. + * @author jjh diff -r 883001a6b00e -r 21664ac311a4 patches/cacao/ignore-tests.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/ignore-tests.patch Tue Jun 16 19:11:16 2009 +0100 @@ -0,0 +1,10 @@ +--- openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java~ 2008-08-28 10:20:49.000000000 +0200 ++++ openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java 2008-10-19 17:02:41.000000000 +0200 +@@ -37,6 +37,7 @@ + * @compile -source 1.5 ProducerConsumerLoops.java + * @run main/timeout=3600 ProducerConsumerLoops + * @summary multiple producers and consumers using blocking queues ++ * @ignore cacao test hog, ignore for the sake of buildds + */ + + import java.util.concurrent.*; diff -r 883001a6b00e -r 21664ac311a4 patches/cacao/launcher.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/launcher.patch Tue Jun 16 19:11:16 2009 +0100 @@ -0,0 +1,50 @@ +--- 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); + } + } + +--- openjdk/jdk/make/docs/Makefile~ 2008-05-30 09:50:36.000000000 +0200 ++++ openjdk/jdk/make/docs/Makefile 2008-07-02 14:26:54.306671792 +0200 +@@ -58,7 +58,7 @@ + ifeq ($(ARCH_DATA_MODEL),64) + MAX_VM_MEMORY = 1024 + else +- MAX_VM_MEMORY = 512 ++ MAX_VM_MEMORY = 768 + endif + + # diff -r 883001a6b00e -r 21664ac311a4 patches/cacao/no-mmap-first-page.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/no-mmap-first-page.patch Tue Jun 16 19:11:16 2009 +0100 @@ -0,0 +1,23 @@ +--- cacao/cacao/src/vm/jit/trap.c.orig 2008-07-07 13:36:19.000000000 +0200 ++++ cacao/cacao/src/vm/jit/trap.c 2008-07-23 10:45:30.480113152 +0200 +@@ -59,20 +59,6 @@ + */ + void trap_init(void) + { +-#if !(defined(__ARM__) && defined(__LINUX__)) +- /* On arm-linux the first memory page can't be mmap'ed, as it +- contains the exception vectors. */ +- +- int pagesize; +- +- /* mmap a memory page at address 0x0, so our hardware-exceptions +- work. */ +- +- pagesize = system_getpagesize(); +- +- (void) system_mmap_anonymous(NULL, pagesize, PROT_NONE, MAP_PRIVATE | MAP_FIXED); +-#endif +- + TRACESUBSYSTEMINITIALIZATION("trap_init"); + + #if !defined(TRAP_INSTRUCTION_IS_LOAD) diff -r 883001a6b00e -r 21664ac311a4 patches/icedtea-cacao-ignore-jdi-tests.patch --- a/patches/icedtea-cacao-ignore-jdi-tests.patch Tue Jun 16 18:49:03 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1359 +0,0 @@ ---- openjdk/jdk/test/com/sun/jdi/TemplateTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/TemplateTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -26,6 +26,7 @@ - // TEMPLATE: delete TEMPLATE lines - /** - * @test -+ * @ignore cacao nyi - * @bug 0000000 - * @summary - * ---- openjdk/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineIntConstantToLong.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6394084 - # @summary Redefine class can't handle addition of 64 bit constants in JDK1.5.0_05 - # ---- openjdk/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LineNumberOnBraceTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4952629 4870514 - * @summary REGRESSION: javac generates a spurious line number entry on } else { - * ---- openjdk/jdk/test/com/sun/jdi/Redefine-g.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/Redefine-g.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4777868 - # @summary Compile with java -g, do a RedefineClasses, and you don't get local vars - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/RedefineClasses.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineClasses.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4628760 - # @summary RedefineClasses gets assertion: "Should be a method entry in cpcache!" - # @author jjh ---- openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6431735 - * @summary Unexpected ClassCastException in ThreadReference.forceEarlyReturn - * @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4513488 - * @summary Test for JDI: Internal JDI helper threads should setDaemon(true) - * ---- openjdk/jdk/test/com/sun/jdi/RedefineException.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineException.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4559100 - # @summary The VM crashes when a method in a redefined class throws an exception. - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/LocationTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LocationTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4419453 - * @summary Test that Method.location() returns the right values - * ---- openjdk/jdk/test/com/sun/jdi/LineNumberInfo.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LineNumberInfo.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4238644 4238643 4238641 4944198 - * @summary Test javac regressions in the generation of line number info - * @author Gordon Hirsch ---- openjdk/jdk/test/com/sun/jdi/GetSetLocalTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetSetLocalTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** hard coded linenumbers in other tests - DO NOT CHANGE - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4300412 - * @summary Test GetLocal* and SetLocal* functions - * ---- openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4507088 - # @summary TTY: Add a comment delimiter to the jdb command set - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/WatchFramePop.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/WatchFramePop.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4546478 - # @summary Enabling a watchpoint can kill following NotifyFramePops - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/FinalLocalsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FinalLocalsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4326648 4768329 - * @summary Test to verify that table entries are generated for all final - * locals when a class is built for debug, even if they could be ---- openjdk/jdk/test/com/sun/jdi/ClassesByName.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassesByName.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4287992 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4525714 - # @summary jtreg test PopAsynchronousTest fails in build 85 with -Xcomp - # @author Jim Holmlund/Swamy Venkataramanappa ---- openjdk/jdk/test/com/sun/jdi/OptionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/OptionTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /* - * @test OptionTest -+ * @ignore cacao nyi - * @bug 5095072 - * @summary Test for misc jdwp options, just that the option is parsed - * @author Kelly O'Hair (copied from Tim Bell's NoLaunchOptionTest) ---- openjdk/jdk/test/com/sun/jdi/VMDeathLastTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/VMDeathLastTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4420844 4449394 - * @summary Checks that no events are sent after VMDeath, and test vm.canBeModified - * ---- openjdk/jdk/test/com/sun/jdi/InstanceFilter.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/InstanceFilter.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4312961 - * @summary Verify that an instance filter on a MethodEntryRequest works - * properly. ---- openjdk/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables3Test.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4448658 - # @summary javac produces the inconsistent variable debug in while loops. - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/SuspendThreadTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/SuspendThreadTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6485605 - * @summary com.sun.jdi.InternalException: Inconsistent suspend policy in internal event handler - * ---- openjdk/jdk/test/com/sun/jdi/UTF8Test.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/UTF8Test.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 5033550 - * @summary JDWP back end uses modified UTF-8 - * ---- openjdk/jdk/test/com/sun/jdi/RedefineStep.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineStep.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4689395 - # @summary "step over" after a class is redefined acts like "step out" - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/RedefineTTYLineNumber.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineTTYLineNumber.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4660756 - # @summary TTY: Need to clear source cache after doing a redefine class - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/JdbMethodExitTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbMethodExitTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6202891 - # @summary TTY: Add support for method exit event return values to jdb - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineChangeClassOrder.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6270982 - # @summary Redefine a class so that the order of external classes in - # the constant pool are changed. ---- openjdk/jdk/test/com/sun/jdi/ListenAddress.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ListenAddress.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4932074 - * @summary Test that startListening(Map) method of the com.sun.jdi.SocketListen - * Connector returns an address that is usable for the address option on ---- openjdk/jdk/test/com/sun/jdi/ClassesByName2Test.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassesByName2Test.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4406439 4925740 - * @summary ClassesByName2 verifies that all the classes in the loaded class list can be found with classesByName.. - * ---- openjdk/jdk/test/com/sun/jdi/UnpreparedByName.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/UnpreparedByName.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4368402 - * @summary UnpreparedByName verifies that unprepared classes - * won't be returned by classesByName. ---- openjdk/jdk/test/com/sun/jdi/RedefineFinal.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineFinal.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4788344 - # @summary RedefineClasses is an apparent no-op if instance method is final - # ---- openjdk/jdk/test/com/sun/jdi/FramesTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FramesTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4434232 - * @summary Test ThreadReference.frames(int,int) - * ---- openjdk/jdk/test/com/sun/jdi/ArrayRangeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ArrayRangeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4439631 - * @bug 4448721 - * @bug 4448603 ---- openjdk/jdk/test/com/sun/jdi/AfterThreadDeathTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AfterThreadDeathTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4364671 - * @summary Creating a StepRequest on a nonexistant thread fails - * ---- openjdk/jdk/test/com/sun/jdi/LaunchCommandLine.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LaunchCommandLine.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4245011 - * @summary Test launcher command line construction - * @author Gordon Hirsch ---- openjdk/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4453310 - * @summary Test the deletion of event requests that are expired - * by virtue of addCountFilter. ---- openjdk/jdk/test/com/sun/jdi/SDENullTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/SDENullTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4621289 - * @summary vm.setDefaultStratum(null) causes a Null Ptr exception - * ---- openjdk/jdk/test/com/sun/jdi/RedefineAnnotation.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineAnnotation.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 5002251 6407335 6412391 - # @summary Redefine a class that has an annotation and verify that the - # new annotation is returned. ---- openjdk/jdk/test/com/sun/jdi/VMDeathRequestTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/VMDeathRequestTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4419314 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/PopAsynchronousTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/PopAsynchronousTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4467564 - * @summary Test the popping of frames in an asynchronous context - * (that is, when suspended by the debugger at random points) ---- openjdk/jdk/test/com/sun/jdi/InvokeHangTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/InvokeHangTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6293795 - * @summary Backend hangs when invokeMethod is called from a JDI eventHandler - * ---- openjdk/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4425852 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/EarlyReturnTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EarlyReturnTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /* - * @test -+ * @ignore cacao nyi - * @bug 6175634 - * @summary Allow early return from methods - * ---- openjdk/jdk/test/com/sun/jdi/ArgumentValuesTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ArgumentValuesTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** hard coded linenumbers in other tests - DO NOT CHANGE - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4490824 - * @summary JDI: provide arguments when no debug attributes present - * ---- openjdk/jdk/test/com/sun/jdi/ImmutableResourceTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6287579 - # @summary SubClasses of ListResourceBundle should fix getContents() - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/ProcessAttachTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ProcessAttachTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - - # @test -+# @ignore cacao nyi - # @bug 4527279 - # @summary Unit test for ProcessAttachingConnector - # ---- openjdk/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/MethodExitReturnValuesTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4195445 6204179 - * @summary JDWP, JDI: Add return value to Method Exit Event - * @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/PopAndStepTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/PopAndStepTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -2,6 +2,7 @@ - // THIS TEST IS LINE NUMBER SENSITIVE - /** - * @test -+ * @ignore cacao nyi - * @bug 4530424 - * @summary Hin says that doing a step over after a popframe acts like a resume. - * ---- openjdk/jdk/test/com/sun/jdi/PopAndInvokeTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/PopAndInvokeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6517249 - * @summary JDWP: Cannot do an invokeMethod after a popFrames operation - * ---- openjdk/jdk/test/com/sun/jdi/JdbArgTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbArgTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4684386 - # @summary TTY: jdb throws IllegalArumentException on cmd line args - # @author Jim/suvasis ---- openjdk/jdk/test/com/sun/jdi/PrivateTransportTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/PrivateTransportTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test PrivateTransportTest.sh -+# @ignore cacao nyi - # @bug 6225664 6220618 - # @summary Test for when private transport library outside jdk - # @author Kelly O'Hair ---- openjdk/jdk/test/com/sun/jdi/CountFilterTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CountFilterTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4321339 - * @summary Check correct processing of filters after a count filter - * ---- openjdk/jdk/test/com/sun/jdi/TwoThreadsTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/TwoThreadsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6296125 - * @summary JDI: Disabling an EventRequest can cause a multi-threaded debuggee to hang - * ---- openjdk/jdk/test/com/sun/jdi/ThreadGroupTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ThreadGroupTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4893530 - * @summary If JDI is initially started from a thread group that is subsequently - * destroyed this should not impact subsequent thread creation by ---- openjdk/jdk/test/com/sun/jdi/InvokeTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/InvokeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4451941 4527072 - * @summary Test argument types for invoke - * ---- openjdk/jdk/test/com/sun/jdi/NewInstanceTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/NewInstanceTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4419450 - * @summary Test newInstance() for arrays - currently covers - * only reference type arrays (see bug #4450091). ---- openjdk/jdk/test/com/sun/jdi/MixedSuspendTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/MixedSuspendTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6224859 - # @summary JDWP: Mixing application suspends and debugger suspends can cause hangs - # ---- openjdk/jdk/test/com/sun/jdi/InterruptHangTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/InterruptHangTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test -+ * @ignore cacao nyi - * @bug 6459476 - * @summary Debuggee is blocked, looks like running - * ---- openjdk/jdk/test/com/sun/jdi/MonitorEventTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/MonitorEventTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4401399 - * @summary Simple basic test of jdi Monitor request and event. - * ---- openjdk/jdk/test/com/sun/jdi/AcceptTimeout.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AcceptTimeout.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 6198277 - * @summary Test that each ListeningConnector that supports a "timeout" argument will - * timeout with TransportTimeoutException ---- openjdk/jdk/test/com/sun/jdi/ZZZcleanup.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ZZZcleanup.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 1234567 - # @summary no bug - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/ConstantPoolInfo.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ConstantPoolInfo.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 5024104 - * @summary Test ReferenceType.majorVersion(), minorVersion, constantPoolCount and ConstantPool apis. - * ---- openjdk/jdk/test/com/sun/jdi/CatchCaughtTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CatchCaughtTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4788864 - # @summary TTY: 'catch caught' with no class pattern throws NullPointerException - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/JdbMissStep.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbMissStep.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4762765 - # @summary REGRESSION: jdb / jdi not stopping at some breakpoints and steps in j2sdk1.4. - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/Vars.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/Vars.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @summary Test Method.variables() and the like. - * - * @author Robert Field ---- openjdk/jdk/test/com/sun/jdi/UnpreparedClasses.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/UnpreparedClasses.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4368402 - * @summary UnpreparedClasses verifies that all the classes in the - * loaded class list are prepared classes. ---- openjdk/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4331872 - * @summary erm.deleteEventRequests(erm.breakpointRequests()) throws exception - * ---- openjdk/jdk/test/com/sun/jdi/PopSynchronousTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/PopSynchronousTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4467564 - * @summary Test the popping of frames in synchronous context - * (that is, when stopped at an event) ---- openjdk/jdk/test/com/sun/jdi/MultiBreakpointsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/MultiBreakpointsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4359247 - * @summary Breakpoints on multiple threads have problems. - * ---- openjdk/jdk/test/com/sun/jdi/RedefineCrossStart.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineCrossStart.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4628726 - * @summary Test class redefinition at start only (they use breakpoint - * or resumeTo()) cross tested with other tests. ---- openjdk/jdk/test/com/sun/jdi/SourceNameFilterTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/SourceNameFilterTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4836939 - * @summary JDI add addSourceNameFilter to ClassPrepareRequest - * ---- openjdk/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4422141 4695338 - # @summary TTY: .length field for arrays in print statements in jdb not recognized - # TTY: dump command not implemented. ---- openjdk/jdk/test/com/sun/jdi/CatchAllTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CatchAllTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4749692 - # @summary REGRESSION: jdb rejects the syntax catch java.lang.IndexOutOfBoundsException - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/JdbLockTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbLockTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4847812 - # @summary TTY: jdb lock command displays incorrect data - # @author Jim Holmlund ---- openjdk/jdk/test/com/sun/jdi/CountEvent.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CountEvent.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4315352 - * @summary disabling EventRequest expired with addCountFilter() throws - * InternalException. ---- openjdk/jdk/test/com/sun/jdi/StringConvertTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/StringConvertTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4511950 4843082 - # @summary 1. jdb's expression evaluation doesn't perform string conversion properly - # 2. TTY: run on expression evaluation ---- openjdk/jdk/test/com/sun/jdi/EnumTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EnumTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4728816 - * @summary JPDA: Add support for enums - * ---- openjdk/jdk/test/com/sun/jdi/redefine/RedefineTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/redefine/RedefineTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4287595 - * @bug 4462989 - * @bug 4531511 ---- openjdk/jdk/test/com/sun/jdi/RedefineMulti.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineMulti.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4724076 - # @summary Redefine does not work in for/while loop - # @author Jim Holmlund/Swamy Venkataramanappa ---- openjdk/jdk/test/com/sun/jdi/FinalizerTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FinalizerTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4272800 4274208 4392010 - * @summary Test debugger operations in finalize() methods - * @author Gordon Hirsch (modified for HotSpot by tbell & rfield) ---- openjdk/jdk/test/com/sun/jdi/RedefineCrossEvent.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineCrossEvent.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4628726 - * @summary Test class redefinition at each event cross tested with other tests - * ---- openjdk/jdk/test/com/sun/jdi/NoLocInfoTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/NoLocInfoTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4642611 - * @summary Test that method.allLineLocations() should - * throw AbsentInformationException exception ---- openjdk/jdk/test/com/sun/jdi/MethodEntryExitEvents.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/MethodEntryExitEvents.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4409241 4432820 - * @summary Test the bug fix for: MethodExitEvents disappear when Object-Methods are called from main - * @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/GetLocalVariables2Test.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables2Test.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4349534 4690242 4695338 - * @summary regression - bad LocalVariableTable attribute when no initialization needed - * ---- openjdk/jdk/test/com/sun/jdi/AccessSpecifierTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AccessSpecifierTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4359628 - * @summary Test fix for JDI: methods Accessible.is...() lie about array types - * ---- openjdk/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4450091 - * @summary Test ClassLoaderReference.visibleClasses() which is - * a direct pass-through of the JVMDI function GetClassLoaderClasses ---- openjdk/jdk/test/com/sun/jdi/DoubleAgentTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DoubleAgentTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 6354345 - * @summary Check that a double agent request fails - * ---- openjdk/jdk/test/com/sun/jdi/JdbVarargsTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbVarargsTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4870984 - # @summary JPDA: Add support for RFE 4856541 - varargs - # ---- openjdk/jdk/test/com/sun/jdi/FilterNoMatch.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FilterNoMatch.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4331522 - * @summary addClassFilter("Foo") acts like "Foo*" - * ---- openjdk/jdk/test/com/sun/jdi/ExceptionEvents.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ExceptionEvents.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4407397 - * @summary Test the requesting of exception events - * ---- openjdk/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4528948 - * @summary Unable to finish a debugging in NetBeans IDE - * ---- openjdk/jdk/test/com/sun/jdi/CompatibleConnectors.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CompatibleConnectors.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4287596 - * @summary Unit test for "Pluggable Connectors and Transports" feature. - * ---- openjdk/jdk/test/com/sun/jdi/EvalArgs.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EvalArgs.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4663146 - # @summary Arguments match no method error - # @author Jim Holmlund/Suvasis ---- openjdk/jdk/test/com/sun/jdi/BadHandshakeTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/BadHandshakeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 6306165 - * @summary Check that a bad handshake doesn't cause a debuggee to abort - * ---- openjdk/jdk/test/com/sun/jdi/ConnectedVMs.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ConnectedVMs.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4329140 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/RepStep.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RepStep.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4334008 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/RedefineImplementor.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineImplementor.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 6173560 - # @summary Redefine a class that implements an interface - # and verify that a subclass calls the right method. ---- openjdk/jdk/test/com/sun/jdi/NullLocalVariable.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/NullLocalVariable.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4690242 4695338 - # @summary TTY: jdb throws NullPointerException when printing local variables - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/BacktraceFieldTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/BacktraceFieldTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4446677 - * @summary debuggee crashes when debugging under jbuilder - * ---- openjdk/jdk/test/com/sun/jdi/SuspendNoFlagTest.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/SuspendNoFlagTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test SuspendNoFlagTest.sh -+# @ignore cacao nyi - # @bug 4914611 - # @summary Test for JDWP: -agentlib:jdwp=suspend=n hanging - # @author Kelly O'Hair ---- openjdk/jdk/test/com/sun/jdi/StepTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/StepTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4270488 4787861 - * @author Gordon Hirsch - * ---- openjdk/jdk/test/com/sun/jdi/VarargsTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/VarargsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4870984 - * @summary JPDA: Add support for RFE 4856541 - varargs - * ---- openjdk/jdk/test/com/sun/jdi/FilterMatch.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FilterMatch.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4331522 - * @summary addClassFilter("Foo") acts like "Foo*" - * ---- openjdk/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/redefineMethod/RedefineTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4628726 - * @summary Test class redefinition - method data line numbers and local vars, - * ---- openjdk/jdk/test/com/sun/jdi/NotAField.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/NotAField.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4467887 4913748 - # @summary TTY: NullPointerException at - # com.sun.tools.jdi.MirrorImpl.validateMirrors ---- openjdk/jdk/test/com/sun/jdi/MonitorFrameInfo.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/MonitorFrameInfo.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6230699 - * @summary Test ThreadReference.ownedMonitorsAndFrames() - * ---- openjdk/jdk/test/com/sun/jdi/NoLaunchOptionTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/NoLaunchOptionTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /* - * @test NoLaunchOptionTest.java -+ * @ignore cacao nyi - * @bug 4554734 4724714 - * @summary Test for -Xrunjdwp:[onthrow,onuncaught] suboptions require launch suboption - * @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/AllLineLocations.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AllLineLocations.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4248728 - * @summary Test ReferenceType.allLineLocations - * @author Gordon Hirsch ---- openjdk/jdk/test/com/sun/jdi/FieldWatchpoints.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FieldWatchpoints.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4408582 - * @summary Test fix for: JDWP: WatchpointEvents outside of class filtered out - * ---- openjdk/jdk/test/com/sun/jdi/RedefineClearBreakpoint.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefineClearBreakpoint.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4705330 - # @summary Netbeans Fix and Continue crashes JVM - # @author Jim Holmlund/Swamy Venkataramanappa ---- openjdk/jdk/test/com/sun/jdi/CatchPatternTest.sh.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CatchPatternTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4671838 - # @summary TTY: surprising ExceptionSpec.resolveEventRequest() wildcard results - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test Solaris32AndSolaris64Test.sh -+# @ignore cacao nyi - # @bug 4478312 4780570 4913748 - # @summary Test debugging with mixed 32/64bit VMs. - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/GenericsTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GenericsTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4421040 - * @summary JPDA: Add support for JSR-014 Generics - * ---- openjdk/jdk/test/com/sun/jdi/BreakpointTest.java.orig 2008-08-28 08:19:45.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/BreakpointTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6496524 - * @summary Setting breakpoint in jdb crashes Hotspot JVM - * ---- openjdk/jdk/test/com/sun/jdi/OnThrowTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/OnThrowTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /* - * @test OnThrowTest.java -+ * @ignore cacao nyi - * @bug 6263814 - * @summary Test for -agentlib::[onthrow,launch] - * @author Kelly O'Hair ---- openjdk/jdk/test/com/sun/jdi/GetLocalVariables.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** hard coded linenumbers in this test - DO NOT CHANGE - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4359312 4450091 - * @summary Test PTR 1421 JVM exceptions making a call to LocalVariable.type().name() - * ---- openjdk/jdk/test/com/sun/jdi/LocalVariableEqual.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/LocalVariableEqual.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4916263 - * @summary Test - * ---- openjdk/jdk/test/com/sun/jdi/Java_gTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/Java_gTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4500906 4433599 4740097 - * @summary vmexec= debug java fails for SunCommandLineLauncher - * ---- openjdk/jdk/test/com/sun/jdi/ExclusiveBind.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ExclusiveBind.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4531526 - * @summary Test that more than one debuggee cannot bind to same port - * at the same time. ---- openjdk/jdk/test/com/sun/jdi/sde/MangleStepTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/sde/MangleStepTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test -+ * @ignore cacao nyi - * @bug 4390869 - * @bug 4460328 - * @summary Test Stepping in the new SourceDebugExtension facility ---- openjdk/jdk/test/com/sun/jdi/sde/MangleTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/sde/MangleTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test -+ * @ignore cacao nyi - * @bug 4390869 - * @bug 4460328 - * @summary Test the new SourceDebugExtension facility ---- openjdk/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/sde/SourceDebugExtensionTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test -+ * @ignore cacao nyi - * @bug 4390869 - * @bug 4460328 - * @summary Test the new SourceDebugExtension facility ---- openjdk/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/sde/TemperatureTableTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test -+ * @ignore cacao nyi - * @bug 4390869 - * @bug 4460328 - * @summary Test the new SourceDebugExtension facility ---- openjdk/jdk/test/com/sun/jdi/sde/FilterMangleTest.java.orig 2008-08-28 08:19:48.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/sde/FilterMangleTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** - * @test -+ * @ignore cacao nyi - * @bug 4836939 - * @summary JDI add addSourceNameFilter to ClassPrepareRequest - * ---- openjdk/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 5055681 - # @summary Test loading JDI classes via custom class loader - ---- openjdk/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4287596 - * @summary Unit test for "Pluggable Connectors and Transports" feature. - * ---- openjdk/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4287596 - * @summary Unit test for "Pluggable Connectors and Transports" feature. - * ---- openjdk/jdk/test/com/sun/jdi/ReferrersTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ReferrersTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 5089849 - * @summary Add support for backtracking reference graph. - * @author jjh ---- openjdk/jdk/test/com/sun/jdi/RedefinePop.sh.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RedefinePop.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4622663 - # @summary redefine and pop top frame from jdb gets assertion failure - # @author Jim Holmlund/Swamy Venkataramanappa ---- openjdk/jdk/test/com/sun/jdi/JITDebug.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JITDebug.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test JITDebug.sh 1.7 03/09/05 -+# @ignore cacao nyi - # @bug 4291701 4376819 4422312 4522770 4913748 - # @summary Test JIT debugging - assure that launching on - # uncaught exception works ---- openjdk/jdk/test/com/sun/jdi/ModificationWatchpoints.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ModificationWatchpoints.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4409582 - * @summary Test all info returned by modification watchpoints - * ---- openjdk/jdk/test/com/sun/jdi/FetchLocals.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/FetchLocals.java 2008-10-19 15:21:54.000000000 +0000 -@@ -1,5 +1,6 @@ - /** hard coded linenumbers in test - DO NOT CHANGE - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4386002 4429245 - * @summary Test fix for: Incorrect values reported for some locals of type long - * ---- openjdk/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4981536 - # @summary TTY: .jdbrc is read twice if jdb is run in the user's home dir - # @author jjh ---- openjdk/jdk/test/com/sun/jdi/HomeTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/HomeTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4446294 - * @summary JDI spec/impl: default "home" for CommandLineLaunch isn't java.home - * ---- openjdk/jdk/test/com/sun/jdi/RequestReflectionTest.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RequestReflectionTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4425840 - * @author Robert Field - * ---- openjdk/jdk/test/com/sun/jdi/RunToExit.java.orig 2008-08-28 08:19:47.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/RunToExit.java 2008-10-19 15:21:54.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4997445 - * @summary Test that with server=y, when VM runs to System.exit() no error happens - * ---- openjdk/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/GetLocalVariables4Test.sh 2008-10-19 15:21:54.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4070747 4486859 - # @summary Compiler fails to generate local var tbl entry for exception passed to catch - # @author Tim Bell ---- openjdk/jdk/test/com/sun/jdi/InstancesTest.java.orig 2008-08-28 08:19:46.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/InstancesTest.java 2008-10-19 15:21:54.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 5024119 - * @summary Add ReferenceType.getAllInstances () method to JDI. - * @author jjh diff -r 883001a6b00e -r 21664ac311a4 patches/icedtea-cacao-ignore-tests.patch --- a/patches/icedtea-cacao-ignore-tests.patch Tue Jun 16 18:49:03 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java~ 2008-08-28 10:20:49.000000000 +0200 -+++ openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java 2008-10-19 17:02:41.000000000 +0200 -@@ -37,6 +37,7 @@ - * @compile -source 1.5 ProducerConsumerLoops.java - * @run main/timeout=3600 ProducerConsumerLoops - * @summary multiple producers and consumers using blocking queues -+ * @ignore cacao test hog, ignore for the sake of buildds - */ - - import java.util.concurrent.*; diff -r 883001a6b00e -r 21664ac311a4 patches/icedtea-cacao-no-mmap-first-page.patch --- a/patches/icedtea-cacao-no-mmap-first-page.patch Tue Jun 16 18:49:03 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ ---- cacao/cacao/src/vm/jit/trap.c.orig 2008-07-07 13:36:19.000000000 +0200 -+++ cacao/cacao/src/vm/jit/trap.c 2008-07-23 10:45:30.480113152 +0200 -@@ -59,20 +59,6 @@ - */ - void trap_init(void) - { --#if !(defined(__ARM__) && defined(__LINUX__)) -- /* On arm-linux the first memory page can't be mmap'ed, as it -- contains the exception vectors. */ -- -- int pagesize; -- -- /* mmap a memory page at address 0x0, so our hardware-exceptions -- work. */ -- -- pagesize = system_getpagesize(); -- -- (void) system_mmap_anonymous(NULL, pagesize, PROT_NONE, MAP_PRIVATE | MAP_FIXED); --#endif -- - TRACESUBSYSTEMINITIALIZATION("trap_init"); - - #if !defined(TRAP_INSTRUCTION_IS_LOAD) diff -r 883001a6b00e -r 21664ac311a4 patches/icedtea-cacao.patch --- a/patches/icedtea-cacao.patch Tue Jun 16 18:49:03 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ ---- 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); - } - } - ---- openjdk/jdk/make/docs/Makefile~ 2008-05-30 09:50:36.000000000 +0200 -+++ openjdk/jdk/make/docs/Makefile 2008-07-02 14:26:54.306671792 +0200 -@@ -58,7 +58,7 @@ - ifeq ($(ARCH_DATA_MODEL),64) - MAX_VM_MEMORY = 1024 - else -- MAX_VM_MEMORY = 512 -+ MAX_VM_MEMORY = 768 - endif - - # From omajid at redhat.com Tue Jun 16 14:03:35 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Jun 2009 17:03:35 -0400 Subject: RFC: Netx - Add support for javax.jnlp.ExtendedService Message-ID: <4A3808A7.90002@redhat.com> Hi, The attached patch adds support for javax.jnlp.ExtendedService to IcedTea6. ChangeLog: 2009-06-16 Omair Majid * rt/javax/jnlp/ExtendedService.java: New file. * rt/net/sourceforge/jnlp/services/XExtendedService.java: New file. * rt/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add ExtendedService to serviceNames. Create a proxy for XExtendedService to provide ExtendedService. Any comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-extended-service.patch Type: text/x-patch Size: 5422 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090616/62b14d6d/netx-extended-service.patch From gbenson at redhat.com Wed Jun 17 06:35:56 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 17 Jun 2009 13:35:56 +0000 Subject: changeset in /hg/icedtea6: 2009-06-17 Gary Benson changeset 4a617634d81c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4a617634d81c description: 2009-06-17 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp (SharkCacherDecacher::SharkCacherDecacher): Remove frame cache code. (SharkCacherDecacher::_frame_cache): Removed. (SharkCacherDecacher::frame_cache): Likewise. (SharkDecacher::SharkDecacher): Removed frame cache code. (SharkJavaCallDecacher::SharkJavaCallDecacher): Likewise. (SharkVMCallDecacher::SharkVMCallDecacher): Likewise. (SharkTrapDecacher::SharkTrapDecacher): Likewise. (SharkCacher::SharkCacher): Likewise. (SharkJavaCallCacher::SharkJavaCallCcacher): Likewise. (SharkVMCallCacher::SharkVMCallCacher): Likewise. (SharkFunctionEntryCacher::SharkFunctionEntryCacher): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::write_value_to_frame): Remove frame cache code. (SharkDecacher::read_value_from_frame): Likewise. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState::_frame_cache): Removed. (SharkState::frame_cache): Likewise. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::SharkState): Remove frame cache code. (SharkState::initialize): Likewise. (SharkState::equal_to): Likewise. (SharkState::merge): Likewise. (SharkState::decache_for_Java_call): Likewise. (SharkState::cache_after_Java_call): Likewise. (SharkState::decache_for_VM_call): Likewise. (SharkState::cache_after_VM_call): Likewise. (SharkState::decache_for_trap): Likewise. (SharkEntryState::SharkEntryState): Likewise. * ports/hotspot/src/share/vm/shark/sharkFrameCache.hpp: Removed. * ports/hotspot/src/share/vm/shark/sharkFrameCache.cpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 8 files changed, 67 insertions(+), 228 deletions(-) ChangeLog | 38 +++++++++ ports/hotspot/src/share/vm/includeDB_shark | 14 --- ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 13 --- ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp | 56 ++++--------- ports/hotspot/src/share/vm/shark/sharkFrameCache.cpp | 66 ---------------- ports/hotspot/src/share/vm/shark/sharkFrameCache.hpp | 66 ---------------- ports/hotspot/src/share/vm/shark/sharkState.cpp | 37 +------- ports/hotspot/src/share/vm/shark/sharkState.hpp | 5 - diffs (truncated from 521 to 500 lines): diff -r e6350d5249d3 -r 4a617634d81c ChangeLog --- a/ChangeLog Tue Jun 16 10:58:00 2009 -0400 +++ b/ChangeLog Wed Jun 17 14:37:31 2009 +0100 @@ -1,3 +1,41 @@ 2009-06-16 Omair Majid + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp + (SharkCacherDecacher::SharkCacherDecacher): Remove frame cache code. + (SharkCacherDecacher::_frame_cache): Removed. + (SharkCacherDecacher::frame_cache): Likewise. + (SharkDecacher::SharkDecacher): Removed frame cache code. + (SharkJavaCallDecacher::SharkJavaCallDecacher): Likewise. + (SharkVMCallDecacher::SharkVMCallDecacher): Likewise. + (SharkTrapDecacher::SharkTrapDecacher): Likewise. + (SharkCacher::SharkCacher): Likewise. + (SharkJavaCallCacher::SharkJavaCallCcacher): Likewise. + (SharkVMCallCacher::SharkVMCallCacher): Likewise. + (SharkFunctionEntryCacher::SharkFunctionEntryCacher): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::write_value_to_frame): Remove frame cache code. + (SharkDecacher::read_value_from_frame): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState::_frame_cache): Removed. + (SharkState::frame_cache): Likewise. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::SharkState): Remove frame cache code. + (SharkState::initialize): Likewise. + (SharkState::equal_to): Likewise. + (SharkState::merge): Likewise. + (SharkState::decache_for_Java_call): Likewise. + (SharkState::cache_after_Java_call): Likewise. + (SharkState::decache_for_VM_call): Likewise. + (SharkState::cache_after_VM_call): Likewise. + (SharkState::decache_for_trap): Likewise. + (SharkEntryState::SharkEntryState): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkFrameCache.hpp: Removed. + * ports/hotspot/src/share/vm/shark/sharkFrameCache.cpp: Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-16 Omair Majid * rt/javax/jnlp/SingleInstanceListener.java: New file. diff -r e6350d5249d3 -r 4a617634d81c ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Tue Jun 16 10:58:00 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 17 14:37:31 2009 +0100 @@ -120,14 +120,12 @@ sharkCacheDecache.cpp sharkCacheDecache.cpp llvmValue.hpp sharkCacheDecache.cpp sharkBuilder.hpp sharkCacheDecache.cpp sharkCacheDecache.hpp -sharkCacheDecache.cpp sharkFrameCache.hpp sharkCacheDecache.cpp sharkFunction.hpp sharkCacheDecache.cpp sharkState.inline.hpp sharkCacheDecache.hpp ciMethod.hpp sharkCacheDecache.hpp debugInfoRec.hpp sharkCacheDecache.hpp sharkBuilder.hpp -sharkCacheDecache.hpp sharkFrameCache.hpp sharkCacheDecache.hpp sharkFunction.hpp sharkCacheDecache.hpp sharkStateScanner.hpp @@ -174,15 +172,6 @@ sharkEntry.cpp sharkEntry.hpp llvmHeaders.hpp -sharkFrameCache.cpp allocation.hpp -sharkFrameCache.cpp llvmHeaders.hpp -sharkFrameCache.cpp sharkFrameCache.hpp -sharkFrameCache.cpp sharkFunction.hpp - -sharkFrameCache.hpp allocation.hpp -sharkFrameCache.hpp llvmHeaders.hpp -sharkFrameCache.hpp sharkFunction.hpp - sharkFunction.cpp allocation.hpp sharkFunction.cpp ciTypeFlow.hpp sharkFunction.cpp debug.hpp @@ -260,7 +249,6 @@ sharkState.cpp sharkState.cpp ciTypeFlow.hpp sharkState.cpp sharkBuilder.hpp sharkState.cpp sharkCacheDecache.hpp -sharkState.cpp sharkFrameCache.hpp sharkState.cpp sharkState.inline.hpp sharkState.cpp sharkTopLevelBlock.hpp sharkState.cpp sharkType.hpp @@ -270,11 +258,11 @@ sharkState.hpp sharkState.hpp ciMethod.hpp sharkState.hpp llvmHeaders.hpp sharkState.hpp sharkBuilder.hpp -sharkState.hpp sharkFrameCache.hpp sharkState.hpp sharkValue.hpp sharkState.inline.hpp sharkBlock.hpp sharkState.inline.hpp sharkBuilder.hpp +sharkState.inline.hpp sharkFunction.hpp sharkState.inline.hpp sharkState.hpp sharkStateScanner.cpp sharkState.inline.hpp diff -r e6350d5249d3 -r 4a617634d81c ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Tue Jun 16 10:58:00 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 17 14:37:31 2009 +0100 @@ -225,17 +225,12 @@ void SharkDecacher::write_value_to_frame Value* value, int offset) { - if (frame_cache()->value(offset) != value) { - builder()->CreateStore( - value, - function()->CreateAddressOfFrameEntry(offset, type)); - } + builder()->CreateStore( + value, function()->CreateAddressOfFrameEntry(offset, type)); } Value* SharkCacher::read_value_from_frame(const Type* type, int offset) { - Value *result = builder()->CreateLoad( + return builder()->CreateLoad( function()->CreateAddressOfFrameEntry(offset, type)); - frame_cache()->set_value(offset, result); - return result; -} +} diff -r e6350d5249d3 -r 4a617634d81c ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Tue Jun 16 10:58:00 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Wed Jun 17 14:37:31 2009 +0100 @@ -37,17 +37,8 @@ class SharkCacherDecacher : public SharkStateScanner { protected: - SharkCacherDecacher(SharkFunction* function, SharkFrameCache* frame_cache) - : SharkStateScanner(function), _frame_cache(frame_cache) {} - - private: - SharkFrameCache* _frame_cache; - - protected: - SharkFrameCache* frame_cache() const - { - return _frame_cache; - } + SharkCacherDecacher(SharkFunction* function) + : SharkStateScanner(function) {} protected: SharkBuilder* builder() const @@ -67,8 +58,8 @@ class SharkCacherDecacher : public Shark class SharkDecacher : public SharkCacherDecacher { protected: - SharkDecacher(SharkFunction* function, SharkFrameCache* frame_cache, int bci) - : SharkCacherDecacher(function, frame_cache), _bci(bci) {} + SharkDecacher(SharkFunction* function, int bci) + : SharkCacherDecacher(function), _bci(bci) {} private: int _bci; @@ -223,11 +214,8 @@ class SharkDecacher : public SharkCacher class SharkJavaCallDecacher : public SharkDecacher { public: - SharkJavaCallDecacher(SharkFunction* function, - SharkFrameCache* frame_cache, - int bci, - ciMethod* callee) - : SharkDecacher(function, frame_cache, bci), _callee(callee) {} + SharkJavaCallDecacher(SharkFunction* function, int bci, ciMethod* callee) + : SharkDecacher(function, bci), _callee(callee) {} private: ciMethod* _callee; @@ -271,10 +259,8 @@ class SharkJavaCallDecacher : public Sha class SharkVMCallDecacher : public SharkDecacher { public: - SharkVMCallDecacher(SharkFunction* function, - SharkFrameCache* frame_cache, - int bci) - : SharkDecacher(function, frame_cache, bci) {} + SharkVMCallDecacher(SharkFunction* function, int bci) + : SharkDecacher(function, bci) {} // Stack slot helpers protected: @@ -309,10 +295,8 @@ class SharkVMCallDecacher : public Shark class SharkTrapDecacher : public SharkDecacher { public: - SharkTrapDecacher(SharkFunction* function, - SharkFrameCache* frame_cache, - int bci) - : SharkDecacher(function, frame_cache, bci