Commit Graph

39 Commits

Author SHA1 Message Date
4b9cb4f4e4 enable JMX support for openjdk-src build and implement GetInputArgumentArray 2011-08-05 18:06:29 -06:00
20091031da increase HeapCapacity to 256MB in bootimage.cpp
This is necessary to avoid running out of memory when building
bootimages of certain apps with OpenJDK using ProGuard'ed code.
2011-07-17 19:45:58 -06:00
e3662f13a9 update copyright years and increment version number 2011-07-13 08:25:21 -06:00
ab3929d411 fix PowerPC and ARM bootimage builds
This requires reducing HeapCapacity and CodeCapacity back to 128MB and
30MB respectively.  I had set them to larger values to test
non-ProGuard'ed OpenJDK bootimage builds, which naturally needed a lot
more space.  However, such builds aren't really useful in the real
world, and the compiler currently can't handle jumps or calls spanning
more than the maximum size of an immediate branch offset on ARM or
PowerPC, so I'm lowering them back down to more realistic values.
2011-02-20 05:59:36 +00:00
e4e0015005 fix GC safety issue in bootimage.cpp 2011-01-27 21:03:39 -07:00
5cedcf7833 remove unnecessary exception checks from bootimage.cpp 2011-01-27 11:53:53 -07:00
e16d5f83af Merge remote branch 'origin/master' into r0.5 2011-01-25 17:30:21 -07:00
c02bfc57a5 resolve primitive array classes when generating boot image
This is necessary to accomodate classes loaded at runtime which refer
to primitive array types.  Otherwise, they won't be included unless
classes in the bootimage refer to them.
2011-01-18 08:35:52 -07:00
afabe8e07e rework VM exception handling; throw OOMEs when appropriate
This rather large commit modifies the VM to use non-local returns to
throw exceptions instead of simply setting Thread::exception and
returning frame-by-frame as it used to.  This has several benefits:

 * Functions no longer need to check Thread::exception after each call
   which might throw an exception (which would be especially tedious
   and error-prone now that any function which allocates objects
   directly or indirectly might throw an OutOfMemoryError)

 * There's no need to audit the code for calls to functions which
   previously did not throw exceptions but later do

 * Performance should be improved slightly due to both the reduced
   need for conditionals and because undwinding now occurs in a single
   jump instead of a series of returns

The main disadvantages are:

 * Slightly higher overhead for entering and leaving the VM via the
   JNI and JDK methods

 * Non-local returns can make the code harder to read

 * We must be careful to register destructors for stack-allocated
   resources with the Thread so they can be called prior to a
   non-local return

The non-local return implementation is similar to setjmp/longjmp,
except it uses continuation-passing style to avoid the need for
cooperation from the C/C++ compiler.  Native C++ exceptions would have
also been an option, but that would introduce a dependence on
libstdc++, which we're trying to avoid for portability reasons.

Finally, this commit ensures that the VM throws an OutOfMemoryError
instead of aborting when it reaches its memory ceiling.  Currently, we
treat the ceiling as a soft limit and temporarily exceed it as
necessary to allow garbage collection and certain internal allocations
to succeed, but refuse to allocate any Java objects until the heap
size drops back below the ceiling.
2010-12-27 15:55:23 -07:00
d18240cbd6 check for stack overflow on entry to all non-leaf methods
We now check for stack overflow in the JIT build as well as the
interpreted build, throwing a StackOverflowError if the limit
(currently hard-coded to 64KB, but should be easy to make
configurable) is exceeded.
2010-12-19 15:23:19 -07:00
2d0ff83653 fix assertion abort when generating boot image
In makeCodeImage, we were passing zero to Promise::Listener::resolve,
which would lead to an assertion error if the address of the code
image was further from the base of the address space (i.e. zero) than
could be spanned by a jump on the target architecture.  Since, in this
context, we immediately overwrite the value stored, we may pass
whatever we want to this function (we're only calling it so we can
retrieve the location of the value in the image), and the code image
pointer is a better choice for the above reason.
2010-12-09 21:09:48 -07:00
a5742f5985 update copyright years 2010-12-05 20:21:09 -07:00
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
bf8eb52611 reduce CodeCapacity value to 16MB in bootimage.cpp
32MB was just slightly too large for PowerPC immediate call instructions
to span, and 16MB matches the JIT executable memory area we use in
compile.cpp.
2010-06-25 21:54:01 -06:00
39a82a4006 update bootimage.cpp to reflect BootImage restructuring 2010-06-15 19:49:48 -06:00
7a3bf85caf fix bootimage=true build for Windows 2009-12-02 20:08:07 -07:00
44a6620aa1 disable use of SSE when compiling ahead-of-time 2009-10-10 17:46:43 -06:00
6519047342 fix bootimage build 2009-09-03 09:06:04 -06:00
7060a5d4f0 clear Machine::byteArrayMap before generating boot image since it will not be used when the image is loaded 2009-07-28 17:22:07 -06:00
a4d4db8eb4 fix cygwin/msys bootimage build 2009-06-01 12:12:29 -06:00
11e61543a3 fix bootimage build 2009-05-31 21:16:58 -06:00
fea92ed995 more work on tail recursion
We now create a unique thunk for each vtable position so as to avoid
relying on using the return address to determine what method is to be
compiled and invoked, since we will not have the correct return address
in the case of a tail call.  This required refactoring how executable
memory is allocated in order to keep AOT compilation working.  Also, we
must always use the same register to hold the class pointer when
compiling virtual calls, and ensure that the pointer stays there until
the call instruction is executed so we know where to find it in the
thunk.
2009-04-05 15:42:10 -06:00
d1018bf078 update copyright years 2009-03-15 12:02:36 -06:00
49cd2dd9bf fix powerpc bootimage build (second try) 2009-03-10 19:08:16 -06:00
b5f76d96dc handle exception case in makeCodeImage 2009-03-06 17:10:31 -07:00
93142bb952 support filtering based on class name, method name, and method spec in
bootimage.cpp

This is useful for debugging the compiler, since it allows you to
compile one method in particular if that's where a bug manifests itself.
2009-02-14 13:23:31 -07:00
7ce35b212f fix GCC 4.0.1 uninitialized value warning 2008-12-18 10:10:19 -07:00
d4363d250a mark and fix up absolute addresses in boot image code 2008-12-02 09:45:20 -07:00
25ade1484a lots of bugfixes and refactoring 2008-12-01 19:38:00 -07:00
eaf30eb909 fix static class initialization when using a boot image 2008-11-29 21:58:09 -07:00
e44f326377 various bugfixes 2008-11-29 18:39:42 -07:00
0ec5ad3701 update makefile to optionally build and use a boot image; various bugfixes 2008-11-29 16:08:14 -07:00
4d1af63ed2 initial work on booting from boot image 2008-11-28 15:02:45 -07:00
d22a9ab270 visit constants in visitRoots so they are included in the final heap image 2008-11-28 11:33:11 -07:00
6dc181fad5 move allocation zone from makeCodeImage to writeBootImage so it stays in scope until after updateConstants is called 2008-11-27 21:58:04 -07:00
a8a030140c various bugfixes 2008-11-27 21:44:04 -07:00
f698c24ea6 delay resolving method call offsets until all methods have been compiled when creating a boot image 2008-11-27 13:59:40 -07:00
20cf42c5e4 more work on boot image creation 2008-11-23 16:58:01 -07:00
6500f1eff6 initial work to support boot image creation and use 2008-11-21 16:20:35 -07:00