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

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

Issue 15745004: Fix counting of scanned bytes in incremental marking step for large object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/incremental-marking.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after
3096 } 3096 }
3097 // An entire block of handles has been filled. 3097 // An entire block of handles has been filled.
3098 // Next handle would require a new block. 3098 // Next handle would require a new block.
3099 ASSERT(data->next == data->limit); 3099 ASSERT(data->next == data->limit);
3100 3100
3101 DeferredHandleScope deferred(isolate); 3101 DeferredHandleScope deferred(isolate);
3102 DummyVisitor visitor; 3102 DummyVisitor visitor;
3103 isolate->handle_scope_implementer()->Iterate(&visitor); 3103 isolate->handle_scope_implementer()->Iterate(&visitor);
3104 deferred.Detach(); 3104 deferred.Detach();
3105 } 3105 }
3106
3107
3108 TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) {
3109 CcTest::InitializeVM();
3110 v8::HandleScope scope(CcTest::isolate());
3111 CompileRun("function f(n) {"
3112 " var a = new Array(n);"
3113 " for (var i = 0; i < n; i += 100) a[i] = i;"
3114 "};"
3115 "f(10 * 1024 * 1024);");
3116 IncrementalMarking* marking = HEAP->incremental_marking();
3117 if (marking->IsStopped()) marking->Start();
3118 // This big step should be sufficient to mark the whole array.
3119 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3120 ASSERT(marking->IsComplete());
3121 }
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698