OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/message_handler.h" | 5 #include "vm/message_handler.h" |
6 #include "vm/port.h" | 6 #include "vm/port.h" |
7 #include "vm/dart.h" | 7 #include "vm/dart.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // The handler may have been deleted after this point. | 244 // The handler may have been deleted after this point. |
245 } | 245 } |
246 } | 246 } |
247 | 247 |
248 | 248 |
249 void MessageHandler::ClosePort(Dart_Port port) { | 249 void MessageHandler::ClosePort(Dart_Port port) { |
250 MonitorLocker ml(&monitor_); | 250 MonitorLocker ml(&monitor_); |
251 if (FLAG_trace_isolates) { | 251 if (FLAG_trace_isolates) { |
252 OS::Print("[-] Closing port:\n" | 252 OS::Print("[-] Closing port:\n" |
253 "\thandler: %s\n" | 253 "\thandler: %s\n" |
254 "\tport: %" Pd64 "\n", | 254 "\tport: %" Pd64 "\n" |
255 name(), port); | 255 "\tports: control(%" Pd ") live(%" Pd ")\n", |
| 256 name(), port, control_ports_, live_ports_); |
256 } | 257 } |
257 } | 258 } |
258 | 259 |
259 | 260 |
260 void MessageHandler::CloseAllPorts() { | 261 void MessageHandler::CloseAllPorts() { |
261 MonitorLocker ml(&monitor_); | 262 MonitorLocker ml(&monitor_); |
262 if (FLAG_trace_isolates) { | 263 if (FLAG_trace_isolates) { |
263 OS::Print("[-] Closing all ports:\n" | 264 OS::Print("[-] Closing all ports:\n" |
264 "\thandler: %s\n", | 265 "\thandler: %s\n", |
265 name()); | 266 name()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 299 |
299 void MessageHandler::decrement_control_ports() { | 300 void MessageHandler::decrement_control_ports() { |
300 MonitorLocker ml(&monitor_); | 301 MonitorLocker ml(&monitor_); |
301 #if defined(DEBUG) | 302 #if defined(DEBUG) |
302 CheckAccess(); | 303 CheckAccess(); |
303 #endif | 304 #endif |
304 control_ports_--; | 305 control_ports_--; |
305 } | 306 } |
306 | 307 |
307 } // namespace dart | 308 } // namespace dart |
OLD | NEW |