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

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: fix whitespace error Created 5 years, 7 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') | no next file with comments »
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..ff687885b5483ec2126d451481ca867928c4e4f1 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,23 @@ 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.
+ 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.
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698