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 5638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5649 i::FLAG_expose_gc = true; | 5649 i::FLAG_expose_gc = true; |
5650 CcTest::InitializeVM(); | 5650 CcTest::InitializeVM(); |
5651 v8::HandleScope scope(CcTest::isolate()); | 5651 v8::HandleScope scope(CcTest::isolate()); |
5652 Isolate* isolate = CcTest::i_isolate(); | 5652 Isolate* isolate = CcTest::i_isolate(); |
5653 Factory* factory = isolate->factory(); | 5653 Factory* factory = isolate->factory(); |
5654 Heap* heap = isolate->heap(); | 5654 Heap* heap = isolate->heap(); |
5655 | 5655 |
5656 Handle<Map> map1 = Map::Create(isolate, 1); | 5656 Handle<Map> map1 = Map::Create(isolate, 1); |
5657 Handle<Map> map2 = | 5657 Handle<Map> map2 = |
5658 Map::CopyWithField(map1, factory->NewStringFromStaticChars("foo"), | 5658 Map::CopyWithField(map1, factory->NewStringFromStaticChars("foo"), |
5659 HeapType::Any(isolate), NONE, Representation::Tagged(), | 5659 FieldType::Any(isolate), NONE, |
5660 OMIT_TRANSITION).ToHandleChecked(); | 5660 Representation::Tagged(), OMIT_TRANSITION) |
| 5661 .ToHandleChecked(); |
5661 | 5662 |
5662 int desired_offset = Page::kPageSize - map1->instance_size(); | 5663 int desired_offset = Page::kPageSize - map1->instance_size(); |
5663 | 5664 |
5664 // Allocate padding objects in old pointer space so, that object allocated | 5665 // Allocate padding objects in old pointer space so, that object allocated |
5665 // afterwards would end at the end of the page. | 5666 // afterwards would end at the end of the page. |
5666 SimulateFullSpace(heap->old_space()); | 5667 SimulateFullSpace(heap->old_space()); |
5667 int padding_size = desired_offset - Page::kObjectStartOffset; | 5668 int padding_size = desired_offset - Page::kObjectStartOffset; |
5668 CreatePadding(heap, padding_size, TENURED); | 5669 CreatePadding(heap, padding_size, TENURED); |
5669 | 5670 |
5670 Handle<JSObject> o = factory->NewJSObjectFromMap(map1, TENURED); | 5671 Handle<JSObject> o = factory->NewJSObjectFromMap(map1, TENURED); |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6439 isolate->IncrementJsCallsFromApiCounter(); | 6440 isolate->IncrementJsCallsFromApiCounter(); |
6440 isolate->IncrementJsCallsFromApiCounter(); | 6441 isolate->IncrementJsCallsFromApiCounter(); |
6441 isolate->IncrementJsCallsFromApiCounter(); | 6442 isolate->IncrementJsCallsFromApiCounter(); |
6442 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); | 6443 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); |
6443 CheckDoubleEquals(2, calls_per_ms); | 6444 CheckDoubleEquals(2, calls_per_ms); |
6444 } | 6445 } |
6445 | 6446 |
6446 | 6447 |
6447 } // namespace internal | 6448 } // namespace internal |
6448 } // namespace v8 | 6449 } // namespace v8 |
OLD | NEW |