From 6d39de064ce5283658ba67a4e5ee1614f2d8280d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 13 Feb 2013 08:48:32 -0700 Subject: [PATCH 1/4] update bootimage.cpp and heapwalk.cpp to reflect function renames --- src/bootimage.cpp | 6 +++--- src/heapwalk.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bootimage.cpp b/src/bootimage.cpp index 5a57a40e1c..111d850f97 100644 --- a/src/bootimage.cpp +++ b/src/bootimage.cpp @@ -14,7 +14,7 @@ #include "machine.h" #include "util.h" #include "stream.h" -#include "assembler.h" +#include "codegen/assembler.h" #include "target.h" #include "binaryToObject/tools.h" #include "lzma.h" @@ -31,7 +31,7 @@ namespace { const unsigned HeapCapacity = 512 * 1024 * 1024; const unsigned TargetFixieSizeInBytes = 8 + (TargetBytesPerWord * 2); -const unsigned TargetFixieSizeInWords = ceiling +const unsigned TargetFixieSizeInWords = ceilingDivide (TargetFixieSizeInBytes, TargetBytesPerWord); const unsigned TargetFixieAge = 0; const unsigned TargetFixieFlags = 2; @@ -787,7 +787,7 @@ targetSize(Thread* t, object typeMaps, object referer, unsigned refererOffset, { return (TargetBytesPerWord * 2) + pad - (ceiling + (ceilingDivide (objectMaskCount (classTypeMap(t, typeMaps, referer)), 32) * 4, TargetBytesPerWord); } else { diff --git a/src/heapwalk.cpp b/src/heapwalk.cpp index 69840abf16..8732d28497 100644 --- a/src/heapwalk.cpp +++ b/src/heapwalk.cpp @@ -228,7 +228,8 @@ inline object get(object o, unsigned offsetInWords) { return static_cast - (mask(fieldAtOffset(o, offsetInWords * BytesPerWord))); + (maskAlignedPointer + (fieldAtOffset(o, offsetInWords * BytesPerWord))); } unsigned @@ -297,7 +298,8 @@ class MyHeapWalker: public HeapWalker { Visitor(Context* c, HeapVisitor* v): c(c), v(v) { } virtual void visit(void* p) { - walk(c, v, static_cast(mask(*static_cast(p)))); + walk(c, v, static_cast + (maskAlignedPointer(*static_cast(p)))); } Context* c; From 144fdb8f4979a93253425010a84cf3393f18f9ac Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 13 Feb 2013 09:04:04 -0700 Subject: [PATCH 2/4] include util/runtime-array.h in windows.cpp to fix build --- src/windows.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/windows.cpp b/src/windows.cpp index 02ebfc72b5..5c85eb906e 100644 --- a/src/windows.cpp +++ b/src/windows.cpp @@ -25,6 +25,7 @@ #include "arch.h" #include "system.h" +#include "util/runtime-array.h" #if defined(WINAPI_FAMILY) From fd47c6f406b9664d3f8e95c7c2f0ebc845df79f0 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 13 Feb 2013 09:09:30 -0700 Subject: [PATCH 3/4] switch clean target back to deleting all generated files --- makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/makefile b/makefile index f62fcb2346..5b793c169a 100755 --- a/makefile +++ b/makefile @@ -1268,11 +1268,6 @@ clean-current: .PHONY: clean clean: - @echo "removing $(build)" - rm -rf $(build) - -.PHONY: clean-all -clean-all: @echo "removing build" rm -rf build From 4568ece4afb07ababbba580478dbbb808e03965a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 14 Feb 2013 08:36:45 -0700 Subject: [PATCH 4/4] add note about using an absolute path for the openjdk option --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1e35318627..52bf9c844e 100644 --- a/README.md +++ b/README.md @@ -249,9 +249,11 @@ where OpenJDK is installed, e.g.: This will build Avian as a conventional JVM (e.g. libjvm.so) which loads its boot class library and native libraries (e.g. libjava.so) -from _/usr/lib/jvm/java-7-openjdk/jre_ at runtime. In this configuration, -OpenJDK needs to remain installed for Avian to work, and you can run -applications like this: +from _/usr/lib/jvm/java-7-openjdk/jre_ at runtime. Note that you must +use an absolute path here, or else the result will not work when run +from other directories. In this configuration, OpenJDK needs to +remain installed for Avian to work, and you can run applications like +this: $ build/linux-x86_64-openjdk/avian-dynamic -cp /path/to/my/application \ com.example.MyApplication