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

Side by Side Diff: src/heap/memory-reducer.h

Issue 2482163002: [heap] Remove js call rate heuristic from memory reducer. (Closed)
Patch Set: fix test Created 4 years, 1 month 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 | « src/api.cc ('k') | src/heap/memory-reducer.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_memory_reducer_H 5 #ifndef V8_HEAP_memory_reducer_H
6 #define V8_HEAP_memory_reducer_H 6 #define V8_HEAP_memory_reducer_H
7 7
8 #include "include/v8-platform.h" 8 #include "include/v8-platform.h"
9 #include "src/base/macros.h" 9 #include "src/base/macros.h"
10 #include "src/cancelable-task.h" 10 #include "src/cancelable-task.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // v8::internal::CancelableTask overrides. 142 // v8::internal::CancelableTask overrides.
143 void RunInternal() override; 143 void RunInternal() override;
144 MemoryReducer* memory_reducer_; 144 MemoryReducer* memory_reducer_;
145 DISALLOW_COPY_AND_ASSIGN(TimerTask); 145 DISALLOW_COPY_AND_ASSIGN(TimerTask);
146 }; 146 };
147 147
148 void NotifyTimer(const Event& event); 148 void NotifyTimer(const Event& event);
149 149
150 static bool WatchdogGC(const State& state, const Event& event); 150 static bool WatchdogGC(const State& state, const Event& event);
151 151
152 // Returns the rate of JS calls initiated from the API.
153 double SampleAndGetJsCallsPerMs(double time_ms);
154
155 Heap* heap_; 152 Heap* heap_;
156 State state_; 153 State state_;
157 unsigned int js_calls_counter_; 154 unsigned int js_calls_counter_;
158 double js_calls_sample_time_ms_; 155 double js_calls_sample_time_ms_;
159 156
160 // Used in cctest. 157 // Used in cctest.
161 friend class HeapTester; 158 friend class HeapTester;
162 DISALLOW_COPY_AND_ASSIGN(MemoryReducer); 159 DISALLOW_COPY_AND_ASSIGN(MemoryReducer);
163 }; 160 };
164 161
165 } // namespace internal 162 } // namespace internal
166 } // namespace v8 163 } // namespace v8
167 164
168 #endif // V8_HEAP_memory_reducer_H 165 #endif // V8_HEAP_memory_reducer_H
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap/memory-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698