From bugzilla-daemon at icedtea.classpath.org Sat Aug 1 11:28:15 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 01 Aug 2009 18:28:15 +0000 Subject: [Bug 374] New: SIGSEGV while visiting a website on Firefox 3.5, Archlinux 64bit Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=374 Summary: SIGSEGV while visiting a website on Firefox 3.5,Archlinux 64bit Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: gary4gar at gmail.com crash I try to visit(http://www.rechargeitnow.com/needRecharge.jsp) with msg "Applet Started" in Status bar on Firefox 3.5. The crash only happens on my system, the site loads normally as it should on my Friend's PC running Windows XP. hs_err_pid5135.log ---------------------------------------------------------------------------- # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f602d101c71, pid=5135, tid=140050025949456 # # JRE version: 6.0-b16 # Java VM: OpenJDK 64-Bit Server VM (14.0-b15 mixed mode linux-amd64 ) # Distribution: Custom build (Thu Jul 2 04:39:46 UTC 2009) # Problematic frame: # C [ld-linux-x86-64.so.2+0x12c71] # # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x0000000000d79000): JavaThread "Image Fetcher 0" daemon [_thread_in_native, id=5162, stack(0x00007f5feffc2000,0x00007f5ff00c3000)] siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000000000003d4 Registers: RAX=0x00007f602d30bba0, RBX=0x0000000000000000, RCX=0x00007f602c8b7fb0, RDX=0x00007f5ff00c2908 RSP=0x00007f5ff00c0f00, RBP=0x00007f602c8b7fb0, RSI=0x0000000000000000, RDI=0x0000000000000000 R8 =0x0000000000000000, R9 =0x00007f602c8b8090, R10=0x0000000000000000, R11=0x00007f602d101c70 R12=0x0000000000000000, R13=0x00007f5ff00c1108, R14=0x0000000000000000, R15=0x0000000000d79000 RIP=0x00007f602d101c71, EFL=0x0000000000010246, CSGSFS=0x0000000000000033, ERR=0x0000000000000004 TRAPNO=0x000000000000000e Top of Stack: (sp=0x00007f5ff00c0f00) 0x00007f5ff00c0f00: 0000000000000000 00007f602d0fbf66 0x00007f5ff00c0f10: 00007f5ff00c2908 0000000000fda220 0x00007f5ff00c0f20: 0000000000fda228 0000000000fda218 0x00007f5ff00c0f30: 00007f602c8b7fb0 0000000000000000 0x00007f5ff00c0f40: 00007f5ff00c1108 0000000000000000 0x00007f5ff00c0f50: 0000000000d79000 0000000000fda210 0x00007f5ff00c0f60: 792c58364a6e7d8d 0000000000000000 0x00007f5ff00c0f70: 00007f5ff00c1108 0000000000000000 0x00007f5ff00c0f80: 0000000000d79000 7953e138ab2e7d8d 0x00007f5ff00c0f90: 792c5b3fcb987d8d 00000000ffffffff 0x00007f5ff00c0fa0: 00007f5ff00c1150 00007f5feec6a000 0x00007f5ff00c0fb0: 00007f5ff00c10f8 00007f5ff00c1108 0x00007f5ff00c0fc0: 0000000000000000 0000000000d79000 0x00007f5ff00c0fd0: 0000000000208930 00007f602d0fbdac 0x00007f5ff00c0fe0: 00007f5f00000005 0000000000000000 0x00007f5ff00c0ff0: 0000000000d79000 0000000000f281b0 0x00007f5ff00c1000: 00007f602c8b7fb0 0000000000000000 0x00007f5ff00c1010: 00007f5ff00c1108 0000000000000000 0x00007f5ff00c1020: 0000000000d79000 0000000000000000 0x00007f5ff00c1030: 0000000000fda210 00007f602c8b82cc 0x00007f5ff00c1040: 0000000000d791b8 00007f5ff00c1090 0x00007f5ff00c1050: 00007f5ff00c10f8 00007f602c8b7fef 0x00007f5ff00c1060: 0000000000000006 00007f5feec705d8 0x00007f5ff00c1070: 00007f601e242bb0 0000000000d79000 0x00007f5ff00c1080: 00007f601e242bb0 00007f5ff00c1108 0x00007f5ff00c1090: 00007f5ff00c10e8 00007f60279fdf30 0x00007f5ff00c10a0: 0000000000d79000 00007f5ff00c10a8 0x00007f5ff00c10b0: 00007f601e242bb0 00007f5ff00c1108 0x00007f5ff00c10c0: 00007f601e243928 0000000000000000 0x00007f5ff00c10d0: 00007f601e242bb0 0000000000000000 0x00007f5ff00c10e0: 00007f5ff00c1108 00007f5ff00c1150 0x00007f5ff00c10f0: 00007f60279f27fa 00007f601e243870 Instructions: (pc=0x00007f602d101c71) 0x00007f602d101c61: ff ff 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 53 0x00007f602d101c71: f6 87 d4 03 00 00 08 48 89 fb 75 33 44 8b 8f 10 Stack: [0x00007f5feffc2000,0x00007f5ff00c3000], sp=0x00007f5ff00c0f00, free space=1019k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ld-linux-x86-64.so.2+0x12c71] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j sun.awt.image.JPEGImageDecoder.initIDs(Ljava/lang/Class;)V+0 j sun.awt.image.JPEGImageDecoder.()V+22 v ~StubRoutines::call_stub j sun.awt.image.InputStreamImageSource.getDecoder(Ljava/io/InputStream;)Lsun/awt/image/ImageDecoder;+135 j sun.awt.image.ByteArrayImageSource.getDecoder()Lsun/awt/image/ImageDecoder;+29 j sun.awt.image.InputStreamImageSource.doFetch()V+30 j sun.awt.image.ImageFetcher.fetchloop()V+33 j sun.awt.image.ImageFetcher.run()V+5 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) =>0x0000000000d79000 JavaThread "Image Fetcher 0" daemon [_thread_in_native, id=5162, stack(0x00007f5feffc2000,0x00007f5ff00c3000)] 0x0000000000fd9800 JavaThread "Thread-8" [_thread_in_vm, id=5161, stack(0x00007f5fef9af000,0x00007f5fefab0000)] 0x0000000000fac800 JavaThread "TimerQueue" daemon [_thread_blocked, id=5160, stack(0x00007f5fef07b000,0x00007f5fef17c000)] 0x0000000001033000 JavaThread "TimerQueue" daemon [_thread_blocked, id=5159, stack(0x00007f5fef7ad000,0x00007f5fef8ae000)] 0x000000000100a800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=5155, stack(0x00007f5fefb8d000,0x00007f5fefc8e000)] 0x0000000001003800 JavaThread "Thread-5" [_thread_blocked, id=5154, stack(0x00007f5fefc8e000,0x00007f5fefd8f000)] 0x0000000000f91000 JavaThread "AWT-Shutdown" [_thread_blocked, id=5153, stack(0x00007f5fefd8f000,0x00007f5fefe90000)] 0x00000000009bd000 JavaThread "DestroyJavaVM" [_thread_blocked, id=5136, stack(0x00007f602d1d9000,0x00007f602d2da000)] 0x0000000000f85800 JavaThread "Thread-4" [_thread_in_native, id=5152, stack(0x00007f5fefe90000,0x00007f5feff91000)] 0x0000000000d00000 JavaThread "Thread-3" [_thread_blocked, id=5150, stack(0x00007f5ff00c3000,0x00007f5ff01c4000)] 0x0000000000cfe000 JavaThread "Thread-2" [_thread_blocked, id=5149, stack(0x00007f5ff01c4000,0x00007f5ff02c5000)] 0x0000000000ced000 JavaThread "Thread-1" [_thread_blocked, id=5148, stack(0x00007f5ff02c5000,0x00007f5ff03c6000)] 0x0000000000cc2000 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=5147, stack(0x00007f5ff06c7000,0x00007f5ff07c8000)] 0x0000000000b34800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5146, stack(0x00007f5ff0af2000,0x00007f5ff0bf3000)] 0x0000000000a52800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=5144, stack(0x00007f5ff2ad3000,0x00007f5ff2bd4000)] 0x0000000000a50000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=5143, stack(0x00007f5ff2bd4000,0x00007f5ff2cd5000)] 0x0000000000a4c000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5142, stack(0x00007f5ff2cd5000,0x00007f5ff2dd6000)] 0x0000000000a49800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5141, stack(0x00007f5ff2dd6000,0x00007f5ff2ed7000)] 0x0000000000a29800 JavaThread "Finalizer" daemon [_thread_blocked, id=5140, stack(0x00007f5ff301c000,0x00007f5ff311d000)] 0x0000000000a22800 JavaThread "Reference Handler" daemon [_thread_blocked, id=5139, stack(0x00007f5ff311d000,0x00007f5ff321e000)] Other Threads: 0x0000000000a1d000 VMThread [stack: 0x00007f5ff321e000,0x00007f5ff331f000] [id=5138] 0x0000000000a55800 WatcherThread [stack: 0x00007f5ff29d2000,0x00007f5ff2ad3000] [id=5145] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 2368K, used 1689K [0x00007f5ff37e0000, 0x00007f5ff3a70000, 0x00007f60015e0000) eden space 2112K, 67% used [0x00007f5ff37e0000, 0x00007f5ff39466a8, 0x00007f5ff39f0000) from space 256K, 99% used [0x00007f5ff3a30000, 0x00007f5ff3a6fff8, 0x00007f5ff3a70000) to space 256K, 0% used [0x00007f5ff39f0000, 0x00007f5ff39f0000, 0x00007f5ff3a30000) tenured generation total 5312K, used 4015K [0x00007f60015e0000, 0x00007f6001b10000, 0x00007f601d1e0000) the space 5312K, 75% used [0x00007f60015e0000, 0x00007f60019cbe58, 0x00007f60019cc000, 0x00007f6001b10000) compacting perm gen total 21248K, used 16783K [0x00007f601d1e0000, 0x00007f601e6a0000, 0x00007f60279e0000) the space 21248K, 78% used [0x00007f601d1e0000, 0x00007f601e243cf0, 0x00007f601e243e00, 0x00007f601e6a0000) No shared spaces configured. Dynamic libraries: 00400000-00409000 r-xp 00000000 08:02 581665 /usr/lib/jvm/java-1.6.0-openjdk/jre/bin/java 00608000-00609000 rw-p 00008000 08:02 581665 /usr/lib/jvm/java-1.6.0-openjdk/jre/bin/java 009b5000-01068000 rw-p 00000000 00:00 0 [heap] 7f5feec6a000-7f5feec73000 r-xp 00000000 08:02 730131 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libjpeg.so 7f5feec73000-7f5feee72000 ---p 00009000 08:02 730131 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libjpeg.so 7f5feee72000-7f5feee73000 rw-p 00008000 08:02 730131 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libjpeg.so 7f5feee73000-7f5feee7b000 r-xp 00000000 08:02 730143 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libnio.so 7f5feee7b000-7f5fef07a000 ---p 00008000 08:02 730143 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libnio.so 7f5fef07a000-7f5fef07b000 rw-p 00007000 08:02 730143 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libnio.so 7f5fef07b000-7f5fef07e000 ---p 00000000 00:00 0 7f5fef07e000-7f5fef17c000 rwxp 00000000 00:00 0 7f5fef17c000-7f5fef18f000 r-xp 00000000 08:02 704544 /lib/libresolv-2.10.1.so 7f5fef18f000-7f5fef38e000 ---p 00013000 08:02 704544 /lib/libresolv-2.10.1.so 7f5fef38e000-7f5fef38f000 r--p 00012000 08:02 704544 /lib/libresolv-2.10.1.so 7f5fef38f000-7f5fef390000 rw-p 00013000 08:02 704544 /lib/libresolv-2.10.1.so 7f5fef390000-7f5fef392000 rw-p 00000000 00:00 0 7f5fef392000-7f5fef397000 r-xp 00000000 08:02 704547 /lib/libnss_dns-2.10.1.so 7f5fef397000-7f5fef596000 ---p 00005000 08:02 704547 /lib/libnss_dns-2.10.1.so 7f5fef596000-7f5fef597000 r--p 00004000 08:02 704547 /lib/libnss_dns-2.10.1.so 7f5fef597000-7f5fef598000 rw-p 00005000 08:02 704547 /lib/libnss_dns-2.10.1.so 7f5fef598000-7f5fef5ad000 r-xp 00000000 08:02 730144 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libnet.so 7f5fef5ad000-7f5fef7ac000 ---p 00015000 08:02 730144 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libnet.so 7f5fef7ac000-7f5fef7ad000 rw-p 00014000 08:02 730144 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libnet.so 7f5fef7ad000-7f5fef7b0000 ---p 00000000 00:00 0 7f5fef7b0000-7f5fef8ae000 rwxp 00000000 00:00 0 7f5fef8ae000-7f5fef8b1000 rwxp 00000000 00:00 0 7f5fef8b1000-7f5fef9af000 rwxp 00000000 00:00 0 7f5fef9af000-7f5fef9b2000 ---p 00000000 00:00 0 7f5fef9b2000-7f5fefab0000 rwxp 00000000 00:00 0 7f5fefab0000-7f5fefb0c000 r--s 00000000 08:02 1196036 /var/cache/fontconfig/17090aa38d5c6f09fb8c5c354938f1d7-x86-64.cache-2 7f5fefb0c000-7f5fefb68000 r--s 00000000 08:02 1531923 /var/cache/fontconfig/df311e82a1a24c41a75c2c930223552e-x86-64.cache-2 7f5fefb8d000-7f5fefb90000 ---p 00000000 00:00 0 7f5fefb90000-7f5fefc8e000 rwxp 00000000 00:00 0 7f5fefc8e000-7f5fefc91000 ---p 00000000 00:00 0 7f5fefc91000-7f5fefd8f000 rwxp 00000000 00:00 0 7f5fefd8f000-7f5fefd92000 ---p 00000000 00:00 0 7f5fefd92000-7f5fefe90000 rwxp 00000000 00:00 0 7f5fefe90000-7f5fefe93000 ---p 00000000 00:00 0 7f5fefe93000-7f5feff91000 rwxp 00000000 00:00 0 7f5feffc2000-7f5feffc5000 ---p 00000000 00:00 0 7f5feffc5000-7f5ff00c3000 rwxp 00000000 00:00 0 7f5ff00c3000-7f5ff00c6000 ---p 00000000 00:00 0 7f5ff00c6000-7f5ff01c4000 rwxp 00000000 00:00 0 7f5ff01c4000-7f5ff01c7000 ---p 00000000 00:00 0 7f5ff01c7000-7f5ff02c5000 rwxp 00000000 00:00 0 7f5ff02c5000-7f5ff02c8000 ---p 00000000 00:00 0 7f5ff02c8000-7f5ff03c6000 rwxp 00000000 00:00 0 7f5ff03c6000-7f5ff03cb000 r-xp 00000000 08:02 453133 /usr/lib/libXfixes.so.3.1.0 7f5ff03cb000-7f5ff05ca000 ---p 00005000 08:02 453133 /usr/lib/libXfixes.so.3.1.0 7f5ff05ca000-7f5ff05cb000 rw-p 00004000 08:02 453133 /usr/lib/libXfixes.so.3.1.0 7f5ff05cb000-7f5ff05e0000 r--s 00000000 08:02 1531915 /var/cache/fontconfig/8d4af663993b81a124ee82e610bb31f9-x86-64.cache-2 7f5ff05e0000-7f5ff063c000 r--s 00000000 08:02 1196036 /var/cache/fontconfig/17090aa38d5c6f09fb8c5c354938f1d7-x86-64.cache-2 7f5ff063c000-7f5ff0698000 r--s 00000000 08:02 1531923 /var/cache/fontconfig/df311e82a1a24c41a75c2c930223552e-x86-64.cache-2 7f5ff06b2000-7f5ff06c7000 r--s 00000000 08:02 1531915 /var/cache/fontconfig/8d4af663993b81a124ee82e610bb31f9-x86-64.cache-2 7f5ff06c7000-7f5ff06ca000 ---p 00000000 00:00 0 7f5ff06ca000-7f5ff07c8000 rwxp 00000000 00:00 0 7f5ff07c8000-7f5ff07dd000 r--s 00000000 08:02 1531915 /var/cache/fontconfig/8d4af663993b81a124ee82e610bb31f9-x86-64.cache-2 7f5ff07dd000-7f5ff0839000 r--s 00000000 08:02 1196036 /var/cache/fontconfig/17090aa38d5c6f09fb8c5c354938f1d7-x86-64.cache-2 7f5ff0839000-7f5ff0895000 r--s 00000000 08:02 1531923 /var/cache/fontconfig/df311e82a1a24c41a75c2c930223552e-x86-64.cache-2 7f5ff089a000-7f5ff08a3000 r-xp 00000000 08:02 453700 /usr/lib/libXcursor.so.1.0.2 7f5ff08a3000-7f5ff0aa3000 ---p 00009000 08:02 453700 /usr/lib/libXcursor.so.1.0.2 7f5ff0aa3000-7f5ff0aa4000 rw-p 00009000 08:02 453700 /usr/lib/libXcursor.so.1.0.2 7f5ff0aa6000-7f5ff0aae000 r--s 00000000 08:02 1531944 /var/cache/fontconfig/d62e99ef547d1d24cdb1bd22ec1a2976-x86-64.cache-2 7f5ff0aae000-7f5ff0ad0000 r--s 00000000 08:02 1531943 /var/cache/fontconfig/f6b893a7224233d96cb72fd88691c0b4-x86-64.cache-2 7f5ff0ad0000-7f5ff0af2000 r--s 00000000 08:02 1531943 /var/cache/fontconfig/f6b893a7224233d96cb72fd88691c0b4-x86-64.cache-2 7f5ff0af2000-7f5ff0af5000 ---p 00000000 00:00 0 7f5ff0af5000-7f5ff0bf3000 rwxp 00000000 00:00 0 7f5ff0bf3000-7f5ff0c09000 r-xp 00000000 08:02 450637 /usr/lib/libgcc_s.so.1 7f5ff0c09000-7f5ff0e08000 ---p 00016000 08:02 450637 /usr/lib/libgcc_s.so.1 7f5ff0e08000-7f5ff0e09000 rw-p 00015000 08:02 450637 /usr/lib/libgcc_s.so.1 7f5ff0e09000-7f5ff0e9a000 r-xp 00000000 08:02 450973 /usr/lib/libfreetype.so.6.3.20 7f5ff0e9a000-7f5ff109a000 ---p 00091000 08:02 450973 /usr/lib/libfreetype.so.6.3.20 7f5ff109a000-7f5ff10a0000 rw-p 00091000 08:02 450973 /usr/lib/libfreetype.so.6.3.20 7f5ff10a0000-7f5ff10e6000 r-xp 00000000 08:02 730132 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libfontmanager.so 7f5ff10e6000-7f5ff12e6000 ---p 00046000 08:02 730132 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libfontmanager.so 7f5ff12e6000-7f5ff12e9000 rw-p 00046000 08:02 730132 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libfontmanager.so 7f5ff12e9000-7f5ff12fc000 rw-p 00000000 00:00 0 7f5ff12fc000-7f5ff1301000 r-xp 00000000 08:02 453263 /usr/lib/libXdmcp.so.6.0.0 7f5ff1301000-7f5ff1500000 ---p 00005000 08:02 453263 /usr/lib/libXdmcp.so.6.0.0 7f5ff1500000-7f5ff1501000 rw-p 00004000 08:02 453263 /usr/lib/libXdmcp.so.6.0.0 7f5ff1501000-7f5ff151c000 r-xp 00000000 08:02 452676 /usr/lib/libxcb.so.1.1.0 7f5ff151c000-7f5ff171c000 ---p 0001b000 08:02 452676 /usr/lib/libxcb.so.1.1.0 7f5ff171c000-7f5ff171d000 rw-p 0001b000 08:02 452676 /usr/lib/libxcb.so.1.1.0 7f5ff171d000-7f5ff171f000 r-xp 00000000 08:02 452658 /usr/lib/libXau.so.6.0.0 7f5ff171f000-7f5ff191e000 ---p 00002000 08:02 452658 /usr/lib/libXau.so.6.0.0 7f5ff191e000-7f5ff191f000 rw-p 00001000 08:02 452658 /usr/lib/libXau.so.6.0.0 7f5ff191f000-7f5ff1928000 r-xp 00000000 08:02 452701 /usr/lib/libXi.so.6.0.0 7f5ff1928000-7f5ff1b28000 ---p 00009000 08:02 452701 /usr/lib/libXi.so.6.0.0 7f5ff1b28000-7f5ff1b29000 rw-p 00009000 08:02 452701 /usr/lib/libXi.so.6.0.0 7f5ff1b29000-7f5ff1b2e000 r-xp 00000000 08:02 453277 /usr/lib/libXtst.so.6.1.0 7f5ff1b2e000-7f5ff1d2e000 ---p 00005000 08:02 453277 /usr/lib/libXtst.so.6.1.0 7f5ff1d2e000-7f5ff1d2f000 rw-p 00005000 08:02 453277 /usr/lib/libXtst.so.6.1.0 7f5ff1d2f000-7f5ff1d38000 r-xp 00000000 08:02 453697 /usr/lib/libXrender.so.1.3.0 7f5ff1d38000-7f5ff1f37000 ---p 00009000 08:02 453697 /usr/lib/libXrender.so.1.3.0 7f5ff1f37000-7f5ff1f38000 rw-p 00008000 08:02 453697 /usr/lib/libXrender.so.1.3.0 7f5ff1f38000-7f5ff206d000 r-xp 00000000 08:02 451435 /usr/lib/libX11.so.6.2.0 7f5ff206d000-7f5ff226d000 ---p 00135000 08:02 451435 /usr/lib/libX11.so.6.2.0 7f5ff226d000-7f5ff2273000 rw-p 00135000 08:02 451435 /usr/lib/libX11.so.6.2.0 7f5ff2273000-7f5ff2284000 r-xp 00000000 08:02 452698 /usr/lib/libXext.so.6.4.0 7f5ff2284000-7f5ff2484000 ---p 00011000 08:02 452698 /usr/lib/libXext.so.6.4.0 7f5ff2484000-7f5ff2485000 rw-p 00011000 08:02 452698 /usr/lib/libXext.so.6.4.0 7f5ff248f000-7f5ff24b1000 r--s 00000000 08:02 1531943 /var/cache/fontconfig/f6b893a7224233d96cb72fd88691c0b4-x86-64.cache-2 7f5ff24b1000-7f5ff24fd000 r-xp 00000000 08:02 730160 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/xawt/libmawt.so 7f5ff24fd000-7f5ff26fc000 ---p 0004c000 08:02 730160 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/xawt/libmawt.so 7f5ff26fc000-7f5ff2700000 rw-p 0004b000 08:02 730160 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/xawt/libmawt.so 7f5ff2700000-7f5ff2701000 rw-p 00000000 00:00 0 7f5ff2701000-7f5ff27a3000 r-xp 00000000 08:02 730134 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libawt.so 7f5ff27a3000-7f5ff29a2000 ---p 000a2000 08:02 730134 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libawt.so 7f5ff29a2000-7f5ff29ae000 rw-p 000a1000 08:02 730134 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libawt.so 7f5ff29ae000-7f5ff29d2000 rw-p 00000000 00:00 0 7f5ff29d2000-7f5ff29d3000 ---p 00000000 00:00 0 7f5ff29d3000-7f5ff2ad3000 rwxp 00000000 00:00 0 7f5ff2ad3000-7f5ff2ad6000 ---p 00000000 00:00 0 7f5ff2ad6000-7f5ff2bd4000 rwxp 00000000 00:00 0 7f5ff2bd4000-7f5ff2bd7000 ---p 00000000 00:00 0 7f5ff2bd7000-7f5ff2cd5000 rwxp 00000000 00:00 0 7f5ff2cd5000-7f5ff2cd8000 ---p 00000000 00:00 0 7f5ff2cd8000-7f5ff2dd6000 rwxp 00000000 00:00 0 7f5ff2dd6000-7f5ff2dd9000 ---p 00000000 00:00 0 7f5ff2dd9000-7f5ff2ed7000 rwxp 00000000 00:00 0 7f5ff2ed7000-7f5ff301c000 r--p 00000000 08:02 543857 /usr/lib/locale/locale-archive 7f5ff301c000-7f5ff301f000 ---p 00000000 00:00 0 7f5ff301f000-7f5ff311d000 rwxp 00000000 00:00 0 7f5ff311d000-7f5ff3120000 ---p 00000000 00:00 0 7f5ff3120000-7f5ff321e000 rwxp 00000000 00:00 0 7f5ff321e000-7f5ff321f000 ---p 00000000 00:00 0 7f5ff321f000-7f5ff331f000 rwxp 00000000 00:00 0 7f5ff331f000-7f5ff3352000 rw-p 00000000 00:00 0 7f5ff3352000-7f5ff34e2000 r--s 03852000 08:02 581673 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/rt.jar 7f5ff34e2000-7f5ff350a000 rw-p 00000000 00:00 0 7f5ff350a000-7f5ff3515000 rwxp 00000000 00:00 0 7f5ff3515000-7f5ff355f000 rwxp 00000000 00:00 0 7f5ff355f000-7f5ff3562000 rwxp 00000000 00:00 0 7f5ff3562000-7f5ff363e000 rwxp 00000000 00:00 0 7f5ff363e000-7f5ff3640000 rwxp 00000000 00:00 0 7f5ff3640000-7f5ff36ad000 rwxp 00000000 00:00 0 7f5ff36ad000-7f5ff36b0000 rwxp 00000000 00:00 0 7f5ff36b0000-7f5ff378b000 rwxp 00000000 00:00 0 7f5ff378b000-7f5ff3796000 rwxp 00000000 00:00 0 7f5ff3796000-7f5ff37df000 rwxp 00000000 00:00 0 7f5ff37df000-7f5ff3a70000 rwxp 00000000 00:00 0 7f5ff3a70000-7f60015e0000 rwxp 00000000 00:00 0 7f60015e0000-7f6001b10000 rwxp 00000000 00:00 0 7f6001b10000-7f601d1e0000 rwxp 00000000 00:00 0 7f601d1e0000-7f601e6a0000 rwxp 00000000 00:00 0 7f601e6a0000-7f60279e0000 rwxp 00000000 00:00 0 7f60279e6000-7f60279ed000 r--s 00000000 08:02 1531925 /var/cache/fontconfig/a98d8961fa319a64d3cfd8640c79e62d-x86-64.cache-2 7f60279ed000-7f6027c5d000 rwxp 00000000 00:00 0 7f6027c5d000-7f602a9ed000 rwxp 00000000 00:00 0 7f602a9ed000-7f602a9f4000 r-xp 00000000 08:02 730148 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libzip.so 7f602a9f4000-7f602abf3000 ---p 00007000 08:02 730148 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libzip.so 7f602abf3000-7f602abf4000 rw-p 00006000 08:02 730148 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libzip.so 7f602abf4000-7f602abff000 r-xp 00000000 08:02 704549 /lib/libnss_files-2.10.1.so 7f602abff000-7f602adfe000 ---p 0000b000 08:02 704549 /lib/libnss_files-2.10.1.so 7f602adfe000-7f602adff000 r--p 0000a000 08:02 704549 /lib/libnss_files-2.10.1.so 7f602adff000-7f602ae00000 rw-p 0000b000 08:02 704549 /lib/libnss_files-2.10.1.so 7f602ae00000-7f602ae08000 r-xp 00000000 08:02 730165 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/native_threads/libhpi.so 7f602ae08000-7f602b007000 ---p 00008000 08:02 730165 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/native_threads/libhpi.so 7f602b007000-7f602b009000 rw-p 00007000 08:02 730165 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/native_threads/libhpi.so 7f602b009000-7f602b01e000 r-xp 00000000 08:02 704560 /lib/libnsl-2.10.1.so 7f602b01e000-7f602b21d000 ---p 00015000 08:02 704560 /lib/libnsl-2.10.1.so 7f602b21d000-7f602b21e000 r--p 00014000 08:02 704560 /lib/libnsl-2.10.1.so 7f602b21e000-7f602b21f000 rw-p 00015000 08:02 704560 /lib/libnsl-2.10.1.so 7f602b21f000-7f602b221000 rw-p 00000000 00:00 0 7f602b221000-7f602b24d000 r-xp 00000000 08:02 730149 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libjava.so 7f602b24d000-7f602b44d000 ---p 0002c000 08:02 730149 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libjava.so 7f602b44d000-7f602b451000 rw-p 0002c000 08:02 730149 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libjava.so 7f602b451000-7f602b45f000 r-xp 00000000 08:02 730150 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libverify.so 7f602b45f000-7f602b65f000 ---p 0000e000 08:02 730150 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libverify.so 7f602b65f000-7f602b661000 rw-p 0000e000 08:02 730150 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/libverify.so 7f602b661000-7f602b668000 r-xp 00000000 08:02 704550 /lib/librt-2.10.1.so 7f602b668000-7f602b867000 ---p 00007000 08:02 704550 /lib/librt-2.10.1.so 7f602b867000-7f602b868000 r--p 00006000 08:02 704550 /lib/librt-2.10.1.so 7f602b868000-7f602b869000 rw-p 00007000 08:02 704550 /lib/librt-2.10.1.so 7f602b869000-7f602b8ea000 r-xp 00000000 08:02 704528 /lib/libm-2.10.1.so 7f602b8ea000-7f602bae9000 ---p 00081000 08:02 704528 /lib/libm-2.10.1.so 7f602bae9000-7f602baea000 r--p 00080000 08:02 704528 /lib/libm-2.10.1.so 7f602baea000-7f602baeb000 rw-p 00081000 08:02 704528 /lib/libm-2.10.1.so 7f602baeb000-7f602c2a2000 r-xp 00000000 08:02 730162 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/server/libjvm.so 7f602c2a2000-7f602c4a2000 ---p 007b7000 08:02 730162 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/server/libjvm.so 7f602c4a2000-7f602c528000 rw-p 007b7000 08:02 730162 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/server/libjvm.so 7f602c528000-7f602c564000 rw-p 00000000 00:00 0 7f602c564000-7f602c6ad000 r-xp 00000000 08:02 704573 /lib/libc-2.10.1.so 7f602c6ad000-7f602c8ad000 ---p 00149000 08:02 704573 /lib/libc-2.10.1.so 7f602c8ad000-7f602c8b1000 r--p 00149000 08:02 704573 /lib/libc-2.10.1.so 7f602c8b1000-7f602c8b2000 rw-p 0014d000 08:02 704573 /lib/libc-2.10.1.so 7f602c8b2000-7f602c8b7000 rw-p 00000000 00:00 0 7f602c8b7000-7f602c8b9000 r-xp 00000000 08:02 704530 /lib/libdl-2.10.1.so 7f602c8b9000-7f602cab9000 ---p 00002000 08:02 704530 /lib/libdl-2.10.1.so 7f602cab9000-7f602caba000 r--p 00002000 08:02 704530 /lib/libdl-2.10.1.so 7f602caba000-7f602cabb000 rw-p 00003000 08:02 704530 /lib/libdl-2.10.1.so 7f602cabb000-7f602cabf000 r-xp 00000000 08:02 730161 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/jli/libjli.so 7f602cabf000-7f602ccbe000 ---p 00004000 08:02 730161 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/jli/libjli.so 7f602ccbe000-7f602ccbf000 rw-p 00003000 08:02 730161 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/jli/libjli.so 7f602ccbf000-7f602ccd5000 r-xp 00000000 08:02 704539 /lib/libpthread-2.10.1.so 7f602ccd5000-7f602ced4000 ---p 00016000 08:02 704539 /lib/libpthread-2.10.1.so 7f602ced4000-7f602ced5000 r--p 00015000 08:02 704539 /lib/libpthread-2.10.1.so 7f602ced5000-7f602ced6000 rw-p 00016000 08:02 704539 /lib/libpthread-2.10.1.so 7f602ced6000-7f602ceda000 rw-p 00000000 00:00 0 7f602ceda000-7f602ceef000 r-xp 00000000 08:02 451303 /usr/lib/libz.so.1.2.3.3 7f602ceef000-7f602d0ee000 ---p 00015000 08:02 451303 /usr/lib/libz.so.1.2.3.3 7f602d0ee000-7f602d0ef000 rw-p 00014000 08:02 451303 /usr/lib/libz.so.1.2.3.3 7f602d0ef000-7f602d10c000 r-xp 00000000 08:02 704568 /lib/ld-2.10.1.so 7f602d10c000-7f602d10e000 r--s 00008000 08:02 403518 /home/gaurish/.icedteaplugin/cache/http/jdc-cam1.joesdatacenter.com/java/ama/ama.jar 7f602d10e000-7f602d112000 r--s 00079000 08:02 581671 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/jsse.jar 7f602d112000-7f602d119000 r--s 00000000 08:02 1531925 /var/cache/fontconfig/a98d8961fa319a64d3cfd8640c79e62d-x86-64.cache-2 7f602d119000-7f602d123000 rwxp 00000000 00:00 0 7f602d123000-7f602d1d9000 rwxp 00000000 00:00 0 7f602d1d9000-7f602d1dc000 ---p 00000000 00:00 0 7f602d1dc000-7f602d2da000 rwxp 00000000 00:00 0 7f602d2da000-7f602d2dd000 rw-p 00000000 00:00 0 7f602d2de000-7f602d2df000 r--s 00000000 08:02 1531920 /var/cache/fontconfig/cc95ca9c1a5b584cbe1206592da775ec-x86-64.cache-2 7f602d2df000-7f602d2e0000 r--s 00000000 08:02 1531920 /var/cache/fontconfig/cc95ca9c1a5b584cbe1206592da775ec-x86-64.cache-2 7f602d2e0000-7f602d2e8000 r--s 00000000 08:02 1531944 /var/cache/fontconfig/d62e99ef547d1d24cdb1bd22ec1a2976-x86-64.cache-2 7f602d2e8000-7f602d2e9000 r--s 00000000 08:02 1531920 /var/cache/fontconfig/cc95ca9c1a5b584cbe1206592da775ec-x86-64.cache-2 7f602d2e9000-7f602d2f0000 r--s 00000000 08:02 1531925 /var/cache/fontconfig/a98d8961fa319a64d3cfd8640c79e62d-x86-64.cache-2 7f602d2f0000-7f602d2f8000 r--s 00000000 08:02 1531944 /var/cache/fontconfig/d62e99ef547d1d24cdb1bd22ec1a2976-x86-64.cache-2 7f602d2f8000-7f602d2ff000 r--s 000fd000 08:02 581672 /usr/lib/jvm/java-1.6.0-openjdk/jre/lib/resources.jar 7f602d2ff000-7f602d307000 rw-s 00000000 08:02 581757 /tmp/hsperfdata_gaurish/5135 7f602d307000-7f602d308000 rw-p 00000000 00:00 0 7f602d308000-7f602d309000 r--p 00000000 00:00 0 7f602d309000-7f602d30b000 rw-p 00000000 00:00 0 7f602d30b000-7f602d30c000 r--p 0001c000 08:02 704568 /lib/ld-2.10.1.so 7f602d30c000-7f602d30d000 rw-p 0001d000 08:02 704568 /lib/ld-2.10.1.so 7fff72939000-7fff7294c000 rwxp 00000000 00:00 0 [stack] 7fff7294c000-7fff7294e000 rw-p 00000000 00:00 0 7fff72976000-7fff72977000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] VM Arguments: java_command: sun.applet.PluginMain Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk/jre/../lib/amd64 SHELL=/bin/bash DISPLAY=:0.0 Signal Handlers: SIGSEGV: [libjvm.so+0x66b290], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x66b290], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x542960], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x542960], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x542960], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x542960], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x542100], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x5444c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: [libjvm.so+0x5444c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGTERM: [libjvm.so+0x5444c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x5444c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:Linux uname:Linux 2.6.30-ARCH #1 SMP PREEMPT Sat Jul 4 02:24:43 CEST 2009 x86_64 libc:glibc 2.10.1 NPTL 2.10.1 rlimit: STACK 8192k, CORE 0k, NPROC 8191, NOFILE 1024, AS infinity load average:0.66 0.38 0.33 CPU:total 1 (1 cores per cpu, 1 threads per core) family 15 model 12 stepping 0, cmov, cx8, fxsr, mmx, sse, sse2, mmxext, 3dnow, 3dnowext Memory: 4k page, physical 1026132k(225624k free), swap 1574360k(1574360k free) vm_info: OpenJDK 64-Bit Server VM (14.0-b15) for linux-amd64 JRE (1.6.0_0-b16), built on Jul 2 2009 04:46:40 by "andyrtr" with gcc 4.4.0 20090526 (prerelease) time: Sun Jul 19 17:00:04 2009 elapsed time: 7 seconds ------------------------------------------------------------------------------- Steps to Reproduce: 1) Try to Open (http://www.rechargeitnow.com/needRecharge.jsp) 2) It would crash and not load 3) Find the cash log in your Home Dir Please tell me a workaround -- 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 Joe.Darcy at Sun.COM Sat Aug 1 21:38:57 2009 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Sat, 01 Aug 2009 21:38:57 -0700 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <4A73E58F.9020502@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> Message-ID: <4A751861.2090901@sun.com> Erik Trimble wrote: > Andrew John Hughes wrote: >> Here it is, the mother of all webrevs: >> >> http://cr.openjdk.java.net/~andrew/jdk6-hs14-merge/webrev.01/ >> >> with the patch itself being ~13mb. >> >> This takes OpenJDK6 up to HotSpot 14 build 16 (see >> http://hg.openjdk.java.net/hsx/hsx14/master/), incorporating 553 >> changesets from the hs14 repo. and one merge changeset. >> I'll shortly push this to http://fuseyism.com/hg/hotspot too. >> >> Ok to push? >> > I approve. > I've taken a look too and don't see anything amiss; approved! Thanks, -Joe From bugzilla-daemon at icedtea.classpath.org Mon Aug 3 01:41:23 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Aug 2009 08:41:23 +0000 Subject: [Bug 356] keytool doesn't handle SHA384withECDSA signatures Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=356 ------- Comment #10 from ankostis at gmail.com 2009-08-03 08:41 ------- (In reply to comment #9) > A couple of questions come to mind about the possibility of generating a NSS > config file (depending on detection of nss library). > First: how would we know whether the local library is built > with ECC support? > It is not afaik a default build option, > Fedora may not be the only distro not building with that option. As listed in #3, i had verified that: * gentoo[1] and * debian/ubuntu[2] build NSS with ECC by default. Also linked this bug to fedora's relevant bug[3] as suggested. [1] http://bugs.gentoo.org/247221 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490826 [3] https://bugzilla.redhat.com/show_bug.cgi?id=492124 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From gnu_andrew at member.fsf.org Mon Aug 3 03:02:18 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 3 Aug 2009 11:02:18 +0100 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <4A751861.2090901@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> Message-ID: <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> 2009/8/2 Joseph D. Darcy : > Erik Trimble wrote: >> >> Andrew John Hughes wrote: >>> >>> Here it is, the mother of all webrevs: >>> >>> http://cr.openjdk.java.net/~andrew/jdk6-hs14-merge/webrev.01/ >>> >>> with the patch itself being ~13mb. >>> >>> This takes OpenJDK6 up to HotSpot 14 build 16 (see >>> http://hg.openjdk.java.net/hsx/hsx14/master/), incorporating 553 >>> changesets from the hs14 repo. and one merge changeset. >>> I'll shortly push this to http://fuseyism.com/hg/hotspot too. >>> >>> Ok to push? >>> >> >> I approve. >> > > I've taken a look too and don't see anything amiss; approved! > > Thanks, > > -Joe > Thanks Erik and Joe for the (very quick) approval! Wasn't expecting that over a weekend :) It looks like pushing isn't working too well though: pushing to ssh://andrew at hg.openjdk.java.net/jdk6/jdk6-gate/hotspot searching for changes remote: adding changesets remote: abort: Permission denied: /hg/jdk6/jdk6-gate/hotspot/.hg/store/00changelog.i abort: unexpected response: empty string I've pushed to various trees before (tl, awt, build, icedtea, cvmi) so I'm guessing this might be related to some permission issues following the replacement of hotspot? Any ideas? CCing Mark Reinhold as well as he manages hg. Thanks, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From gnu_andrew at member.fsf.org Mon Aug 3 04:06:34 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 3 Aug 2009 12:06:34 +0100 Subject: [PATCH FOR APPROVAL]: Bump HotSpot to hs14b16 Message-ID: <17c6771e0908030406ob11cc89p1a1bb12e767ce790@mail.gmail.com> A simple patch to let us use the latest revision of HotSpot 14 for the release; this moves IcedTea6 from hs14b15 to hs14b16. This is the same version as will be available in the OpenJDK6 repositories as soon as I can push it: http://mail.openjdk.java.net/pipermail/jdk6-dev/2009-August/000656.html Ok to push? ChangeLog: 2009-08-03 Andrew John Hughes * hotspot.map: Bump to hs14b16. -- 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 -------------- diff -r 4041898deb5a hotspot.map --- a/hotspot.map Thu Jul 30 22:47:00 2009 +0100 +++ b/hotspot.map Mon Aug 03 12:03:28 2009 +0100 @@ -1,3 +1,2 @@ # version changeset md5sum -default 25a020f13592 dbd7aca5544d1aeebf0eadd45d29d08e - +default 09f7962b8b44 600284e870609a7531163bf2972c573b From mark at klomp.org Mon Aug 3 05:04:59 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 03 Aug 2009 14:04:59 +0200 Subject: [PATCH FOR APPROVAL]: Bump HotSpot to hs14b16 In-Reply-To: <17c6771e0908030406ob11cc89p1a1bb12e767ce790@mail.gmail.com> References: <17c6771e0908030406ob11cc89p1a1bb12e767ce790@mail.gmail.com> Message-ID: <1249301099.3344.5.camel@springer.wildebeest.org> Hi Andrew, On Mon, 2009-08-03 at 12:06 +0100, Andrew John Hughes wrote: > Ok to push? > > ChangeLog: > > 2009-08-03 Andrew John Hughes > > * hotspot.map: > Bump to hs14b16. Nice. Please do push. Thanks for all your hard work, and persistence, pushing hotspot for 6 forward. Cheers, Mark From ahughes at redhat.com Mon Aug 3 05:16:12 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Mon, 03 Aug 2009 12:16:12 +0000 Subject: changeset in /hg/icedtea6: Bump HotSpot to revision 16. Message-ID: changeset 18f23e1e3c37 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=18f23e1e3c37 description: Bump HotSpot to revision 16. 2009-08-03 Andrew John Hughes * hotspot.map: Bump to hs14b16. diffstat: 2 files changed, 6 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ hotspot.map | 3 +-- diffs (20 lines): diff -r 4041898deb5a -r 18f23e1e3c37 ChangeLog --- a/ChangeLog Thu Jul 30 22:47:00 2009 +0100 +++ b/ChangeLog Mon Aug 03 13:18:16 2009 +0100 @@ -1,3 +1,8 @@ 2009-07-30 Andrew John Hughes + + * hotspot.map: + Bump to hs14b16. + 2009-07-30 Andrew John Hughes * Makefile.am: diff -r 4041898deb5a -r 18f23e1e3c37 hotspot.map --- a/hotspot.map Thu Jul 30 22:47:00 2009 +0100 +++ b/hotspot.map Mon Aug 03 13:18:16 2009 +0100 @@ -1,3 +1,2 @@ # version changeset md5sum -default 25a020f13592 dbd7aca5544d1aeebf0eadd45d29d08e - +default 09f7962b8b44 600284e870609a7531163bf2972c573b From gnu_andrew at member.fsf.org Mon Aug 3 05:37:01 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 3 Aug 2009 13:37:01 +0100 Subject: [PATCH FOR APPROVAL]: Bump HotSpot to hs14b16 In-Reply-To: <1249301099.3344.5.camel@springer.wildebeest.org> References: <17c6771e0908030406ob11cc89p1a1bb12e767ce790@mail.gmail.com> <1249301099.3344.5.camel@springer.wildebeest.org> Message-ID: <17c6771e0908030537l4a2fab9chf47f68978cb289ea@mail.gmail.com> 2009/8/3 Mark Wielaard : > Hi Andrew, > > On Mon, 2009-08-03 at 12:06 +0100, Andrew John Hughes wrote: >> Ok to push? >> >> ChangeLog: >> >> 2009-08-03 ?Andrew John Hughes ? >> >> ? ? ? ? * hotspot.map: >> ? ? ? ? Bump to hs14b16. > > Nice. Please do push. Thanks for all your hard work, and persistence, > pushing hotspot for 6 forward. > > Cheers, > > Mark > > Thanks. Committed. -- 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 Aug 3 07:23:09 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 3 Aug 2009 15:23:09 +0100 Subject: New API in JDK7 Message-ID: <17c6771e0908030723t7481b949we4218265f0157d08@mail.gmail.com> I thought this might be of interest to those who want a quick overview of actual API changes in JDK7 so far. With Classpath, we use the japitools developed by Stuart Ballard (http://sab39.netreach.com/Software/Japitools/42/) to compare how well Classpath implements the APIs provided by various versions of the JDK. The same can be done to see 'how well OpenJDK6 implements OpenJDK7' or rather what's changed since JDK6: http://builder.classpath.org/japi/openjdk7-openjdk6.html There's also the inverse: http://builder.classpath.org/japi/openjdk6-openjdk7.html which shows anything missing in OpenJDK7 that was in OpenJDK6 (some xml methods and one Swing method it seems). Currently the results are based on IcedTea builds of b16 of OpenJDK6 and b66 (Milestone 4) of OpenJDK7, and will be updated to new builds as they are released and supported by IcedTea. -- 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 Kelly.Ohair at Sun.COM Mon Aug 3 08:39:40 2009 From: Kelly.Ohair at Sun.COM (Kelly O'Hair) Date: Mon, 03 Aug 2009 08:39:40 -0700 Subject: New API in JDK7 In-Reply-To: <17c6771e0908030723t7481b949we4218265f0157d08@mail.gmail.com> References: <17c6771e0908030723t7481b949we4218265f0157d08@mail.gmail.com> Message-ID: <4A7704BC.8080403@sun.com> Very interesting, thanks for sharing this. -kto Andrew John Hughes wrote: > I thought this might be of interest to those who want a quick overview > of actual API changes in JDK7 so far. With Classpath, we use the > japitools developed by Stuart Ballard > (http://sab39.netreach.com/Software/Japitools/42/) to compare how well > Classpath implements the APIs provided by various versions of the JDK. > The same can be done to see 'how well OpenJDK6 implements OpenJDK7' > or rather what's changed since JDK6: > > http://builder.classpath.org/japi/openjdk7-openjdk6.html > > There's also the inverse: > > http://builder.classpath.org/japi/openjdk6-openjdk7.html > > which shows anything missing in OpenJDK7 that was in OpenJDK6 (some > xml methods and one Swing method it seems). > > Currently the results are based on IcedTea builds of b16 of OpenJDK6 > and b66 (Milestone 4) of OpenJDK7, and will be updated to new builds > as they are released and supported by IcedTea. From martinrb at google.com Mon Aug 3 09:05:21 2009 From: martinrb at google.com (Martin Buchholz) Date: Mon, 3 Aug 2009 09:05:21 -0700 Subject: New API in JDK7 In-Reply-To: <17c6771e0908030723t7481b949we4218265f0157d08@mail.gmail.com> References: <17c6771e0908030723t7481b949we4218265f0157d08@mail.gmail.com> Message-ID: <1ccfd1c10908030905u39588276p851d643677b1bcdc@mail.gmail.com> Interesting. There is a bunch of warnings about java.util.concurrent http://builder.classpath.org/japi/openjdk6-openjdk7.html#err_bad_java_util_concurrent but I don't understand them. There is not supposed to be any difference between jdk6 and jdk7 with these methods. Martin On Mon, Aug 3, 2009 at 07:23, Andrew John Hughes wrote: > I thought this might be of interest to those who want a quick overview > of actual API changes in JDK7 so far. ?With Classpath, we use the > japitools developed by Stuart Ballard > (http://sab39.netreach.com/Software/Japitools/42/) to compare how well > Classpath implements the APIs provided by various versions of the JDK. > ?The same can be done to see 'how well OpenJDK6 implements OpenJDK7' > or rather what's changed since JDK6: > > http://builder.classpath.org/japi/openjdk7-openjdk6.html > > There's also the inverse: > > http://builder.classpath.org/japi/openjdk6-openjdk7.html > > which shows anything missing in OpenJDK7 that was in OpenJDK6 (some > xml methods and one Swing method it seems). > > Currently the results are based on IcedTea builds of b16 of OpenJDK6 > and b66 (Milestone 4) of OpenJDK7, and will be updated to new builds > as they are released and supported by IcedTea. > -- > 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 Aug 3 09:10:20 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 3 Aug 2009 17:10:20 +0100 Subject: New API in JDK7 In-Reply-To: <1ccfd1c10908030905u39588276p851d643677b1bcdc@mail.gmail.com> References: <17c6771e0908030723t7481b949we4218265f0157d08@mail.gmail.com> <1ccfd1c10908030905u39588276p851d643677b1bcdc@mail.gmail.com> Message-ID: <17c6771e0908030910g29ce1a79se7458964aa032954@mail.gmail.com> 2009/8/3 Martin Buchholz : > Interesting. > > There is a bunch of warnings about java.util.concurrent > > http://builder.classpath.org/japi/openjdk6-openjdk7.html#err_bad_java_util_concurrent > > but I don't understand them. > There is not supposed to be any difference between jdk6 and jdk7 > with these methods. > Funnily enough, I was just looking at exactly the same thing! I think those are red herrings; the japi tool seems to be getting confused over the generics in those classes. We get the same errors for GNU Classpath too, yet this is one situation where we all share the same public domain code from Doug. You can safely ignore them. Everything else seems sane and I found it interesting spotting a few minor changes I'd missed such as some of the new constructors, etc. > Martin > > On Mon, Aug 3, 2009 at 07:23, Andrew John > Hughes wrote: >> I thought this might be of interest to those who want a quick overview >> of actual API changes in JDK7 so far. ?With Classpath, we use the >> japitools developed by Stuart Ballard >> (http://sab39.netreach.com/Software/Japitools/42/) to compare how well >> Classpath implements the APIs provided by various versions of the JDK. >> ?The same can be done to see 'how well OpenJDK6 implements OpenJDK7' >> or rather what's changed since JDK6: >> >> http://builder.classpath.org/japi/openjdk7-openjdk6.html >> >> There's also the inverse: >> >> http://builder.classpath.org/japi/openjdk6-openjdk7.html >> >> which shows anything missing in OpenJDK7 that was in OpenJDK6 (some >> xml methods and one Swing method it seems). >> >> Currently the results are based on IcedTea builds of b16 of OpenJDK6 >> and b66 (Milestone 4) of OpenJDK7, and will be updated to new builds >> as they are released and supported by IcedTea. >> -- >> Andrew :-) >> >> Free Java Software Engineer >> Red Hat, Inc. (http://www.redhat.com) >> >> Support Free Java! >> Contribute to GNU Classpath and the OpenJDK >> http://www.gnu.org/software/classpath >> http://openjdk.java.net >> >> PGP Key: 94EFD9D8 (http://subkeys.pgp.net) >> Fingerprint: F8EF F1EA 401E 2E60 15FA ?7927 142C 2591 94EF D9D8 >> > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Mon Aug 3 09:33:19 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Aug 2009 16:33:19 +0000 Subject: [Bug 375] New: IcedTea fails to build using ecj-3.5 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=375 Summary: IcedTea fails to build using ecj-3.5 Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com forwarded to eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=285466 IcedTea fails to build using ecj-3.5: $ sh call_ecj.sh + ecj -version Eclipse Java Compiler 0.967_R35x, 3.5.1 release, Copyright IBM Corp 2000, 2009. All rights reserved. + ecj -nowarn -g -d lib/hotspot-tools -source 1.5 -sourcepath hotspot-tools:openjdk/jdk/src/share/classes:openjdk/jdk/src/solaris/classes:openjdk/langtools/src/share/classes:openjdk/jaxp/src/share/classes:openjdk/corba/src/share/classes:openjdk/jaxws/src/share/classes:generated:rt -bootclasspath @hotspot-tools-source-files.txt ---------- 1. ERROR in hotspot-tools/com/sun/codemodel/internal/package-info.java (at line 1) /* ^ The type package-info is already defined ---------- ---------- 2. ERROR in hotspot-tools/com/sun/source/tree/package-info.java (at line 1) /* ^ The type package-info is already defined ---------- ---------- 3. ERROR in hotspot-tools/com/sun/source/util/package-info.java (at line 1) /* ^ The type package-info is already defined ---------- ---------- 4. ERROR in hotspot-tools/com/sun/tools/internal/xjc/model/package-info.java (at line 1) /* ^ The type package-info is already defined ---------- ---------- 5. ERROR in hotspot-tools/com/sun/tools/internal/xjc/package-info.java (at line 1) /* ^ The type package-info is already defined ---------- ---------- 6. ERROR in hotspot-tools/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java (at line 1) /* ^ The type package-info is already defined ---------- 6 problems (6 errors) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From doko at ubuntu.com Mon Aug 3 10:31:20 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Mon, 03 Aug 2009 17:31:20 +0000 Subject: changeset in /hg/icedtea: Fix llvm header location Message-ID: changeset 9ef90ed6dac9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9ef90ed6dac9 description: Fix llvm header location 2009-06-23 Matthias Klose * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Fix header location. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ ports/hotspot/src/share/vm/shark/llvmHeaders.hpp | 2 +- diffs (23 lines): diff -r b1923df0d722 -r 9ef90ed6dac9 ChangeLog --- a/ChangeLog Tue Jun 23 12:40:50 2009 +0200 +++ b/ChangeLog Tue Jun 23 16:31:22 2009 +0200 @@ -1,3 +1,7 @@ 2009-06-23 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Fix header location. + 2009-06-23 Xerxes R??nby PR icedtea/353 diff -r b1923df0d722 -r 9ef90ed6dac9 ports/hotspot/src/share/vm/shark/llvmHeaders.hpp --- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Tue Jun 23 12:40:50 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Tue Jun 23 16:31:22 2009 +0200 @@ -36,7 +36,7 @@ #include #include #if SHARK_LLVM_VERSION >= 26 -#include +#include #include #endif #include From gbenson at redhat.com Mon Aug 3 10:31:17 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:17 +0000 Subject: changeset in /hg/icedtea: 2009-06-18 Gary Benson changeset 21f0340f7c98 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=21f0340f7c98 description: 2009-06-18 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::improve_virtual_call): Only print cast warnings when run with -XX:+SharkPerformanceWarnings. diffstat: 2 files changed, 15 insertions(+), 9 deletions(-) ChangeLog | 6 +++++ ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 18 +++++++-------- diffs (41 lines): diff -r 8caa172d8bbc -r 21f0340f7c98 ChangeLog --- a/ChangeLog Thu Jun 18 12:00:59 2009 -0400 +++ b/ChangeLog Thu Jun 18 12:14:25 2009 -0400 @@ -1,3 +1,9 @@ 2009-06-18 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::improve_virtual_call): Only print cast + warnings when run with -XX:+SharkPerformanceWarnings. + 2009-06-18 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp: New file. diff -r 8caa172d8bbc -r 21f0340f7c98 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 18 12:00:59 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 18 12:14:25 2009 -0400 @@ -902,15 +902,15 @@ ciMethod* SharkTopLevelBlock::improve_vi // 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 + if (SharkPerformanceWarnings) { + warning("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(); + } monomorphic_target = NULL; } } From gbenson at redhat.com Mon Aug 3 10:31:17 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:17 +0000 Subject: changeset in /hg/icedtea: 2009-06-18 Gary Benson changeset 8caa172d8bbc in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8caa172d8bbc description: 2009-06-18 Gary Benson * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkInvariants.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction): Made a subclass of SharkTargetInvariants. (SharkFunction::SharkFunction): Updated constructor. (SharkFunction::_compiler): Removed. (SharkFunction::_flow): Likewise. (SharkFunction::_iter): Likewise. (SharkFunction::_thread): Likewise. (SharkFunction::_max_monitors): Likewise. (SharkFunction::compiler): Likewise. (SharkFunction::flow): Likewise. (SharkFunction::iter): Likewise. (SharkFunction::thread): Likewise. (SharkFunction::max_monitors): Likewise. (SharkFunction::builder): Likewise. (SharkFunction::arg_size): Likewise. (SharkFunction::debug_info): Likewise. (SharkFunction::env): Likewise. (SharkFunction::max_locals): Likewise. (SharkFunction::max_stack): Likewise. (SharkFunction::target): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::initialize): Updated. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock): Made a subclass of SharkTargetInvariants. (SharkBlock::SharkBlock): Updated constructors. (SharkBlock::_builder): Removed. (SharkBlock::_target): Likewise. (SharkBlock::_thread): Likewise. (SharkBlock::builder): Likewise. (SharkBlock::target): Likewise. (SharkBlock::thread): Likewise. (SharkBlock::max_locals): Likewise. (SharkBlock::max_stack): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::initial_current_state): Use SharkState::copy. * ports/hotspot/src/share/vm/shark/sharkState.hpp (SharkState): Made a subclass of SharkTargetInvariants. (SharkState::SharkState): Updated constructors. (SharkState::_block): Removed. (SharkState::_function): Likewise. (SharkState::block): Likewise. (SharkState::function): Likewise. (SharkState::builder): Likewise. (SharkState::max_locals): Likewise. (SharkState::max_stack): Likewise. (SharkState::max_monitors): Likewise. (SharkState::pop): Likewise. (SharkState::copy): Updated. (SharkState::decache_for_Java_call): Moved to SharkTopLevelBlock. (SharkState::cache_after_Java_call): Likewise. (SharkState::decache_for_VM_call): Likewise. (SharkState::cache_after_VM_call): Likewise. (SharkState::decache_for_trap): Likewise. (SharkPHIState::_block): New field. (SharkPHIState::block): New method. * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Removed. * ports/hotspot/src/share/vm/shark/sharkState.cpp (SharkState::equal_to): Updated. (SharkState::decache_for_Java_call): Moved to SharkTopLevelBlock. (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): Updated. (SharkPHIState::SharkPHIState): Likewise. (SharkPHIState::add_incoming): Likewise. * ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp (SharkStateScanner): Made a subclass of SharkTargetInvariants. (SharkStateScanner::SharkStateScanner): Updated constructor. (SharkStateScanner::start_stack): Updated arguments. (SharkStateScanner::start_locals): Likewise. (SharkStateScanner::stack_integrity_checks): Made non-static. (SharkStateScanner::locals_integrity_checks): Likewise. * ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp (SharkStateScanner::scan): Updated. (SharkStateScanner::locals_integrity_checks): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp (SharkCacherDecacher::builder): Removed. (SharkDecacher::debug_info): Likewise. (SharkDecacher::start_stack): Updated arguments. (SharkDecacher::start_locals): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Updated. (SharkDecacher::start_stack): Likewise.. (SharkDecacher::start_locals): Likewise. (SharkDecacher::end_frame): Likewise. * ports/hotspot/src/share/vm/shark/sharkInliner.hpp (SharkInliner::attempt_inline): Removed thread argument. * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlineBlock): Made a subclass of SharkTargetInvariants. (SharkInlineBlock::SharkInlineBlock): Updated constructor. (SharkInlinerHelper::SharkInlinerHelper): Likewise. (SharkInlinerHelper::_thread): Removed. (SharkInlinerHelper::thread): Likewise. (SharkInlinerHelper::do_inline): Updated. (SharkInliner::attempt_inline): Updated. * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp (SharkIntrinsics): Made a subclass of SharkTargetInvariants. (SharkIntrinsics::inline_intrinsic): Updated arguments. (SharkIntrinsics::SharkIntrinsics): New method. (SharkIntrinsics::_state): New field. (SharkIntrinsics::state): New method. (SharkIntrinsics::do_intrinsic): Likewise. (SharkIntrinsics::do_Math_minmax): Updated arguments. (SharkIntrinsics::do_Math_1to1): Likewise. (SharkIntrinsics::do_Math_2to1): Likewise. (SharkIntrinsics::do_Object_getClass): Likewise. (SharkIntrinsics::do_System_currentTimeMillis): Likewise. (SharkIntrinsics::do_Thread_currentThread): Likewise. (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp (SharkIntrinsics::inline_intrinsic): Updated. (SharkIntrinsics::do_intrinsic): New method. (SharkIntrinsics::do_Math_minmax): Updated. (SharkIntrinsics::do_Math_1to1): Likewise. (SharkIntrinsics::do_Math_2to1): Likewise. (SharkIntrinsics::do_Object_getClass): Likewise. (SharkIntrinsics::do_System_currentTimeMillis): Likewise. (SharkIntrinsics::do_Thread_currentThread): Likewise. (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::SharkTopLevelBlock): Updated constructor. (SharkTopLevelBlock::decache_for_Java_call): Moved from SharkState. (SharkTopLevelBlock::cache_after_Java_call): Likewise. (SharkTopLevelBlock::decache_for_VM_call): Likewise. (SharkTopLevelBlock::cache_after_VM_call): Likewise. (SharkTopLevelBlock::decache_for_trap): Likewise. (SharkTopLevelBlock::call_vm): Updated. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::decache_for_Java_call): Moved from SharkState. (SharkTopLevelBlock::cache_after_Java_call): Likewise. (SharkTopLevelBlock::decache_for_VM_call): Likewise. (SharkTopLevelBlock::cache_after_VM_call): Likewise. (SharkTopLevelBlock::decache_for_trap): Likewise. (SharkTopLevelBlock::do_trap): Updated. (SharkTopLevelBlock::improve_virtual_call): Likewise. (SharkTopLevelBlock::do_call): Likewise. (SharkTopLevelBlock::acquire_lock): Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 22 files changed, 717 insertions(+), 522 deletions(-) ChangeLog | 153 ++++++++++ ports/hotspot/src/share/vm/includeDB_shark | 47 ++- ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 2 ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 73 +---- ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 14 ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp | 16 - ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 3 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 28 - ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 87 ------ ports/hotspot/src/share/vm/shark/sharkInliner.cpp | 28 - ports/hotspot/src/share/vm/shark/sharkInliner.hpp | 4 ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp | 214 +++++++-------- ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp | 36 +- ports/hotspot/src/share/vm/shark/sharkInvariants.cpp | 38 ++ ports/hotspot/src/share/vm/shark/sharkInvariants.hpp | 186 +++++++++++++ ports/hotspot/src/share/vm/shark/sharkState.cpp | 87 ------ ports/hotspot/src/share/vm/shark/sharkState.hpp | 77 ++--- ports/hotspot/src/share/vm/shark/sharkState.inline.hpp | 44 --- ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp | 12 ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp | 12 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 61 +++- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 17 - diffs (truncated from 1991 to 500 lines): diff -r 9c4c94b5f4a2 -r 8caa172d8bbc ChangeLog --- a/ChangeLog Wed Jun 17 14:37:31 2009 +0100 +++ b/ChangeLog Thu Jun 18 12:00:59 2009 -0400 @@ -1,3 +1,156 @@ 2009-06-17 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkInvariants.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction): Made a subclass of SharkTargetInvariants. + (SharkFunction::SharkFunction): Updated constructor. + (SharkFunction::_compiler): Removed. + (SharkFunction::_flow): Likewise. + (SharkFunction::_iter): Likewise. + (SharkFunction::_thread): Likewise. + (SharkFunction::_max_monitors): Likewise. + (SharkFunction::compiler): Likewise. + (SharkFunction::flow): Likewise. + (SharkFunction::iter): Likewise. + (SharkFunction::thread): Likewise. + (SharkFunction::max_monitors): Likewise. + (SharkFunction::builder): Likewise. + (SharkFunction::arg_size): Likewise. + (SharkFunction::debug_info): Likewise. + (SharkFunction::env): Likewise. + (SharkFunction::max_locals): Likewise. + (SharkFunction::max_stack): Likewise. + (SharkFunction::target): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::initialize): Updated. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock): Made a subclass of SharkTargetInvariants. + (SharkBlock::SharkBlock): Updated constructors. + (SharkBlock::_builder): Removed. + (SharkBlock::_target): Likewise. + (SharkBlock::_thread): Likewise. + (SharkBlock::builder): Likewise. + (SharkBlock::target): Likewise. + (SharkBlock::thread): Likewise. + (SharkBlock::max_locals): Likewise. + (SharkBlock::max_stack): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::initial_current_state): Use SharkState::copy. + + * ports/hotspot/src/share/vm/shark/sharkState.hpp + (SharkState): Made a subclass of SharkTargetInvariants. + (SharkState::SharkState): Updated constructors. + (SharkState::_block): Removed. + (SharkState::_function): Likewise. + (SharkState::block): Likewise. + (SharkState::function): Likewise. + (SharkState::builder): Likewise. + (SharkState::max_locals): Likewise. + (SharkState::max_stack): Likewise. + (SharkState::max_monitors): Likewise. + (SharkState::pop): Likewise. + (SharkState::copy): Updated. + (SharkState::decache_for_Java_call): Moved to SharkTopLevelBlock. + (SharkState::cache_after_Java_call): Likewise. + (SharkState::decache_for_VM_call): Likewise. + (SharkState::cache_after_VM_call): Likewise. + (SharkState::decache_for_trap): Likewise. + (SharkPHIState::_block): New field. + (SharkPHIState::block): New method. + * ports/hotspot/src/share/vm/shark/sharkState.inline.hpp: Removed. + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkState::equal_to): Updated. + (SharkState::decache_for_Java_call): Moved to SharkTopLevelBlock. + (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): Updated. + (SharkPHIState::SharkPHIState): Likewise. + (SharkPHIState::add_incoming): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp + (SharkStateScanner): Made a subclass of SharkTargetInvariants. + (SharkStateScanner::SharkStateScanner): Updated constructor. + (SharkStateScanner::start_stack): Updated arguments. + (SharkStateScanner::start_locals): Likewise. + (SharkStateScanner::stack_integrity_checks): Made non-static. + (SharkStateScanner::locals_integrity_checks): Likewise. + * ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp + (SharkStateScanner::scan): Updated. + (SharkStateScanner::locals_integrity_checks): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp + (SharkCacherDecacher::builder): Removed. + (SharkDecacher::debug_info): Likewise. + (SharkDecacher::start_stack): Updated arguments. + (SharkDecacher::start_locals): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Updated. + (SharkDecacher::start_stack): Likewise.. + (SharkDecacher::start_locals): Likewise. + (SharkDecacher::end_frame): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkInliner.hpp + (SharkInliner::attempt_inline): Removed thread argument. + * ports/hotspot/src/share/vm/shark/sharkInliner.cpp + (SharkInlineBlock): Made a subclass of SharkTargetInvariants. + (SharkInlineBlock::SharkInlineBlock): Updated constructor. + (SharkInlinerHelper::SharkInlinerHelper): Likewise. + (SharkInlinerHelper::_thread): Removed. + (SharkInlinerHelper::thread): Likewise. + (SharkInlinerHelper::do_inline): Updated. + (SharkInliner::attempt_inline): Updated. + + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp + (SharkIntrinsics): Made a subclass of SharkTargetInvariants. + (SharkIntrinsics::inline_intrinsic): Updated arguments. + (SharkIntrinsics::SharkIntrinsics): New method. + (SharkIntrinsics::_state): New field. + (SharkIntrinsics::state): New method. + (SharkIntrinsics::do_intrinsic): Likewise. + (SharkIntrinsics::do_Math_minmax): Updated arguments. + (SharkIntrinsics::do_Math_1to1): Likewise. + (SharkIntrinsics::do_Math_2to1): Likewise. + (SharkIntrinsics::do_Object_getClass): Likewise. + (SharkIntrinsics::do_System_currentTimeMillis): Likewise. + (SharkIntrinsics::do_Thread_currentThread): Likewise. + (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp + (SharkIntrinsics::inline_intrinsic): Updated. + (SharkIntrinsics::do_intrinsic): New method. + (SharkIntrinsics::do_Math_minmax): Updated. + (SharkIntrinsics::do_Math_1to1): Likewise. + (SharkIntrinsics::do_Math_2to1): Likewise. + (SharkIntrinsics::do_Object_getClass): Likewise. + (SharkIntrinsics::do_System_currentTimeMillis): Likewise. + (SharkIntrinsics::do_Thread_currentThread): Likewise. + (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::SharkTopLevelBlock): Updated constructor. + (SharkTopLevelBlock::decache_for_Java_call): Moved from SharkState. + (SharkTopLevelBlock::cache_after_Java_call): Likewise. + (SharkTopLevelBlock::decache_for_VM_call): Likewise. + (SharkTopLevelBlock::cache_after_VM_call): Likewise. + (SharkTopLevelBlock::decache_for_trap): Likewise. + (SharkTopLevelBlock::call_vm): Updated. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::decache_for_Java_call): Moved from SharkState. + (SharkTopLevelBlock::cache_after_Java_call): Likewise. + (SharkTopLevelBlock::decache_for_VM_call): Likewise. + (SharkTopLevelBlock::cache_after_VM_call): Likewise. + (SharkTopLevelBlock::decache_for_trap): Likewise. + (SharkTopLevelBlock::do_trap): Updated. + (SharkTopLevelBlock::improve_virtual_call): Likewise. + (SharkTopLevelBlock::do_call): Likewise. + (SharkTopLevelBlock::acquire_lock): Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-17 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp diff -r 9c4c94b5f4a2 -r 8caa172d8bbc ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Jun 17 14:37:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Jun 18 12:00:59 2009 -0400 @@ -50,8 +50,6 @@ ciTypeFlow.hpp compileBroker.cpp sharkCompiler.hpp -disassembler_.cpp sharkEntry.hpp - globals.hpp shark_globals_.hpp globals.cpp shark_globals.hpp @@ -75,7 +73,7 @@ sharkBlock.cpp sharkBlock.cpp sharkBuilder.hpp sharkBlock.cpp sharkConstant.hpp sharkBlock.cpp sharkRuntime.hpp -sharkBlock.cpp sharkState.inline.hpp +sharkBlock.cpp sharkState.hpp sharkBlock.cpp sharkValue.hpp sharkBlock.hpp allocation.hpp @@ -85,6 +83,7 @@ sharkBlock.hpp sharkBlock.hpp llvmHeaders.hpp sharkBlock.hpp sharkBuilder.hpp sharkBlock.hpp sharkConstant.hpp +sharkBlock.hpp sharkInvariants.hpp sharkBlock.hpp sharkState.hpp sharkBlock.hpp sharkValue.hpp @@ -121,7 +120,7 @@ sharkCacheDecache.cpp sharkCacheDecache.cpp sharkBuilder.hpp sharkCacheDecache.cpp sharkCacheDecache.hpp sharkCacheDecache.cpp sharkFunction.hpp -sharkCacheDecache.cpp sharkState.inline.hpp +sharkCacheDecache.cpp sharkState.hpp sharkCacheDecache.hpp ciMethod.hpp sharkCacheDecache.hpp debugInfoRec.hpp @@ -181,7 +180,7 @@ sharkFunction.cpp sharkFunction.cpp sharkBuilder.hpp sharkFunction.cpp sharkEntry.hpp sharkFunction.cpp sharkFunction.hpp -sharkFunction.cpp sharkState.inline.hpp +sharkFunction.cpp sharkState.hpp sharkFunction.cpp sharkTopLevelBlock.hpp sharkFunction.hpp allocation.hpp @@ -191,6 +190,7 @@ sharkFunction.hpp sharkFunction.hpp llvmHeaders.hpp sharkFunction.hpp llvmValue.hpp sharkFunction.hpp sharkBuilder.hpp +sharkFunction.hpp sharkInvariants.hpp sharkInliner.cpp allocation.hpp sharkInliner.cpp bytecodes.hpp @@ -198,29 +198,44 @@ sharkInliner.cpp sharkInliner.cpp ciMethod.hpp sharkInliner.cpp ciStreams.hpp sharkInliner.cpp shark_globals.hpp +sharkInliner.cpp sharkBlock.hpp sharkInliner.cpp sharkConstant.hpp sharkInliner.cpp sharkInliner.hpp sharkInliner.cpp sharkIntrinsics.hpp -sharkInliner.cpp sharkState.inline.hpp +sharkInliner.cpp sharkState.hpp sharkInliner.cpp sharkValue.hpp sharkInliner.hpp allocation.hpp sharkInliner.hpp ciMethod.hpp sharkInliner.hpp llvmHeaders.hpp -sharkInliner.hpp sharkState.inline.hpp +sharkInliner.hpp sharkState.hpp sharkIntrinsics.cpp ciMethod.hpp sharkIntrinsics.cpp llvmHeaders.hpp sharkIntrinsics.cpp shark_globals.hpp sharkIntrinsics.cpp sharkIntrinsics.hpp sharkIntrinsics.cpp sharkRuntime.hpp -sharkIntrinsics.cpp sharkState.inline.hpp +sharkIntrinsics.cpp sharkState.hpp sharkIntrinsics.cpp sharkValue.hpp sharkIntrinsics.hpp allocation.hpp sharkIntrinsics.hpp ciMethod.hpp sharkIntrinsics.hpp llvmHeaders.hpp sharkIntrinsics.hpp sharkState.hpp + +sharkInvariants.cpp sharkInvariants.hpp + +sharkInvariants.hpp allocation.hpp +sharkInvariants.hpp ciEnv.hpp +sharkInvariants.hpp ciMethod.hpp +sharkInvariants.hpp ciInstanceKlass.hpp +sharkInvariants.hpp ciTypeFlow.hpp +sharkInvariants.hpp debugInfoRec.hpp +sharkInvariants.hpp dependencies.hpp +sharkInvariants.hpp llvmHeaders.hpp +sharkInvariants.hpp sharkBuilder.hpp +sharkInvariants.hpp sharkCompiler.hpp +sharkInvariants.hpp sharkMemoryManager.hpp sharkMemoryManager.hpp llvmHeaders.hpp sharkMemoryManager.hpp sharkEntry.hpp @@ -249,7 +264,7 @@ sharkState.cpp sharkState.cpp ciTypeFlow.hpp sharkState.cpp sharkBuilder.hpp sharkState.cpp sharkCacheDecache.hpp -sharkState.cpp sharkState.inline.hpp +sharkState.cpp sharkState.hpp sharkState.cpp sharkTopLevelBlock.hpp sharkState.cpp sharkType.hpp sharkState.cpp sharkValue.hpp @@ -258,19 +273,16 @@ sharkState.hpp sharkState.hpp ciMethod.hpp sharkState.hpp llvmHeaders.hpp sharkState.hpp sharkBuilder.hpp +sharkState.hpp sharkInvariants.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 +sharkStateScanner.cpp sharkState.hpp sharkStateScanner.cpp sharkStateScanner.hpp sharkStateScanner.hpp allocation.hpp sharkStateScanner.hpp llvmHeaders.hpp sharkStateScanner.hpp sharkFunction.hpp +sharkStateScanner.hpp sharkInvariants.hpp sharkTopLevelBlock.cpp allocation.hpp sharkTopLevelBlock.cpp bytecodes.hpp @@ -283,12 +295,13 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp llvmHeaders.hpp sharkTopLevelBlock.cpp llvmValue.hpp sharkTopLevelBlock.cpp shark_globals.hpp +sharkTopLevelBlock.cpp sharkCacheDecache.hpp sharkTopLevelBlock.cpp sharkTopLevelBlock.hpp sharkTopLevelBlock.cpp sharkBuilder.hpp sharkTopLevelBlock.cpp sharkConstant.hpp sharkTopLevelBlock.cpp sharkInliner.hpp sharkTopLevelBlock.cpp sharkRuntime.hpp -sharkTopLevelBlock.cpp sharkState.inline.hpp +sharkTopLevelBlock.cpp sharkState.hpp sharkTopLevelBlock.cpp sharkValue.hpp sharkTopLevelBlock.hpp allocation.hpp @@ -300,7 +313,7 @@ sharkTopLevelBlock.hpp sharkTopLevelBlock.hpp sharkBlock.hpp sharkTopLevelBlock.hpp sharkBuilder.hpp sharkTopLevelBlock.hpp sharkFunction.hpp -sharkTopLevelBlock.hpp sharkState.inline.hpp +sharkTopLevelBlock.hpp sharkState.hpp sharkTopLevelBlock.hpp sharkValue.hpp sharkType.cpp arrayOop.hpp diff -r 9c4c94b5f4a2 -r 8caa172d8bbc ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Jun 17 14:37:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jun 18 12:00:59 2009 -0400 @@ -888,7 +888,7 @@ void SharkBlock::parse_bytecode(int star SharkState* SharkBlock::initial_current_state() { - return new SharkState(this, entry_state()); + return entry_state()->copy(); } int SharkBlock::switch_default_dest() diff -r 9c4c94b5f4a2 -r 8caa172d8bbc ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Wed Jun 17 14:37:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jun 18 12:00:59 2009 -0400 @@ -25,61 +25,32 @@ class SharkState; -class SharkBlock : public ResourceObj { +class SharkBlock : public SharkTargetInvariants { + protected: + SharkBlock(const SharkTargetInvariants* parent) + : SharkTargetInvariants(parent), + _iter(target()), + _current_state(NULL) {} + + SharkBlock(const SharkCompileInvariants* parent, ciMethod* target) + : SharkTargetInvariants(parent, target), + _iter(target), + _current_state(NULL) {} + + private: + ciBytecodeStream _iter; + SharkState* _current_state; + public: - SharkBlock(SharkBuilder* builder, - ciMethod* target, - ciBytecodeStream* iter, - llvm::Value* thread) - : _builder(builder), - _target(target), - _iter(iter), - _current_state(NULL), - _thread(thread) {} - - private: - SharkBuilder* _builder; - ciMethod* _target; - ciBytecodeStream* _iter; - SharkState* _current_state; - llvm::Value* _thread; - - public: - SharkBuilder* builder() const - { - return _builder; - } - ciMethod* target() const - { - return _target; - } - ciBytecodeStream* iter() const - { - return _iter; - } - llvm::Value* thread() const - { - return _thread; - } - - // Target properties - public: - int max_locals() const - { - return target()->max_locals(); - } - int max_stack() const - { - return target()->max_stack(); - } - - // Bytecode stream - public: - Bytecodes::Code bc() const + ciBytecodeStream* iter() + { + return &_iter; + } + Bytecodes::Code bc() { return iter()->cur_bc(); } - int bci() const + int bci() { return iter()->cur_bci(); } diff -r 9c4c94b5f4a2 -r 8caa172d8bbc ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Wed Jun 17 14:37:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Thu Jun 18 12:00:59 2009 -0400 @@ -34,20 +34,20 @@ void SharkDecacher::start_frame() _pc_offset = builder()->code_buffer()->create_unique_offset(); _oopmap = new OopMap( oopmap_slot_munge(function()->oopmap_frame_size()), - oopmap_slot_munge(function()->arg_size())); + oopmap_slot_munge(arg_size())); debug_info()->add_safepoint(pc_offset(), oopmap()); } -void SharkDecacher::start_stack(int num_slots, int max_slots) +void SharkDecacher::start_stack(int stack_depth) { // Create the array we'll record our stack slots in - _exparray = new GrowableArray(num_slots); + _exparray = new GrowableArray(stack_depth); // Set the stack pointer function()->CreateStoreZeroStackPointer( builder()->CreatePtrToInt( function()->CreateAddressOfFrameEntry( - function()->stack_slots_offset() + max_slots - num_slots), + function()->stack_slots_offset() + max_stack() - stack_depth), SharkType::intptr_type())); } @@ -123,10 +123,10 @@ void SharkDecacher::process_pc_slot(int function()->CreateAddressOfFrameEntry(offset)); } -void SharkDecacher::start_locals(int num_locals) +void SharkDecacher::start_locals() { // Create the array we'll record our local variables in - _locarray = new GrowableArray(num_locals);} + _locarray = new GrowableArray(max_locals());} void SharkDecacher::process_local_slot(int index, SharkValue** addr, @@ -158,7 +158,7 @@ void SharkDecacher::end_frame() // Record the scope debug_info()->describe_scope( pc_offset(), - function()->target(), + target(), bci(), debug_info()->create_scope_values(locarray()), debug_info()->create_scope_values(exparray()), diff -r 9c4c94b5f4a2 -r 8caa172d8bbc ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Wed Jun 17 14:37:31 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Thu Jun 18 12:00:59 2009 -0400 @@ -40,12 +40,6 @@ class SharkCacherDecacher : public Shark SharkCacherDecacher(SharkFunction* function) : SharkStateScanner(function) {} - protected: - SharkBuilder* builder() const - { - return function()->builder(); - } - // Helper protected: static int adjusted_offset(SharkValue* value, int offset) @@ -68,12 +62,6 @@ class SharkDecacher : public SharkCacher int bci() const { return _bci; - } - - private: - DebugInformationRecorder* debug_info() const - { - return function()->debug_info(); } private: @@ -109,7 +97,7 @@ class SharkDecacher : public SharkCacher protected: void start_frame(); From xerxes at zafena.se Mon Aug 3 10:31:19 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Mon, 03 Aug 2009 17:31:19 +0000 Subject: changeset in /hg/icedtea: PR icedtea/353 Message-ID: changeset b1923df0d722 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b1923df0d722 description: PR icedtea/353 * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Include llvm/Support/Threading.h and llvm/Target/TargetSelect.h used by llvm_start_multithreaded() and InitializeNativeTarget() when llvm version are 2.6 or later. * 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. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::SharkCompiler): Call InitializeNativeTarget() to link in native target when llvm version are 2.6 or later. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Call llvm_start_multithreaded() to initialize llvm mutex guards when llvm version are 2.6 or later. diffstat: 6 files changed, 78 insertions(+) ChangeLog | 22 +++++++++++++ ports/hotspot/src/share/vm/shark/llvmHeaders.hpp | 4 ++ ports/hotspot/src/share/vm/shark/llvmValue.hpp | 8 +++++ ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 32 ++++++++++++++++++++ ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 6 +++ ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 6 +++ diffs (188 lines): diff -r d8dac70fb1fa -r b1923df0d722 ChangeLog --- a/ChangeLog Fri Jun 19 08:48:56 2009 -0400 +++ b/ChangeLog Tue Jun 23 12:40:50 2009 +0200 @@ -1,3 +1,25 @@ 2009-06-19 Gary Benson + + PR icedtea/353 + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp + Include llvm/Support/Threading.h and llvm/Target/TargetSelect.h + used by llvm_start_multithreaded() and InitializeNativeTarget() + when llvm version are 2.6 or later. + * 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. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::SharkCompiler): Call InitializeNativeTarget() to + link in native target when llvm version are 2.6 or later. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Call llvm_start_multithreaded() to + initialize llvm mutex guards when llvm version are 2.6 or later. + 2009-06-19 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.cpp diff -r d8dac70fb1fa -r b1923df0d722 ports/hotspot/src/share/vm/shark/llvmHeaders.hpp --- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Fri Jun 19 08:48:56 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Tue Jun 23 12:40:50 2009 +0200 @@ -35,6 +35,10 @@ #include #include #include +#if SHARK_LLVM_VERSION >= 26 +#include +#include +#endif #include #include #include diff -r d8dac70fb1fa -r b1923df0d722 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Fri Jun 19 08:48:56 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Jun 23 12:40:50 2009 +0200 @@ -37,11 +37,19 @@ class LLVMValue : public AllStatic { { return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); } +#if SHARK_LLVM_VERSION >= 26 + static llvm::Constant* jfloat_constant(jfloat value) +#else static llvm::ConstantFP* jfloat_constant(jfloat value) +#endif { return llvm::ConstantFP::get(SharkType::jfloat_type(), value); } +#if SHARK_LLVM_VERSION >= 26 + static llvm::Constant* jdouble_constant(jdouble value) +#else static llvm::ConstantFP* jdouble_constant(jdouble value) +#endif { return llvm::ConstantFP::get(SharkType::jdouble_type(), value); } diff -r d8dac70fb1fa -r b1923df0d722 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jun 19 08:48:56 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Jun 23 12:40:50 2009 +0200 @@ -532,19 +532,31 @@ void SharkBlock::parse_bytecode(int star b = pop(); a = pop(); push(SharkValue::create_jfloat( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value()))); +#else builder()->CreateAdd(a->jfloat_value(), b->jfloat_value()))); +#endif break; case Bytecodes::_fsub: b = pop(); a = pop(); push(SharkValue::create_jfloat( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFSub(a->jfloat_value(), b->jfloat_value()))); +#else builder()->CreateSub(a->jfloat_value(), b->jfloat_value()))); +#endif break; case Bytecodes::_fmul: b = pop(); a = pop(); push(SharkValue::create_jfloat( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFMul(a->jfloat_value(), b->jfloat_value()))); +#else builder()->CreateMul(a->jfloat_value(), b->jfloat_value()))); +#endif break; case Bytecodes::_fdiv: b = pop(); @@ -561,26 +573,42 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_fneg: a = pop(); push(SharkValue::create_jfloat( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFNeg(a->jfloat_value()))); +#else builder()->CreateNeg(a->jfloat_value()))); +#endif break; case Bytecodes::_dadd: b = pop(); a = pop(); push(SharkValue::create_jdouble( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFAdd(a->jdouble_value(), b->jdouble_value()))); +#else builder()->CreateAdd(a->jdouble_value(), b->jdouble_value()))); +#endif break; case Bytecodes::_dsub: b = pop(); a = pop(); push(SharkValue::create_jdouble( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFSub(a->jdouble_value(), b->jdouble_value()))); +#else builder()->CreateSub(a->jdouble_value(), b->jdouble_value()))); +#endif break; case Bytecodes::_dmul: b = pop(); a = pop(); push(SharkValue::create_jdouble( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFMul(a->jdouble_value(), b->jdouble_value()))); +#else builder()->CreateMul(a->jdouble_value(), b->jdouble_value()))); +#endif break; case Bytecodes::_ddiv: b = pop(); @@ -597,7 +625,11 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_dneg: a = pop(); push(SharkValue::create_jdouble( +#if SHARK_LLVM_VERSION >= 26 + builder()->CreateFNeg(a->jdouble_value()))); +#else builder()->CreateNeg(a->jdouble_value()))); +#endif break; case Bytecodes::_iinc: diff -r d8dac70fb1fa -r b1923df0d722 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jun 19 08:48:56 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Tue Jun 23 12:40:50 2009 +0200 @@ -38,6 +38,12 @@ SharkCompiler::SharkCompiler() // Create the builder to build our functions _builder = new SharkBuilder(this); + +#if SHARK_LLVM_VERSION >= 26 + // If we have a native target, initialize it to ensure it is linked in and + // usable by the JIT. + InitializeNativeTarget(); +#endif // Create the JIT ModuleProvider *module_provider = new ExistingModuleProvider(module()); diff -r d8dac70fb1fa -r b1923df0d722 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Jun 19 08:48:56 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Tue Jun 23 12:40:50 2009 +0200 @@ -30,6 +30,12 @@ using namespace llvm; void SharkFunction::initialize(const char *name) { + +#if SHARK_LLVM_VERSION >= 26 + // Initialize llvm mutex guards + llvm_start_multithreaded(); +#endif + // Create the function _function = Function::Create( SharkType::entry_point_type(), From gbenson at redhat.com Mon Aug 3 10:31:19 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:19 +0000 Subject: changeset in /hg/icedtea: 2009-06-19 Gary Benson changeset d8dac70fb1fa in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=d8dac70fb1fa description: 2009-06-19 Gary Benson * ports/hotspot/src/share/vm/shark/sharkConstant.cpp (SharkConstant::for_ldc): Set type for object constants. (SharkConstant::SharkConstant): Updated. diffstat: 2 files changed, 18 insertions(+), 2 deletions(-) ChangeLog | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkConstant.cpp | 14 ++++++++++++-- diffs (51 lines): diff -r 3d97a22bbdab -r d8dac70fb1fa ChangeLog --- a/ChangeLog Fri Jun 19 06:03:31 2009 -0400 +++ b/ChangeLog Fri Jun 19 08:48:56 2009 -0400 @@ -1,3 +1,9 @@ 2009-06-19 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkConstant.cpp + (SharkConstant::for_ldc): Set type for object constants. + (SharkConstant::SharkConstant): Updated. + 2009-06-19 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp diff -r 3d97a22bbdab -r d8dac70fb1fa ports/hotspot/src/share/vm/shark/sharkConstant.cpp --- a/ports/hotspot/src/share/vm/shark/sharkConstant.cpp Fri Jun 19 06:03:31 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkConstant.cpp Fri Jun 19 08:48:56 2009 -0400 @@ -30,7 +30,16 @@ using namespace llvm; SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) { - return new SharkConstant(iter->get_constant(), NULL); + ciConstant constant = iter->get_constant(); + ciType *type = NULL; + if (constant.basic_type() == T_OBJECT) { + ciEnv *env = ciEnv::current(); + if (constant.as_object()->is_klass()) + type = env->Class_klass(); + else + type = env->String_klass(); + } + return new SharkConstant(constant, type); } SharkConstant* SharkConstant::for_field(ciBytecodeStream *iter) @@ -97,6 +106,7 @@ SharkConstant::SharkConstant(ciConstant // have yet to be created. We need to spot the unloaded // objects (which differ between ldc* and get*, thanks!) ciObject *object = constant.as_object(); + assert(type != NULL, "shouldn't be"); if (object->is_klass()) { // The constant returned for a klass is the ciKlass // for the entry, but we want the java_mirror. @@ -114,7 +124,7 @@ SharkConstant::SharkConstant(ciConstant _value = NULL; _object = object; - _type = type ? type : ciType::make(T_OBJECT); + _type = type; _is_loaded = true; _is_nonzero = true; _is_two_word = false; From gbenson at redhat.com Mon Aug 3 10:31:16 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:16 +0000 Subject: changeset in /hg/icedtea: 2009-06-17 Gary Benson changeset 9c4c94b5f4a2 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9c4c94b5f4a2 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 0baf35fada62 -r 9c4c94b5f4a2 ChangeLog --- a/ChangeLog Sun Jul 26 20:25:37 2009 +0100 +++ b/ChangeLog Wed Jun 17 14:37:31 2009 +0100 @@ -1,3 +1,41 @@ 2009-07-26 Andrew John Hughes + + * 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-07-26 Andrew John Hughes * Makefile.am: diff -r 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Sun Jul 26 20:25:37 2009 +0100 +++ 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 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp Sun Jul 26 20:25:37 2009 +0100 +++ 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 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp Sun Jul 26 20:25:37 2009 +0100 +++ 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) {} + SharkTrapDecacher(SharkFunction* function, int bci) + : SharkDecacher(function, bci) {} // Stack slot helpers protected: @@ -347,8 +331,8 @@ class SharkTrapDecacher : public SharkDe class SharkCacher : public SharkCacherDecacher { protected: - SharkCacher(SharkFunction* function, SharkFrameCache* frame_cache) - : SharkCacherDecacher(function, frame_cache) {} + SharkCacher(SharkFunction* function) + : SharkCacherDecacher(function) {} // Callbacks protected: @@ -377,10 +361,8 @@ class SharkCacher : public SharkCacherDe class SharkJavaCallCacher : public SharkCacher { public: - SharkJavaCallCacher(SharkFunction* function, - SharkFrameCache* frame_cache, - ciMethod* callee) - : SharkCacher(function, frame_cache), _callee(callee) {} + SharkJavaCallCacher(SharkFunction* function, ciMethod* callee) + : SharkCacher(function), _callee(callee) {} private: ciMethod* _callee; @@ -402,8 +384,8 @@ class SharkJavaCallCacher : public Shark class SharkVMCallCacher : public SharkCacher { public: - SharkVMCallCacher(SharkFunction* function, SharkFrameCache* frame_cache) - : SharkCacher(function, frame_cache) {} + SharkVMCallCacher(SharkFunction* function) + : SharkCacher(function) {} // Stack slot helper protected: @@ -415,10 +397,8 @@ class SharkVMCallCacher : public SharkCa class SharkFunctionEntryCacher : public SharkCacher { public: - SharkFunctionEntryCacher(SharkFunction* function, - SharkFrameCache* frame_cache, - llvm::Value* method) - : SharkCacher(function, frame_cache), _method(method) {} + SharkFunctionEntryCacher(SharkFunction* function, llvm::Value* method) + : SharkCacher(function), _method(method) {} private: llvm::Value* _method; diff -r 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/shark/sharkFrameCache.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFrameCache.cpp Sun Jul 26 20:25:37 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* - * 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/_sharkFrameCache.cpp.incl" - -using namespace llvm; - -SharkFrameCache::SharkFrameCache(SharkFunction *function) - : _frame_size(function->extended_frame_size()) -{ - _values = NEW_RESOURCE_ARRAY(Value*, frame_size()); - memset(_values, 0, frame_size() * sizeof(Value *)); -} - -SharkFrameCache::SharkFrameCache(const SharkFrameCache* cache) - : _frame_size(cache->frame_size()) -{ - _values = NEW_RESOURCE_ARRAY(Value*, frame_size()); - memcpy(_values, cache->_values, frame_size() * sizeof(Value *)); -} - -bool SharkFrameCache::equal_to(SharkFrameCache* other) -{ - if (frame_size() != other->frame_size()) - return false; - - for (int i = 0; i < frame_size(); i++) { - if (value(i) != other->value(i)) - return false; - } - - return true; -} - -void SharkFrameCache::merge(SharkFrameCache* other) -{ - assert(frame_size() == other->frame_size(), "should be"); - - for (int i = 0; i < frame_size(); i++) { - if (value(i) != other->value(i)) - set_value(i, NULL); - } -} diff -r 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/shark/sharkFrameCache.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFrameCache.hpp Sun Jul 26 20:25:37 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* - * 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 SharkFrameCache : public ResourceObj { - public: - SharkFrameCache(SharkFunction* function); - - protected: - SharkFrameCache(const SharkFrameCache* cache); - - private: - int _frame_size; - llvm::Value** _values; - - private: - int frame_size() const - { - return _frame_size; - } - - public: - llvm::Value* value(int slot) - { - assert(slot >= 0 && slot < frame_size(), "bad index"); - return _values[slot]; - } - void set_value(int slot, llvm::Value* value) - { - assert(slot >= 0 && slot < frame_size(), "bad index"); - _values[slot] = value; - } - - // Comparison - public: - bool equal_to(SharkFrameCache* other); - - // Copy and merge - public: - SharkFrameCache *copy() const - { - return new SharkFrameCache(this); - } - void merge(SharkFrameCache* other); -}; diff -r 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Sun Jul 26 20:25:37 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Wed Jun 17 14:37:31 2009 +0100 @@ -33,7 +33,6 @@ SharkState::SharkState(SharkBlock* block _function(function), _method(NULL), _oop_tmp(NULL), - _frame_cache(NULL), _has_safepointed(false) { initialize(NULL); @@ -44,7 +43,6 @@ SharkState::SharkState(SharkBlock* block _function(state->function()), _method(state->method()), _oop_tmp(state->oop_tmp()), - _frame_cache(NULL), _has_safepointed(state->has_safepointed()) { initialize(state); @@ -73,13 +71,7 @@ void SharkState::initialize(const SharkS value = value->clone(); push(value); } - - if (state->frame_cache()) - _frame_cache = state->frame_cache()->copy(); } - else if (function()) { - _frame_cache = new SharkFrameCache(function()); - } set_num_monitors(state ? state->num_monitors() : 0); } @@ -144,19 +136,6 @@ bool SharkState::equal_to(SharkState *ot if (!value->equal_to(other_value)) return false; } - } - - // Frame cache - if (frame_cache() == NULL) { - if (other->frame_cache() != NULL) - return false; - } - else { - if (other->frame_cache() == NULL) - return false; - - if (!frame_cache()->equal_to(other->frame_cache())) - return false; } return true; @@ -218,9 +197,6 @@ void SharkState::merge(SharkState* other } } - // Frame cache - frame_cache()->merge(other->frame_cache()); - // Safepointed status set_has_safepointed(this->has_safepointed() && other->has_safepointed()); } @@ -243,8 +219,7 @@ void SharkState::decache_for_Java_call(c void SharkState::decache_for_Java_call(ciMethod* callee) { assert(function() && method(), "you cannot decache here"); - SharkJavaCallDecacher( - function(), frame_cache(), block()->bci(), callee).scan(this); + SharkJavaCallDecacher(function(), block()->bci(), callee).scan(this); pop(callee->arg_size()); } @@ -269,25 +244,25 @@ void SharkState::cache_after_Java_call(c if (type->is_two_word()) push(NULL); } - SharkJavaCallCacher(function(), frame_cache(), callee).scan(this); + SharkJavaCallCacher(function(), callee).scan(this); } void SharkState::decache_for_VM_call() { assert(function() && method(), "you cannot decache here"); - SharkVMCallDecacher(function(), frame_cache(), block()->bci()).scan(this); + SharkVMCallDecacher(function(), block()->bci()).scan(this); } void SharkState::cache_after_VM_call() { assert(function() && method(), "you cannot cache here"); - SharkVMCallCacher(function(), frame_cache()).scan(this); + SharkVMCallCacher(function()).scan(this); } void SharkState::decache_for_trap() { assert(function() && method(), "you cannot decache here"); - SharkTrapDecacher(function(), frame_cache(), block()->bci()).scan(this); + SharkTrapDecacher(function(), block()->bci()).scan(this); } SharkEntryState::SharkEntryState(SharkTopLevelBlock* block, Value* method) @@ -326,7 +301,7 @@ SharkEntryState::SharkEntryState(SharkTo } set_local(i, value); } - SharkFunctionEntryCacher(function(), frame_cache(), method).scan(this); + SharkFunctionEntryCacher(function(), method).scan(this); } SharkPHIState::SharkPHIState(SharkTopLevelBlock* block) diff -r 0baf35fada62 -r 9c4c94b5f4a2 ports/hotspot/src/share/vm/shark/sharkState.hpp From gbenson at redhat.com Mon Aug 3 10:31:21 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:21 +0000 Subject: changeset in /hg/icedtea: 2009-06-26 Gary Benson changeset 97798e89d452 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=97798e89d452 description: 2009-06-26 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::SharkCompiler): Moved LLVM multithreading initialization from SharkFunction::initialize. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Moved LLVM multithreading initialization to SharkCompiler::SharkCompiler. diffstat: 3 files changed, 18 insertions(+), 6 deletions(-) ChangeLog | 9 +++++++++ ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 9 +++++++++ ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 6 ------ diffs (51 lines): diff -r b26e1c8bfc51 -r 97798e89d452 ChangeLog --- a/ChangeLog Thu Jun 25 11:40:43 2009 +0100 +++ b/ChangeLog Fri Jun 26 04:51:17 2009 -0400 @@ -1,3 +1,12 @@ 2009-06-25 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::SharkCompiler): Moved LLVM multithreading + initialization from SharkFunction::initialize. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Moved LLVM multithreading + initialization to SharkCompiler::SharkCompiler. + 2009-06-25 Gary Benson * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp diff -r b26e1c8bfc51 -r 97798e89d452 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Jun 25 11:40:43 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jun 26 04:51:17 2009 -0400 @@ -33,6 +33,15 @@ SharkCompiler::SharkCompiler() SharkCompiler::SharkCompiler() : AbstractCompiler() { +#if SHARK_LLVM_VERSION >= 26 + // Make LLVM safe for multithreading. We only make LLVM calls from + // the compiler thread, but if LLVM leaves stubs to be rewritten on + // execution then it's possible for Java threads to be making LLVM + // calls at the same time we are. + if (!llvm_start_multithreaded()) + warning("llvm_start_multithreaded() failed"); +#endif + // Create a module to build our functions into _module = new Module("shark"); diff -r b26e1c8bfc51 -r 97798e89d452 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Thu Jun 25 11:40:43 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Jun 26 04:51:17 2009 -0400 @@ -30,12 +30,6 @@ using namespace llvm; void SharkFunction::initialize(const char *name) { - -#if SHARK_LLVM_VERSION >= 26 - // Initialize llvm mutex guards - llvm_start_multithreaded(); -#endif - // Create the function _function = Function::Create( SharkType::entry_point_type(), From gbenson at redhat.com Mon Aug 3 10:31:21 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:21 +0000 Subject: changeset in /hg/icedtea: 2009-07-03 Gary Benson changeset 93d755a6148a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=93d755a6148a description: 2009-07-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::print_statistics): Removed. * ports/hotspot/src/share/vm/shark/sharkEntry.cpp: Removed. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Save location of native code across the call to ciEnv::register_method (which frees the buffer blob it's in), and inline what was SharkEntry::print_statistics. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 5 files changed, 22 insertions(+), 49 deletions(-) ChangeLog | 13 ++++++ ports/hotspot/src/share/vm/includeDB_shark | 2 - ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 15 ++++--- ports/hotspot/src/share/vm/shark/sharkEntry.cpp | 38 -------------------- ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 3 - diffs (119 lines): diff -r 97798e89d452 -r 93d755a6148a ChangeLog --- a/ChangeLog Fri Jun 26 04:51:17 2009 -0400 +++ b/ChangeLog Fri Jul 03 11:52:45 2009 +0100 @@ -1,3 +1,16 @@ 2009-06-26 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::print_statistics): Removed. + * ports/hotspot/src/share/vm/shark/sharkEntry.cpp: Removed. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Save location of native code + across the call to ciEnv::register_method (which frees the buffer + blob it's in), and inline what was SharkEntry::print_statistics. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-06-26 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp diff -r 97798e89d452 -r 93d755a6148a ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Fri Jun 26 04:51:17 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Fri Jul 03 11:52:45 2009 +0100 @@ -166,8 +166,6 @@ sharkConstant.hpp sharkConstant.hpp ciStreams.hpp sharkConstant.hpp sharkBuilder.hpp sharkConstant.hpp sharkValue.hpp - -sharkEntry.cpp sharkEntry.hpp sharkEntry.hpp llvmHeaders.hpp diff -r 97798e89d452 -r 93d755a6148a ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jun 26 04:51:17 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jul 03 11:52:45 2009 +0100 @@ -166,12 +166,12 @@ void SharkCompiler::compile_method(ciEnv entry->set_entry_point( (ZeroEntry::method_entry_t) execution_engine()->getPointerToFunction(function)); + address code_start = entry->code_start(); + address code_limit = entry->code_limit(); // Register generated code for profiling, etc - if (JvmtiExport::should_post_dynamic_code_generated()) { - JvmtiExport::post_dynamic_code_generated( - name, entry->code_start(), entry->code_limit()); - } + if (JvmtiExport::should_post_dynamic_code_generated()) + JvmtiExport::post_dynamic_code_generated(name, code_start, code_limit); // Install the method into the VM CodeOffsets offsets; @@ -198,8 +198,11 @@ void SharkCompiler::compile_method(ciEnv false); // Print statistics, if requested - if (SharkTraceInstalls) - entry->print_statistics(name); + if (SharkTraceInstalls) { + tty->print_cr( + " [%p-%p): %s (%d bytes code)", + code_start, code_limit, name, code_limit - code_start); + } } const char* SharkCompiler::methodname(const ciMethod* target) diff -r 97798e89d452 -r 93d755a6148a ports/hotspot/src/share/vm/shark/sharkEntry.cpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.cpp Fri Jun 26 04:51:17 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +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/_sharkEntry.cpp.incl" - -#ifndef PRODUCT -void SharkEntry::print_statistics(const char* name) const -{ - address start = code_start(); - address limit = code_limit(); - - tty->print_cr( - " [%p-%p): %s (%d bytes code)", start, limit, name, limit - start); -} -#endif // !PRODUCT diff -r 97798e89d452 -r 93d755a6148a ports/hotspot/src/share/vm/shark/sharkEntry.hpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Fri Jun 26 04:51:17 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Fri Jul 03 11:52:45 2009 +0100 @@ -43,7 +43,4 @@ class SharkEntry : public ZeroEntry { { _code_limit = code_limit; } - - public: - void print_statistics(const char* name) const PRODUCT_RETURN; }; From gbenson at redhat.com Mon Aug 3 10:31:20 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:20 +0000 Subject: changeset in /hg/icedtea: 2009-06-25 Gary Benson changeset b26e1c8bfc51 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b26e1c8bfc51 description: 2009-06-25 Gary Benson * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp (SharkRuntime::monitorexit_C): Remove unnecessary lock clear. diffstat: 2 files changed, 5 insertions(+), 5 deletions(-) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 5 ----- diffs (27 lines): diff -r 9ef90ed6dac9 -r b26e1c8bfc51 ChangeLog --- a/ChangeLog Tue Jun 23 16:31:22 2009 +0200 +++ b/ChangeLog Thu Jun 25 11:40:43 2009 +0100 @@ -1,3 +1,8 @@ 2009-06-23 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::monitorexit_C): Remove unnecessary lock clear. + 2009-06-23 Matthias Klose * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Fix header location. diff -r 9ef90ed6dac9 -r b26e1c8bfc51 ports/hotspot/src/share/vm/shark/sharkRuntime.cpp --- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Tue Jun 23 16:31:22 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Thu Jun 25 11:40:43 2009 +0100 @@ -290,11 +290,6 @@ JRT_ENTRY(void, SharkRuntime::monitorexi THROW(vmSymbols::java_lang_IllegalMonitorStateException()); } ObjectSynchronizer::slow_exit(object(), lock->lock(), thread); - - // Free entry. This must be done here, since a pending exception - // might be installed on exit. If it is not cleared, the exception - // handling code will try to unlock the monitor again. - lock->set_obj(NULL); } JRT_END From xerxes at zafena.se Mon Aug 3 10:31:23 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Mon, 03 Aug 2009 17:31:23 +0000 Subject: changeset in /hg/icedtea: 2009-07-14 Xerxes R?nby changeset 022c97ae92d2 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=022c97ae92d2 description: 2009-07-14 Xerxes R?nby * ports/hotspot/src/share/vm/shark/llvmValue.hpp (jfloat_constant): Handle LLVM 2.6 svn r75546 API change. llvm::ConstantFP::get have been moved to llvm::LLVMContext::getConstantFP. (jdouble_constant): Likewise. diffstat: 2 files changed, 16 insertions(+), 2 deletions(-) ChangeLog | 8 ++++++++ ports/hotspot/src/share/vm/shark/llvmValue.hpp | 10 ++++++++-- diffs (47 lines): diff -r 2a3a4c5b35e0 -r 022c97ae92d2 ChangeLog --- a/ChangeLog Thu Jul 09 12:49:11 2009 +0200 +++ b/ChangeLog Tue Jul 14 12:55:48 2009 +0200 @@ -1,3 +1,11 @@ 2009-07-09 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp + (jfloat_constant): Handle LLVM 2.6 svn r75546 API change. + llvm::ConstantFP::get have been moved to + llvm::LLVMContext::getConstantFP. + (jdouble_constant): Likewise. + 2009-07-09 Xerxes R??nby * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp diff -r 2a3a4c5b35e0 -r 022c97ae92d2 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Thu Jul 09 12:49:11 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Jul 14 12:55:48 2009 +0200 @@ -39,20 +39,26 @@ class LLVMValue : public AllStatic { } #if SHARK_LLVM_VERSION >= 26 static llvm::Constant* jfloat_constant(jfloat value) + { + return llvm::getGlobalContext().getConstantFP(SharkType::jfloat_type(), value); + } #else static llvm::ConstantFP* jfloat_constant(jfloat value) -#endif { return llvm::ConstantFP::get(SharkType::jfloat_type(), value); } +#endif #if SHARK_LLVM_VERSION >= 26 static llvm::Constant* jdouble_constant(jdouble value) + { + return llvm::getGlobalContext().getConstantFP(SharkType::jdouble_type(), value); + } #else static llvm::ConstantFP* jdouble_constant(jdouble value) -#endif { return llvm::ConstantFP::get(SharkType::jdouble_type(), value); } +#endif static llvm::ConstantPointerNull* null() { return llvm::ConstantPointerNull::get(SharkType::jobject_type()); From xerxes at zafena.se Mon Aug 3 10:31:22 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Mon, 03 Aug 2009 17:31:22 +0000 Subject: changeset in /hg/icedtea: 2009-07-08 Xerxes R?nby changeset d29fab296cd2 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=d29fab296cd2 description: 2009-07-08 Xerxes R?nby * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::pointer_constant): Pass the LLVMContext returned from getGlobalContext() to the new GlobalVariable constructor when llvm version are 2.6 or later to handle LLVM API change. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::CreateDump): Likewise. diffstat: 3 files changed, 23 insertions(+), 1 deletion(-) ChangeLog | 9 +++++++++ ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 6 ++++++ ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 9 ++++++++- diffs (51 lines): diff -r 225f4d8d7962 -r d29fab296cd2 ChangeLog --- a/ChangeLog Tue Jul 07 10:58:02 2009 +0200 +++ b/ChangeLog Wed Jul 08 11:28:08 2009 +0200 @@ -1,3 +1,12 @@ 2009-07-07 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::pointer_constant): Pass the LLVMContext returned + from getGlobalContext() to the new GlobalVariable constructor + when llvm version are 2.6 or later to handle LLVM API change. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::CreateDump): Likewise. + 2009-07-07 Xerxes R??nby * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp diff -r 225f4d8d7962 -r d29fab296cd2 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Tue Jul 07 10:58:02 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Jul 08 11:28:08 2009 +0200 @@ -187,6 +187,12 @@ CallInst* SharkBuilder::CreateDump(llvm: Value *name = CreatePtrToInt( CreateStructGEP( new GlobalVariable( +#if SHARK_LLVM_VERSION >= 26 + // LLVM 2.6 requires a LLVMContext during GlobalVariable construction. + // getGlobalConext() returns one that can be used as long as the shark + // compiler are single-threaded. + getGlobalContext(), +#endif const_name->getType(), true, GlobalValue::InternalLinkage, const_name, "dump", module()), diff -r 225f4d8d7962 -r d29fab296cd2 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Tue Jul 07 10:58:02 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jul 08 11:28:08 2009 +0200 @@ -174,7 +174,14 @@ class SharkBuilder : public llvm::IRBuil char name[128]; snprintf(name, sizeof name - 1, "pointer_constant_%p", ptr); - GlobalVariable *value = new GlobalVariable(SharkType::intptr_type(), + GlobalVariable *value = new GlobalVariable( +#if SHARK_LLVM_VERSION >= 26 + // LLVM 2.6 requires a LLVMContext during GlobalVariable construction. + // getGlobalConext() returns one that can be used as long as the shark + // compiler are single-threaded. + getGlobalContext(), +#endif + SharkType::intptr_type(), false, GlobalValue::ExternalLinkage, NULL, name, module()); execution_engine()->addGlobalMapping(value, const_cast(ptr)); From xerxes at zafena.se Mon Aug 3 10:31:22 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Mon, 03 Aug 2009 17:31:22 +0000 Subject: changeset in /hg/icedtea: 2009-07-07 Xerxes R?nby changeset 225f4d8d7962 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=225f4d8d7962 description: 2009-07-07 Xerxes R?nby * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Include llvm/LLVMContext.h used by getGlobalContext() when llvm version are 2.6 or later. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::SharkCompiler): Pass the LLVMContext returned from getGlobalContext() to the new Module constructor when llvm version are 2.6 or later to handle LLVM API change. diffstat: 3 files changed, 21 insertions(+) ChangeLog | 10 ++++++++++ ports/hotspot/src/share/vm/shark/llvmHeaders.hpp | 3 +++ ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 8 ++++++++ diffs (49 lines): diff -r 93d755a6148a -r 225f4d8d7962 ChangeLog --- a/ChangeLog Fri Jul 03 11:52:45 2009 +0100 +++ b/ChangeLog Tue Jul 07 10:58:02 2009 +0200 @@ -1,3 +1,13 @@ 2009-07-03 Gary Benson + + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp + Include llvm/LLVMContext.h used by getGlobalContext() + when llvm version are 2.6 or later. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::SharkCompiler): Pass the LLVMContext returned + from getGlobalContext() to the new Module constructor + when llvm version are 2.6 or later to handle LLVM API change. + 2009-07-03 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp diff -r 93d755a6148a -r 225f4d8d7962 ports/hotspot/src/share/vm/shark/llvmHeaders.hpp --- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Fri Jul 03 11:52:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Tue Jul 07 10:58:02 2009 +0200 @@ -32,6 +32,9 @@ #include #include #include +#if SHARK_LLVM_VERSION >= 26 +#include +#endif #include #include #include diff -r 93d755a6148a -r 225f4d8d7962 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jul 03 11:52:45 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Tue Jul 07 10:58:02 2009 +0200 @@ -43,7 +43,15 @@ SharkCompiler::SharkCompiler() #endif // Create a module to build our functions into +#if SHARK_LLVM_VERSION >= 26 + // LLVM 2.6 and later requires passing a LLVMContext during module + // creation. The LLVM API getGlobalContext() returns a LLVMContext that + // can be used safely as long as the shark compiler stays single threaded + // and only uses one module. + _module = new Module("shark", getGlobalContext()); +#else _module = new Module("shark"); +#endif // Create the builder to build our functions _builder = new SharkBuilder(this); From gbenson at redhat.com Mon Aug 3 10:31:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:18 +0000 Subject: changeset in /hg/icedtea: 2009-06-19 Gary Benson changeset 6690b58a6c66 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6690b58a6c66 description: 2009-06-19 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::_llvm_function): Removed. (SharkEntry::llvm_function): Likewise. (SharkEntry::set_llvm_function): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Removed call to set_llvm_function. diffstat: 3 files changed, 11 insertions(+), 13 deletions(-) ChangeLog | 10 ++++++++++ ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 13 +------------ ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 1 - diffs (51 lines): diff -r 21f0340f7c98 -r 6690b58a6c66 ChangeLog --- a/ChangeLog Thu Jun 18 12:14:25 2009 -0400 +++ b/ChangeLog Fri Jun 19 03:59:26 2009 -0400 @@ -1,3 +1,13 @@ 2009-06-18 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::_llvm_function): Removed. + (SharkEntry::llvm_function): Likewise. + (SharkEntry::set_llvm_function): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Removed call to set_llvm_function. + 2009-06-18 Gary Benson * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp diff -r 21f0340f7c98 -r 6690b58a6c66 ports/hotspot/src/share/vm/shark/sharkEntry.hpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Thu Jun 18 12:14:25 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Fri Jun 19 03:59:26 2009 -0400 @@ -27,18 +27,7 @@ class SharkEntry : public ZeroEntry { friend class SharkMemoryManager; private: - llvm::Function* _llvm_function; - address _code_limit; - - public: - llvm::Function* llvm_function() const - { - return _llvm_function; - } - void set_llvm_function(llvm::Function* llvm_function) - { - _llvm_function = llvm_function; - } + address _code_limit; public: address code_start() const diff -r 21f0340f7c98 -r 6690b58a6c66 ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Thu Jun 18 12:14:25 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Jun 19 03:59:26 2009 -0400 @@ -38,7 +38,6 @@ void SharkFunction::initialize() // Create the function _function = builder()->CreateFunction(name()); - entry->set_llvm_function(function()); memory_manager()->set_entry_for_function(function(), entry); // Get our arguments From gbenson at redhat.com Mon Aug 3 10:31:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:18 +0000 Subject: changeset in /hg/icedtea: 2009-06-19 Gary Benson changeset 3d97a22bbdab in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=3d97a22bbdab description: 2009-06-19 Gary Benson * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp (SharkCompiler::compile): Removed. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Moved all non-IR-emission code from SharkFunction::initialize, and the IR-to-native code from SharkCompiler::compile, here. Also changed all debug options that take a method name to use fnmatch. (SharkCompiler::compile): Removed. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::_name): Removed. (SharkFunction::_name): Likewise. (SharkFunction::initialize): Receive name in argument. (SharkFunction::SharkFunction): Updated. (SharkFunction::build): New method. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Receive name in argument, and moved all code not relating to emitting the function's IR to SharkCompiler::compile_method. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::CreateFunction): Removed. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::CreateFunction): Likewise. * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp (SharkCompileInvariants::memory_manager): Removed. diffstat: 8 files changed, 94 insertions(+), 91 deletions(-) ChangeLog | 30 +++++++ ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 10 -- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 4 - ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 72 ++++++++++-------- ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 3 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 35 +------- ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 27 ++++-- ports/hotspot/src/share/vm/shark/sharkInvariants.hpp | 4 - diffs (306 lines): diff -r 6690b58a6c66 -r 3d97a22bbdab ChangeLog --- a/ChangeLog Fri Jun 19 03:59:26 2009 -0400 +++ b/ChangeLog Fri Jun 19 06:03:31 2009 -0400 @@ -1,3 +1,33 @@ 2009-06-19 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::compile): Removed. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::compile_method): Moved all non-IR-emission + code from SharkFunction::initialize, and the IR-to-native + code from SharkCompiler::compile, here. Also changed all + debug options that take a method name to use fnmatch. + (SharkCompiler::compile): Removed. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::_name): Removed. + (SharkFunction::_name): Likewise. + (SharkFunction::initialize): Receive name in argument. + (SharkFunction::SharkFunction): Updated. + (SharkFunction::build): New method. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Receive name in argument, + and moved all code not relating to emitting the function's + IR to SharkCompiler::compile_method. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::CreateFunction): Removed. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::CreateFunction): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp + (SharkCompileInvariants::memory_manager): Removed. + 2009-06-19 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Fri Jun 19 06:03:31 2009 -0400 @@ -176,16 +176,6 @@ void SharkBuilder::init_external_functio set_llvm_pow_fn(module()->getOrInsertFunction("llvm.pow.f64", type)); } -Function *SharkBuilder::CreateFunction(const char *name) -{ - Function *function = Function::Create( - SharkType::entry_point_type(), - GlobalVariable::InternalLinkage, - name); - module()->getFunctionList().push_back(function); - return function; -} - CallInst* SharkBuilder::CreateDump(llvm::Value* value) { Constant *const_name; diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Fri Jun 19 06:03:31 2009 -0400 @@ -45,10 +45,6 @@ class SharkBuilder : public llvm::IRBuil { return compiler()->execution_engine(); } - - // Function creation - public: - llvm::Function *CreateFunction(const char *name = "func"); // Helpers for creating basic blocks // NB don't use unless SharkFunction::CreateBlock is unavailable diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Jun 19 06:03:31 2009 -0400 @@ -91,7 +91,7 @@ void SharkCompiler::compile_method(ciEnv #endif // !PRODUCT if (SharkOnlyCompile != NULL) { - if (strcmp(SharkOnlyCompile, name)) { + if (fnmatch(SharkOnlyCompile, name, 0)) { env->record_method_not_compilable("does not match SharkOnlyCompile"); return; } @@ -102,8 +102,7 @@ void SharkCompiler::compile_method(ciEnv if (env->failing()) return; if (SharkPrintTypeflowOf != NULL) { - if (!strcmp(SharkPrintTypeflowOf, name) || - !strcmp(SharkPrintTypeflowOf, "*")) + if (!fnmatch(SharkPrintTypeflowOf, name, 0)) flow->print_on(tty); } @@ -119,12 +118,46 @@ void SharkCompiler::compile_method(ciEnv SharkCodeBuffer cb(env->oop_recorder()); builder()->set_code_buffer(&cb); - // Compile the method - SharkFunction function(this, env, flow, name); + // Emit the entry point + SharkEntry *entry = (SharkEntry *) cb.malloc(sizeof(SharkEntry)); + + // Build the LLVM IR for the method + Function *function = SharkFunction::build(this, env, flow, name); + if (SharkPrintBitcodeOf != NULL) { + if (!fnmatch(SharkPrintBitcodeOf, name, 0)) + function->dump(); + } // Unhook the code buffer builder()->set_code_buffer(NULL); + // Compile to native code +#ifndef PRODUCT +#ifdef X86 + if (SharkPrintAsmOf != NULL) { + std::vector args; + args.push_back(""); // program name + if (!fnmatch(SharkPrintAsmOf, name, 0)) + args.push_back("-debug-only=x86-emitter"); + else + args.push_back("-debug-only=none"); + args.push_back(0); // terminator + cl::ParseCommandLineOptions(args.size() - 1, (char **) &args[0]); + } +#endif // X86 +#endif // !PRODUCT + memory_manager()->set_entry_for_function(function, entry); + module()->getFunctionList().push_back(function); + entry->set_entry_point( + (ZeroEntry::method_entry_t) + execution_engine()->getPointerToFunction(function)); + + // Register generated code for profiling, etc + if (JvmtiExport::should_post_dynamic_code_generated()) { + JvmtiExport::post_dynamic_code_generated( + name, entry->code_start(), entry->code_limit()); + } + // Install the method into the VM CodeOffsets offsets; offsets.set_value(CodeOffsets::Deopt, 0); @@ -148,31 +181,10 @@ void SharkCompiler::compile_method(ciEnv env->comp_level(), false, false); -} - - -ZeroEntry::method_entry_t SharkCompiler::compile(const char* name, - Function* function) -{ - // Dump the generated code, if requested -#ifndef PRODUCT -#ifdef X86 - if (SharkPrintAsmOf != NULL) { - std::vector args; - args.push_back(""); // program name - if (!fnmatch(SharkPrintAsmOf, name, 0)) - args.push_back("-debug-only=x86-emitter"); - else - args.push_back("-debug-only=none"); - args.push_back(0); // terminator - cl::ParseCommandLineOptions(args.size() - 1, (char **) &args[0]); - } -#endif // X86 -#endif // !PRODUCT - - // Compile to native code - return (ZeroEntry::method_entry_t) - execution_engine()->getPointerToFunction(function); + + // Print statistics, if requested + if (SharkTraceInstalls) + entry->print_statistics(name); } const char* SharkCompiler::methodname(const ciMethod* target) diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkCompiler.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.hpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.hpp Fri Jun 19 06:03:31 2009 -0400 @@ -72,9 +72,6 @@ class SharkCompiler : public AbstractCom return _execution_engine; } - public: - ZeroEntry::method_entry_t compile(const char* name, llvm::Function* func); - // Helper private: static const char* methodname(const ciMethod* target); diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkFunction.cpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp Fri Jun 19 06:03:31 2009 -0400 @@ -26,19 +26,15 @@ #include "incls/_precompiled.incl" #include "incls/_sharkFunction.cpp.incl" -#include - using namespace llvm; -void SharkFunction::initialize() -{ - // Emit the entry point - SharkEntry *entry = - (SharkEntry *) builder()->code_buffer()->malloc(sizeof(SharkEntry)); - +void SharkFunction::initialize(const char *name) +{ // Create the function - _function = builder()->CreateFunction(name()); - memory_manager()->set_entry_for_function(function(), entry); + _function = Function::Create( + SharkType::entry_point_type(), + GlobalVariable::InternalLinkage, + name); // Get our arguments Function::arg_iterator ai = function()->arg_begin(); @@ -118,25 +114,6 @@ void SharkFunction::initialize() block(i)->emit_IR(); } do_deferred_zero_checks(); - - // Dump the bitcode, if requested - if (SharkPrintBitcodeOf != NULL) { - if (!fnmatch(SharkPrintBitcodeOf, name(), 0)) - function()->dump(); - } - - // Compile to native code - entry->set_entry_point(compiler()->compile(name(), function())); - - // Register generated code for profiling, etc - if (JvmtiExport::should_post_dynamic_code_generated()) { - JvmtiExport::post_dynamic_code_generated( - name(), entry->code_start(), entry->code_limit()); - } - - // Print statistics, if requested - if (SharkTraceInstalls) - entry->print_statistics(name()); } void SharkFunction::CreateInitZeroStack() diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Fri Jun 19 06:03:31 2009 -0400 @@ -28,26 +28,31 @@ class DeferredZeroCheck; class SharkFunction : public SharkTargetInvariants { public: + static llvm::Function* build(SharkCompiler* compiler, + ciEnv* env, + ciTypeFlow* flow, + const char* name) + { + SharkFunction function(compiler, env, flow, name); + return function.function(); + } + + private: SharkFunction(SharkCompiler* compiler, ciEnv* env, ciTypeFlow* flow, const char* name) - : SharkTargetInvariants(compiler, env, flow), _name(name) { initialize(); } - - private: - void initialize(); - - private: - const char* _name; + : SharkTargetInvariants(compiler, env, flow) { initialize(name); } + + private: + void initialize(const char* name); + + private: llvm::Function* _function; SharkTopLevelBlock** _blocks; GrowableArray _deferred_zero_checks; public: - const char* name() const - { - return _name; - } llvm::Function* function() const { return _function; diff -r 6690b58a6c66 -r 3d97a22bbdab ports/hotspot/src/share/vm/shark/sharkInvariants.hpp --- a/ports/hotspot/src/share/vm/shark/sharkInvariants.hpp Fri Jun 19 03:59:26 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkInvariants.hpp Fri Jun 19 06:03:31 2009 -0400 @@ -93,10 +93,6 @@ class SharkCompileInvariants : public Re { return compiler()->builder(); } - SharkMemoryManager* memory_manager() const - { - return compiler()->memory_manager(); - } DebugInformationRecorder* debug_info() const { return env()->debug_info(); From xerxes at zafena.se Mon Aug 3 10:31:23 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Mon, 03 Aug 2009 17:31:23 +0000 Subject: changeset in /hg/icedtea: 2009-07-09 Xerxes R?nby changeset 2a3a4c5b35e0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2a3a4c5b35e0 description: 2009-07-09 Xerxes R?nby * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::SharkBuilder): Pass the LLVMContext returned from getGlobalContext() to the new IRBuilder constructor when llvm version are 2.6 or later to handle LLVM API change. * ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: New methods allocateGlobal, setPoisonMemory, dependent on the llvm version. * ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: Likewise. diffstat: 4 files changed, 31 insertions(+) ChangeLog | 12 ++++++++++++ ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 7 +++++++ ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp | 10 ++++++++++ ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp | 2 ++ diffs (76 lines): diff -r d29fab296cd2 -r 2a3a4c5b35e0 ChangeLog --- a/ChangeLog Wed Jul 08 11:28:08 2009 +0200 +++ b/ChangeLog Thu Jul 09 12:49:11 2009 +0200 @@ -1,3 +1,15 @@ 2009-07-08 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::SharkBuilder): Pass the LLVMContext returned + from getGlobalContext() to the new IRBuilder constructor + when llvm version are 2.6 or later to handle LLVM API change. + * ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: + New methods allocateGlobal, setPoisonMemory, dependent on the + llvm version. + * ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: + Likewise. + 2009-07-08 Xerxes R??nby * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp diff -r d29fab296cd2 -r 2a3a4c5b35e0 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Jul 08 11:28:08 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Jul 09 12:49:11 2009 +0200 @@ -61,7 +61,14 @@ extern "C" { #endif SharkBuilder::SharkBuilder(SharkCompiler* compiler) +#if SHARK_LLVM_VERSION >= 26 + // LLVM 2.6 requires a LLVMContext during IRBuilder construction. + // getGlobalConext() returns one that can be used as long as the shark + // compiler are single-threaded. + : IRBuilder<>(getGlobalContext()), +#else : IRBuilder<>(), +#endif _compiler(compiler) { init_external_functions(); diff -r d29fab296cd2 -r 2a3a4c5b35e0 ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp --- a/ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp Wed Jul 08 11:28:08 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp Thu Jul 09 12:49:11 2009 +0200 @@ -92,6 +92,11 @@ void SharkMemoryManager::deallocateMemFo } #if SHARK_LLVM_VERSION >= 26 +uint8_t* SharkMemoryManager::allocateGlobal(uintptr_t Size, unsigned int Alignment) +{ + return mm()->allocateGlobal(Size, Alignment); +} + void* SharkMemoryManager::getDlsymTable() const { return mm()->getDlsymTable(); @@ -100,6 +105,11 @@ void SharkMemoryManager::SetDlsymTable(v void SharkMemoryManager::SetDlsymTable(void *ptr) { mm()->SetDlsymTable(ptr); +} + +void SharkMemoryManager::setPoisonMemory(bool poison) +{ + mm()->setPoisonMemory(poison); } #endif diff -r d29fab296cd2 -r 2a3a4c5b35e0 ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp --- a/ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp Wed Jul 08 11:28:08 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp Thu Jul 09 12:49:11 2009 +0200 @@ -74,6 +74,8 @@ class SharkMemoryManager : public llvm:: #if SHARK_LLVM_VERSION >= 26 void* getDlsymTable() const; void SetDlsymTable(void *ptr); + void setPoisonMemory(bool); + uint8_t* allocateGlobal(uintptr_t, unsigned int); #endif void setMemoryWritable(); void setMemoryExecutable(); From gbenson at redhat.com Mon Aug 3 10:31:25 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:25 +0000 Subject: changeset in /hg/icedtea: 2009-07-30 Gary Benson changeset 9a952e506f16 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9a952e506f16 description: 2009-07-30 Gary Benson * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Moved everything except the actual methods called by JIT-compiled code into SharkBuilder. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Merged code to create LLVM callable objects for runtime methods from SharkRuntime, and refactored it (and the existing code to create LLVM callable objects for LLVM intrinsics) to create such objects on the fly. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp (SharkCompiler::_builder): Removed. (SharkCompiler::builder): Likewise. * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp (SharkCompileInvariants::SharkCompileInvariants): Take a new argument, builder, and store it. (SharkCompileInvariants::builder): Updated. (SharkCompileInvariants::code_buffer): New method. (SharkTargetInvariants::SharkTargetInvariants): Take a new argument, builder, and pass it along to SharkCompileInvariants constructor. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::build): Take a new argument, builder, and pass it along to SharkFunction consructor. (SharkFunction::SharkFunction): Take a new argument, builder, and pass it along to SharkTargetInvariants consructor. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::SharkCompiler): Remove builder creation and SharkRuntime initialization. (SharkCompiler::compile_method): Create builder and pass it to SharkFunction::build. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Updated for new style calls. * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp (SharkIntrinsics::do_Math_1to1): Likewise. (SharkIntrinsics::do_Math_2to1): Likewise. * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp (SharkIntrinsics::do_intrinsic): Likewise. (SharkIntrinsics::do_Math_1to1): Likewise. (SharkIntrinsics::do_Math_2to1): Likewise. (SharkIntrinsics::do_System_currentTimeMillis): Likewise. (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::call_vm): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::zero_check_value): Likewise. (SharkTopLevelBlock::check_bounds): Likewise. (SharkTopLevelBlock::maybe_add_safepoint): Likewise. (SharkTopLevelBlock::do_trap): Likewise. (SharkTopLevelBlock::call_register_finalizer): Likewise. (SharkTopLevelBlock::get_interface_callee): Likewise. (SharkTopLevelBlock::do_new): Likewise. (SharkTopLevelBlock::do_newarray): Likewise. (SharkTopLevelBlock::do_anewarray): Likewise. (SharkTopLevelBlock::do_multianewarray): Likewise. (SharkTopLevelBlock::acquire_lock): Likewise. (SharkTopLevelBlock::release_lock): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Updated for new style codebuffer access. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Likewise. * ports/hotspot/src/share/vm/shark/llvmValue.hpp (LLVMValue::bit_constant): New method. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (SharkBlock::call_vm_leaf): Removed. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 19 files changed, 902 insertions(+), 1060 deletions(-) ChangeLog | 76 + ports/hotspot/src/share/vm/includeDB_shark | 7 ports/hotspot/src/share/vm/shark/llvmValue.hpp | 10 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 12 ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 7 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 779 ++++++++++----- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 426 ++------ ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 2 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 13 ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 7 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 2 ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 6 ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp | 28 ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp | 4 ports/hotspot/src/share/vm/shark/sharkInvariants.hpp | 35 ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 267 ----- ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 191 --- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 54 - ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 36 diffs (truncated from 2632 to 500 lines): diff -r 1791126ef6df -r 9a952e506f16 ChangeLog --- a/ChangeLog Fri Jul 17 06:04:59 2009 -0400 +++ b/ChangeLog Thu Jul 30 04:51:32 2009 -0400 @@ -1,3 +1,79 @@ 2009-07-17 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: + Moved everything except the actual methods called by + JIT-compiled code into SharkBuilder. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + Merged code to create LLVM callable objects for runtime + methods from SharkRuntime, and refactored it (and the + existing code to create LLVM callable objects for LLVM + intrinsics) to create such objects on the fly. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::_builder): Removed. + (SharkCompiler::builder): Likewise. + * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp + (SharkCompileInvariants::SharkCompileInvariants): Take a new + argument, builder, and store it. + (SharkCompileInvariants::builder): Updated. + (SharkCompileInvariants::code_buffer): New method. + (SharkTargetInvariants::SharkTargetInvariants): Take a new + argument, builder, and pass it along to SharkCompileInvariants + constructor. + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::build): Take a new argument, builder, and pass + it along to SharkFunction consructor. + (SharkFunction::SharkFunction): Take a new argument, builder, + and pass it along to SharkTargetInvariants consructor. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::SharkCompiler): Remove builder creation and + SharkRuntime initialization. + (SharkCompiler::compile_method): Create builder and pass it + to SharkFunction::build. + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Updated for new style calls. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp + (SharkIntrinsics::do_Math_1to1): Likewise. + (SharkIntrinsics::do_Math_2to1): Likewise. + * ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp + (SharkIntrinsics::do_intrinsic): Likewise. + (SharkIntrinsics::do_Math_1to1): Likewise. + (SharkIntrinsics::do_Math_2to1): Likewise. + (SharkIntrinsics::do_System_currentTimeMillis): Likewise. + (SharkIntrinsics::do_Unsafe_compareAndSwapInt): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::call_vm): Likewise. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::zero_check_value): Likewise. + (SharkTopLevelBlock::check_bounds): Likewise. + (SharkTopLevelBlock::maybe_add_safepoint): Likewise. + (SharkTopLevelBlock::do_trap): Likewise. + (SharkTopLevelBlock::call_register_finalizer): Likewise. + (SharkTopLevelBlock::get_interface_callee): Likewise. + (SharkTopLevelBlock::do_new): Likewise. + (SharkTopLevelBlock::do_newarray): Likewise. + (SharkTopLevelBlock::do_anewarray): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Updated for new style codebuffer access. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Likewise. + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp + (LLVMValue::bit_constant): New method. + + * ports/hotspot/src/share/vm/shark/sharkBlock.hpp + (SharkBlock::call_vm_leaf): Removed. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-07-17 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp diff -r 1791126ef6df -r 9a952e506f16 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Fri Jul 17 06:04:59 2009 -0400 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Jul 30 04:51:32 2009 -0400 @@ -72,7 +72,6 @@ sharkBlock.cpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp sharkBlock.cpp sharkConstant.hpp -sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.hpp sharkBlock.cpp sharkValue.hpp @@ -149,7 +148,6 @@ sharkCompiler.cpp sharkCompiler.cpp sharkEntry.hpp sharkCompiler.cpp sharkFunction.hpp sharkCompiler.cpp sharkMemoryManager.hpp -sharkCompiler.cpp sharkRuntime.hpp sharkCompiler.hpp abstractCompiler.hpp sharkCompiler.hpp ciEnv.hpp @@ -212,7 +210,6 @@ sharkIntrinsics.cpp sharkIntrinsics.cpp llvmHeaders.hpp sharkIntrinsics.cpp shark_globals.hpp sharkIntrinsics.cpp sharkIntrinsics.hpp -sharkIntrinsics.cpp sharkRuntime.hpp sharkIntrinsics.cpp sharkState.hpp sharkIntrinsics.cpp sharkValue.hpp @@ -246,15 +243,12 @@ sharkRuntime.cpp sharkRuntime.cpp deoptimization.hpp sharkRuntime.cpp llvmHeaders.hpp sharkRuntime.cpp klassOop.hpp -sharkRuntime.cpp sharkBuilder.hpp sharkRuntime.cpp sharkRuntime.hpp -sharkRuntime.cpp sharkType.hpp sharkRuntime.cpp thread.hpp sharkRuntime.hpp allocation.hpp sharkRuntime.hpp llvmHeaders.hpp sharkRuntime.hpp klassOop.hpp -sharkRuntime.hpp sharkBuilder.hpp sharkRuntime.hpp thread.hpp sharkState.cpp allocation.hpp @@ -298,7 +292,6 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp sharkBuilder.hpp sharkTopLevelBlock.cpp sharkConstant.hpp sharkTopLevelBlock.cpp sharkInliner.hpp -sharkTopLevelBlock.cpp sharkRuntime.hpp sharkTopLevelBlock.cpp sharkState.hpp sharkTopLevelBlock.cpp sharkValue.hpp diff -r 1791126ef6df -r 9a952e506f16 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Fri Jul 17 06:04:59 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Thu Jul 30 04:51:32 2009 -0400 @@ -1,6 +1,6 @@ /* * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -77,6 +77,14 @@ class LLVMValue : public AllStatic { } public: + static llvm::ConstantInt* bit_constant(int value) + { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(llvm::Type::Int1Ty, value, false); +#else + return llvm::ConstantInt::get(llvm::Type::Int1Ty, value, false); +#endif + } static llvm::ConstantInt* intptr_constant(intptr_t value) { #if SHARK_LLVM_VERSION >= 26 diff -r 1791126ef6df -r 9a952e506f16 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Jul 17 06:04:59 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Jul 30 04:51:32 2009 -0400 @@ -694,11 +694,13 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_f2i: push(SharkValue::create_jint( - call_vm_leaf(SharkRuntime::f2i(), pop()->jfloat_value()), false)); + builder()->CreateCall( + builder()->f2i(), pop()->jfloat_value()), false)); break; case Bytecodes::_f2l: push(SharkValue::create_jlong( - call_vm_leaf(SharkRuntime::f2l(), pop()->jfloat_value()), false)); + builder()->CreateCall( + builder()->f2l(), pop()->jfloat_value()), false)); break; case Bytecodes::_f2d: push(SharkValue::create_jdouble( @@ -708,11 +710,13 @@ void SharkBlock::parse_bytecode(int star case Bytecodes::_d2i: push(SharkValue::create_jint( - call_vm_leaf(SharkRuntime::d2i(), pop()->jdouble_value()), false)); + builder()->CreateCall( + builder()->d2i(), pop()->jdouble_value()), false)); break; case Bytecodes::_d2l: push(SharkValue::create_jlong( - call_vm_leaf(SharkRuntime::d2l(), pop()->jdouble_value()), false)); + builder()->CreateCall( + builder()->d2l(), pop()->jdouble_value()), false)); break; case Bytecodes::_d2f: push(SharkValue::create_jfloat( diff -r 1791126ef6df -r 9a952e506f16 ports/hotspot/src/share/vm/shark/sharkBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Fri Jul 17 06:04:59 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Thu Jul 30 04:51:32 2009 -0400 @@ -174,13 +174,6 @@ class SharkBlock : public SharkTargetInv protected: virtual void do_zero_check(SharkValue* value); - // Leaf calls - protected: - llvm::CallInst* call_vm_leaf(llvm::Constant* callee, llvm::Value* arg1) - { - return builder()->CreateCall(callee, arg1); - } - // Zero checking protected: void check_null(SharkValue* object) diff -r 1791126ef6df -r 9a952e506f16 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Fri Jul 17 06:04:59 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Thu Jul 30 04:51:32 2009 -0400 @@ -28,39 +28,7 @@ using namespace llvm; -#ifdef ARM -/* - * ARM lacks atomic operation implementation in LLVM - * http://llvm.org/bugs/show_bug.cgi?id=3877 - * - * These two functions zero_cmpxchg_int_fn and zero_cmpxchg_ptr_fn - * are defined so that they can be inserted into llvm as a workaround to - * make shark reroute all atomic calls back to the implementation in zero. - * The actual insertion are done in SharkBuilder::init_external_functions(). - */ - -extern "C" { - jint zero_cmpxchg_int_fn(volatile jint *ptr, - jint *oldval, - jint *newval) - { - return Atomic::cmpxchg(*newval, - ptr, - *oldval); - } - - intptr_t* zero_cmpxchg_ptr_fn(volatile void* ptr, - intptr_t* oldval, - intptr_t* newval) - { - return (intptr_t *) Atomic::cmpxchg_ptr((void *) newval, - ptr, - (void *) oldval); - } -}; -#endif - -SharkBuilder::SharkBuilder(SharkCompiler* compiler) +SharkBuilder::SharkBuilder(Module* module, SharkCodeBuffer* code_buffer) #if SHARK_LLVM_VERSION >= 26 // LLVM 2.6 requires a LLVMContext during IRBuilder construction. // getGlobalConext() returns one that can be used as long as the shark @@ -68,149 +36,480 @@ SharkBuilder::SharkBuilder(SharkCompiler : IRBuilder<>(getGlobalContext()), #else : IRBuilder<>(), -#endif - _compiler(compiler) -{ - init_external_functions(); -} - -Constant* SharkBuilder::make_function(intptr_t addr, - const FunctionType* sig, - const char* name) -{ - Constant *func = make_pointer(addr, sig); +#endif // SHARK_LLVM_VERSION >= 26 + _module(module), + _code_buffer(code_buffer) +{ +} + +// Helpers for accessing structures +Value* SharkBuilder::CreateAddressOfStructEntry(Value* base, + ByteSize offset, + const Type* type, + const char* name) +{ + return CreateBitCast(CreateStructGEP(base, in_bytes(offset)), type, name); +} + +LoadInst* SharkBuilder::CreateValueOfStructEntry(Value* base, + ByteSize offset, + const Type* type, + const char* name) +{ + return CreateLoad( + CreateAddressOfStructEntry( + base, offset, PointerType::getUnqual(type)), + name); +} + +// Helpers for accessing arrays + +LoadInst* SharkBuilder::CreateArrayLength(Value* arrayoop) +{ + return CreateValueOfStructEntry( + arrayoop, in_ByteSize(arrayOopDesc::length_offset_in_bytes()), + SharkType::jint_type(), "length"); +} + +Value* SharkBuilder::CreateArrayAddress(Value* arrayoop, + const Type* element_type, + int element_bytes, + ByteSize base_offset, + Value* index, + const char* name) +{ + Value* offset = CreateIntCast(index, SharkType::intptr_type(), false); + if (element_bytes != 1) + offset = CreateShl( + offset, + LLVMValue::intptr_constant(exact_log2(element_bytes))); + offset = CreateAdd( + LLVMValue::intptr_constant(in_bytes(base_offset)), offset); + + return CreateIntToPtr( + CreateAdd(CreatePtrToInt(arrayoop, SharkType::intptr_type()), offset), + PointerType::getUnqual(element_type), + name); +} + +Value* SharkBuilder::CreateArrayAddress(Value* arrayoop, + BasicType basic_type, + ByteSize base_offset, + Value* index, + const char* name) +{ + return CreateArrayAddress( + arrayoop, + SharkType::to_arrayType(basic_type), + type2aelembytes(basic_type), + base_offset, index, name); +} + +Value* SharkBuilder::CreateArrayAddress(Value* arrayoop, + BasicType basic_type, + Value* index, + const char* name) +{ + return CreateArrayAddress( + arrayoop, basic_type, + in_ByteSize(arrayOopDesc::base_offset_in_bytes(basic_type)), + index, name); +} + +// Helpers for creating intrinsics and external functions. + +const Type* SharkBuilder::make_type(char type, bool void_ok) +{ + switch (type) { + // Primitive types + case 'c': + return SharkType::jbyte_type(); + case 'i': + return SharkType::jint_type(); + case 'l': + return SharkType::jlong_type(); + case 'x': + return SharkType::intptr_type(); + case 'f': + return SharkType::jfloat_type(); + case 'd': + return SharkType::jdouble_type(); + + // Pointers to primitive types + case 'C': + case 'I': + case 'L': + case 'X': + case 'F': + case 'D': + return PointerType::getUnqual(make_type(tolower(type), false)); + + // VM objects + case 'T': + return SharkType::thread_type(); + case 'M': + return PointerType::getUnqual(SharkType::monitor_type()); + case 'O': + return SharkType::oop_type(); + + // Miscellaneous + case 'v': + assert(void_ok, "should be"); + return Type::VoidTy; + case '1': + return Type::Int1Ty; + + default: + ShouldNotReachHere(); + } +} + +const FunctionType* SharkBuilder::make_ftype(const char* params, + const char* ret) +{ + std::vector param_types; + for (const char* c = params; *c; c++) + param_types.push_back(make_type(*c, false)); + + assert(strlen(ret) == 1, "should be"); + const Type *return_type = make_type(*ret, true); + + return FunctionType::get(return_type, param_types, false); +} + +// Create an object representing an intrinsic or external function by +// referencing the symbol by name. This is the LLVM-style approach, +// but it cannot be used on functions within libjvm.so its symbols +// are not exported. Note that you cannot make this work simply by +// exporting the symbols, as some symbols have the same names as +// symbols in the standard libraries (eg, atan2, fabs) and would +// obscure them were they visible. +Value* SharkBuilder::make_function(const char* name, + const char* params, + const char* ret) +{ + return module()->getOrInsertFunction(name, make_ftype(params, ret)); +} + +// Create an object representing an external function by inlining a +// function pointer in the code. This is not the LLVM way, but it's +// the only way to access functions in libjvm.so and functions like +// __kernel_dmb on ARM which is accessed via an absolute address. +Value* SharkBuilder::make_function(address func, + const char* params, + const char* ret) +{ + return CreateIntToPtr( + LLVMValue::intptr_constant((intptr_t) func), + PointerType::getUnqual(make_ftype(params, ret))); +} + +// VM calls + +Value* SharkBuilder::find_exception_handler() +{ + return make_function( + (address) SharkRuntime::find_exception_handler, "TIi", "i"); +} + +Value* SharkBuilder::monitorenter() +{ + return make_function((address) SharkRuntime::monitorenter, "TM", "v"); +} + +Value* SharkBuilder::monitorexit() +{ + return make_function((address) SharkRuntime::monitorexit, "TM", "v"); +} + +Value* SharkBuilder::new_instance() +{ + return make_function((address) SharkRuntime::new_instance, "Ti", "v"); +} + +Value* SharkBuilder::newarray() +{ + return make_function((address) SharkRuntime::newarray, "Tii", "v"); +} + +Value* SharkBuilder::anewarray() +{ + return make_function((address) SharkRuntime::anewarray, "Tii", "v"); +} + +Value* SharkBuilder::multianewarray() +{ + return make_function((address) SharkRuntime::multianewarray, "TiiI", "v"); +} + +Value* SharkBuilder::register_finalizer() +{ + return make_function((address) SharkRuntime::register_finalizer, "TO", "v"); +} + +Value* SharkBuilder::safepoint() +{ + return make_function((address) SafepointSynchronize::block, "T", "v"); +} + +Value* SharkBuilder::throw_ArrayIndexOutOfBoundsException() +{ + return make_function( + (address) SharkRuntime::throw_ArrayIndexOutOfBoundsException, "TCii", "v"); +} + +Value* SharkBuilder::throw_NullPointerException() +{ + return make_function( + (address) SharkRuntime::throw_NullPointerException, "TCi", "v"); +} + +// High-level non-VM calls From xerxes at zafena.se Mon Aug 3 10:31:23 2009 From: xerxes at zafena.se (Xerxes R?nby) Date: Mon, 03 Aug 2009 17:31:23 +0000 Subject: changeset in /hg/icedtea: 2009-07-15 Xerxes R?nby changeset 10b3039fa024 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=10b3039fa024 description: 2009-07-15 Xerxes R?nby * ports/hotspot/src/share/vm/shark/llvmValue.hpp (jbyte_constant): Handle LLVM 2.6 svn r75703 API change. llvm::ConstantInt::get have been moved to llvm::LLVMContext::getConstantInt. (jint_constant): Likewise. (jlong_constant): Likewise. (intptr_constant): Likewise. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::CreateMemoryBarrier): Likewise. (SharkBuilder::CreateDump): llvm::ConstantArray::get have been moved to llvm::LLVMContext::getConstantArray. diffstat: 3 files changed, 44 insertions(+) ChangeLog | 14 ++++++++++++++ ports/hotspot/src/share/vm/shark/llvmValue.hpp | 16 ++++++++++++++++ ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 14 ++++++++++++++ diffs (101 lines): diff -r 022c97ae92d2 -r 10b3039fa024 ChangeLog --- a/ChangeLog Tue Jul 14 12:55:48 2009 +0200 +++ b/ChangeLog Wed Jul 15 12:56:10 2009 +0200 @@ -1,3 +1,17 @@ 2009-07-14 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp + (jbyte_constant): Handle LLVM 2.6 svn r75703 API change. + llvm::ConstantInt::get have been moved to + llvm::LLVMContext::getConstantInt. + (jint_constant): Likewise. + (jlong_constant): Likewise. + (intptr_constant): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::CreateMemoryBarrier): Likewise. + (SharkBuilder::CreateDump): llvm::ConstantArray::get have been + moved to llvm::LLVMContext::getConstantArray. + 2009-07-14 Xerxes R??nby * ports/hotspot/src/share/vm/shark/llvmValue.hpp diff -r 022c97ae92d2 -r 10b3039fa024 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Jul 14 12:55:48 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Wed Jul 15 12:56:10 2009 +0200 @@ -27,15 +27,27 @@ class LLVMValue : public AllStatic { public: static llvm::ConstantInt* jbyte_constant(jbyte value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::jbyte_type(), value, true); +#else return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); +#endif } static llvm::ConstantInt* jint_constant(jint value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::jint_type(), value, true); +#else return llvm::ConstantInt::get(SharkType::jint_type(), value, true); +#endif } static llvm::ConstantInt* jlong_constant(jlong value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::jlong_type(), value, true); +#else return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); +#endif } #if SHARK_LLVM_VERSION >= 26 static llvm::Constant* jfloat_constant(jfloat value) @@ -67,6 +79,10 @@ class LLVMValue : public AllStatic { public: static llvm::ConstantInt* intptr_constant(intptr_t value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::getGlobalContext().getConstantInt(SharkType::intptr_type(), value, false); +#else return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); +#endif } }; diff -r 022c97ae92d2 -r 10b3039fa024 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Tue Jul 14 12:55:48 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp Wed Jul 15 12:56:10 2009 +0200 @@ -187,9 +187,15 @@ CallInst* SharkBuilder::CreateDump(llvm: { Constant *const_name; if (value->hasName()) +#if SHARK_LLVM_VERSION >= 26 + const_name = getGlobalContext().getConstantArray(value->getName()); + else + const_name = getGlobalContext().getConstantArray("unnamed_value"); +#else const_name = ConstantArray::get(value->getName()); else const_name = ConstantArray::get("unnamed_value"); +#endif Value *name = CreatePtrToInt( CreateStructGEP( @@ -260,10 +266,18 @@ CallInst *SharkBuilder::CreateMemoryBarr CallInst *SharkBuilder::CreateMemoryBarrier(BarrierFlags flags) { Value *args[] = { +#if SHARK_LLVM_VERSION >= 26 + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_LOADLOAD) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_LOADSTORE) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_STORELOAD) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, (flags & BARRIER_STORESTORE) ? 1 : 0), + getGlobalContext().getConstantInt(Type::Int1Ty, 0)}; +#else ConstantInt::get(Type::Int1Ty, (flags & BARRIER_LOADLOAD) ? 1 : 0), ConstantInt::get(Type::Int1Ty, (flags & BARRIER_LOADSTORE) ? 1 : 0), ConstantInt::get(Type::Int1Ty, (flags & BARRIER_STORELOAD) ? 1 : 0), ConstantInt::get(Type::Int1Ty, (flags & BARRIER_STORESTORE) ? 1 : 0), ConstantInt::get(Type::Int1Ty, 0)}; +#endif return CreateCall(llvm_memory_barrier_fn(), args, args + 5); } From gbenson at redhat.com Mon Aug 3 10:31:24 2009 From: gbenson at redhat.com (Gary Benson) Date: Mon, 03 Aug 2009 17:31:24 +0000 Subject: changeset in /hg/icedtea: 2009-07-17 Gary Benson changeset 1791126ef6df in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1791126ef6df description: 2009-07-17 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::pointer_constant): Conditionalize a hack. diffstat: 2 files changed, 9 insertions(+), 6 deletions(-) ChangeLog | 5 +++++ ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 10 ++++------ diffs (45 lines): diff -r 10b3039fa024 -r 1791126ef6df ChangeLog --- a/ChangeLog Wed Jul 15 12:56:10 2009 +0200 +++ b/ChangeLog Fri Jul 17 06:04:59 2009 -0400 @@ -1,3 +1,8 @@ 2009-07-15 Xerxes R??nby + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::pointer_constant): Conditionalize a hack. + 2009-07-15 Xerxes R??nby * ports/hotspot/src/share/vm/shark/llvmValue.hpp diff -r 10b3039fa024 -r 1791126ef6df ports/hotspot/src/share/vm/shark/sharkBuilder.hpp --- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Wed Jul 15 12:56:10 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Fri Jul 17 06:04:59 2009 -0400 @@ -156,6 +156,9 @@ class SharkBuilder : public llvm::IRBuil llvm::Constant* pointer_constant(const void *ptr) { +#if SHARK_LLVM_VERSION >= 25 || !defined(AMD64) + return LLVMValue::intptr_constant((intptr_t) ptr); +#else // Create a pointer constant that points at PTR. We do this by // creating a GlobalVariable mapped at PTR. This is a workaround // for http://www.llvm.org/bugs/show_bug.cgi?id=2920 @@ -175,18 +178,13 @@ class SharkBuilder : public llvm::IRBuil snprintf(name, sizeof name - 1, "pointer_constant_%p", ptr); GlobalVariable *value = new GlobalVariable( -#if SHARK_LLVM_VERSION >= 26 - // LLVM 2.6 requires a LLVMContext during GlobalVariable construction. - // getGlobalConext() returns one that can be used as long as the shark - // compiler are single-threaded. - getGlobalContext(), -#endif SharkType::intptr_type(), false, GlobalValue::ExternalLinkage, NULL, name, module()); execution_engine()->addGlobalMapping(value, const_cast(ptr)); return ConstantExpr::getPtrToInt(value, SharkType::intptr_type()); +#endif // SHARK_LLVM_VERSION >= 25 || !AMD64 } // Helper for making pointers From gnu_andrew at member.fsf.org Mon Aug 3 11:03:11 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 3 Aug 2009 19:03:11 +0100 Subject: Shark and IcedTea7 Message-ID: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> I've forwardported the latest IcedTea6 changest to Shark to 7 and pushed them. However, I haven't been able to successfully build with them. The version of LLVM with which I was building was apparently now too old. It seems the latest SVN may be too new: In file included from ../generated/incls/_sharkBuilder.cpp.incl:3, from /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuilder.cpp:27: /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::ConstantInt* LLVMValue::jbyte_constant(jbyte)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:31: error: 'class llvm::LLVMContext' has no member named 'getConstantInt' /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::ConstantInt* LLVMValue::jint_constant(jint)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:39: error: 'class llvm::LLVMContext' has no member named 'getConstantInt' /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::ConstantInt* LLVMValue::jlong_constant(jlong)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:47: error: 'class llvm::LLVMContext' has no member named 'getConstantInt' /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::Constant* LLVMValue::jfloat_constant(jfloat)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:55: error: 'class llvm::LLVMContext' has no member named 'getConstantFP' /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::Constant* LLVMValue::jdouble_constant(jdouble)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:66: error: 'class llvm::LLVMContext' has no member named 'getConstantFP' /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::ConstantInt* LLVMValue::bit_constant(int)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:83: error: 'class llvm::LLVMContext' has no member named 'getConstantInt' /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: In static member function 'static llvm::ConstantInt* LLVMValue::intptr_constant(intptr_t)': /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:91: error: 'class llvm::LLVMContext' has no member named 'getConstantInt' make[7]: *** [sharkCompiler.o] Error 1 There was a change to the file containing getConstantInt last Thursday: ------------------------------------------------------------------------ r77583 | evancheng | 2009-07-30 09:44:08 +0100 (Thu, 30 Jul 2009) | 4 lines I've changed the semantics of MERGE_VALUES a bit. It's now allowed to live until scheduling. It's deleted when the scheduler translate DAG nodes to machine instructions. This is currently used by X86 to handle atomic_load_add when the output of the node is not used. I believe there is a better solution. But I find MERGE_VALUES useful for selecting multi-output node when the dead output can be selected as a IMPLICIT_DEF. but this only seems to have altered a comment. Any ideas? I've pushed because I assume that those working with Shark have been successfully building it even if I can't... :) -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From gbenson at redhat.com Tue Aug 4 02:48:53 2009 From: gbenson at redhat.com (Gary Benson) Date: Tue, 4 Aug 2009 10:48:53 +0100 Subject: Shark and IcedTea7 In-Reply-To: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> Message-ID: <20090804094852.GA3351@redhat.com> Andrew John Hughes wrote: > I've forwardported the latest IcedTea6 changest to Shark to 7 and > pushed them. However, I haven't been able to successfully build > with them. The version of LLVM with which I was building was > apparently now too old. It seems the latest SVN may be too new: Can you build with 2.5? SVN changes too much to guarantee anything. Cheers, Gary -- http://gbenson.net/ From doko at ubuntu.com Tue Aug 4 03:05:12 2009 From: doko at ubuntu.com (Matthias Klose) Date: Tue, 04 Aug 2009 12:05:12 +0200 Subject: Shark and IcedTea7 In-Reply-To: <20090804094852.GA3351@redhat.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> <20090804094852.GA3351@redhat.com> Message-ID: <4A7807D8.9010108@ubuntu.com> On 04.08.2009 11:48, Gary Benson wrote: > Andrew John Hughes wrote: >> I've forwardported the latest IcedTea6 changest to Shark to 7 and >> pushed them. However, I haven't been able to successfully build >> with them. The version of LLVM with which I was building was >> apparently now too old. It seems the latest SVN may be too new: > > Can you build with 2.5? SVN changes too much to guarantee anything. llvm goes in API freeze in late August. Maybe it's worth to either look at recent changes just before we release IcedTea6 1.6, or allow changes for a 1.6.1 which lets build with llvm 2.6. From gnu_andrew at member.fsf.org Tue Aug 4 03:30:32 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 4 Aug 2009 11:30:32 +0100 Subject: Shark and IcedTea7 In-Reply-To: <20090804094852.GA3351@redhat.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> <20090804094852.GA3351@redhat.com> Message-ID: <17c6771e0908040330u6c46e11bi7f1281f8515093c8@mail.gmail.com> 2009/8/4 Gary Benson : > Andrew John Hughes wrote: >> I've forwardported the latest IcedTea6 changest to Shark to 7 and >> pushed them. ?However, I haven't been able to successfully build >> with them. ?The version of LLVM with which I was building was >> apparently now too old. ?It seems the latest SVN may be too new: > > Can you build with 2.5? ?SVN changes too much to guarantee anything. > > Cheers, > Gary > > -- > http://gbenson.net/ > Ok, I'll try that now. Can we document this somewhere in README and/or INSTALL? There is nothing in there about llvm at the moment AFAICS. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From doko at ubuntu.com Tue Aug 4 04:55:09 2009 From: doko at ubuntu.com (Matthias Klose) Date: Tue, 04 Aug 2009 13:55:09 +0200 Subject: Shark and IcedTea7 In-Reply-To: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> Message-ID: <4A78219D.8000407@ubuntu.com> On 03.08.2009 20:03, Andrew John Hughes wrote: > I've forwardported the latest IcedTea6 changest to Shark to 7 and > pushed them. However, I haven't been able to successfully build with > them. The version of LLVM with which I was building was apparently > now too old. It seems the latest SVN may be too new: > > In file included from ../generated/incls/_sharkBuilder.cpp.incl:3, > from > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuilder.cpp:27: > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::ConstantInt* > LLVMValue::jbyte_constant(jbyte)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:31: > error: 'class llvm::LLVMContext' has no member named 'getConstantInt' > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::ConstantInt* > LLVMValue::jint_constant(jint)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:39: > error: 'class llvm::LLVMContext' has no member named 'getConstantInt' > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::ConstantInt* > LLVMValue::jlong_constant(jlong)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:47: > error: 'class llvm::LLVMContext' has no member named 'getConstantInt' > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::Constant* > LLVMValue::jfloat_constant(jfloat)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:55: > error: 'class llvm::LLVMContext' has no member named 'getConstantFP' > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::Constant* > LLVMValue::jdouble_constant(jdouble)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:66: > error: 'class llvm::LLVMContext' has no member named 'getConstantFP' > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::ConstantInt* > LLVMValue::bit_constant(int)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:83: > error: 'class llvm::LLVMContext' has no member named 'getConstantInt' > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: > In static member function 'static llvm::ConstantInt* > LLVMValue::intptr_constant(intptr_t)': > /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:91: > error: 'class llvm::LLVMContext' has no member named 'getConstantInt' > make[7]: *** [sharkCompiler.o] Error 1 > > There was a change to the file containing getConstantInt last Thursday: > > ------------------------------------------------------------------------ > r77583 | evancheng | 2009-07-30 09:44:08 +0100 (Thu, 30 Jul 2009) | 4 lines > > I've changed the semantics of MERGE_VALUES a bit. It's now allowed to > live until scheduling. It's deleted when the scheduler translate DAG > nodes to machine instructions. > > This is currently used by X86 to handle atomic_load_add when the > output of the node is not used. I believe there is a better solution. > But I find MERGE_VALUES useful for selecting multi-output node when > the dead output can be selected as a IMPLICIT_DEF. > > but this only seems to have altered a comment. > > Any ideas? I've pushed because I assume that those working with Shark > have been successfully building it even if I can't... :) please check with the patch attached. It works for me building current IcedTea6. Matthias -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: llvm.diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090804/2e893c1a/llvm.diff From gnu_andrew at member.fsf.org Tue Aug 4 05:46:49 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 4 Aug 2009 13:46:49 +0100 Subject: Shark and IcedTea7 In-Reply-To: <4A78219D.8000407@ubuntu.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> <4A78219D.8000407@ubuntu.com> Message-ID: <17c6771e0908040546s1d37fcceofad26e6fa9a27c11@mail.gmail.com> 2009/8/4 Matthias Klose : > On 03.08.2009 20:03, Andrew John Hughes wrote: >> >> I've forwardported the latest IcedTea6 changest to Shark to 7 and >> pushed them. ?However, I haven't been able to successfully build with >> them. ?The version of LLVM with which I was building was apparently >> now too old. ?It seems the latest SVN may be too new: >> >> In file included from ../generated/incls/_sharkBuilder.cpp.incl:3, >> ? ? ? ? ? ? ? ? ?from >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuilder.cpp:27: >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::ConstantInt* >> LLVMValue::jbyte_constant(jbyte)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:31: >> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::ConstantInt* >> LLVMValue::jint_constant(jint)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:39: >> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::ConstantInt* >> LLVMValue::jlong_constant(jlong)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:47: >> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::Constant* >> LLVMValue::jfloat_constant(jfloat)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:55: >> error: 'class llvm::LLVMContext' has no member named 'getConstantFP' >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::Constant* >> LLVMValue::jdouble_constant(jdouble)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:66: >> error: 'class llvm::LLVMContext' has no member named 'getConstantFP' >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::ConstantInt* >> LLVMValue::bit_constant(int)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:83: >> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >> In static member function 'static llvm::ConstantInt* >> LLVMValue::intptr_constant(intptr_t)': >> >> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:91: >> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >> make[7]: *** [sharkCompiler.o] Error 1 >> >> There was a change to the file containing getConstantInt last Thursday: >> >> ------------------------------------------------------------------------ >> r77583 | evancheng | 2009-07-30 09:44:08 +0100 (Thu, 30 Jul 2009) | 4 >> lines >> >> I've changed the semantics of MERGE_VALUES a bit. It's now allowed to >> live until scheduling. It's deleted when the scheduler translate DAG >> nodes to machine instructions. >> >> This is currently used by X86 to handle atomic_load_add when the >> output of the node is not used. I believe there is a better solution. >> But I find MERGE_VALUES useful for selecting multi-output node when >> the dead output can be selected as a IMPLICIT_DEF. >> >> but this only seems to have altered a comment. >> >> Any ideas? ?I've pushed because I assume that those working with Shark >> have been successfully building it even if I can't... :) > > please check with the patch attached. It works for me building current > IcedTea6. > > ?Matthias > > Managed to do a full build with 2.5. I'll try with this after I've done the plugin forwardporting. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Tue Aug 4 07:13:50 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 04 Aug 2009 14:13:50 +0000 Subject: [Bug 374] SIGSEGV while visiting a website on Firefox 3.5, Archlinux 64bit Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=374 jon.vanalten at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #1 from jon.vanalten at redhat.com 2009-08-04 14:13 ------- *** This bug has been marked as a duplicate of bug 367 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Aug 4 07:13:51 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 04 Aug 2009 14:13:51 +0000 Subject: [Bug 367] Interactive brokers fails / libjpeg7 related? Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=367 jon.vanalten at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gary4gar at gmail.com ------- Comment #5 from jon.vanalten at redhat.com 2009-08-04 14:13 ------- *** Bug 374 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From dbhole at redhat.com Tue Aug 4 07:39:21 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 4 Aug 2009 10:39:21 -0400 Subject: RFC: Netx - disable desktop shortcuts In-Reply-To: <4A71BC62.9050508@redhat.com> References: <4A71BC62.9050508@redhat.com> Message-ID: <20090804143921.GA3111@redhat.com> * Omair Majid [2009-07-30 11:30]: > Hi, > > I would like to disable the desktop launcher code in Netx as it has some > issues. Thanks to Deepak who originally brought up these problems. > The two major ones are: > > 1. First of all, the desktop launcher Netx creates dont work well with > the alternatives system. They all invoke $CURRENT_JDK_HOME/bin/javaws > instead of /usr/bin/javaws. However changing to /usr/bin/javaws brings > up other problems. /usr/bin/javaws is likely to be some other JDK which > may or may not understand Netx's options that it uses in the launcher. > This could lead to desktop launchers that dont work. /usr/bin/javaws > overwite our shortcut with it's own which would then call, for example, > /usr/java/latest/bin/javaws instead of /usr/bin/javaws. Also note that > Sun's javaws creates a launcher that points to their cache. Netx wont be > able to use that cache. > > Part of this issue can be fixed by using the exact same options as Sun's > javaws to maintain compatibility. However I dont see a simple way to > make a proprietary JRE's javaws invoke /usr/bin/javaws. Or to share the > cache between multiple JDKs. > > 2. These shortcuts dont work offline, even if the application allows it. > The current launchers just point Netx to the original JNLP file, which > wont work if the machine is offline (even if everything has been cached > by Netx). > > The correct fix is to ensure that Netx supports offline mode, uses the > cache and JNLP update mechanism correctly and then make the launcher > point to the cache. This might take some time to implement correctly. > > Because of these major issues, I would like to disable desktop shortcut > support in Netx. > > ChangeLog: > 2009-07-30 Omair Majid > > * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java > (initialize): Disable creating desktop shortcuts. > > Any comments? > Looks good. Cheers, Deepak > Cheers, > Omair > diff -r 051ca564791d rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java > --- a/rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu Jul 30 04:51:32 2009 -0400 > +++ b/rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu Jul 30 10:51:57 2009 -0400 > @@ -109,7 +109,24 @@ > */ > public void initialize() { > installEnvironment(); > - addMenuAndDesktopEntries(); > + > + /* > + * FIXME: Disable creating desktop entries for now > + * > + * there are some major issues we need to work out before we can enable them > + * 1. Playing nice with the altnatives system > + * - use the system preferred jdk (/usr/bin/javaws) > + * - dont assume what jdk javaws corresponds to > + * - make sure our shortcuts work with the sun jdk and vice versa > + * (may not be possible since sun's javaws creates a launcher that > + * links to /usr/java/${ver}/bin/javaws) > + * - we should use the same options and arguments as sun's javaws > + * 2. Make shortcuts work offline > + * - make the cache updates and replacements work properly > + * - shortcuts should use the cache > + * > + * addMenuAndDesktopEntries(); > + */ > } > > /** From dbhole at redhat.com Tue Aug 4 07:41:40 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 4 Aug 2009 10:41:40 -0400 Subject: RFC: Netx - implement -Xclearcache command line option In-Reply-To: <4A720F4D.8010007@redhat.com> References: <4A720E40.7020406@redhat.com> <4A720F4D.8010007@redhat.com> Message-ID: <20090804144140.GB3111@redhat.com> * Omair Majid [2009-07-30 18:12]: > Omair Majid wrote: >> The attached patch adds the option -Xclearcache to Netx. > > What I really meant was the patch I am going to attach to the next email > I send ;) > > Cheers, > Omair Assuming you have tested this, go ahead and commit. Cheers, Deepak > diff -r 051ca564791d rt/net/sourceforge/jnlp/cache/CacheUtil.java > --- a/rt/net/sourceforge/jnlp/cache/CacheUtil.java Thu Jul 30 04:51:32 2009 -0400 > +++ b/rt/net/sourceforge/jnlp/cache/CacheUtil.java Thu Jul 30 17:01:27 2009 -0400 > @@ -26,6 +26,7 @@ > > import net.sourceforge.jnlp.*; > import net.sourceforge.jnlp.runtime.*; > +import net.sourceforge.jnlp.util.FileUtils; > > /** > * Provides static methods to interact with the cache, download > @@ -128,6 +129,25 @@ > } > > /** > + * Clears the cache by deleting all the Netx cache files > + */ > + public static void clearCache() { > + File cacheDir = new File(JNLPRuntime.getBaseDir() + File.separator + "cache"); > + if (!(cacheDir.isDirectory())) { > + return; > + } > + > + if (JNLPRuntime.isDebug()) { > + System.err.println("Clearing cache directory: " + cacheDir); > + } > + try { > + FileUtils.recursiveDelete(cacheDir); > + } catch (IOException e) { > + throw new RuntimeException(e); > + } > + } > + > + /** > * Returns whether there is a version of the URL contents in the > * cache and it is up to date. This method may not return > * immediately. > diff -r 051ca564791d rt/net/sourceforge/jnlp/resources/Messages.properties > --- a/rt/net/sourceforge/jnlp/resources/Messages.properties Thu Jul 30 04:51:32 2009 -0400 > +++ b/rt/net/sourceforge/jnlp/resources/Messages.properties Thu Jul 30 17:01:27 2009 -0400 > @@ -133,6 +133,7 @@ > BOViewer = Shows the trusted certificate viewer. > BOUmask = Sets the umask for files created by an application. > BXnofork = Do not create another JVM. > +BXclearcache= Clean the JNLP application cache. > BOHelp = Print this message and exit. > > # Cache > diff -r 051ca564791d rt/net/sourceforge/jnlp/runtime/Boot.java > --- a/rt/net/sourceforge/jnlp/runtime/Boot.java Thu Jul 30 04:51:32 2009 -0400 > +++ b/rt/net/sourceforge/jnlp/runtime/Boot.java Thu Jul 30 17:01:27 2009 -0400 > @@ -40,6 +40,7 @@ > import net.sourceforge.jnlp.ParseException; > import net.sourceforge.jnlp.PropertyDesc; > import net.sourceforge.jnlp.ResourcesDesc; > +import net.sourceforge.jnlp.cache.CacheUtil; > import net.sourceforge.jnlp.cache.UpdatePolicy; > import net.sourceforge.jnlp.security.VariableX509TrustManager; > import net.sourceforge.jnlp.security.viewer.CertificateViewer; > @@ -114,6 +115,7 @@ > + " -strict "+R("BOStrict")+"\n" > + " -umask=value "+R("BOUmask")+"\n" > + " -Xnofork "+R("BXnofork")+"\n" > + + " -Xclearcache "+R("BXclearcache")+"\n" > + " -help "+R("BOHelp")+"\n"; > > private static final String doubleArgs = "-basedir -jnlp -arg -param -property -update"; > @@ -202,6 +204,17 @@ > JNLPRuntime.setSecurityEnabled(null == getOption("-nosecurity")); > JNLPRuntime.initialize(true); > > + /* > + * TODO > + * This should have been done with the rest of the argument parsing > + * code. But we need to know what the cache and base directories are, > + * and baseDir is initialized here > + */ > + if (null != getOption("-Xclearcache")) { > + CacheUtil.clearCache(); > + return null; > + } > + > try { > new Launcher().launch(getFile()); > } > diff -r 051ca564791d rt/net/sourceforge/jnlp/util/FileUtils.java > --- a/rt/net/sourceforge/jnlp/util/FileUtils.java Thu Jul 30 04:51:32 2009 -0400 > +++ b/rt/net/sourceforge/jnlp/util/FileUtils.java Thu Jul 30 17:01:27 2009 -0400 > @@ -14,8 +14,12 @@ > // 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.util; > > -package net.sourceforge.jnlp.util; > +import java.io.File; > +import java.io.IOException; > + > +import net.sourceforge.jnlp.runtime.JNLPRuntime; > > /** > * This class contains a few file-related utility functions. > @@ -44,5 +48,36 @@ > String sanitizedName = input.replaceAll("[^a-zA-Z0-9.]", "_"); > return sanitizedName; > } > - > + > + /** > + * Recursively delete everything under a directory. Works on either files or > + * directories > + * > + * @param file the file object representing what to delete. Can be either a > + * file or a directory. Must be within Netx's basedir > + * @throws IOException on an io exception or if trying to delete something > + * outside the basedir > + */ > + public static void recursiveDelete(File file) throws IOException { > + if (JNLPRuntime.isDebug()) { > + System.err.println("Deleting: " + file); > + } > + > + if (!(file.getCanonicalPath().startsWith(JNLPRuntime.getBaseDir().getCanonicalPath()))) { > + throw new IOException("Trying to delete a file outside Netx's basedir: " > + + file.getCanonicalPath()); > + } > + > + if (file.isDirectory()) { > + File[] children = file.listFiles(); > + for (int i = 0; i < children.length; i++) { > + recursiveDelete(children[i]); > + } > + } > + if (!file.delete()) { > + throw new IOException("Unable to delete file: " + file); > + } > + > + } > + > } From omajid at redhat.com Tue Aug 4 08:33:04 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 15:33:04 +0000 Subject: changeset in /hg/icedtea6: Netx: disable destkop shortcuts Message-ID: changeset f5ed1489ddcf in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f5ed1489ddcf description: Netx: disable destkop shortcuts 2009-08-04 Omair Majid * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java (initialize): Disable creation of desktop shortcuts. diffstat: 2 files changed, 23 insertions(+), 1 deletion(-) ChangeLog | 5 +++ rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 19 +++++++++++++- diffs (41 lines): diff -r 18f23e1e3c37 -r f5ed1489ddcf ChangeLog --- a/ChangeLog Mon Aug 03 13:18:16 2009 +0100 +++ b/ChangeLog Tue Aug 04 11:34:49 2009 -0400 @@ -1,3 +1,8 @@ 2009-08-03 Andrew John Hughes + + * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java + (initialize): Disable creation of desktop shortcuts. + 2009-08-03 Andrew John Hughes * hotspot.map: diff -r 18f23e1e3c37 -r f5ed1489ddcf rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java --- a/rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java Mon Aug 03 13:18:16 2009 +0100 +++ b/rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java Tue Aug 04 11:34:49 2009 -0400 @@ -109,7 +109,24 @@ public class ApplicationInstance { */ public void initialize() { installEnvironment(); - addMenuAndDesktopEntries(); + + /* + * FIXME: Disable creating desktop entries for now + * + * there are some major issues we need to work out before we can enable them + * 1. Playing nice with the altnatives system + * - use the system preferred jdk (/usr/bin/javaws) + * - dont assume what jdk javaws corresponds to + * - make sure our shortcuts work with the sun jdk and vice versa + * (may not be possible since sun's javaws creates a launcher that + * links to /usr/java/${ver}/bin/javaws) + * - we should use the same options and arguments as sun's javaws + * 2. Make shortcuts work offline + * - make the cache updates and replacements work properly + * - shortcuts should use the cache + * + * addMenuAndDesktopEntries(); + */ } /** From omajid at redhat.com Tue Aug 4 08:36:37 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 11:36:37 -0400 Subject: RFC: Netx - disable desktop shortcuts In-Reply-To: <20090804143921.GA3111@redhat.com> References: <4A71BC62.9050508@redhat.com> <20090804143921.GA3111@redhat.com> Message-ID: <4A785585.7090806@redhat.com> Deepak Bhole wrote: > * Omair Majid [2009-07-30 11:30]: >> Hi, >> >> I would like to disable the desktop launcher code in Netx as it has some >> issues. Thanks to Deepak who originally brought up these problems. >> The two major ones are: >> >> 1. First of all, the desktop launcher Netx creates dont work well with >> the alternatives system. They all invoke $CURRENT_JDK_HOME/bin/javaws >> instead of /usr/bin/javaws. However changing to /usr/bin/javaws brings >> up other problems. /usr/bin/javaws is likely to be some other JDK which >> may or may not understand Netx's options that it uses in the launcher. >> This could lead to desktop launchers that dont work. /usr/bin/javaws >> overwite our shortcut with it's own which would then call, for example, >> /usr/java/latest/bin/javaws instead of /usr/bin/javaws. Also note that >> Sun's javaws creates a launcher that points to their cache. Netx wont be >> able to use that cache. >> >> Part of this issue can be fixed by using the exact same options as Sun's >> javaws to maintain compatibility. However I dont see a simple way to >> make a proprietary JRE's javaws invoke /usr/bin/javaws. Or to share the >> cache between multiple JDKs. >> >> 2. These shortcuts dont work offline, even if the application allows it. >> The current launchers just point Netx to the original JNLP file, which >> wont work if the machine is offline (even if everything has been cached >> by Netx). >> >> The correct fix is to ensure that Netx supports offline mode, uses the >> cache and JNLP update mechanism correctly and then make the launcher >> point to the cache. This might take some time to implement correctly. >> >> Because of these major issues, I would like to disable desktop shortcut >> support in Netx. >> >> ChangeLog: >> 2009-07-30 Omair Majid >> >> * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java >> (initialize): Disable creating desktop shortcuts. >> >> Any comments? >> > > Looks good. > Pushed as changeset f5ed1489ddcf. Cheers, Omair From omajid at redhat.com Tue Aug 4 09:07:28 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:28 +0000 Subject: changeset in /hg/icedtea: 2009-05-22 Omair Majid changeset 9a93570b7b06 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9a93570b7b06 description: 2009-05-22 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java (parse): Fix comment to reflect that the element can be either 'java' or 'j2se'. * netx/net/sourceforge/jnlp/JREDesc.java: Fix comment to reflect a 'java' element. New private variable vmArgs to keep track of 'java-vm-args'. (JREDesc): Modify to take in an additional parameter vmArgs and store it in vmArgs. (getVMArgs): New function. Return the value of 'java-vm-args' attribute. * netx/net/sourceforge/jnlp/Parser.java: Fix comments to reflect either a 'java' or 'j2se' element. (getResourceDesc): Treat 'java' element identically to 'j2se' element. (getJRE): Read in the value of the 'java-vm-args' attribute. diffstat: 4 files changed, 36 insertions(+), 8 deletions(-) ChangeLog | 14 ++++++++++++++ netx/net/sourceforge/jnlp/JNLPFile.java | 2 +- netx/net/sourceforge/jnlp/JREDesc.java | 17 +++++++++++++++-- netx/net/sourceforge/jnlp/Parser.java | 11 ++++++----- diffs (137 lines): diff -r 9a952e506f16 -r 9a93570b7b06 ChangeLog --- a/ChangeLog Thu Jul 30 04:51:32 2009 -0400 +++ b/ChangeLog Fri May 22 10:13:16 2009 -0400 @@ -1,3 +1,17 @@ 2009-07-30 Gary Benson + + * netx/net/sourceforge/jnlp/JNLPFile.java (parse): Fix comment to reflect + that the element can be either 'java' or 'j2se'. + * netx/net/sourceforge/jnlp/JREDesc.java: Fix comment to reflect a 'java' + element. New private variable vmArgs to keep track of 'java-vm-args'. + (JREDesc): Modify to take in an additional parameter vmArgs and store it in + vmArgs. + (getVMArgs): New function. Return the value of 'java-vm-args' attribute. + * netx/net/sourceforge/jnlp/Parser.java: Fix comments to reflect either a + 'java' or 'j2se' element. + (getResourceDesc): Treat 'java' element identically to 'j2se' element. + (getJRE): Read in the value of the 'java-vm-args' attribute. + 2009-07-30 Gary Benson * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: diff -r 9a952e506f16 -r 9a93570b7b06 netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Thu Jul 30 04:51:32 2009 -0400 +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Fri May 22 10:13:16 2009 -0400 @@ -505,7 +505,7 @@ public class JNLPFile { sourceLocation = parser.getFileLocation(); info = parser.getInfo(root); - resources = parser.getResources(root, false); // false == not a j2se resources section + resources = parser.getResources(root, false); // false == not a j2se/java resources section launchType = parser.getLauncher(root); security = parser.getSecurity(root); } diff -r 9a952e506f16 -r 9a93570b7b06 netx/net/sourceforge/jnlp/JREDesc.java --- a/netx/net/sourceforge/jnlp/JREDesc.java Thu Jul 30 04:51:32 2009 -0400 +++ b/netx/net/sourceforge/jnlp/JREDesc.java Fri May 22 10:13:16 2009 -0400 @@ -22,7 +22,7 @@ import java.util.*; import java.util.*; /** - * The J2SE element. + * The J2SE/Java element. * * @author Jon A. Maxwell (JAM) - initial author * @version $Revision: 1.5 $ @@ -41,6 +41,9 @@ public class JREDesc { /** maximum head size */ private long maximumHeapSize; + /** args to pass to the vm */ + private String vmArgs; + /** list of ResourceDesc objects */ private List resources; @@ -55,9 +58,12 @@ public class JREDesc { * @param maximumHeadSize maximum head size * @param resources list of ResourceDesc objects */ - public JREDesc(Version version, URL location, String initialHeapSize, String maximumHeapSize, List resources) { + public JREDesc(Version version, URL location, + String vmArgs, String initialHeapSize, + String maximumHeapSize, List resources) { this.version = version; this.location = location; + this.vmArgs = vmArgs; this.initialHeapSize = heapToLong(initialHeapSize); this.maximumHeapSize = heapToLong(maximumHeapSize); this.resources = resources; @@ -110,6 +116,13 @@ public class JREDesc { } /** + * Returns the additional arguments to pass to the Java VM + */ + public String getVMArgs() { + return vmArgs; + } + + /** * Convert a heap size description string to a long value * indicating the heap min/max size. */ diff -r 9a952e506f16 -r 9a93570b7b06 netx/net/sourceforge/jnlp/Parser.java --- a/netx/net/sourceforge/jnlp/Parser.java Thu Jul 30 04:51:32 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Parser.java Fri May 22 10:13:16 2009 -0400 @@ -186,7 +186,7 @@ class Parser { * node (jnlp or j2se). * * @param parent the parent node (either jnlp or j2se) - * @param j2se true if the resources are located under a j2se node + * @param j2se true if the resources are located under a j2se or java node * @throws ParseException if the JNLP file is invalid */ public List getResources(Node parent, boolean j2se) throws ParseException { @@ -208,7 +208,7 @@ class Parser { * Returns the ResourcesDesc element at the specified node. * * @param node the resources node - * @param j2se true if the resources are located under a j2se node + * @param j2se true if the resources are located under a j2se or java node * @throws ParseException if the JNLP file is invalid */ public ResourcesDesc getResourcesDesc(Node node, boolean j2se) throws ParseException { @@ -231,7 +231,7 @@ class Parser { if (!isTrustedEnvironment()) throw new ParseException(R("PUntrustedNative")); - if ("j2se".equals(name)) { + if ("j2se".equals(name) || "java".equals(name)) { if (getChildNode(root, "component-desc") != null) if (strict) throw new ParseException(R("PExtensionHasJ2SE")); @@ -273,12 +273,13 @@ class Parser { /** * Returns the JRE element at the specified node. * - * @param node the j2se node + * @param node the j2se/java node * @throws ParseException if the JNLP file is invalid */ public JREDesc getJRE(Node node) throws ParseException { Version version = getVersion(node, "version", null); URL location = getURL(node, "href", base); + String vmArgs = getAttribute(node, "java-vm-args",null); String initialHeap = getAttribute(node, "initial-heap-size", null); String maxHeap = getAttribute(node, "max-heap-size", null); List resources = getResources(node, true); @@ -286,7 +287,7 @@ class Parser { // require version attribute getRequiredAttribute(node, "version", null); - return new JREDesc(version, location, initialHeap, maxHeap, resources); + return new JREDesc(version, location, vmArgs, initialHeap, maxHeap, resources); } /** From omajid at redhat.com Tue Aug 4 09:07:31 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:31 +0000 Subject: changeset in /hg/icedtea: 2009-06-10 Omair Majid changeset a5edccad3c7c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a5edccad3c7c description: 2009-06-10 Omair Majid * netx/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. * netx/net/sourceforge/jnlp/JREDesc.java (getVMArgs): Fix javadoc to reflect that return value can be null. * netx/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. * netx/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. * netx/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. * netx/net/sourceforge/jnlp/runtime/Boot/java: Add -Xnofork to helpMessage (main): Check for '-Xnofork'. Set initial arguments. * netx/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 ++++ netx/net/sourceforge/jnlp/JNLPFile.java | 63 +++++++- netx/net/sourceforge/jnlp/JREDesc.java | 1 netx/net/sourceforge/jnlp/Launcher.java | 109 ++++++++++---- netx/net/sourceforge/jnlp/Parser.java | 112 +++++++++++++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 1 netx/net/sourceforge/jnlp/runtime/Boot.java | 9 + netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 35 ++++ diffs (truncated from 539 to 500 lines): diff -r 649b859ba20d -r a5edccad3c7c 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 + + * netx/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. + * netx/net/sourceforge/jnlp/JREDesc.java + (getVMArgs): Fix javadoc to reflect that return value can be null. + * netx/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. + * netx/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. + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add BXnofork. + * netx/net/sourceforge/jnlp/runtime/Boot/java: + Add -Xnofork to helpMessage + (main): Check for '-Xnofork'. Set initial arguments. + * netx/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 * netx/net/sourceforge/jnlp/services/XBasicService.java diff -r 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/JREDesc.java --- a/netx/net/sourceforge/jnlp/JREDesc.java Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/Parser.java --- a/netx/net/sourceforge/jnlp/Parser.java Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/runtime/Boot.java --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 649b859ba20d -r a5edccad3c7c netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 10 10:53:03 2009 -0400 +++ b/netx/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 Tue Aug 4 09:07:30 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:30 +0000 Subject: changeset in /hg/icedtea: 2009-05-29 Omair Majid changeset 0c18ad4aa0cf in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=0c18ad4aa0cf description: 2009-05-29 Omair Majid * netx/net/sourceforge/jnlp/JREDesc.java: Change initialHeapSize and maximumHeapSize to String. (JREDesc): Check and store initialHeapSize and maximumHeapSize. Throw ParseException on error. (getMaximumHeapSize): Return String. (getInitialHeapSize): Likewise. (heapToLong): Renamed to... (checkHeapSize): New method. Check for valid heap size. * netx/net/sourceforge/jnlp/resources/Messages.properties: Add PBadHeapSize to indicate a bad heap size. diffstat: 3 files changed, 55 insertions(+), 11 deletions(-) ChangeLog | 13 +++ netx/net/sourceforge/jnlp/JREDesc.java | 52 +++++++++++---- netx/net/sourceforge/jnlp/resources/Messages.properties | 1 diffs (134 lines): diff -r fa12c4801f74 -r 0c18ad4aa0cf ChangeLog --- a/ChangeLog Mon May 25 13:54:44 2009 -0400 +++ b/ChangeLog Fri May 29 12:13:53 2009 -0400 @@ -1,3 +1,16 @@ 2009-05-25 Omair Majid + + * netx/net/sourceforge/jnlp/JREDesc.java: + Change initialHeapSize and maximumHeapSize to String. + (JREDesc): Check and store initialHeapSize and maximumHeapSize. Throw + ParseException on error. + (getMaximumHeapSize): Return String. + (getInitialHeapSize): Likewise. + (heapToLong): Renamed to... + (checkHeapSize): New method. Check for valid heap size. + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add PBadHeapSize + to indicate a bad heap size. + 2009-05-25 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add diff -r fa12c4801f74 -r 0c18ad4aa0cf netx/net/sourceforge/jnlp/JREDesc.java --- a/netx/net/sourceforge/jnlp/JREDesc.java Mon May 25 13:54:44 2009 -0400 +++ b/netx/net/sourceforge/jnlp/JREDesc.java Fri May 29 12:13:53 2009 -0400 @@ -21,6 +21,8 @@ import java.net.*; import java.net.*; import java.util.*; +import net.sourceforge.jnlp.runtime.JNLPRuntime; + /** * The J2SE/Java element. * @@ -36,10 +38,10 @@ public class JREDesc { private URL location; /** inital heap size */ - private long initialHeapSize; + private String initialHeapSize; /** maximum head size */ - private long maximumHeapSize; + private String maximumHeapSize; /** args to pass to the vm */ private String vmArgs; @@ -60,12 +62,14 @@ public class JREDesc { */ public JREDesc(Version version, URL location, String vmArgs, String initialHeapSize, - String maximumHeapSize, List resources) { + String maximumHeapSize, List resources) throws ParseException { this.version = version; this.location = location; this.vmArgs = vmArgs; - this.initialHeapSize = heapToLong(initialHeapSize); - this.maximumHeapSize = heapToLong(maximumHeapSize); + checkHeapSize(initialHeapSize); + this.initialHeapSize = initialHeapSize; + checkHeapSize(maximumHeapSize); + this.maximumHeapSize = maximumHeapSize; this.resources = resources; } @@ -97,14 +101,14 @@ public class JREDesc { /** * Returns the maximum heap size in bytes. */ - public long getMaximumHeapSize() { + public String getMaximumHeapSize() { return maximumHeapSize; } /** * Returns the initial heap size in bytes. */ - public long getInitialHeapSize() { + public String getInitialHeapSize() { return initialHeapSize; } @@ -123,12 +127,38 @@ public class JREDesc { } /** - * Convert a heap size description string to a long value - * indicating the heap min/max size. + * Check for valid heap size string + * @throws ParseException if heapSize is invalid */ - static private long heapToLong(String heapSize) { + static private void checkHeapSize(String heapSize) throws ParseException { // need to implement for completeness even though not used in netx - return -1; + if (heapSize == null) { + return; + } + + boolean lastCharacterIsDigit = true; + // the last character must be 0-9 or k/K/m/M + char lastChar = Character.toLowerCase(heapSize.charAt(heapSize.length()-1)); + if ((lastChar < '0' || lastChar > '9')) { + lastCharacterIsDigit = false; + if (lastChar != 'k' && lastChar!= 'm' ) { + throw new ParseException(JNLPRuntime.getMessage("PBadHeapSize",new Object[] {heapSize})); + } + } + + int indexOfLastDigit = heapSize.length() - 1; + if (!lastCharacterIsDigit) { + indexOfLastDigit = indexOfLastDigit - 1; + } + + String size = heapSize.substring(0,indexOfLastDigit); + try { + // check that the number is a number! + Integer.valueOf(size); + } catch (NumberFormatException numberFormat) { + throw new ParseException(JNLPRuntime.getMessage("PBadHeapSize", new Object[] {heapSize}), numberFormat); + } + } } diff -r fa12c4801f74 -r 0c18ad4aa0cf netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 25 13:54:44 2009 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Fri May 29 12:13:53 2009 -0400 @@ -88,6 +88,7 @@ PBadNonrelativeUrl=Invalid non-relative PBadNonrelativeUrl=Invalid non-relative URL (node={0}, href={0}). PNeedsAttribute=The {0} element must specify a {1} attribute. PBadXML=Invalid XML document syntax. +PBadHeapSize=Invalid value for heap size ({0}) # Runtime BLaunchAbout=Launching about window... From omajid at redhat.com Tue Aug 4 09:07:30 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:30 +0000 Subject: changeset in /hg/icedtea: 2009-06-09 Omair Majid changeset 6941e22111cc in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6941e22111cc description: 2009-06-09 Omair Majid * netx/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. * netx/net/sourceforge/jnlp/InformationDesc.java (getAssociations): New function. Get the associations. (getShortcut): New function. Get the shortcut. (getRelatedContents): New function. Get the related-contents. * netx/net/sourceforge/jnlp/MenuDesc.java: New file. (MenuDesc): New function. (getSubMenu): New function. Get the submenu for this menu descriptor. * netx/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. * netx/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. * netx/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. * netx/net/sourceforge/jnlp/resources/Messages.properties: Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons. diffstat: 8 files changed, 445 insertions(+) ChangeLog | 43 +++++ netx/net/sourceforge/jnlp/AssociationDesc.java | 56 +++++++ netx/net/sourceforge/jnlp/InformationDesc.java | 27 +++ netx/net/sourceforge/jnlp/MenuDesc.java | 38 +++++ netx/net/sourceforge/jnlp/Parser.java | 114 +++++++++++++++ netx/net/sourceforge/jnlp/RelatedContentDesc.java | 93 ++++++++++++ netx/net/sourceforge/jnlp/ShortcutDesc.java | 70 +++++++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 4 diffs (truncated from 515 to 500 lines): diff -r 0c18ad4aa0cf -r 6941e22111cc ChangeLog --- a/ChangeLog Fri May 29 12:13:53 2009 -0400 +++ b/ChangeLog Tue Jun 09 14:08:52 2009 -0400 @@ -1,3 +1,46 @@ 2009-05-29 Omair Majid + + * netx/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. + * netx/net/sourceforge/jnlp/InformationDesc.java + (getAssociations): New function. Get the associations. + (getShortcut): New function. Get the shortcut. + (getRelatedContents): New function. Get the related-contents. + * netx/net/sourceforge/jnlp/MenuDesc.java: New file. + (MenuDesc): New function. + (getSubMenu): New function. Get the submenu for this menu descriptor. + * netx/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. + * netx/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. + * netx/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. + * netx/net/sourceforge/jnlp/resources/Messages.properties: + Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons. + 2009-05-29 Omair Majid * netx/net/sourceforge/jnlp/JREDesc.java: diff -r 0c18ad4aa0cf -r 6941e22111cc netx/net/sourceforge/jnlp/AssociationDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/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 0c18ad4aa0cf -r 6941e22111cc netx/net/sourceforge/jnlp/InformationDesc.java --- a/netx/net/sourceforge/jnlp/InformationDesc.java Fri May 29 12:13:53 2009 -0400 +++ b/netx/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 0c18ad4aa0cf -r 6941e22111cc netx/net/sourceforge/jnlp/MenuDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/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 0c18ad4aa0cf -r 6941e22111cc netx/net/sourceforge/jnlp/Parser.java --- a/netx/net/sourceforge/jnlp/Parser.java Fri May 29 12:13:53 2009 -0400 +++ b/netx/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 0c18ad4aa0cf -r 6941e22111cc netx/net/sourceforge/jnlp/RelatedContentDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/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 0c18ad4aa0cf -r 6941e22111cc netx/net/sourceforge/jnlp/ShortcutDesc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/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 Aug 4 09:07:31 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:31 +0000 Subject: changeset in /hg/icedtea: 2009-06-10 Omair Majid changeset 649b859ba20d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=649b859ba20d description: 2009-06-10 Omair Majid * netx/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 + netx/net/sourceforge/jnlp/services/XBasicService.java | 78 +++++++++++++++-- diffs (109 lines): diff -r 6941e22111cc -r 649b859ba20d ChangeLog --- a/ChangeLog Tue Jun 09 14:08:52 2009 -0400 +++ b/ChangeLog Wed Jun 10 10:53:03 2009 -0400 @@ -1,3 +1,10 @@ 2009-06-09 Omair Majid + + * netx/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-09 Omair Majid * netx/net/sourceforge/jnlp/AssociationDesc.java: New file. diff -r 6941e22111cc -r 649b859ba20d netx/net/sourceforge/jnlp/services/XBasicService.java --- a/netx/net/sourceforge/jnlp/services/XBasicService.java Tue Jun 09 14:08:52 2009 -0400 +++ b/netx/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 Tue Aug 4 09:07:29 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:29 +0000 Subject: changeset in /hg/icedtea: 2009-05-25 Omair Majid changeset fa12c4801f74 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=fa12c4801f74 description: 2009-05-25 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add RUnexpected to show generic unexpected information. * netx/net/sourceforge/jnlp/runtime/Boot.java (run): Show more information about the fatal exception. diffstat: 3 files changed, 10 insertions(+), 1 deletion(-) ChangeLog | 7 +++++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 1 + netx/net/sourceforge/jnlp/runtime/Boot.java | 3 ++- diffs (38 lines): diff -r 9a93570b7b06 -r fa12c4801f74 ChangeLog --- a/ChangeLog Fri May 22 10:13:16 2009 -0400 +++ b/ChangeLog Mon May 25 13:54:44 2009 -0400 @@ -1,3 +1,10 @@ 2009-05-22 Omair Majid + + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add + RUnexpected to show generic unexpected information. + * netx/net/sourceforge/jnlp/runtime/Boot.java (run): Show more + information about the fatal exception. + 2009-05-22 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java (parse): Fix comment to reflect diff -r 9a93570b7b06 -r fa12c4801f74 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Fri May 22 10:13:16 2009 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 25 13:54:44 2009 -0400 @@ -105,6 +105,7 @@ RCantReplaceSM=Changing the SecurityMana RCantReplaceSM=Changing the SecurityManager is not allowed. RDenyStopped=Stopped applications have no permissions. RExitNoApp=Can not exit the JVM because the current application cannot be determined. +RUnexpected=Unexpected {0} at {1} # Boot options, message should be shorter than this ----------------> BOUsage=javaws [-run-options] diff -r 9a93570b7b06 -r fa12c4801f74 netx/net/sourceforge/jnlp/runtime/Boot.java --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Fri May 22 10:13:16 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Mon May 25 13:54:44 2009 -0400 @@ -209,7 +209,8 @@ public final class Boot implements Privi if (JNLPRuntime.isDebug()) ex.printStackTrace(); - fatalError(ex.getMessage()); + fatalError(JNLPRuntime.getMessage("RUnexpected", + new Object[] {ex.toString(), ex.getStackTrace()[0]} )); } return null; From dbhole at redhat.com Tue Aug 4 09:07:32 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:32 +0000 Subject: changeset in /hg/icedtea: - Fix race conditions related to multi... Message-ID: changeset ee421053683d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ee421053683d description: - Fix race conditions related to multi-stage initialization/destruction - Account for port# when implementing security policy based on address - Reduce sleep time during initialization check iterations diffstat: 4 files changed, 168 insertions(+), 32 deletions(-) ChangeLog | 9 + IcedTeaPlugin.cc | 22 ++ netx/net/sourceforge/jnlp/NetxPanel.java | 2 plugin/icedtea/sun/applet/PluginAppletViewer.java | 167 +++++++++++++++++---- diffs (359 lines): diff -r 8754d9d3bc2c -r ee421053683d ChangeLog --- a/ChangeLog Tue Jun 16 10:58:00 2009 -0400 +++ b/ChangeLog Wed Jun 17 14:47:36 2009 -0400 @@ -1,3 +1,12 @@ 2009-06-16 Omair Majid + + * 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. + * netx/net/sourceforge/jnlp/NetxPanel.java: Account for case where handler + may be null due to an error above. + 2009-06-16 Omair Majid * netx/javax/jnlp/SingleInstanceListener.java: New file. diff -r 8754d9d3bc2c -r ee421053683d IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Tue Jun 16 10:58:00 2009 -0400 +++ b/IcedTeaPlugin.cc Wed Jun 17 14:47:36 2009 -0400 @@ -1065,6 +1065,7 @@ private: gpointer window_handle; guint32 window_width; guint32 window_height; + PRBool is_active; // FIXME: nsCOMPtr. IcedTeaPluginFactory* factory; PRUint32 instance_identifier; @@ -2447,6 +2448,7 @@ IcedTeaPluginInstance::Destroy () nsCString destroyMessage (instanceIdentifierPrefix); destroyMessage += "destroy"; factory->SendMessageToAppletViewer (destroyMessage); + is_active = PR_FALSE; return NS_OK; } @@ -2475,7 +2477,9 @@ IcedTeaPluginInstance::SetWindow (nsPlug 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 @@ IcedTeaPluginInstance::GetJavaObject (jo 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 @@ IcedTeaPluginInstance::IcedTeaPluginInst liveconnect_window (0), initialized(PR_FALSE), fatalErrorOccurred(PR_FALSE), + is_active(PR_TRUE), instanceIdentifierPrefix ("") { PLUGIN_TRACE_INSTANCE (); @@ -4134,6 +4141,7 @@ IcedTeaPluginInstance::GetWindow () nsresult result; PLUGIN_DEBUG_1ARG ("HERE 22: %d\n", liveconnect_window); + // principalsArray, numPrincipals and securitySupports // are ignored by GetWindow. See: // @@ -4144,6 +4152,16 @@ IcedTeaPluginInstance::GetWindow () 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 8754d9d3bc2c -r ee421053683d netx/net/sourceforge/jnlp/NetxPanel.java --- a/netx/net/sourceforge/jnlp/NetxPanel.java Tue Jun 16 10:58:00 2009 -0400 +++ b/netx/net/sourceforge/jnlp/NetxPanel.java Wed Jun 17 14:47:36 2009 -0400 @@ -144,7 +144,7 @@ public class NetxPanel extends AppletVie } public boolean isAlive() { - return handler.isAlive() && this.appletAlive; + return handler != null && handler.isAlive() && this.appletAlive; } } diff -r 8754d9d3bc2c -r ee421053683d 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 Wed Jun 17 14:47:36 2009 -0400 @@ -145,6 +145,8 @@ import com.sun.jndi.toolkit.url.UrlUtil; */ 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; // 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; } 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; // 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; } } 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 @@ import com.sun.jndi.toolkit.url.UrlUtil; * 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); } /** From omajid at redhat.com Tue Aug 4 09:07:32 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:32 +0000 Subject: changeset in /hg/icedtea: 2009-06-16 Omair Majid changeset 8754d9d3bc2c in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8754d9d3bc2c description: 2009-06-16 Omair Majid * netx/javax/jnlp/SingleInstanceListener.java: New file. * netx/javax/jnlp/SingleInstanceService.java: New file. diffstat: 3 files changed, 86 insertions(+) ChangeLog | 5 ++ netx/javax/jnlp/SingleInstanceListener.java | 35 ++++++++++++++++++++ netx/javax/jnlp/SingleInstanceService.java | 46 +++++++++++++++++++++++++++ diffs (101 lines): diff -r 5153060e463b -r 8754d9d3bc2c 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 + + * netx/javax/jnlp/SingleInstanceListener.java: New file. + * netx/javax/jnlp/SingleInstanceService.java: New file. + 2009-06-16 Omair Majid * netx/net/sourceforge/jnlp/services/ServiceUtil.java: diff -r 5153060e463b -r 8754d9d3bc2c netx/javax/jnlp/SingleInstanceListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/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 5153060e463b -r 8754d9d3bc2c netx/javax/jnlp/SingleInstanceService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/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 Aug 4 09:07:33 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:33 +0000 Subject: changeset in /hg/icedtea: 2009-06-17 Omair Majid changeset f04f94067be0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f04f94067be0 description: 2009-06-17 Omair Majid * netx/javax/jnlp/ExtendedService.java: New file. * netx/net/sourceforge/jnlp/services/XExtendedService.java: New file. * netx/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add ExtendedService to serviceNames. Create a proxy for XExtendedService to provide ExtendedService. diffstat: 4 files changed, 117 insertions(+) ChangeLog | 8 + netx/javax/jnlp/ExtendedService.java | 51 ++++++++++ netx/net/sourceforge/jnlp/services/XExtendedService.java | 56 +++++++++++ netx/net/sourceforge/jnlp/services/XServiceManagerStub.java | 2 diffs (149 lines): diff -r ee421053683d -r f04f94067be0 ChangeLog --- a/ChangeLog Wed Jun 17 14:47:36 2009 -0400 +++ b/ChangeLog Wed Jun 17 15:13:34 2009 -0400 @@ -1,3 +1,11 @@ 2009-06-17 Deepak Bhole + + * * netx/javax/jnlp/ExtendedService.java: New file. + * netx/net/sourceforge/jnlp/services/XExtendedService.java: New file. + * netx/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add + ExtendedService to serviceNames. Create a proxy for XExtendedService to + provide ExtendedService. + 2009-06-17 Deepak Bhole * IcedTeaPlugin.cc: Fix race condition that led to segfault. diff -r ee421053683d -r f04f94067be0 netx/javax/jnlp/ExtendedService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/javax/jnlp/ExtendedService.java Wed Jun 17 15:13:34 2009 -0400 @@ -0,0 +1,51 @@ +// 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; + +import java.io.File; +import java.io.IOException; + +/** + * This interface provides a way for the JNLP application to open specific files + * in the client's system. It asks permission from the user before opening any + * files. + * + * @author Omair Majid + * + */ +public interface ExtendedService { + + /** + * Open a file on the client' system and return its contents. The user must + * grant permission to the application for this to work. + * + * @param file the file to open + * @return the opened file as a {@link FileContents} object + * @throws IOException on any io problems + */ + FileContents openFile(File file) throws IOException; + + /** + * Opens multiple files on the user's sytem and returns their contents as a + * {@link FileContents} array + * + * @param files the files to open + * @return an array of FileContents objects + * @throws IOException on any io problems + */ + FileContents[] openFiles(File[] files) throws IOException; +} diff -r ee421053683d -r f04f94067be0 netx/net/sourceforge/jnlp/services/XExtendedService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/services/XExtendedService.java Wed Jun 17 15:13:34 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.services; + +import java.io.File; +import java.io.IOException; + +import javax.jnlp.ExtendedService; +import javax.jnlp.FileContents; + +import net.sourceforge.jnlp.security.SecurityWarningDialog; + +/** + * Implementation of ExtendedService + * + * @author Omair Majid + * + */ +public class XExtendedService implements ExtendedService { + + @Override + public FileContents openFile(File file) throws IOException { + + if (ServiceUtil.checkAccess(SecurityWarningDialog.AccessType.READ_FILE)) { + return (FileContents) ServiceUtil.createPrivilegedProxy(FileContents.class, + new XFileContents(file)); + } else { + return null; + } + + } + + @Override + public FileContents[] openFiles(File[] files) throws IOException { + FileContents[] contents = new FileContents[files.length]; + for (int i = 0; i < files.length; i++) { + contents[i] = openFile(files[i]); + } + return contents; + } + +} diff -r ee421053683d -r f04f94067be0 netx/net/sourceforge/jnlp/services/XServiceManagerStub.java --- a/netx/net/sourceforge/jnlp/services/XServiceManagerStub.java Wed Jun 17 14:47:36 2009 -0400 +++ b/netx/net/sourceforge/jnlp/services/XServiceManagerStub.java Wed Jun 17 15:13:34 2009 -0400 @@ -45,6 +45,7 @@ public class XServiceManagerStub impleme private static String serviceNames[] = { "javax.jnlp.BasicService", // required "javax.jnlp.DownloadService", // required + "javax.jnlp.ExtendedService", "javax.jnlp.ExtensionInstallerService", // required "javax.jnlp.PersistenceService", "javax.jnlp.FileOpenService", @@ -56,6 +57,7 @@ public class XServiceManagerStub impleme private static Object services[] = { ServiceUtil.createPrivilegedProxy(BasicService.class, new XBasicService()), ServiceUtil.createPrivilegedProxy(DownloadService.class, new XDownloadService()), + ServiceUtil.createPrivilegedProxy(ExtendedService.class, new XExtendedService()), ServiceUtil.createPrivilegedProxy(ExtensionInstallerService.class, new XExtensionInstallerService()), ServiceUtil.createPrivilegedProxy(PersistenceService.class, new XPersistenceService()), ServiceUtil.createPrivilegedProxy(FileOpenService.class, new XFileOpenService()), From omajid at redhat.com Tue Aug 4 09:07:34 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:34 +0000 Subject: changeset in /hg/icedtea: 2009-06-24 Omair Majid changeset 0cfbe4d569d9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=0cfbe4d569d9 description: 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Check for any existing single instance. Dont start a second instance. * netx/net/sourceforge/jnlp/resources/Messages.properties: Add RNoLockDir. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Added USER, TMP_DIR, and changed LOCKS_DIR. * netx/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java New file. * netx/net/sourceforge/jnlp/services/InstanceExistsException.java: New file. * netx/net/sourceforge/jnlp/services/ServiceUtil.java (getSingleInstanceService): New function. (checkExistingSingleInstance): New function. * netx/net/sourceforge/jnlp/services/SingleInstanceLock.java: New file. * netx/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add SingleInstanceService to serviceNames. Create a new instance of XSingleInstanceService as a privileged proxy. * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: New file. diffstat: 10 files changed, 602 insertions(+), 12 deletions(-) ChangeLog | 19 netx/net/sourceforge/jnlp/Launcher.java | 8 netx/net/sourceforge/jnlp/resources/Messages.properties | 1 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 16 netx/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java | 49 ++ netx/net/sourceforge/jnlp/services/InstanceExistsException.java | 35 + netx/net/sourceforge/jnlp/services/ServiceUtil.java | 48 +- netx/net/sourceforge/jnlp/services/SingleInstanceLock.java | 203 ++++++++ netx/net/sourceforge/jnlp/services/XServiceManagerStub.java | 6 netx/net/sourceforge/jnlp/services/XSingleInstanceService.java | 229 ++++++++++ diffs (truncated from 717 to 500 lines): diff -r 4e5e95c066da -r 0cfbe4d569d9 ChangeLog --- a/ChangeLog Wed Jun 24 12:15:33 2009 -0400 +++ b/ChangeLog Wed Jun 24 15:02:45 2009 -0400 @@ -1,3 +1,22 @@ 2009-06-24 Omair Majid + + * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Check for any + existing single instance. Dont start a second instance. + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add RNoLockDir. + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: + Added USER, TMP_DIR, and changed LOCKS_DIR. + * netx/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java + New file. + * netx/net/sourceforge/jnlp/services/InstanceExistsException.java: New file. + * netx/net/sourceforge/jnlp/services/ServiceUtil.java + (getSingleInstanceService): New function. + (checkExistingSingleInstance): New function. + * netx/net/sourceforge/jnlp/services/SingleInstanceLock.java: New file. + * netx/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add + SingleInstanceService to serviceNames. Create a new instance of + XSingleInstanceService as a privileged proxy. + * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: New file. + 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/Parser.java: Add 1.5 and 6.0 to diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Wed Jun 24 12:15:33 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Jun 24 15:02:45 2009 -0400 @@ -37,6 +37,8 @@ import net.sourceforge.jnlp.runtime.Appl import net.sourceforge.jnlp.runtime.ApplicationInstance; import net.sourceforge.jnlp.runtime.JNLPClassLoader; import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.services.InstanceExistsException; +import net.sourceforge.jnlp.services.ServiceUtil; import net.sourceforge.jnlp.util.Reflect; /** @@ -365,6 +367,12 @@ public class Launcher { throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplication"), R("LNotApplicationInfo"))); try { + + try { + ServiceUtil.checkExistingSingleInstance(file); + } catch (InstanceExistsException e) { + return null; + } if (JNLPRuntime.getForksAllowed() && file.needsNewVM()) { List netxArguments = new LinkedList(); diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 24 12:15:33 2009 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 24 15:02:45 2009 -0400 @@ -110,6 +110,7 @@ RCantReplaceSM=Changing the SecurityMana RCantReplaceSM=Changing the SecurityManager is not allowed. RDenyStopped=Stopped applications have no permissions. RExitNoApp=Can not exit the JVM because the current application cannot be determined. +RNoLockDir=Unable to create locks directory ({0}) RUnexpected=Unexpected {0} at {1} # Boot options, message should be shorter than this ----------------> diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 24 12:15:33 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 24 15:02:45 2009 -0400 @@ -104,6 +104,9 @@ public class JNLPRuntime { /** contains the arguments passed to the jnlp runtime */ private static List initialArguments; + /** Username */ + public static final String USER = System.getProperty("user.name"); + /** User's home directory */ public static final String HOME_DIR = System.getProperty("user.home"); @@ -119,12 +122,17 @@ public class JNLPRuntime { /** the ~/.netx/security/trusted.certs file containing trusted certificates */ public static final String CERTIFICATES_FILE = SECURITY_DIR + File.separator + "trusted.certs"; - /** - * the ~/.netx/locks/ directory containing locks for single instance + /** the /tmp/ directory used for temporary files */ + public static final String TMP_DIR = System.getProperty("java.io.tmpdir"); + + /** + * the /tmp/$USER/netx/locks/ directory containing locks for single instance * applications */ - public static final String LOCKS_DIR = NETX_DIR + File.separator + "locks"; - + public static final String LOCKS_DIR = TMP_DIR + File.separator + USER + File.separator + + "netx" + File.separator + "locks"; + + /** the java.home directory */ public static final String JAVA_HOME_DIR = System.getProperty("java.home"); /** the JNLP file to open to display the network-based about window */ diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java Wed Jun 24 15:02:45 2009 -0400 @@ -0,0 +1,49 @@ +// 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.services; + +import javax.jnlp.SingleInstanceService; + +import net.sourceforge.jnlp.JNLPFile; + +/** + * Extends SingleInstanceService to provide a few additional methods that are + * required to initialize SingleInstanceService and check things. These methods + * are not exposed publicly + * + * @author Omair Majid + * + */ +interface ExtendedSingleInstanceService extends SingleInstanceService { + + /** + * Check if the instance identified by this jnlp file is already running + * + * @param jnlpFile The JNLPFile that specifies the application + * + * @throws InstanceExistsException if an instance of this application + * already exists + * + */ + void checkSingleInstanceRunning(JNLPFile jnlpFile); + + /** + * Start a single instance service based on the current application + */ + void initializeSingleInstance(); + +} diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/services/InstanceExistsException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/services/InstanceExistsException.java Wed Jun 24 15:02:45 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 net.sourceforge.jnlp.services; + +/** + * + * This class represents an exception indicating that an application instance + * already exists for this jnlp file + * + * @author Omair Majid + * + */ +public class InstanceExistsException extends RuntimeException { + + private static final long serialVersionUID = 7950552292795498272L; + + public InstanceExistsException(String message) { + super(message); + } + +} diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/services/ServiceUtil.java --- a/netx/net/sourceforge/jnlp/services/ServiceUtil.java Wed Jun 24 12:15:33 2009 -0400 +++ b/netx/net/sourceforge/jnlp/services/ServiceUtil.java Wed Jun 24 15:02:45 2009 -0400 @@ -17,12 +17,29 @@ package net.sourceforge.jnlp.services; -import java.lang.reflect.*; -import java.security.*; - -import javax.jnlp.*; - -import net.sourceforge.jnlp.runtime.*; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; + +import javax.jnlp.BasicService; +import javax.jnlp.ClipboardService; +import javax.jnlp.DownloadService; +import javax.jnlp.ExtensionInstallerService; +import javax.jnlp.FileOpenService; +import javax.jnlp.FileSaveService; +import javax.jnlp.PersistenceService; +import javax.jnlp.PrintService; +import javax.jnlp.ServiceManager; +import javax.jnlp.SingleInstanceService; +import javax.jnlp.UnavailableServiceException; + +import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.runtime.ApplicationInstance; +import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.security.SecurityWarningDialog; /** @@ -110,6 +127,25 @@ public class ServiceUtil { return (PrintService) getService("javax.jnlp.PrintService"); } + /** + * Returns the SingleInstanceService reference, or null if the service is + * unavailable. + */ + public static SingleInstanceService getSingleInstanceService() { + return (SingleInstanceService) getService("javax.jnlp.SingleInstanceService"); + } + + /** + * Checks that this application (represented by the jnlp) isnt already running + * @param jnlpFile the {@link JNLPFile} that specifies the application + * + * @throws InstanceExistsException if an instance of this application already exists + */ + public static void checkExistingSingleInstance(JNLPFile jnlpFile) { + ExtendedSingleInstanceService esis = (ExtendedSingleInstanceService) getSingleInstanceService(); + esis.checkSingleInstanceRunning(jnlpFile); + } + /** * Returns the service, or null instead of an UnavailableServiceException */ diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/services/SingleInstanceLock.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/services/SingleInstanceLock.java Wed Jun 24 15:02:45 2009 -0400 @@ -0,0 +1,203 @@ +// 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.services; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.net.BindException; +import java.net.ServerSocket; + +import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.runtime.JNLPRuntime; + +/** + * This class represents a Lock for single instance jnlp applications + * + * The lock is per-session, per user. + * + * @author Omair Majid + */ +class SingleInstanceLock { + + JNLPFile jnlpFile; + File lockFile = null; + + public static final int INVALID_PORT = Integer.MIN_VALUE; + + int port = INVALID_PORT; + + /** + * Create an object to manage the instance lock for the specified JNLP file. + * + * @param jnlpFile the jnlpfile to create the lock for + */ + public SingleInstanceLock(JNLPFile jnlpFile) { + this.jnlpFile = jnlpFile; + lockFile = getLockFile(); + + } + + /** + * Create/overwrite the instance lock for the jnlp file. + * + * @param localPort the network port for the lock + * @throws IOException on any io problems + */ + public void createWithPort(int localPort) throws IOException { + + BufferedWriter lockFileWriter = new BufferedWriter(new FileWriter(lockFile, false)); + lockFileWriter.write(String.valueOf(localPort)); + lockFileWriter.newLine(); + lockFileWriter.flush(); + lockFileWriter.close(); + + } + + /** + * Returns true if the lock if valid. That is, the lock exists, and port it + * points to is listening for incoming messages. + */ + public boolean isValid() { + return (exists() && getPort() != INVALID_PORT && !isPortFree(getPort())); + } + + /** + * Returns the port in this lock file. + */ + public int getPort() { + if (!exists()) { + return INVALID_PORT; + } + + try { + parseFile(); + } catch (NumberFormatException e) { + port = INVALID_PORT; + } catch (IOException e) { + port = INVALID_PORT; + } + return port; + + } + + /** + * Returns true if the lock file already exists. + */ + private boolean exists() { + return lockFile.exists(); + } + + /** + * Returns true if the port is free. + */ + private boolean isPortFree(int port) { + try { + ServerSocket socket = new ServerSocket(port); + socket.close(); + return true; + } catch (BindException e) { + return false; + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + /** + * Return a file object that represents the lock file. The lock file itself + * may or may not exist. + */ + private File getLockFile() { + File baseDir = new File(JNLPRuntime.LOCKS_DIR); + + if (!baseDir.isDirectory() && !baseDir.mkdirs()) { + throw new RuntimeException(R("RNoLockDir", baseDir)); + } + String lockFileName = getLockFileName(); + File applicationLockFile = new File(baseDir, lockFileName); + return applicationLockFile; + } + + /** + * Returns the name of the lock file. + */ + private String getLockFileName() { + String initialName = ""; + + if (jnlpFile.getSourceLocation() != null) { + initialName = initialName + jnlpFile.getSourceLocation(); + } else { + initialName = initialName + jnlpFile.getFileLocation(); + } + + if (jnlpFile.getFileVersion() != null) { + initialName = initialName + jnlpFile.getFileVersion().toString(); + } + + initialName = initialName + getCurrentDisplay(); + String encodedName; + + /* + * FIXME + * + * Assuming safe characters are 'a-z','A-Z','0-9', '_', '.' + */ + + encodedName = initialName.replaceAll("[^a-zA-Z0-9.]", "_"); + + return encodedName; + + } + + /** + * Parse the lock file. + * + * @throws NumberFormatException + * @throws IOException + */ + private void parseFile() throws NumberFormatException, IOException { + BufferedReader lockFileReader = new BufferedReader(new FileReader(lockFile)); + int port = Integer.valueOf(lockFileReader.readLine()); + lockFileReader.close(); + this.port = port; + } + + /** + * Returns a string identifying this display. + * + * Implementation note: On systems with X support, this is the DISPLAY + * variable + * + * @return a string that is guaranteed to be not null. + */ + private String getCurrentDisplay() { + String display = System.getenv("DISPLAY"); + return (display == null) ? "" : display; + } + + private static String R(String key) { + return JNLPRuntime.getMessage(key); + } + + private static String R(String key, Object param) { + return JNLPRuntime.getMessage(key, new Object[] { param }); + } + +} diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/services/XServiceManagerStub.java --- a/netx/net/sourceforge/jnlp/services/XServiceManagerStub.java Wed Jun 24 12:15:33 2009 -0400 +++ b/netx/net/sourceforge/jnlp/services/XServiceManagerStub.java Wed Jun 24 15:02:45 2009 -0400 @@ -51,7 +51,8 @@ public class XServiceManagerStub impleme "javax.jnlp.FileOpenService", "javax.jnlp.FileSaveService", "javax.jnlp.ClipboardService", - "javax.jnlp.PrintService" + "javax.jnlp.PrintService", + "javax.jnlp.SingleInstanceService" }; private static Object services[] = { @@ -63,7 +64,8 @@ public class XServiceManagerStub impleme ServiceUtil.createPrivilegedProxy(FileOpenService.class, new XFileOpenService()), ServiceUtil.createPrivilegedProxy(FileSaveService.class, new XFileSaveService()), ServiceUtil.createPrivilegedProxy(ClipboardService.class, new XClipboardService()), - ServiceUtil.createPrivilegedProxy(PrintService.class, new XPrintService()) + ServiceUtil.createPrivilegedProxy(PrintService.class, new XPrintService()), + ServiceUtil.createPrivilegedProxy(ExtendedSingleInstanceService.class, new XSingleInstanceService()) }; diff -r 4e5e95c066da -r 0cfbe4d569d9 netx/net/sourceforge/jnlp/services/XSingleInstanceService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Wed Jun 24 15:02:45 2009 -0400 @@ -0,0 +1,229 @@ +// 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. +// From omajid at redhat.com Tue Aug 4 09:07:32 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:32 +0000 Subject: changeset in /hg/icedtea: 2009-06-16 Omair Majid changeset 5153060e463b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5153060e463b description: 2009-06-16 Omair Majid * netx/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 +++ netx/net/sourceforge/jnlp/services/ServiceUtil.java | 25 ++++++++++++++----- diffs (47 lines): diff -r a5edccad3c7c -r 5153060e463b ChangeLog --- a/ChangeLog Wed Jun 10 12:00:53 2009 -0400 +++ b/ChangeLog Tue Jun 16 10:23:45 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-10 Omair Majid + + * netx/net/sourceforge/jnlp/services/ServiceUtil.java: + (invoke): Throw the original exception that caused the problem. + 2009-06-10 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java diff -r a5edccad3c7c -r 5153060e463b netx/net/sourceforge/jnlp/services/ServiceUtil.java --- a/netx/net/sourceforge/jnlp/services/ServiceUtil.java Wed Jun 10 12:00:53 2009 -0400 +++ b/netx/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 Aug 4 09:07:34 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:34 +0000 Subject: changeset in /hg/icedtea: 2009-06-24 Omair Majid changeset 4e5e95c066da in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=4e5e95c066da description: 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/Parser.java: Add 1.5 and 6.0 to supportedVersions. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ netx/net/sourceforge/jnlp/Parser.java | 2 +- diffs (24 lines): diff -r 2bf6d173f425 -r 4e5e95c066da ChangeLog --- a/ChangeLog Wed Jun 17 17:10:39 2009 -0400 +++ b/ChangeLog Wed Jun 24 12:15:33 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-17 Omair Majid + + * netx/net/sourceforge/jnlp/Parser.java: Add 1.5 and 6.0 to + supportedVersions. + 2009-06-17 Omair Majid * netx/net/sourceforge/jnlp/runtime/Boot.java: Remove aboutFile. diff -r 2bf6d173f425 -r 4e5e95c066da netx/net/sourceforge/jnlp/Parser.java --- a/netx/net/sourceforge/jnlp/Parser.java Wed Jun 17 17:10:39 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Parser.java Wed Jun 24 12:15:33 2009 -0400 @@ -72,7 +72,7 @@ class Parser { /** the supported JNLP file versions */ - private static Version supportedVersions = new Version("1.0"); + private static Version supportedVersions = new Version("1.0 1.5 6.0"); // fix: some descriptors need to use the jnlp file at a later // date and having file ref lets us pass it to their From omajid at redhat.com Tue Aug 4 09:07:33 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:33 +0000 Subject: changeset in /hg/icedtea: 2009-06-17 Omair Majid changeset 2bf6d173f425 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2bf6d173f425 description: 2009-06-17 Omair Majid * netx/net/sourceforge/jnlp/runtime/Boot.java: Remove aboutFile. (getAboutFile): Get path from JNLPRuntime. (getBaseDir): Fix comments. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Add HOME_DIR, NETXRC_FILE, NETX_DIR, SECURITY_DIR, CERTIFICATES_FILE, LOCKS_DIR, JAVA_HOME_DIR, and NETX_ABOUT_FILE. (getDefaultBaseDir): Remove calls to loadWindowIcon and isHeadless() because they are unused. Use HOME_DIR and NETX_DIR. Be prepared for existing NETX_DIR. (getProperties): Use NETXRC_FILE instead of hardcoded file name. * netx/net/sourceforge/jnlp/security/SecurityUtil.java Remove homeDir, certDir and certFile. (getTrustedCertsFilename): Use HOME_DIR and CERTIFICATES_FILE. (checkTrustedCertsFile): Find parent directory from certFile. diffstat: 4 files changed, 61 insertions(+), 27 deletions(-) ChangeLog | 19 +++++++- netx/net/sourceforge/jnlp/runtime/Boot.java | 16 ++---- netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 42 +++++++++++++----- netx/net/sourceforge/jnlp/security/SecurityUtil.java | 11 ++-- diffs (183 lines): diff -r f04f94067be0 -r 2bf6d173f425 ChangeLog --- a/ChangeLog Wed Jun 17 15:13:34 2009 -0400 +++ b/ChangeLog Wed Jun 17 17:10:39 2009 -0400 @@ -1,6 +1,23 @@ 2009-06-17 Omair Majid - * * netx/javax/jnlp/ExtendedService.java: New file. + * netx/net/sourceforge/jnlp/runtime/Boot.java: Remove aboutFile. + (getAboutFile): Get path from JNLPRuntime. + (getBaseDir): Fix comments. + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Add HOME_DIR, + NETXRC_FILE, NETX_DIR, SECURITY_DIR, CERTIFICATES_FILE, LOCKS_DIR, + JAVA_HOME_DIR, and NETX_ABOUT_FILE. + (getDefaultBaseDir): Remove calls to loadWindowIcon and isHeadless() + because they are unused. Use HOME_DIR and NETX_DIR. Be prepared for + existing NETX_DIR. + (getProperties): Use NETXRC_FILE instead of hardcoded file name. + * netx/net/sourceforge/jnlp/security/SecurityUtil.java + Remove homeDir, certDir and certFile. + (getTrustedCertsFilename): Use HOME_DIR and CERTIFICATES_FILE. + (checkTrustedCertsFile): Find parent directory from certFile. + +2009-06-17 Omair Majid + + * netx/javax/jnlp/ExtendedService.java: New file. * netx/net/sourceforge/jnlp/services/XExtendedService.java: New file. * netx/net/sourceforge/jnlp/services/XServiceManagerStub.java: Add ExtendedService to serviceNames. Create a proxy for XExtendedService to diff -r f04f94067be0 -r 2bf6d173f425 netx/net/sourceforge/jnlp/runtime/Boot.java --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Jun 17 15:13:34 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Jun 17 17:10:39 2009 -0400 @@ -67,10 +67,6 @@ public final class Boot implements Privi private static final String version = "0.5"; - /** the JNLP file to open to display the network-based about window */ - private static final String aboutFile = - System.getProperty("java.home") + "/lib/about.jnlp"; - /** the text to display before launching the about link */ private static final String aboutMessage = "" + "netx v"+version+" - (C)2001-2003 Jon A. Maxwell (jmaxwell at users.sourceforge.net)\n" @@ -234,8 +230,8 @@ public final class Boot implements Privi */ private static String getAboutFile() { - if (new File(aboutFile).exists()) - return aboutFile; + if (new File(JNLPRuntime.NETX_ABOUT_FILE).exists()) + return JNLPRuntime.NETX_ABOUT_FILE; else return null; } @@ -424,9 +420,9 @@ public final class Boot implements Privi /** * Return the base dir. If the base dir parameter is not set - * the value is read from the "${user.home}/.netxrc" file (as - * defined by JNLPRuntime). If that file does not exist, an - * install dialog is displayed to select the base directory. + * the value is read from JNLPRuntime.NETX_ABOUT_FILE file. + * If that file does not exist, an install dialog is displayed + * to select the base directory. */ private static File getBaseDir() { if (getOption("-basedir") != null) { @@ -438,7 +434,7 @@ public final class Boot implements Privi return basedir; } - // check .netxrc, display dialog + // check .netxrc File basedir = JNLPRuntime.getDefaultBaseDir(); if (basedir == null) fatalError(R("BNoBase")); diff -r f04f94067be0 -r 2bf6d173f425 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 17 15:13:34 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Jun 17 17:10:39 2009 -0400 @@ -104,6 +104,34 @@ public class JNLPRuntime { /** contains the arguments passed to the jnlp runtime */ private static List initialArguments; + /** User's home directory */ + public static final String HOME_DIR = System.getProperty("user.home"); + + /** the ~/.netxrc file containing netx settings */ + public static final String NETXRC_FILE = HOME_DIR + File.separator + ".netxrc"; + + /** the ~/.netx directory containing user-specific data */ + public static final String NETX_DIR = HOME_DIR + File.separator + ".netx"; + + /** the ~/.netx/security directory containing security related information */ + public static final String SECURITY_DIR = NETX_DIR + File.separator + "security"; + + /** the ~/.netx/security/trusted.certs file containing trusted certificates */ + public static final String CERTIFICATES_FILE = SECURITY_DIR + File.separator + "trusted.certs"; + + /** + * the ~/.netx/locks/ directory containing locks for single instance + * applications + */ + public static final String LOCKS_DIR = NETX_DIR + File.separator + "locks"; + + public static final String JAVA_HOME_DIR = System.getProperty("java.home"); + + /** the JNLP file to open to display the network-based about window */ + public static final String NETX_ABOUT_FILE = JAVA_HOME_DIR + File.separator + "lib" + + File.separator + "about.jnlp"; + + /** * Returns whether the JNLP runtime environment has been @@ -279,18 +307,13 @@ public class JNLPRuntime { public static File getDefaultBaseDir() { PropertiesFile props = JNLPRuntime.getProperties(); - loadWindowIcon(); - String baseStr = props.getProperty("basedir"); if (baseStr != null) return new File(baseStr); - if (isHeadless()) - return null; - - String homeDir = System.getProperty("user.home"); - File baseDir = new File(homeDir + "/.netx/"); - if (homeDir == null || !baseDir.mkdir()) + String homeDir = HOME_DIR; + File baseDir = new File(NETX_DIR); + if (homeDir == null || (!baseDir.isDirectory() && !baseDir.mkdir())) return null; props.setProperty("basedir", baseDir.toString()); @@ -332,8 +355,7 @@ public class JNLPRuntime { * properties file. */ public static PropertiesFile getProperties() { - File netxrc = new File(System.getProperty("user.home"), ".netxrc"); - + File netxrc = new File(NETXRC_FILE); return new PropertiesFile(netxrc); } diff -r f04f94067be0 -r 2bf6d173f425 netx/net/sourceforge/jnlp/security/SecurityUtil.java --- a/netx/net/sourceforge/jnlp/security/SecurityUtil.java Wed Jun 17 15:13:34 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/SecurityUtil.java Wed Jun 17 17:10:39 2009 -0400 @@ -42,21 +42,20 @@ import java.io.FileOutputStream; import java.io.FileOutputStream; import java.security.KeyStore; +import net.sourceforge.jnlp.runtime.JNLPRuntime; + public class SecurityUtil { - private static String homeDir = null; - private static final String certDir = "/.netx/security/"; - private static final String certFile = "trusted.certs"; private static final char[] password = "changeit".toCharArray(); public static String getTrustedCertsFilename() throws Exception{ - homeDir = System.getProperty("user.home"); + String homeDir = JNLPRuntime.HOME_DIR; if (homeDir == null) { throw new Exception("Could not access home directory"); } else { - return homeDir + certDir + certFile; + return JNLPRuntime.CERTIFICATES_FILE; } } @@ -90,7 +89,7 @@ public class SecurityUtil { //file does not exist if (!certFile.isFile()) { - File dir = new File(homeDir+certDir); + File dir = certFile.getAbsoluteFile().getParentFile(); boolean madeDir = false; if (!dir.isDirectory()) { madeDir = dir.mkdirs(); From omajid at redhat.com Tue Aug 4 09:07:34 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:34 +0000 Subject: changeset in /hg/icedtea: 2009-06-24 Omair Majid changeset 9528fc8f3555 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9528fc8f3555 description: 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/Launcher.java (createApplication): Fix messages to refer to application instead of applet. diffstat: 2 files changed, 7 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ netx/net/sourceforge/jnlp/Launcher.java | 2 +- diffs (25 lines): diff -r 0cfbe4d569d9 -r 9528fc8f3555 ChangeLog --- a/ChangeLog Wed Jun 24 15:02:45 2009 -0400 +++ b/ChangeLog Wed Jun 24 15:10:22 2009 -0400 @@ -1,3 +1,9 @@ 2009-06-24 Omair Majid + + * netx/net/sourceforge/jnlp/Launcher.java + (createApplication): Fix messages to refer to application instead of + applet. + 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Check for any diff -r 0cfbe4d569d9 -r 9528fc8f3555 netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Wed Jun 24 15:02:45 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Jun 24 15:10:22 2009 -0400 @@ -590,7 +590,7 @@ public class Launcher { return app; } catch (Exception ex) { - throw new LaunchException(file, ex, R("LSFatal"), R("LCInit"), R("LInitApplet"), R("LInitAppletInfo")); + throw new LaunchException(file, ex, R("LSFatal"), R("LCInit"), R("LInitApplication"), R("LInitApplicationInfo")); } } From omajid at redhat.com Tue Aug 4 09:07:36 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:36 +0000 Subject: changeset in /hg/icedtea: 2009-06-24 Omair Majid changeset dd483ae1e6ca in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=dd483ae1e6ca description: 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/security/CertWarningPane.java (installComponents): Call SecurityUtil.getCN instead of getCN. (getCN): Removed. * netx/net/sourceforge/jnlp/security/CertsInfoPane.java (buildTree): Call SecurityUtil.getCN instead of getCN. (populateTable): Likewise. (getCN): Removed. * netx/net/sourceforge/jnlp/security/SecurityUtil.java (getCN): Follow RFC 2253 partially and understand escaping. (isHexDigit): New function. * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java (buildTree): Call SecurityUtil.getCN instead of getCN. (populateTable): Likewise. * netx/net/sourceforge/jnlp/tools/KeyTool.java: (doPrintEntry): Call SecurityUtil.getCN instead of getCN. (getCN): Removed. diffstat: 6 files changed, 130 insertions(+), 77 deletions(-) ChangeLog | 19 ++ netx/net/sourceforge/jnlp/security/CertWarningPane.java | 22 -- netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 29 --- netx/net/sourceforge/jnlp/security/SecurityUtil.java | 110 ++++++++++-- netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java | 8 netx/net/sourceforge/jnlp/tools/KeyTool.java | 19 -- diffs (316 lines): diff -r 9528fc8f3555 -r dd483ae1e6ca ChangeLog --- a/ChangeLog Wed Jun 24 15:10:22 2009 -0400 +++ b/ChangeLog Wed Jun 24 16:26:08 2009 -0400 @@ -1,3 +1,22 @@ 2009-06-24 Omair Majid + + * netx/net/sourceforge/jnlp/security/CertWarningPane.java + (installComponents): Call SecurityUtil.getCN instead of getCN. + (getCN): Removed. + * netx/net/sourceforge/jnlp/security/CertsInfoPane.java + (buildTree): Call SecurityUtil.getCN instead of getCN. + (populateTable): Likewise. + (getCN): Removed. + * netx/net/sourceforge/jnlp/security/SecurityUtil.java + (getCN): Follow RFC 2253 partially and understand escaping. + (isHexDigit): New function. + * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java + (buildTree): Call SecurityUtil.getCN instead of getCN. + (populateTable): Likewise. + * netx/net/sourceforge/jnlp/tools/KeyTool.java: + (doPrintEntry): Call SecurityUtil.getCN instead of getCN. + (getCN): Removed. + 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/Launcher.java diff -r 9528fc8f3555 -r dd483ae1e6ca netx/net/sourceforge/jnlp/security/CertWarningPane.java --- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java Wed Jun 24 15:10:22 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java Wed Jun 24 16:26:08 2009 -0400 @@ -101,7 +101,7 @@ public class CertWarningPane extends Sec try { if ((certVerifier instanceof HttpsCertVerifier) && (c instanceof X509Certificate)) - name = getCN(((X509Certificate)c) + name = SecurityUtil.getCN(((X509Certificate)c) .getSubjectX500Principal().getName()); else if (file instanceof PluginBridge) name = file.getTitle(); @@ -112,7 +112,7 @@ public class CertWarningPane extends Sec try { if (c instanceof X509Certificate) { - publisher = getCN(((X509Certificate)c) + publisher = SecurityUtil.getCN(((X509Certificate)c) .getSubjectX500Principal().getName()); } } catch (Exception e) { @@ -236,24 +236,6 @@ public class CertWarningPane extends Sec return ""+s+""; } - - /** - * Extracts the CN field from a Certificate principal string. - */ - private String getCN(String principal) { - int start = principal.indexOf("CN="); - int end = principal.indexOf(",", start); - - if (end == -1) { - end = principal.length(); - } - - if (start >= 0) - return principal.substring(start+3, end); - else - return principal; - } - private class MoreInfoButtonListener implements ActionListener { public void actionPerformed(ActionEvent e) { diff -r 9528fc8f3555 -r dd483ae1e6ca netx/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Wed Jun 24 15:10:22 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Wed Jun 24 16:26:08 2009 -0400 @@ -91,9 +91,9 @@ public class CertsInfoPane extends Secur X509Certificate firstCert = ((X509Certificate)firstPath.getCertificates().get(0)); String subjectString = - getCN(firstCert.getSubjectX500Principal().getName()); + SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); String issuerString = - getCN(firstCert.getIssuerX500Principal().getName()); + SecurityUtil.getCN(firstCert.getIssuerX500Principal().getName()); DefaultMutableTreeNode top = new DefaultMutableTreeNode(subjectString @@ -105,9 +105,9 @@ public class CertsInfoPane extends Secur X509Certificate secondCert = ((X509Certificate)firstPath.getCertificates().get(1)); subjectString = - getCN(secondCert.getSubjectX500Principal().getName()); + SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); issuerString = - getCN(secondCert.getIssuerX500Principal().getName()); + SecurityUtil.getCN(secondCert.getIssuerX500Principal().getName()); top.add(new DefaultMutableTreeNode(subjectString + " (" + issuerString + ")")); } @@ -129,8 +129,8 @@ public class CertsInfoPane extends Secur X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); certsData.add(parseCert(c)); - certNames[i] = getCN(c.getSubjectX500Principal().getName()) - + " (" + getCN(c.getIssuerX500Principal().getName()) + ")"; + certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; } } @@ -235,23 +235,6 @@ public class CertsInfoPane extends Secur } /** - * Extracts the CN field from a Certificate principal string. - */ - protected String getCN(String principal) { - int start = principal.indexOf("CN="); - int end = principal.indexOf(",", start); - - if (end == -1) { - end = principal.length(); - } - - if (start >= 0) - return principal.substring(start+3, end); - else - return principal; - } - - /** * Copies the currently selected certificate to the system Clipboard. */ private class CopyToClipboardHandler implements ActionListener { diff -r 9528fc8f3555 -r dd483ae1e6ca netx/net/sourceforge/jnlp/security/SecurityUtil.java --- a/netx/net/sourceforge/jnlp/security/SecurityUtil.java Wed Jun 24 15:10:22 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/SecurityUtil.java Wed Jun 24 16:26:08 2009 -0400 @@ -63,20 +63,106 @@ public class SecurityUtil { return password; } - public static String getCN(String principal) { + /** + * Extracts the CN field from a Certificate principal string. Or, if it + * can't find that, return the principal unmodified. + * + * This is a simple (and hence 'wrong') version. See + * http://www.ietf.org/rfc/rfc2253.txt for all the gory details. + */ + public static String getCN(String principal) { + + /* + * FIXME Incomplete + * + * This does not implement RFC 2253 completely + * + * Issues: + * - rfc2253 talks about utf8, java uses utf16. + * - theoretically, java should have dealt with all byte encodings + * so we shouldnt even see cases like \FF + * - if the above is wrong, then we need to deal with cases like + * \FF\FF + */ + int start = principal.indexOf("CN="); - int end = principal.indexOf(",", start); - - if (end == -1) { - end = principal.length(); - } - - if (start >= 0) - return principal.substring(start+3, end); - else + if (start == -1) { return principal; - } - + } + + StringBuilder commonName = new StringBuilder(); + + boolean inQuotes = false; + boolean escaped = false; + + /* + * bit 0 = high order bit. bit 1 = low order bit + */ + char[] hexBits = null; + + for (int i = start + 3; i < principal.length(); i++) { + char ch = principal.charAt(i); + switch (ch) { + case '"': + if (escaped) { + commonName.append(ch); + escaped = false; + } else { + inQuotes = !inQuotes; + } + break; + + case '\\': + if (escaped) { + commonName.append(ch); + escaped = false; + } else { + escaped = true; + } + break; + + case ',': + /* fall through */ + case ';': + /* fall through */ + case '+': + if (escaped || inQuotes) { + commonName.append(ch); + if (escaped) { + escaped = false; + } + } else { + return commonName.toString(); + } + break; + + default: + if (escaped && isHexDigit(ch)) { + hexBits = new char[2]; + hexBits[0] = ch; + } else if (hexBits != null) { + if (!isHexDigit(ch)) { + /* error parsing */ + return ""; + } + hexBits[1] = ch; + commonName.append((char) Integer.parseInt(new String(hexBits), 16)); + hexBits = null; + } else { + commonName.append(ch); + } + escaped = false; + } + } + + return commonName.toString(); + + } + + private static boolean isHexDigit(char ch) { + return ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')); + } + /** * Checks the user's home directory to see if the trusted.certs file exists. * If it does not exist, it tries to create an empty keystore. diff -r 9528fc8f3555 -r dd483ae1e6ca netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java --- a/netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java Wed Jun 24 15:10:22 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java Wed Jun 24 16:26:08 2009 -0400 @@ -55,9 +55,9 @@ public class SingleCertInfoPane extends protected void buildTree() { X509Certificate cert = ((SecurityWarningDialog)optionPane).getCert(); String subjectString = - getCN(cert.getSubjectX500Principal().getName()); + SecurityUtil.getCN(cert.getSubjectX500Principal().getName()); String issuerString = - getCN(cert.getIssuerX500Principal().getName()); + SecurityUtil.getCN(cert.getIssuerX500Principal().getName()); DefaultMutableTreeNode top = new DefaultMutableTreeNode(subjectString + " (" + issuerString + ")"); @@ -72,7 +72,7 @@ public class SingleCertInfoPane extends certNames = new String[1]; certsData = new ArrayList(); certsData.add(parseCert(c)); - certNames[0] = getCN(c.getSubjectX500Principal().getName()) - + " (" + getCN(c.getIssuerX500Principal().getName()) + ")"; + certNames[0] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; } } diff -r 9528fc8f3555 -r dd483ae1e6ca netx/net/sourceforge/jnlp/tools/KeyTool.java --- a/netx/net/sourceforge/jnlp/tools/KeyTool.java Wed Jun 24 15:10:22 2009 -0400 +++ b/netx/net/sourceforge/jnlp/tools/KeyTool.java Wed Jun 24 16:26:08 2009 -0400 @@ -176,30 +176,13 @@ public class KeyTool { out.println("Alias: " + alias); out.println("Date Created: " + usercerts.getCreationDate(alias)); - out.println("Subject: " + getCN(((X509Certificate)usercerts + out.println("Subject: " + SecurityUtil.getCN(((X509Certificate)usercerts .getCertificate(alias)).getSubjectX500Principal().getName())); out.println("Certificate fingerprint (MD5): " + getCertFingerPrint("MD5", cert)); out.println(); } } - - /** - * Extracts the CN field from a Certificate principal string. - */ - private String getCN(String principal) { - int start = principal.indexOf("CN="); - int end = principal.indexOf(",", start); - - if (end == -1) { - end = principal.length(); - } - - if (start >= 0) - return principal.substring(start+3, end); - else - return principal; - } /** * Gets the requested finger print of the certificate. From omajid at redhat.com Tue Aug 4 09:07:38 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:38 +0000 Subject: changeset in /hg/icedtea: Support pack200/gzip compression in Netx Message-ID: changeset 332a3a4aa5de in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=332a3a4aa5de description: Support pack200/gzip compression in Netx 2009-07-09 Omair Majid * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (downloadResource): Accept and download content with pack200 or gzip compression and uncompress it on the fly. (initializeResource): Accept content with pack200 or gzip compression. (getVersionedResourceURL): Add javadoc. diffstat: 2 files changed, 105 insertions(+), 13 deletions(-) ChangeLog | 8 + netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 110 +++++++++++++++--- diffs (172 lines): diff -r b92099ea3dbc -r 332a3a4aa5de ChangeLog --- a/ChangeLog Tue Aug 04 14:27:16 2009 +0100 +++ b/ChangeLog Thu Jul 09 17:18:02 2009 -0400 @@ -1,3 +1,11 @@ 2009-07-09 Deepak Bhole + + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: + (downloadResource): Accept and download content with pack200 or gzip + compression and uncompress it on the fly. + (initializeResource): Accept content with pack200 or gzip compression. + (getVersionedResourceURL): Add javadoc. + 2009-07-09 Deepak Bhole * IcedTeaPlugin.cc: Add support for cookie info requests from applets. diff -r b92099ea3dbc -r 332a3a4aa5de netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Aug 04 14:27:16 2009 +0100 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Jul 09 17:18:02 2009 -0400 @@ -17,14 +17,30 @@ package net.sourceforge.jnlp.cache; -import java.io.*; -import java.net.*; -import java.util.*; - -import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.event.*; -import net.sourceforge.jnlp.runtime.*; -import net.sourceforge.jnlp.util.*; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.jar.JarOutputStream; +import java.util.jar.Pack200; +import java.util.jar.Pack200.Unpacker; +import java.util.zip.GZIPInputStream; + +import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.event.DownloadEvent; +import net.sourceforge.jnlp.event.DownloadListener; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.util.WeakList; /** * This class tracks the downloading of various resources of a @@ -598,7 +614,9 @@ public class ResourceTracker { } /** - * Downloads an resource to a file. + * Downloads a resource to a file, uncompressing it if required + * + * @param resource the resource to download */ private void downloadResource(Resource resource) { resource.fireDownloadEvent(); // fire DOWNLOADING @@ -606,9 +624,34 @@ public class ResourceTracker { try { // create out second in case in does not exist URLConnection con = getVersionedResourceURL(resource).openConnection(); + con.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); + + con.connect(); + + /* + * We dont really know what we are downloading. If we ask for + * foo.jar, the server might send us foo.jar.pack.gz or foo.jar.gz + * instead. So we save the file with the appropriate extension + */ + URL downloadLocation = resource.location; + + String contentEncoding = con.getContentEncoding(); + + if (JNLPRuntime.isDebug()) { + System.err.println("Content encoding for " + resource.location + ": " + + contentEncoding); + } + + if (contentEncoding != null) { + if (contentEncoding.equals("gzip")) { + downloadLocation = new URL(downloadLocation.toString() + ".gz"); + } else if (contentEncoding.equals("pack200-gzip")) { + downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); + } + } InputStream in = new BufferedInputStream(con.getInputStream()); - OutputStream out = CacheUtil.getOutputStream(resource.location, resource.downloadVersion); + OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.downloadVersion); byte buf[] = new byte[1024]; int rlen; @@ -623,7 +666,45 @@ public class ResourceTracker { // explicitly close the URLConnection. if (con instanceof HttpURLConnection) ((HttpURLConnection)con).disconnect(); - + + /* + * If the file was compressed, uncompress it. + */ + if (contentEncoding != null) { + if (contentEncoding.equals("gzip")) { + GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil + .getCacheFile(downloadLocation, resource.downloadVersion))); + InputStream inputStream = new BufferedInputStream(gzInputStream); + + BufferedOutputStream outputStream = new BufferedOutputStream( + new FileOutputStream(CacheUtil.getCacheFile(resource.location, + resource.downloadVersion))); + + while (-1 != (rlen = inputStream.read(buf))) { + outputStream.write(buf, 0, rlen); + } + + outputStream.close(); + inputStream.close(); + gzInputStream.close(); + + } else if (contentEncoding.equals("pack200-gzip")) { + GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( + CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); + InputStream inputStream = new BufferedInputStream(gzInputStream); + + JarOutputStream outputStream = new JarOutputStream(new FileOutputStream( + CacheUtil.getCacheFile(resource.location, resource.downloadVersion))); + + Unpacker unpacker = Pack200.newUnpacker(); + unpacker.unpack(inputStream, outputStream); + + outputStream.close(); + inputStream.close(); + gzInputStream.close(); + } + } + resource.changeStatus(DOWNLOADING, DOWNLOADED); synchronized(lock) { lock.notifyAll(); // wake up wait's to check for completion @@ -654,6 +735,7 @@ public class ResourceTracker { // connect URLConnection connection = getVersionedResourceURL(resource).openConnection(); // this won't change so should be okay unsynchronized + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); int size = connection.getContentLength(); boolean current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; @@ -698,8 +780,10 @@ public class ResourceTracker { } } - - + /** + * Returns the versioned url for a resource + * @param resource the resource to get the url for + */ private URL getVersionedResourceURL(Resource resource) { String actualLocation = resource.location.getProtocol() + "://" + resource.location.getHost(); From dbhole at redhat.com Tue Aug 4 09:07:39 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:39 +0000 Subject: changeset in /hg/icedtea: Commit changes to the new np plugin. T... Message-ID: changeset 5da2e8e775d5 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5da2e8e775d5 description: Commit changes to the new np plugin. These changes do a lot of things to list. But most notably, they: - Lay down the scriptability framework. - Implement the new MessageBus architecture that is independent of how messages are passed. - Implement GetWindow and GetMember (partially) as proof of concept for message passing, threading, unicode translation, etc. ChangeLog: * Makefile.am: Update makefile to pick up plugin C++ files from new location. * plugin/icedtea/sun/applet/PluginMessageConsumer.java : Minor typo fix. * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc: New file. Processes requests from JS/C++ side to JavaSide. * plugin/icedteanp/IcedTeaJavaRequestProcessor.h: New file. Header for IcedTeaJavaRequestProcessor.cc. * plugin/icedteanp/IcedTeaNPPlugin.cc: Modified to work with the new MessageBus archtecture for the new plugin. Also, moved from top level directory. * plugin/icedteanp/IcedTeaNPPlugin.h: New file. Header for IcedTeaNPPlugin.cc. * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: New file. Processes plugin data requests from Java side. * plugin/icedteanp/IcedTeaPluginRequestProcessor.h: new file. Header for IcedTeaPluginRequestProcessor.cc. * plugin/icedteanp/IcedTeaPluginUtils.cc: New file. Utility functions for the rest of the plugin code. * plugin/icedteanp/IcedTeaPluginUtils.h: New file. Header for IcedTeaPluginUtils.cc. * plugin/icedteanp/IcedTeaScriptablePluginObject.cc: New file. Scriptable object that extends NPObject and implements hooks from NPClass. * plugin/icedteanp/IcedTeaScriptablePluginObject.h: New file. Header for IcedTeaScriptablePluginObject.h * plugin/icedtea/sun/applet/PluginMessageConsumer.java: Sync with current plugin. * plugin/icedteanp/sun/applet/PluginAppletSecurityContext.java: Same. * plugin/icedteanp/sun/applet/PluginAppletViewer.java: Same. * plugin/icedteanp/sun/applet/PluginCallRequestFactory.java: Same. * plugin/icedteanp/sun/applet/PluginCookieInfoRequest.java: Same * plugin/icedteanp/sun/applet/PluginCookieStore.java: Same. * plugin/icedteanp/sun/applet/PluginMain.java: Same. * plugin/icedteanp/sun/applet/PluginMessageConsumer.java: Same. * netx/net/sourceforge/jnlp/tools/JarSigner.java: Use JarFile instead of JarInputstream when verifying jars. diffstat: 21 files changed, 4450 insertions(+), 2082 deletions(-) ChangeLog | 38 IcedTeaNPPlugin.cc | 2006 --------- netx/net/sourceforge/jnlp/tools/JarSigner.java | 23 plugin/icedtea/sun/applet/PluginMessageConsumer.java | 2 plugin/icedteanp/IcedTeaJavaRequestProcessor.cc | 195 plugin/icedteanp/IcedTeaJavaRequestProcessor.h | 107 plugin/icedteanp/IcedTeaNPPlugin.cc | 2071 ++++++++++ plugin/icedteanp/IcedTeaNPPlugin.h | 90 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 420 ++ plugin/icedteanp/IcedTeaPluginRequestProcessor.h | 108 plugin/icedteanp/IcedTeaPluginUtils.cc | 583 ++ plugin/icedteanp/IcedTeaPluginUtils.h | 244 + plugin/icedteanp/IcedTeaScriptablePluginObject.cc | 113 plugin/icedteanp/IcedTeaScriptablePluginObject.h | 87 plugin/icedteanp/sun/applet/PluginAppletSecurityContext.java | 2 plugin/icedteanp/sun/applet/PluginAppletViewer.java | 238 - plugin/icedteanp/sun/applet/PluginCallRequestFactory.java | 2 plugin/icedteanp/sun/applet/PluginCookieInfoRequest.java | 122 plugin/icedteanp/sun/applet/PluginCookieStore.java | 73 plugin/icedteanp/sun/applet/PluginMain.java | 6 plugin/icedteanp/sun/applet/PluginMessageConsumer.java | 2 diffs (truncated from 6848 to 500 lines): diff -r b190c887feae -r 5da2e8e775d5 ChangeLog --- a/ChangeLog Thu Jul 09 17:29:13 2009 -0400 +++ b/ChangeLog Fri Jul 10 19:02:10 2009 -0400 @@ -1,3 +1,41 @@ 2009-07-09 Omair Majid + + * Makefile.am: Update makefile to pick up plugin C++ files from new + location. + * plugin/icedtea/sun/applet/PluginMessageConsumer.java : Minor typo fix. + * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc: New file. Processes + requests from JS/C++ side to JavaSide. + * plugin/icedteanp/IcedTeaJavaRequestProcessor.h: New file. Header for + IcedTeaJavaRequestProcessor.cc. + * plugin/icedteanp/IcedTeaNPPlugin.cc: Modified to work with the new + MessageBus archtecture for the new plugin. Also, moved from top level + directory. + * plugin/icedteanp/IcedTeaNPPlugin.h: New file. Header for + IcedTeaNPPlugin.cc. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: New file. Processes + plugin data requests from Java side. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.h: new file. Header for + IcedTeaPluginRequestProcessor.cc. + * plugin/icedteanp/IcedTeaPluginUtils.cc: New file. Utility functions for + the rest of the plugin code. + * plugin/icedteanp/IcedTeaPluginUtils.h: New file. Header for + IcedTeaPluginUtils.cc. + * plugin/icedteanp/IcedTeaScriptablePluginObject.cc: New file. Scriptable + object that extends NPObject and implements hooks from NPClass. + * plugin/icedteanp/IcedTeaScriptablePluginObject.h: New file. Header for + IcedTeaScriptablePluginObject.h + * plugin/icedtea/sun/applet/PluginMessageConsumer.java: Sync with current + plugin. + * plugin/icedteanp/sun/applet/PluginAppletSecurityContext.java: Same. + * plugin/icedteanp/sun/applet/PluginAppletViewer.java: Same. + * plugin/icedteanp/sun/applet/PluginCallRequestFactory.java: Same. + * plugin/icedteanp/sun/applet/PluginCookieInfoRequest.java: Same + * plugin/icedteanp/sun/applet/PluginCookieStore.java: Same. + * plugin/icedteanp/sun/applet/PluginMain.java: Same. + * plugin/icedteanp/sun/applet/PluginMessageConsumer.java: Same. + * netx/net/sourceforge/jnlp/tools/JarSigner.java: Use JarFile instead of + JarInputstream when verifying jars. + 2009-07-09 Omair Majid * netx/net/sourceforge/jnlp/Launcher.java diff -r b190c887feae -r 5da2e8e775d5 IcedTeaNPPlugin.cc --- a/IcedTeaNPPlugin.cc Thu Jul 09 17:29:13 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2006 +0,0 @@ -/* gcjwebplugin.cc -- web browser plugin to execute Java applets - Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -// System includes. -#include -#include -#include -#include -#include -#include -#include -#include - -// Netscape plugin API includes. -#include -#include - -// GLib includes. -#include -#include - -// GTK includes. -#include - -// Documentbase retrieval includes. -#include -#include -#include - -// API's into Mozilla -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Debugging macros. -#define PLUGIN_DEBUG(message) \ - g_print ("GCJ PLUGIN: thread %p: %s\n", g_thread_self (), message) - -#define PLUGIN_DEBUG_TWO(first, second) \ - g_print ("GCJ PLUGIN: thread %p: %s %s\n", g_thread_self (), \ - first, second) - -// Error reporting macros. -#define PLUGIN_ERROR(message) \ - g_printerr ("%s:%d: thread %p: Error: %s\n", __FILE__, __LINE__, \ - g_thread_self (), message) - -#define PLUGIN_ERROR_TWO(first, second) \ - g_printerr ("%s:%d: thread %p: Error: %s: %s\n", __FILE__, __LINE__, \ - g_thread_self (), first, second) - -#define PLUGIN_ERROR_THREE(first, second, third) \ - g_printerr ("%s:%d: thread %p: Error: %s: %s: %s\n", __FILE__, \ - __LINE__, g_thread_self (), first, second, third) - -// Plugin information passed to about:plugins. -#define PLUGIN_NAME "IcedTea NPR Web Browser Plugin (using IcedTea)" -#define PLUGIN_DESC "The " PLUGIN_NAME PLUGIN_VERSION " executes Java applets." -#define PLUGIN_MIME_DESC \ - "application/x-java-vm:class,jar:IcedTea;" \ - "application/x-java-applet:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.1:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.1.1:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.1.2:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.1.3:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.2:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.2.1:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.2.2:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.3:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.3.1:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.4:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.4.1:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.4.2:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.5:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.6:class,jar:IcedTea;" \ - "application/x-java-applet;jpi-version=1.6.0_00:class,jar:IcedTea;" \ - "application/x-java-bean:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.1:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.1.1:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.1.2:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.1.3:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.2:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.2.1:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.2.2:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.3:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.3.1:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.4:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.4.1:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.4.2:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.5:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.6:class,jar:IcedTea;" \ - "application/x-java-bean;jpi-version=1.6.0_00:class,jar:IcedTea;" -#define PLUGIN_URL NS_INLINE_PLUGIN_CONTRACTID_PREFIX NS_JVM_MIME_TYPE -#define PLUGIN_MIME_TYPE "application/x-java-vm" -#define PLUGIN_FILE_EXTS "class,jar,zip" -#define PLUGIN_MIME_COUNT 1 - -#define FAILURE_MESSAGE "gcjwebplugin error: Failed to run %s." \ - " For more detail rerun \"firefox -g\" in a terminal window." - -static int plugin_debug = 1; - -#define PLUGIN_DEBUG_0ARG(str) \ - do \ - { \ - if (plugin_debug) \ - { \ - fprintf(stderr, "GCJ PLUGIN: thread %p: ", g_thread_self ()); \ - fprintf(stderr, str); \ - } \ - } while (0) - -#define PLUGIN_DEBUG_1ARG(str, arg1) \ - do \ - { \ - if (plugin_debug) \ - { \ - fprintf(stderr, "GCJ PLUGIN: thread %p: ", g_thread_self ()); \ - fprintf(stderr, str, arg1); \ - } \ - } while (0) - -#define PLUGIN_DEBUG_2ARG(str, arg1, arg2) \ - do \ - { \ - if (plugin_debug) \ - { \ - fprintf(stderr, "GCJ PLUGIN: thread %p: ", g_thread_self ()); \ - fprintf(stderr, str, arg1, arg2); \ - } \ - } while (0) - -#define PLUGIN_DEBUG_3ARG(str, arg1, arg2, arg3) \ - do \ - { \ - if (plugin_debug) \ - { \ - fprintf(stderr, "GCJ PLUGIN: thread %p: ", g_thread_self ()); \ - fprintf(stderr, str, arg1, arg2, arg3); \ - } \ - } while (0) - -#define PLUGIN_DEBUG_4ARG(str, arg1, arg2, arg3, arg4) \ - do \ - { \ - if (plugin_debug) \ - { \ - fprintf(stderr, "GCJ PLUGIN: thread %p: ", g_thread_self ()); \ - fprintf(stderr, str, arg1, arg2, arg3, arg4); \ - } \ - } while (0) - -// Documentbase retrieval required definition. -static NS_DEFINE_IID (kIPluginTagInfo2IID, NS_IPLUGINTAGINFO2_IID); - -// Browser function table. -static NPNetscapeFuncs browserFunctions; - -// Data directory for plugin. -static gchar* data_directory = NULL; - -// Fully-qualified appletviewer executable. -static gchar* appletviewer_executable = NULL; - -// Applet viewer input channel (needs to be static because it is used in plugin_in_pipe_callback) -static GIOChannel* in_from_appletviewer = NULL; - -// Applet viewer input pipe name. -gchar* in_pipe_name; - -// Applet viewer input watch source. -gint in_watch_source; - -// Applet viewer output pipe name. -gchar* out_pipe_name; - -// Applet viewer output watch source. -gint out_watch_source; - -// Applet viewer output channel. -GIOChannel* out_to_appletviewer; - -// Tracks jvm status -gboolean jvm_up = FALSE; - -// Keeps track of initialization. NP_Initialize should only be -// called once. -gboolean initialized = false; - -GQuark ITNP_PLUGIN_ERROR = g_quark_from_string("IcedTeaNPPlugin"); - -// GCJPluginData stores all the data associated with a single plugin -// instance. A separate plugin instance is created for each -// tag. For now, each plugin instance spawns its own applet viewer -// process but this may need to change if we find pages containing -// multiple applets that expect to be running in the same VM. -struct GCJPluginData -{ - // A unique identifier for this plugin window. - gchar* instance_string; - // Mutex to protect appletviewer_alive. - GMutex* appletviewer_mutex; - // Back-pointer to the plugin instance to which this data belongs. - // This should not be freed but instead simply set to NULL. - NPP owner; - // The address of the plugin window. This should not be freed but - // instead simply set to NULL. - gpointer window_handle; - // The last plugin window width sent to us by the browser. - guint32 window_width; - // The last plugin window height sent to us by the browser. - guint32 window_height; -}; - -// Documentbase retrieval type-punning union. -typedef union -{ - void** void_field; - nsIPluginTagInfo2** info_field; -} info_union; - -// Static instance helper functions. -// Have the browser allocate a new GCJPluginData structure. -static void plugin_data_new (GCJPluginData** data); -// Retrieve the current document's documentbase. -static gchar* plugin_get_documentbase (NPP instance); -// Notify the user that the appletviewer is not installed correctly. -static void plugin_display_failure_dialog (); -// Callback used to monitor input pipe status. -static gboolean plugin_in_pipe_callback (GIOChannel* source, - GIOCondition condition, - gpointer plugin_data); -// Callback used to monitor output pipe status. -static gboolean plugin_out_pipe_callback (GIOChannel* source, - GIOCondition condition, - gpointer plugin_data); -static NPError plugin_start_appletviewer (GCJPluginData* data); -static gchar* plugin_create_applet_tag (int16 argc, char* argn[], - char* argv[]); -static void plugin_send_message_to_appletviewer (gchar const* message); -static void plugin_stop_appletviewer (); -// Uninitialize GCJPluginData structure -static void plugin_data_destroy (NPP instance); - -NS_IMETHODIMP get_cookie_info(const char* siteAddr, char** cookieString); -void get_proxy_info(const char* siteAddr, char** proxy_scheme, char** proxy_host, char** proxy_port, GError *error); -void decode_url(const gchar* url, gchar** decoded_url); -void consume_message(gchar* message); -void start_jvm_if_needed(); -static void appletviewer_monitor(GPid pid, gint status, gpointer data); - -// Global instance counter. -// Mutex to protect plugin_instance_counter. -static GMutex* plugin_instance_mutex = NULL; -// A global variable for reporting GLib errors. This must be free'd -// and set to NULL after each use. -static GError* channel_error = NULL; - -static GHashTable* instance_to_id_map = g_hash_table_new(NULL, NULL); -static GHashTable* id_to_instance_map = g_hash_table_new(NULL, NULL); -static gint instance_counter = 1; -static GPid appletviewer_pid = -1; -static guint appletviewer_watch_id = -1; - -// Functions prefixed by GCJ_ are instance functions. They are called -// by the browser and operate on instances of GCJPluginData. -// Functions prefixed by plugin_ are static helper functions. -// Functions prefixed by NP_ are factory functions. They are called -// by the browser and provide functionality needed to create plugin -// instances. - -// INSTANCE FUNCTIONS - -// Creates a new gcjwebplugin instance. This function creates a -// GCJPluginData* and stores it in instance->pdata. The following -// GCJPluginData fiels are initialized: instance_string, in_pipe_name, -// in_from_appletviewer, in_watch_source, out_pipe_name, -// out_to_appletviewer, out_watch_source, appletviewer_mutex, owner, -// appletviewer_alive. In addition two pipe files are created. All -// of those fields must be properly destroyed, and the pipes deleted, -// by GCJ_Destroy. If an error occurs during initialization then this -// function will free anything that's been allocated so far, set -// instance->pdata to NULL and return an error code. -NPError -GCJ_New (NPMIMEType pluginType, NPP instance, uint16 mode, - int16 argc, char* argn[], char* argv[], - NPSavedData* saved) -{ - PLUGIN_DEBUG ("GCJ_New"); - - NPError np_error = NPERR_NO_ERROR; - GCJPluginData* data = NULL; - - gchar* documentbase = NULL; - gchar* read_message = NULL; - gchar* applet_tag = NULL; - gchar* tag_message = NULL; - gchar* cookie_info = NULL; - - if (!instance) - { - PLUGIN_ERROR ("Browser-provided instance pointer is NULL."); - np_error = NPERR_INVALID_INSTANCE_ERROR; - goto cleanup_done; - } - - // data - plugin_data_new (&data); - if (data == NULL) - { - PLUGIN_ERROR ("Failed to allocate plugin data."); - np_error = NPERR_OUT_OF_MEMORY_ERROR; - goto cleanup_done; - } - - // start the jvm if needed - start_jvm_if_needed(); - - // Initialize data->instance_string. - // - // instance_string should be unique for this process so we use a - // combination of getpid and plugin_instance_counter. - // - // Critical region. Reference and increment plugin_instance_counter - // global. - g_mutex_lock (plugin_instance_mutex); - - // data->instance_string - data->instance_string = g_strdup_printf ("%d", - instance_counter); - - g_mutex_unlock (plugin_instance_mutex); - - // data->appletviewer_mutex - data->appletviewer_mutex = g_mutex_new (); - - g_mutex_lock (data->appletviewer_mutex); - - // Documentbase retrieval. - documentbase = plugin_get_documentbase (instance); - if (!documentbase) - { - PLUGIN_ERROR ("Documentbase retrieval failed." - " Browser not Mozilla-based?"); - goto cleanup_appletviewer_mutex; - } - - // Send applet tag message to appletviewer. - applet_tag = plugin_create_applet_tag (argc, argn, argv); - - tag_message = (gchar*) malloc(strlen(applet_tag)*sizeof(gchar) + 1024); - g_sprintf(tag_message, "instance %d tag %s %s", instance_counter, documentbase, applet_tag); - - //plugin_send_message_to_appletviewer (data, data->instance_string); - plugin_send_message_to_appletviewer (tag_message); - - //send cookie information - char* cookie_string; - if (get_cookie_info(documentbase, &cookie_string) == NS_OK) - { - cookie_info = (gchar*) malloc(sizeof(cookie_string) + 1024); - g_sprintf(cookie_info, "instance %d cookie %s", instance_counter, cookie_string); - } - else - { - cookie_info = (gchar*) malloc(1024); - g_sprintf(cookie_info, "instance %d cookie", instance_counter); - } - - plugin_send_message_to_appletviewer (cookie_info); - - g_mutex_unlock (data->appletviewer_mutex); - - // If initialization succeeded entirely then we store the plugin - // data in the instance structure and return. Otherwise we free the - // data we've allocated so far and set instance->pdata to NULL. - - // Set back-pointer to owner instance. - data->owner = instance; - instance->pdata = data; - goto cleanup_done; - - cleanup_appletviewer_mutex: - g_free (data->appletviewer_mutex); - data->appletviewer_mutex = NULL; - - // cleanup_instance_string: - g_free (data->instance_string); - data->instance_string = NULL; - - // cleanup_data: - // Eliminate back-pointer to plugin instance. - data->owner = NULL; - (*browserFunctions.memfree) (data); - data = NULL; - - // Initialization failed so return a NULL pointer for the browser - // data. - instance->pdata = NULL; - - cleanup_done: - g_free (tag_message); - tag_message = NULL; - g_free (applet_tag); - applet_tag = NULL; - g_free (read_message); From omajid at redhat.com Tue Aug 4 09:07:37 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:37 +0000 Subject: changeset in /hg/icedtea: 2009-07-07 Omair Majid changeset 559f19ce8d7b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=559f19ce8d7b description: 2009-07-07 Omair Majid * netx/net/sourceforge/jnlp/Parser.java (getExtension): Fix typo in node name. diffstat: 2 files changed, 9 insertions(+), 4 deletions(-) ChangeLog | 5 +++++ netx/net/sourceforge/jnlp/Parser.java | 8 ++++---- diffs (30 lines): diff -r 0a41b2f5f086 -r 559f19ce8d7b ChangeLog --- a/ChangeLog Tue Jul 07 10:12:31 2009 -0400 +++ b/ChangeLog Tue Jul 07 13:44:35 2009 -0400 @@ -1,3 +1,8 @@ 2009-07-07 Omair Majid + + * netx/net/sourceforge/jnlp/Parser.java + (getExtension): Fix typo in node name. + 2009-07-07 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add diff -r 0a41b2f5f086 -r 559f19ce8d7b netx/net/sourceforge/jnlp/Parser.java --- a/netx/net/sourceforge/jnlp/Parser.java Tue Jul 07 10:12:31 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Parser.java Tue Jul 07 13:44:35 2009 -0400 @@ -336,10 +336,10 @@ class Parser { Node dload[] = getChildNodes(node, "ext-download"); for (int i=0; i < dload.length; i++) { - boolean lazy = "lazy".equals(getAttribute(node, "download", "eager")); - - ext.addPart(getRequiredAttribute(node, "ext-part", null), - getAttribute(node, "part", null), + boolean lazy = "lazy".equals(getAttribute(dload[i], "download", "eager")); + + ext.addPart(getRequiredAttribute(dload[i], "ext-part", null), + getAttribute(dload[i], "part", null), lazy); } From dbhole at redhat.com Tue Aug 4 09:07:37 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:37 +0000 Subject: changeset in /hg/icedtea: Rewrote cookie support for the plugin ... Message-ID: changeset 544a26bdc6d0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=544a26bdc6d0 description: Rewrote cookie support for the plugin so that cookies are aquired dynamically from Mozilla for each http/https connection. diffstat: 16 files changed, 127 insertions(+), 108 deletions(-) ChangeLog | 16 ++++ IcedTeaPlugin.cc | 52 ++++++++++--- netx/net/sourceforge/jnlp/ExtensionDesc.java | 16 ---- netx/net/sourceforge/jnlp/JNLPFile.java | 27 ++----- netx/net/sourceforge/jnlp/Launcher.java | 6 - netx/net/sourceforge/jnlp/NetxPanel.java | 5 - netx/net/sourceforge/jnlp/Parser.java | 2 netx/net/sourceforge/jnlp/PluginBridge.java | 3 netx/net/sourceforge/jnlp/cache/CacheUtil.java | 4 - netx/net/sourceforge/jnlp/cache/Resource.java | 17 ---- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 10 -- netx/net/sourceforge/jnlp/runtime/Boot.java | 2 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 10 +- plugin/icedtea/sun/applet/PluginAppletViewer.java | 57 +++++++++------ plugin/icedtea/sun/applet/PluginCallRequestFactory.java | 2 plugin/icedtea/sun/applet/PluginMain.java | 6 + diffs (truncated from 645 to 500 lines): diff -r 559f19ce8d7b -r 544a26bdc6d0 ChangeLog --- a/ChangeLog Tue Jul 07 13:44:35 2009 -0400 +++ b/ChangeLog Thu Jul 09 14:42:44 2009 -0400 @@ -1,3 +1,19 @@ 2009-07-07 Omair Majid + + * IcedTeaPlugin.cc: Add suppport for cookie info requests from applets. + * plugin/icedtea/sun/applet/PluginAppletViewer.java: Rework cookie support + to make it dynamic. + * plugin/icedtea/sun/applet/PluginMain.java: Wire in custom cookie store + that dynamically requests cookie information from C++ side. + * netx/net/sourceforge/jnlp/JNLPFile.java: Remove old cookie handling code. + * netx/net/sourceforge/jnlp/Launcher.java: Same. + * netx/net/sourceforge/jnlp/NetxPanel.java: Same. + * netx/net/sourceforge/jnlp/PluginBridge.java: Same. + * netx/net/sourceforge/jnlp/cache/CacheUtil.java: Same. + * netx/net/sourceforge/jnlp/cache/Resource.java: Same. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Same. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Same. + 2009-07-07 Omair Majid * netx/net/sourceforge/jnlp/Parser.java diff -r 559f19ce8d7b -r 544a26bdc6d0 IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Tue Jul 07 13:44:35 2009 -0400 +++ b/IcedTeaPlugin.cc Thu Jul 09 14:42:44 2009 -0400 @@ -1012,6 +1012,7 @@ private: void ProcessMessage(); void ConsumeMsgFromJVM(); nsresult GetProxyInfo(const char* siteAddr, char** proxyScheme, char** proxyHost, char** proxyPort); + nsresult GetCookieInfo(const char* siteAddr, char** cookieString); nsCOMPtr sink; nsCOMPtr transport; nsCOMPtr applet_viewer_process; @@ -1070,7 +1071,6 @@ private: IcedTeaPluginFactory* factory; PRUint32 instance_identifier; nsCString instanceIdentifierPrefix; - nsresult GetCookie(const char* siteAddr, char** cookieString); }; @@ -2380,16 +2380,6 @@ IcedTeaPluginInstance::Initialize (nsIPl encodedAppletTag += tagMessage.get()[i]; } - nsCString cookieInfo(instanceIdentifierPrefix); - cookieInfo += "cookie "; - - char* cookieString; - if (GetCookie(documentbase, &cookieString) == NS_OK) - { - cookieInfo += cookieString; - } - - factory->SendMessageToAppletViewer (cookieInfo); factory->SendMessageToAppletViewer (encodedAppletTag); // Set back-pointer to peer instance. @@ -2760,8 +2750,15 @@ IcedTeaPluginFactory::GetProxyInfo(const return NS_OK; } -NS_IMETHODIMP -IcedTeaPluginInstance::GetCookie(const char* siteAddr, char** cookieString) +/** + * Returns the cookie information for the given url + * + * @param siteAddr The URI to check (must be decoded) + * @return cookieString The cookie string for the given URI + */ + +NS_IMETHODIMP +IcedTeaPluginFactory::GetCookieInfo(const char* siteAddr, char** cookieString) { nsresult rv; @@ -3497,6 +3494,35 @@ IcedTeaPluginFactory::HandleMessage (nsC // free allocated memory delete proxyScheme, proxyHost, proxyPort; + + } else if (command == "PluginCookieInfo") + { + + nsresult rv; + nsCOMPtr net_util = do_GetService(NS_NETUTIL_CONTRACTID, &rv); + + if (!net_util) + printf("Error instantiating NetUtil service.\n"); + + // decode the url + nsDependentCSubstring url; + net_util->UnescapeString(rest, 0, url); + + nsCString cookieInfo("plugin PluginCookieInfo "); + cookieInfo += rest; + cookieInfo += " "; + + char* cookieString; + if (GetCookieInfo(((nsCString) url).get(), &cookieString) == NS_OK) + { + cookieInfo += cookieString; + PLUGIN_DEBUG_2ARG("Cookie for %s is %s\n", ((nsCString) url).get(), cookieString); + } else { + PLUGIN_DEBUG_1ARG("No cookie found for %s\n", ((nsCString) url).get()); + } + + // send back what we found + SendMessageToAppletViewer (cookieInfo); } } diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/ExtensionDesc.java --- a/netx/net/sourceforge/jnlp/ExtensionDesc.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/ExtensionDesc.java Thu Jul 09 14:42:44 2009 -0400 @@ -40,9 +40,6 @@ public class ExtensionDesc { /** the location of the extension JNLP file */ private URL location; - - /** the cookie string sent with resource requests */ - private String cookieStr; /** the JNLPFile the extension refers to */ private JNLPFile file; @@ -61,11 +58,10 @@ public class ExtensionDesc { * @param version the required version of the extention JNLPFile * @param location the location of the extention JNLP file */ - public ExtensionDesc(String name, Version version, URL location, String cookieStr) { + public ExtensionDesc(String name, Version version, URL location) { this.name = name; this.version = version; this.location = location; - this.cookieStr = cookieStr; } /** @@ -125,7 +121,7 @@ public class ExtensionDesc { */ public void resolve() throws ParseException, IOException { if (file == null) { - file = new JNLPFile(location, cookieStr); + file = new JNLPFile(location); if (JNLPRuntime.isDebug()) System.out.println("Resolve: "+file.getInformation().getTitle()); @@ -144,14 +140,6 @@ public class ExtensionDesc { public JNLPFile getJNLPFile() { return file; } - - /** - * Returns the cookie associated with this instance - */ - public String getCookieStr() { - return cookieStr; - } - } diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Thu Jul 09 14:42:44 2009 -0400 @@ -69,9 +69,6 @@ public class JNLPFile { /** the URL used to resolve relative URLs in the file */ protected URL codeBase; - - /** cookie string to send alongwith resource requests */ - protected String cookieStr; /** file version */ protected Version fileVersion; @@ -127,8 +124,8 @@ public class JNLPFile { * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ - public JNLPFile(URL location, String cookieStr) throws IOException, ParseException { - this(location, cookieStr, false); // not strict + public JNLPFile(URL location) throws IOException, ParseException { + this(location, false); // not strict } /** @@ -140,8 +137,8 @@ public class JNLPFile { * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ - public JNLPFile(URL location, String cookieStr, boolean strict) throws IOException, ParseException { - this(location, cookieStr, strict, JNLPRuntime.getDefaultUpdatePolicy()); + public JNLPFile(URL location, boolean strict) throws IOException, ParseException { + this(location, strict, JNLPRuntime.getDefaultUpdatePolicy()); } /** @@ -154,12 +151,11 @@ public class JNLPFile { * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ - public JNLPFile(URL location, String cookieStr, boolean strict, UpdatePolicy policy) throws IOException, ParseException { - Node root = Parser.getRootNode(openURL(location, cookieStr, policy)); + public JNLPFile(URL location, boolean strict, UpdatePolicy policy) throws IOException, ParseException { + Node root = Parser.getRootNode(openURL(location, policy)); parse(root, strict, location); this.fileLocation = location; - this.cookieStr = cookieStr; } /** @@ -190,13 +186,13 @@ public class JNLPFile { * Open the jnlp file URL from the cache if there, otherwise * download to the cache. Called from constructor. */ - private static InputStream openURL(URL location, String cookieStr, UpdatePolicy policy) throws IOException { + private static InputStream openURL(URL location, UpdatePolicy policy) throws IOException { if (location == null || policy == null) throw new IllegalArgumentException(R("NullParameter")); try { ResourceTracker tracker = new ResourceTracker(false); // no prefetch - tracker.addResource(location, cookieStr, null/*version*/, policy); + tracker.addResource(location, null/*version*/, policy); return tracker.getInputStream(location); } @@ -255,13 +251,6 @@ public class JNLPFile { */ public URL getCodeBase() { return codeBase; - } - - /** - * Returns the cookie string that will be send when resources for this file are requested - */ - public String getCookieStr() { - return cookieStr; } /** diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Thu Jul 09 14:42:44 2009 -0400 @@ -335,10 +335,10 @@ public class Launcher { JNLPFile file = null; try { - file = new JNLPFile(location, null, true, updatePolicy); // strict + file = new JNLPFile(location, true, updatePolicy); // strict } catch (ParseException ex) { - file = new JNLPFile(location, null, false, updatePolicy); + file = new JNLPFile(location, false, updatePolicy); // only here if strict failed but lax did not fail LaunchException lex = @@ -389,7 +389,7 @@ public class Launcher { IconDesc.SPLASH, preferredWidth, preferredHeight); if (splashImageURL != null) { ResourceTracker resourceTracker = new ResourceTracker(true); - resourceTracker.addResource(splashImageURL, "SPLASH", file.getFileVersion(), updatePolicy); + resourceTracker.addResource(splashImageURL, file.getFileVersion(), updatePolicy); splashScreen = new JNLPSplashScreen(resourceTracker, null, null); splashScreen.setSplashImageURL(splashImageURL); if (splashScreen.isSplashScreenValid()) { diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/NetxPanel.java --- a/netx/net/sourceforge/jnlp/NetxPanel.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/NetxPanel.java Thu Jul 09 14:42:44 2009 -0400 @@ -41,7 +41,6 @@ public class NetxPanel extends AppletVie private PluginBridge bridge = null; private boolean exitOnFailure = true; private AppletInstance appInst = null; - private String cookieStr; private boolean appletAlive; public NetxPanel(URL documentURL, Hashtable atts) @@ -50,11 +49,10 @@ public class NetxPanel extends AppletVie } // overloaded constructor, called when initialized via plugin - public NetxPanel(URL documentURL, String cookieStr, Hashtable atts, boolean exitOnFailure) + public NetxPanel(URL documentURL, Hashtable atts, boolean exitOnFailure) { this(documentURL, atts); this.exitOnFailure = exitOnFailure; - this.cookieStr = cookieStr; this.appletAlive = true; } @@ -64,7 +62,6 @@ public class NetxPanel extends AppletVie try { bridge = new PluginBridge(baseURL, - cookieStr, getDocumentBase(), getJarFiles(), getCode(), diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/Parser.java --- a/netx/net/sourceforge/jnlp/Parser.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Parser.java Thu Jul 09 14:42:44 2009 -0400 @@ -332,7 +332,7 @@ class Parser { Version version = getVersion(node, "version", null); URL location = getRequiredURL(node, "href", base); - ExtensionDesc ext = new ExtensionDesc(name, version, location, null); + ExtensionDesc ext = new ExtensionDesc(name, version, location); Node dload[] = getChildNodes(node, "ext-download"); for (int i=0; i < dload.length; i++) { diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/PluginBridge.java --- a/netx/net/sourceforge/jnlp/PluginBridge.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/PluginBridge.java Thu Jul 09 14:42:44 2009 -0400 @@ -43,7 +43,7 @@ public class PluginBridge extends JNLPFi String[] cache_ex_jars = new String[0]; Hashtable atts; - public PluginBridge(URL codebase, String cookieStr, URL documentBase, String jar, String main, + public PluginBridge(URL codebase, URL documentBase, String jar, String main, int width, int height, Hashtable atts) throws Exception { @@ -104,7 +104,6 @@ public class PluginBridge extends JNLPFi else security = null; - this.cookieStr = cookieStr; } public String getTitle() diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/cache/CacheUtil.java --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Jul 09 14:42:44 2009 -0400 @@ -75,9 +75,9 @@ public class CacheUtil { * @param version the version, or null * @return either the location in the cache or the original location */ - public static URL getCachedResource(URL location, String cookieStr, Version version, UpdatePolicy policy) { + public static URL getCachedResource(URL location, Version version, UpdatePolicy policy) { ResourceTracker rt = new ResourceTracker(); - rt.addResource(location, cookieStr, version, policy); + rt.addResource(location, version, policy); try { File f = rt.getCacheFile(location); return f.toURL(); diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Thu Jul 09 14:42:44 2009 -0400 @@ -68,9 +68,6 @@ public class Resource { /** the remote location of the resource */ URL location; - /** cookie string to send with the resource request */ - String cookieStr; - /** the local file downloaded to */ File localFile; @@ -98,20 +95,19 @@ public class Resource { /** * Create a resource. */ - private Resource(URL location, String cookieStr, UpdatePolicy updatePolicy, Version requestVersion) { + private Resource(URL location, UpdatePolicy updatePolicy, Version requestVersion) { this.location = location; this.requestVersion = requestVersion; this.updatePolicy = updatePolicy; - this.cookieStr = cookieStr; } /** * Return a shared Resource object representing the given * location and version. */ - public static Resource getResource(URL location, String cookieStr, UpdatePolicy updatePolicy, Version requestVersion) { + public static Resource getResource(URL location, UpdatePolicy updatePolicy, Version requestVersion) { synchronized (resources) { - Resource resource = new Resource(location, cookieStr, updatePolicy, requestVersion); + Resource resource = new Resource(location, updatePolicy, requestVersion); int index = resources.indexOf(resource); if (index >= 0) { // return existing object @@ -132,13 +128,6 @@ public class Resource { */ public URL getLocation() { return location; - } - - /** - * Returns the cookie string associated with this resource - */ - public String getCookieStr() { - return cookieStr; } /** diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Jul 09 14:42:44 2009 -0400 @@ -148,11 +148,11 @@ public class ResourceTracker { * @param version the resource version * @param updatePolicy whether to check for updates if already in cache */ - public void addResource(URL location, String cookieStr, Version version, UpdatePolicy updatePolicy) { + public void addResource(URL location, Version version, UpdatePolicy updatePolicy) { if (location == null) throw new IllegalArgumentException("location==null"); - Resource resource = Resource.getResource(location, cookieStr, updatePolicy, version); + Resource resource = Resource.getResource(location, updatePolicy, version); boolean downloaded = false; synchronized (resources) { @@ -606,9 +606,6 @@ public class ResourceTracker { try { // create out second in case in does not exist URLConnection con = getVersionedResourceURL(resource).openConnection(); - - if (resource.getCookieStr() != null && resource.getCookieStr().length() > 0) - con.setRequestProperty("Cookie", resource.getCookieStr()); InputStream in = new BufferedInputStream(con.getInputStream()); OutputStream out = CacheUtil.getOutputStream(resource.location, resource.downloadVersion); @@ -657,9 +654,6 @@ public class ResourceTracker { // connect URLConnection connection = getVersionedResourceURL(resource).openConnection(); // this won't change so should be okay unsynchronized - - if (resource.getCookieStr() != null && resource.getCookieStr().length() > 0) - connection.setRequestProperty("Cookie", resource.getCookieStr()); int size = connection.getContentLength(); boolean current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/runtime/Boot.java --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Jul 09 14:42:44 2009 -0400 @@ -276,7 +276,7 @@ public final class Boot implements Privi boolean strict = (null != getOption("-strict")); - JNLPFile file = new JNLPFile(url, null, strict); + JNLPFile file = new JNLPFile(url, strict); // add in extra params from command line addProperties(file); diff -r 559f19ce8d7b -r 544a26bdc6d0 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jul 07 13:44:35 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Jul 09 14:42:44 2009 -0400 @@ -234,11 +234,11 @@ public class JNLPClassLoader extends URL * @param location the file's location * @param policy the update policy to use when downloading resources */ - public static JNLPClassLoader getInstance(URL location, String cookieStr, UpdatePolicy policy) throws IOException, ParseException, LaunchException { + public static JNLPClassLoader getInstance(URL location, UpdatePolicy policy) throws IOException, ParseException, LaunchException { JNLPClassLoader loader = (JNLPClassLoader) urlToLoader.get(location); if (loader == null) - loader = getInstance(new JNLPFile(location, cookieStr, false, policy), policy); + loader = getInstance(new JNLPFile(location, false, policy), policy); return loader; } @@ -256,7 +256,7 @@ public class JNLPClassLoader extends URL //if (ext != null) { for (int i=0; i < ext.length; i++) { try { - JNLPClassLoader loader = getInstance(ext[i].getLocation(), ext[i].getCookieStr(), updatePolicy); + JNLPClassLoader loader = getInstance(ext[i].getLocation(), updatePolicy); loaderList.add(loader); } catch (Exception ex) { @@ -314,7 +314,6 @@ public class JNLPClassLoader extends URL initialJars.add(jars[i]); // regardless of part tracker.addResource(jars[i].getLocation(), - file.getCookieStr(), jars[i].getVersion(), jars[i].isCacheable() ? JNLPRuntime.getDefaultUpdatePolicy() : UpdatePolicy.FORCE ); @@ -780,8 +779,7 @@ public class JNLPClassLoader extends URL available.add(desc); - tracker.addResource(desc.getLocation(), - file.getCookieStr(), + tracker.addResource(desc.getLocation(), desc.getVersion(), JNLPRuntime.getDefaultUpdatePolicy() ); diff -r 559f19ce8d7b -r 544a26bdc6d0 plugin/icedtea/sun/applet/PluginAppletViewer.java --- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Tue Jul 07 13:44:35 2009 -0400 +++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Thu Jul 09 14:42:44 2009 -0400 @@ -84,6 +84,7 @@ import java.io.PrintStream; import java.io.PrintStream; import java.io.Reader; import java.io.StringReader; +import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; From dbhole at redhat.com Tue Aug 4 09:07:37 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:37 +0000 Subject: changeset in /hg/icedtea: Adding new plugin cookie related files. Message-ID: changeset 9af9639e360e in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9af9639e360e description: Adding new plugin cookie related files. diffstat: 2 files changed, 195 insertions(+) plugin/icedtea/sun/applet/PluginCookieInfoRequest.java | 122 ++++++++++++++++ plugin/icedtea/sun/applet/PluginCookieStore.java | 73 +++++++++ diffs (203 lines): diff -r 544a26bdc6d0 -r 9af9639e360e plugin/icedtea/sun/applet/PluginCookieInfoRequest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PluginCookieInfoRequest.java Thu Jul 09 15:28:30 2009 -0400 @@ -0,0 +1,122 @@ +/* PluginCookieInfoRequest -- Object representing a request for cookie information from the browser + Copyright (C) 2009 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package sun.applet; + +import java.net.HttpCookie; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.jndi.toolkit.url.UrlUtil; + +/** + * This class represents a request object for cookie information for a given URI + */ + +public class PluginCookieInfoRequest extends PluginCallRequest { + + List cookieObjects = new ArrayList(); + + public PluginCookieInfoRequest(String message, String returnString) { + super(message, returnString); + } + + public void parseReturn(String cookieInfo) { + + // try to parse the proxy information. If things go wrong, do nothing .. + // this will keep internal = null which forces a direct connection + + PluginDebug.debug ("PluginCookieInfoRequest GOT: " + cookieInfo); + + String encodedURI = cookieInfo.split(" ")[2]; + + // Skip the first 3 components. We are guaranteed 3 components, + // so no index -1 to worry about + cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ')+1); + cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ')+1); + cookieInfo = cookieInfo.substring(cookieInfo.indexOf(' ')+1); + + URI siteURI; + try + { + siteURI = new URI(UrlUtil.decode(encodedURI, "UTF-8")); + } catch (Exception e) + { + e.printStackTrace(); + return; + } + + if (cookieInfo != null && cookieInfo.length() > 0) + { + String[] cookies = cookieInfo.split(";"); + + for (int i = 0; i < cookies.length; i++) + { + ArrayList l = new ArrayList(); + + String cookie = cookies[i]; + cookie = cookie.trim(); + String cookieName = cookie.substring(0, cookie.indexOf("=")); + String cookieValue = cookie.substring(cookie.indexOf("=")+1); + + HttpCookie httpCookieObj = new HttpCookie(cookieName, cookieValue); + httpCookieObj.setPath(siteURI.getPath()); + httpCookieObj.setVersion(0); // force v0 + + PluginDebug.debug("Adding cookie info COOKIEN=" + cookieName + " and COOKIEV=" + cookieValue); + cookieObjects.add(httpCookieObj); + } + } + + setDone(true); + } + + /** + * Returns whether the given message is serviceable by this object + * + * @param message The message to service + * @return boolean indicating if message is serviceable + */ + public boolean serviceable(String message) { + return message.startsWith(returnString); + } + + public List getObject() { + return this.cookieObjects; + } +} diff -r 544a26bdc6d0 -r 9af9639e360e plugin/icedtea/sun/applet/PluginCookieStore.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedtea/sun/applet/PluginCookieStore.java Thu Jul 09 15:28:30 2009 -0400 @@ -0,0 +1,73 @@ +/* PluginCookieStore -- Storage for cookie information + Copyright (C) 2009 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package sun.applet; + +import java.net.HttpCookie; +import java.net.URI; +import java.util.List; + +import sun.net.www.protocol.http.InMemoryCookieStore; + +public class PluginCookieStore extends InMemoryCookieStore +{ + public List get(URI uri) + { + List cookies; + + // Try to fetch it from the plugin, but if something goes + // wrong, fall back. Don't crash! + try + { + cookies = (List) PluginAppletViewer.requestPluginCookieInfo(uri); + + // If cookies is null, something went wrong. Fall back. + if (cookies == null) throw new NullPointerException("Null cookie"); + + } catch (Exception e) + { + PluginDebug.debug("Unable to fetch cookie information from plugin. " + + "Falling back to default."); + e.printStackTrace(); + cookies = super.get(uri); + } + + PluginDebug.debug("Returning cookies " + cookies + " for site: " + uri); + + return cookies; + } +} From omajid at redhat.com Tue Aug 4 09:07:38 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:38 +0000 Subject: changeset in /hg/icedtea: Netx: Set context classloader for all ... Message-ID: changeset b190c887feae in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b190c887feae description: Netx: Set context classloader for all threads in an application 2009-07-09 Omair Majid * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Call setContextClassLoaderForAllThreads. (setContextClassLoaderForAllThreads): New function. diffstat: 2 files changed, 48 insertions(+), 2 deletions(-) ChangeLog | 6 ++++ netx/net/sourceforge/jnlp/Launcher.java | 44 +++++++++++++++++++++++++++++-- diffs (81 lines): diff -r 332a3a4aa5de -r b190c887feae ChangeLog --- a/ChangeLog Thu Jul 09 17:18:02 2009 -0400 +++ b/ChangeLog Thu Jul 09 17:29:13 2009 -0400 @@ -1,3 +1,9 @@ 2009-07-09 Omair Majid + + * netx/net/sourceforge/jnlp/Launcher.java + (launchApplication): Call setContextClassLoaderForAllThreads. + (setContextClassLoaderForAllThreads): New function. + 2009-07-09 Omair Majid * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: diff -r 332a3a4aa5de -r b190c887feae netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Thu Jul 09 17:18:02 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Thu Jul 09 17:29:13 2009 -0400 @@ -23,6 +23,8 @@ import java.io.File; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.lang.management.ManagementFactory; +import java.lang.management.ThreadMXBean; import java.lang.reflect.Method; import java.net.URL; import java.util.LinkedList; @@ -425,8 +427,7 @@ public class Launcher { Method main = mainClass.getDeclaredMethod("main", new Class[] {String[].class} ); String args[] = file.getApplication().getArguments(); - // required to make some apps work right - Thread.currentThread().setContextClassLoader(app.getClassLoader()); + setContextClassLoaderForAllThreads(app.getClassLoader()); if (splashScreen != null) { if (splashScreen.isSplashScreenValid()) { @@ -445,6 +446,45 @@ public class Launcher { catch (Exception ex) { throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LCouldNotLaunchInfo"))); } + } + + /** + * Set the classloader as the context classloader for all threads. This is + * required to make some applications work. For example, an application that + * provides a custom Swing LnF may ask the swing thread to load resources + * from their JNLP, which would only work if the Swing thread knows about + * the JNLPClassLoader. + * + * @param classLoader the classloader to set as the context classloader + */ + private void setContextClassLoaderForAllThreads(ClassLoader classLoader) { + ThreadMXBean threadBean = ManagementFactory.getThreadMXBean(); + ThreadGroup root; + + root = Thread.currentThread().getThreadGroup(); + while (root.getParent() != null) { + root = root.getParent(); + } + + /* be prepared for change in thread size */ + int threadCountGuess = threadBean.getThreadCount(); + Thread[] threads; + do { + threadCountGuess = threadCountGuess * 2; + threads = new Thread[threadCountGuess]; + root.enumerate(threads, true); + } while (threads[threadCountGuess-1] != null); + + + for (Thread thread: threads) { + if (thread != null) { + if (JNLPRuntime.isDebug()) { + System.err.println("Setting " + classLoader + " as the classloader for thread " + thread.getName()); + } + thread.setContextClassLoader(classLoader); + } + } + } /** From omajid at redhat.com Tue Aug 4 09:07:36 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:36 +0000 Subject: changeset in /hg/icedtea: 2009-07-07 Omair Majid changeset 0a41b2f5f086 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=0a41b2f5f086 description: 2009-07-07 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add RNestedJarExtration. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (activateJar): Create parent directories for nested jars. diffstat: 3 files changed, 12 insertions(+) ChangeLog | 7 +++++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 1 + netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 4 ++++ diffs (39 lines): diff -r dd483ae1e6ca -r 0a41b2f5f086 ChangeLog --- a/ChangeLog Wed Jun 24 16:26:08 2009 -0400 +++ b/ChangeLog Tue Jul 07 10:12:31 2009 -0400 @@ -1,3 +1,10 @@ 2009-06-24 Omair Majid + + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add + RNestedJarExtration. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (activateJar): Create parent directories for nested jars. + 2009-06-24 Omair Majid * netx/net/sourceforge/jnlp/security/CertWarningPane.java diff -r dd483ae1e6ca -r 0a41b2f5f086 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 24 16:26:08 2009 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Jul 07 10:12:31 2009 -0400 @@ -111,6 +111,7 @@ RDenyStopped=Stopped applications have n RDenyStopped=Stopped applications have no permissions. RExitNoApp=Can not exit the JVM because the current application cannot be determined. RNoLockDir=Unable to create locks directory ({0}) +RNestedJarExtration=Unable to extract nested jar. RUnexpected=Unexpected {0} at {1} # Boot options, message should be shorter than this ----------------> diff -r dd483ae1e6ca -r 0a41b2f5f086 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Jun 24 16:26:08 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jul 07 10:12:31 2009 -0400 @@ -521,6 +521,10 @@ public class JNLPClassLoader extends URL // with standard classloader methods) String extractedJarLocation = localFile.getParent() + "/" + je.getName(); + File parentDir = new File(extractedJarLocation).getParentFile(); + if (!parentDir.isDirectory() && !parentDir.mkdirs()) { + throw new RuntimeException(R("RNestedJarExtration")); + } FileOutputStream extractedJar = new FileOutputStream(extractedJarLocation); InputStream is = jarFile.getInputStream(je); From ahughes at redhat.com Tue Aug 4 09:07:38 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:07:38 +0000 Subject: changeset in /hg/icedtea: Correct typo. Message-ID: changeset b92099ea3dbc in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b92099ea3dbc description: Correct typo. diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) ChangeLog | 2 +- diffs (11 lines): diff -r 9af9639e360e -r b92099ea3dbc ChangeLog --- a/ChangeLog Thu Jul 09 15:28:30 2009 -0400 +++ b/ChangeLog Tue Aug 04 14:27:16 2009 +0100 @@ -1,6 +1,6 @@ 2009-07-09 Deepak Bhole - * IcedTeaPlugin.cc: Add suppport for cookie info requests from applets. + * IcedTeaPlugin.cc: Add support for cookie info requests from applets. * plugin/icedtea/sun/applet/PluginAppletViewer.java: Rework cookie support to make it dynamic. * plugin/icedtea/sun/applet/PluginMain.java: Wire in custom cookie store From ahughes at redhat.com Tue Aug 4 09:07:39 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:07:39 +0000 Subject: changeset in /hg/icedtea: Deepak's Makefile.am updates. Message-ID: changeset 96a276fcaa9e in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=96a276fcaa9e description: Deepak's Makefile.am updates. 2009-07-10 Deepak Bhole * Makefile.am: Update makefile to pick up plugin C++ files from new location. diffstat: 1 file changed, 21 insertions(+), 4 deletions(-) Makefile.am | 25 +++++++++++++++++++++---- diffs (50 lines): diff -r 5da2e8e775d5 -r 96a276fcaa9e Makefile.am --- a/Makefile.am Fri Jul 10 19:02:10 2009 -0400 +++ b/Makefile.am Tue Aug 04 14:35:37 2009 +0100 @@ -3219,6 +3219,17 @@ if ENABLE_NPPLUGIN # is listed before -l options. See: # http://developer.mozilla.org/en/docs/XPCOM_Glue IcedTeaNPPlugin.o: IcedTeaNPPlugin.cc + +NPPLUGIN_SRC=IcedTeaNPPlugin.cc IcedTeaScriptablePluginObject.cc \ + IcedTeaJavaRequestProcessor.cc IcedTeaPluginRequestProcessor.cc \ + IcedTeaPluginUtils.cc + +NPPLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedTeaScriptablePluginObject.o \ + IcedTeaJavaRequestProcessor.o IcedTeaPluginRequestProcessor.o \ + IcedTeaPluginUtils.o + +IcedTeaNPPlugin_objects: + (cd plugin/icedteanp if [ -e $(abs_top_srcdir)/.hg ] && which $(HG) >/dev/null; then \ revision="-r`(cd $(abs_top_srcdir); $(HG) tip --template '{rev}')`" ; \ fi ; \ @@ -3231,18 +3242,24 @@ IcedTeaNPPlugin.o: IcedTeaNPPlugin.cc $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(MOZILLA_CFLAGS) \ - -fPIC -c -o $@ $< -IcedTeaNPPlugin.so: IcedTeaNPPlugin.o + -fPIC -c $(NPPLUGIN_SRC) + ) + +IcedTeaNPPlugin.so: IcedTeaNPPlugin_objects + (cd plugin/icedteanp $(CXX) $(CXXFLAGS) \ - $< \ + $(NPPLUGIN_OBJECTS) \ $(GLIB_LIBS) \ $(GTK_LIBS) \ $(MOZILLA_LIBS)\ -shared -o $@ + ) clean-IcedTeaNPPlugin: - rm -f IcedTeaNPPlugin.o + (cd plugin/icedteanp + rm -f $(NPPLUGIN_OBJECTS) rm -f IcedTeaNPPlugin.so + ) endif if ENABLE_PLUGIN # IcedTeaPlugin.so. From dbhole at redhat.com Tue Aug 4 09:07:40 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:40 +0000 Subject: changeset in /hg/icedtea: Clean up directory structure of .java ... Message-ID: changeset b9dc9e08ed23 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=b9dc9e08ed23 description: Clean up directory structure of .java files before any significant amount of history gets written. This change does not alter any of the java code, just moves it around to a cleaner location. The only code change is in Makefile.am to adapt to the new location, and another minor change that affects only np plugin build. diffstat: 59 files changed, 7046 insertions(+), 6978 deletions(-) ChangeLog | 68 plugin/icedteanp/java/netscape/javascript/JSException.java | 140 plugin/icedteanp/java/netscape/javascript/JSObject.java | 263 + plugin/icedteanp/java/netscape/javascript/JSProxy.java | 58 plugin/icedteanp/java/netscape/javascript/JSRunnable.java | 72 plugin/icedteanp/java/netscape/javascript/JSUtil.java | 59 plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java | 71 plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java | 76 plugin/icedteanp/java/sun/applet/GetWindowPluginCallRequest.java | 75 plugin/icedteanp/java/sun/applet/JavaConsole.java | 365 + plugin/icedteanp/java/sun/applet/PasswordAuthenticationDialog.java | 241 + plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java | 1307 ++++++ plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 1988 ++++++++++ plugin/icedteanp/java/sun/applet/PluginCallRequest.java | 85 plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java | 62 plugin/icedteanp/java/sun/applet/PluginClassLoader.java | 51 plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java | 122 plugin/icedteanp/java/sun/applet/PluginCookieStore.java | 73 plugin/icedteanp/java/sun/applet/PluginDebug.java | 51 plugin/icedteanp/java/sun/applet/PluginException.java | 53 plugin/icedteanp/java/sun/applet/PluginMain.java | 319 + plugin/icedteanp/java/sun/applet/PluginMessageConsumer.java | 119 plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java | 121 plugin/icedteanp/java/sun/applet/PluginObjectStore.java | 132 plugin/icedteanp/java/sun/applet/PluginProxyInfoRequest.java | 85 plugin/icedteanp/java/sun/applet/PluginProxySelector.java | 195 plugin/icedteanp/java/sun/applet/PluginStreamHandler.java | 479 ++ plugin/icedteanp/java/sun/applet/RequestQueue.java | 77 plugin/icedteanp/java/sun/applet/TestEnv.java | 172 plugin/icedteanp/java/sun/applet/VoidPluginCallRequest.java | 67 plugin/icedteanp/netscape/javascript/JSException.java | 140 plugin/icedteanp/netscape/javascript/JSObject.java | 263 - plugin/icedteanp/netscape/javascript/JSProxy.java | 58 plugin/icedteanp/netscape/javascript/JSRunnable.java | 72 plugin/icedteanp/netscape/javascript/JSUtil.java | 59 plugin/icedteanp/sun/applet/AppletSecurityContextManager.java | 71 plugin/icedteanp/sun/applet/GetMemberPluginCallRequest.java | 76 plugin/icedteanp/sun/applet/GetWindowPluginCallRequest.java | 75 plugin/icedteanp/sun/applet/JavaConsole.java | 365 - plugin/icedteanp/sun/applet/PasswordAuthenticationDialog.java | 241 - plugin/icedteanp/sun/applet/PluginAppletSecurityContext.java | 1307 ------ plugin/icedteanp/sun/applet/PluginAppletViewer.java | 1988 ---------- plugin/icedteanp/sun/applet/PluginCallRequest.java | 85 plugin/icedteanp/sun/applet/PluginCallRequestFactory.java | 62 plugin/icedteanp/sun/applet/PluginClassLoader.java | 51 plugin/icedteanp/sun/applet/PluginCookieInfoRequest.java | 122 plugin/icedteanp/sun/applet/PluginCookieStore.java | 73 plugin/icedteanp/sun/applet/PluginDebug.java | 51 plugin/icedteanp/sun/applet/PluginException.java | 53 plugin/icedteanp/sun/applet/PluginMain.java | 319 - plugin/icedteanp/sun/applet/PluginMessageConsumer.java | 119 plugin/icedteanp/sun/applet/PluginMessageHandlerWorker.java | 121 plugin/icedteanp/sun/applet/PluginObjectStore.java | 132 plugin/icedteanp/sun/applet/PluginProxyInfoRequest.java | 85 plugin/icedteanp/sun/applet/PluginProxySelector.java | 195 plugin/icedteanp/sun/applet/PluginStreamHandler.java | 479 -- plugin/icedteanp/sun/applet/RequestQueue.java | 77 plugin/icedteanp/sun/applet/TestEnv.java | 172 plugin/icedteanp/sun/applet/VoidPluginCallRequest.java | 67 diffs (truncated from 14263 to 500 lines): diff -r bebe7bbde097 -r b9dc9e08ed23 ChangeLog --- a/ChangeLog Mon Jul 13 15:22:34 2009 -0400 +++ b/ChangeLog Tue Jul 14 13:04:20 2009 -0400 @@ -1,3 +1,71 @@ 2009-07-13 Omair Majid + + * Makefile.am: Fix npplugin build. + * plugin/icedteanp/java/netscape/javascript/JSException.java: Moved from + the plugin/icedteanp/netscape/javascript/ hierarchy. + * plugin/icedteanp/java/netscape/javascript/JSObject.java: Same. + * plugin/icedteanp/java/netscape/javascript/JSProxy.java: Same. + * plugin/icedteanp/java/netscape/javascript/JSRunnable.java: Same. + * plugin/icedteanp/java/netscape/javascript/JSUtil.java: Same. + * plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java: + Moved from the plugin/icedteanp/sun/applet hierarchy. + * plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java: Same. + * plugin/icedteanp/java/sun/applet/GetWindowPluginCallRequest.java: Same. + * plugin/icedteanp/java/sun/applet/JavaConsole.java: Same. + * plugin/icedteanp/java/sun/applet/PasswordAuthenticationDialog.java: + Same. + * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java: Same. + * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Same. + * plugin/icedteanp/java/sun/applet/PluginCallRequest.java: Same. + * plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java: Same. + * plugin/icedteanp/java/sun/applet/PluginClassLoader.java: Same. + * plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java: Same. + * plugin/icedteanp/java/sun/applet/PluginCookieStore.java: Same. + * plugin/icedteanp/java/sun/applet/PluginDebug.java: Same. + * plugin/icedteanp/java/sun/applet/PluginException.java: Same. + * plugin/icedteanp/java/sun/applet/PluginMain.java: Same. + * plugin/icedteanp/java/sun/applet/PluginMessageConsumer.java: Same. + * plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java: Same. + * plugin/icedteanp/java/sun/applet/PluginObjectStore.java: Same. + * plugin/icedteanp/java/sun/applet/PluginProxyInfoRequest.java: Same. + * plugin/icedteanp/java/sun/applet/PluginProxySelector.java: Same. + * plugin/icedteanp/java/sun/applet/PluginStreamHandler.java: Same. + * plugin/icedteanp/java/sun/applet/RequestQueue.java: Same. + * plugin/icedteanp/java/sun/applet/TestEnv.java: Same. + * plugin/icedteanp/java/sun/applet/VoidPluginCallRequest.java: Same. + * plugin/icedteanp/netscape/javascript/JSException.java: Moved to + the plugin/icedteanp/java/netscape/javascript/ heirarchy. + * plugin/icedteanp/netscape/javascript/JSObject.java: Same. + * plugin/icedteanp/netscape/javascript/JSProxy.java: Same. + * plugin/icedteanp/netscape/javascript/JSRunnable.java: Same. + * plugin/icedteanp/netscape/javascript/JSUtil.java: Same. + * plugin/icedteanp/sun/applet/AppletSecurityContextManager.java: Moved to + the plugin/icedteanp/java/sun/applet/ heirarchy. + * plugin/icedteanp/sun/applet/GetMemberPluginCallRequest.java: Same. + * plugin/icedteanp/sun/applet/GetWindowPluginCallRequest.java: Same. + * plugin/icedteanp/sun/applet/JavaConsole.java: Same. + * plugin/icedteanp/sun/applet/PasswordAuthenticationDialog.java: Same. + * plugin/icedteanp/sun/applet/PluginAppletSecurityContext.java: Same. + * plugin/icedteanp/sun/applet/PluginAppletViewer.java: Same. + * plugin/icedteanp/sun/applet/PluginCallRequest.java: Same. + * plugin/icedteanp/sun/applet/PluginCallRequestFactory.java: Same. + * plugin/icedteanp/sun/applet/PluginClassLoader.java: Same. + * plugin/icedteanp/sun/applet/PluginCookieInfoRequest.java: Same. + * plugin/icedteanp/sun/applet/PluginCookieStore.java: Same. + * plugin/icedteanp/sun/applet/PluginDebug.java: Same. + * plugin/icedteanp/sun/applet/PluginException.java: Same. + * plugin/icedteanp/sun/applet/PluginMain.java: Same. + * plugin/icedteanp/sun/applet/PluginMessageConsumer.java: Same. + * plugin/icedteanp/sun/applet/PluginMessageHandlerWorker.java: Same. + * plugin/icedteanp/sun/applet/PluginObjectStore.java: Same. + * plugin/icedteanp/sun/applet/PluginProxyInfoRequest.java: Same. + * plugin/icedteanp/sun/applet/PluginProxySelector.java: Same. + * plugin/icedteanp/sun/applet/PluginStreamHandler.java: Same. + * plugin/icedteanp/sun/applet/RequestQueue.java: Same. + * plugin/icedteanp/sun/applet/TestEnv.java: Same. + * plugin/icedteanp/sun/applet/VoidPluginCallRequest.java: Same. + + 2009-07-13 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java diff -r bebe7bbde097 -r b9dc9e08ed23 plugin/icedteanp/java/netscape/javascript/JSException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedteanp/java/netscape/javascript/JSException.java Tue Jul 14 13:04:20 2009 -0400 @@ -0,0 +1,140 @@ +/* -*- Mode: Java; tab-width: 8; c-basic-offset: 4 -*- + * + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package netscape.javascript; + +/** + * JSException is an exception which is thrown when JavaScript code + * returns an error. + */ + +public +class JSException extends RuntimeException { + public static final int EXCEPTION_TYPE_EMPTY = -1; + public static final int EXCEPTION_TYPE_VOID = 0; + public static final int EXCEPTION_TYPE_OBJECT = 1; + public static final int EXCEPTION_TYPE_FUNCTION = 2; + public static final int EXCEPTION_TYPE_STRING = 3; + public static final int EXCEPTION_TYPE_NUMBER = 4; + public static final int EXCEPTION_TYPE_BOOLEAN = 5; + public static final int EXCEPTION_TYPE_ERROR = 6; + + public String filename; + public int lineno; + public String source; + public int tokenIndex; + public int wrappedExceptionType; + public Object wrappedException; + + /** + * Constructs a JSException without a detail message. + * A detail message is a String that describes this particular exception. + * + * @deprecated Not for public use in future versions. + */ + public JSException() { + super(); + filename = "unknown"; + lineno = 0; + source = ""; + tokenIndex = 0; + wrappedExceptionType = EXCEPTION_TYPE_EMPTY; + } + + /** + * Constructs a JSException with a detail message. + * A detail message is a String that describes this particular exception. + * @param s the detail message + * + * @deprecated Not for public use in future versions. + */ + public JSException(String s) { + super(s); + filename = "unknown"; + lineno = 0; + source = ""; + tokenIndex = 0; + wrappedExceptionType = EXCEPTION_TYPE_EMPTY; + } + + /** + * Constructs a JSException with a wrapped JavaScript exception object. + * This constructor needs to be public so that Java users can throw + * exceptions to JS cleanly. + */ + public JSException(int wrappedExceptionType, Object wrappedException) { + super(); + this.wrappedExceptionType = wrappedExceptionType; + this.wrappedException = wrappedException; + } + + /** + * Constructs a JSException with a detail message and all the + * other info that usually comes with a JavaScript error. + * @param s the detail message + * + * @deprecated Not for public use in future versions. + */ + public JSException(String s, String filename, int lineno, + String source, int tokenIndex) { + super(s); + this.filename = filename; + this.lineno = lineno; + this.source = source; + this.tokenIndex = tokenIndex; + wrappedExceptionType = EXCEPTION_TYPE_EMPTY; + } + + /** + * Instance method getWrappedExceptionType returns the int mapping of the + * type of the wrappedException Object. + */ + public int getWrappedExceptionType() { + return wrappedExceptionType; + } + + /** + * Instance method getWrappedException. + */ + public Object getWrappedException() { + return wrappedException; + } + +} + diff -r bebe7bbde097 -r b9dc9e08ed23 plugin/icedteanp/java/netscape/javascript/JSObject.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedteanp/java/netscape/javascript/JSObject.java Tue Jul 14 13:04:20 2009 -0400 @@ -0,0 +1,263 @@ +/* -*- Mode: Java; tab-width: 8; c-basic-offset: 4 -*- + * + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* more doc todo: + * threads + * gc + * + * + */ + +package netscape.javascript; + +import java.applet.Applet; + +import sun.applet.PluginAppletViewer; +import sun.applet.PluginDebug; + + + +/** + * JSObject allows Java to manipulate objects that are + * defined in JavaScript. + * Values passed from Java to JavaScript are converted as + * follows:
    + *
  • JSObject is converted to the original JavaScript object + *
  • Any other Java object is converted to a JavaScript wrapper, + * which can be used to access methods and fields of the java object. + * Converting this wrapper to a string will call the toString method + * on the original object, converting to a number will call the + * doubleValue method if possible and fail otherwise. Converting + * to a boolean will try to call the booleanValue method in the + * same way. + *
  • Java arrays are wrapped with a JavaScript object that understands + * array.length and array[index] + *
  • A Java boolean is converted to a JavaScript boolean + *
  • Java byte, char, short, int, long, float, and double are converted + * to JavaScript numbers + *
+ * Values passed from JavaScript to Java are converted as follows:
    + *
  • objects which are wrappers around java objects are unwrapped + *
  • other objects are wrapped with a JSObject + *
  • strings, numbers and booleans are converted to String, Double, + * and Boolean objects respectively + *
+ * This means that all JavaScript values show up as some kind + * of java.lang.Object in Java. In order to make much use of them, + * you will have to cast them to the appropriate subclass of Object, + * e.g. (String) window.getMember("name"); or + * (JSObject) window.getMember("document");. + */ +public final class JSObject { + /* the internal object data */ + private long internal; + + /** + * initialize + */ + private static void initClass() { + PluginDebug.debug ("JSObject.initClass"); + } + + static { + PluginDebug.debug ("JSObject INITIALIZER"); + } + + /** + * it is illegal to construct a JSObject manually + */ + // FIXME: make private! + public JSObject(int jsobj_addr) { + PluginDebug.debug ("JSObject int CONSTRUCTOR"); + internal = jsobj_addr; + } + + public JSObject(long jsobj_addr) { + PluginDebug.debug ("JSObject long CONSTRUCTOR"); + internal = jsobj_addr; + } + + /** + * Retrieves a named member of a JavaScript object. + * Equivalent to "this.name" in JavaScript. + */ + public Object getMember(String name) + { + PluginDebug.debug ("JSObject.getMember " + name); + + Object o = PluginAppletViewer.getMember(internal, name); + PluginDebug.debug ("JSObject.getMember GOT " + o); + return o; + } + + + /** + * Retrieves an indexed member of a JavaScript object. + * Equivalent to "this[index]" in JavaScript. + */ + // public Object getMember(int index) { return getSlot(index); } + public Object getSlot(int index) + { + PluginDebug.debug ("JSObject.getSlot " + index); + + return PluginAppletViewer.getSlot(internal, index); + } + + + /** + * Sets a named member of a JavaScript object. + * Equivalent to "this.name = value" in JavaScript. + */ + public void setMember(String name, Object value) + { + PluginDebug.debug ("JSObject.setMember " + name + " " + value); + + PluginAppletViewer.setMember(internal, name, value); + } + + /** + * Sets an indexed member of a JavaScript object. + * Equivalent to "this[index] = value" in JavaScript. + */ + // public void setMember(int index, Object value) { + // setSlot(index, value); + // } + public void setSlot(int index, Object value) + { + PluginDebug.debug ("JSObject.setSlot " + index + " " + value); + + PluginAppletViewer.setSlot(internal, index, value); + } + + + // TODO: toString, finalize. + + /** + * Removes a named member of a JavaScript object. + */ + public void removeMember(String name) + { + PluginDebug.debug ("JSObject.removeMember " + name); + + PluginAppletViewer.removeMember(internal, name); + } + + + /** + * Calls a JavaScript method. + * Equivalent to "this.methodName(args[0], args[1], ...)" in JavaScript. + */ + public Object call(String methodName, Object args[]) + { + if (args == null) + args = new Object[0]; + + PluginDebug.debug ("JSObject.call " + methodName); + for (int i = 0; i < args.length; i++) + PluginDebug.debug (" " + args[i]); + PluginDebug.debug(""); + return PluginAppletViewer.call(internal, methodName, args); + } + + + /** + * Evaluates a JavaScript expression. The expression is a string + * of JavaScript source code which will be evaluated in the context + * given by "this". + */ + public Object eval(String s) + { + PluginDebug.debug("JSObject.eval " + s); + return PluginAppletViewer.eval(internal, s); + } + + + /** + * Converts a JSObject to a String. + */ + public String toString() + { + PluginDebug.debug("JSObject.toString"); + return PluginAppletViewer.javascriptToString(internal); + } + + + // should use some sort of identifier rather than String + // is "property" the right word? + // native String[] listProperties(); + + + /** + * get a JSObject for the window containing the given applet + */ + public static JSObject getWindow(Applet applet) + { + PluginDebug.debug("JSObject.getWindow"); + // FIXME: handle long case as well. + long internal = 0; + internal = ((PluginAppletViewer) + applet.getAppletContext()).getWindow(); + PluginDebug.debug ("GOT IT: " + internal); + return new JSObject(internal); + } + + + /** + * Finalization decrements the reference count on the corresponding + * JavaScript object. + */ + protected void finalize() + { + PluginDebug.debug("JSObject.finalize "); + PluginAppletViewer.JavaScriptFinalize(internal); + } + + + /** + * Override java.lang.Object.equals() because identity is not preserved + * with instances of JSObject. + */ + public boolean equals(Object obj) + { + PluginDebug.debug("JSObject.equals " + obj); + + return false; + } + +} diff -r bebe7bbde097 -r b9dc9e08ed23 plugin/icedteanp/java/netscape/javascript/JSProxy.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugin/icedteanp/java/netscape/javascript/JSProxy.java Tue Jul 14 13:04:20 2009 -0400 @@ -0,0 +1,58 @@ +/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * From ahughes at redhat.com Tue Aug 4 09:07:40 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:07:40 +0000 Subject: changeset in /hg/icedtea: Add Deepak's Makefile.am updates. Message-ID: changeset dbbf4ab50f12 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=dbbf4ab50f12 description: Add Deepak's Makefile.am updates. 2009-07-10 Deepak Bhole * Makefile.am: Fix npplugin build. diffstat: 1 file changed, 16 insertions(+), 15 deletions(-) Makefile.am | 31 ++++++++++++++++--------------- diffs (87 lines): diff -r b9dc9e08ed23 -r dbbf4ab50f12 Makefile.am --- a/Makefile.am Tue Jul 14 13:04:20 2009 -0400 +++ b/Makefile.am Tue Aug 04 14:44:12 2009 +0100 @@ -27,6 +27,7 @@ ICEDTEAPLUGIN_TARGET = IcedTeaNPPlugin.s ICEDTEAPLUGIN_TARGET = IcedTeaNPPlugin.so PLUGIN_PATCH = patches/icedtea-liveconnect.patch LIVECONNECT_DIR = -C lib/rt netscape +NPPLUGIN_DIR=$(abs_top_srcdir)/plugin/icedteanp JNLP_ABOUT_TARGET = extra-lib/about.jar else if ENABLE_PLUGIN @@ -100,7 +101,7 @@ if ENABLE_PLUGIN rm -f IcedTeaPlugin.o IcedTeaPlugin.so endif if ENABLE_NPPLUGIN - rm -f IcedTeaNPPlugin.o IcedTeaNPPlugin.so + rm -f $(NPPLUGIN_DIR)/*.o $(NPPLUGIN_DIR)/IcedTeaNPPlugin.so endif if BUILD_CACAO rm -rf cacao @@ -2303,9 +2304,9 @@ stamps/patch.stamp: stamps/patch-fsg.sta mv stamps/patch.stamp.tmp stamps/patch.stamp if ENABLE_NPPLUGIN - cp -a $(abs_top_srcdir)/plugin/icedteanp/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ + cp -a $(abs_top_srcdir)/plugin/icedteanp/java/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ mkdir -p rt - cp -a $(abs_top_srcdir)/plugin/icedteanp/netscape rt/ + cp -a $(abs_top_srcdir)/plugin/icedteanp/java/netscape rt/ else if ENABLE_PLUGIN cp -a $(abs_top_srcdir)/plugin/icedtea/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ @@ -2679,9 +2680,9 @@ stamps/icedtea.stamp: stamps/bootstrap-d mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext mkdir -p $(BUILD_OUTPUT_DIR)/j2re-image/lib/ext if ENABLE_NPPLUGIN - cp -pPRf IcedTeaNPPlugin.so \ + cp -pPRf $(NPPLUGIN_DIR)/IcedTeaNPPlugin.so \ $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) - cp -pPRf IcedTeaNPPlugin.so \ + cp -pPRf $(NPPLUGIN_DIR)/IcedTeaNPPlugin.so \ $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) endif if ENABLE_PLUGIN @@ -3229,7 +3230,7 @@ NPPLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedT IcedTeaPluginUtils.o IcedTeaNPPlugin_objects: - (cd plugin/icedteanp + cd $(NPPLUGIN_DIR); \ if [ -e $(abs_top_srcdir)/.hg ] && which $(HG) >/dev/null; then \ revision="-r`(cd $(abs_top_srcdir); $(HG) tip --template '{rev}')`" ; \ fi ; \ @@ -3242,24 +3243,24 @@ IcedTeaNPPlugin_objects: $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(MOZILLA_CFLAGS) \ - -fPIC -c $(NPPLUGIN_SRC) - ) + -fPIC -c $(NPPLUGIN_SRC); \ + cd ../ IcedTeaNPPlugin.so: IcedTeaNPPlugin_objects - (cd plugin/icedteanp + cd $(NPPLUGIN_DIR); \ $(CXX) $(CXXFLAGS) \ $(NPPLUGIN_OBJECTS) \ $(GLIB_LIBS) \ $(GTK_LIBS) \ $(MOZILLA_LIBS)\ - -shared -o $@ - ) + -shared -o $@ \ + cd ../ clean-IcedTeaNPPlugin: - (cd plugin/icedteanp - rm -f $(NPPLUGIN_OBJECTS) - rm -f IcedTeaNPPlugin.so - ) + cd $(NPPLUGIN_DIR); \ + rm -f *.o; \ + rm -f IcedTeaNPPlugin.so; \ + cd ../ endif if ENABLE_PLUGIN # IcedTeaPlugin.so. From omajid at redhat.com Tue Aug 4 09:07:39 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:39 +0000 Subject: changeset in /hg/icedtea: Netx: Use version based download proto... Message-ID: changeset bebe7bbde097 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=bebe7bbde097 description: Netx: Use version based download protocol for JNLP files too 2009-07-13 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): Delegate to the Version-based constructor. (JNLPFile): New constructor. (JNLPFile): Modified to take an additional version argument used in downloading the JNLP file. (openURL): Take an additional version argument and use when downloading the URL. * netx/net/sourceforge/jnlp/Launcher.java (toFile): Use the new JNLPFile constructor. * netx/net/sourceforge/jnlp/cache/Resource.java (Resource): Rearrange argument order. (getResource): Likewise. Fix parameters to constructor. * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (addResource): Fix arguments to Resource.getResource. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (getInstance): Take additional version argument and use it when creating a JNLPFile. (initializeExtensions): Use the extension version when requesting a JNLPClassLoader. diffstat: 6 files changed, 59 insertions(+), 19 deletions(-) ChangeLog | 22 ++++++++++ netx/net/sourceforge/jnlp/JNLPFile.java | 35 +++++++++++----- netx/net/sourceforge/jnlp/Launcher.java | 4 - netx/net/sourceforge/jnlp/cache/Resource.java | 6 +- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 2 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 9 ++-- diffs (183 lines): diff -r 96a276fcaa9e -r bebe7bbde097 ChangeLog --- a/ChangeLog Tue Aug 04 14:35:37 2009 +0100 +++ b/ChangeLog Mon Jul 13 15:22:34 2009 -0400 @@ -1,3 +1,25 @@ 2009-07-10 Deepak Bhole + + * netx/net/sourceforge/jnlp/JNLPFile.java + (JNLPFile): Delegate to the Version-based constructor. + (JNLPFile): New constructor. + (JNLPFile): Modified to take an additional version argument used in + downloading the JNLP file. + (openURL): Take an additional version argument and use when downloading + the URL. + * netx/net/sourceforge/jnlp/Launcher.java + (toFile): Use the new JNLPFile constructor. + * netx/net/sourceforge/jnlp/cache/Resource.java + (Resource): Rearrange argument order. + (getResource): Likewise. Fix parameters to constructor. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java + (addResource): Fix arguments to Resource.getResource. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (getInstance): Take additional version argument and use it when creating a + JNLPFile. + (initializeExtensions): Use the extension version when requesting a + JNLPClassLoader. + 2009-07-10 Deepak Bhole * Makefile.am: Update makefile to pick up plugin C++ files from new diff -r 96a276fcaa9e -r bebe7bbde097 netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Tue Aug 04 14:35:37 2009 +0100 +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Mon Jul 13 15:22:34 2009 -0400 @@ -138,21 +138,36 @@ public class JNLPFile { * @throws ParseException if the JNLP file was invalid */ public JNLPFile(URL location, boolean strict) throws IOException, ParseException { - this(location, strict, JNLPRuntime.getDefaultUpdatePolicy()); - } - - /** - * Create a JNLPFile from a URL checking for updates using the - * specified policy. + this(location, (Version) null, strict); + } + + /** + * Create a JNLPFile from a URL and a Version checking for updates using + * the default policy. * * @param location the location of the JNLP file + * @param version the version of the JNLP file + * @param strict whether to enforce the spec when + * @throws IOException if an IO exception occurred + * @throws ParseException if the JNLP file was invalid + */ + public JNLPFile(URL location, Version version, boolean strict) throws IOException, ParseException { + this(location, version, strict, JNLPRuntime.getDefaultUpdatePolicy()); + } + + /** + * Create a JNLPFile from a URL and a version, checking for updates + * using the specified policy. + * + * @param location the location of the JNLP file + * @param version the version of the JNLP file * @param strict whether to enforce the spec when * @param policy the update policy * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ - public JNLPFile(URL location, boolean strict, UpdatePolicy policy) throws IOException, ParseException { - Node root = Parser.getRootNode(openURL(location, policy)); + public JNLPFile(URL location, Version version, boolean strict, UpdatePolicy policy) throws IOException, ParseException { + Node root = Parser.getRootNode(openURL(location, version, policy)); parse(root, strict, location); this.fileLocation = location; @@ -186,13 +201,13 @@ public class JNLPFile { * Open the jnlp file URL from the cache if there, otherwise * download to the cache. Called from constructor. */ - private static InputStream openURL(URL location, UpdatePolicy policy) throws IOException { + private static InputStream openURL(URL location, Version version, UpdatePolicy policy) throws IOException { if (location == null || policy == null) throw new IllegalArgumentException(R("NullParameter")); try { ResourceTracker tracker = new ResourceTracker(false); // no prefetch - tracker.addResource(location, null/*version*/, policy); + tracker.addResource(location, version , policy); return tracker.getInputStream(location); } diff -r 96a276fcaa9e -r bebe7bbde097 netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Tue Aug 04 14:35:37 2009 +0100 +++ b/netx/net/sourceforge/jnlp/Launcher.java Mon Jul 13 15:22:34 2009 -0400 @@ -337,10 +337,10 @@ public class Launcher { JNLPFile file = null; try { - file = new JNLPFile(location, true, updatePolicy); // strict + file = new JNLPFile(location, (Version) null, true, updatePolicy); // strict } catch (ParseException ex) { - file = new JNLPFile(location, false, updatePolicy); + file = new JNLPFile(location, (Version) null, false, updatePolicy); // only here if strict failed but lax did not fail LaunchException lex = diff -r 96a276fcaa9e -r bebe7bbde097 netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Tue Aug 04 14:35:37 2009 +0100 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Mon Jul 13 15:22:34 2009 -0400 @@ -95,7 +95,7 @@ public class Resource { /** * Create a resource. */ - private Resource(URL location, UpdatePolicy updatePolicy, Version requestVersion) { + private Resource(URL location, Version requestVersion, UpdatePolicy updatePolicy) { this.location = location; this.requestVersion = requestVersion; this.updatePolicy = updatePolicy; @@ -105,9 +105,9 @@ public class Resource { * Return a shared Resource object representing the given * location and version. */ - public static Resource getResource(URL location, UpdatePolicy updatePolicy, Version requestVersion) { + public static Resource getResource(URL location, Version requestVersion, UpdatePolicy updatePolicy) { synchronized (resources) { - Resource resource = new Resource(location, updatePolicy, requestVersion); + Resource resource = new Resource(location, requestVersion, updatePolicy); int index = resources.indexOf(resource); if (index >= 0) { // return existing object diff -r 96a276fcaa9e -r bebe7bbde097 netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Aug 04 14:35:37 2009 +0100 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Mon Jul 13 15:22:34 2009 -0400 @@ -168,7 +168,7 @@ public class ResourceTracker { if (location == null) throw new IllegalArgumentException("location==null"); - Resource resource = Resource.getResource(location, updatePolicy, version); + Resource resource = Resource.getResource(location, version, updatePolicy); boolean downloaded = false; synchronized (resources) { diff -r 96a276fcaa9e -r bebe7bbde097 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Aug 04 14:35:37 2009 +0100 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Jul 13 15:22:34 2009 -0400 @@ -51,6 +51,7 @@ import net.sourceforge.jnlp.PluginBridge import net.sourceforge.jnlp.PluginBridge; import net.sourceforge.jnlp.ResourcesDesc; import net.sourceforge.jnlp.SecurityDesc; +import net.sourceforge.jnlp.Version; import net.sourceforge.jnlp.cache.CacheUtil; import net.sourceforge.jnlp.cache.ResourceTracker; import net.sourceforge.jnlp.cache.UpdatePolicy; @@ -232,13 +233,15 @@ public class JNLPClassLoader extends URL * location. * * @param location the file's location + * @param version the file's version * @param policy the update policy to use when downloading resources */ - public static JNLPClassLoader getInstance(URL location, UpdatePolicy policy) throws IOException, ParseException, LaunchException { + public static JNLPClassLoader getInstance(URL location, Version version, UpdatePolicy policy) + throws IOException, ParseException, LaunchException { JNLPClassLoader loader = (JNLPClassLoader) urlToLoader.get(location); if (loader == null) - loader = getInstance(new JNLPFile(location, false, policy), policy); + loader = getInstance(new JNLPFile(location, version, false, policy), policy); return loader; } @@ -256,7 +259,7 @@ public class JNLPClassLoader extends URL //if (ext != null) { for (int i=0; i < ext.length; i++) { try { - JNLPClassLoader loader = getInstance(ext[i].getLocation(), updatePolicy); + JNLPClassLoader loader = getInstance(ext[i].getLocation(), ext[i].getVersion(), updatePolicy); loaderList.add(loader); } catch (Exception ex) { From dbhole at redhat.com Tue Aug 4 09:07:41 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:41 +0000 Subject: changeset in /hg/icedtea: Fix date in ChangeLog entry from previ... Message-ID: changeset 358aefef4fb5 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=358aefef4fb5 description: Fix date in ChangeLog entry from previous commit. Bad me for copying+pasting :/ diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) ChangeLog | 2 +- diffs (9 lines): diff -r dbbf4ab50f12 -r 358aefef4fb5 ChangeLog --- a/ChangeLog Tue Aug 04 14:44:12 2009 +0100 +++ b/ChangeLog Tue Jul 14 13:12:50 2009 -0400 @@ -1,4 +1,4 @@ 2009-07-10 Deepak Bhole +2009-07-14 Deepak Bhole * Makefile.am: Fix npplugin build. * plugin/icedteanp/java/netscape/javascript/JSException.java: Moved from From dbhole at redhat.com Tue Aug 4 09:07:41 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 04 Aug 2009 16:07:41 +0000 Subject: changeset in /hg/icedtea: - Added support for FindClass, GetClas... Message-ID: changeset e808c63fb3a3 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=e808c63fb3a3 description: - Added support for FindClass, GetClassName, GetMethodID, GetToStringValue, NewObject and NewStringUTF. - Split the request wait code in Java processor into a generic function. - Centralized all debug output calls. - ICEDTEAPLUGIN_DEBUG flag now supported. - Dynamic cookie fetching support ported over from current plugin. - Added support for modifying JS objects via SetMember calls. - Message processing model made more robust by using dedicated processing threads, rather than dynamically initialized threads. With this commit, http://www.apl.jhu.edu/~hall/CWP-Sources/CWP-Examples/Chapter19/Everest.html now works. diffstat: 12 files changed, 1577 insertions(+), 552 deletions(-) ChangeLog | 23 plugin/icedteanp/IcedTeaJavaRequestProcessor.cc | 258 ++ plugin/icedteanp/IcedTeaJavaRequestProcessor.h | 34 plugin/icedteanp/IcedTeaNPPlugin.cc | 371 ++-- plugin/icedteanp/IcedTeaNPPlugin.h | 15 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 866 ++++++---- plugin/icedteanp/IcedTeaPluginRequestProcessor.h | 47 plugin/icedteanp/IcedTeaPluginUtils.cc | 145 + plugin/icedteanp/IcedTeaPluginUtils.h | 15 plugin/icedteanp/IcedTeaRunnable.cc | 74 plugin/icedteanp/IcedTeaRunnable.h | 102 + plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java | 179 +- diffs (truncated from 3025 to 500 lines): diff -r 358aefef4fb5 -r e808c63fb3a3 ChangeLog --- a/ChangeLog Tue Jul 14 13:12:50 2009 -0400 +++ b/ChangeLog Thu Jul 23 11:39:18 2009 -0400 @@ -1,3 +1,26 @@ 2009-07-14 Deepak Bhole + + * plugin/icedteanp/IcedTeaJavaRequestProcessor.c: Added support for + FindClass, GetClassName, GetMethodID, GetToStringValue, NewObject and + NewStringUTF. Split the request wait code into a generic function. + * plugin/icedteanp/IcedTeaNPPlugin.cc: Centralize debug output calls. Obey + the ICEDTEAPLUGIN_DEBUG flag. Support dynamic cookie fetching. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.c: Update multi-threaded + processing model. Support SetMember. Set up a dedicated message queue + processor (arbitrarily scalable). + * plugin/icedteanp/IcedTeaPluginRequestProcessor.h: Add function and + variable declerations as needed by the .cc file. + * plugin/icedteanp/IcedTeaPluginUtils.cc: Use only long and long long for + memory address translation. Add additional utility methods. + * plugin/icedteanp/IcedTeaPluginUtils.h: Update as needed by the .cc file. + * plugin/icedteanp/IcedTeaRunnable.h: New file. Represents a dispatchable + event, extends nsIRunnable. + * plugin/icedteanp/IcedTeaRunnable.h: New file. Header for + IcedTeaRunnable.cc. + * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java: Fix + signature handling to remove the need for return type. Add support for + GetToStringValue and GetClassName. + 2009-07-14 Deepak Bhole * Makefile.am: Fix npplugin build. diff -r 358aefef4fb5 -r e808c63fb3a3 plugin/icedteanp/IcedTeaJavaRequestProcessor.cc --- a/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc Tue Jul 14 13:12:50 2009 -0400 +++ b/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc Thu Jul 23 11:39:18 2009 -0400 @@ -67,7 +67,8 @@ JavaRequestProcessor::newMessageOnBus(co // Gather the results // GetStringUTFChars - if (message_parts->at(4) == "GetStringUTFChars") + if (message_parts->at(4) == "GetStringUTFChars" || + message_parts->at(4) == "GetToStringValue") { // first item is length, and it is radix 10 int length = strtol(message_parts->at(5).c_str(), NULL, 10); @@ -81,6 +82,31 @@ JavaRequestProcessor::newMessageOnBus(co int length = strtol(message_parts->at(5).c_str(), NULL, 10); IcedTeaPluginUtilities::getUTF16LEString(length, 6 /* start at */, message_parts, result->return_wstring); + result_ready = true; + } else if (message_parts->at(4) == "FindClass") + { + result->return_identifier = atoi(message_parts->at(5).c_str()); + result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access + result_ready = true; + } else if (message_parts->at(4) == "GetClassName") + { + result->return_identifier = atoi(message_parts->at(5).c_str()); + result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access + result_ready = true; + } else if (message_parts->at(4) == "GetMethodID") + { + result->return_identifier = atoi(message_parts->at(5).c_str()); + result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access + result_ready = true; + } else if (message_parts->at(4) == "NewObject") + { + result->return_identifier = atoi(message_parts->at(5).c_str()); + result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access + result_ready = true; + } else if (message_parts->at(4) == "NewStringUTF") + { + result->return_identifier = atoi(message_parts->at(5).c_str()); + result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access result_ready = true; } @@ -119,6 +145,8 @@ JavaRequestProcessor::JavaRequestProcess JavaRequestProcessor::~JavaRequestProcessor() { + PLUGIN_DEBUG_0ARG("JavaRequestProcessor::~JavaRequestProcessor\n"); + if (result) { if (result->error_msg) @@ -134,32 +162,12 @@ JavaRequestProcessor::~JavaRequestProces } } -/** - * Given a string id, fetches the actual string from Java side - * - * @param request_data The JavaRequest struct containing request relevant information - * @return A JavaResultData struct containing the result of the request - */ - -JavaResultData* -JavaRequestProcessor::getString(JavaRequest* request_data) -{ - std::string string_id; - std::string* message; - - this->instance = 0; // context is always 0 (needed for java-side backwards compat.) - this->reference = IcedTeaPluginUtilities::getReference(); - - string_id = request_data->data->at(0); - - message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); - - message->append(" GetStringUTFChars "); // get it in UTF8 - message->append(string_id); - +void +JavaRequestProcessor::postAndWaitForResponse(std::string* message) +{ struct timespec t; clock_gettime(CLOCK_REALTIME, &t); - t.tv_sec += 60; // 1 minute timeout + t.tv_sec += REQUESTTIMEOUT; // 1 minute timeout result_ready = false; java_to_plugin_bus->subscribe(this); @@ -174,7 +182,7 @@ JavaRequestProcessor::getString(JavaRequ bool timedout = false; if (!result_ready && (curr_t.tv_sec < t.tv_sec)) - sleep(1); + usleep(2000); else break; @@ -187,9 +195,195 @@ JavaRequestProcessor::getString(JavaRequ } java_to_plugin_bus->unSubscribe(this); - IcedTeaPluginUtilities::releaseReference(); - - delete message; - - return result; -} +} + +/** + * Given an object id, fetches the toString() value from Java + * + * @param object_id The ID of the object + * @return A JavaResultData struct containing the result of the request + */ + +JavaResultData* +JavaRequestProcessor::getToStringValue(std::string object_id) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" GetToStringValue "); // get it in UTF8 + message->append(object_id); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete message; + + return result; +} + +/** + * Given a string id, fetches the actual string from Java side + * + * @param string_id The ID of the string + * @return A JavaResultData struct containing the result of the request + */ + +JavaResultData* +JavaRequestProcessor::getString(std::string string_id) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" GetStringUTFChars "); // get it in UTF8 + message->append(string_id); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::findClass(std::string name) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" FindClass "); + message->append(name); + + postAndWaitForResponse(message); + + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getClassName(std::string ID) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" GetClassName "); + message->append(ID); + + postAndWaitForResponse(message); + + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getMethodID(std::string objectID, NPIdentifier methodName, + std::vector args) +{ + JavaRequestProcessor* java_request; + std::string* message; + std::string* signature; + + signature = new std::string(); + *signature += "("; + + // FIXME: Need to determine how to extract array types and complex java objects + for (int i=0; i < args.size(); i++) + { + *signature += args[i]; + } + + *signature += ")"; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + *message += " GetMethodID "; + *message += objectID; + *message += " "; + *message += browser_functions.utf8fromidentifier(methodName); + *message += " "; + *message += *signature; + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete signature; + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::newObject(std::string objectID, std::string methodID, + std::vector args) +{ + JavaRequestProcessor* java_request; + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + *message += " NewObject "; + *message += objectID; + *message += " "; + *message += methodID; + *message += " "; + + for (int i=0; i < args.size(); i++) + { + *message += args[i]; + *message += " "; + } + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::newString(std::string str) +{ + JavaRequestProcessor* java_request; + std::string* utf_string = new std::string(); + std::string* message; + + IcedTeaPluginUtilities::convertStringToUTF8(&str, utf_string); + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + message->append(" NewStringUTF "); + message->append(*utf_string); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete utf_string; + delete message; + + return result; +} diff -r 358aefef4fb5 -r e808c63fb3a3 plugin/icedteanp/IcedTeaJavaRequestProcessor.h --- a/plugin/icedteanp/IcedTeaJavaRequestProcessor.h Tue Jul 14 13:12:50 2009 -0400 +++ b/plugin/icedteanp/IcedTeaJavaRequestProcessor.h Thu Jul 23 11:39:18 2009 -0400 @@ -45,6 +45,8 @@ exception statement from your version. * #include "IcedTeaNPPlugin.h" #include "IcedTeaPluginUtils.h" + +#define REQUESTTIMEOUT 60 /* * This struct holds data specific to a Java operation requested by the plugin @@ -97,11 +99,41 @@ class JavaRequestProcessor : BusSubscrib bool result_ready; JavaResultData* result; + /* Post message on bus and wait */ + void postAndWaitForResponse(std::string* message); + public: JavaRequestProcessor(); ~JavaRequestProcessor(); virtual bool newMessageOnBus(const char* message); - JavaResultData* getString(JavaRequest* request_data); + + /* Returns the toString() value, given an object identifier */ + JavaResultData* getToStringValue(std::string object_id); + + /* Returns the string, given the identifier */ + JavaResultData* getString(std::string string_id); + + /* Returns the method ID from Java side */ + JavaResultData* getMethodID1(NPObject* obj, NPIdentifier methodName, + std::vector args); + + /* Returns the method id */ + JavaResultData* getMethodID(std::string objectID, NPIdentifier methodName, + std::vector args); + + /* Creates a new object */ + JavaResultData* newObject(std::string objectID, std::string methodID, + std::vector args); + + /* Returns the class ID */ + JavaResultData* findClass(std::string name); + + /* Returns the type class name */ + JavaResultData* getClassName(std::string ID); + + /* Creates a new string in the Java store */ + JavaResultData* newString(std::string str); + }; #endif /* ICEDTEAJAVAREQUESTPROCESSOR_H_ */ diff -r 358aefef4fb5 -r e808c63fb3a3 plugin/icedteanp/IcedTeaNPPlugin.cc --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Jul 14 13:12:50 2009 -0400 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Jul 23 11:39:18 2009 -0400 @@ -70,14 +70,6 @@ exception statement from your version. * // Liveconnect extension #include "IcedTeaScriptablePluginObject.h" #include "IcedTeaNPPlugin.h" - -// Debugging macros. -#define PLUGIN_DEBUG(message) \ - g_print ("GCJ PLUGIN: thread %p: %s\n", g_thread_self (), message) - -#define PLUGIN_DEBUG_TWO(first, second) \ - g_print ("GCJ PLUGIN: thread %p: %s %s\n", g_thread_self (), \ - first, second) // Error reporting macros. #define PLUGIN_ERROR(message) \ @@ -180,7 +172,7 @@ NPNetscapeFuncs browser_functions; // Various message buses carrying information to/from Java, and internally MessageBus* plugin_to_java_bus = new MessageBus(); MessageBus* java_to_plugin_bus = new MessageBus(); -MessageBus* internal_bus = new MessageBus(); +//MessageBus* internal_bus = new MessageBus(); // Processor for plugin requests PluginRequestProcessor* plugin_req_proc = new PluginRequestProcessor(); @@ -265,6 +257,8 @@ static GPid appletviewer_pid = -1; static GPid appletviewer_pid = -1; static guint appletviewer_watch_id = -1; +int plugin_debug = getenv ("ICEDTEAPLUGIN_DEBUG") != NULL; + // Functions prefixed by GCJ_ are instance functions. They are called // by the browser and operate on instances of GCJPluginData. // Functions prefixed by plugin_ are static helper functions. @@ -289,7 +283,22 @@ GCJ_New (NPMIMEType pluginType, NPP inst int16 argc, char* argn[], char* argv[], NPSavedData* saved) { - PLUGIN_DEBUG ("GCJ_New"); + PLUGIN_DEBUG_0ARG("GCJ_New\n"); + + static NPObject *window_ptr; + NPIdentifier identifier; + NPVariant member_ptr; + browser_functions.getvalue(instance, NPNVWindowNPObject, &window_ptr); + identifier = browser_functions.getstringidentifier("document"); + printf("Looking for %p %p %p (%s)\n", instance, window_ptr, identifier, "document"); + if (!browser_functions.hasproperty(instance, window_ptr, identifier)) + { + printf("%s not found!\n", "document"); + } + browser_functions.getproperty(instance, window_ptr, identifier, &member_ptr); + + PLUGIN_DEBUG_1ARG("Got variant %p\n", &member_ptr); + NPError np_error = NPERR_NO_ERROR; GCJPluginData* data = NULL; @@ -389,9 +398,6 @@ GCJ_New (NPMIMEType pluginType, NPP inst data->scriptable_plugin_object = npPluginObj; instance->pdata = data; - - java_to_plugin_bus->subscribe(plugin_req_proc); - plugin_to_java_bus->subscribe(java_req_proc); goto cleanup_done; @@ -428,7 +434,7 @@ GCJ_New (NPMIMEType pluginType, NPP inst g_hash_table_insert(id_to_instance_map, GINT_TO_POINTER(instance_counter), instance); instance_counter++; - PLUGIN_DEBUG ("GCJ_New return"); + PLUGIN_DEBUG_0ARG ("GCJ_New return\n"); return np_error; } @@ -475,14 +481,14 @@ void start_jvm_if_needed() // clean up any older pip unlink (in_pipe_name); - PLUGIN_DEBUG_TWO ("GCJ_New: creating input fifo:", in_pipe_name); + PLUGIN_DEBUG_1ARG ("GCJ_New: creating input fifo: %s", in_pipe_name); if (mkfifo (in_pipe_name, 0700) == -1 && errno != EEXIST) { PLUGIN_ERROR_TWO ("Failed to create input pipe", strerror (errno)); np_error = NPERR_GENERIC_ERROR; goto cleanup_in_pipe_name; } - PLUGIN_DEBUG_TWO ("GCJ_New: created input fifo:", in_pipe_name); + PLUGIN_DEBUG_1ARG ("GCJ_New: created input fifo: %s\n", in_pipe_name); // Create plugin-to-appletviewer pipe which we refer to as the // output pipe. @@ -501,14 +507,14 @@ void start_jvm_if_needed() // clean up any older pip unlink (out_pipe_name); - PLUGIN_DEBUG_TWO ("GCJ_New: creating output fifo:", out_pipe_name); + PLUGIN_DEBUG_1ARG ("GCJ_New: creating output fifo: %s\n", out_pipe_name); if (mkfifo (out_pipe_name, 0700) == -1 && errno != EEXIST) { PLUGIN_ERROR_TWO ("Failed to create output pipe", strerror (errno)); np_error = NPERR_GENERIC_ERROR; goto cleanup_out_pipe_name; } - PLUGIN_DEBUG_TWO ("GCJ_New: created output fifo:", out_pipe_name); + PLUGIN_DEBUG_1ARG ("GCJ_New: created output fifo: %s\n", out_pipe_name); // Start a separate appletviewer process for each applet, even if // there are multiple applets in the same page. We may need to From omajid at redhat.com Tue Aug 4 09:07:41 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:41 +0000 Subject: changeset in /hg/icedtea: Netx: prompt the user fewer times for ... Message-ID: changeset 324662e5e611 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=324662e5e611 description: Netx: prompt the user fewer times for https certificate issues diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java | 2 +- diffs (24 lines): diff -r e808c63fb3a3 -r 324662e5e611 ChangeLog --- a/ChangeLog Thu Jul 23 11:39:18 2009 -0400 +++ b/ChangeLog Wed Jul 29 10:48:43 2009 -0400 @@ -1,3 +1,8 @@ 2009-07-23 Deepak Bhole + + * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java + (checkServerTrusted): Synchronize the function. + 2009-07-23 Deepak Bhole * plugin/icedteanp/IcedTeaJavaRequestProcessor.c: Added support for diff -r e808c63fb3a3 -r 324662e5e611 netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Thu Jul 23 11:39:18 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Wed Jul 29 10:48:43 2009 -0400 @@ -143,7 +143,7 @@ public class VariableX509TrustManager im * @param authType The auth type algorithm * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission */ - public void checkServerTrusted(X509Certificate[] chain, String authType, boolean checkOnly) throws CertificateException { + public synchronized void checkServerTrusted(X509Certificate[] chain, String authType, boolean checkOnly) throws CertificateException { try { checkAllManagers(chain, authType); } catch (CertificateException ce) { From omajid at redhat.com Tue Aug 4 09:07:42 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:42 +0000 Subject: changeset in /hg/icedtea: Netx: add support for desktop shortcuts Message-ID: changeset 03e2ef9b5c6b in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=03e2ef9b5c6b description: Netx: add support for desktop shortcuts 2009-07-29 Omair Majid * netx/net/sourceforge/jnlp/IconDesc.java: Add new icon kind SHORTCUT. * netx/net/sourceforge/jnlp/Launcher.java: Move StreamEater class to ... * netx/net/sourceforge/jnlp/StreamEater.java: New file. * netx/net/sourceforge/jnlp/resources/Messages.properties: Add SDesktopShortcut. * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java (initialize): Call addMenuAndDesktopEntries. (addMenuAndDesktopEntries): New function. * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Add CREATE_DESKTOP_SHORTCUT to AccessType. * netx/net/sourceforge/jnlp/security/AccessWarningPane.java (installComponents): Add a case for CREATE_DESKTOP_SHORTCUT * netx/net/sourceforge/jnlp/services/ServiceUtil.java Remove duplicate enum AccessType. (checkAccess): New function. (checkAccess): Add a new argument app. * netx/net/sourceforge/jnlp/services/SingleInstanceLock.java (getLockFileName): Call FileUtils.sanitizeFileName to sanitize the filename. * netx/net/sourceforge/jnlp/util/FileUtils.java: New file. * netx/net/sourceforge/jnlp/util/XDesktopEntry.java: New file. diffstat: 12 files changed, 386 insertions(+), 45 deletions(-) ChangeLog | 24 + netx/net/sourceforge/jnlp/IconDesc.java | 3 netx/net/sourceforge/jnlp/Launcher.java | 26 - netx/net/sourceforge/jnlp/StreamEater.java | 45 ++ netx/net/sourceforge/jnlp/resources/Messages.properties | 1 netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 28 + netx/net/sourceforge/jnlp/security/AccessWarningPane.java | 3 netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java | 1 netx/net/sourceforge/jnlp/services/ServiceUtil.java | 29 + netx/net/sourceforge/jnlp/services/SingleInstanceLock.java | 13 netx/net/sourceforge/jnlp/util/FileUtils.java | 48 ++ netx/net/sourceforge/jnlp/util/XDesktopEntry.java | 210 ++++++++++ diffs (truncated from 553 to 500 lines): diff -r 324662e5e611 -r 03e2ef9b5c6b ChangeLog --- a/ChangeLog Wed Jul 29 10:48:43 2009 -0400 +++ b/ChangeLog Wed Jul 29 10:57:38 2009 -0400 @@ -1,3 +1,27 @@ 2009-07-29 Omair Majid + + * netx/net/sourceforge/jnlp/IconDesc.java: Add new icon kind SHORTCUT. + * netx/net/sourceforge/jnlp/Launcher.java: Move StreamEater class to ... + * netx/net/sourceforge/jnlp/StreamEater.java: New file. + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add + SDesktopShortcut. + * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java + (initialize): Call addMenuAndDesktopEntries. + (addMenuAndDesktopEntries): New function. + * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Add + CREATE_DESKTOP_SHORTCUT to AccessType. + * netx/net/sourceforge/jnlp/security/AccessWarningPane.java + (installComponents): Add a case for CREATE_DESKTOP_SHORTCUT + * netx/net/sourceforge/jnlp/services/ServiceUtil.java + Remove duplicate enum AccessType. + (checkAccess): New function. + (checkAccess): Add a new argument app. + * netx/net/sourceforge/jnlp/services/SingleInstanceLock.java + (getLockFileName): Call FileUtils.sanitizeFileName to sanitize the + filename. + * netx/net/sourceforge/jnlp/util/FileUtils.java: New file. + * netx/net/sourceforge/jnlp/util/XDesktopEntry.java: New file. + 2009-07-29 Omair Majid * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/IconDesc.java --- a/netx/net/sourceforge/jnlp/IconDesc.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/IconDesc.java Wed Jul 29 10:57:38 2009 -0400 @@ -43,6 +43,9 @@ public class IconDesc { /** splash icon */ public static final Object SPLASH = "splash"; + + /** destop shortcut icon */ + public static final Object SHORTCUT = "shortcut"; /** the location of the icon */ diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Jul 29 10:57:38 2009 -0400 @@ -770,32 +770,6 @@ public class Launcher { } }; - /** - * This class reads the output from a launched process and - * writes it to stdout. - */ - private static class StreamEater extends Thread { - private InputStream stream; - - StreamEater(InputStream stream) { - this.stream = new BufferedInputStream(stream); - } - - public void run() { - try { - while (true) { - int c = stream.read(); - if (c == -1) - break; - - System.out.write(c); - } - } - catch (IOException ex) { - } - } - }; - } diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/StreamEater.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/StreamEater.java Wed Jul 29 10:57:38 2009 -0400 @@ -0,0 +1,45 @@ +// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// +// 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.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; + +/** + * This class reads the output from a launched process and writes it to stdout. + */ +public class StreamEater extends Thread { + private InputStream stream; + + public StreamEater(InputStream stream) { + this.stream = new BufferedInputStream(stream); + } + + public void run() { + try { + while (true) { + int c = stream.read(); + if (c == -1) + break; + + System.out.write(c); + } + } catch (IOException ex) { + } + } +} diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jul 29 10:57:38 2009 -0400 @@ -147,6 +147,7 @@ CChooseCacheDir=Cache directory # Security SFileReadAccess=The application has requested read access to a file on the machine. Do you want to allow this action? SFileWriteAccess=The application has requested write access to a file on the machine. Do you want to allow this action? +SDesktopShortcut=The application has requested permission to create a desktop launcher. Do you want to allow this action? SSigUnverified=The application's digital signature cannot be verified. Do you want to run the application? SSigVerified=The application's digital signature has been verified. Do you want to run the application? SSignatureError=The application's digital signature has an error. Do you want to run the application? diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java --- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Wed Jul 29 10:57:38 2009 -0400 @@ -25,6 +25,8 @@ import javax.swing.event.EventListenerLi import net.sourceforge.jnlp.*; import net.sourceforge.jnlp.event.*; +import net.sourceforge.jnlp.security.SecurityWarningDialog.AccessType; +import net.sourceforge.jnlp.services.ServiceUtil; import net.sourceforge.jnlp.util.*; /** @@ -107,6 +109,32 @@ public class ApplicationInstance { */ public void initialize() { installEnvironment(); + addMenuAndDesktopEntries(); + } + + /** + * Creates menu and desktop entries if required by the jnlp file + */ + + private void addMenuAndDesktopEntries() { + XDesktopEntry entry = new XDesktopEntry(file); + + if (file.getInformation().getShortcut().onDesktop()) { + if (ServiceUtil.checkAccess(this, AccessType.CREATE_DESTKOP_SHORTCUT)) { + entry.createDesktopShortcut(); + } + } + + if (file.getInformation().getShortcut().getMenu() != null) { + /* + * Sun's WebStart implementation doesnt seem to do anything under GNOME + */ + if (JNLPRuntime.isDebug()) { + System.err.println("ApplicationInstance.addMenuAndDesktopEntries():" + + " Adding menu entries NOT IMPLEMENTED"); + } + } + } /** diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/security/AccessWarningPane.java --- a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java Wed Jul 29 10:57:38 2009 -0400 @@ -121,6 +121,9 @@ public class AccessWarningPane extends S case WRITE_FILE: topLabelText = R("SFileWriteAccess"); break; + case CREATE_DESTKOP_SHORTCUT: + topLabelText = R("SDesktopShortcut"); + break; case CLIPBOARD_READ: topLabelText = R("SClipboardReadAccess"); break; diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java --- a/netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java Wed Jul 29 10:57:38 2009 -0400 @@ -70,6 +70,7 @@ public class SecurityWarningDialog exten public static enum AccessType { READ_FILE, WRITE_FILE, + CREATE_DESTKOP_SHORTCUT, CLIPBOARD_READ, CLIPBOARD_WRITE, PRINTER, diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/services/ServiceUtil.java --- a/netx/net/sourceforge/jnlp/services/ServiceUtil.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/services/ServiceUtil.java Wed Jul 29 10:57:38 2009 -0400 @@ -57,13 +57,6 @@ public class ServiceUtil { } /** - * Types of system access that may need permissions. - */ - public static enum AccessType { - READ_FILE, WRITE_FILE, CLIPBOARD_READ, CLIPBOARD_WRITE, PRINTER - } - - /** * Returns the BasicService reference, or null if the service is * unavailable. */ @@ -227,9 +220,29 @@ public class ServiceUtil { * @return true if the access was granted, false otherwise. */ public static boolean checkAccess(SecurityWarningDialog.AccessType type, + Object... extras) { + return checkAccess(null, type, extras); + } + + /** + * Returns whether the app requesting a service is signed. If the app is + * unsigned, the user is prompted with a dialog asking if the action + * should be allowed. + * @param app the application which is requesting the check. If null, the current + * application is used. + * @param type the type of access being requested + * @param extras extra Strings (usually) that are passed to the dialog for + * message formatting. + * @return true if the access was granted, false otherwise. + */ + public static boolean checkAccess(ApplicationInstance app, + SecurityWarningDialog.AccessType type, Object... extras) { - ApplicationInstance app = JNLPRuntime.getApplication(); + if (app == null) { + app = JNLPRuntime.getApplication(); + } + if (app != null) { if (!app.isSigned()) { final SecurityWarningDialog.AccessType tmpType = type; diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/services/SingleInstanceLock.java --- a/netx/net/sourceforge/jnlp/services/SingleInstanceLock.java Wed Jul 29 10:48:43 2009 -0400 +++ b/netx/net/sourceforge/jnlp/services/SingleInstanceLock.java Wed Jul 29 10:57:38 2009 -0400 @@ -27,6 +27,7 @@ import java.net.ServerSocket; import net.sourceforge.jnlp.JNLPFile; import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.util.FileUtils; /** * This class represents a Lock for single instance jnlp applications @@ -152,17 +153,7 @@ class SingleInstanceLock { } initialName = initialName + getCurrentDisplay(); - String encodedName; - - /* - * FIXME - * - * Assuming safe characters are 'a-z','A-Z','0-9', '_', '.' - */ - - encodedName = initialName.replaceAll("[^a-zA-Z0-9.]", "_"); - - return encodedName; + return FileUtils.sanitizeFileName(initialName); } diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/util/FileUtils.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/util/FileUtils.java Wed Jul 29 10:57:38 2009 -0400 @@ -0,0 +1,48 @@ +// 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.util; + +/** + * This class contains a few file-related utility functions. + * + * @author Omair Majid + */ + +public class FileUtils { + + + /** + * Given an input, return a sanitized form of the input suitable for use as + * a file/directory name + * + * @param input + * @return a sanitized version of the input + */ + public static String sanitizeFileName(String input) { + + /* + * FIXME + * + * Assuming safe characters are 'a-z','A-Z','0-9', '_', '.' + */ + + String sanitizedName = input.replaceAll("[^a-zA-Z0-9.]", "_"); + return sanitizedName; + } + +} diff -r 324662e5e611 -r 03e2ef9b5c6b netx/net/sourceforge/jnlp/util/XDesktopEntry.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/util/XDesktopEntry.java Wed Jul 29 10:57:38 2009 -0400 @@ -0,0 +1,210 @@ +// 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.util; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.Reader; +import java.io.StringReader; +import java.net.URL; +import java.nio.charset.Charset; +import java.util.Arrays; + +import net.sourceforge.jnlp.IconDesc; +import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.StreamEater; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.UpdatePolicy; +import net.sourceforge.jnlp.runtime.JNLPRuntime; + +/** + * This class builds a (freedesktop.org) desktop entry out of a {@link JNLPFile} + * . This entry can be used to install desktop shortcuts. See xdg-desktop-icon + * (1) and http://standards.freedesktop.org/desktop-entry-spec/latest/ for more + * information + * + * @author Omair Majid + * + */ +public class XDesktopEntry { + + public static final String JAVA_ICON_NAME = "java.png"; + + private JNLPFile file = null; + private int iconSize = -1; + private String iconLocation = null; + + private int[] VALID_ICON_SIZES = new int[] { 16, 22, 32, 48, 64, 128 }; + + /** + * Create a XDesktopEntry for the given JNLP file + * + * @param file a {@link JNLPFile} that indicates the application to launch + */ + public XDesktopEntry(JNLPFile file) { + this.file = file; + + /* looks like a good initial value */ + iconSize = VALID_ICON_SIZES[2]; + } + + /** + * Returns the contents of the {@link XDesktopEntry} through the + * {@link Reader} interface. + */ + public Reader getContentsAsReader() { + + String pathToJavaws = System.getProperty("java.home") + File.separator + "bin" + + File.separator + "javaws"; + + String fileContents = "[Desktop Entry]\n"; + fileContents += "Version=1.0\n"; + fileContents += "Name=" + file.getTitle() + "\n"; + fileContents += "GenericName=Java Web Start Application\n"; + fileContents += "Comment=" + file.getInformation().getDescription() + "\n"; + fileContents += "Type=Application\n"; + if (iconLocation != null) { + fileContents += "Icon=" + iconLocation + "\n"; + } else { + fileContents += "Icon=" + JAVA_ICON_NAME + "\n"; + + } + if (file.getInformation().getVendor() != null) { + fileContents += "Vendor=" + file.getInformation().getVendor() + "\n"; + } + fileContents += "Exec=" + pathToJavaws + " \"" + file.getSourceLocation() + "\"\n"; + + return new StringReader(fileContents); + + } + + /** + * Get the size of the icon (in pixels) for the desktop shortcut + */ + public int getIconSize() { + return iconSize; + } + + /** + * Set the icon size to use for the desktop shortcut + * + * @param size the size (in pixels) of the icon to use. Commonly used sizes + * are of 16, 22, 32, 48, 64 and 128 + */ + public void setIconSize(int size) { + iconSize = size; + } + + /** + * Create a desktop shortcut for this desktop entry + */ + public void createDesktopShortcut() { + try { + cacheIcon(); + installDesktopLauncher(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Install this XDesktopEntry into the user's desktop as a launcher + */ + private void installDesktopLauncher() { + File shortcutFile = new File(JNLPRuntime.TMP_DIR + File.separator + + FileUtils.sanitizeFileName(file.getTitle()) + ".desktop"); + try { + + /* + * Write out a Java String (UTF-16) as a UTF-8 file + */ + + OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(shortcutFile), + Charset.forName("UTF-8")); + Reader reader = getContentsAsReader(); + + char[] buffer = new char[1024]; + int ret = 0; + while (-1 != (ret = reader.read(buffer))) { + writer.write(buffer, 0, ret); + } + + reader.close(); + writer.close(); + + /* + * Install the desktop entry + */ + + String[] execString = new String[] { "xdg-desktop-icon", "install", "--novendor", + shortcutFile.getCanonicalPath() }; From omajid at redhat.com Tue Aug 4 09:07:42 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:42 +0000 Subject: changeset in /hg/icedtea: 2009-06-12 Omair Majid changeset 88c498641265 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=88c498641265 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 03e2ef9b5c6b -r 88c498641265 ChangeLog --- a/ChangeLog Wed Jul 29 10:57:38 2009 -0400 +++ b/ChangeLog Fri Jun 12 10:05:15 2009 -0400 @@ -1,3 +1,8 @@ 2009-07-29 Omair Majid + + * patches/icedtea-liveconnect.patch: Make netscape.javascript package + visible to javac by adding it to the non-core package list. + 2009-07-29 Omair Majid * netx/net/sourceforge/jnlp/IconDesc.java: Add new icon kind SHORTCUT. diff -r 03e2ef9b5c6b -r 88c498641265 patches/icedtea-liveconnect.patch --- a/patches/icedtea-liveconnect.patch Wed Jul 29 10:57:38 2009 -0400 +++ b/patches/icedtea-liveconnect.patch Fri Jun 12 10:05:15 2009 -0400 @@ -67,3 +67,20 @@ diff -Nru 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 ahughes at redhat.com Tue Aug 4 09:07:43 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:07:43 +0000 Subject: changeset in /hg/icedtea: Recreate updated patches against OpenJ... Message-ID: changeset f9fae3b84b02 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=f9fae3b84b02 description: Recreate updated patches against OpenJDK7. 2009-08-04 Andrew John Hughes * patches/icedtea-webstart.patch, * patches/icedtea-liveconnect.patch: Recreated against OpenJDK7. diffstat: 3 files changed, 58 insertions(+), 47 deletions(-) ChangeLog | 6 ++++ patches/icedtea-liveconnect.patch | 49 +++++++++++++++++++----------------- patches/icedtea-webstart.patch | 50 +++++++++++++++++++------------------ diffs (153 lines): diff -r 1990512a970a -r f9fae3b84b02 ChangeLog --- a/ChangeLog Fri Jun 05 10:25:13 2009 -0400 +++ b/ChangeLog Tue Aug 04 15:23:28 2009 +0100 @@ -1,3 +1,9 @@ 2009-06-05 Omair Majid + + * patches/icedtea-webstart.patch, + * patches/icedtea-liveconnect.patch: + Recreated against OpenJDK7. + 2009-06-05 Omair Majid * patches/icedtea-webstart.patch: Make javax.jnlp package visible to diff -r 1990512a970a -r f9fae3b84b02 patches/icedtea-liveconnect.patch --- a/patches/icedtea-liveconnect.patch Fri Jun 05 10:25:13 2009 -0400 +++ b/patches/icedtea-liveconnect.patch Tue Aug 04 15:23:28 2009 +0100 @@ -1,6 +1,26 @@ diff -Nru openjdk.orig/jdk/make/sun/Make -diff -Nru openjdk.orig/jdk/make/sun/Makefile openjdk/jdk/make/sun/Makefile ---- openjdk.orig/jdk/make/sun/Makefile 2009-06-30 14:05:45.000000000 +0100 -+++ openjdk/jdk/make/sun/Makefile 2009-06-30 16:40:55.000000000 +0100 +diff -Nru openjdk.o/jdk/make/docs/NON_CORE_PKGS.gmk openjdk/jdk/make/docs/NON_CORE_PKGS.gmk +--- openjdk.o/jdk/make/docs/NON_CORE_PKGS.gmk 2009-07-25 04:30:42.000000000 +0100 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2009-08-04 14:54:12.000000000 +0100 +@@ -84,6 +84,8 @@ + TREEAPI_PKGS = com.sun.source.tree \ + com.sun.source.util + ++JAVASCRIPT_PKGS = netscape.javascript ++ + SMARTCARDIO_PKGS = javax.smartcardio + + SCTPAPI_PKGS = com.sun.nio.sctp +@@ -94,6 +96,7 @@ + # non-core packages in rt.jar + NON_CORE_PKGS = $(DOMAPI_PKGS) \ + $(MGMT_PKGS) \ ++ $(JAVASCRIPT_PKGS) \ + $(JAAS_PKGS) \ + $(JGSS_PKGS) \ + $(NIO_PKGS) \ +diff -Nru openjdk.o/jdk/make/sun/Makefile openjdk/jdk/make/sun/Makefile +--- openjdk.o/jdk/make/sun/Makefile 2009-07-25 04:30:42.000000000 +0100 ++++ openjdk/jdk/make/sun/Makefile 2009-08-04 14:53:42.000000000 +0100 @@ -64,7 +64,7 @@ $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \ font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \ @@ -10,9 +30,9 @@ diff -Nru openjdk.orig/jdk/make/sun/Make all build clean clobber:: $(SUBDIRS-loop) -diff -Nru openjdk.orig/jdk/make/sun/plugin/Makefile openjdk/jdk/make/sun/plugin/Makefile ---- openjdk.orig/jdk/make/sun/plugin/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/make/sun/plugin/Makefile 2009-06-30 16:28:07.000000000 +0100 +diff -Nru openjdk.o/jdk/make/sun/plugin/Makefile openjdk/jdk/make/sun/plugin/Makefile +--- openjdk.o/jdk/make/sun/plugin/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/make/sun/plugin/Makefile 2009-08-04 14:53:42.000000000 +0100 @@ -0,0 +1,53 @@ +# +# Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved. @@ -67,20 +87,3 @@ diff -Nru 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) \ diff -r 1990512a970a -r f9fae3b84b02 patches/icedtea-webstart.patch --- a/patches/icedtea-webstart.patch Fri Jun 05 10:25:13 2009 -0400 +++ b/patches/icedtea-webstart.patch Tue Aug 04 15:23:28 2009 +0100 @@ -1,6 +1,26 @@ diff -Nru openjdk.orig/jdk/make/launcher +diff -Nru openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk openjdk/jdk/make/docs/NON_CORE_PKGS.gmk +--- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2009-08-04 14:58:33.000000000 +0100 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2009-08-04 14:59:43.000000000 +0100 +@@ -93,6 +93,8 @@ + TRACING_PKGS = com.sun.tracing \ + com.sun.tracing.dtrace + ++JNLP_PKGS = javax.jnlp ++ + # non-core packages in rt.jar + NON_CORE_PKGS = $(DOMAPI_PKGS) \ + $(MGMT_PKGS) \ +@@ -103,6 +105,7 @@ + $(OLD_JSSE_PKGS) \ + $(HTTPSERVER_PKGS) \ + $(SMARTCARDIO_PKGS) \ ++ $(JNLP_PKGS) \ + $(TRACING_PKGS) \ + $(SCTPAPI_PKGS) + diff -Nru openjdk.orig/jdk/make/launchers/Makefile openjdk/jdk/make/launchers/Makefile ---- openjdk.orig/jdk/make/launchers/Makefile 2009-06-30 14:05:45.000000000 +0100 -+++ openjdk/jdk/make/launchers/Makefile 2009-07-14 15:33:57.000000000 +0100 +--- openjdk.orig/jdk/make/launchers/Makefile 2009-07-25 04:30:42.000000000 +0100 ++++ openjdk/jdk/make/launchers/Makefile 2009-08-04 14:59:15.000000000 +0100 @@ -67,6 +67,7 @@ $(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , ) $(call make-launcher, javah, com.sun.tools.javah.Main, , ) @@ -10,8 +30,8 @@ diff -Nru openjdk.orig/jdk/make/launcher -J-Djconsole.showOutputViewer, ) $(call make-launcher, jdb, com.sun.tools.example.debug.tty.TTY, , ) diff -Nru openjdk.orig/jdk/src/share/classes/sun/applet/AppletPanel.java openjdk/jdk/src/share/classes/sun/applet/AppletPanel.java ---- openjdk.orig/jdk/src/share/classes/sun/applet/AppletPanel.java 2009-07-14 15:15:40.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/applet/AppletPanel.java 2009-07-14 15:33:57.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/applet/AppletPanel.java 2009-08-04 14:57:54.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/applet/AppletPanel.java 2009-08-04 14:59:15.000000000 +0100 @@ -67,7 +67,7 @@ /** * The applet (if loaded). @@ -50,27 +70,9 @@ diff -Nru 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) diff -Nru openjdk.orig/jdk/src/share/classes/sun/applet/AppletViewerPanel.java openjdk/jdk/src/share/classes/sun/applet/AppletViewerPanel.java ---- openjdk.orig/jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2009-07-14 15:15:40.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2009-07-14 15:33:57.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2009-08-04 14:57:54.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2009-08-04 14:59:15.000000000 +0100 @@ -42,25 +42,25 @@ * * @author Arthur van Hoff From omajid at redhat.com Tue Aug 4 09:07:43 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:43 +0000 Subject: changeset in /hg/icedtea: 2009-06-05 Omair Majid changeset 1990512a970a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1990512a970a 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 (40 lines): diff -r 88c498641265 -r 1990512a970a ChangeLog --- a/ChangeLog Fri Jun 12 10:05:15 2009 -0400 +++ b/ChangeLog Fri Jun 05 10:25:13 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-12 Omair Majid + + * patches/icedtea-webstart.patch: Make javax.jnlp package visible to + javac. + 2009-06-12 Omair Majid * patches/icedtea-liveconnect.patch: Make netscape.javascript package diff -r 88c498641265 -r 1990512a970a patches/icedtea-webstart.patch --- a/patches/icedtea-webstart.patch Fri Jun 12 10:05:15 2009 -0400 +++ b/patches/icedtea-webstart.patch Fri Jun 05 10:25:13 2009 -0400 @@ -50,6 +50,24 @@ diff -Nru 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) diff -Nru openjdk.orig/jdk/src/share/classes/sun/applet/AppletViewerPanel.java openjdk/jdk/src/share/classes/sun/applet/AppletViewerPanel.java --- openjdk.orig/jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2009-07-14 15:15:40.000000000 +0100 +++ openjdk/jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2009-07-14 15:33:57.000000000 +0100 From mark at klomp.org Tue Aug 4 09:07:43 2009 From: mark at klomp.org (Mark Wielaard) Date: Tue, 04 Aug 2009 16:07:43 +0000 Subject: changeset in /hg/icedtea: Don't use @Override for methods implem... Message-ID: changeset bc51357839c0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=bc51357839c0 description: Don't use @Override for methods implementing interfaces. * netx/net/sourceforge/jnlp/services/XExtendedService.java (openFile): Remove @Override of interface method. (openFiles): Likewise. diffstat: 2 files changed, 6 insertions(+), 2 deletions(-) ChangeLog | 6 ++++++ netx/net/sourceforge/jnlp/services/XExtendedService.java | 2 -- diffs (32 lines): diff -r f9fae3b84b02 -r bc51357839c0 ChangeLog --- a/ChangeLog Tue Aug 04 15:23:28 2009 +0100 +++ b/ChangeLog Thu Jun 18 10:58:02 2009 +0200 @@ -1,3 +1,9 @@ 2009-08-04 Andrew John Hughes + + * netx/net/sourceforge/jnlp/services/XExtendedService.java + (openFile): Remove @Override of interface method. + (openFiles): Likewise. + 2009-08-04 Andrew John Hughes * patches/icedtea-webstart.patch, diff -r f9fae3b84b02 -r bc51357839c0 netx/net/sourceforge/jnlp/services/XExtendedService.java --- a/netx/net/sourceforge/jnlp/services/XExtendedService.java Tue Aug 04 15:23:28 2009 +0100 +++ b/netx/net/sourceforge/jnlp/services/XExtendedService.java Thu Jun 18 10:58:02 2009 +0200 @@ -32,7 +32,6 @@ import net.sourceforge.jnlp.security.Sec */ public class XExtendedService implements ExtendedService { - @Override public FileContents openFile(File file) throws IOException { if (ServiceUtil.checkAccess(SecurityWarningDialog.AccessType.READ_FILE)) { @@ -44,7 +43,6 @@ public class XExtendedService implements } - @Override public FileContents[] openFiles(File[] files) throws IOException { FileContents[] contents = new FileContents[files.length]; for (int i = 0; i < files.length; i++) { From omajid at redhat.com Tue Aug 4 09:07:44 2009 From: omajid at redhat.com (Omair Majid) Date: Tue, 04 Aug 2009 16:07:44 +0000 Subject: changeset in /hg/icedtea: Netx: disable destkop shortcuts Message-ID: changeset a790ee31024d in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a790ee31024d description: Netx: disable destkop shortcuts 2009-08-04 Omair Majid * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java (initialize): Disable creation of desktop shortcuts. diffstat: 2 files changed, 23 insertions(+), 1 deletion(-) ChangeLog | 5 +++ netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 19 +++++++++++- diffs (41 lines): diff -r bc51357839c0 -r a790ee31024d ChangeLog --- a/ChangeLog Thu Jun 18 10:58:02 2009 +0200 +++ b/ChangeLog Tue Aug 04 11:34:49 2009 -0400 @@ -1,3 +1,8 @@ 2009-06-18 Mark Wielaard + + * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java + (initialize): Disable creation of desktop shortcuts. + 2009-06-18 Mark Wielaard * netx/net/sourceforge/jnlp/services/XExtendedService.java diff -r bc51357839c0 -r a790ee31024d netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java --- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu Jun 18 10:58:02 2009 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Tue Aug 04 11:34:49 2009 -0400 @@ -109,7 +109,24 @@ public class ApplicationInstance { */ public void initialize() { installEnvironment(); - addMenuAndDesktopEntries(); + + /* + * FIXME: Disable creating desktop entries for now + * + * there are some major issues we need to work out before we can enable them + * 1. Playing nice with the altnatives system + * - use the system preferred jdk (/usr/bin/javaws) + * - dont assume what jdk javaws corresponds to + * - make sure our shortcuts work with the sun jdk and vice versa + * (may not be possible since sun's javaws creates a launcher that + * links to /usr/java/${ver}/bin/javaws) + * - we should use the same options and arguments as sun's javaws + * 2. Make shortcuts work offline + * - make the cache updates and replacements work properly + * - shortcuts should use the cache + * + * addMenuAndDesktopEntries(); + */ } /** From ahughes at redhat.com Tue Aug 4 09:27:54 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:27:54 +0000 Subject: changeset in /hg/icedtea: Fix use of DOS line endings in netx. Message-ID: changeset 5aca55727a2a in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5aca55727a2a description: Fix use of DOS line endings in netx. 2009-08-04 Andrew John Hughes * netx/net/sourceforge/jnlp/DefaultLaunchHandler.java, * netx/net/sourceforge/jnlp/ExtensionDesc.java, * netx/net/sourceforge/jnlp/JNLPFile.java, * netx/net/sourceforge/jnlp/LaunchException.java, * netx/net/sourceforge/jnlp/LaunchHandler.java, * netx/net/sourceforge/jnlp/Launcher.java, * netx/net/sourceforge/jnlp/ParseException.java, * netx/net/sourceforge/jnlp/Parser.java, * netx/net/sourceforge/jnlp/cache/CacheEntry.java, * netx/net/sourceforge/jnlp/cache/CacheUtil.java, * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java, * netx/net/sourceforge/jnlp/cache/ResourceTracker.java, * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java, * netx/net/sourceforge/jnlp/runtime/AppletInstance.java, * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java, * netx/net/sourceforge/jnlp/runtime/Boot.java, * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java, * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, * netx/net/sourceforge/jnlp/services/XBasicService.java, * netx/net/sourceforge/jnlp/util/PropertiesFile.java, * netx/net/sourceforge/jnlp/util/Reflect.java, * netx/net/sourceforge/jnlp/util/WeakList.java: Convert DOS line endings to UNIX. diffstat: 24 files changed, 9067 insertions(+), 9040 deletions(-) ChangeLog | 27 netx/net/sourceforge/jnlp/DefaultLaunchHandler.java | 228 netx/net/sourceforge/jnlp/ExtensionDesc.java | 290 - netx/net/sourceforge/jnlp/JNLPFile.java | 1156 ++-- netx/net/sourceforge/jnlp/LaunchException.java | 380 - netx/net/sourceforge/jnlp/LaunchHandler.java | 136 netx/net/sourceforge/jnlp/Launcher.java | 1550 +++--- netx/net/sourceforge/jnlp/ParseException.java | 188 netx/net/sourceforge/jnlp/Parser.java | 2412 +++++----- netx/net/sourceforge/jnlp/cache/CacheEntry.java | 348 - netx/net/sourceforge/jnlp/cache/CacheUtil.java | 788 +-- netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java | 642 +- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 2102 ++++---- netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java | 708 +- netx/net/sourceforge/jnlp/runtime/AppletInstance.java | 278 - netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 586 +- netx/net/sourceforge/jnlp/runtime/Boot.java | 892 +-- netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 1982 ++++---- netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 1118 ++-- netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java | 980 ++-- netx/net/sourceforge/jnlp/services/XBasicService.java | 468 - netx/net/sourceforge/jnlp/util/PropertiesFile.java | 296 - netx/net/sourceforge/jnlp/util/Reflect.java | 296 - netx/net/sourceforge/jnlp/util/WeakList.java | 256 - diffs (truncated from 18206 to 500 lines): diff -r a790ee31024d -r 5aca55727a2a ChangeLog --- a/ChangeLog Tue Aug 04 11:34:49 2009 -0400 +++ b/ChangeLog Tue Aug 04 17:29:24 2009 +0100 @@ -1,3 +1,30 @@ 2009-08-04 Omair Majid + + * netx/net/sourceforge/jnlp/DefaultLaunchHandler.java, + * netx/net/sourceforge/jnlp/ExtensionDesc.java, + * netx/net/sourceforge/jnlp/JNLPFile.java, + * netx/net/sourceforge/jnlp/LaunchException.java, + * netx/net/sourceforge/jnlp/LaunchHandler.java, + * netx/net/sourceforge/jnlp/Launcher.java, + * netx/net/sourceforge/jnlp/ParseException.java, + * netx/net/sourceforge/jnlp/Parser.java, + * netx/net/sourceforge/jnlp/cache/CacheEntry.java, + * netx/net/sourceforge/jnlp/cache/CacheUtil.java, + * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java, + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java, + * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java, + * netx/net/sourceforge/jnlp/runtime/AppletInstance.java, + * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java, + * netx/net/sourceforge/jnlp/runtime/Boot.java, + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java, + * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, + * netx/net/sourceforge/jnlp/services/XBasicService.java, + * netx/net/sourceforge/jnlp/util/PropertiesFile.java, + * netx/net/sourceforge/jnlp/util/Reflect.java, + * netx/net/sourceforge/jnlp/util/WeakList.java: + Convert DOS line endings to UNIX. + 2009-08-04 Omair Majid * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java diff -r a790ee31024d -r 5aca55727a2a netx/net/sourceforge/jnlp/DefaultLaunchHandler.java --- a/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java Tue Aug 04 11:34:49 2009 -0400 +++ b/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java Tue Aug 04 17:29:24 2009 +0100 @@ -1,114 +1,114 @@ -// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) -// -// 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 net.sourceforge.jnlp.runtime.*; -import net.sourceforge.jnlp.util.*; - -import java.awt.*; -import java.util.*; -import javax.swing.*; - - -/** - * This default implementation shows prints the exception to - * stdout and if not in headless mode displays the exception in a - * dialog. - * - * @author Jon A. Maxwell (JAM) - initial author - * @version $Revision: 1.1 $ - */ -public class DefaultLaunchHandler implements LaunchHandler { - - /** - * Called when the application could not be launched due to a - * fatal error, such as the inability to find the main class - * or non-parseable XML. - */ - public void launchError(LaunchException exception) { - printMessage(exception); - } - - /** - * Called when launching the application can not be launched - * due to an error that is not fatal. For example a JNLP file - * that is not strictly correct yet does not necessarily - * prohibit the system from attempting to launch the - * application. - * - * @return true if the launch should continue, false to abort - */ - public boolean launchWarning(LaunchException warning) { - printMessage(warning); - return true; - } - - /** - * Called when a security validation error occurs while - * launching the application. - * - * @return true to allow the application to continue, false to stop it. - */ - public boolean validationError(LaunchException security) { - printMessage(security); - return true; - } - - /** - * Called when an application, applet, or installer has been - * launched successfully (the main method or applet start method - * returned normally). - * - * @param application the launched application instance - */ - public void launchCompleted(ApplicationInstance application) { - // - } - - /** - * Print a message to stdout. - */ - protected void printMessage(LaunchException ex) { - StringBuffer result = new StringBuffer(); - result.append("netx: "); - result.append(ex.getCategory()); - if (ex.getSummary() != null) { - result.append(": "); - result.append(ex.getSummary()); - } - - if (JNLPRuntime.isDebug()) { - if (ex.getCause() != null) - ex.getCause().printStackTrace(); - else - ex.printStackTrace(); - } - - Throwable causes[] = ex.getCauses(); - - for (int i=0; i < causes.length; i++) { - result.append(" ("); - result.append(causes[i].getClass().getName()); - result.append(" "); - result.append(causes[i].getMessage()); - result.append(")"); - } - } - -} - - +// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// +// 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 net.sourceforge.jnlp.runtime.*; +import net.sourceforge.jnlp.util.*; + +import java.awt.*; +import java.util.*; +import javax.swing.*; + + +/** + * This default implementation shows prints the exception to + * stdout and if not in headless mode displays the exception in a + * dialog. + * + * @author Jon A. Maxwell (JAM) - initial author + * @version $Revision: 1.1 $ + */ +public class DefaultLaunchHandler implements LaunchHandler { + + /** + * Called when the application could not be launched due to a + * fatal error, such as the inability to find the main class + * or non-parseable XML. + */ + public void launchError(LaunchException exception) { + printMessage(exception); + } + + /** + * Called when launching the application can not be launched + * due to an error that is not fatal. For example a JNLP file + * that is not strictly correct yet does not necessarily + * prohibit the system from attempting to launch the + * application. + * + * @return true if the launch should continue, false to abort + */ + public boolean launchWarning(LaunchException warning) { + printMessage(warning); + return true; + } + + /** + * Called when a security validation error occurs while + * launching the application. + * + * @return true to allow the application to continue, false to stop it. + */ + public boolean validationError(LaunchException security) { + printMessage(security); + return true; + } + + /** + * Called when an application, applet, or installer has been + * launched successfully (the main method or applet start method + * returned normally). + * + * @param application the launched application instance + */ + public void launchCompleted(ApplicationInstance application) { + // + } + + /** + * Print a message to stdout. + */ + protected void printMessage(LaunchException ex) { + StringBuffer result = new StringBuffer(); + result.append("netx: "); + result.append(ex.getCategory()); + if (ex.getSummary() != null) { + result.append(": "); + result.append(ex.getSummary()); + } + + if (JNLPRuntime.isDebug()) { + if (ex.getCause() != null) + ex.getCause().printStackTrace(); + else + ex.printStackTrace(); + } + + Throwable causes[] = ex.getCauses(); + + for (int i=0; i < causes.length; i++) { + result.append(" ("); + result.append(causes[i].getClass().getName()); + result.append(" "); + result.append(causes[i].getMessage()); + result.append(")"); + } + } + +} + + diff -r a790ee31024d -r 5aca55727a2a netx/net/sourceforge/jnlp/ExtensionDesc.java --- a/netx/net/sourceforge/jnlp/ExtensionDesc.java Tue Aug 04 11:34:49 2009 -0400 +++ b/netx/net/sourceforge/jnlp/ExtensionDesc.java Tue Aug 04 17:29:24 2009 +0100 @@ -1,145 +1,145 @@ -// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) -// -// 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.io.*; -import java.net.*; -import java.util.*; - -import net.sourceforge.jnlp.runtime.JNLPRuntime; - - -/** - * The extension element. - * - * @author Jon A. Maxwell (JAM) - initial author - * @version $Revision: 1.8 $ - */ -public class ExtensionDesc { - - /** the extension name */ - private String name; - - /** the required extension version */ - private Version version; - - /** the location of the extension JNLP file */ - private URL location; - - /** the JNLPFile the extension refers to */ - private JNLPFile file; - - /** map from ext-part to local part */ - private Map extToPart = new HashMap(); - - /** eager ext parts */ - private List eagerExtParts = new ArrayList(); - - - /** - * Create an extention descriptor. - * - * @param name the extension name - * @param version the required version of the extention JNLPFile - * @param location the location of the extention JNLP file - */ - public ExtensionDesc(String name, Version version, URL location) { - this.name = name; - this.version = version; - this.location = location; - } - - /** - * Adds an extension part to be downloaded when the specified - * part of the main JNLP file is loaded. The extension part - * will be downloaded before the application is launched if the - * lazy value is false or the part is empty or null. - * - * @param extPart the part name in the extension file - * @param part the part name in the main file - * @param lazy whether to load the part before launching - */ - protected void addPart(String extPart, String part, boolean lazy) { - extToPart.put(extPart, part); - - if (!lazy || part == null || part.length() == 0) - eagerExtParts.add(extPart); - } - - /** - * Returns the parts in the extension JNLP file mapped to the - * part of the main file. - */ - public String[] getExtensionParts(String thisPart) { - - return null; - } - - /** - * Returns the name of the extension. - */ - public String getName() { - return name; - } - - /** - * Returns the required version of the extension JNLP file. - */ - public Version getVersion() { - return version; - } - - /** - * Returns the location of the extension JNLP file. - */ - public URL getLocation() { - return location; - } - - /** - * Resolves the extension by creating a JNLPFile from the file - * specified by the extension's location property. - * - * @throws IOException if the extension JNLPFile could not be resolved. - * @throws ParseException if the extension JNLPFile could not be - * parsed or was not a component or installer descriptor. - */ - public void resolve() throws ParseException, IOException { - if (file == null) { - file = new JNLPFile(location); - - if (JNLPRuntime.isDebug()) - System.out.println("Resolve: "+file.getInformation().getTitle()); - - // check for it being an extension descriptor - if (!file.isComponent() && !file.isInstaller()) - throw new ParseException(JNLPRuntime.getMessage("JInvalidExtensionDescriptor", new Object[] {name, location} )); - } - - } - - /** - * Returns a JNLPFile for the extension, or null if the JNLP - * file has not been resolved. - */ - public JNLPFile getJNLPFile() { - return file; - } -} - - +// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// +// 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.io.*; +import java.net.*; +import java.util.*; + +import net.sourceforge.jnlp.runtime.JNLPRuntime; + + +/** + * The extension element. + * + * @author Jon A. Maxwell (JAM) - initial author + * @version $Revision: 1.8 $ + */ +public class ExtensionDesc { + + /** the extension name */ + private String name; + + /** the required extension version */ + private Version version; + + /** the location of the extension JNLP file */ + private URL location; + + /** the JNLPFile the extension refers to */ + private JNLPFile file; + + /** map from ext-part to local part */ + private Map extToPart = new HashMap(); + + /** eager ext parts */ + private List eagerExtParts = new ArrayList(); + + + /** + * Create an extention descriptor. + * + * @param name the extension name + * @param version the required version of the extention JNLPFile + * @param location the location of the extention JNLP file + */ + public ExtensionDesc(String name, Version version, URL location) { + this.name = name; + this.version = version; + this.location = location; + } + + /** + * Adds an extension part to be downloaded when the specified + * part of the main JNLP file is loaded. The extension part + * will be downloaded before the application is launched if the + * lazy value is false or the part is empty or null. + * + * @param extPart the part name in the extension file + * @param part the part name in the main file + * @param lazy whether to load the part before launching + */ + protected void addPart(String extPart, String part, boolean lazy) { + extToPart.put(extPart, part); + + if (!lazy || part == null || part.length() == 0) + eagerExtParts.add(extPart); + } + + /** + * Returns the parts in the extension JNLP file mapped to the From ahughes at redhat.com Tue Aug 4 09:37:53 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:37:53 +0000 Subject: changeset in /hg/icedtea6: Convert DOS line endings to UNIX. Message-ID: changeset e315bc774531 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e315bc774531 description: Convert DOS line endings to UNIX. 2009-08-04 Andrew John Hughes * rt/net/sourceforge/jnlp/DefaultLaunchHandler.java, * rt/net/sourceforge/jnlp/ExtensionDesc.java, * rt/net/sourceforge/jnlp/JNLPFile.java, * rt/net/sourceforge/jnlp/LaunchException.java, * rt/net/sourceforge/jnlp/LaunchHandler.java, * rt/net/sourceforge/jnlp/Launcher.java, * rt/net/sourceforge/jnlp/ParseException.java, * rt/net/sourceforge/jnlp/Parser.java, * rt/net/sourceforge/jnlp/cache/CacheEntry.java, * rt/net/sourceforge/jnlp/cache/CacheUtil.java, * rt/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java, * rt/net/sourceforge/jnlp/cache/ResourceTracker.java, * rt/net/sourceforge/jnlp/runtime/AppletEnvironment.java, * rt/net/sourceforge/jnlp/runtime/AppletInstance.java, * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java, * rt/net/sourceforge/jnlp/runtime/Boot.java, * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java, * rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, * rt/net/sourceforge/jnlp/services/XBasicService.java, * rt/net/sourceforge/jnlp/util/PropertiesFile.java, * rt/net/sourceforge/jnlp/util/Reflect.java, * rt/net/sourceforge/jnlp/util/WeakList.java, * test/jtreg/com/sun/javatest/exec/FileTable.java, * test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java, * test/jtreg/com/sun/javatest/report/XMLReportMaker.java: Convert DOS line endings to UNIX. diffstat: 27 files changed, 9963 insertions(+), 9933 deletions(-) ChangeLog | 30 rt/net/sourceforge/jnlp/DefaultLaunchHandler.java | 228 rt/net/sourceforge/jnlp/ExtensionDesc.java | 290 - rt/net/sourceforge/jnlp/JNLPFile.java | 1156 ++-- rt/net/sourceforge/jnlp/LaunchException.java | 380 - rt/net/sourceforge/jnlp/LaunchHandler.java | 136 rt/net/sourceforge/jnlp/Launcher.java | 1550 +++--- rt/net/sourceforge/jnlp/ParseException.java | 188 rt/net/sourceforge/jnlp/Parser.java | 2412 +++++----- rt/net/sourceforge/jnlp/cache/CacheEntry.java | 348 - rt/net/sourceforge/jnlp/cache/CacheUtil.java | 788 +-- rt/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java | 642 +- rt/net/sourceforge/jnlp/cache/ResourceTracker.java | 2102 ++++---- rt/net/sourceforge/jnlp/runtime/AppletEnvironment.java | 708 +- rt/net/sourceforge/jnlp/runtime/AppletInstance.java | 278 - rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 586 +- rt/net/sourceforge/jnlp/runtime/Boot.java | 892 +-- rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 1982 ++++---- rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 1118 ++-- rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java | 980 ++-- rt/net/sourceforge/jnlp/services/XBasicService.java | 468 - rt/net/sourceforge/jnlp/util/PropertiesFile.java | 296 - rt/net/sourceforge/jnlp/util/Reflect.java | 296 - rt/net/sourceforge/jnlp/util/WeakList.java | 256 - test/jtreg/com/sun/javatest/exec/FileTable.java | 146 test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java | 474 - test/jtreg/com/sun/javatest/report/XMLReportMaker.java | 1166 ++-- diffs (truncated from 20016 to 500 lines): diff -r f5ed1489ddcf -r e315bc774531 ChangeLog --- a/ChangeLog Tue Aug 04 11:34:49 2009 -0400 +++ b/ChangeLog Tue Aug 04 17:39:11 2009 +0100 @@ -1,3 +1,33 @@ 2009-08-04 Omair Majid + + * rt/net/sourceforge/jnlp/DefaultLaunchHandler.java, + * rt/net/sourceforge/jnlp/ExtensionDesc.java, + * rt/net/sourceforge/jnlp/JNLPFile.java, + * rt/net/sourceforge/jnlp/LaunchException.java, + * rt/net/sourceforge/jnlp/LaunchHandler.java, + * rt/net/sourceforge/jnlp/Launcher.java, + * rt/net/sourceforge/jnlp/ParseException.java, + * rt/net/sourceforge/jnlp/Parser.java, + * rt/net/sourceforge/jnlp/cache/CacheEntry.java, + * rt/net/sourceforge/jnlp/cache/CacheUtil.java, + * rt/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java, + * rt/net/sourceforge/jnlp/cache/ResourceTracker.java, + * rt/net/sourceforge/jnlp/runtime/AppletEnvironment.java, + * rt/net/sourceforge/jnlp/runtime/AppletInstance.java, + * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java, + * rt/net/sourceforge/jnlp/runtime/Boot.java, + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, + * rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java, + * rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, + * rt/net/sourceforge/jnlp/services/XBasicService.java, + * rt/net/sourceforge/jnlp/util/PropertiesFile.java, + * rt/net/sourceforge/jnlp/util/Reflect.java, + * rt/net/sourceforge/jnlp/util/WeakList.java, + * test/jtreg/com/sun/javatest/exec/FileTable.java, + * test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java, + * test/jtreg/com/sun/javatest/report/XMLReportMaker.java: + Convert DOS line endings to UNIX. + 2009-08-04 Omair Majid * rt/net/sourceforge/jnlp/runtime/ApplicationInstance.java diff -r f5ed1489ddcf -r e315bc774531 rt/net/sourceforge/jnlp/DefaultLaunchHandler.java --- a/rt/net/sourceforge/jnlp/DefaultLaunchHandler.java Tue Aug 04 11:34:49 2009 -0400 +++ b/rt/net/sourceforge/jnlp/DefaultLaunchHandler.java Tue Aug 04 17:39:11 2009 +0100 @@ -1,114 +1,114 @@ -// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) -// -// 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 net.sourceforge.jnlp.runtime.*; -import net.sourceforge.jnlp.util.*; - -import java.awt.*; -import java.util.*; -import javax.swing.*; - - -/** - * This default implementation shows prints the exception to - * stdout and if not in headless mode displays the exception in a - * dialog. - * - * @author Jon A. Maxwell (JAM) - initial author - * @version $Revision: 1.1 $ - */ -public class DefaultLaunchHandler implements LaunchHandler { - - /** - * Called when the application could not be launched due to a - * fatal error, such as the inability to find the main class - * or non-parseable XML. - */ - public void launchError(LaunchException exception) { - printMessage(exception); - } - - /** - * Called when launching the application can not be launched - * due to an error that is not fatal. For example a JNLP file - * that is not strictly correct yet does not necessarily - * prohibit the system from attempting to launch the - * application. - * - * @return true if the launch should continue, false to abort - */ - public boolean launchWarning(LaunchException warning) { - printMessage(warning); - return true; - } - - /** - * Called when a security validation error occurs while - * launching the application. - * - * @return true to allow the application to continue, false to stop it. - */ - public boolean validationError(LaunchException security) { - printMessage(security); - return true; - } - - /** - * Called when an application, applet, or installer has been - * launched successfully (the main method or applet start method - * returned normally). - * - * @param application the launched application instance - */ - public void launchCompleted(ApplicationInstance application) { - // - } - - /** - * Print a message to stdout. - */ - protected void printMessage(LaunchException ex) { - StringBuffer result = new StringBuffer(); - result.append("netx: "); - result.append(ex.getCategory()); - if (ex.getSummary() != null) { - result.append(": "); - result.append(ex.getSummary()); - } - - if (JNLPRuntime.isDebug()) { - if (ex.getCause() != null) - ex.getCause().printStackTrace(); - else - ex.printStackTrace(); - } - - Throwable causes[] = ex.getCauses(); - - for (int i=0; i < causes.length; i++) { - result.append(" ("); - result.append(causes[i].getClass().getName()); - result.append(" "); - result.append(causes[i].getMessage()); - result.append(")"); - } - } - -} - - +// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// +// 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 net.sourceforge.jnlp.runtime.*; +import net.sourceforge.jnlp.util.*; + +import java.awt.*; +import java.util.*; +import javax.swing.*; + + +/** + * This default implementation shows prints the exception to + * stdout and if not in headless mode displays the exception in a + * dialog. + * + * @author Jon A. Maxwell (JAM) - initial author + * @version $Revision: 1.1 $ + */ +public class DefaultLaunchHandler implements LaunchHandler { + + /** + * Called when the application could not be launched due to a + * fatal error, such as the inability to find the main class + * or non-parseable XML. + */ + public void launchError(LaunchException exception) { + printMessage(exception); + } + + /** + * Called when launching the application can not be launched + * due to an error that is not fatal. For example a JNLP file + * that is not strictly correct yet does not necessarily + * prohibit the system from attempting to launch the + * application. + * + * @return true if the launch should continue, false to abort + */ + public boolean launchWarning(LaunchException warning) { + printMessage(warning); + return true; + } + + /** + * Called when a security validation error occurs while + * launching the application. + * + * @return true to allow the application to continue, false to stop it. + */ + public boolean validationError(LaunchException security) { + printMessage(security); + return true; + } + + /** + * Called when an application, applet, or installer has been + * launched successfully (the main method or applet start method + * returned normally). + * + * @param application the launched application instance + */ + public void launchCompleted(ApplicationInstance application) { + // + } + + /** + * Print a message to stdout. + */ + protected void printMessage(LaunchException ex) { + StringBuffer result = new StringBuffer(); + result.append("netx: "); + result.append(ex.getCategory()); + if (ex.getSummary() != null) { + result.append(": "); + result.append(ex.getSummary()); + } + + if (JNLPRuntime.isDebug()) { + if (ex.getCause() != null) + ex.getCause().printStackTrace(); + else + ex.printStackTrace(); + } + + Throwable causes[] = ex.getCauses(); + + for (int i=0; i < causes.length; i++) { + result.append(" ("); + result.append(causes[i].getClass().getName()); + result.append(" "); + result.append(causes[i].getMessage()); + result.append(")"); + } + } + +} + + diff -r f5ed1489ddcf -r e315bc774531 rt/net/sourceforge/jnlp/ExtensionDesc.java --- a/rt/net/sourceforge/jnlp/ExtensionDesc.java Tue Aug 04 11:34:49 2009 -0400 +++ b/rt/net/sourceforge/jnlp/ExtensionDesc.java Tue Aug 04 17:39:11 2009 +0100 @@ -1,145 +1,145 @@ -// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) -// -// 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.io.*; -import java.net.*; -import java.util.*; - -import net.sourceforge.jnlp.runtime.JNLPRuntime; - - -/** - * The extension element. - * - * @author Jon A. Maxwell (JAM) - initial author - * @version $Revision: 1.8 $ - */ -public class ExtensionDesc { - - /** the extension name */ - private String name; - - /** the required extension version */ - private Version version; - - /** the location of the extension JNLP file */ - private URL location; - - /** the JNLPFile the extension refers to */ - private JNLPFile file; - - /** map from ext-part to local part */ - private Map extToPart = new HashMap(); - - /** eager ext parts */ - private List eagerExtParts = new ArrayList(); - - - /** - * Create an extention descriptor. - * - * @param name the extension name - * @param version the required version of the extention JNLPFile - * @param location the location of the extention JNLP file - */ - public ExtensionDesc(String name, Version version, URL location) { - this.name = name; - this.version = version; - this.location = location; - } - - /** - * Adds an extension part to be downloaded when the specified - * part of the main JNLP file is loaded. The extension part - * will be downloaded before the application is launched if the - * lazy value is false or the part is empty or null. - * - * @param extPart the part name in the extension file - * @param part the part name in the main file - * @param lazy whether to load the part before launching - */ - protected void addPart(String extPart, String part, boolean lazy) { - extToPart.put(extPart, part); - - if (!lazy || part == null || part.length() == 0) - eagerExtParts.add(extPart); - } - - /** - * Returns the parts in the extension JNLP file mapped to the - * part of the main file. - */ - public String[] getExtensionParts(String thisPart) { - - return null; - } - - /** - * Returns the name of the extension. - */ - public String getName() { - return name; - } - - /** - * Returns the required version of the extension JNLP file. - */ - public Version getVersion() { - return version; - } - - /** - * Returns the location of the extension JNLP file. - */ - public URL getLocation() { - return location; - } - - /** - * Resolves the extension by creating a JNLPFile from the file - * specified by the extension's location property. - * - * @throws IOException if the extension JNLPFile could not be resolved. - * @throws ParseException if the extension JNLPFile could not be - * parsed or was not a component or installer descriptor. - */ - public void resolve() throws ParseException, IOException { - if (file == null) { - file = new JNLPFile(location); - - if (JNLPRuntime.isDebug()) - System.out.println("Resolve: "+file.getInformation().getTitle()); - - // check for it being an extension descriptor - if (!file.isComponent() && !file.isInstaller()) - throw new ParseException(JNLPRuntime.getMessage("JInvalidExtensionDescriptor", new Object[] {name, location} )); - } - - } - - /** - * Returns a JNLPFile for the extension, or null if the JNLP - * file has not been resolved. - */ - public JNLPFile getJNLPFile() { - return file; - } -} - - +// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) +// +// 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.io.*; +import java.net.*; +import java.util.*; + +import net.sourceforge.jnlp.runtime.JNLPRuntime; + + +/** + * The extension element. + * + * @author Jon A. Maxwell (JAM) - initial author + * @version $Revision: 1.8 $ + */ +public class ExtensionDesc { + + /** the extension name */ + private String name; + + /** the required extension version */ + private Version version; + + /** the location of the extension JNLP file */ + private URL location; + + /** the JNLPFile the extension refers to */ + private JNLPFile file; + + /** map from ext-part to local part */ + private Map extToPart = new HashMap(); + + /** eager ext parts */ + private List eagerExtParts = new ArrayList(); + + + /** + * Create an extention descriptor. + * + * @param name the extension name + * @param version the required version of the extention JNLPFile + * @param location the location of the extention JNLP file + */ + public ExtensionDesc(String name, Version version, URL location) { + this.name = name; + this.version = version; + this.location = location; + } + + /** + * Adds an extension part to be downloaded when the specified + * part of the main JNLP file is loaded. The extension part + * will be downloaded before the application is launched if the + * lazy value is false or the part is empty or null. + * + * @param extPart the part name in the extension file + * @param part the part name in the main file + * @param lazy whether to load the part before launching + */ + protected void addPart(String extPart, String part, boolean lazy) { + extToPart.put(extPart, part); + + if (!lazy || part == null || part.length() == 0) + eagerExtParts.add(extPart); + } From ahughes at redhat.com Tue Aug 4 09:41:19 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Tue, 04 Aug 2009 16:41:19 +0000 Subject: changeset in /hg/icedtea: Fix up more DOS line endings. Message-ID: changeset 40aa38f0fe07 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=40aa38f0fe07 description: Fix up more DOS line endings. 2009-08-04 Andrew John Hughes * test/jtreg/com/sun/javatest/exec/FileTable.java, * test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java, * test/jtreg/com/sun/javatest/report/XMLReportMaker.java: Remove more DOS line endings. diffstat: 4 files changed, 900 insertions(+), 893 deletions(-) ChangeLog | 7 test/jtreg/com/sun/javatest/exec/FileTable.java | 146 - test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java | 474 ++-- test/jtreg/com/sun/javatest/report/XMLReportMaker.java | 1166 +++++----- diffs (truncated from 1821 to 500 lines): diff -r 5aca55727a2a -r 40aa38f0fe07 ChangeLog --- a/ChangeLog Tue Aug 04 17:29:24 2009 +0100 +++ b/ChangeLog Tue Aug 04 17:43:18 2009 +0100 @@ -1,3 +1,10 @@ 2009-08-04 Andrew John Hughes + + * test/jtreg/com/sun/javatest/exec/FileTable.java, + * test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java, + * test/jtreg/com/sun/javatest/report/XMLReportMaker.java: + Remove more DOS line endings. + 2009-08-04 Andrew John Hughes * netx/net/sourceforge/jnlp/DefaultLaunchHandler.java, diff -r 5aca55727a2a -r 40aa38f0fe07 test/jtreg/com/sun/javatest/exec/FileTable.java --- a/test/jtreg/com/sun/javatest/exec/FileTable.java Tue Aug 04 17:29:24 2009 +0100 +++ b/test/jtreg/com/sun/javatest/exec/FileTable.java Tue Aug 04 17:43:18 2009 +0100 @@ -24,76 +24,76 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ -package com.sun.javatest.exec; - -import com.sun.javatest.tool.UIFactory; -import java.awt.Component; -import javax.swing.Icon; -import javax.swing.JTable; -import javax.swing.ListSelectionModel; -import javax.swing.table.DefaultTableCellRenderer; - -public class FileTable extends JTable { - - - - public FileTable(FileSystemTableModel model, UIFactory uif) { - super(model); - this.uif = uif; - setCellSelectionEnabled(false); - setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - setRowSelectionAllowed(true); - setShowGrid(false); - getColumnModel().getColumn(0).setCellRenderer(new IconRenderer()); - } - - private class IconRenderer extends DefaultTableCellRenderer { - - { - up = uif.createIcon("upper"); - dir = uif.createIcon("folder"); - } - - public Component getTableCellRendererComponent(JTable table, Object value, - boolean isSelected, boolean hasFocus, int row, int column) { - - setFont(table.getFont()); - setIcon(null); - setText(""); - - if (isSelected) { - super.setForeground(table.getSelectionForeground()); - super.setBackground(table.getSelectionBackground()); - } else { - super.setForeground(table.getForeground()); - super.setBackground(table.getBackground()); - } - - if (value instanceof FileTableNode) { - FileTableNode fn = (FileTableNode) value; - if (fn.getMode() != 'f') { - if (fn.getMode() == 'u') { - setIcon(up); - return this; - } - if (fn.getMode() == 'd') { - setIcon(dir); - setText(fn.toString()); - return this; - } - } - } - return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - } - - private Icon up; - private Icon dir; - - } - - - - private UIFactory uif; - - -} +package com.sun.javatest.exec; + +import com.sun.javatest.tool.UIFactory; +import java.awt.Component; +import javax.swing.Icon; +import javax.swing.JTable; +import javax.swing.ListSelectionModel; +import javax.swing.table.DefaultTableCellRenderer; + +public class FileTable extends JTable { + + + + public FileTable(FileSystemTableModel model, UIFactory uif) { + super(model); + this.uif = uif; + setCellSelectionEnabled(false); + setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + setRowSelectionAllowed(true); + setShowGrid(false); + getColumnModel().getColumn(0).setCellRenderer(new IconRenderer()); + } + + private class IconRenderer extends DefaultTableCellRenderer { + + { + up = uif.createIcon("upper"); + dir = uif.createIcon("folder"); + } + + public Component getTableCellRendererComponent(JTable table, Object value, + boolean isSelected, boolean hasFocus, int row, int column) { + + setFont(table.getFont()); + setIcon(null); + setText(""); + + if (isSelected) { + super.setForeground(table.getSelectionForeground()); + super.setBackground(table.getSelectionBackground()); + } else { + super.setForeground(table.getForeground()); + super.setBackground(table.getBackground()); + } + + if (value instanceof FileTableNode) { + FileTableNode fn = (FileTableNode) value; + if (fn.getMode() != 'f') { + if (fn.getMode() == 'u') { + setIcon(up); + return this; + } + if (fn.getMode() == 'd') { + setIcon(dir); + setText(fn.toString()); + return this; + } + } + } + return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); + } + + private Icon up; + private Icon dir; + + } + + + + private UIFactory uif; + + +} diff -r 5aca55727a2a -r 40aa38f0fe07 test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java --- a/test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java Tue Aug 04 17:29:24 2009 +0100 +++ b/test/jtreg/com/sun/javatest/mrep/ConflictResolutionDialog.java Tue Aug 04 17:43:18 2009 +0100 @@ -24,240 +24,240 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ -package com.sun.javatest.mrep; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Container; -import java.awt.FlowLayout; -import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.BorderFactory; -import javax.swing.Box; -import javax.swing.DefaultListModel; -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.ListSelectionModel; -import javax.swing.border.Border; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; - -import com.sun.javatest.tool.UIFactory; -import javax.swing.JOptionPane; - -public class ConflictResolutionDialog extends JDialog { - - private String resolveButtonStr = "resolve"; - private String cancelButtonStr = "cancel"; - private String useMostRecentCheckBoxStr = "useMost"; - - private JCheckBox preferredReportCheckBox; - private JCheckBox useMostRecentCheckBox; - - private JButton resolveButton; - private JButton cancelButton; - - private DefaultListModel listModel; - private JList list; - - private int selectedIndex; - private boolean bPreferredReport; - private boolean bUseMostRecent; - - private UIFactory uif; - - private boolean cancel = false; - - - public ConflictResolutionDialog(JFrame parent, String testName, String[] reportsList, boolean bPreferredSet, UIFactory uif) { - super(parent, true); - this.uif = uif; - - setName("conflict"); - setTitle(uif.getI18NString("conflict.name")); - setResizable(false); - - Container cp = getContentPane(); - cp.setLayout(new BorderLayout()); - setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - ConflictResolutionActionListener conflictResolutionListener = new ConflictResolutionActionListener(); - - JLabel text = uif.createLabel("conflict.text"); - text.setText(text.getText() + " " + testName); - - - text.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); - JPanel textPanel = uif.createPanel("conflict.text.panel", new FlowLayout(FlowLayout.CENTER)); - textPanel.add(text); - - Box vBox = Box.createVerticalBox(); - - JLabel chooseText =uif.createLabel("conflict.chooseText"); - //text.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); - JPanel chooseTextPanel = uif.createPanel("conflict.choosePanel", new FlowLayout(FlowLayout.CENTER)); - chooseTextPanel.add(chooseText); - - // Build list box - listModel=new DefaultListModel(); - for (int i=0; i< reportsList.length; i++) { - listModel.addElement(reportsList[i]); - } - list = uif.createList("conflict.list", listModel); - list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - ReportsListSelectionListener rl = new ReportsListSelectionListener(); - list.addListSelectionListener(rl); - Border brd = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLACK); - list.setBorder(brd); - JScrollPane scrollPane = uif.createScrollPane(list); - Box hBox = Box.createHorizontalBox(); - //hBox.add(Box.createHorizontalStrut(20)); - hBox.add(scrollPane); - //hBox.add(Box.createHorizontalStrut(20)); - - preferredReportCheckBox = uif.createCheckBox("conflict.preffered"); - preferredReportCheckBox.setMnemonic(0); - preferredReportCheckBox.setEnabled(false); - JPanel preferredReportPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); - preferredReportPanel.add(preferredReportCheckBox); - - - useMostRecentCheckBox = uif.createCheckBox("conflict.most.recent"); - useMostRecentCheckBox.setMnemonic(1); - useMostRecentCheckBox.addActionListener(conflictResolutionListener); - useMostRecentCheckBox.setActionCommand(useMostRecentCheckBoxStr); - JPanel useRecentPanel = uif.createPanel("conflict.recent", new FlowLayout(FlowLayout.LEFT)); - useRecentPanel.add(useMostRecentCheckBox); - - - - vBox.setBorder(BorderFactory.createEmptyBorder(0,20,0,20)); - vBox.add(chooseTextPanel); - vBox.add(hBox); - // if preferred report was already chosen, in previous dialogs, it should not be seen here - if (!bPreferredSet) { - vBox.add(preferredReportPanel); - } - vBox.add(useRecentPanel); - - - // Build control buttons - JPanel controlButtonsPanel = uif.createPanel("conflict.control", new FlowLayout(FlowLayout.CENTER)); - JPanel p2 = new JPanel(); - p2.setLayout(new GridLayout(1,0,5,5)); - - resolveButton = uif.createButton("conflict.resolve"); - resolveButton.setMnemonic(0); - resolveButton.addActionListener(conflictResolutionListener); - resolveButton.setActionCommand(resolveButtonStr); - resolveButton.setEnabled(false); - - cancelButton = uif.createButton("conflict.cancel"); - cancelButton.addActionListener(conflictResolutionListener); - cancelButton.setActionCommand(cancelButtonStr); - - p2.add(resolveButton); - p2.add(cancelButton); - - controlButtonsPanel.add(p2); - controlButtonsPanel.setBorder(BorderFactory.createEmptyBorder(20,0,0,0)); - - cp.add(textPanel, BorderLayout.NORTH); - cp.add(vBox, BorderLayout.CENTER); - cp.add(controlButtonsPanel, BorderLayout.SOUTH); - - pack(); - setLocationRelativeTo(parent); - } - - public int getSelectedIndex() { - return selectedIndex; - } - public boolean getPreferredReport() { - return bPreferredReport; - } - - public boolean getUseMostRecent() { - return bUseMostRecent; - } - - public boolean wasCanceled() { - return cancel; - } - - class CancelException extends Exception { - - } - - - class ConflictResolutionActionListener implements ActionListener { - - public void actionPerformed(ActionEvent e) { - - String cmd = e.getActionCommand(); - if (cmd.equals(cancelButtonStr)) { - - if (uif.showYesNoDialog("conflict.areyousure") != JOptionPane.YES_OPTION) - return; - - ConflictResolutionDialog.this.cancel = true; - ConflictResolutionDialog.this.dispose(); - } else if (cmd.equals(resolveButtonStr)) { - bUseMostRecent = useMostRecentCheckBox.isSelected(); - bPreferredReport = preferredReportCheckBox.isSelected(); - selectedIndex = list.getSelectedIndex(); - ConflictResolutionDialog.this.dispose(); - - } else if (cmd.equals(useMostRecentCheckBoxStr)) { - if ((list.getSelectedValues().length == 0) && - (!useMostRecentCheckBox.isSelected())) { - resolveButton.setEnabled(false); - } else { - resolveButton.setEnabled(true); - } - - - if (useMostRecentCheckBox.isSelected()) { - list.setEnabled(false); - preferredReportCheckBox.setEnabled(false); - } else { - list.setEnabled(true); - preferredReportCheckBox.setEnabled(true); - } - } else - ; // ignore events on all other objects - } - } - - - class ReportsListSelectionListener implements ListSelectionListener { - public void valueChanged(ListSelectionEvent e) { - if(e.getValueIsAdjusting()) return; - - if ((list.getSelectedValues().length == 0) && - (!useMostRecentCheckBox.isSelected())) { - resolveButton.setEnabled(false); - } else { - resolveButton.setEnabled(true); - } - - - if (list.getSelectedValues().length == 0) { - preferredReportCheckBox.setEnabled(false); - } else { - preferredReportCheckBox.setEnabled(true); - } - - } - } - -} - +package com.sun.javatest.mrep; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.FlowLayout; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.DefaultListModel; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.ListSelectionModel; +import javax.swing.border.Border; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; + +import com.sun.javatest.tool.UIFactory; +import javax.swing.JOptionPane; + +public class ConflictResolutionDialog extends JDialog { + + private String resolveButtonStr = "resolve"; + private String cancelButtonStr = "cancel"; + private String useMostRecentCheckBoxStr = "useMost"; + + private JCheckBox preferredReportCheckBox; + private JCheckBox useMostRecentCheckBox; + + private JButton resolveButton; + private JButton cancelButton; + + private DefaultListModel listModel; + private JList list; + + private int selectedIndex; + private boolean bPreferredReport; + private boolean bUseMostRecent; + + private UIFactory uif; + + private boolean cancel = false; + + + public ConflictResolutionDialog(JFrame parent, String testName, String[] reportsList, boolean bPreferredSet, UIFactory uif) { + super(parent, true); + this.uif = uif; + + setName("conflict"); + setTitle(uif.getI18NString("conflict.name")); + setResizable(false); + + Container cp = getContentPane(); + cp.setLayout(new BorderLayout()); + setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + ConflictResolutionActionListener conflictResolutionListener = new ConflictResolutionActionListener(); + + JLabel text = uif.createLabel("conflict.text"); + text.setText(text.getText() + " " + testName); + + + text.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); + JPanel textPanel = uif.createPanel("conflict.text.panel", new FlowLayout(FlowLayout.CENTER)); + textPanel.add(text); + + Box vBox = Box.createVerticalBox(); + + JLabel chooseText =uif.createLabel("conflict.chooseText"); + //text.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); + JPanel chooseTextPanel = uif.createPanel("conflict.choosePanel", new FlowLayout(FlowLayout.CENTER)); + chooseTextPanel.add(chooseText); + + // Build list box + listModel=new DefaultListModel(); + for (int i=0; i< reportsList.length; i++) { + listModel.addElement(reportsList[i]); + } + list = uif.createList("conflict.list", listModel); + list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + From gnu_andrew at member.fsf.org Tue Aug 4 09:45:28 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 4 Aug 2009 17:45:28 +0100 Subject: DOS Line Ending Patches Message-ID: <17c6771e0908040945r7b279b8fue3374f6075e54bc4@mail.gmail.com> When porting the patches for netx to IcedTea7, I noticed that a few of the files were using DOS line endings. So I did a quick scan with find and dos2unix, fixed all files to use UNIX line endings and pushed patches to both 6 and 7 to keep things in sync. I think that's trivial enough to not need approval ;) Cheers, -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From doko at ubuntu.com Tue Aug 4 09:53:37 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Tue, 04 Aug 2009 16:53:37 +0000 Subject: changeset in /hg/icedtea6: Fix shark build failure with llvm trunk Message-ID: changeset bf12ce0165c0 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=bf12ce0165c0 description: Fix shark build failure with llvm trunk 2009-08-04 Matthias Klose * ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061. ConstantInt API moved back to the 2.5 API, ConstantFP partially moved back to the 2.5 API. diffstat: 2 files changed, 16 insertions(+), 36 deletions(-) ChangeLog | 6 +++ ports/hotspot/src/share/vm/shark/llvmValue.hpp | 46 +++++------------------- diffs (96 lines): diff -r e315bc774531 -r bf12ce0165c0 ChangeLog --- a/ChangeLog Tue Aug 04 17:39:11 2009 +0100 +++ b/ChangeLog Tue Aug 04 18:48:17 2009 +0200 @@ -1,3 +1,9 @@ 2009-08-04 Andrew John Hughes + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061. + ConstantInt API moved back to the 2.5 API, ConstantFP partially moved + back to the 2.5 API. + 2009-08-04 Andrew John Hughes * rt/net/sourceforge/jnlp/DefaultLaunchHandler.java, diff -r e315bc774531 -r bf12ce0165c0 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Aug 04 17:39:11 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Aug 04 18:48:17 2009 +0200 @@ -27,50 +27,32 @@ class LLVMValue : public AllStatic { public: static llvm::ConstantInt* jbyte_constant(jbyte value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jbyte_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); -#endif } static llvm::ConstantInt* jint_constant(jint value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jint_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jint_type(), value, true); -#endif } static llvm::ConstantInt* jlong_constant(jlong value) { + return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); + } + static llvm::ConstantFP* jfloat_constant(jfloat value) + { #if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jlong_type(), value, true); + return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); #else - return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); + return llvm::ConstantFP::get(SharkType::jfloat_type(), value); #endif } -#if SHARK_LLVM_VERSION >= 26 - static llvm::Constant* jfloat_constant(jfloat value) - { - return llvm::getGlobalContext().getConstantFP(SharkType::jfloat_type(), value); - } -#else - static llvm::ConstantFP* jfloat_constant(jfloat value) - { - return llvm::ConstantFP::get(SharkType::jfloat_type(), value); - } -#endif -#if SHARK_LLVM_VERSION >= 26 - static llvm::Constant* jdouble_constant(jdouble value) - { - return llvm::getGlobalContext().getConstantFP(SharkType::jdouble_type(), value); - } -#else static llvm::ConstantFP* jdouble_constant(jdouble value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); +#else return llvm::ConstantFP::get(SharkType::jdouble_type(), value); +#endif } -#endif static llvm::ConstantPointerNull* null() { return llvm::ConstantPointerNull::get(SharkType::jobject_type()); @@ -79,18 +61,10 @@ class LLVMValue : public AllStatic { public: static llvm::ConstantInt* bit_constant(int value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(llvm::Type::Int1Ty, value, false); -#else return llvm::ConstantInt::get(llvm::Type::Int1Ty, value, false); -#endif } static llvm::ConstantInt* intptr_constant(intptr_t value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::intptr_type(), value, false); -#else return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); -#endif } }; From gnu_andrew at member.fsf.org Tue Aug 4 12:15:44 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Tue, 4 Aug 2009 20:15:44 +0100 Subject: Shark and IcedTea7 In-Reply-To: <17c6771e0908040546s1d37fcceofad26e6fa9a27c11@mail.gmail.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> <4A78219D.8000407@ubuntu.com> <17c6771e0908040546s1d37fcceofad26e6fa9a27c11@mail.gmail.com> Message-ID: <17c6771e0908041215x21be9f61g2eba44398d8cf417@mail.gmail.com> 2009/8/4 Andrew John Hughes : > 2009/8/4 Matthias Klose : >> On 03.08.2009 20:03, Andrew John Hughes wrote: >>> >>> I've forwardported the latest IcedTea6 changest to Shark to 7 and >>> pushed them. ?However, I haven't been able to successfully build with >>> them. ?The version of LLVM with which I was building was apparently >>> now too old. ?It seems the latest SVN may be too new: >>> >>> In file included from ../generated/incls/_sharkBuilder.cpp.incl:3, >>> ? ? ? ? ? ? ? ? ?from >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuilder.cpp:27: >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::ConstantInt* >>> LLVMValue::jbyte_constant(jbyte)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:31: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::ConstantInt* >>> LLVMValue::jint_constant(jint)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:39: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::ConstantInt* >>> LLVMValue::jlong_constant(jlong)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:47: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::Constant* >>> LLVMValue::jfloat_constant(jfloat)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:55: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantFP' >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::Constant* >>> LLVMValue::jdouble_constant(jdouble)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:66: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantFP' >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::ConstantInt* >>> LLVMValue::bit_constant(int)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:83: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp: >>> In static member function 'static llvm::ConstantInt* >>> LLVMValue::intptr_constant(intptr_t)': >>> >>> /mnt/builder/shark7/openjdk-ecj/hotspot/src/share/vm/shark/llvmValue.hpp:91: >>> error: 'class llvm::LLVMContext' has no member named 'getConstantInt' >>> make[7]: *** [sharkCompiler.o] Error 1 >>> >>> There was a change to the file containing getConstantInt last Thursday: >>> >>> ------------------------------------------------------------------------ >>> r77583 | evancheng | 2009-07-30 09:44:08 +0100 (Thu, 30 Jul 2009) | 4 >>> lines >>> >>> I've changed the semantics of MERGE_VALUES a bit. It's now allowed to >>> live until scheduling. It's deleted when the scheduler translate DAG >>> nodes to machine instructions. >>> >>> This is currently used by X86 to handle atomic_load_add when the >>> output of the node is not used. I believe there is a better solution. >>> But I find MERGE_VALUES useful for selecting multi-output node when >>> the dead output can be selected as a IMPLICIT_DEF. >>> >>> but this only seems to have altered a comment. >>> >>> Any ideas? ?I've pushed because I assume that those working with Shark >>> have been successfully building it even if I can't... :) >> >> please check with the patch attached. It works for me building current >> IcedTea6. >> >> ?Matthias >> >> > > Managed to do a full build with 2.5. > > I'll try with this after I've done the plugin forwardporting. > -- > 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 > Seems to build with this patch. I'll check 2.5 still works then push. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From doko at ubuntu.com Tue Aug 4 15:33:44 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Tue, 04 Aug 2009 22:33:44 +0000 Subject: changeset in /hg/icedtea: Fix shark build failure with llvm trunk Message-ID: changeset 8d06dc9cbd73 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8d06dc9cbd73 description: Fix shark build failure with llvm trunk 2009-08-04 Matthias Klose * ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061. ConstantInt API moved back to the 2.5 API, ConstantFP partially moved back to the 2.5 API. diffstat: 2 files changed, 16 insertions(+), 36 deletions(-) ChangeLog | 6 +++ ports/hotspot/src/share/vm/shark/llvmValue.hpp | 46 +++++------------------- diffs (96 lines): diff -r 40aa38f0fe07 -r 8d06dc9cbd73 ChangeLog --- a/ChangeLog Tue Aug 04 17:43:18 2009 +0100 +++ b/ChangeLog Tue Aug 04 18:48:17 2009 +0200 @@ -1,3 +1,9 @@ 2009-08-04 Andrew John Hughes + + * ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061. + ConstantInt API moved back to the 2.5 API, ConstantFP partially moved + back to the 2.5 API. + 2009-08-04 Andrew John Hughes * test/jtreg/com/sun/javatest/exec/FileTable.java, diff -r 40aa38f0fe07 -r 8d06dc9cbd73 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Aug 04 17:43:18 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Tue Aug 04 18:48:17 2009 +0200 @@ -27,50 +27,32 @@ class LLVMValue : public AllStatic { public: static llvm::ConstantInt* jbyte_constant(jbyte value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jbyte_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jbyte_type(), value, true); -#endif } static llvm::ConstantInt* jint_constant(jint value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jint_type(), value, true); -#else return llvm::ConstantInt::get(SharkType::jint_type(), value, true); -#endif } static llvm::ConstantInt* jlong_constant(jlong value) { + return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); + } + static llvm::ConstantFP* jfloat_constant(jfloat value) + { #if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::jlong_type(), value, true); + return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); #else - return llvm::ConstantInt::get(SharkType::jlong_type(), value, true); + return llvm::ConstantFP::get(SharkType::jfloat_type(), value); #endif } -#if SHARK_LLVM_VERSION >= 26 - static llvm::Constant* jfloat_constant(jfloat value) - { - return llvm::getGlobalContext().getConstantFP(SharkType::jfloat_type(), value); - } -#else - static llvm::ConstantFP* jfloat_constant(jfloat value) - { - return llvm::ConstantFP::get(SharkType::jfloat_type(), value); - } -#endif -#if SHARK_LLVM_VERSION >= 26 - static llvm::Constant* jdouble_constant(jdouble value) - { - return llvm::getGlobalContext().getConstantFP(SharkType::jdouble_type(), value); - } -#else static llvm::ConstantFP* jdouble_constant(jdouble value) { +#if SHARK_LLVM_VERSION >= 26 + return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); +#else return llvm::ConstantFP::get(SharkType::jdouble_type(), value); +#endif } -#endif static llvm::ConstantPointerNull* null() { return llvm::ConstantPointerNull::get(SharkType::jobject_type()); @@ -79,18 +61,10 @@ class LLVMValue : public AllStatic { public: static llvm::ConstantInt* bit_constant(int value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(llvm::Type::Int1Ty, value, false); -#else return llvm::ConstantInt::get(llvm::Type::Int1Ty, value, false); -#endif } static llvm::ConstantInt* intptr_constant(intptr_t value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::getGlobalContext().getConstantInt(SharkType::intptr_type(), value, false); -#else return llvm::ConstantInt::get(SharkType::intptr_type(), value, false); -#endif } }; From Joe.Darcy at Sun.COM Tue Aug 4 17:51:22 2009 From: Joe.Darcy at Sun.COM (Joe Darcy) Date: Tue, 04 Aug 2009 17:51:22 -0700 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> Message-ID: <4A78D78A.5000604@sun.com> Kelly, Do you have any ideas on how to resolve Andrew's push problem? Thanks, -Joe Andrew John Hughes wrote: > 2009/8/2 Joseph D. Darcy : >> Erik Trimble wrote: >>> Andrew John Hughes wrote: >>>> Here it is, the mother of all webrevs: >>>> >>>> http://cr.openjdk.java.net/~andrew/jdk6-hs14-merge/webrev.01/ >>>> >>>> with the patch itself being ~13mb. >>>> >>>> This takes OpenJDK6 up to HotSpot 14 build 16 (see >>>> http://hg.openjdk.java.net/hsx/hsx14/master/), incorporating 553 >>>> changesets from the hs14 repo. and one merge changeset. >>>> I'll shortly push this to http://fuseyism.com/hg/hotspot too. >>>> >>>> Ok to push? >>>> >>> I approve. >>> >> I've taken a look too and don't see anything amiss; approved! >> >> Thanks, >> >> -Joe >> > > > Thanks Erik and Joe for the (very quick) approval! Wasn't expecting > that over a weekend :) > > It looks like pushing isn't working too well though: > > pushing to ssh://andrew at hg.openjdk.java.net/jdk6/jdk6-gate/hotspot > searching for changes > remote: adding changesets > remote: abort: Permission denied: > /hg/jdk6/jdk6-gate/hotspot/.hg/store/00changelog.i > abort: unexpected response: empty string > > I've pushed to various trees before (tl, awt, build, icedtea, cvmi) so > I'm guessing this might be related to some permission issues following > the replacement of hotspot? > > Any ideas? CCing Mark Reinhold as well as he manages hg. > > Thanks, From Tim.Bell at Sun.COM Tue Aug 4 18:08:16 2009 From: Tim.Bell at Sun.COM (Tim Bell) Date: Tue, 04 Aug 2009 18:08:16 -0700 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <4A78D78A.5000604@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> Message-ID: <4A78DB80.2030504@sun.com> Andrew wrote: >> It looks like pushing isn't working too well though: >> >> pushing to ssh://andrew at hg.openjdk.java.net/jdk6/jdk6-gate/hotspot >> searching for changes >> remote: adding changesets >> remote: abort: Permission denied: >> /hg/jdk6/jdk6-gate/hotspot/.hg/store/00changelog.i >> abort: unexpected response: empty string >> >> I've pushed to various trees before (tl, awt, build, icedtea, cvmi) so >> I'm guessing this might be related to some permission issues following >> the replacement of hotspot? >> >> Any ideas? CCing Mark Reinhold as well as he manages hg. Mark is on vacation, so I took a look at this. The problem seems to be that some files on hg.ojn belong to group 'green' instead of group 'hg'. I reset that. Andrew: please try your push again and let us know how it works. HTH- Tim P.S.: the 'green' group dates back to the early days of the 'Oak' project- long before this thing called Java[tm] was unleashed on the world. It is still around. From gnu_andrew at member.fsf.org Tue Aug 4 18:17:04 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 5 Aug 2009 02:17:04 +0100 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <4A78DB80.2030504@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> Message-ID: <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> 2009/8/5 Tim Bell : > Andrew wrote: > >>> It looks like pushing isn't working too well though: >>> >>> pushing to ssh://andrew at hg.openjdk.java.net/jdk6/jdk6-gate/hotspot >>> searching for changes >>> remote: adding changesets >>> remote: abort: Permission denied: >>> /hg/jdk6/jdk6-gate/hotspot/.hg/store/00changelog.i >>> abort: unexpected response: empty string >>> >>> I've pushed to various trees before (tl, awt, build, icedtea, cvmi) so >>> I'm guessing this might be related to some permission issues following >>> the replacement of hotspot? >>> >>> Any ideas? CCing Mark Reinhold as well as he manages hg. > > Mark is on vacation, so I took a look at this. ?The problem seems to > be that some files on hg.ojn belong to group 'green' instead of group 'hg'. > I reset that. > > Andrew: please try your push again and let us know how it works. > > HTH- > ?Tim > > P.S.: the 'green' group dates back to the early days of the 'Oak' project- > long before this thing called Java[tm] was unleashed on the world. ?It is > still around. > Nope, still the same error :( -- 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 Tim.Bell at Sun.COM Tue Aug 4 18:33:05 2009 From: Tim.Bell at Sun.COM (Tim Bell) Date: Tue, 04 Aug 2009 18:33:05 -0700 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> Message-ID: <4A78E151.9070304@sun.com> Andrew John Hughes wrote: > Nope, still the same error :( So I needed to fix the group ownership and also add group write permissions on a few files. Andrew: Sorry for the delay - Please try it again? Thanks- Tim From gbenson at redhat.com Wed Aug 5 02:14:19 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 5 Aug 2009 10:14:19 +0100 Subject: Shark and IcedTea7 In-Reply-To: <17c6771e0908040546s1d37fcceofad26e6fa9a27c11@mail.gmail.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> <4A78219D.8000407@ubuntu.com> <17c6771e0908040546s1d37fcceofad26e6fa9a27c11@mail.gmail.com> Message-ID: <20090805091419.GA3248@redhat.com> Andrew John Hughes wrote: > Managed to do a full build with 2.5. Cool :) Cheers, Gary -- http://gbenson.net/ From ahughes at redhat.com Wed Aug 5 03:45:56 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 05 Aug 2009 10:45:56 +0000 Subject: changeset in /hg/icedtea: Fix CACAO bootstrap issues with b66. Message-ID: changeset 777441157d99 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=777441157d99 description: Fix CACAO bootstrap issues with b66. 2009-08-04 Andrew John Hughes * Makefile.am: Add new CACAO patches. * patches/cacao/version.patch: Patch classfile version to 51 (Java 1.7). * patches/cacao/versioninfo.patch: Implement JVM_GetVersionInfo. diffstat: 4 files changed, 57 insertions(+), 1 deletion(-) ChangeLog | 9 +++++++++ Makefile.am | 4 +++- patches/cacao/version.patch | 21 +++++++++++++++++++++ patches/cacao/versioninfo.patch | 24 ++++++++++++++++++++++++ diffs (83 lines): diff -r 8d06dc9cbd73 -r 777441157d99 ChangeLog --- a/ChangeLog Tue Aug 04 18:48:17 2009 +0200 +++ b/ChangeLog Wed Aug 05 11:48:16 2009 +0100 @@ -1,3 +1,12 @@ 2009-08-04 Matthias Klose + + * Makefile.am: + Add new CACAO patches. + * patches/cacao/version.patch: + Patch classfile version to 51 (Java 1.7). + * patches/cacao/versioninfo.patch: + Implement JVM_GetVersionInfo. + 2009-08-04 Matthias Klose * ports/hotspot/src/share/vm/shark/llvmValue.hpp: Adjust to rev 78061. diff -r 8d06dc9cbd73 -r 777441157d99 Makefile.am --- a/Makefile.am Tue Aug 04 18:48:17 2009 +0200 +++ b/Makefile.am Wed Aug 05 11:48:16 2009 +0100 @@ -2085,7 +2085,9 @@ ICEDTEA_PATCHES += \ patches/cacao/native-resolve.patch \ patches/cacao/xxoption-warning.patch \ patches/cacao/no-strict-aliasing.patch \ - patches/cacao/openjdk7.patch + patches/cacao/openjdk7.patch \ + patches/cacao/version.patch \ + patches/cacao/versioninfo.patch endif if WITH_CACAO diff -r 8d06dc9cbd73 -r 777441157d99 patches/cacao/version.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/version.patch Wed Aug 05 11:48:16 2009 +0100 @@ -0,0 +1,21 @@ +diff -Nru cacao.orig2/cacao/src/vm/global.h cacao2/cacao/src/vm/global.h +--- cacao.orig/cacao/src/vm/global.h 2009-08-05 01:12:02.000000000 +0100 ++++ cacao/cacao/src/vm/global.h 2009-08-05 01:51:01.000000000 +0100 +@@ -132,14 +132,14 @@ + + /* some Java related defines **************************************************/ + +-#define JAVA_VERSION "1.5.0" /* this version is supported by CACAO */ +-#define CLASS_VERSION "50.0" ++#define JAVA_VERSION "1.7.0" /* this version is supported by CACAO */ ++#define CLASS_VERSION "51.0" + + + /* Java class file constants **************************************************/ + + #define MAGIC 0xCAFEBABE +-#define MAJOR_VERSION 50 ++#define MAJOR_VERSION 51 + #define MINOR_VERSION 0 + + diff -r 8d06dc9cbd73 -r 777441157d99 patches/cacao/versioninfo.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/versioninfo.patch Wed Aug 05 11:48:16 2009 +0100 @@ -0,0 +1,24 @@ +diff -Nru cacao.orig/cacao/src/native/vm/openjdk/jvm.c cacao/cacao/src/native/vm/openjdk/jvm.c +--- cacao.orig/cacao/src/native/vm/openjdk/jvm.c 2009-08-05 01:22:03.000000000 +0100 ++++ cacao/cacao/src/native/vm/openjdk/jvm.c 2009-08-05 01:48:46.000000000 +0100 +@@ -3645,7 +3645,19 @@ + + void JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size) + { +- log_println("JVM_GetVersionInfo: IMPLEMENT ME!"); ++ TRACEJVMCALLS(("JVM_GetVersionInfo(env=%p, info=%p, info_size=%ld)", env, info, info_size)); ++ ++ memset(info, 0, sizeof(info_size)); ++ ++ int major = atoi(VERSION); ++ const char* minor_string = strchr(VERSION, '.'); ++ int minor = atoi(++minor_string); ++ int micro = atoi(strchr(minor_string, '.') + 1); ++ ++ info->jvm_version = (major << 24) | (minor << 16) | (micro << 8); ++ info->update_version = 0; ++ info->special_update_version = 0; ++ info->is_attachable = 0; + } + + From gnu_andrew at member.fsf.org Wed Aug 5 03:50:34 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 5 Aug 2009 11:50:34 +0100 Subject: Shark and IcedTea7 In-Reply-To: <20090805091419.GA3248@redhat.com> References: <17c6771e0908031103g49058689m5f91772f57d76be7@mail.gmail.com> <4A78219D.8000407@ubuntu.com> <17c6771e0908040546s1d37fcceofad26e6fa9a27c11@mail.gmail.com> <20090805091419.GA3248@redhat.com> Message-ID: <17c6771e0908050350q4b82c8f6rcbfeb6b26c290e7d@mail.gmail.com> 2009/8/5 Gary Benson : > Andrew John Hughes wrote: >> Managed to do a full build with 2.5. > > Cool :) > > Cheers, > Gary > > -- > http://gbenson.net/ > With doko's patch, I also managed this with SVN :) -- 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 Wed Aug 5 03:57:49 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Wed, 5 Aug 2009 11:57:49 +0100 Subject: [FOR REVIEW] hs14 merge for OpenJDK6 In-Reply-To: <4A78E151.9070304@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> <4A78E151.9070304@sun.com> Message-ID: <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> 2009/8/5 Tim Bell : > Andrew John Hughes wrote: > >> Nope, still the same error :( > > So I needed to fix the group ownership and also add group write permissions > on a few files. > > Andrew: Sorry for the delay - Please try it again? > > Thanks- > > Tim > Thanks Tim, that seems to have fixed the permissions issue. There now seems to be an issue with jcheck, as the merge causes some bugids to be repeated: pushing to ssh://hg.openjdk.java.net/jdk6/jdk6-gate/hotspot searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 555 changesets with 4771 changes to 1453 files remote: remote: > Changeset: 100:d821d920b465 remote: > Author: kvn remote: > Date: 2008-03-11 11:04 remote: > remote: > 6623167: C2 crashed in StoreCMNode::Value remote: > Summary: C2 crashed in StoreCMNode::Value because n->in(MemNode::OopStore) is 0. remote: > Reviewed-by: rasbold, never remote: remote: Bugid 6623167 already used in this repository, in revision 20 remote: remote: > Changeset: 104:2c106685d6d0 remote: > Author: dcubed remote: > Date: 2008-03-12 18:06 remote: > remote: > 6497639: 4/3 Profiling Swing application caused JVM crash remote: > Summary: Make RedefineClasses() interoperate better with class sharing. remote: > Reviewed-by: sspitsyn, jmasa remote: remote: Bugid 6497639 already used in this repository, in revision 20 remote: remote: > Changeset: 105:d8b3ef7ee3e5 remote: > Author: dcubed remote: > Date: 2008-03-12 18:07 remote: > remote: > 6599425: 4/3 OopMapCache::lookup() can cause later crash or assert() failure remote: > Summary: Add should_not_be_cached() to markOop and methodOop and query that status inOopMapCache::lookup() remote: > Reviewed-by: coleenp, sspitsyn, jmasa remote: remote: Bugid 6599425 already used in this repository, in revision 20 remote: remote: > Changeset: 240:65fe2bd88839 remote: > Author: never remote: > Date: 2008-06-05 21:44 remote: > remote: > 6614100: EXCEPTION_ACCESS_VIOLATION while running Eclipse with 1.6.0_05-ea remote: > Reviewed-by: kvn, jrose, rasbold remote: remote: Bugid 6614100 already used in this repository, in revision 20 remote: remote: > Changeset: 286:3e82d72933d0 remote: > Author: xlu remote: > Date: 2008-06-26 14:15 remote: > remote: > 6718830: Hotspot fails to build with gcc 4.3 remote: > Summary: Fixed linux make file and couple adlc code to meet the changes of gcc 4.3 remote: > Reviewed-by: kamg, igor remote: remote: Bugid 6718830 already used in this repository, in revision 32 remote: remote: > Changeset: 289:551f4309f476 remote: > Author: ohair remote: > Date: 2008-07-03 10:46 remote: > remote: > 6695777: Queens.class should be built from source, not put in source repo remote: > Reviewed-by: kvn remote: remote: Bugid 6695777 already used in this repository, in revision 20 remote: remote: > Changeset: 314:54499b980c23 remote: > Author: swamyv remote: > Date: 2008-07-29 13:54 remote: > remote: > 6710791: Remove files or build from source:maf-1_0.jar, jlfg-1_0.jar remote: > Summary: Removed maf-1_0.jar and jlfg-1_0.jar files. remote: > Reviewed-by: poonam, jjh remote: remote: Bugid 6710791 already used in this repository, in revision 20 remote: remote: > Changeset: 360:fa4d1d240383 remote: > Author: never remote: > Date: 2008-08-26 15:49 remote: > remote: > 6741642: bad enum definition in ciTypeFlow.hpp remote: > Reviewed-by: rasbold, martin remote: > Contributed-by: doko at ubuntu.com remote: remote: Bugid 6741642 already used in this repository, in revision 22 remote: remote: > Changeset: 589:748572b86af6 remote: > Author: never remote: > Date: 2009-04-07 14:46 remote: > remote: > 6636360: compiler/6595044/Main.java test fails with 64bit java on solaris-sparcv9 with SIGSEGV remote: > Reviewed-by: kvn, twisti remote: remote: Bugid 6636360 already used in this repository, in revision 29 remote: remote: abort: pretxnchangegroup.0.jcheck hook failed remote: transaction abort! remote: rollback completed abort: unexpected response: empty string Is there a way of getting it to ignore these for this one push? I don't know of a way to just pull out these nine changesets from the 555 waiting to go... -- 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 ahughes at redhat.com Wed Aug 5 06:17:34 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 05 Aug 2009 13:17:34 +0000 Subject: changeset in /hg/icedtea: Enable warnings only when --enable-war... Message-ID: changeset 7a7436abd808 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=7a7436abd808 description: Enable warnings only when --enable-warnings is given. 2009-08-04 Andrew John Hughes * Makefile.am: Remove unnecessary whitespace. * acinclude.m4: (IT_CHECK_ENABLE_WARNINGS): Add --enable-warnings option to turn javac warnings on and off. * configure.ac: Enable IT_CHECK_ENABLE_WARNINGS macro. * javac.in: Turn on warnings only when specified. diffstat: 5 files changed, 43 insertions(+), 3 deletions(-) ChangeLog | 12 ++++++++++++ Makefile.am | 2 +- acinclude.m4 | 17 +++++++++++++++++ configure.ac | 1 + javac.in | 14 ++++++++++++-- diffs (90 lines): diff -r 777441157d99 -r 7a7436abd808 ChangeLog --- a/ChangeLog Wed Aug 05 11:48:16 2009 +0100 +++ b/ChangeLog Wed Aug 05 14:19:58 2009 +0100 @@ -1,3 +1,15 @@ 2009-08-04 Andrew John Hughes + + * Makefile.am: + Remove unnecessary whitespace. + * acinclude.m4: + (IT_CHECK_ENABLE_WARNINGS): Add --enable-warnings + option to turn javac warnings on and off. + * configure.ac: + Enable IT_CHECK_ENABLE_WARNINGS macro. + * javac.in: + Turn on warnings only when specified. + 2009-08-04 Andrew John Hughes * Makefile.am: diff -r 777441157d99 -r 7a7436abd808 Makefile.am --- a/Makefile.am Wed Aug 05 11:48:16 2009 +0100 +++ b/Makefile.am Wed Aug 05 14:19:58 2009 +0100 @@ -3232,7 +3232,7 @@ NPPLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedT IcedTeaPluginUtils.o IcedTeaNPPlugin_objects: - cd $(NPPLUGIN_DIR); \ + cd $(NPPLUGIN_DIR); \ if [ -e $(abs_top_srcdir)/.hg ] && which $(HG) >/dev/null; then \ revision="-r`(cd $(abs_top_srcdir); $(HG) tip --template '{rev}')`" ; \ fi ; \ diff -r 777441157d99 -r 7a7436abd808 acinclude.m4 --- a/acinclude.m4 Wed Aug 05 11:48:16 2009 +0100 +++ b/acinclude.m4 Wed Aug 05 14:19:58 2009 +0100 @@ -1630,3 +1630,20 @@ AC_SUBST(USING_ECJ) AC_SUBST(USING_ECJ) AC_PROVIDE([$0])dnl ]) + +AC_DEFUN([IT_CHECK_ENABLE_WARNINGS], +[ + AC_MSG_CHECKING(whether to enable Java compiler warnings) + AC_ARG_ENABLE([warnings], + [AS_HELP_STRING(--enable-warnings,produce warnings from javac/ecj [[default=no]])], + [ + ENABLE_WARNINGS="${enableval}" + ], + [ + ENABLE_WARNINGS=no + ]) + + AC_MSG_RESULT(${ENABLE_WARNINGS}) + AM_CONDITIONAL(ENABLE_WARNINGS, test x"${ENABLE_WARNINGS}" = "xyes") + AC_SUBST(ENABLE_WARNINGS) +]) diff -r 777441157d99 -r 7a7436abd808 configure.ac --- a/configure.ac Wed Aug 05 11:48:16 2009 +0100 +++ b/configure.ac Wed Aug 05 14:19:58 2009 +0100 @@ -231,6 +231,7 @@ IT_LIBRARY_CHECK IT_LIBRARY_CHECK IT_SCANNER_CHECK IT_PR40630_CHECK +IT_CHECK_ENABLE_WARNINGS FIND_RHINO_JAR WITH_OPENJDK_SRC_ZIP diff -r 777441157d99 -r 7a7436abd808 javac.in --- a/javac.in Wed Aug 05 11:48:16 2009 +0100 +++ b/javac.in Wed Aug 05 14:19:58 2009 +0100 @@ -3,8 +3,18 @@ use constant NO_DUP_ARGS => qw(-source - use constant NO_DUP_ARGS => qw(-source -target -d -encoding); use constant STRIP_ARGS => qw(-Werror); -my $ECJ_WARNINGS="-warn:-deprecation,serial,unused,warningToken"; -my $JAVAC_WARNINGS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"; +my ($ECJ_WARNINGS, $JAVAC_WARNINGS); + +if ("@ENABLE_WARNINGS@" eq "yes") +{ + $ECJ_WARNINGS="-warn:-deprecation,serial,unused,warningToken"; + $JAVAC_WARNINGS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"; +} +else +{ + $ECJ_WARNINGS="-nowarn"; + $JAVAC_WARNINGS="-nowarn"; +} my @bcoption; push @bcoption, '-bootclasspath', glob '@SYSTEM_JDK_DIR@/jre/lib/rt.jar' From ahughes at redhat.com Wed Aug 5 07:19:55 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 05 Aug 2009 14:19:55 +0000 Subject: changeset in /hg/icedtea: Security patches for netx+plugin. Message-ID: changeset 77ea95965bad in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=77ea95965bad description: Security patches for netx+plugin. 2009-08-05 Lillian Angel * plugin/icedtea/netscape/javascript/JSObject.java: Security patch applied to disallow the ability to run unsigned code as signed under some cases. * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Likewise. * netx/net/sourceforge/jnlp/SecurityDesc.java: Likewise. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Likewise. * plugin/icedtea/netscape/javascript/JSObjectCreatePermission.java: Likewise. * netx/netscape/javascript/JSObjectCreatePermission.java: Likewise. diffstat: 7 files changed, 360 insertions(+), 180 deletions(-) ChangeLog | 13 netx/net/sourceforge/jnlp/SecurityDesc.java | 24 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 366 +++++----- netx/netscape/javascript/JSObjectCreatePermission.java | 47 + plugin/icedtea/netscape/javascript/JSObject.java | 37 - plugin/icedtea/netscape/javascript/JSObjectCreatePermission.java | 47 + plugin/icedtea/sun/applet/PluginAppletSecurityContext.java | 6 diffs (truncated from 826 to 500 lines): diff -r adadd58eff31 -r 77ea95965bad ChangeLog --- a/ChangeLog Wed Aug 05 15:02:51 2009 +0100 +++ b/ChangeLog Wed Aug 05 15:22:13 2009 +0100 @@ -1,3 +1,16 @@ 2009-08-04 Andrew John Hughes + + * plugin/icedtea/netscape/javascript/JSObject.java: Security patch + applied to disallow the ability to run unsigned code as + signed under some cases. + * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: + Likewise. + * netx/net/sourceforge/jnlp/SecurityDesc.java: Likewise. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Likewise. + * plugin/icedtea/netscape/javascript/JSObjectCreatePermission.java: + Likewise. + * netx/netscape/javascript/JSObjectCreatePermission.java: Likewise. + 2009-08-04 Andrew John Hughes * Makefile.am: diff -r adadd58eff31 -r 77ea95965bad netx/net/sourceforge/jnlp/SecurityDesc.java --- a/netx/net/sourceforge/jnlp/SecurityDesc.java Wed Aug 05 15:02:51 2009 +0100 +++ b/netx/net/sourceforge/jnlp/SecurityDesc.java Wed Aug 05 15:22:13 2009 +0100 @@ -166,6 +166,30 @@ public class SecurityDesc { return permissions; } + + /** + * Returns a PermissionCollection containing the sandbox permissions + */ + public PermissionCollection getSandBoxPermissions() { + + Permissions permissions = new Permissions(); + + for (int i=0; i < sandboxPermissions.length; i++) + permissions.add(sandboxPermissions[i]); + + if (downloadHost != null) + permissions.add(new SocketPermission(downloadHost, + "connect, accept")); + + // properties + PropertyDesc props[] = file.getResources().getProperties(); + for (int i=0; i < props.length; i++) { + // should only allow jnlp.* properties if in sandbox? + permissions.add(new PropertyPermission(props[i].getKey(), "read,write")); + } + + return permissions; + } } diff -r adadd58eff31 -r 77ea95965bad netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Aug 05 15:02:51 2009 +0100 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Aug 05 15:22:13 2009 +0100 @@ -1,15 +1,15 @@ -// +// // 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. @@ -66,7 +66,7 @@ import sun.misc.JarIndex; * security context when the classloader was created. * * @author Jon A. Maxwell (JAM) - initial author - * @version $Revision: 1.20 $ + * @version $Revision: 1.20 $ */ public class JNLPClassLoader extends URLClassLoader { @@ -115,29 +115,29 @@ public class JNLPClassLoader extends URL /** the security section */ private SecurityDesc security; - + /** Permissions granted by the user during runtime. */ private ArrayList runtimePermissions = new ArrayList(); /** all jars not yet part of classloader or active */ private List available = new ArrayList(); - /** all of the jar files that were verified */ - private ArrayList verifiedJars = null; - - /** all of the jar files that were not verified */ - private ArrayList unverifiedJars = null; - - /** the jarsigner tool to verify our jars */ - private JarSigner js = null; - - private boolean signing = false; - - /** ArrayList containing jar indexes for various jars available to this classloader */ - private ArrayList jarIndexes = new ArrayList(); - - /** File entries in the jar files available to this classloader */ - private TreeSet jarEntries = new TreeSet(); + /** all of the jar files that were verified */ + private ArrayList verifiedJars = null; + + /** all of the jar files that were not verified */ + private ArrayList unverifiedJars = null; + + /** the jarsigner tool to verify our jars */ + private JarSigner js = null; + + private boolean signing = false; + + /** ArrayList containing jar indexes for various jars available to this classloader */ + private ArrayList jarIndexes = new ArrayList(); + + /** File entries in the jar files available to this classloader */ + private TreeSet jarEntries = new TreeSet(); /** * Create a new JNLPClassLoader from the specified file. @@ -167,41 +167,41 @@ public class JNLPClassLoader extends URL } private void setSecurity() { - /** - * When we're trying to load an applet, file.getSecurity() will return - * null since there is no jnlp file to specify permissions. We - * determine security settings here, after trying to verify jars. - */ - if (file instanceof PluginBridge) { - if (signing == true) { - this.security = new SecurityDesc(file, - SecurityDesc.ALL_PERMISSIONS, - file.getCodeBase().getHost()); - } else { - this.security = new SecurityDesc(file, - SecurityDesc.SANDBOX_PERMISSIONS, - file.getCodeBase().getHost()); - } - } else { //regular jnlp file - - /** - * If the application is signed, then we set the SecurityDesc to the - * tag in the jnlp file. Note that if an application is - * signed, but there is no tag in the jnlp file, the - * application will get sandbox permissions. - * If the application is unsigned, we ignore the tag and - * use a sandbox instead. - */ - if (signing == true) { - this.security = file.getSecurity(); - } else { - this.security = new SecurityDesc(file, - SecurityDesc.SANDBOX_PERMISSIONS, - file.getCodeBase().getHost()); - } - } - } - + /** + * When we're trying to load an applet, file.getSecurity() will return + * null since there is no jnlp file to specify permissions. We + * determine security settings here, after trying to verify jars. + */ + if (file instanceof PluginBridge) { + if (signing == true) { + this.security = new SecurityDesc(file, + SecurityDesc.ALL_PERMISSIONS, + file.getCodeBase().getHost()); + } else { + this.security = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + file.getCodeBase().getHost()); + } + } else { //regular jnlp file + + /** + * If the application is signed, then we set the SecurityDesc to the + * tag in the jnlp file. Note that if an application is + * signed, but there is no tag in the jnlp file, the + * application will get sandbox permissions. + * If the application is unsigned, we ignore the tag and + * use a sandbox instead. + */ + if (signing == true) { + this.security = file.getSecurity(); + } else { + this.security = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + file.getCodeBase().getHost()); + } + } + } + /** * Returns a JNLP classloader for the specified JNLP file. * @@ -215,12 +215,12 @@ public class JNLPClassLoader extends URL if (location != null) loader = (JNLPClassLoader) urlToLoader.get(location); - try { - if (loader == null) - loader = new JNLPClassLoader(file, policy); - } catch (LaunchException e) { - throw e; - } + try { + if (loader == null) + loader = new JNLPClassLoader(file, policy); + } catch (LaunchException e) { + throw e; + } if (file.getInformation().isSharingAllowed()) urlToLoader.put(location, loader); @@ -230,7 +230,7 @@ public class JNLPClassLoader extends URL /** * Returns a JNLP classloader for the JNLP file at the specified - * location. + * location. * * @param location the file's location * @param version the file's version @@ -256,17 +256,17 @@ public class JNLPClassLoader extends URL loaderList.add(this); - //if (ext != null) { - for (int i=0; i < ext.length; i++) { - try { - JNLPClassLoader loader = getInstance(ext[i].getLocation(), ext[i].getVersion(), updatePolicy); - loaderList.add(loader); - } - catch (Exception ex) { - ex.printStackTrace(); - } - } - //} + //if (ext != null) { + for (int i=0; i < ext.length; i++) { + try { + JNLPClassLoader loader = getInstance(ext[i].getLocation(), ext[i].getVersion(), updatePolicy); + loaderList.add(loader); + } + catch (Exception ex) { + ex.printStackTrace(); + } + } + //} loaders = (JNLPClassLoader[]) loaderList.toArray(new JNLPClassLoader[ loaderList.size()]); } @@ -283,10 +283,10 @@ public class JNLPClassLoader extends URL jars[i].getVersion()); if (JNLPRuntime.isDebug()) { - if (p == null) - System.out.println("Unable to add permission for " + jars[i].getLocation()); - else - System.out.println("Permission added: " + p.toString()); + if (p == null) + System.out.println("Unable to add permission for " + jars[i].getLocation()); + else + System.out.println("Permission added: " + p.toString()); } if (p != null) resourcePermissions.add(p); @@ -299,14 +299,14 @@ public class JNLPClassLoader extends URL */ void initializeResources() throws LaunchException { JARDesc jars[] = resources.getJARs(); - if (jars == null || jars.length == 0) - return; - /* - if (jars == null || jars.length == 0) { - throw new LaunchException(null, null, R("LSFatal"), - R("LCInit"), R("LFatalVerification"), "No jars!"); - } - */ + if (jars == null || jars.length == 0) + return; + /* + if (jars == null || jars.length == 0) { + throw new LaunchException(null, null, R("LSFatal"), + R("LCInit"), R("LFatalVerification"), "No jars!"); + } + */ List initialJars = new ArrayList(); for (int i=0; i < jars.length; i++) { @@ -317,7 +317,7 @@ public class JNLPClassLoader extends URL initialJars.add(jars[i]); // regardless of part tracker.addResource(jars[i].getLocation(), - jars[i].getVersion(), + jars[i].getVersion(), jars[i].isCacheable() ? JNLPRuntime.getDefaultUpdatePolicy() : UpdatePolicy.FORCE ); } @@ -325,42 +325,42 @@ public class JNLPClassLoader extends URL if (strict) fillInPartJars(initialJars); // add in each initial part's lazy jars - if (JNLPRuntime.isVerifying()) { - - JarSigner js; - waitForJars(initialJars); //download the jars first. - - try { - js = verifyJars(initialJars); - } catch (Exception e) { - //we caught an Exception from the JarSigner class. - //Note: one of these exceptions could be from not being able - //to read the cacerts or trusted.certs files. - e.printStackTrace(); - throw new LaunchException(null, null, R("LSFatal"), - R("LCInit"), R("LFatalVerification"), R("LFatalVerificationInfo")); - } - - //Case when at least one jar has some signing - if (js.anyJarsSigned()){ - signing = true; - - //user does not trust this publisher - if (!js.getAlreadyTrustPublisher()) { - checkTrustWithUser(js); - } else { - /** - * If the user trusts this publisher (i.e. the publisher's certificate - * is in the user's trusted.certs file), we do not show any dialogs. - */ - } - } else { - - signing = false; - //otherwise this jar is simply unsigned -- make sure to ask - //for permission on certain actions - } - } + if (JNLPRuntime.isVerifying()) { + + JarSigner js; + waitForJars(initialJars); //download the jars first. + + try { + js = verifyJars(initialJars); + } catch (Exception e) { + //we caught an Exception from the JarSigner class. + //Note: one of these exceptions could be from not being able + //to read the cacerts or trusted.certs files. + e.printStackTrace(); + throw new LaunchException(null, null, R("LSFatal"), + R("LCInit"), R("LFatalVerification"), R("LFatalVerificationInfo")); + } + + //Case when at least one jar has some signing + if (js.anyJarsSigned()){ + signing = true; + + //user does not trust this publisher + if (!js.getAlreadyTrustPublisher()) { + checkTrustWithUser(js); + } else { + /** + * If the user trusts this publisher (i.e. the publisher's certificate + * is in the user's trusted.certs file), we do not show any dialogs. + */ + } + } else { + + signing = false; + //otherwise this jar is simply unsigned -- make sure to ask + //for permission on certain actions + } + } activateJars(initialJars); } @@ -370,7 +370,7 @@ public class JNLPClassLoader extends URL boolean b = SecurityWarningDialog.showCertWarningDialog( SecurityWarningDialog.AccessType.UNVERIFIED, file, js); if (!b) - throw new LaunchException(null, null, R("LSFatal"), + throw new LaunchException(null, null, R("LSFatal"), R("LCLaunching"), R("LNotVerified"), ""); } else if (js.getRootInCacerts()) { //root cert is in cacerts boolean b = false; @@ -435,11 +435,29 @@ public class JNLPClassLoader extends URL // access w/o security dialog once we actually check certificates. // copy security permissions from SecurityDesc element - if (security != null) { - Enumeration e = security.getPermissions().elements(); - while (e.hasMoreElements()) - result.add((Permission) e.nextElement()); - } + if (security != null) { + // Security desc. is used only to track security settings for the + // application. However, an application may comprise of multiple + // jars, and as such, security must be evaluated on a per jar basis. + + // set default perms + PermissionCollection permissions = security.getSandBoxPermissions(); + + // If more than default is needed, evaluate based on codesource + if (security.getSecurityType().equals(SecurityDesc.ALL_PERMISSIONS) || + security.getSecurityType().equals(SecurityDesc.J2EE_PERMISSIONS)) { + + if (cs.getCodeSigners() != null) { + permissions = security.getPermissions(); + } + } + + Enumeration e = permissions.elements(); + while (e.hasMoreElements()) + result.add(e.nextElement()); + } + + // add in permission to read the cached JAR files for (int i=0; i < resourcePermissions.size(); i++) @@ -447,15 +465,15 @@ public class JNLPClassLoader extends URL // add in the permissions that the user granted. for (int i=0; i < runtimePermissions.size(); i++) - result.add(runtimePermissions.get(i)); + result.add(runtimePermissions.get(i)); return result; } protected void addPermission(Permission p) { - runtimePermissions.add(p); - } - + runtimePermissions.add(p); + } + /** * Adds to the specified list of JARS any other JARs that need * to be loaded at the same time as the JARs specified (ie, are @@ -501,25 +519,25 @@ public class JNLPClassLoader extends URL URL location = jar.getLocation(); // non-cacheable, use source location if (localFile != null) { location = localFile.toURL(); // cached file - - // This is really not the best way.. but we need some way for - // PluginAppletViewer::getCachedImageRef() to check if the image - // is available locally, and it cannot use getResources() because - // that prefetches the resource, which confuses MediaTracker.waitForAll() - // which does a wait(), waiting for notification (presumably + + // This is really not the best way.. but we need some way for + // PluginAppletViewer::getCachedImageRef() to check if the image + // is available locally, and it cannot use getResources() because + // that prefetches the resource, which confuses MediaTracker.waitForAll() + // which does a wait(), waiting for notification (presumably // thrown after a resource is fetched). This bug manifests itself // particularly when using The FileManager applet from Webmin. - + JarFile jarFile = new JarFile(localFile); Enumeration e = jarFile.entries(); while (e.hasMoreElements()) { - + JarEntry je = (JarEntry) e.nextElement(); - - // another jar in my jar? it is more likely than you think + + // another jar in my jar? it is more likely than you think if (je.getName().endsWith(".jar")) { - // We need to extract that jar so that it can be loaded - // (inline loading with "jar:..!/..." path will not work + // We need to extract that jar so that it can be loaded + // (inline loading with "jar:..!/..." path will not work // with standard classloader methods) String extractedJarLocation = localFile.getParent() + "/" + je.getName(); @@ -564,7 +582,7 @@ public class JNLPClassLoader extends URL addURL(location); - // there is currently no mechanism to cache files per + // there is currently no mechanism to cache files per From ahughes at redhat.com Wed Aug 5 07:19:54 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Wed, 05 Aug 2009 14:19:54 +0000 Subject: changeset in /hg/icedtea: Fix make distcheck issue with IcedTeaN... Message-ID: changeset adadd58eff31 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=adadd58eff31 description: Fix make distcheck issue with IcedTeaNPPlugin.cc. 2009-08-04 Andrew John Hughes * Makefile.am: Remove IcedTeaNPPlugin.cc from EXTRA_DIST as now under plugin directory tree. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ Makefile.am | 1 - diffs (24 lines): diff -r 7a7436abd808 -r adadd58eff31 ChangeLog --- a/ChangeLog Wed Aug 05 14:19:58 2009 +0100 +++ b/ChangeLog Wed Aug 05 15:02:51 2009 +0100 @@ -1,3 +1,9 @@ 2009-08-04 Andrew John Hughes + + * Makefile.am: + Remove IcedTeaNPPlugin.cc from EXTRA_DIST + as now under plugin directory tree. + 2009-08-04 Andrew John Hughes * Makefile.am: diff -r 7a7436abd808 -r adadd58eff31 Makefile.am --- a/Makefile.am Wed Aug 05 14:19:58 2009 +0100 +++ b/Makefile.am Wed Aug 05 15:02:51 2009 +0100 @@ -1494,7 +1494,6 @@ EXTRA_DIST = $(GENERATED_FILES) $(top_sr jconsole.desktop policytool.desktop \ $(JTREG_SRCS) \ IcedTeaPlugin.cc \ - IcedTeaNPPlugin.cc \ HACKING $(PULSEAUDIO_SRCS) fsg.sh \ plugin $(top_srcdir)/netx hotspot.map autogen.sh From omajid at redhat.com Wed Aug 5 08:28:04 2009 From: omajid at redhat.com (Omair Majid) Date: Wed, 05 Aug 2009 11:28:04 -0400 Subject: RFC: Netx - fix caching for compressed files Message-ID: <4A79A504.4010004@redhat.com> Hi, When I added support for compression, I believe I accidentally broke caching of compressed files. The way compression works is that Netx tells the server that it can accept the file encoded as pack200-gzip and gzip, when it asks for a file foo. In the case of compressed files, Netx saves the compressed file as foo.gz and then uncompress it as foo and goes on happily using it. When Netx is started next time, it tries to use the cached file foo. But first it checks that the cache is up to date by comparing the timestamps and the file sizes of the local file and the remote file. Because the remote file foo is compressed and the local file foo is uncompressed, the file sizes are very different. Netx decides that the file hasnt been cached, and redownloads the file. The attached patch caches every downloaded file foo as foo.cache. It then processes (currently that's just uncompressing or copyting) foo.cache to generate foo. When it wants to check if the cache is up to date, it uses foo.cache as the local file instead of foo. One potential issue is that we are now using up twice the disk space if the remote files arent compressed. However, this brings us the flexibility that the only code conditional on the file compression and names is the code that downloads the file. ChangeLog 2009-08-05 Omair Majid * rt/net/sourceforge/jnlp/JNLPFile.java (openURL): Throw the cause of the original exception rather than just the message. * rt/net/sourceforge/jnlp/Launcher.java (launchApplication): Use getProcessedCacheFile. * rt/net/sourceforge/jnlp/cache/CacheEntry.java (CacheEntry): Use getOriginalCacheFile. (isCached): Likewise. * rt/net/sourceforge/jnlp/cache/CacheUtil.java (getReadPermission): Use getProcessedCacheFile. (getCacheFile): Renamed to... (getProcessedCacheFile): New function. (getOriginalCacheFile): New function. (getOutputStream): Renamed to. (getProcessedOutputStream): New function. (getOriginalOutputStream): New function. (getProcessedInputStream): Likewise. (getOriginalInputStream): Likewise. * rt/net/sourceforge/jnlp/cache/ResourceTracker.java (checkCache): Use getProcessedCacheFile for the local file name. (downloadResource): Always save file with a different file name, and uncompress or copy it to a file with the right name. (initializeResource): Use getProcessedCacheFile for the local file name. Any comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: netx-fix-caching.patch Type: text/x-patch Size: 14131 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090805/5aadc868/netx-fix-caching.patch From doko at ubuntu.com Wed Aug 5 10:41:04 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Wed, 05 Aug 2009 17:41:04 +0000 Subject: changeset in /hg/icedtea6: 2009-08-05 Matthias Klose changeset 2f1cdccc2d63 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=2f1cdccc2d63 description: 2009-08-05 Matthias Klose * Makefile.am (ABS_SOURCE_DIRS): Add $(abs_top_builddir)/rt. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 2 +- diffs (23 lines): diff -r 769586c385c0 -r 2f1cdccc2d63 ChangeLog --- a/ChangeLog Wed Aug 05 13:19:03 2009 -0400 +++ b/ChangeLog Wed Aug 05 19:35:37 2009 +0200 @@ -1,3 +1,7 @@ 2009-08-05 Lillian Angel + + * Makefile.am (ABS_SOURCE_DIRS): Add $(abs_top_builddir)/rt. + 2009-08-05 Lillian Angel * rt/netscape/javascript/JSObjectCreatePermission.java: Removed. diff -r 769586c385c0 -r 2f1cdccc2d63 Makefile.am --- a/Makefile.am Wed Aug 05 13:19:03 2009 -0400 +++ b/Makefile.am Wed Aug 05 19:35:37 2009 +0200 @@ -1469,7 +1469,7 @@ hotspot-tools-source-files.txt: stamps/r find hotspot-tools -name '*.java' | sort > $@ mkdir -p lib/hotspot-tools -ABS_SOURCE_DIRS = $(abs_top_builddir)/generated:$(abs_top_srcdir)/rt +ABS_SOURCE_DIRS = $(abs_top_builddir)/generated:$(abs_top_builddir)/rt:$(abs_top_srcdir)/rt stamps/hotspot-tools-class-files.stamp: hotspot-tools-source-files.txt if ! test -d $(ICEDTEA_BOOT_DIR) ; \ then \ From mark at klomp.org Wed Aug 5 11:40:54 2009 From: mark at klomp.org (Mark Wielaard) Date: Wed, 05 Aug 2009 18:40:54 +0000 Subject: changeset in /hg/icedtea6: Add systemtap java method tracing sup... Message-ID: changeset 8a0ea636a6e5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8a0ea636a6e5 description: Add systemtap java method tracing support. 2009-08-05 Mark Wielaard * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. * tapset/hotspot.stp.in: Add tapset functions for hotspot.method_entry, hotspot.method_return, hotspot.compiled_method_load and hotspot.compiled_method_unload. * NEWS: Metion new support for java method tracing. * INSTALL: Add that java method tracing support needs systemtap 0.9.9 or higher. diffstat: 5 files changed, 93 insertions(+), 25 deletions(-) ChangeLog | 10 ++++ INSTALL | 1 NEWS | 4 + patches/icedtea-systemtap.patch | 18 -------- tapset/hotspot.stp.in | 85 +++++++++++++++++++++++++++++++++++---- diffs (162 lines): diff -r 2f1cdccc2d63 -r 8a0ea636a6e5 ChangeLog --- a/ChangeLog Wed Aug 05 19:35:37 2009 +0200 +++ b/ChangeLog Wed Aug 05 20:43:00 2009 +0200 @@ -1,3 +1,13 @@ 2009-08-05 Matthias Klose + + * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. + * tapset/hotspot.stp.in: Add tapset functions for + hotspot.method_entry, hotspot.method_return, + hotspot.compiled_method_load and hotspot.compiled_method_unload. + * NEWS: Metion new support for java method tracing. + * INSTALL: Add that java method tracing support needs systemtap + 0.9.9 or higher. + 2009-08-05 Matthias Klose * Makefile.am (ABS_SOURCE_DIRS): Add $(abs_top_builddir)/rt. diff -r 2f1cdccc2d63 -r 8a0ea636a6e5 INSTALL --- a/INSTALL Wed Aug 05 19:35:37 2009 +0200 +++ b/INSTALL Wed Aug 05 20:43:00 2009 +0200 @@ -48,6 +48,7 @@ you cannot move that to another location you cannot move that to another location without adjusting the paths in the tapset/hotspot.stp file. For example: --enable-systemtap --with-abs-install-dir=/usr/lib/jvm/java-1.6.0-openjdk +(Java method tracing works starting with systemtap 0.9.9) See ./configure --help if you need to override the defaults. diff -r 2f1cdccc2d63 -r 8a0ea636a6e5 NEWS --- a/NEWS Wed Aug 05 19:35:37 2009 +0200 +++ b/NEWS Wed Aug 05 20:43:00 2009 +0200 @@ -1,3 +1,7 @@ New in release 1.5 (2009-05-20) +New in release 1.6 (UNRELEASED) + +- Added java method tracing using systemtap version 0.9.9+. + New in release 1.5 (2009-05-20) - Static trace support through systemtap. diff -r 2f1cdccc2d63 -r 8a0ea636a6e5 patches/icedtea-systemtap.patch --- a/patches/icedtea-systemtap.patch Wed Aug 05 19:35:37 2009 +0200 +++ b/patches/icedtea-systemtap.patch Wed Aug 05 20:43:00 2009 +0200 @@ -9,24 +9,6 @@ diff -r 945bf7540697 make/linux/makefile +CFLAGS += -DDTRACE_ENABLED + +# It doesn't support HAVE_DTRACE_H though. -diff -r 945bf7540697 src/share/vm/code/nmethod.cpp ---- openjdk/hotspot/src/share/vm/code/nmethod.cpp Thu Jan 22 14:42:01 2009 -0800 -+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Mon Feb 02 13:47:34 2009 +0100 -@@ -22,6 +22,14 @@ - * - */ - -+#ifdef __GNUC__ -+// GCC seems to have some trouble with the inserted probes. -+// error: _probe_compiled__method__unload causes a section type conflict -+// error: compiled__method__unload_probe_name causes a section type conflict -+// So disable probe insertion for now. -+#undef DTRACE_ENABLED -+#endif -+ - # include "incls/_precompiled.incl" - # include "incls/_nmethod.cpp.incl" - diff -r 945bf7540697 src/share/vm/prims/jni.cpp --- openjdk/hotspot/src/share/vm/prims/jni.cpp Thu Jan 22 14:42:01 2009 -0800 +++ openjdk/hotspot/src/share/vm/prims/jni.cpp Mon Feb 02 13:47:34 2009 +0100 diff -r 2f1cdccc2d63 -r 8a0ea636a6e5 tapset/hotspot.stp.in --- a/tapset/hotspot.stp.in Wed Aug 05 19:35:37 2009 +0200 +++ b/tapset/hotspot.stp.in Wed Aug 05 20:43:00 2009 +0200 @@ -409,13 +409,84 @@ probe hotspot.monitor_contended_exit = name, thread_id, id, class); } -// Doesn't work yet. -// method__entry -// method__return - -// Missing -// compiled__method__load -// compiled__method__unload +/* hotspot.method_entry (extended probe) + Triggers when a method is entered. + Sets thread_id to the current java thread id, class to the name of + the class, method to the name of the method, and sig to the + signature string of the method. + Needs -XX:+ExtendedDTraceProbes. +*/ +probe hotspot.method_entry = + process("@ABS_CLIENT_LIBJVM_SO@").mark("method__entry"), + process("@ABS_SERVER_LIBJVM_SO@").mark("method__entry") +{ + name = "method_entry"; + thread_id = $arg1; + class = user_string_n($arg2, $arg3); + method = user_string_n($arg4, $arg5); + sig = user_string_n($arg6, $arg7); + probestr = sprintf("%s(thread_id=%d,class='%s',method='%s',sig='%s')", + name, thread_id, class, method, sig); +} + +/* hotspot.method_return (extended probe) + Triggers when a method returns. + Sets thread_id to the current java thread id, class to the name of + the class, method to the name of the method, and sig to the + signature string of the method. + Needs -XX:+ExtendedDTraceProbes. +*/ +probe hotspot.method_return = + process("@ABS_CLIENT_LIBJVM_SO@").mark("method__return"), + process("@ABS_SERVER_LIBJVM_SO@").mark("method__return") +{ + name = "method_return"; + thread_id = $arg1; + class = user_string_n($arg2, $arg3); + method = user_string_n($arg4, $arg5); + sig = user_string_n($arg6, $arg7); + probestr = sprintf("%s(thread_id=%d,class='%s',method='%s',sig='%s')", + name, thread_id, class, method, sig); +} + +/* hotspot.compiled_method_load + Triggers when a compiled method is loaded. + Sets class to the name of the class, method to the name of the + method, sig to the signature string of the method, code to the + address where the code is loaded and size to the number of bytes of + code. +*/ +probe hotspot.compiled_method_load = + process("@ABS_CLIENT_LIBJVM_SO@").mark("compiled__method__load"), + process("@ABS_SERVER_LIBJVM_SO@").mark("compiled__method__load") +{ + name = "compiled_method_load"; + class = user_string_n($arg1, $arg2); + method = user_string_n($arg3, $arg4); + sig = user_string_n($arg5, $arg6); + code = $arg7; + size = $arg8; + probestr = sprintf("%s(class='%s',method='%s',sig='%s',code=0x%x,size=%d)", + name, class, method, sig, code, size); +} + +/* hotspot.compiled_method_unload + Triggers when a compiled method is unloaded. + Sets class to the name of the class, method to the name of the + method, sig to the signature string of the method. +*/ +probe hotspot.compiled_method_unload = + process("@ABS_CLIENT_LIBJVM_SO@").mark("compiled__method__unload"), + process("@ABS_SERVER_LIBJVM_SO@").mark("compiled__method__unload") +{ + name = "compiled_method_unload"; + class = user_string_n($arg1, $arg2); + method = user_string_n($arg3, $arg4); + sig = user_string_n($arg5, $arg6); + probestr = sprintf("%s(class='%s',method='%s',sig='%s')", + name, class, method, sig); +} + // Extra private probes // hashtable__new_entry From mjw at redhat.com Wed Aug 5 11:54:23 2009 From: mjw at redhat.com (Mark Wielaard) Date: Wed, 05 Aug 2009 20:54:23 +0200 Subject: Add support for java method tracing with systemtap Message-ID: <1249498463.3438.67.camel@springer.wildebeest.org> Hi, The latest release of systemtap (0.9.9) adds better support for handling dtrace markers in user space programs as also used in hotspot. The following patch adds some cleanups so these probes are activated and provides a nice tapset to use with it. 2009-08-05 Mark Wielaard * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. * tapset/hotspot.stp.in: Add tapset functions for hotspot.method_entry, hotspot.method_return, hotspot.compiled_method_load and hotspot.compiled_method_unload. * NEWS: Metion new support for java method tracing. * INSTALL: Add that java method tracing support needs systemtap 0.9.9 or higher. With this you can now do stuff like: $ stap -e \ 'probe hotspot.method_entry {log(thread_indent(1) . "=> " . class . "." . method . sig)} probe hotspot.method_return {log(thread_indent(-1) . "<= " . class . "." . method . sig)}' \ -c 'java -XX:+ExtendedDTraceProbes Hello' And get output like: 0 java(26933):=> Hello.main([Ljava/lang/String;)V 9 java(26933): => java/lang/ClassLoader.checkPackageAccess(Ljava/lang/Class;Ljava/security/ProtectionDomain;)V 16 java(26933): => java/lang/System.getSecurityManager()Ljava/lang/SecurityManager; 23 java(26933): <= java/lang/System.getSecurityManager()Ljava/lang/SecurityManager; 30 java(26933): => java/util/HashSet.add(Ljava/lang/Object;)Z 37 java(26933): => java/util/HashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 43 java(26933): => java/lang/Object.hashCode()I 50 java(26933): <= java/lang/Object.hashCode()I 56 java(26933): => java/util/HashMap.hash(I)I 63 java(26933): <= java/util/HashMap.hash(I)I 69 java(26933): => java/util/HashMap.indexFor(II)I 76 java(26933): <= java/util/HashMap.indexFor(II)I 83 java(26933): <= java/util/HashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 89 java(26933): <= java/util/HashSet.add(Ljava/lang/Object;)Z 96 java(26933): <= java/lang/ClassLoader.checkPackageAccess(Ljava/lang/Class;Ljava/security/ProtectionDomain;)V [...] 2611 java(26933): => java/io/BufferedOutputStream.flush()V 2617 java(26933): => java/io/BufferedOutputStream.flushBuffer()V 2624 java(26933): <= java/io/BufferedOutputStream.flushBuffer()V 2630 java(26933): <= java/io/BufferedOutputStream.flush()V 2636 java(26933): <= java/io/PrintStream.newLine()V 2643 java(26933): <= java/io/PrintStream.println(Ljava/lang/String;)V 2649 java(26933):<= Hello.main([Ljava/lang/String;)V Have fun! Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: systemtap-java-method-tracing.patch Type: text/x-patch Size: 6682 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090805/e61455ee/systemtap-java-method-tracing.patch From Tim.Bell at Sun.COM Wed Aug 5 13:53:05 2009 From: Tim.Bell at Sun.COM (Tim Bell) Date: Wed, 05 Aug 2009 13:53:05 -0700 Subject: Bugids already used in this repository (Re: [FOR REVIEW] hs14 merge for OpenJDK6) In-Reply-To: <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> <4A78E151.9070304@sun.com> <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> Message-ID: <4A79F131.7040105@sun.com> Andrew John Hughes wrote: > Thanks Tim, that seems to have fixed the permissions issue. Good. > There now seems to be an issue with jcheck, as the merge causes some > bugids to be repeated: Hmmm - how did these changesets come in through two different paths? > pushing to ssh://hg.openjdk.java.net/jdk6/jdk6-gate/hotspot > searching for changes > remote: adding changesets > remote: adding manifests > remote: adding file changes > remote: added 555 changesets with 4771 changes to 1453 files > remote: > remote: > Changeset: 100:d821d920b465 > remote: > Author: kvn > remote: > Date: 2008-03-11 11:04 > remote: > > remote: > 6623167: C2 crashed in StoreCMNode::Value > remote: > Summary: C2 crashed in StoreCMNode::Value because > n->in(MemNode::OopStore) is 0. > remote: > Reviewed-by: rasbold, never > remote: > remote: Bugid 6623167 already used in this repository, in revision 20 > remote: > remote: > Changeset: 104:2c106685d6d0 > remote: > Author: dcubed > remote: > Date: 2008-03-12 18:06 > remote: > > remote: > 6497639: 4/3 Profiling Swing application caused JVM crash > remote: > Summary: Make RedefineClasses() interoperate better with > class sharing. > remote: > Reviewed-by: sspitsyn, jmasa > remote: > remote: Bugid 6497639 already used in this repository, in revision 20 > remote: > remote: > Changeset: 105:d8b3ef7ee3e5 > remote: > Author: dcubed > remote: > Date: 2008-03-12 18:07 > remote: > > remote: > 6599425: 4/3 OopMapCache::lookup() can cause later crash or > assert() failure > remote: > Summary: Add should_not_be_cached() to markOop and methodOop > and query that status inOopMapCache::lookup() > remote: > Reviewed-by: coleenp, sspitsyn, jmasa > remote: > remote: Bugid 6599425 already used in this repository, in revision 20 > remote: > remote: > Changeset: 240:65fe2bd88839 > remote: > Author: never > remote: > Date: 2008-06-05 21:44 > remote: > > remote: > 6614100: EXCEPTION_ACCESS_VIOLATION while running Eclipse > with 1.6.0_05-ea > remote: > Reviewed-by: kvn, jrose, rasbold > remote: > remote: Bugid 6614100 already used in this repository, in revision 20 > remote: > remote: > Changeset: 286:3e82d72933d0 > remote: > Author: xlu > remote: > Date: 2008-06-26 14:15 > remote: > > remote: > 6718830: Hotspot fails to build with gcc 4.3 > remote: > Summary: Fixed linux make file and couple adlc code to meet > the changes of gcc 4.3 > remote: > Reviewed-by: kamg, igor > remote: > remote: Bugid 6718830 already used in this repository, in revision 32 > remote: > remote: > Changeset: 289:551f4309f476 > remote: > Author: ohair > remote: > Date: 2008-07-03 10:46 > remote: > > remote: > 6695777: Queens.class should be built from source, not put > in source repo > remote: > Reviewed-by: kvn > remote: > remote: Bugid 6695777 already used in this repository, in revision 20 > remote: > remote: > Changeset: 314:54499b980c23 > remote: > Author: swamyv > remote: > Date: 2008-07-29 13:54 > remote: > > remote: > 6710791: Remove files or build from source:maf-1_0.jar, jlfg-1_0.jar > remote: > Summary: Removed maf-1_0.jar and jlfg-1_0.jar files. > remote: > Reviewed-by: poonam, jjh > remote: > remote: Bugid 6710791 already used in this repository, in revision 20 > remote: > remote: > Changeset: 360:fa4d1d240383 > remote: > Author: never > remote: > Date: 2008-08-26 15:49 > remote: > > remote: > 6741642: bad enum definition in ciTypeFlow.hpp > remote: > Reviewed-by: rasbold, martin > remote: > Contributed-by: doko at ubuntu.com > remote: > remote: Bugid 6741642 already used in this repository, in revision 22 > remote: > remote: > Changeset: 589:748572b86af6 > remote: > Author: never > remote: > Date: 2009-04-07 14:46 > remote: > > remote: > 6636360: compiler/6595044/Main.java test fails with 64bit > java on solaris-sparcv9 with SIGSEGV > remote: > Reviewed-by: kvn, twisti > remote: > remote: Bugid 6636360 already used in this repository, in revision 29 > remote: > remote: abort: pretxnchangegroup.0.jcheck hook failed > remote: transaction abort! > remote: rollback completed > abort: unexpected response: empty string > > Is there a way of getting it to ignore these for this one push? I > don't know of a way to just pull out these nine changesets from the > 555 waiting to go... I think they would need to be added to the jcheck whitelist for all time- but that is more of a question for Mark or Kelly. Tim From gnu_andrew at member.fsf.org Wed Aug 5 16:39:13 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 6 Aug 2009 00:39:13 +0100 Subject: Bugids already used in this repository (Re: [FOR REVIEW] hs14 merge for OpenJDK6) In-Reply-To: <4A79F131.7040105@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> <4A78E151.9070304@sun.com> <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> <4A79F131.7040105@sun.com> Message-ID: <17c6771e0908051639h4c9a9c79vfdc4f6048d17cca8@mail.gmail.com> 2009/8/5 Tim Bell : > Andrew John Hughes wrote: > >> Thanks Tim, that seems to have fixed the permissions issue. > > Good. > >> There now seems to be an issue with jcheck, as the merge causes some >> bugids to be repeated: > > Hmmm - how did these changesets come in through two different paths? > >> pushing to ssh://hg.openjdk.java.net/jdk6/jdk6-gate/hotspot >> searching for changes >> remote: adding changesets >> remote: adding manifests >> remote: adding file changes >> remote: added 555 changesets with 4771 changes to 1453 files >> remote: >> remote: > Changeset: 100:d821d920b465 >> remote: > Author: ? ?kvn >> remote: > Date: ? ? ?2008-03-11 11:04 >> remote: > >> remote: > 6623167: C2 crashed in StoreCMNode::Value >> remote: > Summary: C2 crashed in StoreCMNode::Value because >> n->in(MemNode::OopStore) is 0. >> remote: > Reviewed-by: rasbold, never >> remote: >> remote: Bugid 6623167 already used in this repository, in revision 20 >> remote: >> remote: > Changeset: 104:2c106685d6d0 >> remote: > Author: ? ?dcubed >> remote: > Date: ? ? ?2008-03-12 18:06 >> remote: > >> remote: > 6497639: 4/3 Profiling Swing application caused JVM crash >> remote: > Summary: Make RedefineClasses() interoperate better with >> class sharing. >> remote: > Reviewed-by: sspitsyn, jmasa >> remote: >> remote: Bugid 6497639 already used in this repository, in revision 20 >> remote: >> remote: > Changeset: 105:d8b3ef7ee3e5 >> remote: > Author: ? ?dcubed >> remote: > Date: ? ? ?2008-03-12 18:07 >> remote: > >> remote: > 6599425: 4/3 OopMapCache::lookup() can cause later crash or >> assert() failure >> remote: > Summary: Add should_not_be_cached() to markOop and methodOop >> and query that status inOopMapCache::lookup() >> remote: > Reviewed-by: coleenp, sspitsyn, jmasa >> remote: >> remote: Bugid 6599425 already used in this repository, in revision 20 >> remote: >> remote: > Changeset: 240:65fe2bd88839 >> remote: > Author: ? ?never >> remote: > Date: ? ? ?2008-06-05 21:44 >> remote: > >> remote: > 6614100: EXCEPTION_ACCESS_VIOLATION while running Eclipse >> with 1.6.0_05-ea >> remote: > Reviewed-by: kvn, jrose, rasbold >> remote: >> remote: Bugid 6614100 already used in this repository, in revision 20 >> remote: >> remote: > Changeset: 286:3e82d72933d0 >> remote: > Author: ? ?xlu >> remote: > Date: ? ? ?2008-06-26 14:15 >> remote: > >> remote: > 6718830: Hotspot fails to build with gcc 4.3 >> remote: > Summary: Fixed linux make file and couple adlc code to meet >> the changes of gcc 4.3 >> remote: > Reviewed-by: kamg, igor >> remote: >> remote: Bugid 6718830 already used in this repository, in revision 32 >> remote: >> remote: > Changeset: 289:551f4309f476 >> remote: > Author: ? ?ohair >> remote: > Date: ? ? ?2008-07-03 10:46 >> remote: > >> remote: > 6695777: Queens.class should be built from source, not put >> in source repo >> remote: > Reviewed-by: kvn >> remote: >> remote: Bugid 6695777 already used in this repository, in revision 20 >> remote: >> remote: > Changeset: 314:54499b980c23 >> remote: > Author: ? ?swamyv >> remote: > Date: ? ? ?2008-07-29 13:54 >> remote: > >> remote: > 6710791: Remove files or build from source:maf-1_0.jar, jlfg-1_0.jar >> remote: > Summary: Removed maf-1_0.jar and jlfg-1_0.jar files. >> remote: > Reviewed-by: poonam, jjh >> remote: >> remote: Bugid 6710791 already used in this repository, in revision 20 >> remote: >> remote: > Changeset: 360:fa4d1d240383 >> remote: > Author: ? ?never >> remote: > Date: ? ? ?2008-08-26 15:49 >> remote: > >> remote: > 6741642: bad enum definition in ciTypeFlow.hpp >> remote: > Reviewed-by: rasbold, martin >> remote: > Contributed-by: doko at ubuntu.com >> remote: >> remote: Bugid 6741642 already used in this repository, in revision 22 >> remote: >> remote: > Changeset: 589:748572b86af6 >> remote: > Author: ? ?never >> remote: > Date: ? ? ?2009-04-07 14:46 >> remote: > >> remote: > 6636360: compiler/6595044/Main.java test fails with 64bit >> java on solaris-sparcv9 with SIGSEGV >> remote: > Reviewed-by: kvn, twisti >> remote: >> remote: Bugid 6636360 already used in this repository, in revision 29 >> remote: >> remote: abort: pretxnchangegroup.0.jcheck hook failed >> remote: transaction abort! >> remote: rollback completed >> abort: unexpected response: empty string >> >> Is there a way of getting it to ignore these for this one push? ?I >> don't know of a way to just pull out these nine changesets from the >> 555 waiting to go... > > I think they would need to be added to the jcheck whitelist for all time- > but that is more of a question for Mark or Kelly. > > Tim > The early revisions (20, 32) are from OpenJDK6 which was rebased to allow HotSpot patches to be applied on top. So what happened here is that, as the fixes were already applied to OpenJDK6, the new changesets pulled in by the merge will be no-ops but still exist to keep the change history accurate. I think we just need a way of disabling this check. OpenJDK6 already has whitespace and comment checks turned to lax. See .jcheck: http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/0282bf49b0f6. There may already be an option for this bugid check too, but I have no idea what the format of that file is. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Wed Aug 5 17:54:37 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Aug 2009 00:54:37 +0000 Subject: [Bug 376] New: Cannot create GC thread. Out of system resources. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=376 Summary: Cannot create GC thread. Out of system resources. Product: IcedTea Version: unspecified Platform: PC URL: http://sweethome3d.eu OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: GavinFlower at yahoo.com click on Launch Sweet Home 3D -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Aug 5 17:56:35 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Aug 2009 00:56:35 +0000 Subject: [Bug 376] Cannot create GC thread. Out of system resources. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=376 ------- Comment #1 from GavinFlower at yahoo.com 2009-08-06 00:56 ------- Created an attachment (id=251) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=251&action=view) java error log -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Wed Aug 5 18:11:06 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 01:11:06 +0000 Subject: changeset in /hg/icedtea: Use tip of forest with new security pa... Message-ID: changeset a6ecfd52e2db in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a6ecfd52e2db description: Use tip of forest with new security patches. 2009-08-05 Andrew John Hughes * Makefile.am: Update md5sums and changeset IDs to include security fixes. * patches/security/icedtea-6592792.patch: Remove fixes applied as part of 6657133 diffstat: 3 files changed, 14 insertions(+), 42 deletions(-) ChangeLog | 8 +++++++ Makefile.am | 12 +++++----- patches/security/icedtea-6592792.patch | 36 -------------------------------- diffs (85 lines): diff -r 77ea95965bad -r a6ecfd52e2db ChangeLog --- a/ChangeLog Wed Aug 05 15:22:13 2009 +0100 +++ b/ChangeLog Thu Aug 06 02:13:19 2009 +0100 @@ -1,3 +1,11 @@ 2009-08-05 Lillian Angel + + * Makefile.am: + Update md5sums and changeset IDs to include + security fixes. + * patches/security/icedtea-6592792.patch: + Remove fixes applied as part of 6657133 + 2009-08-05 Lillian Angel * plugin/icedtea/netscape/javascript/JSObject.java: Security patch diff -r 77ea95965bad -r a6ecfd52e2db Makefile.am --- a/Makefile.am Wed Aug 05 15:22:13 2009 +0100 +++ b/Makefile.am Thu Aug 06 02:13:19 2009 +0100 @@ -2,17 +2,17 @@ OPENJDK_VERSION = b66 OPENJDK_CHANGESET = e7eeeda332ec CORBA_CHANGESET = 1741ea5cb854 -JAXP_CHANGESET = 22f9d5d5b5fe -JAXWS_CHANGESET = 43c35a1df5cb -JDK_CHANGESET = 69ba5ca06a43 +JAXP_CHANGESET = b3d2bf4c255d +JAXWS_CHANGESET = c37936a72332 +JDK_CHANGESET = b96cfe9cfcfa LANGTOOLS_CHANGESET = 634f519d6f9a HOTSPOT_CHANGESET = 945fcffdbcab OPENJDK_MD5SUM = 8f63dbb0dcd83d905e243c58d0135174 CORBA_MD5SUM = 06ac898f583fc9eec179fc2d1dcb5c71 -JAXP_MD5SUM = 366dde7f9a1fa6436f48a64a8704dc20 -JAXWS_MD5SUM = 4fb20d6ee197e63dac567ad340532293 -JDK_MD5SUM = 8c54f71ff1f519440716c9d50e02468f +JAXP_MD5SUM = 01118a1882ea1ac5205e232bd7c847f7 +JAXWS_MD5SUM = 8c53573f9f072bb273435ee75c7aaaa3 +JDK_MD5SUM = 16a73b3b2409429425999b20aca1ba65 LANGTOOLS_MD5SUM = cd1389112baa1b2b24da95555345c1b9 HOTSPOT_MD5SUM = ce3ab877df030cf4842001918898244e diff -r 77ea95965bad -r a6ecfd52e2db patches/security/icedtea-6592792.patch --- a/patches/security/icedtea-6592792.patch Wed Aug 05 15:22:13 2009 +0100 +++ b/patches/security/icedtea-6592792.patch Thu Aug 06 02:13:19 2009 +0100 @@ -1,39 +1,3 @@ diff -Nru openjdk.orig/jdk/src/share/lib -diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security openjdk/jdk/src/share/lib/security/java.security ---- openjdk.orig/jdk/src/share/lib/security/java.security 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/lib/security/java.security 2009-05-12 23:41:24.000000000 +0100 -@@ -127,7 +127,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind. - - # - # List of comma-separated packages that start with or equal this string -diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security-solaris openjdk/jdk/src/share/lib/security/java.security-solaris ---- openjdk.orig/jdk/src/share/lib/security/java.security-solaris 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/lib/security/java.security-solaris 2009-05-12 23:41:24.000000000 +0100 -@@ -128,7 +128,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind. - - # - # List of comma-separated packages that start with or equal this string -diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security-windows openjdk/jdk/src/share/lib/security/java.security-windows ---- openjdk.orig/jdk/src/share/lib/security/java.security-windows 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/lib/security/java.security-windows 2009-05-12 23:41:24.000000000 +0100 -@@ -128,7 +128,7 @@ - # passed to checkPackageAccess unless the - # corresponding RuntimePermission ("accessClassInPackage."+package) has - # been granted. --package.access=sun. -+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind. - - # - # List of comma-separated packages that start with or equal this string diff -Nru openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java --- openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java 1970-01-01 01:00:00.000000000 +0100 +++ openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java 2009-05-12 23:41:24.000000000 +0100 From ahughes at redhat.com Thu Aug 6 02:37:15 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 09:37:15 +0000 Subject: changeset in /hg/icedtea: Added tag icedtea-1.11 for changeset b... Message-ID: changeset 4cd87c94518f in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=4cd87c94518f description: Added tag icedtea-1.11 for changeset bceb1140e068 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r bceb1140e068 -r 4cd87c94518f .hgtags --- a/.hgtags Thu Aug 06 09:38:51 2009 +0100 +++ b/.hgtags Thu Aug 06 10:39:35 2009 +0100 @@ -16,3 +16,4 @@ 2b1c03c1e9fa88e453da2ca774dc8900227a2e16 2b1c03c1e9fa88e453da2ca774dc8900227a2e16 icedtea6-1.4 db666234267c53adb4f55967fa3dce442167ae3b icedtea-1.9 9729b3a513055efc33f1220e3c8cd372afdf74d9 icedtea-1.10 +bceb1140e068851e32b2e29635cd0c25b6d655a4 icedtea-1.11 From ahughes at redhat.com Thu Aug 6 02:37:15 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 09:37:15 +0000 Subject: changeset in /hg/icedtea: Prepare for IcedTea7 1.11 release. Message-ID: changeset bceb1140e068 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=bceb1140e068 description: Prepare for IcedTea7 1.11 release. 2009-08-06 Andrew John Hughes * INSTALL: Mention Shark requirements. * NEWS: Add release notes for 1.11. * configure.ac: Bump to 1.11 proper, remove duplicate VisualVM/NetBeans macros. diffstat: 4 files changed, 33 insertions(+), 30 deletions(-) ChangeLog | 10 ++++++++++ INSTALL | 5 ++--- NEWS | 20 ++++++++++++++++++++ configure.ac | 28 +--------------------------- diffs (109 lines): diff -r a6ecfd52e2db -r bceb1140e068 ChangeLog --- a/ChangeLog Thu Aug 06 02:13:19 2009 +0100 +++ b/ChangeLog Thu Aug 06 09:38:51 2009 +0100 @@ -1,3 +1,13 @@ 2009-08-05 Andrew John Hughes + + * INSTALL: + Mention Shark requirements. + * NEWS: + Add release notes for 1.11. + * configure.ac: + Bump to 1.11 proper, remove duplicate + VisualVM/NetBeans macros. + 2009-08-05 Andrew John Hughes * Makefile.am: diff -r a6ecfd52e2db -r bceb1140e068 INSTALL --- a/INSTALL Thu Aug 06 02:13:19 2009 +0100 +++ b/INSTALL Thu Aug 06 09:38:51 2009 +0100 @@ -38,10 +38,9 @@ For building VisualVM, you will need For building VisualVM, you will need netbeans = 6.5 -For building VisualVM, you will need -netbeans = 6.5 +For building the zero-assembler port (see below), you will need libffi. -For building the zero-assembler port (see below), you will need libffi. +For building the Shark JIT, you will need LLVM 2.5 or current SVN. For building with systemtap support (--enable-systemtap), you will need systemtap-sdt-devel (available since systemtap 0.9.5). This also needs diff -r a6ecfd52e2db -r bceb1140e068 NEWS --- a/NEWS Thu Aug 06 02:13:19 2009 +0100 +++ b/NEWS Thu Aug 06 09:38:51 2009 +0100 @@ -1,3 +1,23 @@ New in release 1.10 (2009-05-29) +New in release 1.11 (2009-08-06) + +- Updated to OpenJDK7 b66 (Milestone 4), including + JSR 308: Annotations on Java types. +- Updates/bug fixes for netx, Shark and the web plugin. +- Zero is now provided in the upstream forest rather than in-tree. +- The options + - --with-openjdk + - --with-icedtea + - --with-openjdk-home + - --with-icedtea-home + - --with-gcj-jdk + have been removed. The JDK is now specified by --with-jdk-home + and whether or not do a full bootstrap or not is now decided + by --disable-bootstrap (the default is yes). This is in preparation + for making the two stages independent of the JDK used, but some + artefacts still remain in this release; the supported behaviour + is still the use of gcj jdk for a full bootstrap and icedtea + for a quick build. + New in release 1.10 (2009-05-29) - Updated to OpenJDK7 b59 build via IcedTea forest. Now includes diff -r a6ecfd52e2db -r bceb1140e068 configure.ac --- a/configure.ac Thu Aug 06 02:13:19 2009 +0100 +++ b/configure.ac Thu Aug 06 09:38:51 2009 +0100 @@ -1,4 +1,4 @@ AC_INIT([icedtea], [1.11-pre], [distro-p -AC_INIT([icedtea], [1.11-pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [1.11], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) @@ -65,24 +65,6 @@ AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) AC_SUBST(SYSTEM_NETBEANS_DIR) -AC_MSG_CHECKING([for a NetBeans installation]) -AC_ARG_WITH([netbeans-home], - [AS_HELP_STRING([--with-netbeans-home], - [NetBeans home directory (default is /usr/share/netbeans)])], - [ - if test "x${withval}" = x - then - SYSTEM_NETBEANS_DIR=/usr/share/netbeans - else - SYSTEM_NETBEANS_DIR=${withval} - fi - ], - [ - SYSTEM_NETBEANS_DIR=/usr/share/netbeans - ]) -AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}]) -AC_SUBST(SYSTEM_NETBEANS_DIR) - AC_MSG_CHECKING(for Ant home directory) AC_ARG_WITH([ant-home], [AS_HELP_STRING([--with-ant-home], @@ -109,14 +91,6 @@ AM_CONDITIONAL(WITH_VISUALVM, test "x${e AM_CONDITIONAL(WITH_VISUALVM, test "x${enable_visualvm}" = "xyes") AC_MSG_RESULT(${enable_visualvm}) -AC_MSG_CHECKING(whether to build VisualVM) -AC_ARG_ENABLE([visualvm], - [AS_HELP_STRING([--enable-visualvm], - [Enable compilation of visualvm.])], - [enable_visualvm="${enableval}"], [enable_visualvm="no"]) -AM_CONDITIONAL(WITH_VISUALVM, test "x${enable_visualvm}" = "xyes") -AC_MSG_RESULT(${enable_visualvm}) - AC_MSG_CHECKING([whether to build the LiveConnect plugin]) AC_ARG_ENABLE([plugin], [AS_HELP_STRING([--disable-plugin], From ahughes at redhat.com Thu Aug 6 02:53:48 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 09:53:48 +0000 Subject: changeset in /hg/icedtea: Removed tag icedtea-1.11 Message-ID: changeset 2c882969908f in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2c882969908f description: Removed tag icedtea-1.11 diffstat: 1 file changed, 2 insertions(+) .hgtags | 2 ++ diffs (9 lines): diff -r 4cd87c94518f -r 2c882969908f .hgtags --- a/.hgtags Thu Aug 06 10:39:35 2009 +0100 +++ b/.hgtags Thu Aug 06 10:55:43 2009 +0100 @@ -17,3 +17,5 @@ db666234267c53adb4f55967fa3dce442167ae3b db666234267c53adb4f55967fa3dce442167ae3b icedtea-1.9 9729b3a513055efc33f1220e3c8cd372afdf74d9 icedtea-1.10 bceb1140e068851e32b2e29635cd0c25b6d655a4 icedtea-1.11 +bceb1140e068851e32b2e29635cd0c25b6d655a4 icedtea-1.11 +0000000000000000000000000000000000000000 icedtea-1.11 From ahughes at redhat.com Thu Aug 6 02:53:48 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 09:53:48 +0000 Subject: changeset in /hg/icedtea: Update SystemTap support. Message-ID: changeset 7800f23fa7a8 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=7800f23fa7a8 description: Update SystemTap support. 2009-08-05 Mark Wielaard * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. * tapset/hotspot.stp.in: Add tapset functions for hotspot.method_entry, hotspot.method_return, hotspot.compiled_method_load and hotspot.compiled_method_unload. * NEWS: Metion new support for java method tracing. * INSTALL: Add that java method tracing support needs systemtap 0.9.9 or higher. diffstat: 5 files changed, 91 insertions(+), 25 deletions(-) ChangeLog | 10 ++++ INSTALL | 1 NEWS | 2 patches/icedtea-systemtap.patch | 18 -------- tapset/hotspot.stp.in | 85 +++++++++++++++++++++++++++++++++++---- diffs (163 lines): diff -r 2c882969908f -r 7800f23fa7a8 ChangeLog --- a/ChangeLog Thu Aug 06 10:55:43 2009 +0100 +++ b/ChangeLog Thu Aug 06 10:56:04 2009 +0100 @@ -1,3 +1,13 @@ 2009-08-06 Andrew John Hughes + + * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. + * tapset/hotspot.stp.in: Add tapset functions for + hotspot.method_entry, hotspot.method_return, + hotspot.compiled_method_load and hotspot.compiled_method_unload. + * NEWS: Metion new support for java method tracing. + * INSTALL: Add that java method tracing support needs systemtap + 0.9.9 or higher. + 2009-08-06 Andrew John Hughes * INSTALL: diff -r 2c882969908f -r 7800f23fa7a8 INSTALL --- a/INSTALL Thu Aug 06 10:55:43 2009 +0100 +++ b/INSTALL Thu Aug 06 10:56:04 2009 +0100 @@ -50,6 +50,7 @@ you cannot move that to another location you cannot move that to another location without adjusting the paths in the tapset/hotspot.stp file. For example: --enable-systemtap --with-abs-install-dir=/usr/lib/jvm/java-1.6.0-openjdk +(Java method tracing works starting with systemtap 0.9.9) See ./configure --help if you need to override the defaults. diff -r 2c882969908f -r 7800f23fa7a8 NEWS --- a/NEWS Thu Aug 06 10:55:43 2009 +0100 +++ b/NEWS Thu Aug 06 10:56:04 2009 +0100 @@ -17,6 +17,8 @@ New in release 1.11 (2009-08-06) artefacts still remain in this release; the supported behaviour is still the use of gcj jdk for a full bootstrap and icedtea for a quick build. +- Added java method tracing using systemtap version 0.9.9+. +- Added latest security fixes. New in release 1.10 (2009-05-29) diff -r 2c882969908f -r 7800f23fa7a8 patches/icedtea-systemtap.patch --- a/patches/icedtea-systemtap.patch Thu Aug 06 10:55:43 2009 +0100 +++ b/patches/icedtea-systemtap.patch Thu Aug 06 10:56:04 2009 +0100 @@ -9,24 +9,6 @@ diff -r 945bf7540697 make/linux/makefile +CFLAGS += -DDTRACE_ENABLED + +# It doesn't support HAVE_DTRACE_H though. -diff -r 945bf7540697 src/share/vm/code/nmethod.cpp ---- openjdk/hotspot/src/share/vm/code/nmethod.cpp Thu Jan 22 14:42:01 2009 -0800 -+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Mon Feb 02 13:47:34 2009 +0100 -@@ -22,6 +22,14 @@ - * - */ - -+#ifdef __GNUC__ -+// GCC seems to have some trouble with the inserted probes. -+// error: _probe_compiled__method__unload causes a section type conflict -+// error: compiled__method__unload_probe_name causes a section type conflict -+// So disable probe insertion for now. -+#undef DTRACE_ENABLED -+#endif -+ - # include "incls/_precompiled.incl" - # include "incls/_nmethod.cpp.incl" - diff -r 945bf7540697 src/share/vm/prims/jni.cpp --- openjdk/hotspot/src/share/vm/prims/jni.cpp Thu Jan 22 14:42:01 2009 -0800 +++ openjdk/hotspot/src/share/vm/prims/jni.cpp Mon Feb 02 13:47:34 2009 +0100 diff -r 2c882969908f -r 7800f23fa7a8 tapset/hotspot.stp.in --- a/tapset/hotspot.stp.in Thu Aug 06 10:55:43 2009 +0100 +++ b/tapset/hotspot.stp.in Thu Aug 06 10:56:04 2009 +0100 @@ -409,13 +409,84 @@ probe hotspot.monitor_contended_exit = name, thread_id, id, class); } -// Doesn't work yet. -// method__entry -// method__return - -// Missing -// compiled__method__load -// compiled__method__unload +/* hotspot.method_entry (extended probe) + Triggers when a method is entered. + Sets thread_id to the current java thread id, class to the name of + the class, method to the name of the method, and sig to the + signature string of the method. + Needs -XX:+ExtendedDTraceProbes. +*/ +probe hotspot.method_entry = + process("@ABS_CLIENT_LIBJVM_SO@").mark("method__entry"), + process("@ABS_SERVER_LIBJVM_SO@").mark("method__entry") +{ + name = "method_entry"; + thread_id = $arg1; + class = user_string_n($arg2, $arg3); + method = user_string_n($arg4, $arg5); + sig = user_string_n($arg6, $arg7); + probestr = sprintf("%s(thread_id=%d,class='%s',method='%s',sig='%s')", + name, thread_id, class, method, sig); +} + +/* hotspot.method_return (extended probe) + Triggers when a method returns. + Sets thread_id to the current java thread id, class to the name of + the class, method to the name of the method, and sig to the + signature string of the method. + Needs -XX:+ExtendedDTraceProbes. +*/ +probe hotspot.method_return = + process("@ABS_CLIENT_LIBJVM_SO@").mark("method__return"), + process("@ABS_SERVER_LIBJVM_SO@").mark("method__return") +{ + name = "method_return"; + thread_id = $arg1; + class = user_string_n($arg2, $arg3); + method = user_string_n($arg4, $arg5); + sig = user_string_n($arg6, $arg7); + probestr = sprintf("%s(thread_id=%d,class='%s',method='%s',sig='%s')", + name, thread_id, class, method, sig); +} + +/* hotspot.compiled_method_load + Triggers when a compiled method is loaded. + Sets class to the name of the class, method to the name of the + method, sig to the signature string of the method, code to the + address where the code is loaded and size to the number of bytes of + code. +*/ +probe hotspot.compiled_method_load = + process("@ABS_CLIENT_LIBJVM_SO@").mark("compiled__method__load"), + process("@ABS_SERVER_LIBJVM_SO@").mark("compiled__method__load") +{ + name = "compiled_method_load"; + class = user_string_n($arg1, $arg2); + method = user_string_n($arg3, $arg4); + sig = user_string_n($arg5, $arg6); + code = $arg7; + size = $arg8; + probestr = sprintf("%s(class='%s',method='%s',sig='%s',code=0x%x,size=%d)", + name, class, method, sig, code, size); +} + +/* hotspot.compiled_method_unload + Triggers when a compiled method is unloaded. + Sets class to the name of the class, method to the name of the + method, sig to the signature string of the method. +*/ +probe hotspot.compiled_method_unload = + process("@ABS_CLIENT_LIBJVM_SO@").mark("compiled__method__unload"), + process("@ABS_SERVER_LIBJVM_SO@").mark("compiled__method__unload") +{ + name = "compiled_method_unload"; + class = user_string_n($arg1, $arg2); + method = user_string_n($arg3, $arg4); + sig = user_string_n($arg5, $arg6); + probestr = sprintf("%s(class='%s',method='%s',sig='%s')", + name, class, method, sig); +} + // Extra private probes // hashtable__new_entry From doko at ubuntu.com Thu Aug 6 03:57:34 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 06 Aug 2009 10:57:34 +0000 Subject: changeset in /hg/icedtea: Remove Makefile.am.orig Message-ID: changeset e8bc22197b08 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=e8bc22197b08 description: Remove Makefile.am.orig diffstat: 1 file changed, 4 insertions(+) ChangeLog | 4 ++++ diffs (11 lines): diff -r 7800f23fa7a8 -r e8bc22197b08 ChangeLog --- a/ChangeLog Thu Aug 06 10:56:04 2009 +0100 +++ b/ChangeLog Thu Aug 06 12:52:14 2009 +0200 @@ -1,3 +1,7 @@ 2009-08-05 Mark Wielaard + + * Makefile.am.orig: Remove. + 2009-08-05 Mark Wielaard * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. From ahughes at redhat.com Thu Aug 6 04:05:46 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 11:05:46 +0000 Subject: changeset in /hg/icedtea: Merge Message-ID: changeset df574d432c00 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=df574d432c00 description: Merge diffstat: 1 file changed, 4 insertions(+) ChangeLog | 4 ++++ diffs (14 lines): diff -r 2174f64c8bc9 -r df574d432c00 ChangeLog --- a/ChangeLog Thu Aug 06 12:01:27 2009 +0100 +++ b/ChangeLog Thu Aug 06 12:06:49 2009 +0100 @@ -2,6 +2,10 @@ 2009-08-06 Andrew John Hughes + + * Makefile.am.orig: Remove. 2009-08-05 Mark Wielaard From ahughes at redhat.com Thu Aug 6 04:05:46 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 11:05:46 +0000 Subject: changeset in /hg/icedtea: Add execvpe fix. Message-ID: changeset 2174f64c8bc9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2174f64c8bc9 description: Add execvpe fix. 2009-08-06 Andrew John Hughes * Makefile.am: Bump JDK changeset to obtain execvpe fix. diffstat: 2 files changed, 7 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ Makefile.am | 4 ++-- diffs (33 lines): diff -r 7800f23fa7a8 -r 2174f64c8bc9 ChangeLog --- a/ChangeLog Thu Aug 06 10:56:04 2009 +0100 +++ b/ChangeLog Thu Aug 06 12:01:27 2009 +0100 @@ -1,3 +1,8 @@ 2009-08-05 Mark Wielaard + + * Makefile.am: + Bump JDK changeset to obtain execvpe fix. + 2009-08-05 Mark Wielaard * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. diff -r 7800f23fa7a8 -r 2174f64c8bc9 Makefile.am --- a/Makefile.am Thu Aug 06 10:56:04 2009 +0100 +++ b/Makefile.am Thu Aug 06 12:01:27 2009 +0100 @@ -4,7 +4,7 @@ CORBA_CHANGESET = 1741ea5cb854 CORBA_CHANGESET = 1741ea5cb854 JAXP_CHANGESET = b3d2bf4c255d JAXWS_CHANGESET = c37936a72332 -JDK_CHANGESET = b96cfe9cfcfa +JDK_CHANGESET = 51fcc41d8b24 LANGTOOLS_CHANGESET = 634f519d6f9a HOTSPOT_CHANGESET = 945fcffdbcab @@ -12,7 +12,7 @@ CORBA_MD5SUM = 06ac898f583fc9eec179fc2d1 CORBA_MD5SUM = 06ac898f583fc9eec179fc2d1dcb5c71 JAXP_MD5SUM = 01118a1882ea1ac5205e232bd7c847f7 JAXWS_MD5SUM = 8c53573f9f072bb273435ee75c7aaaa3 -JDK_MD5SUM = 16a73b3b2409429425999b20aca1ba65 +JDK_MD5SUM = 5ca832939f80db7c2e836141a9cac98a LANGTOOLS_MD5SUM = cd1389112baa1b2b24da95555345c1b9 HOTSPOT_MD5SUM = ce3ab877df030cf4842001918898244e From ahughes at redhat.com Thu Aug 6 04:09:41 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 11:09:41 +0000 Subject: changeset in /hg/icedtea: Added tag icedtea-1.11 for changeset d... Message-ID: changeset bcd06cb49945 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=bcd06cb49945 description: Added tag icedtea-1.11 for changeset df574d432c00 diffstat: 1 file changed, 2 insertions(+) .hgtags | 2 ++ diffs (9 lines): diff -r df574d432c00 -r bcd06cb49945 .hgtags --- a/.hgtags Thu Aug 06 12:06:49 2009 +0100 +++ b/.hgtags Thu Aug 06 12:11:42 2009 +0100 @@ -19,3 +19,5 @@ bceb1140e068851e32b2e29635cd0c25b6d655a4 bceb1140e068851e32b2e29635cd0c25b6d655a4 icedtea-1.11 bceb1140e068851e32b2e29635cd0c25b6d655a4 icedtea-1.11 0000000000000000000000000000000000000000 icedtea-1.11 +0000000000000000000000000000000000000000 icedtea-1.11 +df574d432c00e6ad570cc9d92eb4dcd51d31eb7a icedtea-1.11 From doko at ubuntu.com Thu Aug 6 04:22:44 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 06 Aug 2009 11:22:44 +0000 Subject: changeset in /hg/icedtea: 2009-08-06 Matthias Klose changeset ad8209f846e0 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ad8209f846e0 description: 2009-08-06 Matthias Klose * Makefile.am (ICEDTEA_PATCHES): Make $(DISTRIBUTION_PATCHES) the last patches in the list. diffstat: 2 files changed, 8 insertions(+), 6 deletions(-) ChangeLog | 9 +++++---- Makefile.am | 5 +++-- diffs (42 lines): diff -r bcd06cb49945 -r ad8209f846e0 ChangeLog --- a/ChangeLog Thu Aug 06 12:11:42 2009 +0100 +++ b/ChangeLog Thu Aug 06 13:17:23 2009 +0200 @@ -1,11 +1,12 @@ 2009-08-06 Andrew John Hughes + + * Makefile.am (ICEDTEA_PATCHES): Make $(DISTRIBUTION_PATCHES) the + last patches in the list. + 2009-08-06 Andrew John Hughes * Makefile.am: Bump JDK changeset to obtain execvpe fix. - -2009-08-06 Matthias Klose - - * Makefile.am.orig: Remove. 2009-08-05 Mark Wielaard diff -r bcd06cb49945 -r ad8209f846e0 Makefile.am --- a/Makefile.am Thu Aug 06 12:11:42 2009 +0100 +++ b/Makefile.am Thu Aug 06 13:17:23 2009 +0200 @@ -2069,8 +2069,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-jvmtiEnv.patch \ patches/icedtea-xml-encodinginfo.patch \ patches/icedtea-cc-interp-backedge.patch \ - patches/icedtea-netx.patch \ - $(DISTRIBUTION_PATCHES) + patches/icedtea-netx.patch if WITH_RHINO ICEDTEA_PATCHES += \ @@ -2129,6 +2128,8 @@ ICEDTEA_PATCHES += patches/icedtea-livec ICEDTEA_PATCHES += patches/icedtea-liveconnect-dist.patch endif endif + +ICEDTEA_PATCHES += $(DISTRIBUTION_PATCHES) stamps/extract.stamp: stamps/download.stamp if OPENJDK_SRC_DIR_FOUND From gnu_andrew at member.fsf.org Thu Aug 6 04:30:59 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 6 Aug 2009 12:30:59 +0100 Subject: IcedTea7 1.11 (OpenJDK7 Milestone 4) released! Message-ID: <17c6771e0908060430t126e58cdvf7f069aafcfb695e@mail.gmail.com> We are pleased to announce the release of IcedTea7 1.11. The IcedTea project provides a harness to build the source code from OpenJDK7 using Free Software build tools. It also includes the only Free Java plugin and Web Start implementation, and support for additional architectures over and above x86, x86_64 and sparc via the Zero assembler port and the Shark JIT compiler. This release provides a version of IcedTea for producing builds of OpenJDK7 Milestone 4. Unlike the binaries mentioned by Mark Reinhold (http://blogs.sun.com/mr/entry/jdk7_m4) and Xiomara Jayasena (http://blogs.sun.com/xiomara/entry/jdk7_m4u), those produced by IcedTea are completely Free Software, and include Free implementations of a Java plugin and Web Start support. You can also build IcedTea on architectures not supported by OpenJDK as standard e.g. ppc, ppc64, arm via the Zero assembler port (--enable-zero). There is also experimental support for a JIT based on LLVM. What?s New? ?????? - Updated to OpenJDK7 b66 (Milestone 4), including JSR 308: Annotations on Java types. - Updates/bug fixes for netx, Shark and the web plugin. - Zero is now provided in the upstream forest rather than in-tree. - The options - --with-openjdk - --with-icedtea - --with-openjdk-home - --with-icedtea-home - --with-gcj-jdk have been removed. The JDK is now specified by --with-jdk-home and whether or not do a full bootstrap or not is now decided by --disable-bootstrap (the default is yes). This is in preparation for making the two stages independent of the JDK used, but some artefacts still remain in this release; the supported behaviour is still the use of gcj jdk for a full bootstrap and icedtea for a quick build. - Added java method tracing using systemtap version 0.9.9+. - Added latest security fixes. ?????? The tarball can be downloaded here: http://icedtea.classpath.org/download/source/icedtea-1.11.tar.gz The following people helped with this release: Lillian Angel, Gary Benson, Deepak Bhole, Andrew Haley, Andrew John Hughes, Matthias Klose, Omair Majid, Xerxes R?nby, Mark Wielaard We would also like to thank all the bug reporters and testers! To get started: $ tar xzf icedtea-1.11.tar.gz $ cd icedtea-1.11 Full build requirements and instructions are in INSTALL: $ ./configure [--enable-visualvm --with-jdk-home --disable-bootstrap --enable-pulse-java --enable-systemtap ...] $ make -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From doko at ubuntu.com Thu Aug 6 04:35:30 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 06 Aug 2009 11:35:30 +0000 Subject: changeset in /hg/icedtea: 2009-08-06 Matthias Klose changeset 2af5ec988144 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2af5ec988144 description: 2009-08-06 Matthias Klose * Makefile.am (ICEDTEA_ENV, ICEDTEA_ENV_ECJ): Allow passing as environment. diffstat: 2 files changed, 106 insertions(+), 102 deletions(-) ChangeLog | 5 + Makefile.am | 203 +++++++++++++++++++++++++++++------------------------------ diffs (262 lines): diff -r ad8209f846e0 -r 2af5ec988144 ChangeLog --- a/ChangeLog Thu Aug 06 13:17:23 2009 +0200 +++ b/ChangeLog Thu Aug 06 13:30:06 2009 +0200 @@ -1,3 +1,8 @@ 2009-08-06 Matthias Klose + + * Makefile.am (ICEDTEA_ENV, ICEDTEA_ENV_ECJ): Allow passing + as environment. + 2009-08-06 Matthias Klose * Makefile.am (ICEDTEA_PATCHES): Make $(DISTRIBUTION_PATCHES) the diff -r ad8209f846e0 -r 2af5ec988144 Makefile.am --- a/Makefile.am Thu Aug 06 13:17:23 2009 +0200 +++ b/Makefile.am Thu Aug 06 13:30:06 2009 +0200 @@ -1532,74 +1532,74 @@ else ICEDTEA_SHARK_BUILD = endif ICEDTEA_ENV = \ - "ALT_JDK_IMPORT_PATH=$(ICEDTEA_BOOT_DIR)" \ - "ANT_HOME=$(SYSTEM_ANT_DIR)" \ - "BUILD_NUMBER=$(OPENJDK_VERSION)" \ - "JDK_UPDATE_VERSION=$(JDK_UPDATE_VERSION)" \ - "JRE_RELEASE_VERSION=1.7.0_$(COMBINED_VERSION)" \ - "MILESTONE=fcs" \ - "LANG=C" \ - "PATH=$(abs_top_builddir)/bootstrap/jdk1.6.0/bin:$(OS_PATH):$$PATH" \ - "ALT_BOOTDIR=$(ICEDTEA_BOOT_DIR)" \ - "BUILD_ARCH_DIR=$(BUILD_ARCH_DIR)" \ - "ICEDTEA_RT=$(ICEDTEA_RT)" \ - "ICEDTEA_BUILD_DIR=$(ICEDTEA_BUILD_DIR)" \ - "ICEDTEA_CLS_DIR=$(ICEDTEA_CLS_DIR)" \ - "ICEDTEA_ENDORSED_DIR=$(ICEDTEA_ENDORSED_DIR)" \ - "ENDORSED=-Djava.endorsed.dirs=$(ICEDTEA_ENDORSED_DIR)" \ - "CLASSPATH=" \ - "LD_LIBRARY_PATH=" \ - "CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \ - "ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \ - "ICEDTEA_SHARK_BUILD=$(ICEDTEA_SHARK_BUILD)" \ - "ZERO_LIBARCH=$(ZERO_LIBARCH)" \ - "ZERO_BITSPERWORD=$(ZERO_BITSPERWORD)" \ - "ZERO_ENDIANNESS=$(ZERO_ENDIANNESS)" \ - "ZERO_ARCHDEF=$(ZERO_ARCHDEF)" \ - "ZERO_ARCHFLAG=$(ZERO_ARCHFLAG)" \ - "LIBFFI_CFLAGS=$(LIBFFI_CFLAGS)" \ - "LIBFFI_LIBS=$(LIBFFI_LIBS)" \ - "LLVM_CFLAGS=$(LLVM_CFLAGS)" \ - "LLVM_LDFLAGS=$(LLVM_LDFLAGS)" \ - "LLVM_LIBS=$(LLVM_LIBS)" \ - "FREETYPE2_HEADERS=$(FREETYPE2_CFLAGS)" \ - "FT2_LIB=$(FREETYPE2_LIBS)" \ - "ALT_PARALLEL_COMPILE_JOBS=$(PARALLEL_JOBS)" \ - "HOTSPOT_BUILD_JOBS=$(PARALLEL_JOBS)" \ - "JAVAC=" \ - "ANT_RESPECT_JAVA_HOME=TRUE" \ - "RHINO_JAR=$(RHINO_JAR)" \ - "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)" \ - "DEBUG_CLASSFILES=true" \ - "DEBUG_BINARIES=true" + ALT_JDK_IMPORT_PATH="$(ICEDTEA_BOOT_DIR)" \ + ANT_HOME="$(SYSTEM_ANT_DIR)" \ + BUILD_NUMBER="$(OPENJDK_VERSION)" \ + JDK_UPDATE_VERSION="$(JDK_UPDATE_VERSION)" \ + JRE_RELEASE_VERSION="1.7.0_$(COMBINED_VERSION)" \ + MILESTONE="fcs" \ + LANG="C" \ + PATH="$(abs_top_builddir)/bootstrap/jdk1.6.0/bin:$(OS_PATH):$$PATH" \ + ALT_BOOTDIR="$(ICEDTEA_BOOT_DIR)" \ + BUILD_ARCH_DIR="$(BUILD_ARCH_DIR)" \ + ICEDTEA_RT="$(ICEDTEA_RT)" \ + ICEDTEA_BUILD_DIR="$(ICEDTEA_BUILD_DIR)" \ + ICEDTEA_CLS_DIR="$(ICEDTEA_CLS_DIR)" \ + ICEDTEA_ENDORSED_DIR="$(ICEDTEA_ENDORSED_DIR)" \ + ENDORSED="-Djava.endorsed.dirs=$(ICEDTEA_ENDORSED_DIR)" \ + CLASSPATH="" \ + LD_LIBRARY_PATH="" \ + CORE_BUILD="$(ICEDTEA_CORE_BUILD)" \ + ZERO_BUILD="$(ICEDTEA_ZERO_BUILD)" \ + ICEDTEA_SHARK_BUILD="$(ICEDTEA_SHARK_BUILD)" \ + ZERO_LIBARCH="$(ZERO_LIBARCH)" \ + ZERO_BITSPERWORD="$(ZERO_BITSPERWORD)" \ + ZERO_ENDIANNESS="$(ZERO_ENDIANNESS)" \ + ZERO_ARCHDEF="$(ZERO_ARCHDEF)" \ + ZERO_ARCHFLAG="$(ZERO_ARCHFLAG)" \ + LIBFFI_CFLAGS="$(LIBFFI_CFLAGS)" \ + LIBFFI_LIBS="$(LIBFFI_LIBS)" \ + LLVM_CFLAGS="$(LLVM_CFLAGS)" \ + LLVM_LDFLAGS="$(LLVM_LDFLAGS)" \ + LLVM_LIBS="$(LLVM_LIBS)" \ + FREETYPE2_HEADERS="$(FREETYPE2_CFLAGS)" \ + FT2_LIB="$(FREETYPE2_LIBS)" \ + ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \ + HOTSPOT_BUILD_JOBS="$(PARALLEL_JOBS)" \ + JAVAC="" \ + ANT_RESPECT_JAVA_HOME="TRUE" \ + RHINO_JAR="$(RHINO_JAR)" \ + 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)" \ + DEBUG_CLASSFILES="true" \ + DEBUG_BINARIES="true" if WITH_CACAO ICEDTEA_ENV += \ - "ALT_HOTSPOT_IMPORT_PATH=$(CACAO_IMPORT_PATH)" + ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" endif if !ENABLE_NIMBUS_GENERATION ICEDTEA_ENV += \ - "DISABLE_NIMBUS=true" + DISABLE_NIMBUS="true" endif if DISABLE_OPTIMIZATIONS ICEDTEA_ENV += \ - "NO_OPTIMIZATIONS=true" \ - "CC_NO_OPT=-O0 -g" + NO_OPTIMIZATIONS="true" \ + CC_NO_OPT="-O0 -g" endif if !ENABLE_DOCS ICEDTEA_ENV += \ - "NO_DOCS=true" + NO_DOCS="true" endif if USE_ALT_JAR ICEDTEA_ENV += \ - "ALT_JAR_CMD=$(ALT_JAR_CMD)" + ALT_JAR_CMD="$(ALT_JAR_CMD)" endif env: @@ -1612,70 +1612,69 @@ ICEDTEA_CLS_DIR_ECJ = \ ICEDTEA_CLS_DIR_ECJ = \ $(abs_top_builddir)/$(ECJ_BUILD_OUTPUT_DIR)/classes ICEDTEA_ENV_ECJ = \ - "ALT_JDK_IMPORT_PATH=$(ICEDTEA_BOOT_DIR)" \ - "ANT_HOME=$(SYSTEM_ANT_DIR)" \ - "BUILD_NUMBER=$(OPENJDK_VERSION)" \ - "JDK_UPDATE_VERSION=$(JDK_UPDATE_VERSION)" \ - "JRE_RELEASE_VERSION=1.7.0_$(COMBINED_VERSION)" \ - "MILESTONE=fcs" \ - "LANG=C" \ - "PATH=$(abs_top_builddir)/bootstrap/jdk1.6.0/bin:$(OS_PATH):$$PATH" \ - "ALT_BOOTDIR=$(ICEDTEA_BOOT_DIR)" \ - "BUILD_ARCH_DIR=$(BUILD_ARCH_DIR)" \ - "ICEDTEA_RT=$(ICEDTEA_RT)" \ - "ICEDTEA_BUILD_DIR=$(ICEDTEA_BUILD_DIR_ECJ)" \ - "ICEDTEA_CLS_DIR=$(ICEDTEA_CLS_DIR_ECJ)" \ - "ICEDTEA_ENDORSED_DIR=$(ICEDTEA_ENDORSED_DIR)" \ - "ENDORSED=-Djava.endorsed.dirs=$(ICEDTEA_ENDORSED_DIR)" \ - "BOOTCLASSPATH_CLS_RT=-bootclasspath \ - $(ICEDTEA_CLS_DIR_ECJ):$(ICEDTEA_RT)" \ - "BOOTCLASSPATH_CLS=-bootclasspath $(ICEDTEA_CLS_DIR_ECJ)" \ - "BOOTCLASSPATH_RT_LIBGCJ=-bootclasspath $(ICEDTEA_RT):$(SYSTEM_JDK_DIR)/jre/lib/rt.jar" \ - "CLASSPATH=" \ - "LD_LIBRARY_PATH=" \ - "GENSRCDIR=$(abs_top_builddir)/generated" \ - "CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \ - "ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \ - "ICEDTEA_SHARK_BUILD=$(ICEDTEA_SHARK_BUILD)" \ - "ZERO_LIBARCH=$(ZERO_LIBARCH)" \ - "ZERO_BITSPERWORD=$(ZERO_BITSPERWORD)" \ - "ZERO_ENDIANNESS=$(ZERO_ENDIANNESS)" \ - "ZERO_ARCHDEF=$(ZERO_ARCHDEF)" \ - "ZERO_ARCHFLAG=$(ZERO_ARCHFLAG)" \ - "LIBFFI_CFLAGS=$(LIBFFI_CFLAGS)" \ - "LIBFFI_LIBS=$(LIBFFI_LIBS)" \ - "LLVM_CFLAGS=$(LLVM_CFLAGS)" \ - "LLVM_LDFLAGS=$(LLVM_LDFLAGS)" \ - "LLVM_LIBS=$(LLVM_LIBS)" \ - "FREETYPE2_HEADERS=$(FREETYPE2_CFLAGS)" \ - "FT2_LIB=$(FREETYPE2_LIBS)" \ - "ALT_PARALLEL_COMPILE_JOBS=$(PARALLEL_JOBS)" \ - "HOTSPOT_BUILD_JOBS=$(PARALLEL_JOBS)" \ - "JAVAC=" \ - "RHINO_JAR=$(RHINO_JAR)" \ - "JAR_KNOWS_ATFILE=$(JAR_KNOWS_ATFILE)" \ - "JAR_KNOWS_J_OPTIONS=$(JAR_KNOWS_J_OPTIONS)" \ - "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)" \ - "DEBUG_CLASSFILES=true" \ - "DEBUG_BINARIES=true" + ALT_JDK_IMPORT_PATH="$(ICEDTEA_BOOT_DIR)" \ + ANT_HOME="$(SYSTEM_ANT_DIR)" \ + BUILD_NUMBER="$(OPENJDK_VERSION)" \ + JDK_UPDATE_VERSION="$(JDK_UPDATE_VERSION)" \ + JRE_RELEASE_VERSION="1.7.0_$(COMBINED_VERSION)" \ + MILESTONE="fcs" \ + LANG="C" \ + PATH="$(abs_top_builddir)/bootstrap/jdk1.6.0/bin:$(OS_PATH):$$PATH" \ + ALT_BOOTDIR="$(ICEDTEA_BOOT_DIR)" \ + BUILD_ARCH_DIR="$(BUILD_ARCH_DIR)" \ + ICEDTEA_RT="$(ICEDTEA_RT)" \ + ICEDTEA_BUILD_DIR="$(ICEDTEA_BUILD_DIR_ECJ)" \ + ICEDTEA_CLS_DIR="$(ICEDTEA_CLS_DIR_ECJ)" \ + ICEDTEA_ENDORSED_DIR="$(ICEDTEA_ENDORSED_DIR)" \ + ENDORSED="-Djava.endorsed.dirs=$(ICEDTEA_ENDORSED_DIR)" \ + BOOTCLASSPATH_CLS_RT="-bootclasspath $(ICEDTEA_CLS_DIR_ECJ):$(ICEDTEA_RT)" \ + BOOTCLASSPATH_CLS="-bootclasspath $(ICEDTEA_CLS_DIR_ECJ)" \ + BOOTCLASSPATH_RT_LIBGCJ="-bootclasspath $(ICEDTEA_RT):$(SYSTEM_JDK_DIR)/jre/lib/rt.jar" \ + CLASSPATH="" \ + LD_LIBRARY_PATH="" \ + GENSRCDIR="$(abs_top_builddir)/generated" \ + CORE_BUILD="$(ICEDTEA_CORE_BUILD)" \ + ZERO_BUILD="$(ICEDTEA_ZERO_BUILD)" \ + ICEDTEA_SHARK_BUILD="$(ICEDTEA_SHARK_BUILD)" \ + ZERO_LIBARCH="$(ZERO_LIBARCH)" \ + ZERO_BITSPERWORD="$(ZERO_BITSPERWORD)" \ + ZERO_ENDIANNESS="$(ZERO_ENDIANNESS)" \ + ZERO_ARCHDEF="$(ZERO_ARCHDEF)" \ + ZERO_ARCHFLAG="$(ZERO_ARCHFLAG)" \ + LIBFFI_CFLAGS="$(LIBFFI_CFLAGS)" \ + LIBFFI_LIBS="$(LIBFFI_LIBS)" \ + LLVM_CFLAGS="$(LLVM_CFLAGS)" \ + LLVM_LDFLAGS="$(LLVM_LDFLAGS)" \ + LLVM_LIBS="$(LLVM_LIBS)" \ + FREETYPE2_HEADERS="$(FREETYPE2_CFLAGS)" \ + FT2_LIB="$(FREETYPE2_LIBS)" \ + ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \ + HOTSPOT_BUILD_JOBS="$(PARALLEL_JOBS)" \ + JAVAC="" \ + RHINO_JAR="$(RHINO_JAR)" \ + JAR_KNOWS_ATFILE="$(JAR_KNOWS_ATFILE)" \ + JAR_KNOWS_J_OPTIONS="$(JAR_KNOWS_J_OPTIONS)" \ + 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)" \ + DEBUG_CLASSFILES="true" \ + DEBUG_BINARIES="true" if WITH_CACAO ICEDTEA_ENV_ECJ += \ - "ALT_HOTSPOT_IMPORT_PATH=$(CACAO_IMPORT_PATH)" + ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" endif if DISABLE_OPTIMIZATIONS ICEDTEA_ENV_ECJ += \ - "NO_OPTIMIZATIONS=true" \ - "CC_NO_OPT=-O0 -g" + NO_OPTIMIZATIONS="true" \ + CC_NO_OPT="-O0 -g" endif if !ENABLE_DOCS ICEDTEA_ENV_ECJ += \ - "NO_DOCS=true" + NO_DOCS="true" endif env-ecj: From dbhole at redhat.com Thu Aug 6 07:40:54 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 06 Aug 2009 14:40:54 +0000 Subject: changeset in /hg/icedtea6: Updates to NP plugin. Message-ID: changeset b775cb0d0900 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b775cb0d0900 description: Updates to NP plugin. - Plugin request processor threads now use condition based wait rather than periodic polling - Added support for fetching field information and values, and method invocation from JS -> Java - Added support for static calls (e.g. System.out.println(...)) from JS - Implented a cost-based overloaded method resolver for when JS calls an overloaded Java method with ambiguous types. diffstat: 14 files changed, 2098 insertions(+), 287 deletions(-) ChangeLog | 27 plugin/icedteanp/IcedTeaJavaRequestProcessor.cc | 640 +++++++++- plugin/icedteanp/IcedTeaJavaRequestProcessor.h | 68 + plugin/icedteanp/IcedTeaNPPlugin.cc | 173 +- plugin/icedteanp/IcedTeaNPPlugin.h | 8 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 28 plugin/icedteanp/IcedTeaPluginRequestProcessor.h | 4 plugin/icedteanp/IcedTeaPluginUtils.cc | 10 plugin/icedteanp/IcedTeaPluginUtils.h | 9 plugin/icedteanp/IcedTeaRunnable.h | 2 plugin/icedteanp/IcedTeaScriptablePluginObject.cc | 550 ++++++++ plugin/icedteanp/IcedTeaScriptablePluginObject.h | 104 + plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java | 480 +++++++ plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java | 282 ++-- diffs (truncated from 3026 to 500 lines): diff -r 8a0ea636a6e5 -r b775cb0d0900 ChangeLog --- a/ChangeLog Wed Aug 05 20:43:00 2009 +0200 +++ b/ChangeLog Thu Aug 06 10:43:31 2009 -0400 @@ -1,3 +1,30 @@ 2009-08-05 Mark Wielaard + + * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc: Handle error messages + from Java side. Add referencing/de-referencing support, and support for + fetching fields, invoking methods, and returning applet instances. + * plugin/icedteanp/IcedTeaJavaRequestProcessor.h: Decrease timeout to 20 + seconds. Declare new functions created in the associated .cc file. + * plugin/icedteanp/IcedTeaNPPlugin.cc: Add support for dynamic NPObject + creation per instance. Add a new global pthread_cond_t for message + availability. + * plugin/icedteanp/IcedTeaNPPlugin.h: Misc. changes related to the above + associated file. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: Use condition based + wait for message availability, rather than periodic poll. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.h: Make + getInstanceFromMemberPtr and storeInstanceID global. + * plugin/icedteanp/IcedTeaPluginUtils.cc: Force use of file:// src until + security subsystem is implemented. + * plugin/icedteanp/IcedTeaScriptablePluginObject.cc: Created skeletons for + Java and JavaPackage NPObjects, and implemented hasProperty, hasMethod, + getProperty and getMethod. + * plugin/icedteanp/IcedTeaScriptablePluginObject.h: Appropriate header + changes associated with the above. + * plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java: New file. + Uses a cost-based approach to resolve overloaded methods when JavaScript + calls Java methods with potentially ambiguous type arguments. + 2009-08-05 Mark Wielaard * patches/icedtea-systemtap.patch: Remove workaround for nmethod.cpp. diff -r 8a0ea636a6e5 -r b775cb0d0900 plugin/icedteanp/IcedTeaJavaRequestProcessor.cc --- a/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc Wed Aug 05 20:43:00 2009 +0200 +++ b/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc Thu Aug 06 10:43:31 2009 -0400 @@ -66,9 +66,22 @@ JavaRequestProcessor::newMessageOnBus(co { // Gather the results - // GetStringUTFChars - if (message_parts->at(4) == "GetStringUTFChars" || - message_parts->at(4) == "GetToStringValue") + // Let's get errors out of the way first + if (message_parts->at(4) == "Error") + { + for (int i=5; i < message_parts->size(); i++) + { + result->error_msg->append(message_parts->at(i)); + result->error_msg->append(" "); + } + + printf("Error on Java side: %s\n", result->error_msg->c_str()); + + result->error_occurred = true; + result_ready = true; + } + else if (message_parts->at(4) == "GetStringUTFChars" || + message_parts->at(4) == "GetToStringValue") { // first item is length, and it is radix 10 int length = strtol(message_parts->at(5).c_str(), NULL, 10); @@ -83,30 +96,49 @@ JavaRequestProcessor::newMessageOnBus(co IcedTeaPluginUtilities::getUTF16LEString(length, 6 /* start at */, message_parts, result->return_wstring); result_ready = true; - } else if (message_parts->at(4) == "FindClass") + } else if ((message_parts->at(4) == "FindClass") || + (message_parts->at(4) == "GetClassName") || + (message_parts->at(4) == "GetClassID") || + (message_parts->at(4) == "GetMethodID") || + (message_parts->at(4) == "GetStaticMethodID") || + (message_parts->at(4) == "GetObjectClass") || + (message_parts->at(4) == "NewObject") || + (message_parts->at(4) == "NewStringUTF") || + (message_parts->at(4) == "HasPackage") || + (message_parts->at(4) == "HasMethod") || + (message_parts->at(4) == "HasField") || + (message_parts->at(4) == "GetStaticFieldID") || + (message_parts->at(4) == "GetFieldID") || + (message_parts->at(4) == "GetField") || + (message_parts->at(4) == "GetStaticField") || + (message_parts->at(4) == "GetJavaObject")) { result->return_identifier = atoi(message_parts->at(5).c_str()); result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access result_ready = true; - } else if (message_parts->at(4) == "GetClassName") + } else if ((message_parts->at(4) == "DeleteLocalRef") || + (message_parts->at(4) == "NewGlobalRef")) { - result->return_identifier = atoi(message_parts->at(5).c_str()); - result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access - result_ready = true; - } else if (message_parts->at(4) == "GetMethodID") + result_ready = true; // nothing else to do + } else if ((message_parts->at(4) == "CallMethod") || + + (message_parts->at(4) == "CallStaticMethod")) { - result->return_identifier = atoi(message_parts->at(5).c_str()); - result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access - result_ready = true; - } else if (message_parts->at(4) == "NewObject") - { - result->return_identifier = atoi(message_parts->at(5).c_str()); - result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access - result_ready = true; - } else if (message_parts->at(4) == "NewStringUTF") - { - result->return_identifier = atoi(message_parts->at(5).c_str()); - result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access + + if (message_parts->at(5) == "literalreturn") + { + // literal returns don't have a corresponding jni id + result->return_identifier = 0; + result->return_string->append(message_parts->at(6)); + + } else + { + // Else it is a complex object + + result->return_identifier = atoi(message_parts->at(5).c_str()); + result->return_string->append(message_parts->at(5)); // store it as a string as well, for easy access + } + result_ready = true; } @@ -130,9 +162,10 @@ JavaRequestProcessor::JavaRequestProcess // caller frees this result = new JavaResultData(); result->error_msg = new std::string(); + result->return_identifier = 0; result->return_string = new std::string(); result->return_wstring = new std::wstring(); - result->error_occured = false; + result->error_occurred = false; result_ready = false; } @@ -162,6 +195,22 @@ JavaRequestProcessor::~JavaRequestProces } } +/** + * Resets the results + */ +void +JavaRequestProcessor::resetResult() +{ + // caller frees this + result->error_msg->clear(); + result->return_identifier = 0; + result->return_string->clear(); + result->return_wstring->clear(); + result->error_occurred = false; + + result_ready = false; +} + void JavaRequestProcessor::postAndWaitForResponse(std::string* message) { @@ -179,10 +228,14 @@ JavaRequestProcessor::postAndWaitForResp do { clock_gettime(CLOCK_REALTIME, &curr_t); - bool timedout = false; if (!result_ready && (curr_t.tv_sec < t.tv_sec)) - usleep(2000); + { + if (g_main_context_pending(NULL)) + g_main_context_iteration(NULL, false); + else + usleep(2000); + } else break; @@ -190,6 +243,9 @@ JavaRequestProcessor::postAndWaitForResp if (curr_t.tv_sec >= t.tv_sec) { + result->error_occurred = true; + result->error_msg->append("Error: Timed out when waiting for response"); + // Report error PLUGIN_DEBUG_1ARG("Error: Timed out when waiting for response to %s\n", message->c_str()); } @@ -253,6 +309,57 @@ JavaRequestProcessor::getString(std::str return result; } +/** + * Decrements reference count by 1 + * + * @param object_id The ID of the object + */ + +void +JavaRequestProcessor::deleteReference(std::string object_id) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" DeleteLocalRef "); + message->append(object_id); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete message; +} + +/** + * Increments reference count by 1 + * + * @param object_id The ID of the object + */ + +void +JavaRequestProcessor::addReference(std::string object_id) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" NewGlobalRef "); + message->append(object_id); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete message; + +} + JavaResultData* JavaRequestProcessor::findClass(std::string name) { @@ -274,7 +381,7 @@ JavaRequestProcessor::findClass(std::str } JavaResultData* -JavaRequestProcessor::getClassName(std::string ID) +JavaRequestProcessor::getClassName(std::string objectID) { std::string* message; @@ -284,7 +391,7 @@ JavaRequestProcessor::getClassName(std:: message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); message->append(" GetClassName "); - message->append(ID); + message->append(objectID); postAndWaitForResponse(message); @@ -294,7 +401,139 @@ JavaRequestProcessor::getClassName(std:: } JavaResultData* -JavaRequestProcessor::getMethodID(std::string objectID, NPIdentifier methodName, +JavaRequestProcessor::getClassID(std::string objectID) +{ + std::string* message; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + + message->append(" GetClassID "); + message->append(objectID); + + postAndWaitForResponse(message); + + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getFieldID(std::string classID, std::string fieldName) +{ + JavaResultData* java_result; + JavaRequestProcessor* java_request = new JavaRequestProcessor(); + std::string* message; + + java_result = java_request->newString(fieldName); + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + message->append(" GetFieldID "); + message->append(classID); + message->append(" "); + message->append(java_result->return_string->c_str()); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + + delete java_request; + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getStaticFieldID(std::string classID, std::string fieldName) +{ + JavaResultData* java_result; + JavaRequestProcessor* java_request = new JavaRequestProcessor(); + std::string* message; + + java_result = java_request->newString(fieldName); + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + message->append(" GetStaticFieldID "); + message->append(classID); + message->append(" "); + message->append(java_result->return_string->c_str()); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + + delete java_request; + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getField(std::string classID, std::string fieldName) +{ + JavaResultData* java_result; + JavaRequestProcessor* java_request = new JavaRequestProcessor(); + std::string* message; + + java_result = java_request->getFieldID(classID, fieldName); + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + message->append(" GetField "); + message->append(classID); + message->append(" "); + message->append(java_result->return_string->c_str()); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + + delete java_request; + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getStaticField(std::string classID, std::string fieldName) +{ + JavaResultData* java_result; + JavaRequestProcessor* java_request = new JavaRequestProcessor(); + std::string* message; + + java_result = java_request->getStaticFieldID(classID, fieldName); + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + message->append(" GetStaticField "); + message->append(classID); + message->append(" "); + message->append(java_result->return_string->c_str()); + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + + delete java_request; + delete message; + + return result; +} + +JavaResultData* +JavaRequestProcessor::getMethodID(std::string classID, NPIdentifier methodName, std::vector args) { JavaRequestProcessor* java_request; @@ -317,7 +556,7 @@ JavaRequestProcessor::getMethodID(std::s message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); *message += " GetMethodID "; - *message += objectID; + *message += classID; *message += " "; *message += browser_functions.utf8fromidentifier(methodName); *message += " "; @@ -330,6 +569,235 @@ JavaRequestProcessor::getMethodID(std::s delete message; return result; +} + +JavaResultData* +JavaRequestProcessor::getStaticMethodID(std::string classID, NPIdentifier methodName, + std::vector args) +{ + JavaRequestProcessor* java_request; + std::string* message; + std::string* signature; + + signature = new std::string(); + *signature += "("; + + // FIXME: Need to determine how to extract array types and complex java objects + for (int i=0; i < args.size(); i++) + { + *signature += args[i]; + } + + *signature += ")"; + + this->instance = 0; // context is always 0 (needed for java-side backwards compat.) + this->reference = IcedTeaPluginUtilities::getReference(); + + message = IcedTeaPluginUtilities::constructMessagePrefix(0, reference); + *message += " GetStaticMethodID "; + *message += classID; + *message += " "; + *message += browser_functions.utf8fromidentifier(methodName); + *message += " "; + *message += *signature; + + postAndWaitForResponse(message); + + IcedTeaPluginUtilities::releaseReference(); + delete signature; + delete message; + + return result; +} + +int +JavaRequestProcessor::createJavaObjectFromVariant(NPVariant variant) +{ + JavaResultData* java_result; + + std::string className; + std::string jsObjectClassID = std::string(); + std::string jsObjectConstructorID = std::string(); + + std::string stringArg = std::string(); + std::vector args = std::vector(); + + JavaRequestProcessor java_request = JavaRequestProcessor(); + bool alreadyCreated = false; + + if (NPVARIANT_IS_VOID(variant)) + { + PLUGIN_DEBUG_1ARG("VOID %d\n", variant); + } + else if (NPVARIANT_IS_NULL(variant)) + { + PLUGIN_DEBUG_1ARG("NULL\n", variant); + } + else if (NPVARIANT_IS_BOOLEAN(variant)) + { + className = "java.lang.Boolean"; + + if (NPVARIANT_TO_BOOLEAN(variant)) + stringArg = "true"; + else + stringArg = "false"; + + } + else if (NPVARIANT_IS_INT32(variant)) + { + className = "java.lang.Integer"; From ahughes at redhat.com Thu Aug 6 09:26:53 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Thu, 06 Aug 2009 16:26:53 +0000 Subject: changeset in /hg/icedtea: Bump to b67. Message-ID: changeset da8d53a6fafd in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=da8d53a6fafd description: Bump to b67. 2009-08-06 Andrew John Hughes * Makefile.am: Bump to b67. diffstat: 2 files changed, 22 insertions(+), 17 deletions(-) ChangeLog | 5 +++++ Makefile.am | 34 +++++++++++++++++----------------- diffs (53 lines): diff -r 2af5ec988144 -r da8d53a6fafd ChangeLog --- a/ChangeLog Thu Aug 06 13:30:06 2009 +0200 +++ b/ChangeLog Thu Aug 06 17:28:47 2009 +0100 @@ -1,3 +1,8 @@ 2009-08-06 Matthias Klose + + * Makefile.am: + Bump to b67. + 2009-08-06 Matthias Klose * Makefile.am (ICEDTEA_ENV, ICEDTEA_ENV_ECJ): Allow passing diff -r 2af5ec988144 -r da8d53a6fafd Makefile.am --- a/Makefile.am Thu Aug 06 13:30:06 2009 +0200 +++ b/Makefile.am Thu Aug 06 17:28:47 2009 +0100 @@ -1,20 +1,20 @@ OPENJDK_VERSION = b66 -OPENJDK_VERSION = b66 - -OPENJDK_CHANGESET = e7eeeda332ec -CORBA_CHANGESET = 1741ea5cb854 -JAXP_CHANGESET = b3d2bf4c255d -JAXWS_CHANGESET = c37936a72332 -JDK_CHANGESET = 51fcc41d8b24 -LANGTOOLS_CHANGESET = 634f519d6f9a -HOTSPOT_CHANGESET = 945fcffdbcab - -OPENJDK_MD5SUM = 8f63dbb0dcd83d905e243c58d0135174 -CORBA_MD5SUM = 06ac898f583fc9eec179fc2d1dcb5c71 -JAXP_MD5SUM = 01118a1882ea1ac5205e232bd7c847f7 -JAXWS_MD5SUM = 8c53573f9f072bb273435ee75c7aaaa3 -JDK_MD5SUM = 5ca832939f80db7c2e836141a9cac98a -LANGTOOLS_MD5SUM = cd1389112baa1b2b24da95555345c1b9 -HOTSPOT_MD5SUM = ce3ab877df030cf4842001918898244e +OPENJDK_VERSION = b67 + +OPENJDK_CHANGESET = f24111620a51 +CORBA_CHANGESET = 1cb0098b53b2 +JAXP_CHANGESET = 45fc86d2aa5c +JAXWS_CHANGESET = 73440eb34fb0 +JDK_CHANGESET = cd7d9265b4e6 +LANGTOOLS_CHANGESET = 14b1a8ede954 +HOTSPOT_CHANGESET = 87c6731ab8d1 + +OPENJDK_MD5SUM = f5cc1b21cf1a805528300bf931aa821e +CORBA_MD5SUM = 00fa00a58b465cad40cab9ac05058c24 +JAXP_MD5SUM = 61230cee4199f91ed5675bcf2acad63d +JAXWS_MD5SUM = fc9d2659fb875ece0e3a5e7894c1bbf8 +JDK_MD5SUM = 8e3fa808fcad7713635a21e127dd0f72 +LANGTOOLS_MD5SUM = a3b15bcf5b76b1639600250fc29c057b +HOTSPOT_MD5SUM = d0632498485808fdf8f97ef1f388722d CACAO_VERSION = 0.99.4 CACAO_MD5SUM = 63220327925ace13756ae334c55a3baa From doko at ubuntu.com Thu Aug 6 09:41:00 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 06 Aug 2009 16:41:00 +0000 Subject: changeset in /hg/icedtea: 2009-08-06 Matthias Klose changeset 39d2012855a5 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=39d2012855a5 description: 2009-08-06 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Adjust for added/removed configuration options. diffstat: 2 files changed, 9 insertions(+), 6 deletions(-) ChangeLog | 5 +++++ Makefile.am | 10 ++++------ diffs (40 lines): diff -r da8d53a6fafd -r 39d2012855a5 ChangeLog --- a/ChangeLog Thu Aug 06 17:28:47 2009 +0100 +++ b/ChangeLog Thu Aug 06 18:35:39 2009 +0200 @@ -1,3 +1,8 @@ 2009-08-06 Andrew John Hughes + + * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Adjust for added/removed + configuration options. + 2009-08-06 Andrew John Hughes * Makefile.am: diff -r da8d53a6fafd -r 39d2012855a5 Makefile.am --- a/Makefile.am Thu Aug 06 17:28:47 2009 +0100 +++ b/Makefile.am Thu Aug 06 18:35:39 2009 +0200 @@ -3423,20 +3423,18 @@ 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 \ - --enable-zero + --with-jdk-home=$(abs_top_builddir)/$(BUILD_OUTPUT_DIR)/j2sdk-image \ + --disable-bootstrap --enable-zero if ADD_SHARK_BUILD ADD_ZERO_CONFIGURE_ARGS += \ --enable-shark endif ADD_ZERO_CONFIGURE_ARGS += \ --disable-docs \ - $(filter-out '--with-gcj-home=% '--with-ecj=% \ + $(filter-out '--with-jdk-home=% '--with-ecj=% \ '--with-java=% '--with-javah=% \ '--with-rmic=% '--with-additional-vms=% \ - '--with-icedtea '--with-icedtea-home=% \ - '--with-openjdk '--with-openjdk-home=% , \ + '--disable-bootstrap% '--enable-bootstrap% , \ $(CONFIGURE_ARGS)) ADD_ZERO_EXTRA_BUILD_ENV = \ From langel at redhat.com Thu Aug 6 13:04:21 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 06 Aug 2009 16:04:21 -0400 Subject: IcedTea7 1.11 (OpenJDK7 Milestone 4) released! In-Reply-To: <17c6771e0908060430t126e58cdvf7f069aafcfb695e@mail.gmail.com> References: <17c6771e0908060430t126e58cdvf7f069aafcfb695e@mail.gmail.com> Message-ID: <4A7B3745.40805@redhat.com> Andrew John Hughes wrote: > We are pleased to announce the release of IcedTea7 1.11. > > The IcedTea project provides a harness to build the source code from > OpenJDK7 using Free Software build tools. It also includes the only > Free Java plugin and Web Start implementation, and support for > additional architectures over and above x86, x86_64 and sparc via the > Zero assembler port and the Shark JIT compiler. > > This release provides a version of IcedTea for producing builds of > OpenJDK7 Milestone 4. Unlike the binaries mentioned by Mark Reinhold > (http://blogs.sun.com/mr/entry/jdk7_m4) and Xiomara Jayasena > (http://blogs.sun.com/xiomara/entry/jdk7_m4u), those produced by > IcedTea are completely Free Software, and include Free implementations > of a Java plugin and Web Start support. You can also build IcedTea on > architectures not supported by OpenJDK as standard e.g. ppc, ppc64, > arm via the Zero assembler port (--enable-zero). There is also > experimental support for a JIT based on LLVM. > > What???s New? > ?????????????????? > - Updated to OpenJDK7 b66 (Milestone 4), including > JSR 308: Annotations on Java types. > - Updates/bug fixes for netx, Shark and the web plugin. > - Zero is now provided in the upstream forest rather than in-tree. > - The options > - --with-openjdk > - --with-icedtea > - --with-openjdk-home > - --with-icedtea-home > - --with-gcj-jdk > have been removed. The JDK is now specified by --with-jdk-home > and whether or not do a full bootstrap or not is now decided > by --disable-bootstrap (the default is yes). This is in preparation > for making the two stages independent of the JDK used, but some > artefacts still remain in this release; the supported behaviour > is still the use of gcj jdk for a full bootstrap and icedtea > for a quick build. > - Added java method tracing using systemtap version 0.9.9+. > - Added latest security fixes. > ?????????????????? > > The tarball can be downloaded here: > http://icedtea.classpath.org/download/source/icedtea-1.11.tar.gz > > The following people helped with this release: > Lillian Angel, Gary Benson, Deepak Bhole, Andrew Haley, Andrew John > Hughes, Matthias Klose, Omair Majid, Xerxes R??nby, Mark Wielaard > > We would also like to thank all the bug reporters and testers! > > To get started: > $ tar xzf icedtea-1.11.tar.gz > $ cd icedtea-1.11 > > Full build requirements and instructions are in INSTALL: > $ ./configure [--enable-visualvm --with-jdk-home --disable-bootstrap > --enable-pulse-java --enable-systemtap ...] > $ make > Fedora 11 i386, srpm and x86_64 rpms here: http://langel.fedorapeople.org/java-1.7.0-openjdk/ Cheers, Lillian From langel at redhat.com Thu Aug 6 13:46:52 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 06 Aug 2009 16:46:52 -0400 Subject: Proposed IcedTea 6 release Message-ID: <4A7B413C.8010109@redhat.com> Hi, Due to the most recent drop of security patches, the progress on the plugin/netx and system-tap integration, I am wondering if this is a good time to have a release. Any thoughts? Cheers, Lillian From gnu_andrew at member.fsf.org Thu Aug 6 13:48:36 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 6 Aug 2009 21:48:36 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7B413C.8010109@redhat.com> References: <4A7B413C.8010109@redhat.com> Message-ID: <17c6771e0908061348n6728c14bqb471fb9a674d59b6@mail.gmail.com> 2009/8/6 Lillian Angel : > Hi, > > Due to the most recent drop of security patches, the progress on the > plugin/netx and system-tap integration, I am wondering if this is a good > time to have a release. > > Any thoughts? > > > Cheers, > Lillian > Sounds like a good idea to me. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Thu Aug 6 15:15:55 2009 From: mark at klomp.org (Mark Wielaard) Date: Fri, 07 Aug 2009 00:15:55 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7B413C.8010109@redhat.com> References: <4A7B413C.8010109@redhat.com> Message-ID: <1249596955.3408.59.camel@springer.wildebeest.org> On Thu, 2009-08-06 at 16:46 -0400, Lillian Angel wrote: > Due to the most recent drop of security patches, the progress on the > plugin/netx and system-tap integration, I am wondering if this is a good > time to have a release. > > Any thoughts? It seems a perfect time! Especially with the security fixes in. I believe we already have everything in icedtea6 that would be in the upcoming oj6b17 (updated hotspot and security fixes), but if possible it would be nice if we could sync with that (assuming the current update lock can be broken on that repo). If only to not have any version confusion. Cheers, Mark From Joe.Darcy at Sun.COM Thu Aug 6 17:40:01 2009 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Thu, 06 Aug 2009 17:40:01 -0700 Subject: Proposed IcedTea 6 release In-Reply-To: <1249596955.3408.59.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <1249596955.3408.59.camel@springer.wildebeest.org> Message-ID: <4A7B77E1.7060506@sun.com> Mark Wielaard wrote: > On Thu, 2009-08-06 at 16:46 -0400, Lillian Angel wrote: > >> Due to the most recent drop of security patches, the progress on the >> plugin/netx and system-tap integration, I am wondering if this is a good >> time to have a release. >> >> Any thoughts? >> > > It seems a perfect time! Especially with the security fixes in. > > I believe we already have everything in icedtea6 that would be in the > upcoming oj6b17 (updated hotspot and security fixes), but if possible it > would be nice if we could sync with that (assuming the current update > lock can be broken on that repo). If only to not have any version > confusion. > > Cheers, > > Mark > > Yes, once the HotSpot change get back, I plan to label the OpenJDK 6 repo as "b17." -Joe From Joe.Darcy at Sun.COM Thu Aug 6 17:49:15 2009 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Thu, 06 Aug 2009 17:49:15 -0700 Subject: Bugids already used in this repository (Re: [FOR REVIEW] hs14 merge for OpenJDK6) In-Reply-To: <17c6771e0908051639h4c9a9c79vfdc4f6048d17cca8@mail.gmail.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> <4A78E151.9070304@sun.com> <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> <4A79F131.7040105@sun.com> <17c6771e0908051639h4c9a9c79vfdc4f6048d17cca8@mail.gmail.com> Message-ID: <4A7B7A0B.6050804@sun.com> Andrew John Hughes wrote: > 2009/8/5 Tim Bell : > >> Andrew John Hughes wrote: >> >> >>> Thanks Tim, that seems to have fixed the permissions issue. >>> >> Good. >> >> >>> There now seems to be an issue with jcheck, as the merge causes some >>> bugids to be repeated: >>> >> Hmmm - how did these changesets come in through two different paths? >> >> >>> pushing to ssh://hg.openjdk.java.net/jdk6/jdk6-gate/hotspot >>> searching for changes >>> remote: adding changesets >>> remote: adding manifests >>> remote: adding file changes >>> remote: added 555 changesets with 4771 changes to 1453 files >>> remote: >>> remote: > Changeset: 100:d821d920b465 >>> remote: > Author: kvn >>> remote: > Date: 2008-03-11 11:04 >>> remote: > >>> remote: > 6623167: C2 crashed in StoreCMNode::Value >>> remote: > Summary: C2 crashed in StoreCMNode::Value because >>> n->in(MemNode::OopStore) is 0. >>> remote: > Reviewed-by: rasbold, never >>> remote: >>> remote: Bugid 6623167 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 104:2c106685d6d0 >>> remote: > Author: dcubed >>> remote: > Date: 2008-03-12 18:06 >>> remote: > >>> remote: > 6497639: 4/3 Profiling Swing application caused JVM crash >>> remote: > Summary: Make RedefineClasses() interoperate better with >>> class sharing. >>> remote: > Reviewed-by: sspitsyn, jmasa >>> remote: >>> remote: Bugid 6497639 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 105:d8b3ef7ee3e5 >>> remote: > Author: dcubed >>> remote: > Date: 2008-03-12 18:07 >>> remote: > >>> remote: > 6599425: 4/3 OopMapCache::lookup() can cause later crash or >>> assert() failure >>> remote: > Summary: Add should_not_be_cached() to markOop and methodOop >>> and query that status inOopMapCache::lookup() >>> remote: > Reviewed-by: coleenp, sspitsyn, jmasa >>> remote: >>> remote: Bugid 6599425 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 240:65fe2bd88839 >>> remote: > Author: never >>> remote: > Date: 2008-06-05 21:44 >>> remote: > >>> remote: > 6614100: EXCEPTION_ACCESS_VIOLATION while running Eclipse >>> with 1.6.0_05-ea >>> remote: > Reviewed-by: kvn, jrose, rasbold >>> remote: >>> remote: Bugid 6614100 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 286:3e82d72933d0 >>> remote: > Author: xlu >>> remote: > Date: 2008-06-26 14:15 >>> remote: > >>> remote: > 6718830: Hotspot fails to build with gcc 4.3 >>> remote: > Summary: Fixed linux make file and couple adlc code to meet >>> the changes of gcc 4.3 >>> remote: > Reviewed-by: kamg, igor >>> remote: >>> remote: Bugid 6718830 already used in this repository, in revision 32 >>> remote: >>> remote: > Changeset: 289:551f4309f476 >>> remote: > Author: ohair >>> remote: > Date: 2008-07-03 10:46 >>> remote: > >>> remote: > 6695777: Queens.class should be built from source, not put >>> in source repo >>> remote: > Reviewed-by: kvn >>> remote: >>> remote: Bugid 6695777 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 314:54499b980c23 >>> remote: > Author: swamyv >>> remote: > Date: 2008-07-29 13:54 >>> remote: > >>> remote: > 6710791: Remove files or build from source:maf-1_0.jar, jlfg-1_0.jar >>> remote: > Summary: Removed maf-1_0.jar and jlfg-1_0.jar files. >>> remote: > Reviewed-by: poonam, jjh >>> remote: >>> remote: Bugid 6710791 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 360:fa4d1d240383 >>> remote: > Author: never >>> remote: > Date: 2008-08-26 15:49 >>> remote: > >>> remote: > 6741642: bad enum definition in ciTypeFlow.hpp >>> remote: > Reviewed-by: rasbold, martin >>> remote: > Contributed-by: doko at ubuntu.com >>> remote: >>> remote: Bugid 6741642 already used in this repository, in revision 22 >>> remote: >>> remote: > Changeset: 589:748572b86af6 >>> remote: > Author: never >>> remote: > Date: 2009-04-07 14:46 >>> remote: > >>> remote: > 6636360: compiler/6595044/Main.java test fails with 64bit >>> java on solaris-sparcv9 with SIGSEGV >>> remote: > Reviewed-by: kvn, twisti >>> remote: >>> remote: Bugid 6636360 already used in this repository, in revision 29 >>> remote: >>> remote: abort: pretxnchangegroup.0.jcheck hook failed >>> remote: transaction abort! >>> remote: rollback completed >>> abort: unexpected response: empty string >>> >>> Is there a way of getting it to ignore these for this one push? I >>> don't know of a way to just pull out these nine changesets from the >>> 555 waiting to go... >>> >> I think they would need to be added to the jcheck whitelist for all time- >> but that is more of a question for Mark or Kelly. >> >> Tim >> >> > > The early revisions (20, 32) are from OpenJDK6 which was rebased to > allow HotSpot patches to be applied on top. So what happened here is > that, as the fixes were already applied to OpenJDK6, the new > changesets pulled in by the merge will be no-ops but still exist to > keep the change history accurate. > > I think we just need a way of disabling this check. OpenJDK6 already > has whitespace and comment checks turned to lax. See .jcheck: > http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/0282bf49b0f6. There > may already be an option for this bugid check too, but I have no idea > what the format of that file is. > *grumble* I'll talk to Mark about this when he is available to discuss the best way to get these changes back. -Joe From dbhole at redhat.com Thu Aug 6 20:41:28 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 6 Aug 2009 23:41:28 -0400 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7B413C.8010109@redhat.com> References: <4A7B413C.8010109@redhat.com> Message-ID: <20090807034128.GA13865@redhat.com> * Lillian Angel [2009-08-06 16:47]: > Hi, > > Due to the most recent drop of security patches, the progress on the > plugin/netx and system-tap integration, I am wondering if this is a good > time to have a release. > > Any thoughts? > > Definitely +1 from me. New features for Plugin/WebStart include largely complete 1.5/6.0 jnlp spec support, cookie support rewrite, and numerous other stability and bug fixes. It'll be nice to have a release with it all. Deepak From aph at redhat.com Fri Aug 7 01:36:06 2009 From: aph at redhat.com (Andrew Haley) Date: Fri, 07 Aug 2009 09:36:06 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7B413C.8010109@redhat.com> References: <4A7B413C.8010109@redhat.com> Message-ID: <4A7BE776.3040405@redhat.com> Lillian Angel wrote: > Due to the most recent drop of security patches, the progress on the > plugin/netx and system-tap integration, I am wondering if this is a good > time to have a release. > > Any thoughts? There's the ARM work from Ed Nevill too. We need to look at exactly which version of LLVM to target with Shark. I think we should get the ARM changes in ASAP, and then branch with a view to stabilizing over the next couple of weeks. Various people are away on holiday, so this might be a somewhat extended test cycle. Andrew. From mark at klomp.org Fri Aug 7 02:53:14 2009 From: mark at klomp.org (Mark Wielaard) Date: Fri, 07 Aug 2009 11:53:14 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7BE776.3040405@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> Message-ID: <1249638794.3477.13.camel@springer.wildebeest.org> On Fri, 2009-08-07 at 09:36 +0100, Andrew Haley wrote: > There's the ARM work from Ed Nevill too. We need to look at exactly which > version of LLVM to target with Shark. > > I think we should get the ARM changes in ASAP, and then branch with a view > to stabilizing over the next couple of weeks. Various people are away on > holiday, so this might be a somewhat extended test cycle. If it will take weeks to integrate and test I suggest that it should be done in the next release. Getting out a release with all the security fixes asap will be a good thing. Best to branch now for a release and let those wanting to add new features like this just do it on the trunk imho. Cheers, Mark From doko at ubuntu.com Fri Aug 7 02:58:41 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 07 Aug 2009 09:58:41 +0000 Subject: changeset in /hg/icedtea: 2009-08-07 Matthias Klose changeset 209e9a326eb9 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=209e9a326eb9 description: 2009-08-07 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options for --with-*-src-zip= if not specified. diffstat: 2 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 4 +++- diffs (26 lines): diff -r 39d2012855a5 -r 209e9a326eb9 ChangeLog --- a/ChangeLog Thu Aug 06 18:35:39 2009 +0200 +++ b/ChangeLog Fri Aug 07 11:53:17 2009 +0200 @@ -1,3 +1,8 @@ 2009-08-06 Matthias Klose + + * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options + for --with-*-src-zip= if not specified. + 2009-08-06 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Adjust for added/removed diff -r 39d2012855a5 -r 209e9a326eb9 Makefile.am --- a/Makefile.am Thu Aug 06 18:35:39 2009 +0200 +++ b/Makefile.am Fri Aug 07 11:53:17 2009 +0200 @@ -3435,7 +3435,9 @@ ADD_ZERO_CONFIGURE_ARGS += \ '--with-java=% '--with-javah=% \ '--with-rmic=% '--with-additional-vms=% \ '--disable-bootstrap% '--enable-bootstrap% , \ - $(CONFIGURE_ARGS)) + $(CONFIGURE_ARGS)) \ + $(foreach i, openjdk hotspot corba jaxp jaxws jdk langtools, \ + $(if $(findstring --with-$(i)-src-zip=, $(CONFIGURE_ARGS)),, --with-$(i)-src-zip=$(abs_top_builddir)/$(i).tar.gz)) ADD_ZERO_EXTRA_BUILD_ENV = \ BUILD_LANGTOOLS=false ALT_LANGTOOLS_DIST=$(ICEDTEA_BUILD_DIR)/langtools/dist \ From aph at redhat.com Fri Aug 7 03:03:24 2009 From: aph at redhat.com (Andrew Haley) Date: Fri, 07 Aug 2009 11:03:24 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <1249638794.3477.13.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> Message-ID: <4A7BFBEC.60706@redhat.com> Mark Wielaard wrote: > On Fri, 2009-08-07 at 09:36 +0100, Andrew Haley wrote: >> There's the ARM work from Ed Nevill too. We need to look at exactly which >> version of LLVM to target with Shark. >> >> I think we should get the ARM changes in ASAP, and then branch with a view >> to stabilizing over the next couple of weeks. Various people are away on >> holiday, so this might be a somewhat extended test cycle. > > If it will take weeks to integrate and test I suggest that it should be > done in the next release. Getting out a release with all the security > fixes asap will be a good thing. 1. We need to do a minor release with security patches now, on the previous release branch. 2. We need to get everything together for the next *major* release. This involves committing all major fixes to the trunk, then branching for stabilization. This is not different from the usual procedure. Andrew. From doko at ubuntu.com Fri Aug 7 03:03:48 2009 From: doko at ubuntu.com (doko at ubuntu.com) Date: Fri, 07 Aug 2009 10:03:48 +0000 Subject: changeset in /hg/icedtea6: 2009-08-07 Matthias Klose changeset 9420faca6468 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9420faca6468 description: 2009-08-07 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options for --with-*-src-zip= if not specified. diffstat: 2 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 4 +++- diffs (26 lines): diff -r b775cb0d0900 -r 9420faca6468 ChangeLog --- a/ChangeLog Thu Aug 06 10:43:31 2009 -0400 +++ b/ChangeLog Fri Aug 07 11:58:27 2009 +0200 @@ -1,3 +1,8 @@ 2009-08-06 Deepak Bhole + + * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options + for --with-*-src-zip= if not specified. + 2009-08-06 Deepak Bhole * plugin/icedteanp/IcedTeaJavaRequestProcessor.cc: Handle error messages diff -r b775cb0d0900 -r 9420faca6468 Makefile.am --- a/Makefile.am Thu Aug 06 10:43:31 2009 -0400 +++ b/Makefile.am Fri Aug 07 11:58:27 2009 +0200 @@ -1841,7 +1841,9 @@ ADD_ZERO_CONFIGURE_ARGS += \ '--with-java=% '--with-javah=% \ '--with-rmic=% '--with-additional-vms=% \ '--with-openjdk '--with-openjdk=% , \ - $(CONFIGURE_ARGS)) + $(CONFIGURE_ARGS)) \ + $(foreach i, openjdk hotspot, \ + $(if $(findstring --with-$(i)-src-zip=, $(CONFIGURE_ARGS)),, --with-$(i)-src-zip=$(abs_top_builddir)/$(i).tar.gz)) ADD_ZERO_EXTRA_BUILD_ENV = \ BUILD_LANGTOOLS=false ALT_LANGTOOLS_DIST=$(ICEDTEA_BUILD_DIR)/langtools/dist \ From mark at klomp.org Fri Aug 7 03:18:11 2009 From: mark at klomp.org (Mark Wielaard) Date: Fri, 07 Aug 2009 12:18:11 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7BFBEC.60706@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> Message-ID: <1249640291.3477.17.camel@springer.wildebeest.org> On Fri, 2009-08-07 at 11:03 +0100, Andrew Haley wrote: > Mark Wielaard wrote: > > On Fri, 2009-08-07 at 09:36 +0100, Andrew Haley wrote: > >> There's the ARM work from Ed Nevill too. We need to look at exactly which > >> version of LLVM to target with Shark. > >> > >> I think we should get the ARM changes in ASAP, and then branch with a view > >> to stabilizing over the next couple of weeks. Various people are away on > >> holiday, so this might be a somewhat extended test cycle. > > > > If it will take weeks to integrate and test I suggest that it should be > > done in the next release. Getting out a release with all the security > > fixes asap will be a good thing. > > 1. We need to do a minor release with security patches now, on the previous > release branch. > > 2. We need to get everything together for the next *major* release. This > involves committing all major fixes to the trunk, then branching for > stabilization. OK, then I misunderstood. I thought we were at the end of the major release cycle and wanted to do a new release now with the updated hotspot, plugin, webstart stuff, bugfixes and the security releases now. Which seems like a good idea to me. But getting out only those security fixes asap is also fine if we don't feel the current trunk is release worthy (I think it is though). If not, then I also retract my idea to sync with oj6b17 before release since that is obvious too risky also then. Cheers, Mark From langel at redhat.com Fri Aug 7 05:51:43 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 07 Aug 2009 08:51:43 -0400 Subject: Proposed IcedTea 6 release In-Reply-To: <1249640291.3477.17.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> Message-ID: <4A7C235F.1030005@redhat.com> Mark Wielaard wrote: > On Fri, 2009-08-07 at 11:03 +0100, Andrew Haley wrote: > >> Mark Wielaard wrote: >> >>> On Fri, 2009-08-07 at 09:36 +0100, Andrew Haley wrote: >>> >>>> There's the ARM work from Ed Nevill too. We need to look at exactly which >>>> version of LLVM to target with Shark. >>>> >>>> I think we should get the ARM changes in ASAP, and then branch with a view >>>> to stabilizing over the next couple of weeks. Various people are away on >>>> holiday, so this might be a somewhat extended test cycle. >>>> >>> If it will take weeks to integrate and test I suggest that it should be >>> done in the next release. Getting out a release with all the security >>> fixes asap will be a good thing. >>> >> 1. We need to do a minor release with security patches now, on the previous >> release branch. >> >> 2. We need to get everything together for the next *major* release. This >> involves committing all major fixes to the trunk, then branching for >> stabilization. >> > > OK, then I misunderstood. I thought we were at the end of the major > release cycle and wanted to do a new release now with the updated > hotspot, plugin, webstart stuff, bugfixes and the security releases now. > That was my understanding. What is the reason to have a minor security release upon the old branch? Cheers, Lillian > Which seems like a good idea to me. But getting out only those security > fixes asap is also fine if we don't feel the current trunk is release > worthy (I think it is though). If not, then I also retract my idea to > sync with oj6b17 before release since that is obvious too risky also > then. > > Cheers, > > Mark > > From gnu_andrew at member.fsf.org Fri Aug 7 05:56:30 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 7 Aug 2009 13:56:30 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7C235F.1030005@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> Message-ID: <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> 2009/8/7 Lillian Angel : > Mark Wielaard wrote: >> >> On Fri, 2009-08-07 at 11:03 +0100, Andrew Haley wrote: >> >>> >>> Mark Wielaard wrote: >>> >>>> >>>> On Fri, 2009-08-07 at 09:36 +0100, Andrew Haley wrote: >>>> >>>>> >>>>> There's the ARM work from Ed Nevill too. ?We need to look at exactly >>>>> which >>>>> version of LLVM to target with Shark. >>>>> >>>>> I think we should get the ARM changes in ASAP, and then branch with a >>>>> view >>>>> to stabilizing over the next couple of weeks. ?Various people are away >>>>> on >>>>> holiday, so this might be a somewhat extended test cycle. >>>>> >>>> >>>> If it will take weeks to integrate and test I suggest that it should be >>>> done in the next release. Getting out a release with all the security >>>> fixes asap will be a good thing. >>>> >>> >>> 1. ?We need to do a minor release with security patches now, on the >>> previous >>> ? ?release branch. >>> >>> 2. ?We need to get everything together for the next *major* release. >>> ?This >>> ? ?involves committing all major fixes to the trunk, then branching for >>> ? ?stabilization. >>> >> >> OK, then I misunderstood. I thought we were at the end of the major >> release cycle and wanted to do a new release now with the updated >> hotspot, plugin, webstart stuff, bugfixes and the security releases now. >> > > That was my understanding. What is the reason to have a minor security > release upon the old branch? > If we're going to delay the new release to get the ARM thing in and then test it, it may be weeks before a release appears with the security fixes. The minor release would fill this gap, ensuring there is a patched release but without a need for extensive testing of new features/changes. All we need to do is apply the security fixes to the 1.5 branch as we did with the main tree and then release the result as 1.5.1. > > Cheers, > Lillian > >> Which seems like a good idea to me. But getting out only those security >> fixes asap is also fine if we don't feel the current trunk is release >> worthy (I think it is though). If not, then I also retract my idea to >> sync with oj6b17 before release since that is obvious too risky also >> then. >> >> Cheers, >> >> Mark >> >> > > -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From langel at redhat.com Fri Aug 7 06:01:35 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 07 Aug 2009 09:01:35 -0400 Subject: Proposed IcedTea 6 release In-Reply-To: <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> Message-ID: <4A7C25AF.5010604@redhat.com> Andrew John Hughes wrote: > 2009/8/7 Lillian Angel : > >> Mark Wielaard wrote: >> >>> On Fri, 2009-08-07 at 11:03 +0100, Andrew Haley wrote: >>> >>> >>>> Mark Wielaard wrote: >>>> >>>> >>>>> On Fri, 2009-08-07 at 09:36 +0100, Andrew Haley wrote: >>>>> >>>>> >>>>>> There's the ARM work from Ed Nevill too. We need to look at exactly >>>>>> which >>>>>> version of LLVM to target with Shark. >>>>>> >>>>>> I think we should get the ARM changes in ASAP, and then branch with a >>>>>> view >>>>>> to stabilizing over the next couple of weeks. Various people are away >>>>>> on >>>>>> holiday, so this might be a somewhat extended test cycle. >>>>>> >>>>>> >>>>> If it will take weeks to integrate and test I suggest that it should be >>>>> done in the next release. Getting out a release with all the security >>>>> fixes asap will be a good thing. >>>>> >>>>> >>>> 1. We need to do a minor release with security patches now, on the >>>> previous >>>> release branch. >>>> >>>> 2. We need to get everything together for the next *major* release. >>>> This >>>> involves committing all major fixes to the trunk, then branching for >>>> stabilization. >>>> >>>> >>> OK, then I misunderstood. I thought we were at the end of the major >>> release cycle and wanted to do a new release now with the updated >>> hotspot, plugin, webstart stuff, bugfixes and the security releases now. >>> >>> >> That was my understanding. What is the reason to have a minor security >> release upon the old branch? >> >> > > If we're going to delay the new release to get the ARM thing in and > then test it, it may be weeks before a release appears with the > security fixes. The minor release would fill this gap, ensuring there > is a patched release but without a need for extensive testing of new > features/changes. > Ok, understood. I can do the release today if everyone agrees this is what we want to do. Lillian > All we need to do is apply the security fixes to the 1.5 branch as we > did with the main tree and then release the result as 1.5.1. > > >> Cheers, >> Lillian >> >> >>> Which seems like a good idea to me. But getting out only those security >>> fixes asap is also fine if we don't feel the current trunk is release >>> worthy (I think it is though). If not, then I also retract my idea to >>> sync with oj6b17 before release since that is obvious too risky also >>> then. >>> >>> Cheers, >>> >>> Mark >>> >>> >>> >> > > > > From mark at klomp.org Fri Aug 7 06:14:08 2009 From: mark at klomp.org (Mark Wielaard) Date: Fri, 07 Aug 2009 15:14:08 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7C25AF.5010604@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> Message-ID: <1249650848.3477.24.camel@springer.wildebeest.org> On Fri, 2009-08-07 at 09:01 -0400, Lillian Angel wrote: > > If we're going to delay the new release to get the ARM thing in and > > then test it, it may be weeks before a release appears with the > > security fixes. The minor release would fill this gap, ensuring there > > is a patched release but without a need for extensive testing of new > > features/changes. > > > Ok, understood. I can do the release today if everyone agrees this is > what we want to do. A rather see a real release with all the new stuff in instead of delaying it for a new release cycle to add even more stuff. But if backporting selected security patches to a minor release is easier for you then go for that. Cheers, Mark From gnu_andrew at member.fsf.org Fri Aug 7 06:21:43 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 7 Aug 2009 14:21:43 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <1249650848.3477.24.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> Message-ID: <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> 2009/8/7 Mark Wielaard : > On Fri, 2009-08-07 at 09:01 -0400, Lillian Angel wrote: >> > If we're going to delay the new release to get the ARM thing in and >> > then test it, it may be weeks before a release appears with the >> > security fixes. ?The minor release would fill this gap, ensuring there >> > is a patched release but without a need for extensive testing of new >> > features/changes. >> > >> Ok, understood. I can do the release today if everyone agrees this is >> what we want to do. > > A rather see a real release with all the new stuff in instead of > delaying it for a new release cycle to add even more stuff. But if > backporting selected security patches to a minor release is easier for > you then go for that. > > Cheers, > > Mark > > I agree. I thought we were pretty much ready to go with a 1.6 release including the new plugin/netx/shark fixes and the SystemTap update, and hence could have rolled that out as the security update as well. But if others want the ARM port in 1.6, we need a minor release of the old tree (1.5) to get the security patches out there ASAP. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From langel at redhat.com Fri Aug 7 07:18:24 2009 From: langel at redhat.com (Lillian Angel) Date: Fri, 07 Aug 2009 10:18:24 -0400 Subject: IcedTea6 1.5.1 Security Release Message-ID: <4A7C37B0.4010706@redhat.com> We are proud to announce the release of IcedTea6 1.5.1. The IcedTea6 project provides a harness to build the source code from OpenJDK6 (http://openjdk.java.net) using Free Software build tools. What's New? ----------------- - Security fixes from Sun. - Plugin/Netx security fixes ----------------- The tarball and nosrc RPM can be downloaded here: http://icedtea.classpath.org/download/fedora/java-1.6.0-openjdk-1.6.0.0-27.b16.fc11.nosrc.rpm http://icedtea.classpath.org/download/source/icedtea6-1.5.1.tar.gz The following people helped with this release: Gary Benson, Deepak Bhole, Andrew Haley, Andrew John Hughes, Omair Majid, Marc Schoenefeld, Mark Wielaard, Lillian Angel We would also like to thank the bug reporters and testers! To get started: $ hg clone http://icedtea.classpath.org/hg/release/icedtea6-1.5 $ cd icedtea6-1.5 Full build requirements and instructions are in INSTALL: $ ./configure [--enable-visualvm --with-openjdk --enable-pulse-java --enable-systemtap ...] $ make The new package has been built into Fedora 10, Fedora 11 and Fedora 12 (rawhide) and should appear in the yum repositories in a couple of days. From bugzilla-daemon at icedtea.classpath.org Fri Aug 7 10:05:33 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 07 Aug 2009 17:05:33 +0000 Subject: [Bug 377] New: TimeZone.getOffset() fails for some TZ Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=377 Summary: TimeZone.getOffset() fails for some TZ Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: ptisnovs at redhat.com It seems that the Java code doesn't like something in the TZ data stored in /usr/share/javazi on Fedora and Ubuntu, specifically file Asia/Amman. When that doesn't exist, it uses the data in jre/lib and thus works fine. On RHEL (5.3 i386 and x86_64), there is no problem. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Aug 7 10:07:08 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 07 Aug 2009 17:07:08 +0000 Subject: [Bug 377] TimeZone.getOffset() fails for some TZ Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=377 ------- Comment #1 from ptisnovs at redhat.com 2009-08-07 17:07 ------- Created an attachment (id=252) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=252&action=view) Test Simple test program added. It should not throw any exception. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Fri Aug 7 13:44:33 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 07 Aug 2009 20:44:33 +0000 Subject: changeset in /hg/icedtea: Bump to b68. Add some generated files... Message-ID: changeset 52ca492dae93 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=52ca492dae93 description: Bump to b68. Add some generated files ecj just decided to start complaining about. 2009-08-07 Andrew John Hughes * Makefile.am: Bump to b68, remove additional -source option. * generated/java/nio/channels/AcceptPendingException.java, * generated/java/nio/channels/IllegalChannelGroupException.java, * generated/java/nio/channels/InterruptedByTimeoutException.java, * generated/java/nio/channels/ReadPendingException.java, * generated/java/nio/channels/ShutdownChannelGroupException.java, * generated/java/nio/channels/WritePendingException.java, * generated/sun/nio/fs/UnixConstants.java: Add generated files. * javac.in: Update to build 1.7 code. * patches/ecj/icedtea.patch: Remove patch removing use of 1.6 source and target options. * patches/icedtea-clean-crypto.patch: Regenerated. * patches/xrender/icedtea-007.patch: Remove non-ASCII characters. diffstat: 13 files changed, 468 insertions(+), 105 deletions(-) ChangeLog | 18 + Makefile.am | 41 +-- generated/java/nio/channels/AcceptPendingException.java | 51 ++++ generated/java/nio/channels/IllegalChannelGroupException.java | 51 ++++ generated/java/nio/channels/InterruptedByTimeoutException.java | 51 ++++ generated/java/nio/channels/ReadPendingException.java | 51 ++++ generated/java/nio/channels/ShutdownChannelGroupException.java | 52 +++++ generated/java/nio/channels/WritePendingException.java | 51 ++++ generated/sun/nio/fs/UnixConstants.java | 79 +++++++ javac.in | 6 patches/ecj/icedtea.patch | 14 - patches/icedtea-clean-crypto.patch | 104 ++++------ patches/xrender/icedtea-007.patch | 4 diffs (truncated from 849 to 500 lines): diff -r 209e9a326eb9 -r 52ca492dae93 ChangeLog --- a/ChangeLog Fri Aug 07 11:53:17 2009 +0200 +++ b/ChangeLog Fri Aug 07 21:46:15 2009 +0100 @@ -1,3 +1,21 @@ 2009-08-07 Matthias Klose + + * Makefile.am: + Bump to b68, remove additional -source option. + * generated/java/nio/channels/AcceptPendingException.java, + * generated/java/nio/channels/IllegalChannelGroupException.java, + * generated/java/nio/channels/InterruptedByTimeoutException.java, + * generated/java/nio/channels/ReadPendingException.java, + * generated/java/nio/channels/ShutdownChannelGroupException.java, + * generated/java/nio/channels/WritePendingException.java, + * generated/sun/nio/fs/UnixConstants.java: + Add generated files. + * javac.in: Update to build 1.7 code. + * patches/ecj/icedtea.patch: Remove patch removing use of 1.6 + source and target options. + * patches/icedtea-clean-crypto.patch: Regenerated. + * patches/xrender/icedtea-007.patch: Remove non-ASCII characters. + 2009-08-07 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options diff -r 209e9a326eb9 -r 52ca492dae93 Makefile.am --- a/Makefile.am Fri Aug 07 11:53:17 2009 +0200 +++ b/Makefile.am Fri Aug 07 21:46:15 2009 +0100 @@ -1,20 +1,20 @@ OPENJDK_VERSION = b67 -OPENJDK_VERSION = b67 - -OPENJDK_CHANGESET = f24111620a51 -CORBA_CHANGESET = 1cb0098b53b2 -JAXP_CHANGESET = 45fc86d2aa5c -JAXWS_CHANGESET = 73440eb34fb0 -JDK_CHANGESET = cd7d9265b4e6 -LANGTOOLS_CHANGESET = 14b1a8ede954 -HOTSPOT_CHANGESET = 87c6731ab8d1 - -OPENJDK_MD5SUM = f5cc1b21cf1a805528300bf931aa821e -CORBA_MD5SUM = 00fa00a58b465cad40cab9ac05058c24 -JAXP_MD5SUM = 61230cee4199f91ed5675bcf2acad63d -JAXWS_MD5SUM = fc9d2659fb875ece0e3a5e7894c1bbf8 -JDK_MD5SUM = 8e3fa808fcad7713635a21e127dd0f72 -LANGTOOLS_MD5SUM = a3b15bcf5b76b1639600250fc29c057b -HOTSPOT_MD5SUM = d0632498485808fdf8f97ef1f388722d +OPENJDK_VERSION = b68 + +OPENJDK_CHANGESET = d8f0e9685212 +CORBA_CHANGESET = 4d8317ea0eec +JAXP_CHANGESET = 216517ab5325 +JAXWS_CHANGESET = 4425f7c4fb5b +JDK_CHANGESET = df6fceba2e80 +LANGTOOLS_CHANGESET = 95c1212b07e3 +HOTSPOT_CHANGESET = 91fcd98a5ae1 + +OPENJDK_MD5SUM = 8c3d681d0a90ec9adf00870f5e20d09f +CORBA_MD5SUM = c1c9db96634876b2c522dc387dec3864 +JAXP_MD5SUM = 9a821849b2b9bdf2f8dc32168809a063 +JAXWS_MD5SUM = 2d9fbeb543ee7bcd6621a3f131649db2 +JDK_MD5SUM = 418d860925e69cca57253e62508234b6 +LANGTOOLS_MD5SUM = e29f65271621d80aa8a894fe13325f23 +HOTSPOT_MD5SUM = 88cc373d7d04a2c9c60fd9343a28818c CACAO_VERSION = 0.99.4 CACAO_MD5SUM = 63220327925ace13756ae334c55a3baa @@ -3006,14 +3006,12 @@ stamps/hotspot-tools-class-files.stamp: if ! test -d $(ICEDTEA_BOOT_DIR) ; \ then \ $(JAVAC) $(MEMORY_LIMIT) -g -d lib/hotspot-tools \ - -source 1.5 \ -sourcepath \ 'hotspot-tools:$(abs_top_srcdir)/netx:$(SOURCEPATH_DIRS)' \ -bootclasspath \'\' @$< ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g \ -d lib/hotspot-tools \ - -source 1.5 \ -sourcepath \ 'hotspot-tools:$(abs_top_srcdir)/netx:$(SOURCEPATH_DIRS)' \ -bootclasspath \'\' @$< ; \ @@ -3058,13 +3056,11 @@ stamps/rt-class-files.stamp: rt-source-f if ! test -d $(ICEDTEA_BOOT_DIR) ; \ then \ $(JAVAC) $(MEMORY_LIMIT) -g -d lib/rt \ - -source 1.5 \ -classpath $(abs_top_builddir)/lib/hotspot-tools \ -sourcepath '$(SOURCEPATH_DIRS)' \ -bootclasspath \'\' @$< ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g -d lib/rt \ - -source 1.5 \ -classpath $(abs_top_builddir)/lib/hotspot-tools \ -sourcepath '$(SOURCEPATH_DIRS)' \ -bootclasspath \'\' @$< ; \ @@ -3103,14 +3099,12 @@ stamps/extra-class-files.stamp: extra-so if ! test -d $(ICEDTEA_BOOT_DIR) ; \ then \ $(JAVAC) $(MEMORY_LIMIT) -g -d extra-lib \ - -source 1.5 \ -classpath $(abs_top_builddir)/lib/hotspot-tools \ -sourcepath $(abs_top_srcdir)/extra:$(SOURCEPATH_DIRS) \ -bootclasspath \'\' \ @extra-source-files.txt ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g -d extra-lib \ - -source 1.5 \ -classpath $(abs_top_builddir)/lib/hotspot-tools \ -sourcepath $(abs_top_srcdir)/extra:$(SOURCEPATH_DIRS) \ -bootclasspath \'\' \ @@ -3147,7 +3141,6 @@ stamps/netx.stamp: netx-source-files.txt mkdir -p $(abs_top_builddir)/netx.build $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g \ -d $(abs_top_builddir)/netx.build \ - -source 1.5 \ -classpath $(abs_top_builddir)/lib/hotspot-tools \ -sourcepath $(abs_top_srcdir)/netx:$(SOURCEPATH_DIRS): \ -bootclasspath \'\' \ diff -r 209e9a326eb9 -r 52ca492dae93 generated/java/nio/channels/AcceptPendingException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/java/nio/channels/AcceptPendingException.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// -- This file was mechanically generated: Do not edit! -- // + +package java.nio.channels; + + +/** + * Unchecked exception thrown when an attempt is made to initiate an accept + * operation on a channel and a previous accept operation has not completed. + * + * @since 1.7 + */ + +public class AcceptPendingException + extends IllegalStateException +{ + + private static final long serialVersionUID = 2721339977965416421L; + + /** + * Constructs an instance of this class. + */ + public AcceptPendingException() { } + +} diff -r 209e9a326eb9 -r 52ca492dae93 generated/java/nio/channels/IllegalChannelGroupException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/java/nio/channels/IllegalChannelGroupException.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// -- This file was mechanically generated: Do not edit! -- // + +package java.nio.channels; + + +/** + * Unchecked exception thrown when an attempt is made to open a channel + * in a group that was not created by the same provider. + * + * @since 1.7 + */ + +public class IllegalChannelGroupException + extends IllegalArgumentException +{ + + private static final long serialVersionUID = -2495041211157744253L; + + /** + * Constructs an instance of this class. + */ + public IllegalChannelGroupException() { } + +} diff -r 209e9a326eb9 -r 52ca492dae93 generated/java/nio/channels/InterruptedByTimeoutException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/java/nio/channels/InterruptedByTimeoutException.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// -- This file was mechanically generated: Do not edit! -- // + +package java.nio.channels; + + +/** + * Checked exception received by a thread when a timeout elapses before an + * asynchronous operation completes. + * + * @since 1.7 + */ + +public class InterruptedByTimeoutException + extends java.io.IOException +{ + + private static final long serialVersionUID = -4268008601014042947L; + + /** + * Constructs an instance of this class. + */ + public InterruptedByTimeoutException() { } + +} diff -r 209e9a326eb9 -r 52ca492dae93 generated/java/nio/channels/ReadPendingException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/java/nio/channels/ReadPendingException.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// -- This file was mechanically generated: Do not edit! -- // + +package java.nio.channels; + + +/** + * Unchecked exception thrown when an attempt is made to read from an + * asynchronous socket channel and a previous read has not completed. + * + * @since 1.7 + */ + +public class ReadPendingException + extends IllegalStateException +{ + + private static final long serialVersionUID = 1986315242191227217L; + + /** + * Constructs an instance of this class. + */ + public ReadPendingException() { } + +} diff -r 209e9a326eb9 -r 52ca492dae93 generated/java/nio/channels/ShutdownChannelGroupException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/java/nio/channels/ShutdownChannelGroupException.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,52 @@ +/* + * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// -- This file was mechanically generated: Do not edit! -- // + +package java.nio.channels; + + +/** + * Unchecked exception thrown when an attempt is made to construct a channel in + * a group that is shutdown or the completion handler for an I/O operation + * cannot be invoked because the channel group is shutdown. + * + * @since 1.7 + */ + +public class ShutdownChannelGroupException + extends IllegalStateException +{ + + private static final long serialVersionUID = -3903801676350154157L; + + /** + * Constructs an instance of this class. + */ + public ShutdownChannelGroupException() { } + +} diff -r 209e9a326eb9 -r 52ca492dae93 generated/java/nio/channels/WritePendingException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/java/nio/channels/WritePendingException.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// -- This file was mechanically generated: Do not edit! -- // + +package java.nio.channels; + + +/** + * Unchecked exception thrown when an attempt is made to write to an + * asynchronous socket channel and a previous write has not completed. + * + * @since 1.7 + */ + +public class WritePendingException + extends IllegalStateException +{ + + private static final long serialVersionUID = 7031871839266032276L; + + /** + * Constructs an instance of this class. + */ + public WritePendingException() { } + +} diff -r 209e9a326eb9 -r 52ca492dae93 generated/sun/nio/fs/UnixConstants.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/generated/sun/nio/fs/UnixConstants.java Fri Aug 07 21:46:15 2009 +0100 @@ -0,0 +1,79 @@ +/* + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ +// AUTOMATICALLY GENERATED FILE - DO NOT EDIT +package sun.nio.fs; +class UnixConstants { + private UnixConstants() { } + static final int O_RDONLY = 0; + static final int O_WRONLY = 1; + static final int O_RDWR = 2; + static final int O_APPEND = 0x400; + static final int O_CREAT = 0x40; + static final int O_EXCL = 0x80; + static final int O_TRUNC = 0x200; + static final int O_SYNC = 0x1000; + static final int O_DSYNC = 0x1000; + static final int O_NOFOLLOW = 0x20000; + static final int S_IAMB = 0x1ff; + static final int S_IRUSR = 256; + static final int S_IWUSR = 128; + static final int S_IXUSR = 64; + static final int S_IRGRP = 32; + static final int S_IWGRP = 16; + static final int S_IXGRP = 8; From aph at redhat.com Sat Aug 8 00:56:30 2009 From: aph at redhat.com (Andrew Haley) Date: Sat, 08 Aug 2009 08:56:30 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> Message-ID: <4A7D2FAE.4060309@redhat.com> Andrew John Hughes wrote: > 2009/8/7 Mark Wielaard : >> On Fri, 2009-08-07 at 09:01 -0400, Lillian Angel wrote: >>>> If we're going to delay the new release to get the ARM thing in and >>>> then test it, it may be weeks before a release appears with the >>>> security fixes. The minor release would fill this gap, ensuring there >>>> is a patched release but without a need for extensive testing of new >>>> features/changes. >>>> >>> Ok, understood. I can do the release today if everyone agrees this is >>> what we want to do. >> A rather see a real release with all the new stuff in instead of >> delaying it for a new release cycle to add even more stuff. But if >> backporting selected security patches to a minor release is easier for >> you then go for that. > > I agree. I thought we were pretty much ready to go with a 1.6 release > including the new plugin/netx/shark fixes and the SystemTap update, > and hence could have rolled that out as the security update as well. > But if others want the ARM port in 1.6, we need a minor release of the > old tree (1.5) to get the security patches out there ASAP. We know that testing the major release is going to take a while, even if the branch is cut now, partly because some people are on holiday, and partly because testing just takes time. A lot of the pain we've had has come from rushing through releases. IMO we spend far too much time discussing these issues. We need to make this standard procedure: whenever there are fixes for significant bugs we apply them to the current release branch and make a minor release. Whenever there are significant new features we make a major release. A lot of the discussion in this list is, IMO, a result of confusing these unrelated issues. The ARM port is all ready to go in apart from one minor problem. This can be fixed in the next few days, I hope, and the testing can begin. Andrew. From bugzilla-daemon at icedtea.classpath.org Sat Aug 8 04:35:56 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Aug 2009 11:35:56 +0000 Subject: [Bug 367] Interactive brokers fails / libjpeg7 related? Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=367 ------- Comment #6 from gary4gar at gmail.com 2009-08-08 11:35 ------- any workaround/fix? -- 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 Sat Aug 8 08:25:51 2009 From: mark at klomp.org (Mark Wielaard) Date: Sat, 08 Aug 2009 17:25:51 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7D2FAE.4060309@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> Message-ID: <1249745151.3441.10.camel@springer.wildebeest.org> On Sat, 2009-08-08 at 08:56 +0100, Andrew Haley wrote: > IMO we spend far too much time discussing these issues. We need to make > this standard procedure: whenever there are fixes for significant bugs we > apply them to the current release branch and make a minor release. > Whenever there are significant new features we make a major release. > A lot of the discussion in this list is, IMO, a result of confusing > these unrelated issues. > > The ARM port is all ready to go in apart from one minor problem. This can > be fixed in the next few days, I hope, and the testing can begin. Right. I think the confusion comes from where people think we are in the release cycle. It would be good if we had more timed releases, say every 6 weeks on a Monday (or something similarly random, but consistent). Then it is clear that when the release manager says that a release is coming, you know when you must have had your code in, testing done and that a branch is imminent. Otherwise we get situations where there seems to be lots of discussions because some people believe we are ready and are in testing mode before a final release already and others think we are at the start of a release cycle and new stuff can still be added and additional testing needs to be done afterwards. Cheers, Mark From gnu_andrew at member.fsf.org Sat Aug 8 16:49:41 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 9 Aug 2009 00:49:41 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <1249745151.3441.10.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> Message-ID: <17c6771e0908081649r5bace91aue7e23d0d3f5702ea@mail.gmail.com> 2009/8/8 Mark Wielaard : > On Sat, 2009-08-08 at 08:56 +0100, Andrew Haley wrote: >> IMO we spend far too much time discussing these issues. ?We need to make >> this standard procedure: whenever there are fixes for significant bugs we >> apply them to the current release branch and make a minor release. >> Whenever there are significant new features we make a major release. >> A lot of the discussion in this list is, IMO, a result of confusing >> these unrelated issues. >> >> The ARM port is all ready to go in apart from one minor problem. ?This can >> be fixed in the next few days, I hope, and the testing can begin. > > Right. I think the confusion comes from where people think we are in the > release cycle. It would be good if we had more timed releases, say every > 6 weeks on a Monday (or something similarly random, but consistent). > Then it is clear that when the release manager says that a release is > coming, you know when you must have had your code in, testing done and > that a branch is imminent. > > Otherwise we get situations where there seems to be lots of discussions > because some people believe we are ready and are in testing mode before > a final release already and others think we are at the start of a > release cycle and new stuff can still be added and additional testing > needs to be done afterwards. > > Cheers, > > Mark > > +1 It would also be good to coordinate with Sun on this in order to time IcedTea6 releases against upstream OpenJDK6 build drops. There is a known cycle for OpenJDK7 (http://openjdk.java.net/projects/jdk7/calendar/) but none, as far as I know, for OpenJDK6. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mvfranz at gmail.com Sun Aug 9 09:42:31 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 9 Aug 2009 12:42:31 -0400 Subject: ENABLE_HG appears twice in acinclude.m4 Message-ID: Hi, I was trying to add an option that is similar to ENABLE_HG and found that acinclude.m4 has two different definitions for it. The only difference seems to be the helps string: [AS_HELP_STRING(--enable-hg,download source code from Mercurial [[default=depends on project]])] [AS_HELP_STRING(--enable-hg,download source code from Mercurial [[default=no]])] Is this necessary or a bug? I am using the 1.11 tar ball. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090809/42ba375e/attachment.html From gnu_andrew at member.fsf.org Sun Aug 9 15:37:16 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Sun, 9 Aug 2009 23:37:16 +0100 Subject: ENABLE_HG appears twice in acinclude.m4 In-Reply-To: References: Message-ID: <17c6771e0908091537m6d4345f7w4cbe345765fb1ef2@mail.gmail.com> 2009/8/9 Michael Franz : > Hi, > > I was trying to add an option that is similar to ENABLE_HG and found that > acinclude.m4 has two different definitions for it.? The only difference > seems to be the helps string: > [AS_HELP_STRING(--enable-hg,download source code from Mercurial > [[default=depends on project]])] > [AS_HELP_STRING(--enable-hg,download source code from Mercurial > [[default=no]])] > > Is this necessary or a bug? > > I am using the 1.11 tar ball. > > Michael > It's a merge artefact. The second one is from IcedTea6. Well spotted, this is exactly the reason I don't do blanket merges any more... -- 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 ahughes at redhat.com Sun Aug 9 15:44:38 2009 From: ahughes at redhat.com (Andrew John Hughes) Date: Sun, 09 Aug 2009 22:44:38 +0000 Subject: changeset in /hg/icedtea: Remove duplicate ENABLE_HG. Message-ID: changeset fa477700aaf3 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=fa477700aaf3 description: Remove duplicate ENABLE_HG. 2009-08-07 Andrew John Hughes * acinclude.m4: (ENABLE_HG): Remove duplicate from IcedTea6 merge. diffstat: 2 files changed, 6 insertions(+), 22 deletions(-) ChangeLog | 6 ++++++ acinclude.m4 | 22 ---------------------- diffs (45 lines): diff -r 52ca492dae93 -r fa477700aaf3 ChangeLog --- a/ChangeLog Fri Aug 07 21:46:15 2009 +0100 +++ b/ChangeLog Sun Aug 09 23:46:37 2009 +0100 @@ -1,3 +1,9 @@ 2009-08-07 Andrew John Hughes + + * acinclude.m4: + (ENABLE_HG): Remove duplicate from + IcedTea6 merge. + 2009-08-07 Andrew John Hughes * Makefile.am: diff -r 52ca492dae93 -r fa477700aaf3 acinclude.m4 --- a/acinclude.m4 Fri Aug 07 21:46:15 2009 +0100 +++ b/acinclude.m4 Sun Aug 09 23:46:37 2009 +0100 @@ -1109,28 +1109,6 @@ AC_DEFUN([WITH_LANGTOOLS_SRC_ZIP], AC_SUBST(ALT_LANGTOOLS_SRC_ZIP) ]) -AC_DEFUN([ENABLE_HG], -[ - AC_MSG_CHECKING(whether to retrieve the source code from Mercurial) - AC_ARG_ENABLE([hg], - [AS_HELP_STRING(--enable-hg,download source code from Mercurial [[default=no]])], - [ - case "${enableval}" in - no) - enable_hg=no - ;; - *) - enable_hg=yes - ;; - esac - ], - [ - enable_hg=no - ]) - AC_MSG_RESULT([${enable_hg}]) - AM_CONDITIONAL([USE_HG], test x"${enable_hg}" = "xyes") -]) - AC_DEFUN([AC_CHECK_WITH_HG_REVISION], [ AC_MSG_CHECKING([which Mercurial revision to use]) From mvfranz at gmail.com Sun Aug 9 16:07:40 2009 From: mvfranz at gmail.com (Michael Franz) Date: Sun, 9 Aug 2009 19:07:40 -0400 Subject: ENABLE_HG appears twice in acinclude.m4 In-Reply-To: <17c6771e0908091537m6d4345f7w4cbe345765fb1ef2@mail.gmail.com> References: <17c6771e0908091537m6d4345f7w4cbe345765fb1ef2@mail.gmail.com> Message-ID: Great, this should make it easier to add BSD archive downloads. On Sun, Aug 9, 2009 at 6:37 PM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/8/9 Michael Franz : > > Hi, > > > > I was trying to add an option that is similar to ENABLE_HG and found that > > acinclude.m4 has two different definitions for it. The only difference > > seems to be the helps string: > > [AS_HELP_STRING(--enable-hg,download source code from Mercurial > > [[default=depends on project]])] > > [AS_HELP_STRING(--enable-hg,download source code from Mercurial > > [[default=no]])] > > > > Is this necessary or a bug? > > > > I am using the 1.11 tar ball. > > > > Michael > > > > > It's a merge artefact. The second one is from IcedTea6. Well > spotted, this is exactly the reason I don't do blanket merges any > more... > -- > 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/20090809/0ce58385/attachment.html From aph at redhat.com Mon Aug 10 02:31:37 2009 From: aph at redhat.com (Andrew Haley) Date: Mon, 10 Aug 2009 10:31:37 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <1249745151.3441.10.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> Message-ID: <4A7FE8F9.4040508@redhat.com> Mark Wielaard wrote: > On Sat, 2009-08-08 at 08:56 +0100, Andrew Haley wrote: >> IMO we spend far too much time discussing these issues. We need to make >> this standard procedure: whenever there are fixes for significant bugs we >> apply them to the current release branch and make a minor release. >> Whenever there are significant new features we make a major release. >> A lot of the discussion in this list is, IMO, a result of confusing >> these unrelated issues. >> >> The ARM port is all ready to go in apart from one minor problem. This can >> be fixed in the next few days, I hope, and the testing can begin. > > Right. I think the confusion comes from where people think we are in the > release cycle. It would be good if we had more timed releases, say every > 6 weeks on a Monday (or something similarly random, but consistent). At the moment, we release when new features warrant it. By releasing periodically you impose a schedule where none is needed. You also raise the absurd possibility of a new release with no new features. > Then it is clear that when the release manager says that a release is > coming, you know when you must have had your code in, testing done and > that a branch is imminent. A release has been proposed, and we're having that discussion. Rather than saying "A release will be made on Date X and if your code isn't ready, tough", I'm asking "When will your code be ready?" This is a far more sensible approach. > Otherwise we get situations where there seems to be lots of discussions > because some people believe we are ready and are in testing mode before > a final release already and others think we are at the start of a > release cycle and new stuff can still be added and additional testing > needs to be done afterwards. We're discussing it now. This is the notice that a release is proposed. Let's get concrete. As far as I know the trunk is almost in a state where a release branch can be made. Who has work that they want to get in the next release? When can it be readied? Andrew. From mark at klomp.org Mon Aug 10 03:25:45 2009 From: mark at klomp.org (Mark Wielaard) Date: Mon, 10 Aug 2009 12:25:45 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7FE8F9.4040508@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> <4A7FE8F9.4040508@redhat.com> Message-ID: <1249899945.3606.64.camel@springer.wildebeest.org> Hi Andrew, On Mon, 2009-08-10 at 10:31 +0100, Andrew Haley wrote: > > Right. I think the confusion comes from where people think we are in the > > release cycle. It would be good if we had more timed releases, say every > > 6 weeks on a Monday (or something similarly random, but consistent). > > At the moment, we release when new features warrant it. By releasing > periodically you impose a schedule where none is needed. I think you are mistaken, these recurring "release now?" discussions seem to show a more regular periodic release schedule would make the whole process go more smoothly. > You also raise > the absurd possibility of a new release with no new features. I think that is a fear that isn't very likely. We make improvements, bug fixes, adding features all the time. Even if there are no "major" new features having regular update releases with "just" feature improvements and bug fixes would be really good. IMHO. > > Then it is clear that when the release manager says that a release is > > coming, you know when you must have had your code in, testing done and > > that a branch is imminent. > > A release has been proposed, and we're having that discussion. Rather > than saying "A release will be made on Date X and if your code isn't > ready, tough", I'm asking "When will your code be ready?" This is a > far more sensible approach. I thought the question was more "everybody ready for a release now?" Not about whether or not some new code would be ready in some future. > We're discussing it now. This is the notice that a release is proposed. > > Let's get concrete. As far as I know the trunk is almost in a state where a > release branch can be made. > > Who has work that they want to get in the next release? When can it > be readied? OK, agreed. I believe the following additions are in, tested and ready for release: - Plugin and netx improvements (largely complete 1.5/6.0 jnlp spec support, cookie support rewrite, and numerous other stability and bug fixes) - security updates. - systemtap java method entry/exit tracing. - updated hotspot (hs14b16) - updates to shark for newer LLVM api interface changes. - Build fixes and general bug fixes (execvpe, cacao, gcc 4.4, - Cleaned up configure support for --with-openjdk and --with-additional-vms Not ready yet? but would definitely be nice: - sync with oj6, unknown when/if it can be updated, but icedtea6 already contains the important bits missing from current oj6 (security updates, updated hotspot). - new arm stuff. - new Xorg header updates (currently not certain how to detect, distros patch themselves). Cheers, Mark From aph at redhat.com Mon Aug 10 04:18:49 2009 From: aph at redhat.com (Andrew Haley) Date: Mon, 10 Aug 2009 12:18:49 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <1249899945.3606.64.camel@springer.wildebeest.org> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> <4A7FE8F9.4040508@redhat.com> <1249899945.3606.64.camel@springer.wildebeest.org> Message-ID: <4A800219.4040703@redhat.com> Mark Wielaard wrote: > On Mon, 2009-08-10 at 10:31 +0100, Andrew Haley wrote: >>> Right. I think the confusion comes from where people think we are in the >>> release cycle. It would be good if we had more timed releases, say every >>> 6 weeks on a Monday (or something similarly random, but consistent). >> At the moment, we release when new features warrant it. By releasing >> periodically you impose a schedule where none is needed. > > I think you are mistaken, these recurring "release now?" discussions > seem to show a more regular periodic release schedule would make the > whole process go more smoothly. Maybe. However, it's a big change to make to the way that we work, and it seems a lot simply to avoid pointless discussions. Not that I'm against avoiding pointless discussions, but I doubt that it would work: we'd end up still having the discussions, but with the extra overhead of a fixed release cycle. >> You also raise >> the absurd possibility of a new release with no new features. > > I think that is a fear that isn't very likely. We make improvements, bug > fixes, adding features all the time. Even if there are no "major" new > features having regular update releases with "just" feature improvements > and bug fixes would be really good. IMHO. Well, again maybe. It's a lot of extra work, especially for those with a great many platforms to test. And I doubt the value of it, frankly. I've worked on projects with regular timed releases and with feature-based releases, and the feature-based releases work better. They're much more aligned with what users want: no-one wants Release 1.9, they want Feature X. You are proposing a change that has costs associated with it. For that to work, we would have to have buy-in across the IcedTea community and a commitment to do the work. Without that, releases would not be tested. And if there is one thing that we must not do, it is to make untested releases. >>> Then it is clear that when the release manager says that a release is >>> coming, you know when you must have had your code in, testing done and >>> that a branch is imminent. >> A release has been proposed, and we're having that discussion. Rather >> than saying "A release will be made on Date X and if your code isn't >> ready, tough", I'm asking "When will your code be ready?" This is a >> far more sensible approach. > > I thought the question was more "everybody ready for a release now?" Not > about whether or not some new code would be ready in some future. The question is "Is this a good time to release?" If the answer is "Well, I'll have Feature Y ready in a couple of weeks" then we can talk about it. >> We're discussing it now. This is the notice that a release is proposed. >> >> Let's get concrete. As far as I know the trunk is almost in a state where a >> release branch can be made. >> >> Who has work that they want to get in the next release? When can it >> be readied? > > OK, agreed. > > I believe the following additions are in, tested and ready for release: > - Plugin and netx improvements (largely complete 1.5/6.0 jnlp spec > support, cookie support rewrite, and numerous other stability and bug > fixes) > - security updates. > - systemtap java method entry/exit tracing. > - updated hotspot (hs14b16) > - updates to shark for newer LLVM api interface changes. > - Build fixes and general bug fixes (execvpe, cacao, gcc 4.4, > - Cleaned up configure support for --with-openjdk and > --with-additional-vms > > Not ready yet? but would definitely be nice: > - sync with oj6, unknown when/if it can be updated, but icedtea6 already > contains the important bits missing from current oj6 (security > updates, updated hotspot). > - new arm stuff. > - new Xorg header updates (currently not certain how to detect, distros > patch themselves). Right. So, are any of these worth holding up a release for? I think the ARM interpreter is, particularly as I am assured it is ready to go in. It offers very significant benefits to some users. Andrew. From Joe.Darcy at Sun.COM Mon Aug 10 09:44:54 2009 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Mon, 10 Aug 2009 09:44:54 -0700 Subject: Proposed IcedTea 6 release In-Reply-To: <17c6771e0908081649r5bace91aue7e23d0d3f5702ea@mail.gmail.com> References: <4A7B413C.8010109@redhat.com> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> <17c6771e0908081649r5bace91aue7e23d0d3f5702ea@mail.gmail.com> Message-ID: <4A804E86.7050907@sun.com> Andrew John Hughes wrote: > 2009/8/8 Mark Wielaard : > >> On Sat, 2009-08-08 at 08:56 +0100, Andrew Haley wrote: >> >>> IMO we spend far too much time discussing these issues. We need to make >>> this standard procedure: whenever there are fixes for significant bugs we >>> apply them to the current release branch and make a minor release. >>> Whenever there are significant new features we make a major release. >>> A lot of the discussion in this list is, IMO, a result of confusing >>> these unrelated issues. >>> >>> The ARM port is all ready to go in apart from one minor problem. This can >>> be fixed in the next few days, I hope, and the testing can begin. >>> >> Right. I think the confusion comes from where people think we are in the >> release cycle. It would be good if we had more timed releases, say every >> 6 weeks on a Monday (or something similarly random, but consistent). >> Then it is clear that when the release manager says that a release is >> coming, you know when you must have had your code in, testing done and >> that a branch is imminent. >> >> Otherwise we get situations where there seems to be lots of discussions >> because some people believe we are ready and are in testing mode before >> a final release already and others think we are at the start of a >> release cycle and new stuff can still be added and additional testing >> needs to be done afterwards. >> >> Cheers, >> >> Mark >> >> >> > > +1 > > It would also be good to coordinate with Sun on this in order to time > IcedTea6 releases against upstream OpenJDK6 build drops. There is a > known cycle for OpenJDK7 > (http://openjdk.java.net/projects/jdk7/calendar/) but none, as far as > I know, for OpenJDK6. > Yes, OpenJDK 6 builds have always been on an as-needed basis and not a fixed schedule, but builds are always needed for security releases. I agree it would be reasonable for OpenJDK 6 and IcedTea 6 to coordinate more. -Joe From mvfranz at gmail.com Mon Aug 10 20:19:01 2009 From: mvfranz at gmail.com (Michael Franz) Date: Mon, 10 Aug 2009 23:19:01 -0400 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner Message-ID: Hi, I am trying to build IcedTea 1.11 on Fedora 10 with all the updates. I followed the instructions for building with ecj. autoreconf; ./configure . The configure scripts throws an exception that java.util.Scanner is missing. I think I have all the prerequisites installed. What might be missing? Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090810/b2da26d1/attachment.html From mark at klomp.org Tue Aug 11 01:20:31 2009 From: mark at klomp.org (Mark Wielaard) Date: Tue, 11 Aug 2009 10:20:31 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A800219.4040703@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A7BE776.3040405@redhat.com> <1249638794.3477.13.camel@springer.wildebeest.org> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> <4A7FE8F9.4040508@redhat.com> <1249899945.3606.64.camel@springer.wildebeest.org> <4A800219.4040703@redhat.com> Message-ID: <1249978831.2632.32.camel@hermans.wildebeest.org> Hi Andrew, On Mon, 2009-08-10 at 12:18 +0100, Andrew Haley wrote: > I've worked on projects with regular timed releases and with > feature-based releases, and the feature-based releases work better. > They're much more aligned with what users want: no-one wants Release > 1.9, they want Feature X. That is opposite to my experiences. Users and developers seem to prefer a release early, release often approach. It isn't about features, it is about a steadily improving product. It takes away fear of developers that their feature won't make it, since they know there will be just another release 6 weeks from now, when they can polish it up and make ready. It means no arbitrary delays for stuff being released because it "isn't a big enough feature to release now". Users get the bug fixes at regular intervals. And it makes distros happy because they don't have to carry so many backports for bugs that have been fixed upstream already but are still in a holding pattern to be released on an unclear schedule. > You are proposing a change that has costs associated with it. For > that to work, we would have to have buy-in across the IcedTea > community and a commitment to do the work. Without that, releases > would not be tested. And if there is one thing that we must not do, > it is to make untested releases. We should have buy-in indeed. I think we have. You seem to be the only person against more regular releases. But maybe the other people are just too timid to tell me what a crazy idea it is :) But I am happy to defer to the actual release master. If they feel doing regular releases is too much work, then obviously they won't happen. What we have been doing, and should do more, is making IcedTea always releasable. We have setup multiple autobuilders and testers to make sure the build is never broken and no unknown regressions slip in. Cheers, Mark From aph at redhat.com Tue Aug 11 03:33:20 2009 From: aph at redhat.com (Andrew Haley) Date: Tue, 11 Aug 2009 11:33:20 +0100 Subject: ARM Interpreter Message-ID: <4A8148F0.6050601@redhat.com> Ed, The IcedTea release is being held up because I thought that the ARM interpreter update was ready to go in, but it has still not been committed. I think the problem is that you do not have commit access and Xerxes is not around. Is this checkin going to happen this week? If not, we should branch for a release now and save the ARM update for the next release. I think you should have commit access and not depend on others to commit your work. Andrew. From aph at redhat.com Tue Aug 11 03:42:07 2009 From: aph at redhat.com (Andrew Haley) Date: Tue, 11 Aug 2009 11:42:07 +0100 Subject: ARM Interpreter In-Reply-To: <4A8148F0.6050601@redhat.com> References: <4A8148F0.6050601@redhat.com> Message-ID: <4A814AFF.3000704@redhat.com> Andrew Haley wrote: > I think you should have commit access and not depend on others to commit > your work. Sorry, that came out a bit harsher than I intended! I mean, it would be really nice if you had commit access... :-) Andrew. From enevill at arm.com Tue Aug 11 05:37:44 2009 From: enevill at arm.com (Edward Nevill) Date: Tue, 11 Aug 2009 13:37:44 +0100 Subject: ARM Interpreter In-Reply-To: <4A8148F0.6050601@redhat.com> References: <4A8148F0.6050601@redhat.com> Message-ID: <000601ca1a80$86bf71f0$943e55d0$@com> >I think the problem is that you do not have commit access and Xerxes is >not around. Is this checkin going to happen this week? If not, we should >branch for a release now and save the ARM update for the next release. I agree. This will give me some time to ensure it is working with Shark. Incidentally, further to our discussion, the way it will work at the moment if the diffs are checked in without any changes is that the optimised assembler version will become the default build for ARM. The relevant part is the diff to zero.make where it does ifeq ($(ZERO_LIBARCH),arm) Obj_Files += cppInterpreter_arm.o CFLAGS += -DHOTSPOT_ASM -DHW_NULL_PTR_CHECK ... ... endif If you build Shark, it will include the optimised assembler, but it will fall back to the CPP interpreter at runtime. I have put the sources at http://camswl.com/openjdk, however, the source release there is a complete debian package. I will make the diffs to b16 available on the website and post when they are available. >I think you should have commit access and not depend on others to commit >your work. OK. Can you arrange commit access for me please. Regards, Ed. From enevill at arm.com Tue Aug 11 06:22:15 2009 From: enevill at arm.com (Edward Nevill) Date: Tue, 11 Aug 2009 14:22:15 +0100 Subject: ARM Interpreter diffs Message-ID: <000701ca1a86$bed4aff0$3c7e0fd0$@com> Hi all, I have put the diffs for the ARM interpreter at http://camswl.com/b16diffs There is a brief description of each file change and why it is changed Regards, Ed. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090811/8d90ba9b/attachment.html From mark at klomp.org Tue Aug 11 07:47:32 2009 From: mark at klomp.org (Mark Wielaard) Date: Tue, 11 Aug 2009 16:47:32 +0200 Subject: ARM Interpreter diffs In-Reply-To: <000701ca1a86$bed4aff0$3c7e0fd0$@com> References: <000701ca1a86$bed4aff0$3c7e0fd0$@com> Message-ID: <1250002052.3516.10.camel@springer.wildebeest.org> Hi Ed, On Tue, 2009-08-11 at 14:22 +0100, Edward Nevill wrote: > I have put the diffs for the ARM interpreter at > > http://camswl.com/b16diffs I am getting "404 Not Found" for that URL. From enevill at arm.com Tue Aug 11 08:49:32 2009 From: enevill at arm.com (Edward Nevill) Date: Tue, 11 Aug 2009 16:49:32 +0100 Subject: ARM Interpreter diffs In-Reply-To: <1250002052.3516.10.camel@springer.wildebeest.org> References: <000701ca1a86$bed4aff0$3c7e0fd0$@com> <1250002052.3516.10.camel@springer.wildebeest.org> Message-ID: <001501ca1a9b$518eda50$f4ac8ef0$@com> Apologies, Try http://camswl.com/openjdk/b16diffs Regards, Ed On Tue, 2009-08-11 at 14:22 +0100, Edward Nevill wrote: > I have put the diffs for the ARM interpreter at > > http://camswl.com/b16diffs I am getting "404 Not Found" for that URL. From bugzilla-daemon at icedtea.classpath.org Tue Aug 11 11:02:11 2009 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Aug 2009 18:02:11 +0000 Subject: [Bug 368] Eclipse repeatedly crashes after changing C++ Project Properties Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=368 ------- Comment #2 from matt.bauer at ngc.com 2009-08-11 18:02 ------- Created an attachment (id=253) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=253&action=view) Automatically generated error report produced as Eclipse IDE crashed. The crash screen generated was as follows: # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002b8a40ec2821, pid=32488, tid=1204967744 # # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) # Problematic frame: # V [libjvm.so+0x20a821] # # An error report file with more information is saved as: # /home/user1/hs_err_pid32488.log # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From mvfranz at gmail.com Tue Aug 11 16:27:04 2009 From: mvfranz at gmail.com (Michael Franz) Date: Tue, 11 Aug 2009 19:27:04 -0400 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: References: Message-ID: It looks like the Makefile logic that adds icedtea-euctw.patch is not working as expected. Since this was an IcedTea 6 patch, was the logic implemented correctly in IcedTea 7? On Mon, Aug 10, 2009 at 11:19 PM, Michael Franz wrote: > Hi, > > I am trying to build IcedTea 1.11 on Fedora 10 with all the updates. I > followed the instructions for building with ecj. autoreconf; ./configure . > The configure scripts throws an exception that java.util.Scanner is > missing. I think I have all the prerequisites installed. What might be > missing? > > Michael > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090811/35df0ff0/attachment.html From gbenson at redhat.com Wed Aug 12 02:59:41 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 12 Aug 2009 10:59:41 +0100 Subject: ARM Interpreter In-Reply-To: <000601ca1a80$86bf71f0$943e55d0$@com> References: <4A8148F0.6050601@redhat.com> <000601ca1a80$86bf71f0$943e55d0$@com> Message-ID: <20090812095940.GC3241@redhat.com> Edward Nevill wrote: > I will make the diffs to b16 available on the website and post when > they are available. Please mail a patch against icedtea to this list for review before committing anything. Cheers, Gary -- http://gbenson.net/ From gbenson at redhat.com Wed Aug 12 03:08:11 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 12 Aug 2009 11:08:11 +0100 Subject: ARM Interpreter In-Reply-To: <20090812095940.GC3241@redhat.com> References: <4A8148F0.6050601@redhat.com> <000601ca1a80$86bf71f0$943e55d0$@com> <20090812095940.GC3241@redhat.com> Message-ID: <20090812100811.GD3241@redhat.com> Gary Benson wrote: > Edward Nevill wrote: > > I will make the diffs to b16 available on the website and post > > when they are available. > > Please mail a patch against icedtea to this list for review before > committing anything. Also, did you see this email? http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2009-July/006543.html Cheers, Gary -- http://gbenson.net/ From aph at redhat.com Wed Aug 12 03:09:58 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 12 Aug 2009 11:09:58 +0100 Subject: ARM Interpreter In-Reply-To: <20090812095940.GC3241@redhat.com> References: <4A8148F0.6050601@redhat.com> <000601ca1a80$86bf71f0$943e55d0$@com> <20090812095940.GC3241@redhat.com> Message-ID: <4A8294F6.4020207@redhat.com> Gary Benson wrote: > Edward Nevill wrote: >> I will make the diffs to b16 available on the website and post when >> they are available. > > Please mail a patch against icedtea to this list for review before > committing anything. I agree. Unless patches are posted they tend to get lost when web sites are reorganized or even taken down. This list is archived. It can be a bit of a pain to post a very large patch, but it's worth it. Andrew. From gbenson at redhat.com Wed Aug 12 03:17:52 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 12 Aug 2009 11:17:52 +0100 Subject: ARM Interpreter In-Reply-To: <4A8294F6.4020207@redhat.com> References: <4A8148F0.6050601@redhat.com> <000601ca1a80$86bf71f0$943e55d0$@com> <20090812095940.GC3241@redhat.com> <4A8294F6.4020207@redhat.com> Message-ID: <20090812101751.GF3241@redhat.com> Andrew Haley wrote: > Gary Benson wrote: > > Edward Nevill wrote: > > > I will make the diffs to b16 available on the website and post > > > when they are available. > > > > Please mail a patch against icedtea to this list for review before > > committing anything. > > I agree. Unless patches are posted they tend to get lost when web > sites are reorganized or even taken down. This list is archived. > It can be a bit of a pain to post a very large patch, but it's worth > it. I've done it a few times; the only real issue is that the list has an 80kb limit or so, so you'll get a message saying your mail is held for moderation (and nobody will see it until Dalibor unsticks it). FWIW it's best not to compress the patch either, just mail it plain. I think the list's web archive eats binary attachments. Cheers, Gary -- http://gbenson.net/ From aph at redhat.com Wed Aug 12 03:20:58 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 12 Aug 2009 11:20:58 +0100 Subject: ARM Interpreter In-Reply-To: <20090812101751.GF3241@redhat.com> References: <4A8148F0.6050601@redhat.com> <000601ca1a80$86bf71f0$943e55d0$@com> <20090812095940.GC3241@redhat.com> <4A8294F6.4020207@redhat.com> <20090812101751.GF3241@redhat.com> Message-ID: <4A82978A.6090900@redhat.com> Gary Benson wrote: > FWIW it's best not to compress the patch either, just mail it plain. > I think the list's web archive eats binary attachments. IME it's never a good idea to compress patches: anything that needs a special action on the part of the receiver is much less likely to be read. Andrew. From enevill at arm.com Wed Aug 12 03:51:14 2009 From: enevill at arm.com (Edward Nevill) Date: Wed, 12 Aug 2009 11:51:14 +0100 Subject: ARM Interpreter Message-ID: <001601ca1b3a$d020bce0$706236a0$@com> I did not see that email as I was not subscribed to the ML when it was written. >Also, did you see this email? > > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2009-July/006543.html >Matthias Klose wrote: >> +#if defined(PRODUCT) && defined(HOTSPOT_ASM) > >So my first question is why is everything conditionalized on PRODUCT? >Not being able to build not-PRODUCT means no assertions, no debug >helpers and no diagnostic options. I'd like to see all these >conditionals replaced with "#ifdef HOTSPOT_ASM". > >> +#endif The reason everything is conditionalised on PRODUCT is that the Asm loop will not work with a non product build. This is because all the offsets in the structures change on a non product build because of the addition of debug info into the structures. You can still do a non PRODUCT build for debug purposes and get all the assertions etc, its just you wont get the Asm loop at the same time, it will revert to the C++ loop. >HotSpot seems to follow the convention that #endifs are annotated: > > #ifdef HOTSPOT_ASM > ... > #endif // HOTSPOT_ASM OK. Will do. >+ifdef ICEDTEA_ZERO_BUILD >+ifeq ($(ZERO_LIBARCH),arm) >+Obj_Files += cppInterpreter_arm.o >+CFLAGS += -DHOTSPOT_ASM -DHW_NULL_PTR_CHECK -g0 -O2 >+%.o: %.S >+ @echo Assembling $< >+ $(QUIETLY) $(REMOVE_TARGET) >+ $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) >+endif >+endif OK. Will do Also. I think there is probably a better place for the .o: .S rule, but I couldn't find any better placed that wasn't in OpenJDK code. >> @@ -29,4 +29,32 @@ >> void Bytecodes::pd_initialize() >> { >> // No zero specific initialization >> +#if defined(PRODUCT) && defined(HOTSPOT_ASM) > >The "// No zero specific initialization" line needs removing, as there >is now some zero specific initialization. OK. Will do. >> diff -r 914f2022b402 ports/hotspot/src/cpu/zero/vm/mkbc.c > >This file isn't part of HotSpot, it's a generator for some other files. >Can it be placed into contrib? I'm not sure where the best place for this is. The mkbc.c generates the mkbc tool which generates the bytecodes.s file from the bc.def file. Ideally this would all be part of the build and the bytecodes.s file would not need to be checked in because it would be generated from bc.def. However, currently I have included the bytecodes.s file manually generated because I am unclear how to handle the mkbc tool in the OpenJDK / IcedTea build. Regards, Ed. From aph at redhat.com Wed Aug 12 03:54:47 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 12 Aug 2009 11:54:47 +0100 Subject: ARM Interpreter In-Reply-To: <001601ca1b3a$d020bce0$706236a0$@com> References: <001601ca1b3a$d020bce0$706236a0$@com> Message-ID: <4A829F77.60501@redhat.com> Edward Nevill wrote: > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2009-July/006543.html > >> Matthias Klose wrote: >>> +#if defined(PRODUCT) && defined(HOTSPOT_ASM) >> So my first question is why is everything conditionalized on PRODUCT? >> Not being able to build not-PRODUCT means no assertions, no debug >> helpers and no diagnostic options. I'd like to see all these >> conditionals replaced with "#ifdef HOTSPOT_ASM". >> >>> +#endif > > The reason everything is conditionalised on PRODUCT is that the Asm loop > will not work with a non product build. This is because all the offsets in > the structures change on a non product build because of the addition of > debug info into the structures. > > You can still do a non PRODUCT build for debug purposes and get all the > assertions etc, its just you wont get the Asm loop at the same time, it will > revert to the C++ loop. We should be able to fix this so that it works with non-product builds at some later stage. >>> diff -r 914f2022b402 ports/hotspot/src/cpu/zero/vm/mkbc.c >> This file isn't part of HotSpot, it's a generator for some other files. >> Can it be placed into contrib? > > I'm not sure where the best place for this is. The mkbc.c generates the mkbc > tool which generates the bytecodes.s file from the bc.def file. > > Ideally this would all be part of the build and the bytecodes.s file would > not need to be checked in because it would be generated from bc.def. > > However, currently I have included the bytecodes.s file manually generated > because I am unclear how to handle the mkbc tool in the OpenJDK / IcedTea > build. IMO this is reasonable enough. Andrew. From gbenson at redhat.com Wed Aug 12 05:05:28 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 12 Aug 2009 13:05:28 +0100 Subject: ARM Interpreter In-Reply-To: <001601ca1b3a$d020bce0$706236a0$@com> References: <001601ca1b3a$d020bce0$706236a0$@com> Message-ID: <20090812120528.GH3241@redhat.com> Edward Nevill wrote: > > Matthias Klose wrote: > > > +#if defined(PRODUCT) && defined(HOTSPOT_ASM) > > > > So my first question is why is everything conditionalized on > > PRODUCT? Not being able to build not-PRODUCT means no assertions, > > no debug helpers and no diagnostic options. I'd like to see all > > these conditionals replaced with "#ifdef HOTSPOT_ASM". > > The reason everything is conditionalised on PRODUCT is that the Asm > loop will not work with a non product build. This is because all the > offsets in the structures change on a non product build because of > the addition of debug info into the structures. That's really likely to break. Would it be possible to have a table of all the constants you use, and fill it in at VM startup? The C++ interpreter's init code (bytecodeInterpreter.cpp, around line 560) would be a nice place. I saw you inlined ZeroFrame::SHARK_FRAME too, that sort of thing could go there as well. > > +ifdef ICEDTEA_ZERO_BUILD > > +ifeq ($(ZERO_LIBARCH),arm) > > +Obj_Files += cppInterpreter_arm.o > > +CFLAGS += -DHOTSPOT_ASM -DHW_NULL_PTR_CHECK -g0 -O2 > > +%.o: %.S > > + @echo Assembling $< > > + $(QUIETLY) $(REMOVE_TARGET) > > + $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) > > +endif > > +endif > > OK. Will do > > Also. I think there is probably a better place for the .o: .S rule, > but I couldn't find any better placed that wasn't in OpenJDK code. Maybe wherever it defines the .o: .cpp rule? > > > diff -r 914f2022b402 ports/hotspot/src/cpu/zero/vm/mkbc.c > > > > This file isn't part of HotSpot, it's a generator for some other files. > > Can it be placed into contrib? > > I'm not sure where the best place for this is. The mkbc.c generates > the mkbc tool which generates the bytecodes.s file from the bc.def > file. > > Ideally this would all be part of the build and the bytecodes.s file > would not need to be checked in because it would be generated from > bc.def. > > However, currently I have included the bytecodes.s file manually > generated because I am unclear how to handle the mkbc tool in the > OpenJDK / IcedTea build. Ah, ok. Perhaps put mkbc.c in the top level directory, and build it in the top level Makefile. Have a look at the stamps/ports.stamp rule, that's a decent example of something that needs running before the main OpenJDK build happens. There's also the corresponding stamps/ports-ecj.stamp rule; sadly all this stuff is duplicated :( Cheers, Gary -- http://gbenson.net/ From aph at redhat.com Wed Aug 12 08:01:01 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 12 Aug 2009 16:01:01 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <4A7B413C.8010109@redhat.com> References: <4A7B413C.8010109@redhat.com> Message-ID: <4A82D92D.3050809@redhat.com> Lillian Angel wrote: > Due to the most recent drop of security patches, the progress on the > plugin/netx and system-tap integration, I am wondering if this is a good > time to have a release. > > Any thoughts? I've been talking with Ed Nevill and others, and it looks like the ARM bytecode interpreter patch isn't going to be ready in time for this release. So, we might as well cut the release branch now: there wasn't anything else we were waiting for, IIRC. This time I'd like to do the release myself, if no-one has any objections. This is mostly for my own education, but also because we should spread the load between maintainers. So, I think this is a good time to cut the branch. Is that OK with everyone? Andrew. From aph at redhat.com Wed Aug 12 08:01:55 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 12 Aug 2009 16:01:55 +0100 Subject: ARM Interpreter In-Reply-To: <20090812120528.GH3241@redhat.com> References: <001601ca1b3a$d020bce0$706236a0$@com> <20090812120528.GH3241@redhat.com> Message-ID: <4A82D963.6080100@redhat.com> Gary Benson wrote: > Edward Nevill wrote: >>> Matthias Klose wrote: >>>> +#if defined(PRODUCT) && defined(HOTSPOT_ASM) >>> So my first question is why is everything conditionalized on >>> PRODUCT? Not being able to build not-PRODUCT means no assertions, >>> no debug helpers and no diagnostic options. I'd like to see all >>> these conditionals replaced with "#ifdef HOTSPOT_ASM". >> The reason everything is conditionalised on PRODUCT is that the Asm >> loop will not work with a non product build. This is because all the >> offsets in the structures change on a non product build because of >> the addition of debug info into the structures. > > That's really likely to break. Would it be possible to have a table > of all the constants you use, and fill it in at VM startup? The C++ > interpreter's init code (bytecodeInterpreter.cpp, around line 560) > would be a nice place. I saw you inlined ZeroFrame::SHARK_FRAME too, > that sort of thing could go there as well. I think that such a table can be generated automatically, and I think I know how to do it. Can I suggest that this be treated as a future change, so that the patch can be checked in soon? That'll make it much easier for me and others to work on it. Andrew. From langel at redhat.com Wed Aug 12 08:23:00 2009 From: langel at redhat.com (Lillian Angel) Date: Wed, 12 Aug 2009 11:23:00 -0400 Subject: Proposed IcedTea 6 release In-Reply-To: <4A82D92D.3050809@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A82D92D.3050809@redhat.com> Message-ID: <4A82DE54.8040406@redhat.com> Andrew Haley wrote: > Lillian Angel wrote: > > >> Due to the most recent drop of security patches, the progress on the >> plugin/netx and system-tap integration, I am wondering if this is a good >> time to have a release. >> >> Any thoughts? >> > > I've been talking with Ed Nevill and others, and it looks like the ARM > bytecode interpreter patch isn't going to be ready in time for this > release. So, we might as well cut the release branch now: there wasn't > anything else we were waiting for, IIRC. > > This time I'd like to do the release myself, if no-one has any objections. > This is mostly for my own education, but also because we should spread > the load between maintainers. > > So, I think this is a good time to cut the branch. Is that OK with > everyone? Sounds excellent. Lillian From gbenson at redhat.com Wed Aug 12 08:25:33 2009 From: gbenson at redhat.com (Gary Benson) Date: Wed, 12 Aug 2009 16:25:33 +0100 Subject: ARM Interpreter In-Reply-To: <4A82D963.6080100@redhat.com> References: <001601ca1b3a$d020bce0$706236a0$@com> <20090812120528.GH3241@redhat.com> <4A82D963.6080100@redhat.com> Message-ID: <20090812152533.GI3241@redhat.com> Andrew Haley wrote: > Gary Benson wrote: > > Edward Nevill wrote: > > > > Matthias Klose wrote: > > > > > +#if defined(PRODUCT) && defined(HOTSPOT_ASM) > > > > > > > > So my first question is why is everything conditionalized on > > > > PRODUCT? Not being able to build not-PRODUCT means no > > > > assertions, no debug helpers and no diagnostic options. I'd > > > > like to see all these conditionals replaced with "#ifdef > > > > HOTSPOT_ASM". > > > > > > The reason everything is conditionalised on PRODUCT is that the > > > Asm loop will not work with a non product build. This is because > > > all the offsets in the structures change on a non product build > > > because of the addition of debug info into the structures. > > > > That's really likely to break. Would it be possible to have a > > table of all the constants you use, and fill it in at VM startup? > > The C++ interpreter's init code (bytecodeInterpreter.cpp, around > > line 560) would be a nice place. I saw you inlined > > ZeroFrame::SHARK_FRAME too, that sort of thing could go there as > > well. > > I think that such a table can be generated automatically, and I > think I know how to do it. > > Can I suggest that this be treated as a future change, so that the > patch can be checked in soon? That'll make it much easier for me > and others to work on it. Sure. Cheers, Gary -- http://gbenson.net/ From mark at klomp.org Wed Aug 12 08:29:23 2009 From: mark at klomp.org (Mark Wielaard) Date: Wed, 12 Aug 2009 17:29:23 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A82D92D.3050809@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A82D92D.3050809@redhat.com> Message-ID: <1250090963.3513.464.camel@springer.wildebeest.org> Hi Andrew, On Wed, 2009-08-12 at 16:01 +0100, Andrew Haley wrote: > I've been talking with Ed Nevill and others, and it looks like the ARM > bytecode interpreter patch isn't going to be ready in time for this > release. So, we might as well cut the release branch now: there wasn't > anything else we were waiting for, IIRC. One other item might have been to sync with oj6. But it is unknown when/if it can be updated and when oj6b17 will actually be released. IcedTea6 already contains the important bits missing from current oj6 (security updates, updated hotspot). It would require extra testing though, very recently some changes to the build were added with respect to the target and source settings of some of the components (6870641: [langtools] update make/build.* for jdk6, 6870591: langtools build sets javac.bootclasspath incorrectly) some similar changes in jdk7 seem to cause some subtle problems bootstrapping icedtea7. So it might actually be a good idea to skip this oj6 update for now and branch IcedTea6 now. Cheers, Mark From aph at redhat.com Wed Aug 12 09:46:41 2009 From: aph at redhat.com (Andrew Haley) Date: Wed, 12 Aug 2009 17:46:41 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <4A82D92D.3050809@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A82D92D.3050809@redhat.com> Message-ID: <4A82F1F1.8060509@redhat.com> Andrew Haley wrote: > So, I think this is a good time to cut the branch. Is that OK with > everyone? The release branch is open for checkins: http://icedtea.classpath.org/hg/release/icedtea6-1.6/ Please post all patches for the release branch to this list. Andrew. From mvfranz at gmail.com Wed Aug 12 20:06:31 2009 From: mvfranz at gmail.com (Michael Franz) Date: Wed, 12 Aug 2009 23:06:31 -0400 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: References: Message-ID: I installed a fresh version of Fedora 11 and all is working. I guess Fedora 10 is missing java.util.Scanner from the Java installation. On Tue, Aug 11, 2009 at 7:27 PM, Michael Franz wrote: > It looks like the Makefile logic that adds icedtea-euctw.patch is not > working as expected. Since this was an IcedTea 6 patch, was the logic > implemented correctly in IcedTea 7? > > > On Mon, Aug 10, 2009 at 11:19 PM, Michael Franz wrote: > >> Hi, >> >> I am trying to build IcedTea 1.11 on Fedora 10 with all the updates. I >> followed the instructions for building with ecj. autoreconf; ./configure . >> The configure scripts throws an exception that java.util.Scanner is >> missing. I think I have all the prerequisites installed. What might be >> missing? >> >> Michael >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090812/4a9c1034/attachment.html From enevill at arm.com Thu Aug 13 01:45:59 2009 From: enevill at arm.com (Edward Nevill) Date: Thu, 13 Aug 2009 09:45:59 +0100 Subject: Interpreter Offsets (was RE: ARM Interpreter) In-Reply-To: <20090812120528.GH3241@redhat.com> References: <001601ca1b3a$d020bce0$706236a0$@com> <20090812120528.GH3241@redhat.com> Message-ID: <000001ca1bf2$7b8ec470$72ac4d50$@com> Note: I have cross-posted this to zero-dev which is where this discussion more logically belongs as it is not a packaging issue. I have left distro-pkg-dev on this post so people can see the discussion is moving to zero-dev, but please remove distro-pkg-dev from subsequent posts. >> > So my first question is why is everything conditionalized on >> > PRODUCT? Not being able to build not-PRODUCT means no assertions, >> > no debug helpers and no diagnostic options. I'd like to see all >> > these conditionals replaced with "#ifdef HOTSPOT_ASM". >> >> The reason everything is conditionalised on PRODUCT is that the Asm >> loop will not work with a non product build. This is because all the >> offsets in the structures change on a non product build because of >> the addition of debug info into the structures. > >That's really likely to break. Would it be possible to have a table >of all the constants you use, and fill it in at VM startup? The C++ >interpreter's init code (bytecodeInterpreter.cpp, around line 560) >would be a nice place. I saw you inlined ZeroFrame::SHARK_FRAME too, >that sort of thing could go there as well. That would be too expensive in terms of performance. Every time it needed to access a field it would need to load the offset from a table and then use that offset in another load. Note that there is a possible 2 cycle load use penalty between the two loads so this ends up taking 4 cycles instead of 1. The way to handle this is to write a tool which generates the offsets (called say 'mkoffsets'). You then in the build do something like gcc -o mkoffsets mkoffsets.cpp ./mkoffsets > offsets.s And the #include "offsets.s". As it happens there is an interface in OpenJDK for doing exactly this sort of thing. It is called VMStructs. I have written a version of mkoffsets.cpp using VMStructs (see below). I am not sure of the best way to handle the PRODUCT vs non PRODUCT issue. There are two possible approaches. 1) The first is to generate both sets of offsets in the build and use #ifdef PRODUCT to select the correct offsets. Eg. gcc -o mkoffsets mkoffsets.cpp -DPRODUCT ./mkoffsets > product_offsets.s gcc -o mkoffsets mkoffsets.cpp -DDEBUG ./mkoffsets > debug_offsets.s Then in the asm loop do #ifdef PRODUCT #include "product_offsets.s" #else #include "debug_offsets.s" #endif 2) The 2nd is to ensure that mkoffsets is 'cleaned' for every build so that if you switch between PRODUCT and non PRODUCT builds the offsets.s file always gets regenerated. I am leaning towards the first option as the consequences of the offsets file not being regenerated correctly are horrible. Regards, Ed. --- mkoffsets.cpp ------------------------------------------------- /* * Copyright 2009 Edward Nevill * * 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). */ #include "incls/_precompiled.incl" class VMStructs { public: static void print_vm_offsets(void); }; #define outfile stdout void print_def(const char *s, int v) { fprintf(outfile, "#define %-40s 0x%02x\n", s, v); } void nl(void) { fputc('\n', outfile); } void VMStructs::print_vm_offsets(void) { print_def("THREAD_PENDING_EXC", offset_of(JavaThread, _pending_exception)); print_def("THREAD_SUSPEND_FLAGS", offset_of(JavaThread, _suspend_flags)); print_def("THREAD_ACTIVE_HANDLES", offset_of(JavaThread, _active_handles)); print_def("THREAD_LAST_HANDLE_MARK", offset_of(JavaThread, _last_handle_mark)); print_def("THREAD_TLAB_TOP", offset_of(JavaThread, _tlab) + offset_of(ThreadLocalAllocBuffer, _top)); print_def("THREAD_TLAB_END", offset_of(JavaThread, _tlab) + offset_of(ThreadLocalAllocBuffer, _end)); print_def("THREAD_RESOURCEAREA", offset_of(JavaThread, _resource_area)); print_def("THREAD_HANDLE_AREA", offset_of(JavaThread, _handle_area)); print_def("THREAD_STACK_BASE", offset_of(JavaThread, _stack_base)); print_def("THREAD_STACK_SIZE", offset_of(JavaThread, _stack_size)); print_def("THREAD_LAST_JAVA_SP", offset_of(JavaThread, _anchor) + offset_of(JavaFrameAnchor, _last_Java_sp)); print_def("THREAD_JNI_ENVIRONMENT", offset_of(JavaThread, _jni_environment)); print_def("THREAD_VM_RESULT", offset_of(JavaThread, _vm_result)); print_def("THREAD_STATE", offset_of(JavaThread, _thread_state)); print_def("THREAD_DO_NOT_UNLOCK", offset_of(JavaThread, _do_not_unlock_if_synchronized)); print_def("THREAD_JAVA_STACK_BASE", offset_of(JavaThread, _zero_stack) + ZeroStack::base_offset()); print_def("THREAD_JAVA_SP", offset_of(JavaThread, _zero_stack) + ZeroStack::sp_offset()); print_def("THREAD_TOP_ZERO_FRAME", offset_of(JavaThread, _top_zero_frame)); } int main(void) { print_def("JVM_CONSTANT_Utf8", JVM_CONSTANT_Utf8); print_def("JVM_CONSTANT_Unicode", JVM_CONSTANT_Unicode); print_def("JVM_CONSTANT_Float", JVM_CONSTANT_Float); print_def("JVM_CONSTANT_Long", JVM_CONSTANT_Long); print_def("JVM_CONSTANT_Double", JVM_CONSTANT_Double); print_def("JVM_CONSTANT_Class", JVM_CONSTANT_Class); print_def("JVM_CONSTANT_String", JVM_CONSTANT_String); print_def("JVM_CONSTANT_Fieldref", JVM_CONSTANT_Fieldref); print_def("JVM_CONSTANT_Methodref", JVM_CONSTANT_Methodref); print_def("JVM_CONSTANT_InterfaceMethodref", JVM_CONSTANT_InterfaceMethodref); print_def("JVM_CONSTANT_NameAndType", JVM_CONSTANT_NameAndType); nl(); print_def("JVM_CONSTANT_UnresolvedClass", JVM_CONSTANT_UnresolvedClass); print_def("JVM_CONSTANT_ClassIndex", JVM_CONSTANT_ClassIndex); print_def("JVM_CONSTANT_UnresolvedString", JVM_CONSTANT_UnresolvedString); print_def("JVM_CONSTANT_StringIndex", JVM_CONSTANT_StringIndex); print_def("JVM_CONSTANT_UnresolvedClassInError",JVM_CONSTANT_UnresolvedClass InError); nl(); print_def("T_BOOLEAN", T_BOOLEAN); print_def("T_CHAR", T_CHAR); print_def("T_FLOAT", T_FLOAT); print_def("T_DOUBLE", T_DOUBLE); print_def("T_BYTE", T_BYTE); print_def("T_SHORT", T_SHORT); print_def("T_INT", T_INT); print_def("T_LONG", T_LONG); print_def("T_OBJECT", T_OBJECT); print_def("T_ARRAY", T_ARRAY); print_def("T_VOID", T_VOID); nl(); print_def("_thread_uninitialized", _thread_uninitialized); print_def("_thread_new", _thread_new); print_def("_thread_new_trans", _thread_new_trans); print_def("_thread_in_native", _thread_in_native); print_def("_thread_in_native_trans", _thread_in_native_trans); print_def("_thread_in_vm", _thread_in_vm); print_def("_thread_in_vm_trans", _thread_in_vm_trans); print_def("_thread_in_Java", _thread_in_Java); print_def("_thread_in_Java_trans", _thread_in_Java_trans); print_def("_thread_blocked", _thread_blocked); print_def("_thread_blocked_trans", _thread_blocked_trans); print_def("_thread_max_state", _thread_max_state); nl(); print_def("class_unparsable_by_gc", instanceKlass::unparsable_by_gc); print_def("class_allocated", instanceKlass::allocated); print_def("class_loaded", instanceKlass::loaded); print_def("class_linked", instanceKlass::linked); print_def("class_being_initialized", instanceKlass::being_initialized); print_def("class_fully_initialized", instanceKlass::fully_initialized); print_def("class_init_error", instanceKlass::initialization_error); nl(); print_def("flag_methodInterface", 1 << ConstantPoolCacheEntry::methodInterface); print_def("flag_volatileField", 1 << ConstantPoolCacheEntry::volatileField); print_def("flag_vfinalMethod", 1 << ConstantPoolCacheEntry::vfinalMethod); print_def("flag_finalField", 1 << ConstantPoolCacheEntry::finalField); nl(); VMStructs::print_vm_offsets(); nl(); print_def("VMSYMBOLS_ArithmeticException", vmSymbols::java_lang_ArithmeticException_enum); print_def("VMSYMBOLS_ArrayIndexOutOfBounds", vmSymbols::java_lang_ArrayIndexOutOfBoundsException_enum); print_def("VMSYMBOLS_ArrayStoreException", vmSymbols::java_lang_ArrayStoreException_enum); print_def("VMSYMBOLS_ClassCastException", vmSymbols::java_lang_ClassCastException_enum); print_def("VMSYMBOLS_NullPointerException", vmSymbols::java_lang_NullPointerException_enum); print_def("VMSYMBOLS_AbstractMethodError", vmSymbols::java_lang_AbstractMethodError_enum); print_def("VMSYMBOLS_IncompatibleClassChangeError", vmSymbols::java_lang_IncompatibleClassChangeError_enum); print_def("VMSYMBOLS_InternalError", vmSymbols::java_lang_InternalError_enum); return 0; } From gnu_andrew at member.fsf.org Thu Aug 13 03:08:22 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 13 Aug 2009 11:08:22 +0100 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: References: Message-ID: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> 2009/8/13 Michael Franz : > I installed a fresh version of Fedora 11 and all is working.? I guess Fedora > 10 is missing java.util.Scanner from the Java installation. > > On Tue, Aug 11, 2009 at 7:27 PM, Michael Franz wrote: >> >> It looks like the Makefile logic that adds icedtea-euctw.patch is not >> working as expected.? Since this was an IcedTea 6 patch, was the logic >> implemented correctly in IcedTea 7? >> >> On Mon, Aug 10, 2009 at 11:19 PM, Michael Franz wrote: >>> >>> Hi, >>> >>> I am trying to build IcedTea 1.11 on Fedora 10 with all the updates.? I >>> followed the instructions for building with ecj.? autoreconf; ./configure . >>> The configure scripts throws an exception that java.util.Scanner is >>> missing.? I think I have all the prerequisites installed.? What might be >>> missing? >>> >>> Michael >>> >> > > The build should still go fine without java.util.Scanner; that check just detects whether patches are needed to work round its absence in gcj 4.3. IcedTea7 builds on boxes using gcj 4.3 (and certainly on F10 as Lillian has produced RPMs for it) so I'm not sure why you had issues and unfortunately you didn't provide enough debug info. to diagnose this; we need to know the exact error, what is being detected on your system, etc. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From doko at ubuntu.com Thu Aug 13 01:19:23 2009 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 13 Aug 2009 10:19:23 +0200 Subject: Proposed IcedTea 6 release In-Reply-To: <4A804E86.7050907@sun.com> References: <4A7B413C.8010109@redhat.com> <4A7BFBEC.60706@redhat.com> <1249640291.3477.17.camel@springer.wildebeest.org> <4A7C235F.1030005@redhat.com> <17c6771e0908070556t71a302f9nde414704fb0170bc@mail.gmail.com> <4A7C25AF.5010604@redhat.com> <1249650848.3477.24.camel@springer.wildebeest.org> <17c6771e0908070621j6d7a68bavfe6e4212c9b90352@mail.gmail.com> <4A7D2FAE.4060309@redhat.com> <1249745151.3441.10.camel@springer.wildebeest.org> <17c6771e0908081649r5bace91aue7e23d0d3f5702ea@mail.gmail.com> <4A804E86.7050907@sun.com> Message-ID: <4A83CC8B.1050400@ubuntu.com> On 10.08.2009 18:44, Joseph D. Darcy wrote: > Andrew John Hughes wrote: >> It would also be good to coordinate with Sun on this in order to time >> IcedTea6 releases against upstream OpenJDK6 build drops. There is a >> known cycle for OpenJDK7 >> (http://openjdk.java.net/projects/jdk7/calendar/) but none, as far as >> I know, for OpenJDK6. > > Yes, OpenJDK 6 builds have always been on an as-needed basis and not a > fixed schedule, but builds are always needed for security releases. I > agree it would be reasonable for OpenJDK 6 and IcedTea 6 to coordinate > more. Now that we have a 1.5.1 release, can we have such a build/code drop this week for the 1.6 release? It would be nice to get rid of all the extra patches which did accumulate in the icedtea repository. Matthias From mark at klomp.org Thu Aug 13 04:04:03 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 13:04:03 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) Message-ID: <1250161443.2798.194.camel@springer.wildebeest.org> Hi, I did some random test builds of IcedTea6 overnight. First the good news, --enable-xrender, --enable-systemtap, --enable-plugin, --enable-pulse-java, --with-parallel-jobs=8 and --enable-additional-vms=cacao all seem to do their job fine. But there seem to be some build issues with some other "non-standard" configure options (this is on x86_64 Fedora 11). When giving --with-additional-vms=cacao,zero (or just --with-additional-vms=zero) all goes well for the standard and cacao builds: $ openjdk/build/linux-amd64/j2sdk-image/bin/java -version java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.5-r9420faca6468) (build 1.6.0_0-b16) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) $ openjdk/build/linux-amd64/j2sdk-image/bin/java -cacao -version java version "1.6.0_0" IcedTea Runtime Environment (IcedTea6 1.5-r9420faca6468) (build 1.6.0_0-b16) CACAO (build 0.99.4, compiled mode) But then the zero part goes wrong while (re)patching the tree: Checking patches/icedtea-version.patch The text leading up to this was: -------------------------- |--- openjdkold/jdk/make/common/shared/Defs.gmk 2008-08-28 04:10:47.000000000 -0400 |+++ openjdk/jdk/make/common/shared/Defs.gmk 2009-02-08 08:30:21.000000000 -0500 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was: -------------------------- |--- openjdk/jdk/src/share/classes/sun/misc/Version-template.java.~1~ 2008-11-25 01:04:53.000000000 -0800 |+++ openjdk/jdk/src/share/classes/sun/misc/Version-template.java 2009-02-20 09:03:25.000000000 -0800 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored The text leading up to this was: -------------------------- |--- openjdk/jdk/make/java/version/Makefile.~1~ 2008-11-25 01:01:15.000000000 -0800 |+++ openjdk/jdk/make/java/version/Makefile 2009-02-20 09:03:56.000000000 -0800 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored ERROR patch patches/icedtea-version.patch FAILED! WARNING make clean-patch before retrying a fix make[1]: *** [stamps/patch.stamp] Error 2 make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' make: *** [stamps/add-zero.stamp] Error 2 The --enable-visual-vm option seems not current. It ends with: netbeans: [genlist] Generating information for Auto Update... BUILD SUCCESSFUL Total time: 5 seconds mkdir -p stamps touch stamps/nbplatform.stamp cd visualvm ; \ ln -s /home/mark/src/icedtea6/netbeans/nbbuild/netbeans_visualvm netbeans ; \ JAVA_HOME=/home/mark/build/icedtea6-obj/bootstrap/icedtea /usr/bin/ant build Buildfile: build.xml BUILD FAILED /usr/local/build/icedtea6-obj/visualvm/build.xml:7: The following error occurred while executing this line: /usr/local/build/icedtea6-obj/visualvm/nbproject/build-impl.xml:19: You must define 'nbplatform.NetBeans_Platform_6.5_(Build_081204).harness.dir' Total time: 0 seconds make: *** [stamps/visualvm.stamp] Error 1 --enable-npplugin doesn't work because configure doesn't detect that the correct header files aren't there: cd /home/mark/src/icedtea6/plugin/icedteanp; \ if [ -e /home/mark/src/icedtea6/.hg ] && which /usr/bin/hg >/dev/null; then \ revision="-r`(cd /home/mark/src/icedtea6; /usr/bin/hg tip --template '{rev}')`" ; \ fi ; \ if [ -n "" ]; then plugin_version=" ()"; fi; \ plugin_version=" 1.5$revision$plugin_version"; \ g++ -g -O2 \ -DPACKAGE_VERSION="\"1.5\"" \ -DPLUGIN_VERSION="\"$plugin_version\"" \ -DMOZILLA_VERSION_COLLAPSED="1090102" \ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include \ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 \ -DXP_UNIX -DOJI -fshort-wchar -I/usr/include/xulrunner-sdk-1.9.1/stable -I/usr/include/xulrunner-sdk-1.9.1/java -I/usr/include/xulrunner-sdk-1.9.1/plugin -I/usr/include/nspr4 -I/usr/include/xulrunner-sdk-1.9.1/unstable \ -fPIC -c IcedTeaNPPlugin.cc IcedTeaScriptablePluginObject.cc IcedTeaJavaRequestProcessor.cc IcedTeaPluginRequestProcessor.cc IcedTeaPluginUtils.cc; \ cd ../ In file included from IcedTeaNPPlugin.cc:71: IcedTeaScriptablePluginObject.h:42:19: error: npupp.h: No such file or directory In file included from IcedTeaNPPlugin.h:54, from IcedTeaJavaRequestProcessor.h:46, from IcedTeaScriptablePluginObject.h:44, from IcedTeaNPPlugin.cc:71: What provides npupp.h? From aph at redhat.com Thu Aug 13 04:08:33 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 12:08:33 +0100 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <1250161443.2798.194.camel@springer.wildebeest.org> References: <1250161443.2798.194.camel@springer.wildebeest.org> Message-ID: <4A83F431.8060201@redhat.com> Mark Wielaard wrote: > Hi, > > I did some random test builds of IcedTea6 overnight. > > First the good news, --enable-xrender, --enable-systemtap, > --enable-plugin, --enable-pulse-java, --with-parallel-jobs=8 and > --enable-additional-vms=cacao all seem to do their job fine. > > But there seem to be some build issues with some other "non-standard" > configure options (this is on x86_64 Fedora 11). > > When giving --with-additional-vms=cacao,zero (or just > --with-additional-vms=zero) all goes well for the standard and cacao > builds: > > $ openjdk/build/linux-amd64/j2sdk-image/bin/java -version > java version "1.6.0_0" > OpenJDK Runtime Environment (IcedTea6 1.5-r9420faca6468) (build 1.6.0_0-b16) > OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) > > $ openjdk/build/linux-amd64/j2sdk-image/bin/java -cacao -version > java version "1.6.0_0" > IcedTea Runtime Environment (IcedTea6 1.5-r9420faca6468) (build 1.6.0_0-b16) > CACAO (build 0.99.4, compiled mode) > > But then the zero part goes wrong while (re)patching the tree: > > Checking patches/icedtea-version.patch > The text leading up to this was: > -------------------------- > |--- openjdkold/jdk/make/common/shared/Defs.gmk 2008-08-28 04:10:47.000000000 -0400 > |+++ openjdk/jdk/make/common/shared/Defs.gmk 2009-02-08 08:30:21.000000000 -0500 > -------------------------- > No file to patch. Skipping patch. > 1 out of 1 hunk ignored > The text leading up to this was: > -------------------------- > |--- openjdk/jdk/src/share/classes/sun/misc/Version-template.java.~1~ 2008-11-25 01:04:53.000000000 -0800 > |+++ openjdk/jdk/src/share/classes/sun/misc/Version-template.java 2009-02-20 09:03:25.000000000 -0800 > -------------------------- > No file to patch. Skipping patch. > 2 out of 2 hunks ignored > The text leading up to this was: > -------------------------- > |--- openjdk/jdk/make/java/version/Makefile.~1~ 2008-11-25 01:01:15.000000000 -0800 > |+++ openjdk/jdk/make/java/version/Makefile 2009-02-20 09:03:56.000000000 -0800 > -------------------------- > No file to patch. Skipping patch. > 1 out of 1 hunk ignored > ERROR patch patches/icedtea-version.patch FAILED! > WARNING make clean-patch before retrying a fix > make[1]: *** [stamps/patch.stamp] Error 2 > make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' > make: *** [stamps/add-zero.stamp] Error 2 Eww, this is horrible. > --enable-npplugin doesn't work because configure doesn't detect that the > correct header files aren't there: > > cd /home/mark/src/icedtea6/plugin/icedteanp; \ > if [ -e /home/mark/src/icedtea6/.hg ] && which /usr/bin/hg >/dev/null; then \ > revision="-r`(cd /home/mark/src/icedtea6; /usr/bin/hg tip --template '{rev}')`" ; \ > fi ; \ > if [ -n "" ]; then plugin_version=" ()"; fi; \ > plugin_version=" 1.5$revision$plugin_version"; \ > g++ -g -O2 \ > -DPACKAGE_VERSION="\"1.5\"" \ > -DPLUGIN_VERSION="\"$plugin_version\"" \ > -DMOZILLA_VERSION_COLLAPSED="1090102" \ > -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include \ > -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 \ > -DXP_UNIX -DOJI -fshort-wchar -I/usr/include/xulrunner-sdk-1.9.1/stable -I/usr/include/xulrunner-sdk-1.9.1/java -I/usr/include/xulrunner-sdk-1.9.1/plugin -I/usr/include/nspr4 -I/usr/include/xulrunner-sdk-1.9.1/unstable \ > -fPIC -c IcedTeaNPPlugin.cc IcedTeaScriptablePluginObject.cc IcedTeaJavaRequestProcessor.cc IcedTeaPluginRequestProcessor.cc IcedTeaPluginUtils.cc; \ > cd ../ > In file included from IcedTeaNPPlugin.cc:71: > IcedTeaScriptablePluginObject.h:42:19: error: npupp.h: No such file or directory > In file included from IcedTeaNPPlugin.h:54, > from IcedTeaJavaRequestProcessor.h:46, > from IcedTeaScriptablePluginObject.h:44, > from IcedTeaNPPlugin.cc:71: > > What provides npupp.h? xulrunner-devel Andrew. From mvfranz at gmail.com Thu Aug 13 04:29:09 2009 From: mvfranz at gmail.com (Michael Franz) Date: Thu, 13 Aug 2009 07:29:09 -0400 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> References: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> Message-ID: I still have the Fedora 10 install (I run the installs in VMWare). The error happened after the build runs for a while and fails with a class not found exception - No java.util.Scanner. I can send the full error later. On Thu, Aug 13, 2009 at 6:08 AM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/8/13 Michael Franz : > > I installed a fresh version of Fedora 11 and all is working. I guess > Fedora > > 10 is missing java.util.Scanner from the Java installation. > > > > On Tue, Aug 11, 2009 at 7:27 PM, Michael Franz > wrote: > >> > >> It looks like the Makefile logic that adds icedtea-euctw.patch is not > >> working as expected. Since this was an IcedTea 6 patch, was the logic > >> implemented correctly in IcedTea 7? > >> > >> On Mon, Aug 10, 2009 at 11:19 PM, Michael Franz > wrote: > >>> > >>> Hi, > >>> > >>> I am trying to build IcedTea 1.11 on Fedora 10 with all the updates. I > >>> followed the instructions for building with ecj. autoreconf; > ./configure . > >>> The configure scripts throws an exception that java.util.Scanner is > >>> missing. I think I have all the prerequisites installed. What might > be > >>> missing? > >>> > >>> Michael > >>> > >> > > > > > > The build should still go fine without java.util.Scanner; that check > just detects whether patches are needed to work round its absence in > gcj 4.3. IcedTea7 builds on boxes using gcj 4.3 (and certainly on F10 > as Lillian has produced RPMs for it) so I'm not sure why you had > issues and unfortunately you didn't provide enough debug info. to > diagnose this; we need to know the exact error, what is being detected > on your system, etc. > -- > 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/20090813/8c93172e/attachment.html From gnu_andrew at member.fsf.org Thu Aug 13 04:37:16 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 13 Aug 2009 12:37:16 +0100 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: References: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> Message-ID: <17c6771e0908130437h8337153k4d0d1db23580fcdf@mail.gmail.com> 2009/8/13 Michael Franz : > I still have the Fedora 10 install (I run the installs in VMWare).? The > error happened after the build runs for a while and fails with a class not > found exception - No java.util.Scanner.? I can send the full error later. > > On Thu, Aug 13, 2009 at 6:08 AM, Andrew John Hughes > wrote: >> >> 2009/8/13 Michael Franz : >> > I installed a fresh version of Fedora 11 and all is working.? I guess >> > Fedora >> > 10 is missing java.util.Scanner from the Java installation. >> > >> > On Tue, Aug 11, 2009 at 7:27 PM, Michael Franz >> > wrote: >> >> >> >> It looks like the Makefile logic that adds icedtea-euctw.patch is not >> >> working as expected.? Since this was an IcedTea 6 patch, was the logic >> >> implemented correctly in IcedTea 7? >> >> >> >> On Mon, Aug 10, 2009 at 11:19 PM, Michael Franz >> >> wrote: >> >>> >> >>> Hi, >> >>> >> >>> I am trying to build IcedTea 1.11 on Fedora 10 with all the updates. >> >>> I >> >>> followed the instructions for building with ecj.? autoreconf; >> >>> ./configure . >> >>> The configure scripts throws an exception that java.util.Scanner is >> >>> missing.? I think I have all the prerequisites installed.? What might >> >>> be >> >>> missing? >> >>> >> >>> Michael >> >>> >> >> >> > >> > >> >> The build should still go fine without java.util.Scanner; that check >> just detects whether patches are needed to work round its absence in >> gcj 4.3. ?IcedTea7 builds on boxes using gcj 4.3 (and certainly on F10 >> as Lillian has produced RPMs for it) so I'm not sure why you had >> issues and unfortunately you didn't provide enough debug info. to >> diagnose this; we need to know the exact error, what is being detected >> on your system, etc. >> -- >> 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 > > Ok, that's interesting. That means there's a case that's not being patched. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Thu Aug 13 05:02:36 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 14:02:36 +0200 Subject: Some 1.6 build results In-Reply-To: <1250161443.2798.194.camel@springer.wildebeest.org> References: <1250161443.2798.194.camel@springer.wildebeest.org> Message-ID: <1250164956.2798.206.camel@springer.wildebeest.org> On Thu, 2009-08-13 at 13:04 +0200, Mark Wielaard wrote: > I did some random test builds of IcedTea6 overnight. > > First the good news, --enable-xrender, --enable-systemtap, > --enable-plugin, --enable-pulse-java, --with-parallel-jobs=8 and > --enable-additional-vms=cacao all seem to do their job fine. And my make check finally finished for a configure --enable-xrender --enable-systemtap --enable-plugin --enable-pulse-java --with-parallel-jobs=8 --with-additional-vms=cacao build (the make check doesn't test the cacao part though). The results look pretty promising: --------------- jtreg console summary for hotspot --------------- Test results: passed: 24 --------------- jtreg console summary for langtools --------------- Test results: passed: 1,352 --------------- jtreg console summary for jdk --------------- FAILED: com/sun/net/httpserver/bugs/B6361557.java FAILED: java/awt/event/MouseEvent/EventTimeInFuture/EventTimeInFuture.java FAILED: java/awt/Frame/DynamicLayout/DynamicLayout.java FAILED: java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html FAILED: java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.html FAILED: java/awt/Window/AlwaysOnTop/AlwaysOnTopEvenOfWindow.java FAILED: java/beans/XMLEncoder/javax_swing_tree_TreePath.java FAILED: java/net/MulticastSocket/SetLoopbackMode.java FAILED: java/net/MulticastSocket/Test.java FAILED: javax/xml/crypto/dsig/GenerationTests.java FAILED: javax/xml/crypto/dsig/ValidationTests.java Error: sun/java2d/cmm/ColorConvertOp/ConstructorsNullTest/ConstructorsNullTest.html FAILED: sun/java2d/cmm/ColorConvertOp/ColConvCCMTest.java FAILED: sun/java2d/cmm/ColorConvertOp/ColConvDCMTest.java FAILED: sun/java2d/cmm/ColorConvertOp/MTColConvTest.java Error: sun/java2d/OpenGL/GradientPaints.java Test results: passed: 3,340; failed: 14; error: 2 I haven't had time to analyze the failures, but except for the two javax/xml/crypto/dsig failures (which seem to have appeared after the security update) I don't believe there are any other regressions. Cheers, Mark From gbenson at redhat.com Thu Aug 13 05:05:49 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 13 Aug 2009 12:05:49 +0000 Subject: changeset in /hg/icedtea6: 2009-08-13 Gary Benson changeset 84a63387e544 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=84a63387e544 description: 2009-08-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::_function): New field. (SharkEntry::function): New method. (SharkEntry::set_function): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp (SharkCompiler::free_compiled_method): New method. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::free_compiled_method): New method. (SharkCompiler::compile_method): Store a pointer to the LLVM function in the method's SharkEntry. * patches/hotspot/default/icedtea-shark.patch (nmethod::flush): Add code to free Shark methods. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 6 files changed, 57 insertions(+), 5 deletions(-) ChangeLog | 19 +++++++++++++++++++ patches/hotspot/default/icedtea-shark.patch | 14 ++++++++++++++ ports/hotspot/src/share/vm/includeDB_shark | 2 +- ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 8 ++++++++ ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 3 +++ ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 16 ++++++++++++---- diffs (133 lines): diff -r 9420faca6468 -r 84a63387e544 ChangeLog --- a/ChangeLog Fri Aug 07 11:58:27 2009 +0200 +++ b/ChangeLog Thu Aug 13 08:01:04 2009 -0400 @@ -1,3 +1,22 @@ 2009-08-07 Matthias Klose + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::_function): New field. + (SharkEntry::function): New method. + (SharkEntry::set_function): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::free_compiled_method): New method. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::free_compiled_method): New method. + (SharkCompiler::compile_method): Store a pointer to + the LLVM function in the method's SharkEntry. + + * patches/hotspot/default/icedtea-shark.patch + (nmethod::flush): Add code to free Shark methods. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-08-07 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options diff -r 9420faca6468 -r 84a63387e544 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Fri Aug 07 11:58:27 2009 +0200 +++ b/patches/hotspot/default/icedtea-shark.patch Thu Aug 13 08:01:04 2009 -0400 @@ -374,3 +374,17 @@ diff -r 12c97e7e55eb -r e6fef2ef2fea ope address native_entry(); address interpreter_entry(); +diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp +--- openjdk/hotspot/src/share/vm/code/nmethod.cpp Thu Jul 30 10:00:04 2009 +0100 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Fri Jul 31 15:39:43 2009 +0100 +@@ -1296,6 +1296,10 @@ + ec = next; + } + ++#ifdef SHARK ++ ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin()); ++#endif // SHARK ++ + ((CodeBlob*)(this))->flush(); + + CodeCache::free(this); diff -r 9420faca6468 -r 84a63387e544 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Aug 13 08:01:04 2009 -0400 @@ -57,7 +57,7 @@ llvmValue.hpp llvmValue.hpp llvmHeaders.hpp llvmValue.hpp sharkType.hpp -methodOop.cpp sharkEntry.hpp +nmethod.cpp sharkCompiler.hpp shark_globals.cpp shark_globals.hpp diff -r 9420faca6468 -r 84a63387e544 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Aug 13 08:01:04 2009 -0400 @@ -146,6 +146,7 @@ void SharkCompiler::compile_method(ciEnv if (!fnmatch(SharkPrintBitcodeOf, name, 0)) function->dump(); } + entry->set_function(function); // Compile to native code #ifndef PRODUCT @@ -206,6 +207,13 @@ void SharkCompiler::compile_method(ciEnv } } +void SharkCompiler::free_compiled_method(address code) +{ + Function *function = ((SharkEntry *) code)->function(); + execution_engine()->freeMachineCodeForFunction(function); + function->eraseFromParent(); +} + const char* SharkCompiler::methodname(const ciMethod* target) { const char *klassname = target->holder()->name()->as_utf8(); diff -r 9420faca6468 -r 84a63387e544 ports/hotspot/src/share/vm/shark/sharkCompiler.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.hpp Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.hpp Thu Aug 13 08:01:04 2009 -0400 @@ -45,6 +45,9 @@ class SharkCompiler : public AbstractCom // Compilation entry point for methods void compile_method(ciEnv* env, ciMethod* target, int entry_bci); + // Free compiled methods + void free_compiled_method(address code); + // LLVM interface private: llvm::Module* _module; diff -r 9420faca6468 -r 84a63387e544 ports/hotspot/src/share/vm/shark/sharkEntry.hpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Thu Aug 13 08:01:04 2009 -0400 @@ -24,10 +24,9 @@ */ class SharkEntry : public ZeroEntry { - friend class SharkMemoryManager; - private: - address _code_limit; + address _code_limit; + llvm::Function* _function; public: address code_start() const @@ -38,9 +37,18 @@ class SharkEntry : public ZeroEntry { { return _code_limit; } - protected: + llvm::Function* function() const + { + return _function; + } + + public: void set_code_limit(address code_limit) { _code_limit = code_limit; } + void set_function(llvm::Function* function) + { + _function = function; + } }; From gbenson at redhat.com Thu Aug 13 05:11:04 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 13 Aug 2009 13:11:04 +0100 Subject: Make Shark free compiled methods Message-ID: <20090813121104.GC3770@redhat.com> Hi all, This commit makes Shark free the bitcode and native code for compiled methods when they are removed from the VM. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 9420faca6468 ChangeLog --- a/ChangeLog Fri Aug 07 11:58:27 2009 +0200 +++ b/ChangeLog Thu Aug 13 08:00:49 2009 -0400 @@ -1,3 +1,22 @@ +2009-08-13 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::_function): New field. + (SharkEntry::function): New method. + (SharkEntry::set_function): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::free_compiled_method): New method. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::free_compiled_method): New method. + (SharkCompiler::compile_method): Store a pointer to + the LLVM function in the method's SharkEntry. + + * patches/hotspot/default/icedtea-shark.patch + (nmethod::flush): Add code to free Shark methods. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-08-07 Matthias Klose * Makefile.am (ADD_ZERO_CONFIGURE_ARGS): Add configure options diff -r 9420faca6468 patches/hotspot/default/icedtea-shark.patch --- a/patches/hotspot/default/icedtea-shark.patch Fri Aug 07 11:58:27 2009 +0200 +++ b/patches/hotspot/default/icedtea-shark.patch Thu Aug 13 08:00:49 2009 -0400 @@ -374,3 +374,17 @@ address native_entry(); address interpreter_entry(); +diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp +--- openjdk/hotspot/src/share/vm/code/nmethod.cpp Thu Jul 30 10:00:04 2009 +0100 ++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp Fri Jul 31 15:39:43 2009 +0100 +@@ -1296,6 +1296,10 @@ + ec = next; + } + ++#ifdef SHARK ++ ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin()); ++#endif // SHARK ++ + ((CodeBlob*)(this))->flush(); + + CodeCache::free(this); diff -r 9420faca6468 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/includeDB_shark Thu Aug 13 08:00:49 2009 -0400 @@ -57,7 +57,7 @@ llvmValue.hpp llvmHeaders.hpp llvmValue.hpp sharkType.hpp -methodOop.cpp sharkEntry.hpp +nmethod.cpp sharkCompiler.hpp shark_globals.cpp shark_globals.hpp diff -r 9420faca6468 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Aug 13 08:00:49 2009 -0400 @@ -146,6 +146,7 @@ if (!fnmatch(SharkPrintBitcodeOf, name, 0)) function->dump(); } + entry->set_function(function); // Compile to native code #ifndef PRODUCT @@ -206,6 +207,13 @@ } } +void SharkCompiler::free_compiled_method(address code) +{ + Function *function = ((SharkEntry *) code)->function(); + execution_engine()->freeMachineCodeForFunction(function); + function->eraseFromParent(); +} + const char* SharkCompiler::methodname(const ciMethod* target) { const char *klassname = target->holder()->name()->as_utf8(); diff -r 9420faca6468 ports/hotspot/src/share/vm/shark/sharkCompiler.hpp --- a/ports/hotspot/src/share/vm/shark/sharkCompiler.hpp Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.hpp Thu Aug 13 08:00:49 2009 -0400 @@ -45,6 +45,9 @@ // Compilation entry point for methods void compile_method(ciEnv* env, ciMethod* target, int entry_bci); + // Free compiled methods + void free_compiled_method(address code); + // LLVM interface private: llvm::Module* _module; diff -r 9420faca6468 ports/hotspot/src/share/vm/shark/sharkEntry.hpp --- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Fri Aug 07 11:58:27 2009 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp Thu Aug 13 08:00:49 2009 -0400 @@ -24,10 +24,9 @@ */ class SharkEntry : public ZeroEntry { - friend class SharkMemoryManager; - private: - address _code_limit; + address _code_limit; + llvm::Function* _function; public: address code_start() const @@ -38,9 +37,18 @@ { return _code_limit; } - protected: + llvm::Function* function() const + { + return _function; + } + + public: void set_code_limit(address code_limit) { _code_limit = code_limit; } + void set_function(llvm::Function* function) + { + _function = function; + } }; From gbenson at redhat.com Thu Aug 13 05:16:46 2009 From: gbenson at redhat.com (Gary Benson) Date: Thu, 13 Aug 2009 13:16:46 +0100 Subject: ARM interpreter In-Reply-To: <96016C56224DF441A7F553FDC19DA976B0F320@ZIPPY.Emea.Arm.com> References: <4A83E17F.8060904@redhat.com> <20090813103429.GB3770@redhat.com> <96016C56224DF441A7F553FDC19DA976B0F320@ZIPPY.Emea.Arm.com> Message-ID: <20090813121646.GD3770@redhat.com> Edward Nevill wrote: > OK. I will make an initial checkin, based on the diffs I posted > on camswl.com > (I will post the patch here before making the actual checkin). Cool. > I will make the changes raised by Gary, re comments and ifdefs Thank you. > I will leave the hardcoded constants. > > Gary: If it is OK I will leave the defined(PRODUCT) for the moment, > until the offsets are generated properly. Then the defined(PRODUCT) > can be removed. Sure. Cheers, Gary -- http://gbenson.net/ From doko at ubuntu.com Thu Aug 13 03:56:06 2009 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 13 Aug 2009 12:56:06 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <1250161443.2798.194.camel@springer.wildebeest.org> References: <1250161443.2798.194.camel@springer.wildebeest.org> Message-ID: <4A83F146.4000700@ubuntu.com> On 13.08.2009 13:04, Mark Wielaard wrote: > Hi, > > I did some random test builds of IcedTea6 overnight. > > First the good news, --enable-xrender, --enable-systemtap, > --enable-plugin, --enable-pulse-java, --with-parallel-jobs=8 and > --enable-additional-vms=cacao all seem to do their job fine. should --enable-xrender be enabled by default now? > But there seem to be some build issues with some other "non-standard" > configure options (this is on x86_64 Fedora 11). > > When giving --with-additional-vms=cacao,zero (or just > --with-additional-vms=zero) all goes well for the standard and cacao > builds: > > $ openjdk/build/linux-amd64/j2sdk-image/bin/java -version > java version "1.6.0_0" > OpenJDK Runtime Environment (IcedTea6 1.5-r9420faca6468) (build 1.6.0_0-b16) > OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) > > $ openjdk/build/linux-amd64/j2sdk-image/bin/java -cacao -version > java version "1.6.0_0" > IcedTea Runtime Environment (IcedTea6 1.5-r9420faca6468) (build 1.6.0_0-b16) > CACAO (build 0.99.4, compiled mode) > > But then the zero part goes wrong while (re)patching the tree: > > Checking patches/icedtea-version.patch > The text leading up to this was: > -------------------------- > |--- openjdkold/jdk/make/common/shared/Defs.gmk 2008-08-28 04:10:47.000000000 -0400 > |+++ openjdk/jdk/make/common/shared/Defs.gmk 2009-02-08 08:30:21.000000000 -0500 > -------------------------- > No file to patch. Skipping patch. > 1 out of 1 hunk ignored > The text leading up to this was: > -------------------------- > |--- openjdk/jdk/src/share/classes/sun/misc/Version-template.java.~1~ 2008-11-25 01:04:53.000000000 -0800 > |+++ openjdk/jdk/src/share/classes/sun/misc/Version-template.java 2009-02-20 09:03:25.000000000 -0800 > -------------------------- > No file to patch. Skipping patch. > 2 out of 2 hunks ignored > The text leading up to this was: > -------------------------- > |--- openjdk/jdk/make/java/version/Makefile.~1~ 2008-11-25 01:01:15.000000000 -0800 > |+++ openjdk/jdk/make/java/version/Makefile 2009-02-20 09:03:56.000000000 -0800 > -------------------------- > No file to patch. Skipping patch. > 1 out of 1 hunk ignored > ERROR patch patches/icedtea-version.patch FAILED! > WARNING make clean-patch before retrying a fix > make[1]: *** [stamps/patch.stamp] Error 2 > make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' > make: *** [stamps/add-zero.stamp] Error 2 I don't see this with a recent build. Matthias From mark at klomp.org Thu Aug 13 06:03:44 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 15:03:44 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <4A83F146.4000700@ubuntu.com> References: <1250161443.2798.194.camel@springer.wildebeest.org> <4A83F146.4000700@ubuntu.com> Message-ID: <1250168624.2798.207.camel@springer.wildebeest.org> Hi Matthias, On Thu, 2009-08-13 at 12:56 +0200, Matthias Klose wrote: > should --enable-xrender be enabled by default now? O, yes, you are right, so that is just testing the default. > > ERROR patch patches/icedtea-version.patch FAILED! > > WARNING make clean-patch before retrying a fix > > make[1]: *** [stamps/patch.stamp] Error 2 > > make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' > > make: *** [stamps/add-zero.stamp] Error 2 > > I don't see this with a recent build. How did you configure? Thanks, Mark From doko at ubuntu.com Thu Aug 13 04:34:52 2009 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 13 Aug 2009 13:34:52 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <1250168624.2798.207.camel@springer.wildebeest.org> References: <1250161443.2798.194.camel@springer.wildebeest.org> <4A83F146.4000700@ubuntu.com> <1250168624.2798.207.camel@springer.wildebeest.org> Message-ID: <4A83FA5C.501@ubuntu.com> On 13.08.2009 15:03, Mark Wielaard wrote: > Hi Matthias, > > On Thu, 2009-08-13 at 12:56 +0200, Matthias Klose wrote: >> should --enable-xrender be enabled by default now? > > O, yes, you are right, so that is just testing the default. > >>> ERROR patch patches/icedtea-version.patch FAILED! >>> WARNING make clean-patch before retrying a fix >>> make[1]: *** [stamps/patch.stamp] Error 2 >>> make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' >>> make: *** [stamps/add-zero.stamp] Error 2 >> >> I don't see this with a recent build. > > How did you configure? ../configure --with-openjdk=/usr/lib/jvm/java-6-openjdk --with-pkgversion="6b16~pre5-0ubuntu2" --with-xalan2-jar=/usr/share/java/xalan2.jar --with-xalan2-serializer-jar=/usr/share/java/serializer.jar --with-rhino=/usr/share/java/js.jar --with-hotspot-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/hotspot-20090803.tar.gz --with-openjdk-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/openjdk-6-src-b16-24_apr_2009-dfsg.tar.gz --with-cacao-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/cacao-0.99.4.tar.bz2 --with-hotspot-build --with-parallel-jobs=4 --enable-liveconnect --enable-pulse-java --with-additional-vms=cacao,shark --host=i686-linux-gnulp --build=i686-linux-gnulp From mark at klomp.org Thu Aug 13 06:39:06 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 15:39:06 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <4A83FA5C.501@ubuntu.com> References: <1250161443.2798.194.camel@springer.wildebeest.org> <4A83F146.4000700@ubuntu.com> <1250168624.2798.207.camel@springer.wildebeest.org> <4A83FA5C.501@ubuntu.com> Message-ID: <1250170746.2798.210.camel@springer.wildebeest.org> On Thu, 2009-08-13 at 13:34 +0200, Matthias Klose wrote: > On 13.08.2009 15:03, Mark Wielaard wrote: > >>> ERROR patch patches/icedtea-version.patch FAILED! > >>> WARNING make clean-patch before retrying a fix > >>> make[1]: *** [stamps/patch.stamp] Error 2 > >>> make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' > >>> make: *** [stamps/add-zero.stamp] Error 2 > >> > >> I don't see this with a recent build. > > > > How did you configure? > > ../configure --with-openjdk=/usr/lib/jvm/java-6-openjdk > --with-pkgversion="6b16~pre5-0ubuntu2" > --with-xalan2-jar=/usr/share/java/xalan2.jar > --with-xalan2-serializer-jar=/usr/share/java/serializer.jar > --with-rhino=/usr/share/java/js.jar > --with-hotspot-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/hotspot-20090803.tar.gz > --with-openjdk-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/openjdk-6-src-b16-24_apr_2009-dfsg.tar.gz > --with-cacao-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/cacao-0.99.4.tar.bz2 > --with-hotspot-build --with-parallel-jobs=4 --enable-liveconnect > --enable-pulse-java --with-additional-vms=cacao,shark --host=i686-linux-gnulp > --build=i686-linux-gnulp Thanks. What happens if you don't add the --with-*-src-zip options? From aph at redhat.com Thu Aug 13 07:03:57 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 15:03:57 +0100 Subject: ARM interpreter In-Reply-To: <96016C56224DF441A7F553FDC19DA976B0F320@ZIPPY.Emea.Arm.com> References: <001601ca1b3a$d020bce0$706236a0$@com><20090812120528.GH3241@redhat.com><000001ca1bf2$7b8ec470$72ac4d50$@com> <4A83D975.7050602@redhat.com><20090813094211.GA3770@redhat.com> <4A83E17F.8060904@redhat.com> <20090813103429.GB3770@redhat.com> <96016C56224DF441A7F553FDC19DA976B0F320@ZIPPY.Emea.Arm.com> Message-ID: <4A841D4D.9060602@redhat.com> Edward Nevill wrote: > OK. I will make an initial checkin, based on the diffs I posted on > camswl.com > (I will post the patch here before making the actual checkin). > > I will make the changes raised by Gary, re comments and ifdefs > > I will leave the hardcoded constants. > > Gary: If it is OK I will leave the defined(PRODUCT) for the moment, > until the offsets are generated properly. Then the defined(PRODUCT) can > be removed. Sounds perfect. > I expect to have the patches ready to submit Tues/Weds next week. > > Please be patient if this takes slightly longer than you would like. It > is the first time I have submitted patches to IcedTea and I want to make > sure I get it right. Until yesterday I had never build IcedTea on its > own (I had only built it as part of the OpenJDK Debian package), so > there is some learning curve. OK. I'll be glad to help in whatever way I can. Andrew. From doko at ubuntu.com Thu Aug 13 05:19:44 2009 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 13 Aug 2009 14:19:44 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <1250170746.2798.210.camel@springer.wildebeest.org> References: <1250161443.2798.194.camel@springer.wildebeest.org> <4A83F146.4000700@ubuntu.com> <1250168624.2798.207.camel@springer.wildebeest.org> <4A83FA5C.501@ubuntu.com> <1250170746.2798.210.camel@springer.wildebeest.org> Message-ID: <4A8404E0.6040003@ubuntu.com> On 13.08.2009 15:39, Mark Wielaard wrote: > On Thu, 2009-08-13 at 13:34 +0200, Matthias Klose wrote: >> On 13.08.2009 15:03, Mark Wielaard wrote: >>>>> ERROR patch patches/icedtea-version.patch FAILED! >>>>> WARNING make clean-patch before retrying a fix >>>>> make[1]: *** [stamps/patch.stamp] Error 2 >>>>> make[1]: Leaving directory `/usr/local/build/icedtea6-obj/zerovm' >>>>> make: *** [stamps/add-zero.stamp] Error 2 >>>> >>>> I don't see this with a recent build. >>> >>> How did you configure? >> >> ../configure --with-openjdk=/usr/lib/jvm/java-6-openjdk >> --with-pkgversion="6b16~pre5-0ubuntu2" >> --with-xalan2-jar=/usr/share/java/xalan2.jar >> --with-xalan2-serializer-jar=/usr/share/java/serializer.jar >> --with-rhino=/usr/share/java/js.jar >> --with-hotspot-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/hotspot-20090803.tar.gz >> --with-openjdk-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/openjdk-6-src-b16-24_apr_2009-dfsg.tar.gz >> --with-cacao-src-zip=/scratch/packages/openjdk/u/openjdk-6-6b16~pre5/cacao-0.99.4.tar.bz2 >> --with-hotspot-build --with-parallel-jobs=4 --enable-liveconnect >> --enable-pulse-java --with-additional-vms=cacao,shark --host=i686-linux-gnulp >> --build=i686-linux-gnulp > > Thanks. What happens if you don't add the --with-*-src-zip options? the build will fail, because the buildd doesn't have network access. From aph at redhat.com Thu Aug 13 07:26:33 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 15:26:33 +0100 Subject: Version number on trunk Message-ID: <4A842299.70509@redhat.com> I've bumped the branch to 1.6, and now want to bump the trunk. I think the version on the trunk should be something like "1.7pre", since it's after 1.6 branched but before 1.7 branched. gcc trunk immediately becomes 4.5.0 (experimental) once the 4.4 branch has been made. I think this is a sensible thing to imitate. Andrew. From langel at redhat.com Thu Aug 13 07:29:39 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 13 Aug 2009 10:29:39 -0400 Subject: Version number on trunk In-Reply-To: <4A842299.70509@redhat.com> References: <4A842299.70509@redhat.com> Message-ID: <4A842353.3090502@redhat.com> Andrew Haley wrote: > I've bumped the branch to 1.6, and now want to bump the trunk. I think > the version on the trunk should be something like "1.7pre", since it's > after 1.6 branched but before 1.7 branched. > I agree with this. Question: When 1.7 is branched, is the repo tagged with 1.7 or 1.8pre? Or is it tagged with 1.7 right before the new 1.7 branch is created? > gcc trunk immediately becomes 4.5.0 (experimental) once the 4.4 branch > has been made. I think this is a sensible thing to imitate. > Cheers, Lillian From aph at redhat.com Thu Aug 13 07:37:14 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 15:37:14 +0100 Subject: Version number on trunk In-Reply-To: <4A842353.3090502@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> Message-ID: <4A84251A.2030501@redhat.com> Lillian Angel wrote: > Andrew Haley wrote: >> I've bumped the branch to 1.6, and now want to bump the trunk. I think >> the version on the trunk should be something like "1.7pre", since it's >> after 1.6 branched but before 1.7 branched. > > I agree with this. > > Question: When 1.7 is branched, is the repo tagged with 1.7 or 1.8pre? > Or is it tagged with 1.7 right before the new 1.7 branch is created? The trunk should be version 1.8pre immediately after 1.7 branches. Andrew. From langel at redhat.com Thu Aug 13 07:41:33 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 13 Aug 2009 10:41:33 -0400 Subject: Version number on trunk In-Reply-To: <4A84251A.2030501@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> Message-ID: <4A84261D.9060906@redhat.com> Andrew Haley wrote: > Lillian Angel wrote: > >> Andrew Haley wrote: >> >>> I've bumped the branch to 1.6, and now want to bump the trunk. I think >>> the version on the trunk should be something like "1.7pre", since it's >>> after 1.6 branched but before 1.7 branched. >>> >> I agree with this. >> >> Question: When 1.7 is branched, is the repo tagged with 1.7 or 1.8pre? >> Or is it tagged with 1.7 right before the new 1.7 branch is created? >> > > The trunk should be version 1.8pre immediately after 1.7 branches. ok, so the repo will always be tagged with IcedTea6-X.Ypre Thanks for clarifying, Lillian From Edward.Nevill at arm.com Thu Aug 13 03:49:52 2009 From: Edward.Nevill at arm.com (Edward Nevill) Date: Thu, 13 Aug 2009 11:49:52 +0100 Subject: ARM interpreter In-Reply-To: <20090813103429.GB3770@redhat.com> References: <001601ca1b3a$d020bce0$706236a0$@com><20090812120528.GH3241@redhat.com><000001ca1bf2$7b8ec470$72ac4d50$@com> <4A83D975.7050602@redhat.com><20090813094211.GA3770@redhat.com> <4A83E17F.8060904@redhat.com> <20090813103429.GB3770@redhat.com> Message-ID: <96016C56224DF441A7F553FDC19DA976B0F320@ZIPPY.Emea.Arm.com> OK. I will make an initial checkin, based on the diffs I posted on camswl.com (I will post the patch here before making the actual checkin). I will make the changes raised by Gary, re comments and ifdefs I will leave the hardcoded constants. Gary: If it is OK I will leave the defined(PRODUCT) for the moment, until the offsets are generated properly. Then the defined(PRODUCT) can be removed. I expect to have the patches ready to submit Tues/Weds next week. Please be patient if this takes slightly longer than you would like. It is the first time I have submitted patches to IcedTea and I want to make sure I get it right. Until yesterday I had never build IcedTea on its own (I had only built it as part of the OpenJDK Debian package), so there is some learning curve. Regards, Ed. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. From aph at redhat.com Thu Aug 13 07:57:22 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 15:57:22 +0100 Subject: Version number on trunk In-Reply-To: <4A84261D.9060906@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> <4A84261D.9060906@redhat.com> Message-ID: <4A8429D2.7080302@redhat.com> Lillian Angel wrote: > Andrew Haley wrote: >> Lillian Angel wrote: >> >>> Andrew Haley wrote: >>> >>>> I've bumped the branch to 1.6, and now want to bump the trunk. I think >>>> the version on the trunk should be something like "1.7pre", since it's >>>> after 1.6 branched but before 1.7 branched. >>>> >>> I agree with this. >>> >>> Question: When 1.7 is branched, is the repo tagged with 1.7 or 1.8pre? >>> Or is it tagged with 1.7 right before the new 1.7 branch is created? >>> >> >> The trunk should be version 1.8pre immediately after 1.7 branches. > > > ok, so the repo will always be tagged with IcedTea6-X.Ypre The trunk repo, yes. Unfortunately, I can't tag the 1.6 branchpoint. I've done so in my local repo, but when I push the change, $ hg push pushing to ssh://icedtea.classpath.org/hg/icedtea6 searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files remote: error: incoming.notify hook raised an exception: cannot concatenate 'str' and 'NoneType' objects I guess this is a bug on the server side. Andrew. From langel at redhat.com Thu Aug 13 07:59:04 2009 From: langel at redhat.com (Lillian Angel) Date: Thu, 13 Aug 2009 10:59:04 -0400 Subject: Version number on trunk In-Reply-To: <4A8429D2.7080302@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> <4A84261D.9060906@redhat.com> <4A8429D2.7080302@redhat.com> Message-ID: <4A842A38.3080804@redhat.com> Andrew Haley wrote: > Lillian Angel wrote: > >> Andrew Haley wrote: >> >>> Lillian Angel wrote: >>> >>> >>>> Andrew Haley wrote: >>>> >>>> >>>>> I've bumped the branch to 1.6, and now want to bump the trunk. I think >>>>> the version on the trunk should be something like "1.7pre", since it's >>>>> after 1.6 branched but before 1.7 branched. >>>>> >>>>> >>>> I agree with this. >>>> >>>> Question: When 1.7 is branched, is the repo tagged with 1.7 or 1.8pre? >>>> Or is it tagged with 1.7 right before the new 1.7 branch is created? >>>> >>>> >>> The trunk should be version 1.8pre immediately after 1.7 branches. >>> >> ok, so the repo will always be tagged with IcedTea6-X.Ypre >> > > The trunk repo, yes. > > Unfortunately, I can't tag the 1.6 branchpoint. I've done so in my local > repo, but when I push the change, > > $ hg push > pushing to ssh://icedtea.classpath.org/hg/icedtea6 > searching for changes > remote: adding changesets > remote: adding manifests > remote: adding file changes > remote: added 1 changesets with 1 changes to 1 files > remote: error: incoming.notify hook raised an exception: cannot concatenate 'str' and 'NoneType' objects > > I guess this is a bug on the server side. As far as I know, the changes still go through with this error. http://icedtea.classpath.org/hg/icedtea6/ Lillian From aph at redhat.com Thu Aug 13 07:59:42 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 15:59:42 +0100 Subject: Version number on trunk In-Reply-To: <4A842A38.3080804@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> <4A84261D.9060906@redhat.com> <4A8429D2.7080302@redhat.com> <4A842A38.3080804@redhat.com> Message-ID: <4A842A5E.6020707@redhat.com> Lillian Angel wrote: >> I guess this is a bug on the server side. > > > As far as I know, the changes still go through with this error. > http://icedtea.classpath.org/hg/icedtea6/ Ah, I see. Thanks! Andrew. From mark at klomp.org Thu Aug 13 08:49:33 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 17:49:33 +0200 Subject: Version number on trunk In-Reply-To: <4A842A5E.6020707@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> <4A84261D.9060906@redhat.com> <4A8429D2.7080302@redhat.com> <4A842A38.3080804@redhat.com> <4A842A5E.6020707@redhat.com> Message-ID: <1250178573.2798.230.camel@springer.wildebeest.org> On Thu, 2009-08-13 at 15:59 +0100, Andrew Haley wrote: > Lillian Angel wrote: > > >> I guess this is a bug on the server side. > > > > As far as I know, the changes still go through with this error. > > http://icedtea.classpath.org/hg/icedtea6/ > > Ah, I see. Thanks! Yes they go through. But no notification is being send that it did. And you are left with that lame error message :{ The repo on the server has the notify extension installed, so that an email is being send whenever a change to the repo happens. http://mercurial.selenic.com/wiki/NotifyExtension Something tries to sanitize the incoming commit to produce those emails. Most likely you don't have a valid username set in your hgrc. The script expects each commit to have at least an author with a valid email address (and possible full name). Please setup your ~/.hgrc (or icedtea repo .hg/hgrc) to contain your full name and email address, something like: [ui] username = Mark Wielaard That makes the email notifications work nicely. And makes sure each commit from you has a fully identified author associated with it. More background: http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html#sec:tour-basic:username Cheers, Mark From aph at redhat.com Thu Aug 13 08:56:43 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 16:56:43 +0100 Subject: Version number on trunk In-Reply-To: <1250178573.2798.230.camel@springer.wildebeest.org> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> <4A84261D.9060906@redhat.com> <4A8429D2.7080302@redhat.com> <4A842A38.3080804@redhat.com> <4A842A5E.6020707@redhat.com> <1250178573.2798.230.camel@springer.wildebeest.org> Message-ID: <4A8437BB.10909@redhat.com> Mark Wielaard wrote: > On Thu, 2009-08-13 at 15:59 +0100, Andrew Haley wrote: >> Lillian Angel wrote: >> >>>> I guess this is a bug on the server side. >>> As far as I know, the changes still go through with this error. >>> http://icedtea.classpath.org/hg/icedtea6/ >> Ah, I see. Thanks! > > Yes they go through. But no notification is being send that it did. > And you are left with that lame error message :{ > > The repo on the server has the notify extension installed, so that an > email is being send whenever a change to the repo happens. > http://mercurial.selenic.com/wiki/NotifyExtension > Something tries to sanitize the incoming commit to produce those emails. > Most likely you don't have a valid username set in your hgrc. > The script expects each commit to have at least an author with a valid > email address (and possible full name). > > Please setup your ~/.hgrc (or icedtea repo .hg/hgrc) to contain your > full name and email address, something like: > > [ui] > username = Mark Wielaard In other words, the exact opposite of what Sun require. I don't care either way, I just wish you'd agree. Andrew. From dbhole at redhat.com Thu Aug 13 09:01:49 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 13 Aug 2009 12:01:49 -0400 Subject: Proposed IcedTea 6 release In-Reply-To: <4A82F1F1.8060509@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A82D92D.3050809@redhat.com> <4A82F1F1.8060509@redhat.com> Message-ID: <20090813160149.GA23290@redhat.com> * Andrew Haley [2009-08-12 12:47]: > Andrew Haley wrote: > > > So, I think this is a good time to cut the branch. Is that OK with > > everyone? > > The release branch is open for checkins: > http://icedtea.classpath.org/hg/release/icedtea6-1.6/ > > Please post all patches for the release branch to this list. > There are a couple of things for plugin/webstart I would like to see go in for 1.6. I will try and get them done asap and will post the patches here. Deepak > Andrew. From aph at redhat.com Thu Aug 13 09:02:30 2009 From: aph at redhat.com (Andrew Haley) Date: Thu, 13 Aug 2009 17:02:30 +0100 Subject: Proposed IcedTea 6 release In-Reply-To: <20090813160149.GA23290@redhat.com> References: <4A7B413C.8010109@redhat.com> <4A82D92D.3050809@redhat.com> <4A82F1F1.8060509@redhat.com> <20090813160149.GA23290@redhat.com> Message-ID: <4A843916.3090107@redhat.com> Deepak Bhole wrote: > * Andrew Haley [2009-08-12 12:47]: >> Andrew Haley wrote: >> >>> So, I think this is a good time to cut the branch. Is that OK with >>> everyone? >> The release branch is open for checkins: >> http://icedtea.classpath.org/hg/release/icedtea6-1.6/ >> >> Please post all patches for the release branch to this list. >> > > There are a couple of things for plugin/webstart I would like to see go in for > 1.6. I will try and get them done asap and will post the patches here. Don't panic. There are a few jtreg failures, and there's plenty of testing to do before it'll be ready to release. Andrew. From mark at klomp.org Thu Aug 13 09:05:20 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 18:05:20 +0200 Subject: Version number on trunk In-Reply-To: <4A8437BB.10909@redhat.com> References: <4A842299.70509@redhat.com> <4A842353.3090502@redhat.com> <4A84251A.2030501@redhat.com> <4A84261D.9060906@redhat.com> <4A8429D2.7080302@redhat.com> <4A842A38.3080804@redhat.com> <4A842A5E.6020707@redhat.com> <1250178573.2798.230.camel@springer.wildebeest.org> <4A8437BB.10909@redhat.com> Message-ID: <1250179520.2798.234.camel@springer.wildebeest.org> On Thu, 2009-08-13 at 16:56 +0100, Andrew Haley wrote: > The repo on the server has the notify extension installed, so that an > > email is being send whenever a change to the repo happens. > > http://mercurial.selenic.com/wiki/NotifyExtension > > Something tries to sanitize the incoming commit to produce those emails. > > Most likely you don't have a valid username set in your hgrc. > > The script expects each commit to have at least an author with a valid > > email address (and possible full name). > > > > Please setup your ~/.hgrc (or icedtea repo .hg/hgrc) to contain your > > full name and email address, something like: > > > > [ui] > > username = Mark Wielaard > > In other words, the exact opposite of what Sun require. > > I don't care either way, I just wish you'd agree. Agreed :) It is a little strange that they require something opposite to the standard mercurial convention. Currently we cannot adopt Sun's convention since we don't have access to their server script nor user database (they were never published). So there is no way to convert the names they use to standard authors that make sense to the rest of the world. It would be nice if Sun would accept the standard author setup for non-Sun engineers. Cheers, Mark From mark at klomp.org Thu Aug 13 09:06:52 2009 From: mark at klomp.org (Mark Wielaard) Date: Thu, 13 Aug 2009 18:06:52 +0200 Subject: Some 1.6 build issues (--with-additional-vms=zero, --enable-visual-vm, --enable-npplugin) In-Reply-To: <4A8404E0.6040003@ubuntu.com> References: <1250161443.2798.194.camel@springer.wildebeest.org> <4A83F146.4000700@ubuntu.com> <1250168624.2798.207.camel@springer.wildebeest.org> <4A83FA5C.501@ubuntu.com> <1250170746.2798.210.camel@springer.wildebeest.org> <4A8404E0.6040003@ubuntu.com> Message-ID: <1250179613.2798.236.camel@springer.wildebeest.org> On Thu, 2009-08-13 at 14:19 +0200, Matthias Klose wrote: > > Thanks. What happens if you don't add the --with-*-src-zip options? > > the build will fail, because the buildd doesn't have network access. OK. Then I assume --with-additional-vms=zero is broken unless you add extra --with-*-src configure options. Need to look into why. Cheers, Mark From dbhole at redhat.com Thu Aug 13 11:25:20 2009 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 13 Aug 2009 14:25:20 -0400 Subject: Patch to allow sharing of classloader between extentions Message-ID: <20090813182519.GB23290@redhat.com> JNLP files allow loading of child jnlps via the extension element. Currently, the classloader used by these child jnlps is different than the one used by the parent. When a resource request comes in, the loader and its children are searched. In theory this should work, but many applets don't like it. For example: http://javafx.com/samples/SwirlingSquares/webstart/SwirlingSquares.jnlp Attached patch makes it so that the same loader is shared. This is not an ideal fix, but more of a workaround to let other applets work. It does not break any existing loading mechanism AFAIK, and allows a set of applets that didn't work before, to work. Thoughts? Cheers, Deepak -------------- next part -------------- A non-text attachment was scrubbed... Name: extension-loader.patch Type: text/x-patch Size: 7135 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090813/145797ab/extension-loader.patch From Joe.Darcy at Sun.COM Thu Aug 13 17:36:36 2009 From: Joe.Darcy at Sun.COM (Joe Darcy) Date: Thu, 13 Aug 2009 17:36:36 -0700 Subject: Bugids already used in this repository (Re: [FOR REVIEW] hs14 merge for OpenJDK6) In-Reply-To: <17c6771e0908051639h4c9a9c79vfdc4f6048d17cca8@mail.gmail.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <4A73E58F.9020502@sun.com> <4A751861.2090901@sun.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> <4A78E151.9070304@sun.com> <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> <4A79F131.7040105@sun.com> <17c6771e0908051639h4c9a9c79vfdc4f6048d17cca8@mail.gmail.com> Message-ID: <4A84B194.1070108@sun.com> Andrew John Hughes wrote: > 2009/8/5 Tim Bell : > >> Andrew John Hughes wrote: >> >> >>> Thanks Tim, that seems to have fixed the permissions issue. >>> >> Good. >> >> >>> There now seems to be an issue with jcheck, as the merge causes some >>> bugids to be repeated: >>> >> Hmmm - how did these changesets come in through two different paths? >> >> >>> pushing to ssh://hg.openjdk.java.net/jdk6/jdk6-gate/hotspot >>> searching for changes >>> remote: adding changesets >>> remote: adding manifests >>> remote: adding file changes >>> remote: added 555 changesets with 4771 changes to 1453 files >>> remote: >>> remote: > Changeset: 100:d821d920b465 >>> remote: > Author: kvn >>> remote: > Date: 2008-03-11 11:04 >>> remote: > >>> remote: > 6623167: C2 crashed in StoreCMNode::Value >>> remote: > Summary: C2 crashed in StoreCMNode::Value because >>> n->in(MemNode::OopStore) is 0. >>> remote: > Reviewed-by: rasbold, never >>> remote: >>> remote: Bugid 6623167 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 104:2c106685d6d0 >>> remote: > Author: dcubed >>> remote: > Date: 2008-03-12 18:06 >>> remote: > >>> remote: > 6497639: 4/3 Profiling Swing application caused JVM crash >>> remote: > Summary: Make RedefineClasses() interoperate better with >>> class sharing. >>> remote: > Reviewed-by: sspitsyn, jmasa >>> remote: >>> remote: Bugid 6497639 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 105:d8b3ef7ee3e5 >>> remote: > Author: dcubed >>> remote: > Date: 2008-03-12 18:07 >>> remote: > >>> remote: > 6599425: 4/3 OopMapCache::lookup() can cause later crash or >>> assert() failure >>> remote: > Summary: Add should_not_be_cached() to markOop and methodOop >>> and query that status inOopMapCache::lookup() >>> remote: > Reviewed-by: coleenp, sspitsyn, jmasa >>> remote: >>> remote: Bugid 6599425 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 240:65fe2bd88839 >>> remote: > Author: never >>> remote: > Date: 2008-06-05 21:44 >>> remote: > >>> remote: > 6614100: EXCEPTION_ACCESS_VIOLATION while running Eclipse >>> with 1.6.0_05-ea >>> remote: > Reviewed-by: kvn, jrose, rasbold >>> remote: >>> remote: Bugid 6614100 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 286:3e82d72933d0 >>> remote: > Author: xlu >>> remote: > Date: 2008-06-26 14:15 >>> remote: > >>> remote: > 6718830: Hotspot fails to build with gcc 4.3 >>> remote: > Summary: Fixed linux make file and couple adlc code to meet >>> the changes of gcc 4.3 >>> remote: > Reviewed-by: kamg, igor >>> remote: >>> remote: Bugid 6718830 already used in this repository, in revision 32 >>> remote: >>> remote: > Changeset: 289:551f4309f476 >>> remote: > Author: ohair >>> remote: > Date: 2008-07-03 10:46 >>> remote: > >>> remote: > 6695777: Queens.class should be built from source, not put >>> in source repo >>> remote: > Reviewed-by: kvn >>> remote: >>> remote: Bugid 6695777 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 314:54499b980c23 >>> remote: > Author: swamyv >>> remote: > Date: 2008-07-29 13:54 >>> remote: > >>> remote: > 6710791: Remove files or build from source:maf-1_0.jar, jlfg-1_0.jar >>> remote: > Summary: Removed maf-1_0.jar and jlfg-1_0.jar files. >>> remote: > Reviewed-by: poonam, jjh >>> remote: >>> remote: Bugid 6710791 already used in this repository, in revision 20 >>> remote: >>> remote: > Changeset: 360:fa4d1d240383 >>> remote: > Author: never >>> remote: > Date: 2008-08-26 15:49 >>> remote: > >>> remote: > 6741642: bad enum definition in ciTypeFlow.hpp >>> remote: > Reviewed-by: rasbold, martin >>> remote: > Contributed-by: doko at ubuntu.com >>> remote: >>> remote: Bugid 6741642 already used in this repository, in revision 22 >>> remote: >>> remote: > Changeset: 589:748572b86af6 >>> remote: > Author: never >>> remote: > Date: 2009-04-07 14:46 >>> remote: > >>> remote: > 6636360: compiler/6595044/Main.java test fails with 64bit >>> java on solaris-sparcv9 with SIGSEGV >>> remote: > Reviewed-by: kvn, twisti >>> remote: >>> remote: Bugid 6636360 already used in this repository, in revision 29 >>> remote: >>> remote: abort: pretxnchangegroup.0.jcheck hook failed >>> remote: transaction abort! >>> remote: rollback completed >>> abort: unexpected response: empty string >>> >>> Is there a way of getting it to ignore these for this one push? I >>> don't know of a way to just pull out these nine changesets from the >>> 555 waiting to go... >>> >> I think they would need to be added to the jcheck whitelist for all time- >> but that is more of a question for Mark or Kelly. >> >> Tim >> >> > > The early revisions (20, 32) are from OpenJDK6 which was rebased to > allow HotSpot patches to be applied on top. So what happened here is > that, as the fixes were already applied to OpenJDK6, the new > changesets pulled in by the merge will be no-ops but still exist to > keep the change history accurate. > > I think we just need a way of disabling this check. OpenJDK6 already > has whitespace and comment checks turned to lax. See .jcheck: > http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/0282bf49b0f6. There > may already be an option for this bugid check too, but I have no idea > what the format of that file is. > Andrew, can you please try your push again? I chatted with Mark and the OpenJDK 6 HotSpot Mercurial repository should be configured to do lax checking on the bug ids. Thanks, -Joe From mvfranz at gmail.com Thu Aug 13 18:36:19 2009 From: mvfranz at gmail.com (Michael Franz) Date: Thu, 13 Aug 2009 21:36:19 -0400 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: <17c6771e0908130437h8337153k4d0d1db23580fcdf@mail.gmail.com> References: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> <17c6771e0908130437h8337153k4d0d1db23580fcdf@mail.gmail.com> Message-ID: Hi, Here is the output from my Fedora 10 build with the missing java.util.Scanner. /home/mfranz/linux/icedtea-1.11/bootstrap/jdk1.6.0/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -client -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -jar /home/mfranz/linux/icedtea-1.11/openjdk-ecj/build/linux-i586/btjars/charsetmapping.jar ../../tools/CharsetMapping /home/mfranz/linux/icedtea-1.11/generated/sun/nio/cs/ext euctw \ ../../tools/src/build/tools/charsetmapping/GenerateEUC_TW.java Exception in thread "main" java.lang.NoClassDefFoundError: java.util.Scanner at build.tools.charsetmapping.GenerateEUC_TW.getCopyright(GenerateEUC_TW.java:47) at build.tools.charsetmapping.GenerateEUC_TW.genEUC_TW(GenerateEUC_TW.java:43) at build.tools.charsetmapping.Main.main(Main.java:48) make[5]: *** [/home/mfranz/linux/icedtea-1.11/generated/sun/nio/cs/ext/IBM037.java] Error 1 make[5]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make/sun/nio' make[4]: *** [all] Error 1 make[4]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make/sun' make[3]: *** [all] Error 1 make[3]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make' make[2]: *** [jdk-build] Error 2 make[2]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj' make[1]: *** [build_product_image] Error 2 make[1]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj' make: *** [stamps/icedtea-ecj.stamp] Error 2 The output from configure for the Scanner check is here: checking if java.util.Scanner is missing... Exception in thread "main" java.lang.NoClassDefFoundError: java.util.Scanner at Test.main(Test.java:7) no checking if java.util.Scanner exhibits Classpath bug 40630... yes I wonder if the Classpath bug is over-riding the Scanner check. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090813/6198705a/attachment.html From gbenson at redhat.com Fri Aug 14 01:17:18 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 14 Aug 2009 09:17:18 +0100 Subject: Patch to allow sharing of classloader between extentions In-Reply-To: <20090813182519.GB23290@redhat.com> References: <20090813182519.GB23290@redhat.com> Message-ID: <20090814081717.GA3331@redhat.com> Deepak Bhole wrote: > JNLP files allow loading of child jnlps via the extension element. > Currently, the classloader used by these child jnlps is different > than the one used by the parent. When a resource request comes in, > the loader and its children are searched. In theory this should > work, but many applets don't like it. For example: > > http://javafx.com/samples/SwirlingSquares/webstart/SwirlingSquares.jnlp > > Attached patch makes it so that the same loader is shared. This is > not an ideal fix, but more of a workaround to let other applets > work. It does not break any existing loading mechanism AFAIK, and > allows a set of applets that didn't work before, to work. > > Thoughts? Does it allow the classes of one applet to see the classes of another? Cheers, Gary -- http://gbenson.net/ From gbenson at redhat.com Fri Aug 14 03:17:03 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 14 Aug 2009 10:17:03 +0000 Subject: changeset in /hg/icedtea6: 2009-08-14 Gary Benson changeset 9f0b5de9a8eb in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9f0b5de9a8eb description: 2009-08-14 Gary Benson * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::CreateStoreLastJavaSP): Removed. (SharkFunction::set_last_Java_frame): Likewise. (SharkFunction::reset_last_Java_frame): Likewise. (SharkFunction::CreateGetVMResult): Likewise. (SharkFunction::pending_exception_address): Likewise. (SharkFunction::CreateGetPendingException): Likewise. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::pending_exception_address): New method. (SharkTopLevelBlock::get_pending_exception): Likewise. (SharkTopLevelBlock::clear_pending_exception): Likewise. (SharkTopLevelBlock::set_last_Java_frame): Likewise. (SharkTopLevelBlock::reset_last_Java_frame): Likewise. (SharkTopLevelBlock::get_vm_result): Likewise. (SharkTopLevelBlock::call_vm): Updated. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::zero_check_value): Updated. (SharkTopLevelBlock::check_bounds): Likewise. (SharkTopLevelBlock::check_pending_exception): Likewise. (SharkTopLevelBlock::handle_return): Likewise. (SharkTopLevelBlock::do_new): Likewise. (SharkTopLevelBlock::do_newarray): Likewise. (SharkTopLevelBlock::do_anewarray): Likewise. (SharkTopLevelBlock::do_multianewarray): Likewise. diffstat: 4 files changed, 105 insertions(+), 71 deletions(-) ChangeLog | 33 +++++++++ ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 53 -------------- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 35 ++++----- ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 55 ++++++++++++++- diffs (314 lines): diff -r 172073e30a2a -r 9f0b5de9a8eb ChangeLog --- a/ChangeLog Thu Aug 13 16:24:01 2009 +0100 +++ b/ChangeLog Fri Aug 14 06:12:14 2009 -0400 @@ -1,3 +1,36 @@ 2009-08-13 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::CreateStoreLastJavaSP): Removed. + (SharkFunction::set_last_Java_frame): Likewise. + (SharkFunction::reset_last_Java_frame): Likewise. + (SharkFunction::CreateGetVMResult): Likewise. + (SharkFunction::pending_exception_address): Likewise. + (SharkFunction::CreateGetPendingException): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::pending_exception_address): New method. + (SharkTopLevelBlock::get_pending_exception): Likewise. + (SharkTopLevelBlock::clear_pending_exception): Likewise. + (SharkTopLevelBlock::set_last_Java_frame): Likewise. + (SharkTopLevelBlock::reset_last_Java_frame): Likewise. + (SharkTopLevelBlock::get_vm_result): Likewise. + (SharkTopLevelBlock::call_vm): Updated. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::zero_check_value): Updated. + (SharkTopLevelBlock::check_bounds): Likewise. + (SharkTopLevelBlock::check_pending_exception): Likewise. + (SharkTopLevelBlock::handle_return): Likewise. + (SharkTopLevelBlock::do_new): Likewise. + (SharkTopLevelBlock::do_newarray): Likewise. + (SharkTopLevelBlock::do_anewarray): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + +2009-08-13 Andrew Haley + + * configure.ac (AC_INIT): Bumped version to 1.7pre. + 2009-08-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp diff -r 172073e30a2a -r 9f0b5de9a8eb ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Thu Aug 13 16:24:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Fri Aug 14 06:12:14 2009 -0400 @@ -124,12 +124,11 @@ class SharkFunction : public SharkTarget { return builder()->CreateStore(value, zero_stack_pointer_addr()); } - - private: llvm::LoadInst* CreateLoadZeroFramePointer(const char *name = "") { return builder()->CreateLoad(zero_frame_pointer_addr(), name); } + private: llvm::StoreInst* CreateStoreZeroFramePointer(llvm::Value* value) { return builder()->CreateStore(value, zero_frame_pointer_addr()); @@ -235,56 +234,6 @@ class SharkFunction : public SharkTarget "displaced_header_addr"); } - // VM interface - private: - llvm::StoreInst* CreateStoreLastJavaSP(llvm::Value* value) const - { - return builder()->CreateStore( - value, - builder()->CreateAddressOfStructEntry( - thread(), JavaThread::last_Java_sp_offset(), - llvm::PointerType::getUnqual(SharkType::intptr_type()), - "last_Java_sp_addr")); - } - - public: - void set_last_Java_frame() - { - CreateStoreLastJavaSP(CreateLoadZeroFramePointer()); - } - void reset_last_Java_frame() - { - CreateStoreLastJavaSP(LLVMValue::intptr_constant(0)); - } - - public: - llvm::LoadInst* CreateGetVMResult() const - { - llvm::Value *addr = builder()->CreateAddressOfStructEntry( - thread(), JavaThread::vm_result_offset(), - llvm::PointerType::getUnqual(SharkType::jobject_type()), - "vm_result_addr"); - llvm::LoadInst *result = builder()->CreateLoad(addr, "vm_result"); - builder()->CreateStore(LLVMValue::null(), addr); - return result; - } - - public: - llvm::Value* pending_exception_address() const - { - return builder()->CreateAddressOfStructEntry( - thread(), Thread::pending_exception_offset(), - llvm::PointerType::getUnqual(SharkType::jobject_type()), - "pending_exception_addr"); - } - llvm::LoadInst* CreateGetPendingException() const - { - llvm::Value *addr = pending_exception_address(); - llvm::LoadInst *result = builder()->CreateLoad(addr, "pending_exception"); - builder()->CreateStore(LLVMValue::null(), addr); - return result; - } - // Deferred zero checks public: void add_deferred_zero_check(SharkTopLevelBlock* block, diff -r 172073e30a2a -r 9f0b5de9a8eb ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Aug 13 16:24:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Aug 14 06:12:14 2009 -0400 @@ -334,7 +334,10 @@ void SharkTopLevelBlock::zero_check_valu else { builder()->CreateUnimplemented(__FILE__, __LINE__); } - handle_exception(function()->CreateGetPendingException(), EX_CHECK_FULL); + + Value *pending_exception = get_pending_exception(); + clear_pending_exception(); + handle_exception(pending_exception, EX_CHECK_FULL); } void SharkTopLevelBlock::check_bounds(SharkValue* array, SharkValue* index) @@ -350,6 +353,7 @@ void SharkTopLevelBlock::check_bounds(Sh builder()->SetInsertPoint(out_of_bounds); SharkState *saved_state = current_state()->copy(); + call_vm( builder()->throw_ArrayIndexOutOfBoundsException(), builder()->CreateIntToPtr( @@ -358,7 +362,11 @@ void SharkTopLevelBlock::check_bounds(Sh LLVMValue::jint_constant(__LINE__), index->jint_value(), EX_CHECK_NONE); - handle_exception(function()->CreateGetPendingException(), EX_CHECK_FULL); + + Value *pending_exception = get_pending_exception(); + clear_pending_exception(); + handle_exception(pending_exception, EX_CHECK_FULL); + set_current_state(saved_state); builder()->SetInsertPoint(in_bounds); @@ -371,16 +379,12 @@ void SharkTopLevelBlock::check_pending_e BasicBlock *exception = function()->CreateBlock("exception"); BasicBlock *no_exception = function()->CreateBlock("no_exception"); - Value *pending_exception_addr = function()->pending_exception_address(); - Value *pending_exception = builder()->CreateLoad( - pending_exception_addr, "pending_exception"); - + Value *pending_exception = get_pending_exception(); builder()->CreateCondBr( builder()->CreateICmpEQ(pending_exception, LLVMValue::null()), no_exception, exception); builder()->SetInsertPoint(exception); - builder()->CreateStore(LLVMValue::null(), pending_exception_addr); SharkState *saved_state = current_state()->copy(); if (action & EAM_MONITOR_FUDGE) { // The top monitor is marked live, but the exception was thrown @@ -389,6 +393,7 @@ void SharkTopLevelBlock::check_pending_e set_num_monitors(num_monitors() - 1); action ^= EAM_MONITOR_FUDGE; } + clear_pending_exception(); handle_exception(pending_exception, action); set_current_state(saved_state); @@ -630,7 +635,7 @@ void SharkTopLevelBlock::handle_return(B } if (exception) { - builder()->CreateStore(exception, function()->pending_exception_address()); + builder()->CreateStore(exception, pending_exception_address()); } Value *result_addr = function()->CreatePopFrame(type2size[type]); @@ -1576,7 +1581,7 @@ void SharkTopLevelBlock::do_new() builder()->new_instance(), LLVMValue::jint_constant(iter()->get_klass_index()), EX_CHECK_FULL); - slow_object = function()->CreateGetVMResult(); + slow_object = get_vm_result(); got_slow = builder()->GetInsertBlock(); // Push the object @@ -1608,10 +1613,8 @@ void SharkTopLevelBlock::do_newarray() pop()->jint_value(), EX_CHECK_FULL); - push(SharkValue::create_generic( - ciArrayKlass::make(ciType::make(type)), - function()->CreateGetVMResult(), - true)); + ciArrayKlass *array_klass = ciArrayKlass::make(ciType::make(type)); + push(SharkValue::create_generic(array_klass, get_vm_result(), true)); } void SharkTopLevelBlock::do_anewarray() @@ -1631,8 +1634,7 @@ void SharkTopLevelBlock::do_anewarray() pop()->jint_value(), EX_CHECK_FULL); - push(SharkValue::create_generic( - array_klass, function()->CreateGetVMResult(), true)); + push(SharkValue::create_generic(array_klass, get_vm_result(), true)); } void SharkTopLevelBlock::do_multianewarray() @@ -1668,8 +1670,7 @@ void SharkTopLevelBlock::do_multianewarr for (int i = 0; i < ndims; i++) pop(); - push(SharkValue::create_generic( - array_klass, function()->CreateGetVMResult(), true)); + push(SharkValue::create_generic(array_klass, get_vm_result(), true)); } void SharkTopLevelBlock::acquire_method_lock() diff -r 172073e30a2a -r 9f0b5de9a8eb ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Aug 13 16:24:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Aug 14 06:12:14 2009 -0400 @@ -240,6 +240,24 @@ class SharkTopLevelBlock : public SharkB SharkState* saved_state, llvm::BasicBlock* continue_block); // Exceptions + private: + llvm::Value* pending_exception_address() const + { + return builder()->CreateAddressOfStructEntry( + thread(), Thread::pending_exception_offset(), + llvm::PointerType::getUnqual(SharkType::jobject_type()), + "pending_exception_addr"); + } + llvm::LoadInst* get_pending_exception() const + { + return builder()->CreateLoad( + pending_exception_address(), "pending_exception"); + } + void clear_pending_exception() const + { + builder()->CreateStore(LLVMValue::null(), pending_exception_address()); + } + public: enum ExceptionActionMask { // The actual bitmasks that things test against EAM_CHECK = 1, // whether to check for pending exceptions @@ -254,6 +272,26 @@ class SharkTopLevelBlock : public SharkB void check_pending_exception(int action); void handle_exception(llvm::Value* exception, int action); + // Frame anchor + private: + void set_last_Java_frame(llvm::Value* value) const + { + builder()->CreateStore( + value, + builder()->CreateAddressOfStructEntry( + thread(), JavaThread::last_Java_sp_offset(), + llvm::PointerType::getUnqual(SharkType::intptr_type()), + "last_Java_sp_addr")); + } + void set_last_Java_frame() const + { + set_last_Java_frame(function()->CreateLoadZeroFramePointer()); + } + void reset_last_Java_frame() const + { + set_last_Java_frame(LLVMValue::intptr_constant(0)); + } + // VM calls private: llvm::CallInst* call_vm(llvm::Value* callee, @@ -262,9 +300,9 @@ class SharkTopLevelBlock : public SharkB int exception_action) { decache_for_VM_call(); - function()->set_last_Java_frame(); + set_last_Java_frame(); llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); - function()->reset_last_Java_frame(); + reset_last_Java_frame(); cache_after_VM_call(); if (exception_action & EAM_CHECK) { check_pending_exception(exception_action); @@ -303,6 +341,19 @@ class SharkTopLevelBlock : public SharkB { llvm::Value *args[] = {thread(), arg1, arg2, arg3}; return call_vm(callee, args, args + 4, exception_action); + } + + // VM call oop return handling + private: + llvm::LoadInst* get_vm_result() const + { + llvm::Value *addr = builder()->CreateAddressOfStructEntry( + thread(), JavaThread::vm_result_offset(), + llvm::PointerType::getUnqual(SharkType::jobject_type()), + "vm_result_addr"); + llvm::LoadInst *result = builder()->CreateLoad(addr, "vm_result"); + builder()->CreateStore(LLVMValue::null(), addr); + return result; } // Synchronization From gbenson at redhat.com Fri Aug 14 03:22:12 2009 From: gbenson at redhat.com (Gary Benson) Date: Fri, 14 Aug 2009 11:22:12 +0100 Subject: Shark Refactoring Message-ID: <20090814102212.GC3331@redhat.com> Hi all, This commit moves some VM interface code from SharkFunction to SharkTopLevelBlock. It also adds a ChangeLog entry for Andrew Haley's previous commit, which was missing one. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 172073e30a2a ChangeLog --- a/ChangeLog Thu Aug 13 16:24:01 2009 +0100 +++ b/ChangeLog Fri Aug 14 06:11:51 2009 -0400 @@ -1,3 +1,36 @@ +2009-08-14 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::CreateStoreLastJavaSP): Removed. + (SharkFunction::set_last_Java_frame): Likewise. + (SharkFunction::reset_last_Java_frame): Likewise. + (SharkFunction::CreateGetVMResult): Likewise. + (SharkFunction::pending_exception_address): Likewise. + (SharkFunction::CreateGetPendingException): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::pending_exception_address): New method. + (SharkTopLevelBlock::get_pending_exception): Likewise. + (SharkTopLevelBlock::clear_pending_exception): Likewise. + (SharkTopLevelBlock::set_last_Java_frame): Likewise. + (SharkTopLevelBlock::reset_last_Java_frame): Likewise. + (SharkTopLevelBlock::get_vm_result): Likewise. + (SharkTopLevelBlock::call_vm): Updated. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::zero_check_value): Updated. + (SharkTopLevelBlock::check_bounds): Likewise. + (SharkTopLevelBlock::check_pending_exception): Likewise. + (SharkTopLevelBlock::handle_return): Likewise. + (SharkTopLevelBlock::do_new): Likewise. + (SharkTopLevelBlock::do_newarray): Likewise. + (SharkTopLevelBlock::do_anewarray): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + +2009-08-13 Andrew Haley + + * configure.ac (AC_INIT): Bumped version to 1.7pre. + 2009-08-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp diff -r 172073e30a2a ports/hotspot/src/share/vm/shark/sharkFunction.hpp --- a/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Thu Aug 13 16:24:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkFunction.hpp Fri Aug 14 06:11:51 2009 -0400 @@ -124,12 +124,11 @@ { return builder()->CreateStore(value, zero_stack_pointer_addr()); } - - private: llvm::LoadInst* CreateLoadZeroFramePointer(const char *name = "") { return builder()->CreateLoad(zero_frame_pointer_addr(), name); } + private: llvm::StoreInst* CreateStoreZeroFramePointer(llvm::Value* value) { return builder()->CreateStore(value, zero_frame_pointer_addr()); @@ -235,56 +234,6 @@ "displaced_header_addr"); } - // VM interface - private: - llvm::StoreInst* CreateStoreLastJavaSP(llvm::Value* value) const - { - return builder()->CreateStore( - value, - builder()->CreateAddressOfStructEntry( - thread(), JavaThread::last_Java_sp_offset(), - llvm::PointerType::getUnqual(SharkType::intptr_type()), - "last_Java_sp_addr")); - } - - public: - void set_last_Java_frame() - { - CreateStoreLastJavaSP(CreateLoadZeroFramePointer()); - } - void reset_last_Java_frame() - { - CreateStoreLastJavaSP(LLVMValue::intptr_constant(0)); - } - - public: - llvm::LoadInst* CreateGetVMResult() const - { - llvm::Value *addr = builder()->CreateAddressOfStructEntry( - thread(), JavaThread::vm_result_offset(), - llvm::PointerType::getUnqual(SharkType::jobject_type()), - "vm_result_addr"); - llvm::LoadInst *result = builder()->CreateLoad(addr, "vm_result"); - builder()->CreateStore(LLVMValue::null(), addr); - return result; - } - - public: - llvm::Value* pending_exception_address() const - { - return builder()->CreateAddressOfStructEntry( - thread(), Thread::pending_exception_offset(), - llvm::PointerType::getUnqual(SharkType::jobject_type()), - "pending_exception_addr"); - } - llvm::LoadInst* CreateGetPendingException() const - { - llvm::Value *addr = pending_exception_address(); - llvm::LoadInst *result = builder()->CreateLoad(addr, "pending_exception"); - builder()->CreateStore(LLVMValue::null(), addr); - return result; - } - // Deferred zero checks public: void add_deferred_zero_check(SharkTopLevelBlock* block, diff -r 172073e30a2a ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Aug 13 16:24:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Aug 14 06:11:51 2009 -0400 @@ -334,7 +334,10 @@ else { builder()->CreateUnimplemented(__FILE__, __LINE__); } - handle_exception(function()->CreateGetPendingException(), EX_CHECK_FULL); + + Value *pending_exception = get_pending_exception(); + clear_pending_exception(); + handle_exception(pending_exception, EX_CHECK_FULL); } void SharkTopLevelBlock::check_bounds(SharkValue* array, SharkValue* index) @@ -350,6 +353,7 @@ builder()->SetInsertPoint(out_of_bounds); SharkState *saved_state = current_state()->copy(); + call_vm( builder()->throw_ArrayIndexOutOfBoundsException(), builder()->CreateIntToPtr( @@ -358,7 +362,11 @@ LLVMValue::jint_constant(__LINE__), index->jint_value(), EX_CHECK_NONE); - handle_exception(function()->CreateGetPendingException(), EX_CHECK_FULL); + + Value *pending_exception = get_pending_exception(); + clear_pending_exception(); + handle_exception(pending_exception, EX_CHECK_FULL); + set_current_state(saved_state); builder()->SetInsertPoint(in_bounds); @@ -371,16 +379,12 @@ BasicBlock *exception = function()->CreateBlock("exception"); BasicBlock *no_exception = function()->CreateBlock("no_exception"); - Value *pending_exception_addr = function()->pending_exception_address(); - Value *pending_exception = builder()->CreateLoad( - pending_exception_addr, "pending_exception"); - + Value *pending_exception = get_pending_exception(); builder()->CreateCondBr( builder()->CreateICmpEQ(pending_exception, LLVMValue::null()), no_exception, exception); builder()->SetInsertPoint(exception); - builder()->CreateStore(LLVMValue::null(), pending_exception_addr); SharkState *saved_state = current_state()->copy(); if (action & EAM_MONITOR_FUDGE) { // The top monitor is marked live, but the exception was thrown @@ -389,6 +393,7 @@ set_num_monitors(num_monitors() - 1); action ^= EAM_MONITOR_FUDGE; } + clear_pending_exception(); handle_exception(pending_exception, action); set_current_state(saved_state); @@ -630,7 +635,7 @@ } if (exception) { - builder()->CreateStore(exception, function()->pending_exception_address()); + builder()->CreateStore(exception, pending_exception_address()); } Value *result_addr = function()->CreatePopFrame(type2size[type]); @@ -1576,7 +1581,7 @@ builder()->new_instance(), LLVMValue::jint_constant(iter()->get_klass_index()), EX_CHECK_FULL); - slow_object = function()->CreateGetVMResult(); + slow_object = get_vm_result(); got_slow = builder()->GetInsertBlock(); // Push the object @@ -1608,10 +1613,8 @@ pop()->jint_value(), EX_CHECK_FULL); - push(SharkValue::create_generic( - ciArrayKlass::make(ciType::make(type)), - function()->CreateGetVMResult(), - true)); + ciArrayKlass *array_klass = ciArrayKlass::make(ciType::make(type)); + push(SharkValue::create_generic(array_klass, get_vm_result(), true)); } void SharkTopLevelBlock::do_anewarray() @@ -1631,8 +1634,7 @@ pop()->jint_value(), EX_CHECK_FULL); - push(SharkValue::create_generic( - array_klass, function()->CreateGetVMResult(), true)); + push(SharkValue::create_generic(array_klass, get_vm_result(), true)); } void SharkTopLevelBlock::do_multianewarray() @@ -1668,8 +1670,7 @@ for (int i = 0; i < ndims; i++) pop(); - push(SharkValue::create_generic( - array_klass, function()->CreateGetVMResult(), true)); + push(SharkValue::create_generic(array_klass, get_vm_result(), true)); } void SharkTopLevelBlock::acquire_method_lock() diff -r 172073e30a2a ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp --- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Thu Aug 13 16:24:01 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Aug 14 06:11:51 2009 -0400 @@ -240,6 +240,24 @@ SharkState* saved_state, llvm::BasicBlock* continue_block); // Exceptions + private: + llvm::Value* pending_exception_address() const + { + return builder()->CreateAddressOfStructEntry( + thread(), Thread::pending_exception_offset(), + llvm::PointerType::getUnqual(SharkType::jobject_type()), + "pending_exception_addr"); + } + llvm::LoadInst* get_pending_exception() const + { + return builder()->CreateLoad( + pending_exception_address(), "pending_exception"); + } + void clear_pending_exception() const + { + builder()->CreateStore(LLVMValue::null(), pending_exception_address()); + } + public: enum ExceptionActionMask { // The actual bitmasks that things test against EAM_CHECK = 1, // whether to check for pending exceptions @@ -254,6 +272,26 @@ void check_pending_exception(int action); void handle_exception(llvm::Value* exception, int action); + // Frame anchor + private: + void set_last_Java_frame(llvm::Value* value) const + { + builder()->CreateStore( + value, + builder()->CreateAddressOfStructEntry( + thread(), JavaThread::last_Java_sp_offset(), + llvm::PointerType::getUnqual(SharkType::intptr_type()), + "last_Java_sp_addr")); + } + void set_last_Java_frame() const + { + set_last_Java_frame(function()->CreateLoadZeroFramePointer()); + } + void reset_last_Java_frame() const + { + set_last_Java_frame(LLVMValue::intptr_constant(0)); + } + // VM calls private: llvm::CallInst* call_vm(llvm::Value* callee, @@ -262,9 +300,9 @@ int exception_action) { decache_for_VM_call(); - function()->set_last_Java_frame(); + set_last_Java_frame(); llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end); - function()->reset_last_Java_frame(); + reset_last_Java_frame(); cache_after_VM_call(); if (exception_action & EAM_CHECK) { check_pending_exception(exception_action); @@ -303,6 +341,19 @@ { llvm::Value *args[] = {thread(), arg1, arg2, arg3}; return call_vm(callee, args, args + 4, exception_action); + } + + // VM call oop return handling + private: + llvm::LoadInst* get_vm_result() const + { + llvm::Value *addr = builder()->CreateAddressOfStructEntry( + thread(), JavaThread::vm_result_offset(), + llvm::PointerType::getUnqual(SharkType::jobject_type()), + "vm_result_addr"); + llvm::LoadInst *result = builder()->CreateLoad(addr, "vm_result"); + builder()->CreateStore(LLVMValue::null(), addr); + return result; } // Synchronization From gnu_andrew at member.fsf.org Fri Aug 14 05:00:13 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 14 Aug 2009 13:00:13 +0100 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: References: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> <17c6771e0908130437h8337153k4d0d1db23580fcdf@mail.gmail.com> Message-ID: <17c6771e0908140500n4d3a515epdafb8a9dee07fbd0@mail.gmail.com> 2009/8/14 Michael Franz : > Hi, > > Here is the output from my Fedora 10 build with the missing > java.util.Scanner. > > /home/mfranz/linux/icedtea-1.11/bootstrap/jdk1.6.0/bin/java > -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -client > -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -jar > /home/mfranz/linux/icedtea-1.11/openjdk-ecj/build/linux-i586/btjars/charsetmapping.jar > ../../tools/CharsetMapping > /home/mfranz/linux/icedtea-1.11/generated/sun/nio/cs/ext euctw \ > ??? ??? ../../tools/src/build/tools/charsetmapping/GenerateEUC_TW.java > Exception in thread "main" java.lang.NoClassDefFoundError: java.util.Scanner > ?? at > build.tools.charsetmapping.GenerateEUC_TW.getCopyright(GenerateEUC_TW.java:47) > ?? at > build.tools.charsetmapping.GenerateEUC_TW.genEUC_TW(GenerateEUC_TW.java:43) > ?? at build.tools.charsetmapping.Main.main(Main.java:48) > make[5]: *** > [/home/mfranz/linux/icedtea-1.11/generated/sun/nio/cs/ext/IBM037.java] Error > 1 > make[5]: Leaving directory > `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make/sun/nio' > make[4]: *** [all] Error 1 > make[4]: Leaving directory > `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make/sun' > make[3]: *** [all] Error 1 > make[3]: Leaving directory > `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make' > make[2]: *** [jdk-build] Error 2 > make[2]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj' > make[1]: *** [build_product_image] Error 2 > make[1]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj' > make: *** [stamps/icedtea-ecj.stamp] Error 2 > > > The output from configure for the Scanner check is here: > checking if java.util.Scanner is missing... Exception in thread "main" > java.lang.NoClassDefFoundError: java.util.Scanner > ?? at Test.main(Test.java:7) > no > checking if java.util.Scanner exhibits Classpath bug 40630... yes > > I wonder if the Classpath bug is over-riding the Scanner check. > > Michael > Ok, that first check should be saying yes and the second (bug 40630) shouldn't run. Can you check what output is given in config.log for these tests (if any)? It looks like the javac+java you are using with configure is different from what is actually building OpenJDK. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mvfranz at gmail.com Fri Aug 14 05:05:29 2009 From: mvfranz at gmail.com (Michael Franz) Date: Fri, 14 Aug 2009 08:05:29 -0400 Subject: IcedTea 1.11 on Fedora 10 - Missing java.util.Scanner In-Reply-To: <17c6771e0908140500n4d3a515epdafb8a9dee07fbd0@mail.gmail.com> References: <17c6771e0908130308j1f31400g3ae9fb8b11c6f3b0@mail.gmail.com> <17c6771e0908130437h8337153k4d0d1db23580fcdf@mail.gmail.com> <17c6771e0908140500n4d3a515epdafb8a9dee07fbd0@mail.gmail.com> Message-ID: Here is part of config.log configure:8957: checking if java.io.PrintStream is missing the 1.5 constructors (PR40616) Exception in thread "main" java.lang.NoSuchMethodError: method java.io.PrintStream. with signature (Ljava.io.File;Ljava .lang.String;)V was not found. at Test.main(Test.java:10) configure:8993: result: yes configure:9008: checking if java.util.Scanner is missing configure:9040: result: no configure:9056: checking if java.util.Scanner exhibits Classpath bug 40630 Exception in thread "main" java.lang.NoClassDefFoundError: java.util.Scanner at Test.main(Test.java:9) configure:9093: result: yes On Fri, Aug 14, 2009 at 8:00 AM, Andrew John Hughes < gnu_andrew at member.fsf.org> wrote: > 2009/8/14 Michael Franz : > > Hi, > > > > Here is the output from my Fedora 10 build with the missing > > java.util.Scanner. > > > > /home/mfranz/linux/icedtea-1.11/bootstrap/jdk1.6.0/bin/java > > -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput > -client > > -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -jar > > > /home/mfranz/linux/icedtea-1.11/openjdk-ecj/build/linux-i586/btjars/charsetmapping.jar > > ../../tools/CharsetMapping > > /home/mfranz/linux/icedtea-1.11/generated/sun/nio/cs/ext euctw \ > > ../../tools/src/build/tools/charsetmapping/GenerateEUC_TW.java > > Exception in thread "main" java.lang.NoClassDefFoundError: > java.util.Scanner > > at > > > build.tools.charsetmapping.GenerateEUC_TW.getCopyright(GenerateEUC_TW.java:47) > > at > > > build.tools.charsetmapping.GenerateEUC_TW.genEUC_TW(GenerateEUC_TW.java:43) > > at build.tools.charsetmapping.Main.main(Main.java:48) > > make[5]: *** > > [/home/mfranz/linux/icedtea-1.11/generated/sun/nio/cs/ext/IBM037.java] > Error > > 1 > > make[5]: Leaving directory > > `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make/sun/nio' > > make[4]: *** [all] Error 1 > > make[4]: Leaving directory > > `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make/sun' > > make[3]: *** [all] Error 1 > > make[3]: Leaving directory > > `/home/mfranz/linux/icedtea-1.11/openjdk-ecj/jdk/make' > > make[2]: *** [jdk-build] Error 2 > > make[2]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj' > > make[1]: *** [build_product_image] Error 2 > > make[1]: Leaving directory `/home/mfranz/linux/icedtea-1.11/openjdk-ecj' > > make: *** [stamps/icedtea-ecj.stamp] Error 2 > > > > > > The output from configure for the Scanner check is here: > > checking if java.util.Scanner is missing... Exception in thread "main" > > java.lang.NoClassDefFoundError: java.util.Scanner > > at Test.main(Test.java:7) > > no > > checking if java.util.Scanner exhibits Classpath bug 40630... yes > > > > I wonder if the Classpath bug is over-riding the Scanner check. > > > > Michael > > > > Ok, that first check should be saying yes and the second (bug 40630) > shouldn't run. > > Can you check what output is given in config.log for these tests (if > any)? It looks like the javac+java you are using with configure is > different from what is actually building OpenJDK. > -- > 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/20090814/2f7c6f97/attachment.html From gnu_andrew at member.fsf.org Fri Aug 14 05:37:29 2009 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 14 Aug 2009 13:37:29 +0100 Subject: Bugids already used in this repository (Re: [FOR REVIEW] hs14 merge for OpenJDK6) In-Reply-To: <4A84B194.1070108@sun.com> References: <17c6771e0907312044q43080f55y3353927a57dca99f@mail.gmail.com> <17c6771e0908030302k123c206br4a7632fbc77ee0b@mail.gmail.com> <4A78D78A.5000604@sun.com> <4A78DB80.2030504@sun.com> <17c6771e0908041817h48a5fd1dhcfeb93dc1ae9c0ae@mail.gmail.com> <4A78E151.9070304@sun.com> <17c6771e0908050357u792fd707h4f28cb9b08e9e395@mail.gmail.com> <4A79F131.7040105@sun.com> <17c6771e0908051639h4c9a9c79vfdc4f6048d17cca8@mail.gmail.com> <4A84B194.1070108@sun.com> Message-ID: <17c6771e0908140537g6f61faf8h3f912415b2f3e9c3@mail.gmail.com> 2009/8/14 Joe Darcy : > Andrew John Hughes wrote: >> >> 2009/8/5 Tim Bell : >> >>> >>> Andrew John Hughes wrote: >>> >>> >>>> >>>> Thanks Tim, that seems to have fixed the permissions issue. >>>> >>> >>> Good. >>> >>> >>>> >>>> There now seems to be an issue with jcheck, as the merge causes some >>>> bugids to be repeated: >>>> >>> >>> Hmmm - how did these changesets come in through two different paths? >>> >>> >>>> >>>> pushing to ssh://hg.openjdk.java.net/jdk6/jdk6-gate/hotspot >>>> searching for changes >>>> remote: adding changesets >>>> remote: adding manifests >>>> remote: adding file changes >>>> remote: added 555 changesets with 4771 changes to 1453 files >>>> remote: >>>> remote: > Changeset: 100:d821d920b465 >>>> remote: > Author: ? ?kvn >>>> remote: > Date: ? ? ?2008-03-11 11:04 >>>> remote: > >>>> remote: > 6623167: C2 crashed in StoreCMNode::Value >>>> remote: > Summary: C2 crashed in StoreCMNode::Value because >>>> n->in(MemNode::OopStore) is 0. >>>> remote: > Reviewed-by: rasbold, never >>>> remote: >>>> remote: Bugid 6623167 already used in this repository, in revision 20 >>>> remote: >>>> remote: > Changeset: 104:2c106685d6d0 >>>> remote: > Author: ? ?dcubed >>>> remote: > Date: ? ? ?2008-03-12 18:06 >>>> remote: > >>>> remote: > 6497639: 4/3 Profiling Swing application caused JVM crash >>>> remote: > Summary: Make RedefineClasses() interoperate better with >>>> class sharing. >>>> remote: > Reviewed-by: sspitsyn, jmasa >>>> remote: >>>> remote: Bugid 6497639 already used in this repository, in revision 20 >>>> remote: >>>> remote: > Changeset: 105:d8b3ef7ee3e5 >>>> remote: > Author: ? ?dcubed >>>> remote: > Date: ? ? ?2008-03-12 18:07 >>>> remote: > >>>> remote: > 6599425: 4/3 OopMapCache::lookup() can cause later crash or >>>> assert() failure >>>> remote: > Summary: Add should_not_be_cached() to markOop and methodOop >>>> and query that status inOopMapCache::lookup() >>>> remote: > Reviewed-by: coleenp, sspitsyn, jmasa >>>> remote: >>>> remote: Bugid 6599425 already used in this repository, in revision 20 >>>> remote: >>>> remote: > Changeset: 240:65fe2bd88839 >>>> remote: > Author: ? ?never >>>> remote: > Date: ? ? ?2008-06-05 21:44 >>>> remote: > >>>> remote: > 6614100: EXCEPTION_ACCESS_VIOLATION while running Eclipse >>>> with 1.6.0_05-ea >>>> remote: > Reviewed-by: kvn, jrose, rasbold >>>> remote: >>>> remote: Bugid 6614100 already used in this repository, in revision 20 >>>> remote: >>>> remote: > Changeset: 286:3e82d72933d0 >>>> remote: > Author: ? ?xlu >>>> remote: > Date: ? ? ?2008-06-26 14:15 >>>> remote: > >>>> remote: > 6718830: Hotspot fails to build with gcc 4.3 >>>> remote: > Summary: Fixed linux make file and couple adlc code to meet >>>> the changes of gcc 4.3 >>>> remote: > Reviewed-by: kamg, igor >>>> remote: >>>> remote: Bugid 6718830 already used in this repository, in revision 32 >>>> remote: >>>> remote: > Changeset: 289:551f4309f476 >>>> remote: > Author: ? ?ohair >>>> remote: > Date: ? ? ?2008-07-03 10:46 >>>> remote: > >>>> remote: > 6695777: Queens.class should be built from source, not put >>>> in source repo >>>> remote: > Reviewed-by: kvn >>>> remote: >>>> remote: Bugid 6695777 already used in this repository, in revision 20 >>>> remote: >>>> remote: > Changeset: 314:54499b980c23 >>>> remote: > Author: ? ?swamyv >>>> remote: > Date: ? ? ?2008-07-29 13:54 >>>> remote: > >>>> remote: > 6710791: Remove files or build from source:maf-1_0.jar, >>>> jlfg-1_0.jar >>>> remote: > Summary: Removed maf-1_0.jar and jlfg-1_0.jar files. >>>> remote: > Reviewed-by: poonam, jjh >>>> remote: >>>> remote: Bugid 6710791 already used in this repository, in revision 20 >>>> remote: >>>> remote: > Changeset: 360:fa4d1d240383 >>>> remote: > Author: ? ?never >>>> remote: > Date: ? ? ?2008-08-26 15:49 >>>> remote: > >>>> remote: > 6741642: bad enum definition in ciTypeFlow.hpp >>>> remote: > Reviewed-by: rasbold, martin >>>> remote: > Contributed-by: doko at ubuntu.com >>>> remote: >>>> remote: Bugid 6741642 already used in this repository, in revision 22 >>>> remote: >>>> remote: > Changeset: 589:748572b86af6 >>>> remote: > Author: ? ?never >>>> remote: > Date: ? ? ?2009-04-07 14:46 >>>> remote: > >>>> remote: > 6636360: compiler/6595044/Main.java test fails with 64bit >>>> java on solaris-sparcv9 with SIGSEGV >>>> remote: > Reviewed-by: kvn, twisti >>>> remote: >>>> remote: Bugid 6636360 already used in this repository, in revision 29 >>>> remote: >>>> remote: abort: pretxnchangegroup.0.jcheck hook failed >>>> remote: transaction abort! >>>> remote: rollback completed >>>> abort: unexpected response: empty string >>>> >>>> Is there a way of getting it to ignore these for this one push? ?I >>>> don't know of a way to just pull out these nine changesets from the >>>> 555 waiting to go... >>>> >>> >>> I think they would need to be added to the jcheck whitelist for all time- >>> but that is more of a question for Mark or Kelly. >>> >>> Tim >>> >>> >> >> The early revisions (20, 32) are from OpenJDK6 which was rebased to >> allow HotSpot patches to be applied on top. ?So what happened here is >> that, as the fixes were already applied to OpenJDK6, the new >> changesets pulled in by the merge will be no-ops but still exist to >> keep the change history accurate. >> >> I think we just need a way of disabling this check. ?OpenJDK6 already >> has whitespace and comment checks turned to lax. ?See .jcheck: >> http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/0282bf49b0f6. ?There >> may already be an option for this bugid check too, but I have no idea >> what the format of that file is. >> > > Andrew, can you please try your push again? > > I chatted with Mark and the OpenJDK 6 HotSpot Mercurial repository should be > configured to do lax checking on the bug ids. > > Thanks, > > -Joe > Sorry, same failure still occurs :( I didn't see any changes to .jcheck, which I would assume are needed to fix this (mr added one for the lax comments with the rebase). -- 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 ed at camswl.com Fri Aug 14 06:36:05 2009 From: ed at camswl.com (Edward Nevill) Date: Fri, 14 Aug 2009 14:36:05 +0100 Subject: Request to commit - ARM interpreter changes Message-ID: <200908141336.n7EDa50x031197@parsley.camswl.com> Hi Folks, Attached below are the changes I would like to commit for the ARM interpreter. The following is the ChangeLog entry which lists the files changed. +2009-08-13 Edward Nevill + + Added ARM assembler interpreter + + * openjdk/hotspot/src/share/vm/interpreter.hpp + Allow ARM interpreter to notice safepoints + Changed via patches/icedtea-notice-safepoints.patch + + * ports/hotspot/build/linux/makefiles/zero.make + Add cppInterpreter_arm + Add CFLAGS for ARM asm interpreter + Add rules to build .o from .S + + * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp + Add initialisation of new bytecodes for asm interpreter + + * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp + Add definitions of new bytecodes for asm interpreter + + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp + Add hooks to call asm interpreter + + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp + Add hooks to allow HW null pointer detection + + [ NEW FILES ] + * ports/hotspot/src/cpu/zero/vm/bc.def + Bytecode templates + * ports/hotspot/src/cpu/zero/vm/bytecodes.s + Bytecode implementations (manually generated from bc.def) + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_asm.S + Complex bytecode implementations, entry points and support code + * ports/hotspot/src/cpu/zero/vm/mkbc.c + Bytecode generator, use to generate bytecodes.s from bc.def + I have performed the following testing on the changes. - Build HotSpot on X86 - Build Zero on X86 - Build Zero + Shark on X86 - Build Zero (+ARM) on ARMv7 - Run JTREG on x86 (HotSpot build) compiler: Test results: passed: 24 lang: Test results: passed: 1,344; failed: 8 jdk: Test results: passed: 3,186; failed: 168; error: 2 - Run JTREG on ARMv7 (Still in progress - will take approx 2 days to complete) (Results so far) compiler: Test results: passed: 24 lang: Test results: passed: 535 (of 535 tests run so far). Regards, Ed. --- CUT HERE -------------------------------------------------------- diff -ruNE icedtea6/ChangeLog icedtea6/ChangeLog --- icedtea6/ChangeLog 2009-08-13 14:17:45.000000000 +0100 +++ icedtea6/ChangeLog 2009-08-13 14:51:28.000000000 +0100 @@ -1,3 +1,38 @@ +2009-08-13 Edward Nevill + + Added ARM assembler interpreter + + * openjdk/hotspot/src/share/vm/interpreter.hpp + Allow ARM interpreter to notice safepoints + Changed via patches/icedtea-notice-safepoints.patch + + * ports/hotspot/build/linux/makefiles/zero.make + Add cppInterpreter_arm + Add CFLAGS for ARM asm interpreter + Add rules to build .o from .S + + * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp + Add initialisation of new bytecodes for asm interpreter + + * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp + Add definitions of new bytecodes for asm interpreter + + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp + Add hooks to call asm interpreter + + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp + Add hooks to allow HW null pointer detection + + [ NEW FILES ] + * ports/hotspot/src/cpu/zero/vm/bc.def + Bytecode templates + * ports/hotspot/src/cpu/zero/vm/bytecodes.s + Bytecode implementations (manually generated from bc.def) + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_asm.S + Complex bytecode implementations, entry points and support code + * ports/hotspot/src/cpu/zero/vm/mkbc.c + Bytecode generator, use to generate bytecodes.s from bc.def + 2009-08-13 Gary Benson * ports/hotspot/src/share/vm/shark/sharkEntry.hpp diff -ruNE icedtea6/Makefile.am icedtea6/Makefile.am --- icedtea6/Makefile.am 2009-08-13 14:17:45.000000000 +0100 +++ icedtea6/Makefile.am 2009-08-13 14:38:13.000000000 +0100 @@ -503,6 +503,7 @@ ICEDTEA_FSG_PATCHES = ICEDTEA_PATCHES = \ + patches/icedtea-notice-safepoints.patch \ patches/hotspot/$(HSBUILD)/icedtea-bytecodeInterpreter.patch \ patches/icedtea-signature-iterator.patch \ patches/icedtea-test-atomic-operations.patch \ diff -ruNE icedtea6/patches/icedtea-notice-safepoints.patch icedtea6/patches/icedtea-notice-safepoints.patch --- icedtea6/patches/icedtea-notice-safepoints.patch 1970-01-01 01:00:00.000000000 +0100 +++ icedtea6/patches/icedtea-notice-safepoints.patch 2009-08-13 14:36:16.000000000 +0100 @@ -0,0 +1,16 @@ +--- openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp 2009-04-30 23:21:47.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp 2009-06-29 12:30:31.000000000 +0000 +@@ -60,8 +60,13 @@ + + + // No displatch table to switch so no need for these to do anything special ++#if defined(PRODUCT) && defined(HOTSPOT_ASM) ++ static void notice_safepoints(); ++ static void ignore_safepoints(); ++#else + static void notice_safepoints() {} + static void ignore_safepoints() {} ++#endif + + static address native_result_to_tosca() { return (address)_native_abi_to_tosca; } // aka result handler + static address tosca_result_to_stack() { return (address)_tosca_to_stack; } diff -ruNE icedtea6/ports/hotspot/build/linux/makefiles/zero.make icedtea6/ports/hotspot/build/linux/makefiles/zero.make --- icedtea6/ports/hotspot/build/linux/makefiles/zero.make 2009-08-13 14:17:47.000000000 +0100 +++ icedtea6/ports/hotspot/build/linux/makefiles/zero.make 2009-08-13 14:30:21.000000000 +0100 @@ -23,6 +23,15 @@ # # +ifeq ($(ZERO_LIBARCH),arm) +Obj_Files += cppInterpreter_arm.o +CFLAGS += -DHOTSPOT_ASM -DHW_NULL_PTR_CHECK +%.o: %.S + @echo Assembling $< + $(QUIETLY) $(REMOVE_TARGET) + $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) +endif + # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) # The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized diff -ruNE icedtea6/ports/hotspot/src/cpu/zero/vm/bc.def icedtea6/ports/hotspot/src/cpu/zero/vm/bc.def --- icedtea6/ports/hotspot/src/cpu/zero/vm/bc.def 1970-01-01 01:00:00.000000000 +0100 +++ icedtea6/ports/hotspot/src/cpu/zero/vm/bc.def 2009-08-13 14:24:44.000000000 +0100 @@ -0,0 +1,7863 @@ +nop = 0x00, 1 +aconst_null = 0x01, 1 +iconst_m1 = 0x02, 1 +iconst_0 = 0x03, 1 +iconst_1 = 0x04, 1 +iconst_2 = 0x05, 1 +iconst_3 = 0x06, 1 +iconst_4 = 0x07, 1 +iconst_5 = 0x08, 1 +lconst_0 = 0x09, 1 +lconst_1 = 0x0a, 1 +fconst_0 = 0x0b, 1 +fconst_1 = 0x0c, 1 +fconst_2 = 0x0d, 1 +dconst_0 = 0x0e, 1 +dconst_1 = 0x0f, 1 +bipush = 0x10, 2 +sipush = 0x11, 3 +ldc = 0x12, 2 +ldc_w = 0x13, 3 +ldc2_w = 0x14, 3 +iload = 0x15, 2 +lload = 0x16, 2 +fload = 0x17, 2 +dload = 0x18, 2 +aload = 0x19, 2 +iload_0 = 0x1a, 1 +iload_1 = 0x1b, 1 +iload_2 = 0x1c, 1 +iload_3 = 0x1d, 1 +lload_0 = 0x1e, 1 +lload_1 = 0x1f, 1 +lload_2 = 0x20, 1 +lload_3 = 0x21, 1 +fload_0 = 0x22, 1 +fload_1 = 0x23, 1 +fload_2 = 0x24, 1 +fload_3 = 0x25, 1 +dload_0 = 0x26, 1 +dload_1 = 0x27, 1 +dload_2 = 0x28, 1 +dload_3 = 0x29, 1 +aload_0 = 0x2a, 1 +aload_1 = 0x2b, 1 +aload_2 = 0x2c, 1 +aload_3 = 0x2d, 1 +iaload = 0x2e, 1 +laload = 0x2f, 1 +faload = 0x30, 1 +daload = 0x31, 1 +aaload = 0x32, 1 +baload = 0x33, 1 +caload = 0x34, 1 +saload = 0x35, 1 +istore = 0x36, 2 +lstore = 0x37, 2 +fstore = 0x38, 2 +dstore = 0x39, 2 +astore = 0x3a, 2 +istore_0 = 0x3b, 1 +istore_1 = 0x3c, 1 +istore_2 = 0x3d, 1 +istore_3 = 0x3e, 1 +lstore_0 = 0x3f, 1 +lstore_1 = 0x40, 1 +lstore_2 = 0x41, 1 +lstore_3 = 0x42, 1 +fstore_0 = 0x43, 1 +fstore_1 = 0x44, 1 +fstore_2 = 0x45, 1 +fstore_3 = 0x46, 1 +dstore_0 = 0x47, 1 +dstore_1 = 0x48, 1 +dstore_2 = 0x49, 1 +dstore_3 = 0x4a, 1 +astore_0 = 0x4b, 1 +astore_1 = 0x4c, 1 +astore_2 = 0x4d, 1 +astore_3 = 0x4e, 1 +iastore = 0x4f, 1 +lastore = 0x50, 1 +fastore = 0x51, 1 +dastore = 0x52, 1 +aastore = 0x53, 1 +bastore = 0x54, 1 +castore = 0x55, 1 +sastore = 0x56, 1 +pop = 0x57, 1 +pop2 = 0x58, 1 +dup = 0x59, 1 +dup_x1 = 0x5a, 1 +dup_x2 = 0x5b, 1 +dup2 = 0x5c, 1 +dup2_x1 = 0x5d, 1 +dup2_x2 = 0x5e, 1 +swap = 0x5f, 1 +iadd = 0x60, 1 +ladd = 0x61, 1 +fadd = 0x62, 1 +dadd = 0x63, 1 +isub = 0x64, 1 +lsub = 0x65, 1 +fsub = 0x66, 1 +dsub = 0x67, 1 +imul = 0x68, 1 +lmul = 0x69, 1 +fmul = 0x6a, 1 +dmul = 0x6b, 1 +idiv = 0x6c, 1 +ldiv = 0x6d, 1 +fdiv = 0x6e, 1 +ddiv = 0x6f, 1 +irem = 0x70, 1 +lrem = 0x71, 1 +frem = 0x72, 1 +drem = 0x73, 1 +ineg = 0x74, 1 +lneg = 0x75, 1 +fneg = 0x76, 1 +dneg = 0x77, 1 +ishl = 0x78, 1 +lshl = 0x79, 1 +ishr = 0x7a, 1 +lshr = 0x7b, 1 +iushr = 0x7c, 1 +lushr = 0x7d, 1 +iand = 0x7e, 1 +land = 0x7f, 1 +ior = 0x80, 1 +lor = 0x81, 1 +ixor = 0x82, 1 +lxor = 0x83, 1 +iinc = 0x84, 3 +i2l = 0x85, 1 +i2f = 0x86, 1 +i2d = 0x87, 1 +l2i = 0x88, 1 +l2f = 0x89, 1 +l2d = 0x8a, 1 +f2i = 0x8b, 1 +f2l = 0x8c, 1 +f2d = 0x8d, 1 +d2i = 0x8e, 1 +d2l = 0x8f, 1 +d2f = 0x90, 1 +i2b = 0x91, 1 +i2c = 0x92, 1 +i2s = 0x93, 1 +lcmp = 0x94, 1 +fcmpl = 0x95, 1 +fcmpg = 0x96, 1 +dcmpl = 0x97, 1 +dcmpg = 0x98, 1 +ifeq = 0x99, 0 +ifne = 0x9a, 0 +iflt = 0x9b, 0 +ifge = 0x9c, 0 +ifgt = 0x9d, 0 +ifle = 0x9e, 0 +if_icmpeq = 0x9f, 0 +if_icmpne = 0xa0, 0 +if_icmplt = 0xa1, 0 +if_icmpge = 0xa2, 0 +if_icmpgt = 0xa3, 0 +if_icmple = 0xa4, 0 +if_acmpeq = 0xa5, 0 +if_acmpne = 0xa6, 0 +goto = 0xa7, 0 +jsr = 0xa8, 0 +ret = 0xa9, 0 +tableswitch = 0xaa, 0 +lookupswitch = 0xab, 0 +ireturn = 0xac, 0 +lreturn = 0xad, 0 +freturn = 0xae, 0 +dreturn = 0xaf, 0 +areturn = 0xb0, 0 +return = 0xb1, 0 +getstatic = 0xb2, 3 +putstatic = 0xb3, 3 +getfield = 0xb4, 3 +putfield = 0xb5, 3 +invokevirtual = 0xb6, 3 +invokespecial = 0xb7, 3 +invokestatic = 0xb8, 3 +invokeinterface = 0xb9, 0 +new = 0xbb, 3 +newarray = 0xbc, 2 +anewarray = 0xbd, 3 +arraylength = 0xbe, 1 +athrow = 0xbf, 0 +checkcast = 0xc0, 3 +instanceof = 0xc1, 3 +monitorenter = 0xc2, 1 +monitorexit = 0xc3, 1 +wide = 0xc4, 1 +multianewarray = 0xc5, 4 +ifnull = 0xc6, 0 +ifnonnull = 0xc7, 0 +goto_w = 0xc8, 0 +jsr_w = 0xc9, 0 +breakpoint = 0xca, 0 + +#agetfield = 0xcb, 3 +bgetfield = 0xcc, 3 +cgetfield = 0xcd, 3 +#dgetfield = 0xce, 3 +#fgetfield = 0xcf, 3 +igetfield = 0xd0, 3 +lgetfield = 0xd1, 3 +sgetfield = 0xd2, 3 + +aputfield = 0xd3, 3 +bputfield = 0xd4, 3 +cputfield = 0xd5, 3 +#dputfield = 0xd6, 3 +#fputfield = 0xd7, 3 +iputfield = 0xd8, 3 +lputfield = 0xd9, 3 +#sputfield = 0xda, 3 + +iaccess_0 = 0xdb, 4 +iaccess_1 = 0xdc, 4 +iaccess_2 = 0xdd, 4 +iaccess_3 = 0xde, 4 + +#fast_iload = 0xdf, 2 +#fast_iload2 = 0xe0, 4 +#fast_icaload = 0xe1, 3 + +invokevfinal = 0xe2, 3 +#linearswitch = 0xe3, 0 +#binaryswitch = 0xe4, 0 + +iload_0_iconst_N = 231, 2 +iload_1_iconst_N = 232, 2 +iload_2_iconst_N = 233, 2 +iload_3_iconst_N = 234, 2 +iload_iconst_N = 235, 3 +invokeresolved = 236, 3 +iadd_istore_N = 237, 2 +isub_istore_N = 238, 2 +iand_istore_N = 239, 2 +ior_istore_N = 240, 2 +ixor_istore_N = 241, 2 +iadd_u4store = 242, 3 +isub_u4store = 243, 3 +iand_u4store = 244, 3 +ior_u4store = 245, 3 +ixor_u4store = 246, 3 +invokespecialresolved = 247, 3 +invokestaticresolved = 248, 3 + +return_register_finalizer = 229, 0 + +(nop) { + DISPATCH \seq_len +} + +(aconst_null,fconst_0) u4const_0 { + DISPATCH_START \seq_len + mov lr, #0 + DISPATCH_NEXT + PUSH lr + DISPATCH_FINISH +} + +(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5) iconst_N { + sub lr, r0, #opc_iconst_0 + DISPATCH_START \seq_len + PUSH lr + DISPATCH_FINISH +} + +(lconst_0,dconst_0) u8const_0 { + DISPATCH_START \seq_len + mov tmp1, #0 + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(lconst_1) lconst_1 { + DISPATCH_START \seq_len + mov tmp2, #1 + DISPATCH_NEXT + mov tmp1, #0 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH2 tmp2, tmp1 + DISPATCH_FINISH +} + +(fconst_1) fconst_1 { + DISPATCH_START \seq_len + mov tmp1, #0x3f800000 + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(fconst_2) fconst_2 { + DISPATCH_START \seq_len + mov r2, #0x40000000 + DISPATCH_NEXT + PUSH r2 + DISPATCH_FINISH +} + +(dconst_1) dconst_1 { + DISPATCH_START \seq_len + mov tmp1, #0x3f000000 + DISPATCH_NEXT + orr tmp1, tmp1, #0x00f00000 + DISPATCH_NEXT + mov tmp2, #0 + DISPATCH_NEXT + DISPATCH_NEXT + PUSH2 tmp2, tmp1 + DISPATCH_FINISH +} + +(bipush) bipush { + DISPATCH_START \seq_len + mov tmp1, r2, lsl #24 + DISPATCH_NEXT + mov tmp1, tmp1, asr #24 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +# r1 = [jpc, #2] +(sipush) sipush { + DISPATCH_START \seq_len + mov tmp1, r1 + DISPATCH_NEXT + mov r2, r2, lsl #24 + DISPATCH_NEXT + orr tmp1, tmp1, r2, asr #16 + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +(iload,fload,aload) u4load { + DISPATCH_START \seq_len + rsb tmp1, r2, #0 + DISPATCH_NEXT + ldr tmp1, [locals, tmp1, lsl #2] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +(lload,dload) u8load { + DISPATCH_START \seq_len + sub r3, locals, r2, lsl #2 + DISPATCH_NEXT + ldmda r3, {tmp2, tmp1} + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH2 tmp2, tmp1 + DISPATCH_FINISH +} + +(aload_0,aload_1,aload_2,aload_3) { + rsb tmp1, r0, #opc_aload_0 + DISPATCH_START \seq_len + DISPATCH_NEXT + ldr tmp1, [locals, tmp1, lsl #2] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(iload_0,iload_1,iload_2,iload_3) { + rsb tmp1, r0, #opc_iload_0 + DISPATCH_START \seq_len + DISPATCH_NEXT + ldr tmp1, [locals, tmp1, lsl #2] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(fload_0,fload_1,fload_2,fload_3) { + rsb tmp1, r0, #opc_fload_0 + DISPATCH_START \seq_len + DISPATCH_NEXT + ldr tmp1, [locals, tmp1, lsl #2] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(lload_0,dload_0) u8load_0 { + DISPATCH_START \seq_len + ldmda locals, {tmp2-tmp1} + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(lload_1,dload_1) u8load_1 { + DISPATCH_START \seq_len + ldmdb locals, {tmp2-tmp1} + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(lload_2,dload_2) u8load_2 { + DISPATCH_START \seq_len + ldr tmp2, [locals, #-12] + DISPATCH_NEXT + ldr tmp1, [locals, #-8] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH2 tmp2, tmp1 + DISPATCH_FINISH +} + +(lload_3,dload_3) u8load_3 { + DISPATCH_START \seq_len + ldr tmp2, [locals, #-16] + DISPATCH_NEXT + ldr tmp1, [locals, #-12] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH2 tmp2, tmp1 + DISPATCH_FINISH +} + +(iaload,faload,aaload) u4aload { + POP2 r2, r3 @ r2 = index, r3 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp r3, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry5: + ldr lr, [r3, #8] @ lr = length + DISPATCH_NEXT + cmp r2, lr + bcs array_bound_exception_jpc_1 + DISPATCH_NEXT + add r3, r3, r2, lsl #2 + DISPATCH_NEXT + ldr tmp1, [r3, #12] + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(laload,daload) u8aload { + POP2 r2, r3 + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp r3, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry6: + ldr lr, [r3, #8] @ lr = length + DISPATCH_NEXT + cmp r2, lr + bcs array_bound_exception_jpc_1 + DISPATCH_NEXT + add r3, r3, r2, lsl #3 + ldr tmp2, [r3, #16] + DISPATCH_NEXT + ldr tmp1, [r3, #20] + DISPATCH_NEXT + PUSH2 tmp2, tmp1 + DISPATCH_FINISH +} + +(baload) baload { + POP2 r2, r3 @ r2 = index, r3 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp r3, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry7: + ldr lr, [r3, #8] @ lr = length + DISPATCH_NEXT + cmp r2, lr + bcs array_bound_exception_jpc_1 + DISPATCH_NEXT + add r3, r3, r2 + DISPATCH_NEXT + ldrsb tmp1, [r3, #12] + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(caload) caload { + POP2 r2, r3 @ r2 = index, r3 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp r3, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry8: + ldr lr, [r3, #8] @ lr = length + DISPATCH_NEXT + cmp r2, lr + bcs array_bound_exception_jpc_1 + DISPATCH_NEXT + add r3, r3, r2, lsl #1 + DISPATCH_NEXT + ldrh tmp1, [r3, #12] + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(saload) saload { + POP2 r2, r3 @ r2 = index, r3 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp r3, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry9: + ldr lr, [r3, #8] @ lr = length + DISPATCH_NEXT + cmp r2, lr + bcs array_bound_exception_jpc_1 + DISPATCH_NEXT + add r3, r3, r2, lsl #1 + DISPATCH_NEXT + ldrsh tmp1, [r3, #12] + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +(astore,istore,fstore) u4store { + DISPATCH_START \seq_len + rsb tmp1, r2, #0 + DISPATCH_NEXT + POP r3 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str r3, [locals, tmp1, lsl #2] + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +(lstore,dstore) u8store { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + sub r3, locals, r2, lsl #2 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + stmda r3, {tmp2, tmp1} + DISPATCH_FINISH +} + +(astore_0,istore_0,fstore_0) u4store_0 { + DISPATCH_START \seq_len + DISPATCH_NEXT + POP tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str tmp1, [locals, #0] + DISPATCH_FINISH +} + +(astore_1,istore_1,fstore_1) u4store_1 { + DISPATCH_START \seq_len + DISPATCH_NEXT + POP tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str tmp1, [locals, #-4] + DISPATCH_FINISH +} + +(astore_2,istore_2,fstore_2) u4store_2 { + DISPATCH_START \seq_len + DISPATCH_NEXT + POP tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str tmp1, [locals, #-8] + DISPATCH_FINISH +} + +(astore_3,istore_3,fstore_3) u4store_3 { + DISPATCH_START \seq_len + DISPATCH_NEXT + POP tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str tmp1, [locals, #-12] + DISPATCH_FINISH +} + +(lstore_0,dstore_0) u8store_0 { + DISPATCH_START \seq_len + DISPATCH_NEXT + POP2 tmp2, tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + stmda locals, {tmp2, tmp1} + DISPATCH_FINISH +} + +(lstore_1,dstore_1) u8store_1 { + DISPATCH_START \seq_len + DISPATCH_NEXT + POP2 tmp2, tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + stmdb locals, {tmp2, tmp1} + DISPATCH_FINISH +} + +(lstore_2,dstore_2) u8store_2 { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + str tmp2, [locals, #-12] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str tmp1, [locals, #-8] + DISPATCH_FINISH +} + +(lstore_3,dstore_3) u8store_3 { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + str tmp2, [locals, #-16] + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + str tmp1, [locals, #-12] + DISPATCH_FINISH +} + +(iastore,fastore) u4astore { + POP3 r3, tmp2, tmp1 @ r3 = value, tmp2 = index, tmp1 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp tmp1, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry10: + ldr lr, [tmp1, #8] @ lr = limit + DISPATCH_NEXT + cmp tmp2, lr + bcs array_bound_exception_jpc_1_tmp2 + DISPATCH_NEXT + add tmp1, tmp1, tmp2, lsl #2 + DISPATCH_NEXT + str r3, [tmp1, #12] + DISPATCH_FINISH +} + +(lastore,dastore) u8astore { + POP4 r2, r3, tmp2, tmp1 @ r2,r3 = value, tmp2 = index, tmp1 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp tmp1, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry11: + ldr ip, [tmp1, #8] @ ip = limit + cmp tmp2, ip + DISPATCH_NEXT + bcs array_bound_exception_jpc_1_tmp2 + DISPATCH_NEXT + add tmp2, tmp1, tmp2, lsl #3 + str r2, [tmp2, #16] + DISPATCH_NEXT + DISPATCH_NEXT + str r3, [tmp2, #20] + DISPATCH_FINISH +} + +(bastore) bastore { + POP3 r3, tmp2, tmp1 @ r3 = value, tmp2 = index, tmp1 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp tmp1, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry12: + ldr lr, [tmp1, #8] @ lr = limit + DISPATCH_NEXT + cmp tmp2, lr + bcs array_bound_exception_jpc_1_tmp2 + DISPATCH_NEXT + add tmp1, tmp1, tmp2 + DISPATCH_NEXT + strb r3, [tmp1, #12] + DISPATCH_FINISH +} + +(castore,sastore) u2astore { + POP3 r3, tmp2, tmp1 @ r3 = value, tmp2 = index, tmp1 = arrayref + DISPATCH_START \seq_len +#ifndef HW_NULL_PTR_CHECK + cmp tmp1, #0 + beq null_ptr_exception_jpc_1 +#endif +.abortentry13: + ldr lr, [tmp1, #8] @ lr = limit + DISPATCH_NEXT + cmp tmp2, lr + bcs array_bound_exception_jpc_1_tmp2 + DISPATCH_NEXT + add tmp1, tmp1, tmp2, lsl #1 + DISPATCH_NEXT + strh r3, [tmp1, #12] + DISPATCH_FINISH +} + +(pop) jpop { + DISPATCH_START \seq_len + add stack, stack, #4 + DISPATCH_FINISH +} + +(pop2) jpop2 { + DISPATCH_START \seq_len + add stack, stack, #8 + DISPATCH_FINISH +} + +(dup) dup { + DISPATCH_START \seq_len + ldr lr, [stack, #4] + DISPATCH_NEXT + PUSH lr + DISPATCH_FINISH +} + +(dup_x1) dup_x1 { + DISPATCH_START \seq_len + POP2 r2, r3 + DISPATCH_NEXT + PUSH r2 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(dup_x2) dup_x2 { + DISPATCH_START \seq_len + POP3 r2, r3, lr + DISPATCH_NEXT + PUSH r2 + DISPATCH_NEXT + PUSH3 r2, r3, lr + DISPATCH_FINISH +} + +(dup2) dup2 { + DISPATCH_START \seq_len + ldmib stack, {r2, r3} + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(dup2_x1) dup2_x1 { + DISPATCH_START \seq_len + POP3 r2, r3, lr + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_NEXT + PUSH3 r2, r3, lr + DISPATCH_FINISH +} + +(dup2_x2) dup2_x2 { + DISPATCH_START \seq_len + POP4 r2, r3, tmp1, lr + DISPATCH_NEXT + PUSH2 r2, r3 + PUSH4 r2, r3, tmp1, lr + DISPATCH_FINISH +} + +(swap) swap { + DISPATCH_START \seq_len + POP2 r2, r3 + DISPATCH_NEXT + PUSH r2 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + + +(iadd) iadd { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + add tmp2, tmp2, tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(ladd) ladd { + DISPATCH_START \seq_len + POP4 r2, r3, tmp1, lr + DISPATCH_NEXT + adds r2, r2, tmp1 + adc r3, r3, lr + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(fadd) fadd { + POP2 r0, r1 + bl __aeabi_fadd + PUSH r0 + DISPATCH \seq_len +} + +(isub) isub { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + sub tmp2, tmp1, tmp2 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(lsub) lsub { + DISPATCH_START \seq_len + POP4 r2, r3, tmp1, lr + DISPATCH_NEXT + subs r2, tmp1, r2 + sbc r3, lr, r3 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(fsub) fsub { + POP r1 + POP r0 + bl __aeabi_fsub + PUSH r0 + DISPATCH \seq_len +} + +(imul) imul { + DISPATCH_START \seq_len + POP2 r2, tmp1 + DISPATCH_NEXT + mul tmp2, r2, tmp1 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(lmul) lmul { + POP4 r2, tmp1, ip, lr + umull r3, r0, ip, r2 + mla tmp1, ip, tmp1, r0 + DISPATCH_START \seq_len + mla tmp1, lr, r2, tmp1 + DISPATCH_NEXT + PUSH2 r3, tmp1 + DISPATCH_FINISH +} + +(fmul) fmul { + POP2 r0, r1 + bl __aeabi_fmul + PUSH r0 + DISPATCH \seq_len +} + +(ldiv) ldiv { + POP2 r2, r3 + POP2 r0, r1 + orrs lr, r2, r3 + beq .ldiv_0 + bl __aeabi_ldivmod + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(fdiv) fdiv { + POP r1 + POP r0 + bl __aeabi_fdiv + PUSH r0 + DISPATCH \seq_len +} + +(ddiv) ddiv { + POP2 r2, r3 + POP2 r0, r1 + bl __aeabi_ddiv + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(lrem) lrem { + POP2 r2, r3 + POP2 r0, r1 + orrs lr, r2, r3 + beq .lrem_0 + bl __aeabi_ldivmod + PUSH2 r2, r3 + DISPATCH \seq_len +} + +(frem) frem { +@ ECN: It must be possible to do better than this + POP r0 + bl __aeabi_f2d + PUSH2 r0, r1 + GET_STACK 2, r0 + bl __aeabi_f2d + POP2 r2, r3 + bl fmod + bl __aeabi_d2f + PUT_STACK 0, r0 + DISPATCH \seq_len +} + +(drem) drem { + POP2 r2, r3 + POP2 r0, r1 + bl fmod + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(ineg) ineg { + DISPATCH_START \seq_len + POP tmp1 + DISPATCH_NEXT + rsb tmp1, tmp1, #0 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp1 + DISPATCH_FINISH +} + +(lneg) lneg { + DISPATCH_START \seq_len + POP2 r2, r3 + DISPATCH_NEXT + rsbs r2, r2, #0 + rsc r3, r3, #0 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(fneg) fneg { + DISPATCH_START \seq_len + POP r2 + DISPATCH_NEXT + eor r2, r2, #0x80000000 + DISPATCH_NEXT + PUSH r2 + DISPATCH_FINISH +} + +(dneg) dneg { + DISPATCH_START \seq_len + GET_STACK 1, r2 + DISPATCH_NEXT + eor r2, r2, #0x80000000 + DISPATCH_NEXT + PUT_STACK 1, r2 + DISPATCH_FINISH +} + +(ishl) ishl { + DISPATCH_START \seq_len + POP2 r2, r3 + DISPATCH_NEXT + and r2, r2, #31 + mov r2, r3, lsl r2 + DISPATCH_NEXT + PUSH r2 + DISPATCH_FINISH +} + +(lshl) lshl { + DISPATCH_START \seq_len + POP3 r2, r3, lr + DISPATCH_NEXT + tst r2, #32 + and r2, r2, #31 + movne tmp1, #0 + movne lr, r3, lsl r2 + moveq tmp1, r3, lsl r2 + moveq lr, lr, lsl r2 + rsbeq r2, r2, #32 + orreq lr, lr, r3, lsr r2 + PUSH2 tmp1, lr + DISPATCH_FINISH +} + +(ishr) ishr { + DISPATCH_START \seq_len + POP2 r2, r3 + DISPATCH_NEXT + and r2, r2, #31 + mov r2, r3, asr r2 + DISPATCH_NEXT + PUSH r2 + DISPATCH_FINISH +} + +(lshr) lshr { + DISPATCH_START \seq_len + POP3 r2, r3, tmp1 + DISPATCH_NEXT + tst r2, #32 + and r2, r2, #31 + movne lr, tmp1, asr #31 + movne r3, tmp1, asr r2 + moveq lr, tmp1, asr r2 + moveq r3, r3, lsr r2 + rsbeq r2, r2, #32 + orreq r3, r3, tmp1, lsl r2 + PUSH2 r3, lr + DISPATCH_FINISH +} + +(iushr) iushr { + DISPATCH_START \seq_len + POP2 r2, r3 + DISPATCH_NEXT + and r2, r2, #31 + mov r2, r3, lsr r2 + DISPATCH_NEXT + PUSH r2 + DISPATCH_FINISH +} + +(lushr) lushr { + DISPATCH_START \seq_len + POP3 r2, r3, tmp1 + DISPATCH_NEXT + tst r2, #32 + and r2, r2, #31 + movne lr, #0 + movne r3, tmp1, lsr r2 + moveq lr, tmp1, lsr r2 + moveq r3, r3, lsr r2 + rsbeq r2, r2, #32 + orreq r3, r3, tmp1, lsl r2 + PUSH2 r3, lr + DISPATCH_FINISH +} + +(iand) iand { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + and tmp2, tmp1, tmp2 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(land) land { + DISPATCH_START \seq_len + POP4 r2, r3, tmp1, lr + DISPATCH_NEXT + and r2, tmp1, r2 + and r3, lr, r3 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(ior) ior { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + orr tmp2, tmp1, tmp2 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(lor) lor { + DISPATCH_START \seq_len + POP4 r2, r3, tmp1, lr + DISPATCH_NEXT + orr r2, tmp1, r2 + orr r3, lr, r3 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(ixor) ixor { + DISPATCH_START \seq_len + POP2 tmp2, tmp1 + DISPATCH_NEXT + eor tmp2, tmp1, tmp2 + DISPATCH_NEXT + DISPATCH_NEXT + DISPATCH_NEXT + PUSH tmp2 + DISPATCH_FINISH +} + +(lxor) lxor { + DISPATCH_START \seq_len + POP4 r2, r3, tmp1, lr + DISPATCH_NEXT + eor r2, tmp1, r2 + eor r3, lr, r3 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +(iinc) iinc { + ldrsb lr, [jpc, #2] + DISPATCH_START \seq_len + rsb tmp1, r2, #0 + DISPATCH_NEXT + ldr r3, [locals, tmp1, lsl #2] + DISPATCH_NEXT + add r3, r3, lr + DISPATCH_NEXT + DISPATCH_NEXT + str r3, [locals, tmp1, lsl #2] + DISPATCH_FINISH +} + +(i2l) i2l { + DISPATCH_START \seq_len + POP r2 + DISPATCH_NEXT + mov r3, r2, asr #31 + DISPATCH_NEXT + PUSH2 r2, r3 + DISPATCH_FINISH +} + +(i2f) i2f { + POP r0 + bl __aeabi_i2f + PUSH r0 + DISPATCH \seq_len +} + +(i2d) i2d { + POP r0 + bl __aeabi_i2d + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(l2i) l2i { + DISPATCH_START \seq_len + POP r3 + DISPATCH_NEXT + PUT_STACK 0, r3 + DISPATCH_FINISH +} + +(l2f) l2f { + POP2 r0, r1 + bl __aeabi_l2f + PUSH r0 + DISPATCH \seq_len +} + +(l2d) l2d { + POP2 r0, r1 + bl __aeabi_l2d + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(f2i) f2i { + POP r0 + bl _ZN13SharedRuntime3f2iEf + PUSH r0 + DISPATCH \seq_len +} + +(f2l) f2l { + POP r0 + bl _ZN13SharedRuntime3f2lEf + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(f2d) f2d { + POP r0 + bl __aeabi_f2d + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(d2i) d2i { + POP2 r0, r1 + bl _ZN13SharedRuntime3d2iEd + PUSH r0 + DISPATCH \seq_len +} + +(d2l) d2l { + POP2 r0, r1 + bl _ZN13SharedRuntime3d2lEd + PUSH2 r0, r1 + DISPATCH \seq_len +} + +(d2f) d2f { + POP2 r0, r1 + bl __aeabi_d2f + PUSH r0 + DISPATCH \seq_len +} + +(i2b) i2b { + DISPATCH_START \seq_len + POP r3 + DISPATCH_NEXT + mov r3, r3, asl #24 + mov r3, r3, asr #24 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +(i2c) i2c { + DISPATCH_START \seq_len + POP r3 + DISPATCH_NEXT + mov r3, r3, asl #16 + mov r3, r3, lsr #16 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +(i2s) i2s { + DISPATCH_START \seq_len + POP r3 + DISPATCH_NEXT + mov r3, r3, asl #16 + mov r3, r3, asr #16 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +(lcmp) lcmp { + POP4 r2, r3, tmp1, lr + DISPATCH_START \seq_len + subs r2, tmp1, r2 + movne r2, #1 + sbcs lr, lr, r3 + DISPATCH_NEXT + movne r2, #1 + rsblt r2, r2, #0 + DISPATCH_NEXT + PUSH r2 + DISPATCH_FINISH +} + +(fcmpl) fcmpl { + ldmib stack, {r0, r1} + bl __aeabi_fcmpgt + cmp r0, #0 + movne r3, #-1 + bne 3f + ldmib stack, {r0, r1} + bl __aeabi_fcmplt + cmp r0, #0 + movne r3, #1 + bne 3f + ldmib stack, {r0, r1} + bl __aeabi_fcmpeq + cmp r0, #0 + movne r3, #0 + moveq r3, #-1 +3: + DISPATCH_START \seq_len + add stack, stack, #8 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +(fcmpg) fcmpg { + ldmib stack, {r0, r1} + bl __aeabi_fcmpgt + cmp r0, #0 + movne r3, #-1 + bne 4f + ldmib stack, {r0, r1} + bl __aeabi_fcmplt + cmp r0, #0 + movne r3, #1 + bne 4f + ldmib stack, {r0, r1} + bl __aeabi_fcmpeq + cmp r0, #0 + movne r3, #0 + moveq r3, #1 +4: + DISPATCH_START \seq_len + add stack, stack, #8 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +(dcmpl) dcmpl { + ldmib stack, {r0, r1, r2, r3} + bl __aeabi_dcmpgt + cmp r0, #0 + movne r3, #-1 + bne 5f + ldmib stack, {r0, r1, r2, r3} + bl __aeabi_dcmplt + cmp r0, #0 + movne r3, #1 + bne 5f + ldmib stack, {r0, r1, r2, r3} + bl __aeabi_dcmpeq + cmp r0, #0 + movne r3, #0 + moveq r3, #-1 +5: + DISPATCH_START \seq_len + add stack, stack, #16 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +(dcmpg) dcmpg { + ldmib stack, {r0, r1, r2, r3} + bl __aeabi_dcmpgt + cmp r0, #0 + movne r3, #-1 + bne 6f + ldmib stack, {r0, r1, r2, r3} + bl __aeabi_dcmplt + cmp r0, #0 + movne r3, #1 + bne 6f + ldmib stack, {r0, r1, r2, r3} + bl __aeabi_dcmpeq + cmp r0, #0 + movne r3, #0 + moveq r3, #1 +6: + DISPATCH_START \seq_len + add stack, stack, #16 + DISPATCH_NEXT + PUSH r3 + DISPATCH_FINISH +} + +# r2 = [jpc, #1] +# r1 = [jpc, #2] +(ifeq,ifnull) ifeq_unsafe { + POP r3 + mov r2, r2, lsl #24 + cmp r3, #0 + orr ip, r1, r2, asr #16 + beq 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(ifne,ifnonnull) ifne_unsafe { + POP r3 + mov r2, r2, lsl #24 + cmp r3, #0 + orr ip, r1, r2, asr #16 + bne 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(iflt) iflt_unsafe { + POP r3 + mov r2, r2, lsl #24 + cmp r3, #0 + orr ip, r1, r2, asr #16 + blt 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(ifge) ifge_unsafe { + POP r3 + mov r2, r2, lsl #24 + cmp r3, #0 + orr ip, r1, r2, asr #16 + bge 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(ifgt) ifgt_unsafe { + POP r3 + mov r2, r2, lsl #24 + cmp r3, #0 + orr ip, r1, r2, asr #16 + bgt 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(ifle) ifle_unsafe { + POP r3 + mov r2, r2, lsl #24 + cmp r3, #0 + orr ip, r1, r2, asr #16 + ble 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(if_icmpeq,if_acmpeq) if_icmpeq_unsafe { + POP2 r3, tmp1 + mov r2, r2, lsl #24 + cmp tmp1, r3 + orr ip, r1, r2, asr #16 + beq 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(if_icmpne,if_acmpne) if_icmpne_unsafe { + POP2 r3, tmp1 + mov r2, r2, lsl #24 + cmp tmp1, r3 + orr ip, r1, r2, asr #16 + bne 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(if_icmplt) if_icmplt_unsafe { + POP2 r3, tmp1 + mov r2, r2, lsl #24 + cmp tmp1, r3 + orr ip, r1, r2, asr #16 + blt 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(if_icmpge) if_icmpge_unsafe { + POP2 r3, tmp1 + mov r2, r2, lsl #24 + cmp tmp1, r3 + orr ip, r1, r2, asr #16 + bge 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(if_icmpgt) if_icmpgt_unsafe { + POP2 r3, tmp1 + mov r2, r2, lsl #24 + cmp tmp1, r3 + orr ip, r1, r2, asr #16 + bgt 1f + mov ip, #3 +1: + ldrb r0, [jpc, ip]! + DISPATCH_BYTECODE +} + +(if_icmple) if_icmple_unsafe { + POP2 r3, tmp1 + mov r2, r2, lsl #24 + cmp