| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 9b8bddad3d269d6223d614f96d95688276e2978a..b907130dc5a6c2abea1b8384882fd692400a4a85 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -2015,6 +2015,7 @@ Isolate::Isolate(bool enable_serializer)
|
| // be fixed once the default isolate cleanup is done.
|
| random_number_generator_(NULL),
|
| rail_mode_(PERFORMANCE_ANIMATION),
|
| + load_start_time_ms_(0),
|
| serializer_enabled_(enable_serializer),
|
| has_fatal_error_(false),
|
| initialized_from_snapshot_(false),
|
| @@ -3260,8 +3261,22 @@ void Isolate::CheckDetachedContextsAfterGC() {
|
| }
|
| }
|
|
|
| +double Isolate::LoadStartTimeMs() {
|
| + base::LockGuard<base::Mutex> guard(&rail_mutex_);
|
| + return load_start_time_ms_;
|
| +}
|
| +
|
| void Isolate::SetRAILMode(RAILMode rail_mode) {
|
| + RAILMode old_rail_mode = rail_mode_.Value();
|
| + if (old_rail_mode != PERFORMANCE_LOAD && rail_mode == PERFORMANCE_LOAD) {
|
| + base::LockGuard<base::Mutex> guard(&rail_mutex_);
|
| + load_start_time_ms_ = heap()->MonotonicallyIncreasingTimeInMs();
|
| + }
|
| rail_mode_.SetValue(rail_mode);
|
| + if (old_rail_mode == PERFORMANCE_LOAD && rail_mode != PERFORMANCE_LOAD) {
|
| + heap()->incremental_marking()->incremental_marking_job()->ScheduleTask(
|
| + heap());
|
| + }
|
| if (FLAG_trace_rail) {
|
| PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode));
|
| }
|
|
|