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

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

Issue 1310613004: Version 4.6.85.8 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.6
Patch Set: Created 5 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
« no previous file with comments | « include/v8-version.h ('k') | src/heap/heap.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 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 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 857
858 // Performs incremental marking steps of step_size_in_bytes as long as 858 // Performs incremental marking steps of step_size_in_bytes as long as
859 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute 859 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute
860 // an estimate increment. Returns the remaining time that cannot be used 860 // an estimate increment. Returns the remaining time that cannot be used
861 // for incremental marking anymore because a single step would exceed the 861 // for incremental marking anymore because a single step would exceed the
862 // deadline. 862 // deadline.
863 double AdvanceIncrementalMarking( 863 double AdvanceIncrementalMarking(
864 intptr_t step_size_in_bytes, double deadline_in_ms, 864 intptr_t step_size_in_bytes, double deadline_in_ms,
865 IncrementalMarking::StepActions step_actions); 865 IncrementalMarking::StepActions step_actions);
866 866
867 void FinalizeIncrementalMarkingIfComplete(const char* comment);
868
869 inline void increment_scan_on_scavenge_pages() { 867 inline void increment_scan_on_scavenge_pages() {
870 scan_on_scavenge_pages_++; 868 scan_on_scavenge_pages_++;
871 if (FLAG_gc_verbose) { 869 if (FLAG_gc_verbose) {
872 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); 870 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_);
873 } 871 }
874 } 872 }
875 873
876 inline void decrement_scan_on_scavenge_pages() { 874 inline void decrement_scan_on_scavenge_pages() {
877 scan_on_scavenge_pages_--; 875 scan_on_scavenge_pages_--;
878 if (FLAG_gc_verbose) { 876 if (FLAG_gc_verbose) {
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 // prepared by finishing the previous one. 1594 // prepared by finishing the previous one.
1597 void PrepareArrayBufferDiscoveryInNewSpace(); 1595 void PrepareArrayBufferDiscoveryInNewSpace();
1598 1596
1599 // An ArrayBuffer moved from new space to old space. 1597 // An ArrayBuffer moved from new space to old space.
1600 void PromoteArrayBuffer(Object* buffer); 1598 void PromoteArrayBuffer(Object* buffer);
1601 1599
1602 bool HasLowAllocationRate(); 1600 bool HasLowAllocationRate();
1603 bool HasHighFragmentation(); 1601 bool HasHighFragmentation();
1604 bool HasHighFragmentation(intptr_t used, intptr_t committed); 1602 bool HasHighFragmentation(intptr_t used, intptr_t committed);
1605 1603
1606 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; }
1607
1608 protected: 1604 protected:
1609 // Methods made available to tests. 1605 // Methods made available to tests.
1610 1606
1611 // Allocates a JS Map in the heap. 1607 // Allocates a JS Map in the heap.
1612 MUST_USE_RESULT AllocationResult 1608 MUST_USE_RESULT AllocationResult
1613 AllocateMap(InstanceType instance_type, int instance_size, 1609 AllocateMap(InstanceType instance_type, int instance_size,
1614 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); 1610 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND);
1615 1611
1616 // Allocates and initializes a new JavaScript object based on a 1612 // Allocates and initializes a new JavaScript object based on a
1617 // constructor. 1613 // constructor.
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
2703 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2699 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2704 2700
2705 private: 2701 private:
2706 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2702 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2707 }; 2703 };
2708 #endif // DEBUG 2704 #endif // DEBUG
2709 } 2705 }
2710 } // namespace v8::internal 2706 } // namespace v8::internal
2711 2707
2712 #endif // V8_HEAP_HEAP_H_ 2708 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698