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

Unified Diff: chrome/browser/task_manager/sampling/shared_sampler.h

Issue 2238403003: Task manager: Get physical memory efficiently for all processes from SharedSampler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/task_manager/sampling/shared_sampler_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/sampling/shared_sampler.h
diff --git a/chrome/browser/task_manager/sampling/shared_sampler.h b/chrome/browser/task_manager/sampling/shared_sampler.h
index 004061a0dcaa4fcee4af96aa738408ca2fda9a72..def063488db11eaf4a92a8351dc611ab9a92e96e 100644
--- a/chrome/browser/task_manager/sampling/shared_sampler.h
+++ b/chrome/browser/task_manager/sampling/shared_sampler.h
@@ -40,13 +40,15 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
// when the refresh is done on the worker thread.
// These callbacks are passed via RegisterCallbacks.
using OnIdleWakeupsCallback = base::Callback<void(int)>;
+ using OnPhysicalMemoryCallback = base::Callback<void(int64_t)>;
// Returns a combination of refresh flags supported by the shared sampler.
int64_t GetSupportedFlags() const;
// Registers task group specific callbacks.
void RegisterCallbacks(base::ProcessId process_id,
- const OnIdleWakeupsCallback& on_idle_wakeups);
+ const OnIdleWakeupsCallback& on_idle_wakeups,
+ const OnPhysicalMemoryCallback& on_physical_memory);
// Unregisters task group specific callbacks.
void UnregisterCallbacks(base::ProcessId process_id);
@@ -68,6 +70,7 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
~Callbacks();
OnIdleWakeupsCallback on_idle_wakeups;
+ OnPhysicalMemoryCallback on_physical_memory;
private:
DISALLOW_COPY_AND_ASSIGN(Callbacks);
@@ -79,6 +82,7 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
struct RefreshResult {
base::ProcessId process_id;
int idle_wakeups_per_second;
+ int64_t physical_bytes;
};
typedef std::vector<RefreshResult> RefreshResults;
« no previous file with comments | « no previous file | chrome/browser/task_manager/sampling/shared_sampler_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698