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

Side by Side Diff: chrome/browser/task_manager/sampling/task_group.h

Issue 2593233003: Add a task manager column that shows memory state of processes (Closed)
Patch Set: fix compile error Created 3 years, 11 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/task_manager/sampling/task_group.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MANAGER_SAMPLING_TASK_GROUP_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_
6 #define CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ 6 #define CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/memory_coordinator_client.h"
15 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
16 #include "base/process/process_handle.h" 17 #include "base/process/process_handle.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
18 #include "chrome/browser/task_manager/providers/task.h" 19 #include "chrome/browser/task_manager/providers/task.h"
19 #include "chrome/browser/task_manager/sampling/task_group_sampler.h" 20 #include "chrome/browser/task_manager/sampling/task_group_sampler.h"
20 #include "chrome/browser/task_manager/task_manager_observer.h" 21 #include "chrome/browser/task_manager/task_manager_observer.h"
21 22
22 namespace gpu { 23 namespace gpu {
23 struct VideoMemoryUsageStats; 24 struct VideoMemoryUsageStats;
24 } 25 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 69
69 double cpu_usage() const { return cpu_usage_; } 70 double cpu_usage() const { return cpu_usage_; }
70 int64_t private_bytes() const { return memory_usage_.private_bytes; } 71 int64_t private_bytes() const { return memory_usage_.private_bytes; }
71 int64_t shared_bytes() const { return memory_usage_.shared_bytes; } 72 int64_t shared_bytes() const { return memory_usage_.shared_bytes; }
72 int64_t physical_bytes() const { return memory_usage_.physical_bytes; } 73 int64_t physical_bytes() const { return memory_usage_.physical_bytes; }
73 #if defined(OS_CHROMEOS) 74 #if defined(OS_CHROMEOS)
74 int64_t swapped_bytes() const { return memory_usage_.swapped_bytes; } 75 int64_t swapped_bytes() const { return memory_usage_.swapped_bytes; }
75 #endif 76 #endif
76 int64_t gpu_memory() const { return gpu_memory_; } 77 int64_t gpu_memory() const { return gpu_memory_; }
77 bool gpu_memory_has_duplicates() const { return gpu_memory_has_duplicates_; } 78 bool gpu_memory_has_duplicates() const { return gpu_memory_has_duplicates_; }
79 base::MemoryState memory_state() const { return memory_state_; }
78 int64_t per_process_network_usage() const { 80 int64_t per_process_network_usage() const {
79 return per_process_network_usage_; 81 return per_process_network_usage_;
80 } 82 }
81 bool is_backgrounded() const { return is_backgrounded_; } 83 bool is_backgrounded() const { return is_backgrounded_; }
82 84
83 #if defined(OS_WIN) 85 #if defined(OS_WIN)
84 int64_t gdi_current_handles() const { return gdi_current_handles_; } 86 int64_t gdi_current_handles() const { return gdi_current_handles_; }
85 int64_t gdi_peak_handles() const { return gdi_peak_handles_; } 87 int64_t gdi_peak_handles() const { return gdi_peak_handles_; }
86 int64_t user_current_handles() const { return user_current_handles_; } 88 int64_t user_current_handles() const { return user_current_handles_; }
87 int64_t user_peak_handles() const { return user_peak_handles_; } 89 int64_t user_peak_handles() const { return user_peak_handles_; }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 140
139 // Flags will be used to determine when the background calculations has 141 // Flags will be used to determine when the background calculations has
140 // completed for the enabled refresh types for this TaskGroup. 142 // completed for the enabled refresh types for this TaskGroup.
141 int64_t expected_on_bg_done_flags_; 143 int64_t expected_on_bg_done_flags_;
142 int64_t current_on_bg_done_flags_; 144 int64_t current_on_bg_done_flags_;
143 145
144 // The per process resources usages. 146 // The per process resources usages.
145 double cpu_usage_; 147 double cpu_usage_;
146 MemoryUsageStats memory_usage_; 148 MemoryUsageStats memory_usage_;
147 int64_t gpu_memory_; 149 int64_t gpu_memory_;
150 base::MemoryState memory_state_;
148 // The network usage in bytes per second as the sum of all network usages of 151 // The network usage in bytes per second as the sum of all network usages of
149 // the individual tasks sharing the same process. 152 // the individual tasks sharing the same process.
150 int64_t per_process_network_usage_; 153 int64_t per_process_network_usage_;
151 #if defined(OS_WIN) 154 #if defined(OS_WIN)
152 // Windows GDI and USER Handles. 155 // Windows GDI and USER Handles.
153 int64_t gdi_current_handles_; 156 int64_t gdi_current_handles_;
154 int64_t gdi_peak_handles_; 157 int64_t gdi_peak_handles_;
155 int64_t user_current_handles_; 158 int64_t user_current_handles_;
156 int64_t user_peak_handles_; 159 int64_t user_peak_handles_;
157 #endif // defined(OS_WIN) 160 #endif // defined(OS_WIN)
(...skipping 11 matching lines...) Expand all
169 // Always keep this the last member of this class so that it's the first to be 172 // Always keep this the last member of this class so that it's the first to be
170 // destroyed. 173 // destroyed.
171 base::WeakPtrFactory<TaskGroup> weak_ptr_factory_; 174 base::WeakPtrFactory<TaskGroup> weak_ptr_factory_;
172 175
173 DISALLOW_COPY_AND_ASSIGN(TaskGroup); 176 DISALLOW_COPY_AND_ASSIGN(TaskGroup);
174 }; 177 };
175 178
176 } // namespace task_manager 179 } // namespace task_manager
177 180
178 #endif // CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_ 181 #endif // CHROME_BROWSER_TASK_MANAGER_SAMPLING_TASK_GROUP_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/task_manager/sampling/task_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698