Relax test expectations in BootUpMemoryUse.

R=dcarney@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11738004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2013-01-02 15:00:12 +00:00
parent 537d1d89b0
commit ddf70504cb
2 changed files with 11 additions and 10 deletions

View File

@ -56,10 +56,6 @@ test-profile-generator/RecordStackTraceAtStartProfiling: PASS || FAIL
# We do not yet shrink weak maps after they have been emptied by the GC
test-weakmaps/Shrinking: FAIL
# Measurement of memory consumption seems bogus.
# Revision 13291 only slightly decreases the size of the isolate.
test-mark-compact/BootUpMemoryUse: PASS || FAIL
##############################################################################
[ $arch == arm ]

View File

@ -473,6 +473,10 @@ static uintptr_t ReadLong(char* buffer, intptr_t* position, int base) {
}
// The memory use computed this way is not entirely accurate and depends on
// the way malloc allocates memory. That's why the memory use may seem to
// increase even though the sum of the allocated object sizes decreases. It
// also means that the memory use depends on the kernel and stdlib.
static intptr_t MemoryInUse() {
intptr_t memory_use = 0;
@ -538,17 +542,18 @@ TEST(BootUpMemoryUse) {
if (initial_memory >= 0) {
InitializeVM();
intptr_t delta = MemoryInUse() - initial_memory;
if (sizeof(initial_memory) == 8) {
printf("delta: %" V8_PTR_PREFIX "d kB\n", delta / 1024);
if (sizeof(initial_memory) == 8) { // 64-bit.
if (v8::internal::Snapshot::IsEnabled()) {
CHECK_LE(delta, 3600 * 1024); // 3396.
CHECK_LE(delta, 3700 * 1024);
} else {
CHECK_LE(delta, 4000 * 1024); // 3948.
CHECK_LE(delta, 4200 * 1024);
}
} else {
} else { // 32-bit.
if (v8::internal::Snapshot::IsEnabled()) {
CHECK_LE(delta, 2600 * 1024); // 2400.
CHECK_LE(delta, 2600 * 1024);
} else {
CHECK_LE(delta, 3000 * 1024); // 2920.
CHECK_LE(delta, 3000 * 1024);
}
}
}