Commit Graph

2283 Commits

Author SHA1 Message Date
Joel Dice
af8e043989 fix windows cross build 2010-12-01 16:05:56 -07:00
Joel Dice
7164743009 fix Array.makeObjectArray regression 2010-12-01 15:44:09 -07:00
Joel Dice
8cbe323d52 update Avian_avian_Machine_dumpHeap to reflect classpath refactoring 2010-12-01 15:43:27 -07:00
Joel Dice
1722b68277 handle case of not-yet-started thread in setDaemon 2010-12-01 15:42:46 -07:00
Joel Dice
d00f4c5390 fix BufferedInputStream.read to not read more than specified length 2010-12-01 15:41:55 -07:00
Joel Dice
84520cde51 Merge remote branch 'origin/master' into openjdk 2010-12-01 14:40:58 -07:00
Joel Dice
6d1ad1e5ba intercept UnixFileSystem.checkAccess calls to handle embedded java home case 2010-12-01 13:40:43 -07:00
Joel Dice
8f06ac402a compare library to RTLD_DEFAULT, not zero in JVM_FindLibraryEntry
Although RTLD_DEFAULT is zero on Linux, it's not on OS X.
2010-12-01 09:54:29 -07:00
Joel Dice
6a7f651f79 fix OS X openjdk-src build 2010-12-01 08:33:00 -07:00
Joel Dice
4b1b3e032b add new array classes to classloader map upon creation
We were already doing this for non-array classes; we need to do it for
all classes or else risk creating duplicates.
2010-11-30 20:27:36 -07:00
Joel Dice
cca9a5ee0b build ProcessImpl_md.c as part of Windows openjdk-src build 2010-11-30 20:27:07 -07:00
Joel Dice
21a54cdf55 set java.protocol.handler.pkgs on Windows as well as Posix
Also, fix cut-and-paste error where we should have called
fieldAddendum instead of methodAddendum.
2010-11-30 20:25:48 -07:00
Joel Dice
1d9489a76e fix a couple of 64-bit-op-on-32-bit-system bugs
We weren't properly handling the case where a 64-bit value is
multipled with itself in multiplyRR, leading to wrong code.  Also,
addCarryCR didn't know how to handle constants more than 8-bits wide.
2010-11-30 16:58:51 -07:00
Joel Dice
19dca18cd0 disable Math.abs(long) intrinsic on 32-bit x86
It never worked and caused the compiler to crash instead due to an
impossible-to-fulfill constraint.
2010-11-30 11:36:18 -07:00
Joel Dice
8de53aeacc fix Windows openjdk-src build 2010-11-29 17:39:41 -07:00
Joel Dice
70a36c05b9 fix time==0 case in Unsafe.park and implement JVM_DumpThreads
Also, set name field on system threads for OpenJDK build to avoid NPEs
in Thread.getName.
2010-11-27 16:27:30 -07:00
Joel Dice
3cba6edf1f print path elements if DebugFind == true in parsePath 2010-11-27 16:27:22 -07:00
Joel Dice
0f04865e93 implement -jar option in main.cpp 2010-11-27 14:46:07 -07:00
Joel Dice
1f6ccbf5b7 meant to add my_net_util.c in previous commit 2010-11-27 14:45:38 -07:00
Joel Dice
adc5c95214 fix GC safety bug in resolveClass 2010-11-27 14:44:49 -07:00
Joel Dice
d4708907ea fix non-openjdk build 2010-11-27 11:31:34 -07:00
Joel Dice
e68dfe1e89 various fixes to get Eclipse 3.6 working
* add libnet.so and libnio.so to built-in libraries for openjdk-src build

 * implement sun.misc.Unsafe.park/unpark

 * implement JVM_SetClassSigners/JVM_GetClassSigners

 * etc.
2010-11-27 11:25:02 -07:00
Joel Dice
459f4d5194 fix openjdk-src bootimage build
The main change here is to use a lazily-populated vector to associate
runtime data with classes instead of referencing them directly from
the class which requires updating immutable references in the heap
image.  The other changes employ other strategies to avoid trying to
update immutable references.
2010-11-26 12:41:31 -07:00
Joel Dice
4f23601b56 fix corner cases which led to crashes in JIT compiler
Compiling the entire OpenJDK class library into a bootimage revealed
some corner cases which broke the compiler, including synchronization
in a finally block and gotos targeting the first instruction of an
unsynchronized method.
2010-11-26 12:36:43 -07:00
Joel Dice
9a676b4f1f fix OS X 10.4 PowerPC cross-build 2010-11-23 15:54:35 -07:00
Joel Dice
44fcc5c04e clean up properly if pthread_kill fails in MySystem::visit 2010-11-22 16:57:02 -07:00
Joel Dice
b8063285f3 fix deadlock MySystem::visit in posix.cpp
We must call notifyAll on visitLock after setting threadVisitor to
null in case another thread is waiting to do a visit of its own.
Otherwise, the latter thread will wait forever, eventually deadlocking
the whole VM at the next GC since it's in an active state.
2010-11-22 16:46:10 -07:00
Joel Dice
878e98954b add QueryDump heap dump analysis tool 2010-11-22 10:04:28 -07:00
Joel Dice
f9197cb076 fix a few HashMap bugs
1. HashMap.containsValue only checked one hash bucket, which was
 pretty much useless :)

 2. HashMap.MyIterator.remove was broken in that it failed to
 decrement the size field and it did not update the previousCell field
 properly, which sometimes led to more than one cell being removed.
