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

Side by Side Diff: runtime/vm/thread_interrupter.h

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/tags.h ('k') | runtime/vm/thread_interrupter_android.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 (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 #ifndef VM_THREAD_INTERRUPTER_H_ 5 #ifndef VM_THREAD_INTERRUPTER_H_
6 #define VM_THREAD_INTERRUPTER_H_ 6 #define VM_THREAD_INTERRUPTER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/signal_handler.h" 9 #include "vm/signal_handler.h"
10 #include "vm/os_thread.h" 10 #include "vm/os_thread.h"
11 11
12 12
13 namespace dart { 13 namespace dart {
14 14
15 struct InterruptedThreadState { 15 struct InterruptedThreadState {
16 ThreadId tid; 16 ThreadId tid;
17 uintptr_t pc; 17 uintptr_t pc;
18 uintptr_t csp; 18 uintptr_t csp;
19 uintptr_t dsp; 19 uintptr_t dsp;
20 uintptr_t fp; 20 uintptr_t fp;
21 uintptr_t lr;
21 }; 22 };
22 23
23 // When a thread is interrupted the thread specific interrupt callback will be 24 // When a thread is interrupted the thread specific interrupt callback will be
24 // invoked. Each callback is given an InterruptedThreadState and the user data 25 // invoked. Each callback is given an InterruptedThreadState and the user data
25 // pointer. When inside a thread interrupt callback doing any of the following 26 // pointer. When inside a thread interrupt callback doing any of the following
26 // is forbidden: 27 // is forbidden:
27 // * Accessing TLS. 28 // * Accessing TLS.
28 // * Allocating memory. 29 // * Allocating memory.
29 // * Taking a lock. 30 // * Taking a lock.
30 typedef void (*ThreadInterruptCallback)(const InterruptedThreadState& state, 31 typedef void (*ThreadInterruptCallback)(const InterruptedThreadState& state,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 static void InstallSignalHandler(); 93 static void InstallSignalHandler();
93 94
94 friend class ThreadInterrupterVisitIsolates; 95 friend class ThreadInterrupterVisitIsolates;
95 }; 96 };
96 97
97 void ThreadInterruptNoOp(const InterruptedThreadState& state, void* data); 98 void ThreadInterruptNoOp(const InterruptedThreadState& state, void* data);
98 99
99 } // namespace dart 100 } // namespace dart
100 101
101 #endif // VM_THREAD_INTERRUPTER_H_ 102 #endif // VM_THREAD_INTERRUPTER_H_
OLDNEW
« no previous file with comments | « runtime/vm/tags.h ('k') | runtime/vm/thread_interrupter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698