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

Side by Side Diff: src/heap/heap.cc

Issue 1885723002: disallow left-trim fast path when sampling heap profiler is active (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: explicitly trigger a scavenge in the test Created 4 years, 8 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
« no previous file with comments | « no previous file | src/profiler/heap-profiler.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after
3083 // At this point, we may be deserializing the heap from a snapshot, and 3083 // At this point, we may be deserializing the heap from a snapshot, and
3084 // none of the maps have been created yet and are NULL. 3084 // none of the maps have been created yet and are NULL.
3085 DCHECK((filler->map() == NULL && !deserialization_complete_) || 3085 DCHECK((filler->map() == NULL && !deserialization_complete_) ||
3086 filler->map()->IsMap()); 3086 filler->map()->IsMap());
3087 } 3087 }
3088 3088
3089 3089
3090 bool Heap::CanMoveObjectStart(HeapObject* object) { 3090 bool Heap::CanMoveObjectStart(HeapObject* object) {
3091 if (!FLAG_move_object_start) return false; 3091 if (!FLAG_move_object_start) return false;
3092 3092
3093 // Sampling heap profiler may have a reference to the object.
3094 if (isolate()->heap_profiler()->is_sampling_allocations()) return false;
3095
3093 Address address = object->address(); 3096 Address address = object->address();
3094 3097
3095 if (lo_space()->Contains(object)) return false; 3098 if (lo_space()->Contains(object)) return false;
3096 3099
3097 Page* page = Page::FromAddress(address); 3100 Page* page = Page::FromAddress(address);
3098 // We can move the object start if: 3101 // We can move the object start if:
3099 // (1) the object is not in old space, 3102 // (1) the object is not in old space,
3100 // (2) the page of the object was already swept, 3103 // (2) the page of the object was already swept,
3101 // (3) the page was already concurrently swept. This case is an optimization 3104 // (3) the page was already concurrently swept. This case is an optimization
3102 // for concurrent sweeping. The WasSwept predicate for concurrently swept 3105 // for concurrent sweeping. The WasSwept predicate for concurrently swept
(...skipping 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after
6447 } 6450 }
6448 6451
6449 6452
6450 // static 6453 // static
6451 int Heap::GetStaticVisitorIdForMap(Map* map) { 6454 int Heap::GetStaticVisitorIdForMap(Map* map) {
6452 return StaticVisitorBase::GetVisitorId(map); 6455 return StaticVisitorBase::GetVisitorId(map);
6453 } 6456 }
6454 6457
6455 } // namespace internal 6458 } // namespace internal
6456 } // namespace v8 6459 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/profiler/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698