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

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

Issue 641533004: Fix IdleNotificationFinishMarking test on slow devices. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « no previous file | 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 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 // since the completion threshold is not reached 2212 // since the completion threshold is not reached
2213 for (size_t i = 0; i < IncrementalMarking::kMaxIdleMarkingDelayCounter - 2; 2213 for (size_t i = 0; i < IncrementalMarking::kMaxIdleMarkingDelayCounter - 2;
2214 i++) { 2214 i++) {
2215 marking->Step(1 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD, 2215 marking->Step(1 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
2216 IncrementalMarking::FORCE_MARKING, 2216 IncrementalMarking::FORCE_MARKING,
2217 IncrementalMarking::DO_NOT_FORCE_COMPLETION); 2217 IncrementalMarking::DO_NOT_FORCE_COMPLETION);
2218 CHECK(!marking->IsIdleMarkingDelayCounterLimitReached()); 2218 CHECK(!marking->IsIdleMarkingDelayCounterLimitReached());
2219 } 2219 }
2220 2220
2221 // The next idle notification has to finish incremental marking. 2221 // The next idle notification has to finish incremental marking.
2222 const int kShortIdleTimeInMs = 1; 2222 const int kLongIdleTime = 1000000;
2223 CcTest::isolate()->IdleNotification(kShortIdleTimeInMs); 2223 CcTest::isolate()->IdleNotification(kLongIdleTime);
2224 CHECK_EQ(CcTest::heap()->gc_count(), 1); 2224 CHECK_EQ(CcTest::heap()->gc_count(), 1);
2225 } 2225 }
2226 2226
2227 2227
2228 // Test that HAllocateObject will always return an object in new-space. 2228 // Test that HAllocateObject will always return an object in new-space.
2229 TEST(OptimizedAllocationAlwaysInNewSpace) { 2229 TEST(OptimizedAllocationAlwaysInNewSpace) {
2230 i::FLAG_allow_natives_syntax = true; 2230 i::FLAG_allow_natives_syntax = true;
2231 CcTest::InitializeVM(); 2231 CcTest::InitializeVM();
2232 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return; 2232 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
2233 if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; 2233 if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after
4547 #ifdef DEBUG 4547 #ifdef DEBUG
4548 TEST(PathTracer) { 4548 TEST(PathTracer) {
4549 CcTest::InitializeVM(); 4549 CcTest::InitializeVM();
4550 v8::HandleScope scope(CcTest::isolate()); 4550 v8::HandleScope scope(CcTest::isolate());
4551 4551
4552 v8::Local<v8::Value> result = CompileRun("'abc'"); 4552 v8::Local<v8::Value> result = CompileRun("'abc'");
4553 Handle<Object> o = v8::Utils::OpenHandle(*result); 4553 Handle<Object> o = v8::Utils::OpenHandle(*result);
4554 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4554 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4555 } 4555 }
4556 #endif // DEBUG 4556 #endif // DEBUG
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698