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

Side by Side Diff: src/isolate.cc

Issue 2218703004: Unify memory optimization modes and flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: x Created 4 years, 4 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 | « src/isolate.h ('k') | test/cctest/test-api.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 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 date_cache_(NULL), 1991 date_cache_(NULL),
1992 call_descriptor_data_(NULL), 1992 call_descriptor_data_(NULL),
1993 // TODO(bmeurer) Initialized lazily because it depends on flags; can 1993 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1994 // be fixed once the default isolate cleanup is done. 1994 // be fixed once the default isolate cleanup is done.
1995 random_number_generator_(NULL), 1995 random_number_generator_(NULL),
1996 rail_mode_(PERFORMANCE_ANIMATION), 1996 rail_mode_(PERFORMANCE_ANIMATION),
1997 serializer_enabled_(enable_serializer), 1997 serializer_enabled_(enable_serializer),
1998 has_fatal_error_(false), 1998 has_fatal_error_(false),
1999 initialized_from_snapshot_(false), 1999 initialized_from_snapshot_(false),
2000 is_tail_call_elimination_enabled_(true), 2000 is_tail_call_elimination_enabled_(true),
2001 is_isolate_in_background_(false),
2001 cpu_profiler_(NULL), 2002 cpu_profiler_(NULL),
2002 heap_profiler_(NULL), 2003 heap_profiler_(NULL),
2003 code_event_dispatcher_(new CodeEventDispatcher()), 2004 code_event_dispatcher_(new CodeEventDispatcher()),
2004 function_entry_hook_(NULL), 2005 function_entry_hook_(NULL),
2005 deferred_handles_head_(NULL), 2006 deferred_handles_head_(NULL),
2006 optimizing_compile_dispatcher_(NULL), 2007 optimizing_compile_dispatcher_(NULL),
2007 stress_deopt_count_(0), 2008 stress_deopt_count_(0),
2008 virtual_handler_register_(NULL), 2009 virtual_handler_register_(NULL),
2009 virtual_slot_register_(NULL), 2010 virtual_slot_register_(NULL),
2010 next_optimization_id_(0), 2011 next_optimization_id_(0),
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 } 3166 }
3166 } 3167 }
3167 3168
3168 void Isolate::SetRAILMode(RAILMode rail_mode) { 3169 void Isolate::SetRAILMode(RAILMode rail_mode) {
3169 rail_mode_.SetValue(rail_mode); 3170 rail_mode_.SetValue(rail_mode);
3170 if (FLAG_trace_rail) { 3171 if (FLAG_trace_rail) {
3171 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); 3172 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode));
3172 } 3173 }
3173 } 3174 }
3174 3175
3176 void Isolate::IsolateInBackgroundNotification() {
3177 is_isolate_in_background_ = false;
3178 heap()->ActivateMemoryReducerIfNeeded();
3179 }
3180
3181 void Isolate::IsolateInForegroundNotification() {
3182 is_isolate_in_background_ = true;
3183 }
3184
3175 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { 3185 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const {
3176 StackGuard* stack_guard = isolate_->stack_guard(); 3186 StackGuard* stack_guard = isolate_->stack_guard();
3177 #ifdef USE_SIMULATOR 3187 #ifdef USE_SIMULATOR
3178 // The simulator uses a separate JS stack. 3188 // The simulator uses a separate JS stack.
3179 Address jssp_address = Simulator::current(isolate_)->get_sp(); 3189 Address jssp_address = Simulator::current(isolate_)->get_sp();
3180 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); 3190 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address);
3181 if (jssp - gap < stack_guard->real_jslimit()) return true; 3191 if (jssp - gap < stack_guard->real_jslimit()) return true;
3182 #endif // USE_SIMULATOR 3192 #endif // USE_SIMULATOR
3183 return GetCurrentStackPosition() - gap < stack_guard->real_climit(); 3193 return GetCurrentStackPosition() - gap < stack_guard->real_climit();
3184 } 3194 }
(...skipping 10 matching lines...) Expand all
3195 // Then check whether this scope intercepts. 3205 // Then check whether this scope intercepts.
3196 if ((flag & intercept_mask_)) { 3206 if ((flag & intercept_mask_)) {
3197 intercepted_flags_ |= flag; 3207 intercepted_flags_ |= flag;
3198 return true; 3208 return true;
3199 } 3209 }
3200 return false; 3210 return false;
3201 } 3211 }
3202 3212
3203 } // namespace internal 3213 } // namespace internal
3204 } // namespace v8 3214 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698