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

Side by Side Diff: runtime/bin/vmstats_impl.h

Issue 13603002: Added ctrl-\ command that dumps isolate stacks to dart binary. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
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 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>
11 11
12 #include "bin/isolate_data.h" 12 #include "bin/isolate_data.h"
13 #include "platform/thread.h" 13 #include "platform/thread.h"
14 14
15 // VmStats is a HTTP singleton service that reports status information 15 // VmStats is a HTTP singleton service that reports status information
16 // of the running VM. 16 // of the running VM.
17 17
18 class VmStats { 18 class VmStats {
19 public: 19 public:
20 static void Initialize();
21
20 static void Start(int port, const char* root_dir); 22 static void Start(int port, const char* root_dir);
21 static void Stop(); 23 static void Stop();
22 24
23 // Add and remove functions for the isolate_table, called by main.cc. 25 // Add and remove functions for the isolate_table, called by main.cc.
24 static void AddIsolate(IsolateData* isolate_data, Dart_Isolate isolate); 26 static void AddIsolate(IsolateData* isolate_data, Dart_Isolate isolate);
25 static void RemoveIsolate(IsolateData* isolate_data); 27 static void RemoveIsolate(IsolateData* isolate_data);
26 28
29 // Print stack traces of current isolates to stdout.
30 static void DumpStack();
31
27 private: 32 private:
28 VmStats() : root_directory_(NULL), running_(false), bind_address_(0) {} 33 VmStats() : root_directory_(NULL), running_(false), bind_address_(0) {}
29 34
35 static void StartServer(int port, const char* root_dir);
30 static void WebServer(uword bind_address); 36 static void WebServer(uword bind_address);
31 static void Shutdown(); 37 static void Shutdown();
32 38
33 // Status text generators. 39 // Status text generators.
34 char* IsolatesStatus(); 40 char* IsolatesStatus();
35 41
36 typedef std::map<IsolateData*, Dart_Isolate> IsolateTable; 42 typedef std::map<IsolateData*, Dart_Isolate> IsolateTable;
37 43
38 const char* root_directory_; 44 const char* root_directory_;
39 IsolateTable isolate_table_; 45 IsolateTable isolate_table_;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 94
89 static VmStatusService* instance_; 95 static VmStatusService* instance_;
90 static dart::Mutex* mutex_; 96 static dart::Mutex* mutex_;
91 97
92 VmStatusPlugin* registered_plugin_list_; 98 VmStatusPlugin* registered_plugin_list_;
93 99
94 DISALLOW_COPY_AND_ASSIGN(VmStatusService); 100 DISALLOW_COPY_AND_ASSIGN(VmStatusService);
95 }; 101 };
96 102
97 #endif // BIN_VMSTATS_IMPL_H_ 103 #endif // BIN_VMSTATS_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/vmstats_impl.cc » ('j') | runtime/bin/vmstats_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698