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

Unified Diff: snapshot/win/process_reader_win.h

Issue 1119393003: win: Add support for CPUTimes and StartTime to snapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@generate-dump
Patch Set: Created 5 years, 8 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 | snapshot/win/process_reader_win.cc » ('j') | snapshot/win/process_reader_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/process_reader_win.h
diff --git a/snapshot/win/process_reader_win.h b/snapshot/win/process_reader_win.h
index b570a5e82c6b27dfce2ba3649360f38dd48b576c..8862ce093aace6735670fdadfbd3096b6eabc903 100644
--- a/snapshot/win/process_reader_win.h
+++ b/snapshot/win/process_reader_win.h
@@ -15,6 +15,7 @@
#ifndef CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
#define CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
+#include <sys/time.h>
#include <windows.h>
#include "util/misc/initialization_state_dcheck.h"
@@ -48,6 +49,26 @@ class ProcessReaderWin {
bool ReadMemory(WinVMAddress at, WinVMSize num_bytes, void* into);
+ //! \brief Determines the target process' start time.
+ //!
+ //! \param[out] start_time The time that the process started.
+ //!
+ //! \return `true` on success, `false` on failure, with a warning logged. On
+ //! failure, \a start_time will be set to represent the epoch.
Mark Mentovai 2015/05/04 21:29:23 It’s OK to leave start_time undefined as far as th
scottmg 2015/05/05 16:45:48 Done.
+ bool StartTime(timeval* start_time) const;
+
+ //! \brief Determines the target process' execution time.
+ //!
+ //! \param[out] user_time The amount of time the process has executed code in
+ //! user mode.
+ //! \param[out] system_time The amount of time the process has executed code
+ //! in kernel mode.
+ //!
+ //! \return `true` on success, `false` on failure, with a warning logged. On
+ //! failure, \a user_time and \a system_time will be set to represent no
+ //! time spent executing code in user or kernel mode.
+ bool CPUTimes(timeval* user_time, timeval* system_time) const;
+
//! \return The modules loaded in the process. The first element (at index
//! `0`) corresponds to the main executable.
const std::vector<ProcessInfo::Module>& Modules();
« no previous file with comments | « no previous file | snapshot/win/process_reader_win.cc » ('j') | snapshot/win/process_reader_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698