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

Unified Diff: content/public/browser/render_process_host.h

Issue 9769011: Histogram times surrounding render crashes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
Index: content/public/browser/render_process_host.h
===================================================================
--- content/public/browser/render_process_host.h (revision 127735)
+++ content/public/browser/render_process_host.h (working copy)
@@ -49,6 +49,34 @@
this->exit_code = exit_code;
this->was_alive = was_alive;
}
+
+#if defined(OS_WIN)
+ void RecordProcessStats() {
+ have_process_times = false;
+ FILETIME win_creation_time;
+ FILETIME win_exit_time;
+ FILETIME win_kernel_time;
+ FILETIME win_user_time;
+ if (0 == GetProcessTimes(handle, &win_creation_time, &win_exit_time,
+ &win_kernel_time, &win_user_time)) {
+ DWORD error = GetLastError();
+ DLOG(ERROR) << "Error getting process data" << error;
+ }
+ user_duration = base::Time::FromFileTime(win_user_time) -
+ base::Time::Time();
+ kernel_duration = base::Time::FromFileTime(win_kernel_time) -
+ base::Time::Time();
+ run_duration = base::Time::FromFileTime(win_exit_time) -
+ base::Time::FromFileTime(win_creation_time);
+ have_process_times = true;
rvargas (doing something else) 2012/03/22 01:59:32 We should not set this flag to true (or read the t
jar (doing other things) 2012/03/22 02:06:44 <doh!> I left out my planned early return. Added
+ }
+
+ base::TimeDelta kernel_duration;
+ base::TimeDelta user_duration;
+ base::TimeDelta run_duration;
+ bool have_process_times;
+#endif // OS_WIN
+
base::ProcessHandle handle;
base::TerminationStatus status;
int exit_code;

Powered by Google App Engine
This is Rietveld 408576698