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

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

Issue 25909002: Sampling profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/profiler_win.cc ('k') | runtime/vm/signal_handler_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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef VM_SIGNAL_HANDLER_H_
6 #define VM_SIGNAL_HANDLER_H_
7
8 #include "vm/allocation.h"
9 #include "vm/globals.h"
10
11 #if defined(TARGET_OS_LINUX)
12 #include <signal.h> // NOLINT
13 #include <ucontext.h> // NOLINT
14 #elif defined(TARGET_OS_ANDROID)
15 #include <signal.h> // NOLINT
16 #include <ucontext.h> // NOLINT
17 #elif defined(TARGET_OS_MACOS)
18 #include <signal.h> // NOLINT
19 #include <sys/ucontext.h> // NOLINT
20 #elif defined(TARGET_OS_WINDOWS)
21 // Stub out for windows.
22 struct siginfo_t;
23 struct mcontext_t;
24 struct sigset_t {
25 };
26 #endif
27
28 namespace dart {
29
30 typedef void (*SignalAction)(int signal, siginfo_t* info,
31 void* context);
32
33 class SignalHandler : public AllStatic {
34 public:
35 static void Install(SignalAction action);
36 static uintptr_t GetProgramCounter(const mcontext_t& mcontext);
37 static uintptr_t GetFramePointer(const mcontext_t& mcontext);
38 static uintptr_t GetStackPointer(const mcontext_t& mcontext);
39 private:
40 };
41
42
43 class ScopedSignalBlocker {
44 public:
45 ScopedSignalBlocker();
46 ~ScopedSignalBlocker();
47
48 private:
49 sigset_t old_;
50 };
51
52
53 } // namespace dart
54
55 #endif // VM_SIGNAL_HANDLER_H_
OLDNEW
« no previous file with comments | « runtime/vm/profiler_win.cc ('k') | runtime/vm/signal_handler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698