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

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

Issue 1181263005: Make task manager memory data more efficient and meaningful. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust high threshold so it works with Dr Memory. Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TASK_MANAGER_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "chrome/browser/task_manager/resource_provider.h" 18 #include "chrome/browser/task_manager/resource_provider.h"
19 #include "chrome/browser/ui/host_desktop.h" 19 #include "chrome/browser/ui/host_desktop.h"
20 #include "content/public/common/gpu_memory_stats.h" 20 #include "content/public/common/gpu_memory_stats.h"
21 #include "third_party/WebKit/public/web/WebCache.h" 21 #include "third_party/WebKit/public/web/WebCache.h"
22 22
23 class PrefRegistrySimple; 23 class PrefRegistrySimple;
24 class PrivateWorkingSetSnapshot;
24 class TaskManagerModel; 25 class TaskManagerModel;
25 class TaskManagerModelGpuDataManagerObserver; 26 class TaskManagerModelGpuDataManagerObserver;
26 27
27 namespace base { 28 namespace base {
28 class ProcessMetrics; 29 class ProcessMetrics;
29 } 30 }
30 31
31 namespace content { 32 namespace content {
32 class WebContents; 33 class WebContents;
33 } 34 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 278
278 void Clear(); // Removes all items. 279 void Clear(); // Removes all items.
279 280
280 // Sends OnModelChanged() to all observers to inform them of significant 281 // Sends OnModelChanged() to all observers to inform them of significant
281 // changes to the model. 282 // changes to the model.
282 void ModelChanged(); 283 void ModelChanged();
283 284
284 // Updates the values for all rows. 285 // Updates the values for all rows.
285 void Refresh(); 286 void Refresh();
286 287
288 // Do a bulk repopulation of the physical_memory data on platforms where that
289 // is faster.
290 void RefreshPhysicalMemoryFromWorkingSetSnapshot();
291
287 void NotifyVideoMemoryUsageStats( 292 void NotifyVideoMemoryUsageStats(
288 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats); 293 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats);
289 294
290 void NotifyBytesRead(const net::URLRequest& request, int bytes_read); 295 void NotifyBytesRead(const net::URLRequest& request, int bytes_read);
291 296
292 void RegisterOnDataReadyCallback(const base::Closure& callback); 297 void RegisterOnDataReadyCallback(const base::Closure& callback);
293 298
294 void NotifyDataReady(); 299 void NotifyDataReady();
295 300
296 private: 301 private:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // Whether the IO thread is currently in the process of updating; accessed 527 // Whether the IO thread is currently in the process of updating; accessed
523 // only on the IO thread. 528 // only on the IO thread.
524 bool is_updating_byte_count_; 529 bool is_updating_byte_count_;
525 530
526 // Buffer for coalescing BytesReadParam so we don't have to post a task on 531 // Buffer for coalescing BytesReadParam so we don't have to post a task on
527 // each NotifyBytesRead() call. 532 // each NotifyBytesRead() call.
528 std::vector<BytesReadParam> bytes_read_buffer_; 533 std::vector<BytesReadParam> bytes_read_buffer_;
529 534
530 std::vector<base::Closure> on_data_ready_callbacks_; 535 std::vector<base::Closure> on_data_ready_callbacks_;
531 536
537 #if defined(OS_WIN)
538 scoped_ptr<PrivateWorkingSetSnapshot> working_set_snapshot_;
539 #endif
540
532 // All per-Resource values are stored here. 541 // All per-Resource values are stored here.
533 mutable PerResourceCache per_resource_cache_; 542 mutable PerResourceCache per_resource_cache_;
534 543
535 // All per-Process values are stored here. 544 // All per-Process values are stored here.
536 mutable PerProcessCache per_process_cache_; 545 mutable PerProcessCache per_process_cache_;
537 546
538 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); 547 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
539 }; 548 };
540 549
541 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 550 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/private_working_set_snapshot_win_unittest.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698