OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1379 | 1379 |
1380 void Isolate::Run() { | 1380 void Isolate::Run() { |
1381 message_handler()->Run(Dart::thread_pool(), | 1381 message_handler()->Run(Dart::thread_pool(), |
1382 RunIsolate, | 1382 RunIsolate, |
1383 ShutdownIsolate, | 1383 ShutdownIsolate, |
1384 reinterpret_cast<uword>(this)); | 1384 reinterpret_cast<uword>(this)); |
1385 } | 1385 } |
1386 | 1386 |
1387 | 1387 |
1388 void Isolate::AddClosureFunction(const Function& function) const { | 1388 void Isolate::AddClosureFunction(const Function& function) const { |
1389 // TODO(regis): remove once debugging complete. | |
1390 if (Compiler::IsBackgroundCompilation()) { | |
1391 Profiler::DumpStackTrace(true /*native*/); | |
regis
2016/04/28 17:53:35
Maybe you could also print the dart stack. The cal
srdjan
2016/04/28 18:16:18
There is no Dart stack in the background compilati
regis
2016/04/28 18:37:13
Duh, never mind :-)
| |
1392 UNREACHABLE(); | |
1393 } | |
1389 ASSERT(!Compiler::IsBackgroundCompilation()); | 1394 ASSERT(!Compiler::IsBackgroundCompilation()); |
1390 GrowableObjectArray& closures = | 1395 GrowableObjectArray& closures = |
1391 GrowableObjectArray::Handle(object_store()->closure_functions()); | 1396 GrowableObjectArray::Handle(object_store()->closure_functions()); |
1392 ASSERT(!closures.IsNull()); | 1397 ASSERT(!closures.IsNull()); |
1393 ASSERT(function.IsNonImplicitClosureFunction()); | 1398 ASSERT(function.IsNonImplicitClosureFunction()); |
1394 closures.Add(function, Heap::kOld); | 1399 closures.Add(function, Heap::kOld); |
1395 } | 1400 } |
1396 | 1401 |
1397 | 1402 |
1398 // If the linear lookup turns out to be too expensive, the list | 1403 // If the linear lookup turns out to be too expensive, the list |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2694 void IsolateSpawnState::DecrementSpawnCount() { | 2699 void IsolateSpawnState::DecrementSpawnCount() { |
2695 ASSERT(spawn_count_monitor_ != NULL); | 2700 ASSERT(spawn_count_monitor_ != NULL); |
2696 ASSERT(spawn_count_ != NULL); | 2701 ASSERT(spawn_count_ != NULL); |
2697 MonitorLocker ml(spawn_count_monitor_); | 2702 MonitorLocker ml(spawn_count_monitor_); |
2698 ASSERT(*spawn_count_ > 0); | 2703 ASSERT(*spawn_count_ > 0); |
2699 *spawn_count_ = *spawn_count_ - 1; | 2704 *spawn_count_ = *spawn_count_ - 1; |
2700 ml.Notify(); | 2705 ml.Notify(); |
2701 } | 2706 } |
2702 | 2707 |
2703 } // namespace dart | 2708 } // namespace dart |
OLD | NEW |