mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
fix heapdump=true build
This commit is contained in:
parent
00340cdc6b
commit
cae4b49005
3
makefile
3
makefile
@ -1869,7 +1869,8 @@ executable-objects = $(vm-objects) $(classpath-objects) $(driver-object) \
|
||||
$(javahome-object) $(boot-javahome-object) $(lzma-decode-objects)
|
||||
|
||||
unittest-executable-objects = $(unittest-objects) $(vm-objects) \
|
||||
$(build)/util/arg-parser.o $(stub-objects) $(lzma-decode-objects)
|
||||
$(vm-heapwalk-objects) $(build)/util/arg-parser.o $(stub-objects) \
|
||||
$(lzma-decode-objects)
|
||||
|
||||
ifeq ($(process),interpret)
|
||||
unittest-executable-objects += $(all-codegen-target-objects)
|
||||
|
@ -286,9 +286,10 @@ extern "C" AVIAN_EXPORT int64_t JNICALL
|
||||
extern "C" AVIAN_EXPORT void JNICALL
|
||||
Avian_avian_Machine_dumpHeap(Thread* t, object, uintptr_t* arguments)
|
||||
{
|
||||
object outputFile = reinterpret_cast<object>(*arguments);
|
||||
GcString* outputFile
|
||||
= static_cast<GcString*>(reinterpret_cast<object>(*arguments));
|
||||
|
||||
unsigned length = stringLength(t, outputFile);
|
||||
unsigned length = outputFile->length(t);
|
||||
THREAD_RUNTIME_ARRAY(t, char, n, length + 1);
|
||||
stringChars(t, outputFile, RUNTIME_ARRAY_BODY(n));
|
||||
FILE* out = vm::fopen(RUNTIME_ARRAY_BODY(n), "wb");
|
||||
|
@ -74,11 +74,10 @@ void dumpHeap(Thread* t, FILE* out)
|
||||
local::write4(out, local::objectSize(t, p));
|
||||
|
||||
if (objectClass(t, p) == type(t, GcClass::Type)) {
|
||||
object name = className(t, p);
|
||||
GcByteArray* name = static_cast<GcClass*>(p)->name();
|
||||
if (name) {
|
||||
local::write1(out, local::ClassName);
|
||||
local::writeString(
|
||||
out, &byteArrayBody(t, name, 0), byteArrayLength(t, name) - 1);
|
||||
local::writeString(out, name->body().begin(), name->length() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,5 +30,5 @@ if [ -z "${openjdk}" ]; then
|
||||
run make openjdk=$JAVA_HOME ${flags} ${test_target}
|
||||
fi
|
||||
fi
|
||||
run make ${flags} tails=true continuations=true ${test_target}
|
||||
run make ${flags} tails=true continuations=true heapdump=true ${test_target}
|
||||
run make ${flags} codegen-targets=all
|
||||
|
Loading…
Reference in New Issue
Block a user