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

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

Issue 2573183002: Add process start time and CPU time columns to task manager (Closed)
Patch Set: Add TODO comment for a bug, which will be addressed in another CL. Created 4 years 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
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 def063488db11eaf4a92a8351dc611ab9a92e96e..2132ec40198fd5a1c839ee52172ca465741ba85d 100644
--- a/chrome/browser/task_manager/sampling/shared_sampler.h
+++ b/chrome/browser/task_manager/sampling/shared_sampler.h
@@ -41,6 +41,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
// These callbacks are passed via RegisterCallbacks.
using OnIdleWakeupsCallback = base::Callback<void(int)>;
using OnPhysicalMemoryCallback = base::Callback<void(int64_t)>;
+ using OnStartTimeCallback = base::Callback<void(uint64_t)>;
+ using OnCpuTimeCallback = base::Callback<void(uint64_t)>;
// Returns a combination of refresh flags supported by the shared sampler.
int64_t GetSupportedFlags() const;
@@ -48,7 +50,9 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
// Registers task group specific callbacks.
void RegisterCallbacks(base::ProcessId process_id,
const OnIdleWakeupsCallback& on_idle_wakeups,
- const OnPhysicalMemoryCallback& on_physical_memory);
+ const OnPhysicalMemoryCallback& on_physical_memory,
+ const OnStartTimeCallback& on_start_time,
+ const OnCpuTimeCallback& on_cpu_time);
stanisc 2016/12/21 19:17:52 If we add any more callbacks we should consider re
chengx 2016/12/21 22:05:54 If I use 'Callbacks' for RegisterCallbacks() in sh
// Unregisters task group specific callbacks.
void UnregisterCallbacks(base::ProcessId process_id);
@@ -71,6 +75,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
OnIdleWakeupsCallback on_idle_wakeups;
OnPhysicalMemoryCallback on_physical_memory;
+ OnStartTimeCallback on_start_time;
+ OnCpuTimeCallback on_cpu_time;
private:
DISALLOW_COPY_AND_ASSIGN(Callbacks);
@@ -83,6 +89,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
base::ProcessId process_id;
int idle_wakeups_per_second;
int64_t physical_bytes;
+ uint64_t start_time; // in unit of 100 ns
brucedawson 2016/12/21 02:13:40 Should probably be "In units of 100 ns" (capitaliz
chengx 2016/12/21 22:05:54 Done.
+ uint64_t cpu_time; // in unit of 100 ns
};
typedef std::vector<RefreshResult> RefreshResults;

Powered by Google App Engine
This is Rietveld 408576698