From 6be30bdaf64771cb4c8ef071bd9b1653ea614e7a Mon Sep 17 00:00:00 2001 From: "joshuawarner32@gmail.com" Date: Fri, 1 May 2015 20:10:33 -0600 Subject: [PATCH] always include heapdump code, to eliminate one dimension of the build matrix --- README.md | 7 ------- makefile | 12 +++--------- src/avian/machine.h | 2 -- src/builtin.cpp | 4 ---- src/machine.cpp | 7 +++---- 5 files changed, 6 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 25ab033736..9e6430e23f 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,6 @@ certain flags described below, all of which are optional. mode={debug,debug-fast,fast,small} \ lzma= \ bootimage={true,false} \ - heapdump={true,false} \ tails={true,false} \ continuations={true,false} \ use-clang={true,false} \ @@ -132,12 +131,6 @@ specify both build-arch=x86_64 and arch=x86_64 on 64-bit systems where "uname -m" prints "i386". * _default:_ false - * `heapdump` - if true, implement avian.Machine.dumpHeap(String), -which, when called, will generate a snapshot of the heap in a -simple, ad-hoc format for memory profiling purposes. See -heapdump.cpp for details. - * _default:_ false - * `tails` - if true, optimize each tail call by replacing the caller's stack frame with the callee's. This convention ensures proper tail recursion, suitable for languages such as Scheme. This diff --git a/makefile b/makefile index 72b9079e30..aaaba0aef5 100755 --- a/makefile +++ b/makefile @@ -42,9 +42,6 @@ endif ifeq ($(bootimage),true) options := $(options)-bootimage endif -ifeq ($(heapdump),true) - options := $(options)-heapdump -endif ifeq ($(tails),true) options := $(options)-tails endif @@ -1239,7 +1236,8 @@ vm-sources = \ $(src)/classpath-$(classpath).cpp \ $(src)/builtin.cpp \ $(src)/jnienv.cpp \ - $(src)/process.cpp + $(src)/process.cpp \ + $(src)/heapdump.cpp vm-asm-sources = $(src)/$(arch).$(asm-format) @@ -1310,11 +1308,7 @@ heapwalk-objects = \ unittest-objects = $(call cpp-objects,$(unittest-sources),$(unittest),$(build)/unittest) -ifeq ($(heapdump),true) - vm-sources += $(src)/heapdump.cpp - vm-heapwalk-objects = $(heapwalk-objects) - cflags += -DAVIAN_HEAPDUMP -endif +vm-heapwalk-objects = $(heapwalk-objects) ifeq ($(tails),true) cflags += -DAVIAN_TAILS diff --git a/src/avian/machine.h b/src/avian/machine.h index f509758960..ccce529e6c 100644 --- a/src/avian/machine.h +++ b/src/avian/machine.h @@ -2554,7 +2554,6 @@ inline void NO_RETURN throw_(Thread* t, GcThrowable* e) t->exception = e; if (objectClass(t, e) == type(t, GcOutOfMemoryError::Type)) { -#ifdef AVIAN_HEAPDUMP if (not t->m->dumpedHeapOnOOM) { t->m->dumpedHeapOnOOM = true; const char* path = findProperty(t, "avian.heap.dump"); @@ -2566,7 +2565,6 @@ inline void NO_RETURN throw_(Thread* t, GcThrowable* e) } } } -#endif // AVIAN_HEAPDUMP if (AbortOnOutOfMemoryError) { fprintf(stderr, "OutOfMemoryError\n"); diff --git a/src/builtin.cpp b/src/builtin.cpp index 0a1e801aa9..979b52f6e1 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -300,8 +300,6 @@ extern "C" AVIAN_EXPORT int64_t JNICALL } } -#ifdef AVIAN_HEAPDUMP - extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Machine_dumpHeap(Thread* t, object, uintptr_t* arguments) { @@ -326,8 +324,6 @@ extern "C" AVIAN_EXPORT void JNICALL } } -#endif // AVIAN_HEAPDUMP - extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Machine_tryNative(Thread* t, object, uintptr_t* arguments) { diff --git a/src/machine.cpp b/src/machine.cpp index b133856937..cd1d1acc0c 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -3338,12 +3338,11 @@ void boot(Thread* t) = makeMethod(t, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bootCode); PROTECT(t, bootMethod); -#include "type-java-initializations.cpp" +# include "type-java-initializations.cpp" +# include "type-name-initializations.cpp" -//#ifdef AVIAN_HEAPDUMP -#include "type-name-initializations.cpp" - //#endif } + } class HeapClient : public Heap::Client {