2010-11-21 17:26:17 -07:00
Joel Dice
19dbc61e9f for heapdump=true builds, optionally generate dump on OOM
If the VM runs out of heap space and the "avian.heap.dump" system
property was specified at startup, the VM will write a heap dump to
the filename indicated by that property.  This dump may be analyzed
using e.g. DumpStats.java.
2010-11-18 10:55:00 -07:00
Joel Dice
7b85afedec ensure that sa_sigaction is non-null before attempting to call it 2010-11-18 10:24:58 -07:00
Joel Dice
86ed206f5a remove temporary debug code from posix.cpp 2010-11-18 10:19:48 -07:00
Joel Dice
aac85ff278 remove @Overload annotation since Java 1.5.0_19 chokes on it 2010-11-17 10:42:28 -07:00
Joel Dice
aea02e545f fix race condition in interrupting/joining threads as they are exiting
My recent commit to ensure that OS resources are released immediately
upon thread exit introduced a race condition where interrupting or
joining a thread as it exited could lead to attempts to use
already-released resources.  This commit adds locking to avoid the
race.
2010-11-16 10:50:19 -07:00
Joel Dice
3ff1f9c59f remove temporary debugging code from posix.cpp 2010-11-16 10:49:56 -07:00
Joel Dice
a611ccda6f Merge remote branch 'origin/master' into openjdk
Conflicts:
	makefile
	src/compile.cpp
	src/compiler.cpp
	src/type-generator.cpp
2010-11-16 10:18:08 -07:00
Joel Dice
937b7a7d34 Merge remote branch 'origin/arm' 2010-11-16 09:56:35 -07:00
Joel Dice
64601e6f3e name VM-internal classes for heapdump=true builds
This makes heap dumps more useful since these classes are now refered
to by name instead of number.

This commit also adds a couple of utilities for parsing heap dumps:
PrintDump and DumpStats.
2010-11-16 09:31:49 -07:00
Joel Dice
86188cfc04 fix OS X openjdk and openjdk-src builds 2010-11-15 20:28:53 -07:00
Joel Dice
bc326fb5e9 fix ARM bootimage=true build 2010-11-16 02:38:36 +00:00
Joel Dice
3fb834d008 fix pre-GCC-4.4 ARM build 2010-11-15 23:56:34 +00:00
Joel Dice
02bdec6f8c fix Cygwin/MSYS openjdk-src builds 2010-11-15 16:27:00 -07:00
Joel Dice
8e23893af0 fix PowerPC builds on OS X 10.5+
The primary change is to ensure we output a Mach-O file of appropriate
endianness when cross-compiling for an opposite-endian architecture.
Earlier versions of XCode's linker accepted files of either
endianness, reguardless of architecture, but later versions don't,
hence the change.
2010-11-14 18:45:37 -07:00
Joel Dice
6bf74bf380 optimize loads of constant values by using PC-relative addressing on ARM
Previously, loading an arbitrary 32-bit constant required up to four
instructions (128 bytes), since we did so one byte at a time via
immediate-mode operations.

The preferred way to load constants on ARM is via PC-relative
addressing, but this is challenging because immediate memory offsets
are limited to 4096 bytes in either direction.  We frequently need to
compile methods which are larger than 4096, or even 8192, bytes, so we
must intersperse code and data if we want to use PC-relative loads
everywhere.

This commit enables pervasive PC-relative loads by handling the
following cases:

 1. Method is shorter than 4096 bytes: append data table to end

 2. Method is longer than 4096 bytes, but no basic block is longer
 than 4096 bytes: insert data tables as necessary after blocks, taking
 care to minimize the total number of tables

 3. Method is longer than 4096 bytes, and some blocks are longer than
 4096 bytes: split large basic blocks and insert data tables as above
2010-11-13 19:42:29 -07:00
Joel Dice
46be43a0e3 fix MSYS OpenJDK build 2010-11-12 19:04:17 -07:00
Joel Dice
0ca6c3ed53 fix native Windows GCC 3.4 OpenJDK build 2010-11-12 18:29:12 -07:00
Joel Dice
26a59612bb fix native Windows GCC 3.4 build 2010-11-12 16:53:16 -07:00
Joel Dice
f21d2b68b8 fix another ARM immediate offset bug
Some memory operations can only handle 8-bit immediate values, so we
need to use a temporary register for those which don't fit.
2010-11-09 17:31:52 -07:00
Joel Dice
6f555d4202 minor code cleanup in compile.cpp 2010-11-09 17:31:42 -07:00
Joel Dice
f64d6c857b clean up OS resources immediately upon thread exit
Previously, we waited until the next GC to do this, but that can be
too long for workloads which create a lot of short-lived threads but
don't do much allocation.
2010-11-09 15:46:16 -07:00