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

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

Issue 1625753002: Allocation sampling for paged/lo spaces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 namespace v8 { 46 namespace v8 {
47 namespace internal { 47 namespace internal {
48 48
49 49
50 struct Heap::StrongRootsList { 50 struct Heap::StrongRootsList {
51 Object** start; 51 Object** start;
52 Object** end; 52 Object** end;
53 StrongRootsList* next; 53 StrongRootsList* next;
54 }; 54 };
55 55
56 class IdleScavengeObserver : public InlineAllocationObserver { 56 class IdleScavengeObserver : public AllocationObserver {
57 public: 57 public:
58 IdleScavengeObserver(Heap& heap, intptr_t step_size) 58 IdleScavengeObserver(Heap& heap, intptr_t step_size)
59 : InlineAllocationObserver(step_size), heap_(heap) {} 59 : AllocationObserver(&heap, step_size), heap_(heap) {}
60 60
61 void Step(int bytes_allocated, Address, size_t) override { 61 void Step(int bytes_allocated, Address, size_t) override {
62 heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated); 62 heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated);
63 } 63 }
64 64
65 private: 65 private:
66 Heap& heap_; 66 Heap& heap_;
67 }; 67 };
68 68
69 69
(...skipping 6174 matching lines...) Expand 10 before | Expand all | Expand 10 after
6244 } 6244 }
6245 6245
6246 6246
6247 // static 6247 // static
6248 int Heap::GetStaticVisitorIdForMap(Map* map) { 6248 int Heap::GetStaticVisitorIdForMap(Map* map) {
6249 return StaticVisitorBase::GetVisitorId(map); 6249 return StaticVisitorBase::GetVisitorId(map);
6250 } 6250 }
6251 6251
6252 } // namespace internal 6252 } // namespace internal
6253 } // namespace v8 6253 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698