OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // of -1 means no valid value is currently available. | 59 // of -1 means no valid value is currently available. |
60 // |has_duplicates| will be set to true if this process' GPU resource count is | 60 // |has_duplicates| will be set to true if this process' GPU resource count is |
61 // inflated because it is counting other processes' resources. | 61 // inflated because it is counting other processes' resources. |
62 virtual int64 GetGpuMemoryUsage(TaskId task_id, | 62 virtual int64 GetGpuMemoryUsage(TaskId task_id, |
63 bool* has_duplicates) const = 0; | 63 bool* has_duplicates) const = 0; |
64 | 64 |
65 // Returns the number of average idle CPU wakeups per second since the last | 65 // Returns the number of average idle CPU wakeups per second since the last |
66 // refresh cycle. A value of -1 means no valid value is currently available. | 66 // refresh cycle. A value of -1 means no valid value is currently available. |
67 virtual int GetIdleWakeupsPerSecond(TaskId task_id) const = 0; | 67 virtual int GetIdleWakeupsPerSecond(TaskId task_id) const = 0; |
68 | 68 |
69 // Returns the NaCl GDB debug stub port. A value of -1 means no valid value is | 69 // Returns the NaCl GDB debug stub port. A value of |
70 // currently available. | 70 // |nacl::kGdbDebugStubPortUnknown| means no valid value is currently |
| 71 // available. A value of -2 means NaCl is not enabled for this build. |
71 virtual int GetNaClDebugStubPort(TaskId task_id) const = 0; | 72 virtual int GetNaClDebugStubPort(TaskId task_id) const = 0; |
72 | 73 |
73 // On Windows, gets the current and peak number of GDI and USER handles in | 74 // On Windows, gets the current and peak number of GDI and USER handles in |
74 // use. A value of -1 means no valid value is currently available. | 75 // use. A value of -1 means no valid value is currently available. |
75 virtual void GetGDIHandles(TaskId task_id, | 76 virtual void GetGDIHandles(TaskId task_id, |
76 int64* current, | 77 int64* current, |
77 int64* peak) const = 0; | 78 int64* peak) const = 0; |
78 virtual void GetUSERHandles(TaskId task_id, | 79 virtual void GetUSERHandles(TaskId task_id, |
79 int64* current, | 80 int64* current, |
80 int64* peak) const = 0; | 81 int64* peak) const = 0; |
(...skipping 16 matching lines...) Expand all Loading... |
97 | 98 |
98 // Returns the type of the task with |task_id|. | 99 // Returns the type of the task with |task_id|. |
99 virtual Task::Type GetType(TaskId task_id) const = 0; | 100 virtual Task::Type GetType(TaskId task_id) const = 0; |
100 | 101 |
101 // Returns the network usage (in bytes per second) during the current refresh | 102 // Returns the network usage (in bytes per second) during the current refresh |
102 // cycle for the task with |task_id|. A value of -1 means no valid value is | 103 // cycle for the task with |task_id|. A value of -1 means no valid value is |
103 // currently available or that task has never been notified of any network | 104 // currently available or that task has never been notified of any network |
104 // usage. | 105 // usage. |
105 virtual int64 GetNetworkUsage(TaskId task_id) const = 0; | 106 virtual int64 GetNetworkUsage(TaskId task_id) const = 0; |
106 | 107 |
| 108 // Returns the total network usage (in bytes per second) during the current |
| 109 // refresh cycle for the process on which the task with |task_id| is running. |
| 110 // This is the sum of all the network usage of the individual tasks (that |
| 111 // can be gotten by the above GetNetworkUsage()). A value of -1 means network |
| 112 // usage calculation refresh is currently not available. |
| 113 virtual int64 GetProcessTotalNetworkUsage(TaskId task_id) const = 0; |
| 114 |
107 // Returns the Sqlite used memory (in bytes) for the task with |task_id|. | 115 // Returns the Sqlite used memory (in bytes) for the task with |task_id|. |
108 // A value of -1 means no valid value is currently available. | 116 // A value of -1 means no valid value is currently available. |
109 virtual int64 GetSqliteMemoryUsed(TaskId task_id) const = 0; | 117 virtual int64 GetSqliteMemoryUsed(TaskId task_id) const = 0; |
110 | 118 |
111 // Returns the allocated and used V8 memory (in bytes) for the task with | 119 // Returns the allocated and used V8 memory (in bytes) for the task with |
112 // |task_id|. A return value of false means no valid value is currently | 120 // |task_id|. A return value of false means no valid value is currently |
113 // available. | 121 // available. |
114 virtual bool GetV8Memory(TaskId task_id, | 122 virtual bool GetV8Memory(TaskId task_id, |
115 int64* allocated, | 123 int64* allocated, |
116 int64* used) const = 0; | 124 int64* used) const = 0; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 196 |
189 // The flags containing the enabled resources types calculations. | 197 // The flags containing the enabled resources types calculations. |
190 int64 enabled_resources_flags_; | 198 int64 enabled_resources_flags_; |
191 | 199 |
192 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); | 200 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); |
193 }; | 201 }; |
194 | 202 |
195 } // namespace task_management | 203 } // namespace task_management |
196 | 204 |
197 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 205 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
OLD | NEW |