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

Side by Side Diff: src/heap.h

Issue 167423004: Add filler at the new space top when forcing scavenge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove PerformScavenge Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap.cc » ('j') | test/cctest/test-mementos.cc » ('J')
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 // 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 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 // Check whether the heap is currently iterable. 1252 // Check whether the heap is currently iterable.
1253 bool IsHeapIterable(); 1253 bool IsHeapIterable();
1254 1254
1255 // Ensure that we have swept all spaces in such a way that we can iterate 1255 // Ensure that we have swept all spaces in such a way that we can iterate
1256 // over all objects. May cause a GC. 1256 // over all objects. May cause a GC.
1257 void EnsureHeapIsIterable(); 1257 void EnsureHeapIsIterable();
1258 1258
1259 // Notify the heap that a context has been disposed. 1259 // Notify the heap that a context has been disposed.
1260 int NotifyContextDisposed(); 1260 int NotifyContextDisposed();
1261 1261
1262 // Utility to invoke the scavenger. This is needed in test code to
1263 // ensure correct callback for weak global handles.
1264 void PerformScavenge();
1265
1266 inline void increment_scan_on_scavenge_pages() { 1262 inline void increment_scan_on_scavenge_pages() {
1267 scan_on_scavenge_pages_++; 1263 scan_on_scavenge_pages_++;
1268 if (FLAG_gc_verbose) { 1264 if (FLAG_gc_verbose) {
1269 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); 1265 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_);
1270 } 1266 }
1271 } 1267 }
1272 1268
1273 inline void decrement_scan_on_scavenge_pages() { 1269 inline void decrement_scan_on_scavenge_pages() {
1274 scan_on_scavenge_pages_--; 1270 scan_on_scavenge_pages_--;
1275 if (FLAG_gc_verbose) { 1271 if (FLAG_gc_verbose) {
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 // Pretenuring decisions are made based on feedback collected during new 2124 // Pretenuring decisions are made based on feedback collected during new
2129 // space evacuation. Note that between feedback collection and calling this 2125 // space evacuation. Note that between feedback collection and calling this
2130 // method object in old space must not move. 2126 // method object in old space must not move.
2131 // Right now we only process pretenuring feedback in high promotion mode. 2127 // Right now we only process pretenuring feedback in high promotion mode.
2132 void ProcessPretenuringFeedback(); 2128 void ProcessPretenuringFeedback();
2133 2129
2134 // Checks whether a global GC is necessary 2130 // Checks whether a global GC is necessary
2135 GarbageCollector SelectGarbageCollector(AllocationSpace space, 2131 GarbageCollector SelectGarbageCollector(AllocationSpace space,
2136 const char** reason); 2132 const char** reason);
2137 2133
2134 // Make sure there is a filler value behind the top of the new space
2135 // so that the GC does not confuse some unintialized/stale memory
2136 // with the allocation memento of the object at the top
2137 void EnsureFillerObjectAtTop();
2138
2138 // Performs garbage collection operation. 2139 // Performs garbage collection operation.
2139 // Returns whether there is a chance that another major GC could 2140 // Returns whether there is a chance that another major GC could
2140 // collect more garbage. 2141 // collect more garbage.
2141 bool CollectGarbage( 2142 bool CollectGarbage(
2142 GarbageCollector collector, 2143 GarbageCollector collector,
2143 const char* gc_reason, 2144 const char* gc_reason,
2144 const char* collector_reason, 2145 const char* collector_reason,
2145 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); 2146 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
2146 2147
2147 // Performs garbage collection 2148 // Performs garbage collection
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3114 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3114 3115
3115 private: 3116 private:
3116 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3117 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3117 }; 3118 };
3118 #endif // DEBUG 3119 #endif // DEBUG
3119 3120
3120 } } // namespace v8::internal 3121 } } // namespace v8::internal
3121 3122
3122 #endif // V8_HEAP_H_ 3123 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | test/cctest/test-mementos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698