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

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

Issue 1108133003: Shrink new space and uncommit from space in idle notification during long idle times. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/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 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 unsigned int maximum_size_scavenges_; 2059 unsigned int maximum_size_scavenges_;
2060 2060
2061 // TODO(hpayer): Allocation site pretenuring may make this method obsolete. 2061 // TODO(hpayer): Allocation site pretenuring may make this method obsolete.
2062 // Re-visit incremental marking heuristics. 2062 // Re-visit incremental marking heuristics.
2063 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } 2063 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; }
2064 2064
2065 void ConfigureInitialOldGenerationSize(); 2065 void ConfigureInitialOldGenerationSize();
2066 2066
2067 void SelectScavengingVisitorsTable(); 2067 void SelectScavengingVisitorsTable();
2068 2068
2069 void IdleMarkCompact(const char* message); 2069 void ReduceNewSpaceSize(bool is_long_idle_notification);
2070 2070
2071 bool TryFinalizeIdleIncrementalMarking( 2071 bool TryFinalizeIdleIncrementalMarking(
2072 double idle_time_in_ms, size_t size_of_objects, 2072 bool is_long_idle_notification, double idle_time_in_ms,
2073 size_t mark_compact_speed_in_bytes_per_ms); 2073 size_t size_of_objects, size_t mark_compact_speed_in_bytes_per_ms);
2074 2074
2075 void ClearObjectStats(bool clear_last_time_stats = false); 2075 void ClearObjectStats(bool clear_last_time_stats = false);
2076 2076
2077 inline void UpdateAllocationsHash(HeapObject* object); 2077 inline void UpdateAllocationsHash(HeapObject* object);
2078 inline void UpdateAllocationsHash(uint32_t value); 2078 inline void UpdateAllocationsHash(uint32_t value);
2079 inline void PrintAlloctionsHash(); 2079 inline void PrintAlloctionsHash();
2080 2080
2081 // Object counts and used memory by InstanceType 2081 // Object counts and used memory by InstanceType
2082 size_t object_counts_[OBJECT_STATS_COUNT]; 2082 size_t object_counts_[OBJECT_STATS_COUNT];
2083 size_t object_counts_last_time_[OBJECT_STATS_COUNT]; 2083 size_t object_counts_last_time_[OBJECT_STATS_COUNT];
(...skipping 23 matching lines...) Expand all
2107 2107
2108 MarkCompactCollector mark_compact_collector_; 2108 MarkCompactCollector mark_compact_collector_;
2109 2109
2110 StoreBuffer store_buffer_; 2110 StoreBuffer store_buffer_;
2111 2111
2112 Marking marking_; 2112 Marking marking_;
2113 2113
2114 IncrementalMarking incremental_marking_; 2114 IncrementalMarking incremental_marking_;
2115 2115
2116 GCIdleTimeHandler gc_idle_time_handler_; 2116 GCIdleTimeHandler gc_idle_time_handler_;
2117
2117 unsigned int gc_count_at_last_idle_gc_; 2118 unsigned int gc_count_at_last_idle_gc_;
2118 2119
2119 // These two counters are monotomically increasing and never reset. 2120 // These two counters are monotomically increasing and never reset.
2120 size_t full_codegen_bytes_generated_; 2121 size_t full_codegen_bytes_generated_;
2121 size_t crankshaft_codegen_bytes_generated_; 2122 size_t crankshaft_codegen_bytes_generated_;
2122 2123
2123 // If the --deopt_every_n_garbage_collections flag is set to a positive value, 2124 // If the --deopt_every_n_garbage_collections flag is set to a positive value,
2124 // this variable holds the number of garbage collections since the last 2125 // this variable holds the number of garbage collections since the last
2125 // deoptimization triggered by garbage collection. 2126 // deoptimization triggered by garbage collection.
2126 int gcs_since_last_deopt_; 2127 int gcs_since_last_deopt_;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2607 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2607 2608
2608 private: 2609 private:
2609 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2610 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2610 }; 2611 };
2611 #endif // DEBUG 2612 #endif // DEBUG
2612 } 2613 }
2613 } // namespace v8::internal 2614 } // namespace v8::internal
2614 2615
2615 #endif // V8_HEAP_HEAP_H_ 2616 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698