OLD | NEW |
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 4196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4207 } | 4207 } |
4208 | 4208 |
4209 shared2 = inner_scope.CloseAndEscape(handle(f->shared(), isolate)); | 4209 shared2 = inner_scope.CloseAndEscape(handle(f->shared(), isolate)); |
4210 } | 4210 } |
4211 | 4211 |
4212 // Simulate incremental marking and collect code flushing candidates. | 4212 // Simulate incremental marking and collect code flushing candidates. |
4213 SimulateIncrementalMarking(heap); | 4213 SimulateIncrementalMarking(heap); |
4214 CHECK(shared1->code()->gc_metadata() != NULL); | 4214 CHECK(shared1->code()->gc_metadata() != NULL); |
4215 | 4215 |
4216 // Optimize function and make sure the unoptimized code is replaced. | 4216 // Optimize function and make sure the unoptimized code is replaced. |
4217 #ifdef DEBUG | |
4218 FLAG_stop_at = "f"; | |
4219 #endif | |
4220 CompileRun("%OptimizeFunctionOnNextCall(g);" | 4217 CompileRun("%OptimizeFunctionOnNextCall(g);" |
4221 "g(false);"); | 4218 "g(false);"); |
4222 | 4219 |
4223 // Finish garbage collection cycle. | 4220 // Finish garbage collection cycle. |
4224 heap->CollectAllGarbage(); | 4221 heap->CollectAllGarbage(); |
4225 CHECK(shared1->code()->gc_metadata() == NULL); | 4222 CHECK(shared1->code()->gc_metadata() == NULL); |
4226 } | 4223 } |
4227 | 4224 |
4228 | 4225 |
4229 TEST(Regress169928) { | 4226 TEST(Regress169928) { |
(...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6490 isolate->IncrementJsCallsFromApiCounter(); | 6487 isolate->IncrementJsCallsFromApiCounter(); |
6491 isolate->IncrementJsCallsFromApiCounter(); | 6488 isolate->IncrementJsCallsFromApiCounter(); |
6492 isolate->IncrementJsCallsFromApiCounter(); | 6489 isolate->IncrementJsCallsFromApiCounter(); |
6493 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); | 6490 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); |
6494 CheckDoubleEquals(2, calls_per_ms); | 6491 CheckDoubleEquals(2, calls_per_ms); |
6495 } | 6492 } |
6496 | 6493 |
6497 | 6494 |
6498 } // namespace internal | 6495 } // namespace internal |
6499 } // namespace v8 | 6496 } // namespace v8 |
OLD | NEW |