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

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

Issue 12218034: Make the GC stress builder go green. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/regress/regress-165637.js » ('j') | 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 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "compilation-cache.h" 7 #include "compilation-cache.h"
8 #include "execution.h" 8 #include "execution.h"
9 #include "factory.h" 9 #include "factory.h"
10 #include "macro-assembler.h" 10 #include "macro-assembler.h"
(...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2623 SimulateIncrementalMarking(); 2623 SimulateIncrementalMarking();
2624 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 2624 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
2625 2625
2626 // Make a new closure that will get code installed from the code map. 2626 // Make a new closure that will get code installed from the code map.
2627 // Unoptimized code is missing and the deoptimizer will go ballistic. 2627 // Unoptimized code is missing and the deoptimizer will go ballistic.
2628 CompileRun("var g = mkClosure(); g('bozo');"); 2628 CompileRun("var g = mkClosure(); g('bozo');");
2629 } 2629 }
2630 2630
2631 2631
2632 TEST(Regress169209) { 2632 TEST(Regress169209) {
2633 i::FLAG_stress_compaction = false;
2633 i::FLAG_allow_natives_syntax = true; 2634 i::FLAG_allow_natives_syntax = true;
2634 i::FLAG_flush_code_incrementally = true; 2635 i::FLAG_flush_code_incrementally = true;
2635 InitializeVM(); 2636 InitializeVM();
2636 v8::HandleScope scope; 2637 v8::HandleScope scope;
2637 2638
2638 // Perform one initial GC to enable code flushing. 2639 // Perform one initial GC to enable code flushing.
2639 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); 2640 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
2640 2641
2641 // Prepare a shared function info eligible for code flushing for which 2642 // Prepare a shared function info eligible for code flushing for which
2642 // the unoptimized code will be replaced during optimization. 2643 // the unoptimized code will be replaced during optimization.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 // Now optimize the function so that it is taken off the candidate list. 2830 // Now optimize the function so that it is taken off the candidate list.
2830 { 2831 {
2831 HandleScope inner_scope; 2832 HandleScope inner_scope;
2832 CompileRun("%OptimizeFunctionOnNextCall(f); f(3);"); 2833 CompileRun("%OptimizeFunctionOnNextCall(f); f(3);");
2833 } 2834 }
2834 2835
2835 // This cycle will bust the heap and subsequent cycles will go ballistic. 2836 // This cycle will bust the heap and subsequent cycles will go ballistic.
2836 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 2837 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
2837 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 2838 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
2838 } 2839 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/regress/regress-165637.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698