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

Side by Side Diff: snapshot/win/process_snapshot_win.cc

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 unified diff | Download patch
« no previous file with comments | « snapshot/win/process_reader_win.cc ('k') | util/win/time.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 92 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
93 return process_reader_.ParentProcessID(); 93 return process_reader_.ParentProcessID();
94 } 94 }
95 95
96 void ProcessSnapshotWin::SnapshotTime(timeval* snapshot_time) const { 96 void ProcessSnapshotWin::SnapshotTime(timeval* snapshot_time) const {
97 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 97 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
98 *snapshot_time = snapshot_time_; 98 *snapshot_time = snapshot_time_;
99 } 99 }
100 100
101 void ProcessSnapshotWin::ProcessStartTime(timeval* start_time) const { 101 void ProcessSnapshotWin::ProcessStartTime(timeval* start_time) const {
102 CHECK(false) << "TODO(scottmg)"; 102 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
103 process_reader_.StartTime(start_time);
103 } 104 }
104 105
105 void ProcessSnapshotWin::ProcessCPUTimes(timeval* user_time, 106 void ProcessSnapshotWin::ProcessCPUTimes(timeval* user_time,
106 timeval* system_time) const { 107 timeval* system_time) const {
107 CHECK(false) << "TODO(scottmg)"; 108 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
109 process_reader_.CPUTimes(user_time, system_time);
108 } 110 }
109 111
110 void ProcessSnapshotWin::ReportID(UUID* report_id) const { 112 void ProcessSnapshotWin::ReportID(UUID* report_id) const {
111 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 113 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
112 *report_id = report_id_; 114 *report_id = report_id_;
113 } 115 }
114 116
115 void ProcessSnapshotWin::ClientID(UUID* client_id) const { 117 void ProcessSnapshotWin::ClientID(UUID* client_id) const {
116 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 118 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
117 *client_id = client_id_; 119 *client_id = client_id_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 for (const ProcessInfo::Module& process_reader_module : 155 for (const ProcessInfo::Module& process_reader_module :
154 process_reader_modules) { 156 process_reader_modules) {
155 auto module = make_scoped_ptr(new internal::ModuleSnapshotWin()); 157 auto module = make_scoped_ptr(new internal::ModuleSnapshotWin());
156 if (module->Initialize(&process_reader_, process_reader_module)) { 158 if (module->Initialize(&process_reader_, process_reader_module)) {
157 modules_.push_back(module.release()); 159 modules_.push_back(module.release());
158 } 160 }
159 } 161 }
160 } 162 }
161 163
162 } // namespace crashpad 164 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/win/process_reader_win.cc ('k') | util/win/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698