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

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

Issue 1460063006: [heap] report allocated object to the inline-allocation-observers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix comments Created 5 years 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/heap/incremental-marking.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Object** start; 50 Object** start;
51 Object** end; 51 Object** end;
52 StrongRootsList* next; 52 StrongRootsList* next;
53 }; 53 };
54 54
55 class IdleScavengeObserver : public InlineAllocationObserver { 55 class IdleScavengeObserver : public InlineAllocationObserver {
56 public: 56 public:
57 IdleScavengeObserver(Heap& heap, intptr_t step_size) 57 IdleScavengeObserver(Heap& heap, intptr_t step_size)
58 : InlineAllocationObserver(step_size), heap_(heap) {} 58 : InlineAllocationObserver(step_size), heap_(heap) {}
59 59
60 virtual void Step(int bytes_allocated) { 60 void Step(int bytes_allocated, Address, size_t) override {
61 heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated); 61 heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated);
62 } 62 }
63 63
64 private: 64 private:
65 Heap& heap_; 65 Heap& heap_;
66 }; 66 };
67 67
68 68
69 Heap::Heap() 69 Heap::Heap()
70 : amount_of_external_allocated_memory_(0), 70 : amount_of_external_allocated_memory_(0),
(...skipping 6090 matching lines...) Expand 10 before | Expand all | Expand 10 after
6161 } 6161 }
6162 6162
6163 6163
6164 // static 6164 // static
6165 int Heap::GetStaticVisitorIdForMap(Map* map) { 6165 int Heap::GetStaticVisitorIdForMap(Map* map) {
6166 return StaticVisitorBase::GetVisitorId(map); 6166 return StaticVisitorBase::GetVisitorId(map);
6167 } 6167 }
6168 6168
6169 } // namespace internal 6169 } // namespace internal
6170 } // namespace v8 6170 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698