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

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: Fix nits and conflicts. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | 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 def063488db11eaf4a92a8351dc611ab9a92e96e..fd6a8c3fbf573ee0d2157f0f354f1445b9fd3b76 100644
--- a/chrome/browser/task_manager/sampling/shared_sampler.h
+++ b/chrome/browser/task_manager/sampling/shared_sampler.h
@@ -17,6 +17,7 @@
#include "base/process/process_handle.h"
#include "base/sequence_checker.h"
#include "base/sequenced_task_runner.h"
+#include "base/time/time.h"
#include "build/build_config.h"
namespace task_manager {
@@ -41,6 +42,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(base::Time)>;
+ using OnCpuTimeCallback = base::Callback<void(base::TimeDelta)>;
// Returns a combination of refresh flags supported by the shared sampler.
int64_t GetSupportedFlags() const;
@@ -48,7 +51,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);
// Unregisters task group specific callbacks.
void UnregisterCallbacks(base::ProcessId process_id);
@@ -71,6 +76,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 +90,8 @@ class SharedSampler : public base::RefCountedThreadSafe<SharedSampler> {
base::ProcessId process_id;
int idle_wakeups_per_second;
int64_t physical_bytes;
+ base::Time start_time;
+ base::TimeDelta cpu_time;
};
typedef std::vector<RefreshResult> RefreshResults;
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/task_manager/sampling/shared_sampler_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698