| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 #ifndef RUNTIME_VM_SAFEPOINT_H_ | 5 #ifndef RUNTIME_VM_SAFEPOINT_H_ |
| 6 #define RUNTIME_VM_SAFEPOINT_H_ | 6 #define RUNTIME_VM_SAFEPOINT_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
| 10 #include "vm/thread.h" | 10 #include "vm/thread.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // and also tracks the number of recursive safepoint operations on the | 84 // and also tracks the number of recursive safepoint operations on the |
| 85 // same thread. | 85 // same thread. |
| 86 int32_t safepoint_operation_count_; | 86 int32_t safepoint_operation_count_; |
| 87 | 87 |
| 88 // If a safepoint operation is currently in progress, this field contains | 88 // If a safepoint operation is currently in progress, this field contains |
| 89 // the thread that initiated the safepoint operation, otherwise it is NULL. | 89 // the thread that initiated the safepoint operation, otherwise it is NULL. |
| 90 Thread* owner_; | 90 Thread* owner_; |
| 91 | 91 |
| 92 friend class Isolate; | 92 friend class Isolate; |
| 93 friend class SafepointOperationScope; | 93 friend class SafepointOperationScope; |
| 94 friend class HeapIterationScope; |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 /* | 97 /* |
| 97 * Set of StackResource classes to track thread execution state transitions: | 98 * Set of StackResource classes to track thread execution state transitions: |
| 98 * | 99 * |
| 99 * kThreadInGenerated transitioning to | 100 * kThreadInGenerated transitioning to |
| 100 * ==> kThreadInVM: | 101 * ==> kThreadInVM: |
| 101 * - set_execution_state(kThreadInVM). | 102 * - set_execution_state(kThreadInVM). |
| 102 * - block if safepoint is requested. | 103 * - block if safepoint is requested. |
| 103 * ==> kThreadInNative: | 104 * ==> kThreadInNative: |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 368 } |
| 368 | 369 |
| 369 private: | 370 private: |
| 370 uint32_t execution_state_; | 371 uint32_t execution_state_; |
| 371 DISALLOW_COPY_AND_ASSIGN(TransitionToVM); | 372 DISALLOW_COPY_AND_ASSIGN(TransitionToVM); |
| 372 }; | 373 }; |
| 373 | 374 |
| 374 } // namespace dart | 375 } // namespace dart |
| 375 | 376 |
| 376 #endif // RUNTIME_VM_SAFEPOINT_H_ | 377 #endif // RUNTIME_VM_SAFEPOINT_H_ |
| OLD | NEW |