| OLD | NEW |
| 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 BIN_VMSTATS_IMPL_H_ | 5 #ifndef BIN_VMSTATS_IMPL_H_ |
| 6 #define BIN_VMSTATS_IMPL_H_ | 6 #define BIN_VMSTATS_IMPL_H_ |
| 7 | 7 |
| 8 #include "bin/vmstats.h" | 8 #include "bin/vmstats.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 char* IsolatesStatus(); | 36 char* IsolatesStatus(); |
| 37 | 37 |
| 38 typedef std::map<IsolateData*, Dart_Isolate> IsolateTable; | 38 typedef std::map<IsolateData*, Dart_Isolate> IsolateTable; |
| 39 | 39 |
| 40 std::string root_directory_; | 40 std::string root_directory_; |
| 41 IsolateTable isolate_table_; | 41 IsolateTable isolate_table_; |
| 42 bool running_; | 42 bool running_; |
| 43 int64_t bind_address_; | 43 int64_t bind_address_; |
| 44 | 44 |
| 45 static VmStats* instance_; | 45 static VmStats* instance_; |
| 46 static dart::Monitor instance_monitor_; | 46 static dart::Monitor* instance_monitor_; |
| 47 | 47 |
| 48 // Disallow copy constructor. | 48 // Disallow copy constructor. |
| 49 DISALLOW_COPY_AND_ASSIGN(VmStats); | 49 DISALLOW_COPY_AND_ASSIGN(VmStats); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 | 52 |
| 53 // Status plug-in and linked-list node. | 53 // Status plug-in and linked-list node. |
| 54 class VmStatusPlugin { | 54 class VmStatusPlugin { |
| 55 public: | 55 public: |
| 56 explicit VmStatusPlugin(Dart_VmStatusCallback callback) | 56 explicit VmStatusPlugin(Dart_VmStatusCallback callback) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 82 // Returns VM status for a specified request. The caller is responsible | 82 // Returns VM status for a specified request. The caller is responsible |
| 83 // for releasing the heap memory after use. | 83 // for releasing the heap memory after use. |
| 84 static char* GetVmStatus(const char* request); | 84 static char* GetVmStatus(const char* request); |
| 85 | 85 |
| 86 static void InitOnce(); | 86 static void InitOnce(); |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 VmStatusService() : registered_plugin_list_(NULL) {} | 89 VmStatusService() : registered_plugin_list_(NULL) {} |
| 90 | 90 |
| 91 static VmStatusService* instance_; | 91 static VmStatusService* instance_; |
| 92 static dart::Mutex mutex_; | 92 static dart::Mutex* mutex_; |
| 93 | 93 |
| 94 VmStatusPlugin* registered_plugin_list_; | 94 VmStatusPlugin* registered_plugin_list_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(VmStatusService); | 96 DISALLOW_COPY_AND_ASSIGN(VmStatusService); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 #endif // BIN_VMSTATS_IMPL_H_ | 99 #endif // BIN_VMSTATS_IMPL_H_ |
| OLD | NEW |