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

Side by Side Diff: runtime/vm/thread_interrupter_macos.cc

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « runtime/vm/thread_interrupter_android.cc ('k') | runtime/vm/thread_interrupter_win.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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include <errno.h> // NOLINT 8 #include <errno.h> // NOLINT
9 9
10 #include "vm/flags.h" 10 #include "vm/flags.h"
11 #include "vm/os.h" 11 #include "vm/os.h"
12 #include "vm/profiler.h" 12 #include "vm/profiler.h"
13 #include "vm/signal_handler.h" 13 #include "vm/signal_handler.h"
14 #include "vm/thread_interrupter.h" 14 #include "vm/thread_interrupter.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 #ifndef PRODUCT
19
18 DECLARE_FLAG(bool, thread_interrupter); 20 DECLARE_FLAG(bool, thread_interrupter);
19 DECLARE_FLAG(bool, trace_thread_interrupter); 21 DECLARE_FLAG(bool, trace_thread_interrupter);
20 22
21 class ThreadInterrupterMacOS : public AllStatic { 23 class ThreadInterrupterMacOS : public AllStatic {
22 public: 24 public:
23 static void ThreadInterruptSignalHandler(int signal, siginfo_t* info, 25 static void ThreadInterruptSignalHandler(int signal, siginfo_t* info,
24 void* context_) { 26 void* context_) {
25 if (signal != SIGPROF) { 27 if (signal != SIGPROF) {
26 return; 28 return;
27 } 29 }
(...skipping 26 matching lines...) Expand all
54 56
55 void ThreadInterrupter::InstallSignalHandler() { 57 void ThreadInterrupter::InstallSignalHandler() {
56 SignalHandler::Install(ThreadInterrupterMacOS::ThreadInterruptSignalHandler); 58 SignalHandler::Install(ThreadInterrupterMacOS::ThreadInterruptSignalHandler);
57 } 59 }
58 60
59 61
60 void ThreadInterrupter::RemoveSignalHandler() { 62 void ThreadInterrupter::RemoveSignalHandler() {
61 SignalHandler::Remove(); 63 SignalHandler::Remove();
62 } 64 }
63 65
66 #endif // !PRODUCT
67
64 } // namespace dart 68 } // namespace dart
65 69
66 #endif // defined(TARGET_OS_MACOS) 70 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/vm/thread_interrupter_android.cc ('k') | runtime/vm/thread_interrupter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698