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

Side by Side Diff: src/global-handles.h

Issue 885553005: Collect phantom callback data only once during gc. For scavenges, just consider the young handles r… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@weak-allocation-sites
Patch Set: Created 5 years, 10 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/global-handles.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_GLOBAL_HANDLES_H_ 5 #ifndef V8_GLOBAL_HANDLES_H_
6 #define V8_GLOBAL_HANDLES_H_ 6 #define V8_GLOBAL_HANDLES_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "include/v8-profiler.h" 9 #include "include/v8-profiler.h"
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // These handles are also included in NumberOfWeakHandles(). 158 // These handles are also included in NumberOfWeakHandles().
159 int NumberOfGlobalObjectWeakHandles(); 159 int NumberOfGlobalObjectWeakHandles();
160 160
161 // Returns the current number of handles to global objects. 161 // Returns the current number of handles to global objects.
162 int global_handles_count() const { 162 int global_handles_count() const {
163 return number_of_global_handles_; 163 return number_of_global_handles_;
164 } 164 }
165 165
166 // Collect up data for the weak handle callbacks after GC has completed, but 166 // Collect up data for the weak handle callbacks after GC has completed, but
167 // before memory is reclaimed. 167 // before memory is reclaimed.
168 void CollectPhantomCallbackData(); 168 void CollectAllPhantomCallbackData();
169
170 // Collect up data for the weak handle callbacks referenced by young
171 // generation after GC has completed, but before memory is reclaimed.
172 void CollectYoungPhantomCallbackData();
169 173
170 // Clear the weakness of a global handle. 174 // Clear the weakness of a global handle.
171 static void* ClearWeakness(Object** location); 175 static void* ClearWeakness(Object** location);
172 176
173 // Clear the weakness of a global handle. 177 // Clear the weakness of a global handle.
174 static void MarkIndependent(Object** location); 178 static void MarkIndependent(Object** location);
175 179
176 // Mark the reference to this object externaly unreachable. 180 // Mark the reference to this object externaly unreachable.
177 static void MarkPartiallyDependent(Object** location); 181 static void MarkPartiallyDependent(Object** location);
178 182
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 List<int> new_space_indices_; 430 List<int> new_space_indices_;
427 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; 431 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES];
428 432
429 DISALLOW_COPY_AND_ASSIGN(EternalHandles); 433 DISALLOW_COPY_AND_ASSIGN(EternalHandles);
430 }; 434 };
431 435
432 436
433 } } // namespace v8::internal 437 } } // namespace v8::internal
434 438
435 #endif // V8_GLOBAL_HANDLES_H_ 439 #endif // V8_GLOBAL_HANDLES_H_
OLDNEW
« no previous file with comments | « no previous file | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698