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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // returns the CPU usage in percent for the process on which the task with | 54 // returns the CPU usage in percent for the process on which the task with |
55 // |task_id| is running during the current refresh cycle. | 55 // |task_id| is running during the current refresh cycle. |
56 virtual double GetCpuUsage(TaskId task_id) const = 0; | 56 virtual double GetCpuUsage(TaskId task_id) const = 0; |
57 | 57 |
58 // Returns the current physical/private/shared memory usage of the task with | 58 // Returns the current physical/private/shared memory usage of the task with |
59 // |task_id| in bytes. A value of -1 means no valid value is currently | 59 // |task_id| in bytes. A value of -1 means no valid value is currently |
60 // available. | 60 // available. |
61 virtual int64_t GetPhysicalMemoryUsage(TaskId task_id) const = 0; | 61 virtual int64_t GetPhysicalMemoryUsage(TaskId task_id) const = 0; |
62 virtual int64_t GetPrivateMemoryUsage(TaskId task_id) const = 0; | 62 virtual int64_t GetPrivateMemoryUsage(TaskId task_id) const = 0; |
63 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; | 63 virtual int64_t GetSharedMemoryUsage(TaskId task_id) const = 0; |
| 64 virtual int64_t GetSwappedMemoryUsage(TaskId task_id) const = 0; |
64 | 65 |
65 // Returns the GPU memory usage of the task with |task_id| in bytes. A value | 66 // Returns the GPU memory usage of the task with |task_id| in bytes. A value |
66 // of -1 means no valid value is currently available. | 67 // of -1 means no valid value is currently available. |
67 // |has_duplicates| will be set to true if this process' GPU resource count is | 68 // |has_duplicates| will be set to true if this process' GPU resource count is |
68 // inflated because it is counting other processes' resources. | 69 // inflated because it is counting other processes' resources. |
69 virtual int64_t GetGpuMemoryUsage(TaskId task_id, | 70 virtual int64_t GetGpuMemoryUsage(TaskId task_id, |
70 bool* has_duplicates) const = 0; | 71 bool* has_duplicates) const = 0; |
71 | 72 |
72 // Returns the number of average idle CPU wakeups per second since the last | 73 // Returns the number of average idle CPU wakeups per second since the last |
73 // refresh cycle. A value of -1 means no valid value is currently available. | 74 // refresh cycle. A value of -1 means no valid value is currently available. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 246 |
246 // The flags containing the enabled resources types calculations. | 247 // The flags containing the enabled resources types calculations. |
247 int64_t enabled_resources_flags_; | 248 int64_t enabled_resources_flags_; |
248 | 249 |
249 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); | 250 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); |
250 }; | 251 }; |
251 | 252 |
252 } // namespace task_management | 253 } // namespace task_management |
253 | 254 |
254 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ | 255 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ |
OLD | NEW |