Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: test/cctest/test-heap.cc

Issue 932823002: Limit size of first page based on serialized data. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4975 matching lines...) Expand 10 before | Expand all | Expand 10 after
4986 #ifdef DEBUG 4986 #ifdef DEBUG
4987 TEST(PathTracer) { 4987 TEST(PathTracer) {
4988 CcTest::InitializeVM(); 4988 CcTest::InitializeVM();
4989 v8::HandleScope scope(CcTest::isolate()); 4989 v8::HandleScope scope(CcTest::isolate());
4990 4990
4991 v8::Local<v8::Value> result = CompileRun("'abc'"); 4991 v8::Local<v8::Value> result = CompileRun("'abc'");
4992 Handle<Object> o = v8::Utils::OpenHandle(*result); 4992 Handle<Object> o = v8::Utils::OpenHandle(*result);
4993 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4993 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4994 } 4994 }
4995 #endif // DEBUG 4995 #endif // DEBUG
4996
4997
4998 TEST(FirstPageFitsStartup) {
4999 // Test that the first page sizes provided by the default snapshot are large
5000 // enough to fit everything right after startup and creating one context.
5001 // If this test fails, we are allocating too much aside from deserialization.
5002 if (!Snapshot::HaveASnapshotToStartFrom()) return;
5003 if (Snapshot::EmbedsScript()) return;
5004 CcTest::InitializeVM();
5005 LocalContext env;
5006 PagedSpaces spaces(CcTest::heap());
5007 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) {
5008 int counter = 0;
5009 for (PageIterator it(s); it.has_next(); it.next()) counter++;
5010 CHECK_LE(counter, 1);
5011 }
5012 }
OLDNEW
« src/serialize.h ('K') | « src/snapshot-common.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698