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

Side by Side Diff: src/heap.h

Issue 7867040: Reduce imprecision of incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 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') | src/incremental-marking.cc » ('J')
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 // 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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 1405
1406 bool ShouldWeGiveBackAPageToTheOS() { 1406 bool ShouldWeGiveBackAPageToTheOS() {
1407 last_empty_page_was_given_back_to_the_os_ = 1407 last_empty_page_was_given_back_to_the_os_ =
1408 !last_empty_page_was_given_back_to_the_os_; 1408 !last_empty_page_was_given_back_to_the_os_;
1409 return last_empty_page_was_given_back_to_the_os_; 1409 return last_empty_page_was_given_back_to_the_os_;
1410 } 1410 }
1411 1411
1412 void QueueMemoryChunkForFree(MemoryChunk* chunk); 1412 void QueueMemoryChunkForFree(MemoryChunk* chunk);
1413 void FreeQueuedChunks(); 1413 void FreeQueuedChunks();
1414 1414
1415 // Completely clear the Instanceof cache (to stop it keeping objects alive
1416 // around a GC).
1417 inline void CompletelyClearInstanceofCache();
1418
1415 private: 1419 private:
1416 Heap(); 1420 Heap();
1417 1421
1418 // This can be calculated directly from a pointer to the heap; however, it is 1422 // This can be calculated directly from a pointer to the heap; however, it is
1419 // more expedient to get at the isolate directly from within Heap methods. 1423 // more expedient to get at the isolate directly from within Heap methods.
1420 Isolate* isolate_; 1424 Isolate* isolate_;
1421 1425
1422 intptr_t code_range_size_; 1426 intptr_t code_range_size_;
1423 int reserved_semispace_size_; 1427 int reserved_semispace_size_;
1424 int max_semispace_size_; 1428 int max_semispace_size_;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 static void ScavengeStoreBufferCallback(Heap* heap, 1652 static void ScavengeStoreBufferCallback(Heap* heap,
1649 MemoryChunk* page, 1653 MemoryChunk* page,
1650 StoreBufferEvent event); 1654 StoreBufferEvent event);
1651 1655
1652 // Performs a major collection in the whole heap. 1656 // Performs a major collection in the whole heap.
1653 void MarkCompact(GCTracer* tracer); 1657 void MarkCompact(GCTracer* tracer);
1654 1658
1655 // Code to be run before and after mark-compact. 1659 // Code to be run before and after mark-compact.
1656 void MarkCompactPrologue(); 1660 void MarkCompactPrologue();
1657 1661
1658 // Completely clear the Instanceof cache (to stop it keeping objects alive
1659 // around a GC).
1660 inline void CompletelyClearInstanceofCache();
1661
1662 // Record statistics before and after garbage collection. 1662 // Record statistics before and after garbage collection.
1663 void ReportStatisticsBeforeGC(); 1663 void ReportStatisticsBeforeGC();
1664 void ReportStatisticsAfterGC(); 1664 void ReportStatisticsAfterGC();
1665 1665
1666 // Slow part of scavenge object. 1666 // Slow part of scavenge object.
1667 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 1667 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
1668 1668
1669 // Initializes a function with a shared part and prototype. 1669 // Initializes a function with a shared part and prototype.
1670 // Returns the function. 1670 // Returns the function.
1671 // Note: this code was factored out of AllocateFunction such that 1671 // Note: this code was factored out of AllocateFunction such that
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 2446
2447 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2447 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2448 }; 2448 };
2449 #endif // DEBUG || LIVE_OBJECT_LIST 2449 #endif // DEBUG || LIVE_OBJECT_LIST
2450 2450
2451 } } // namespace v8::internal 2451 } } // namespace v8::internal
2452 2452
2453 #undef HEAP 2453 #undef HEAP
2454 2454
2455 #endif // V8_HEAP_H_ 2455 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | src/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698