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

Side by Side Diff: snapshot/mac/process_snapshot_mac.cc

Issue 924673003: Add MinidumpCrashpadInfo::simple_annotations (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 10 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/mac/process_snapshot_mac.h ('k') | snapshot/module_snapshot.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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 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,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include "snapshot/mac/process_snapshot_mac.h" 15 #include "snapshot/mac/process_snapshot_mac.h"
16 16
17 namespace crashpad { 17 namespace crashpad {
18 18
19 ProcessSnapshotMac::ProcessSnapshotMac() 19 ProcessSnapshotMac::ProcessSnapshotMac()
20 : ProcessSnapshot(), 20 : ProcessSnapshot(),
21 system_(), 21 system_(),
22 threads_(), 22 threads_(),
23 modules_(), 23 modules_(),
24 exception_(), 24 exception_(),
25 process_reader_(), 25 process_reader_(),
26 annotations_simple_map_(),
26 snapshot_time_(), 27 snapshot_time_(),
27 initialized_() { 28 initialized_() {
28 } 29 }
29 30
30 ProcessSnapshotMac::~ProcessSnapshotMac() { 31 ProcessSnapshotMac::~ProcessSnapshotMac() {
31 } 32 }
32 33
33 bool ProcessSnapshotMac::Initialize(task_t task) { 34 bool ProcessSnapshotMac::Initialize(task_t task) {
34 INITIALIZATION_STATE_SET_INITIALIZING(initialized_); 35 INITIALIZATION_STATE_SET_INITIALIZING(initialized_);
35 36
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 98 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
98 process_reader_.StartTime(start_time); 99 process_reader_.StartTime(start_time);
99 } 100 }
100 101
101 void ProcessSnapshotMac::ProcessCPUTimes(timeval* user_time, 102 void ProcessSnapshotMac::ProcessCPUTimes(timeval* user_time,
102 timeval* system_time) const { 103 timeval* system_time) const {
103 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 104 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
104 process_reader_.CPUTimes(user_time, system_time); 105 process_reader_.CPUTimes(user_time, system_time);
105 } 106 }
106 107
108 const std::map<std::string, std::string>&
109 ProcessSnapshotMac::AnnotationsSimpleMap() const {
110 return annotations_simple_map_;
111 }
112
107 const SystemSnapshot* ProcessSnapshotMac::System() const { 113 const SystemSnapshot* ProcessSnapshotMac::System() const {
108 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 114 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
109 return &system_; 115 return &system_;
110 } 116 }
111 117
112 std::vector<const ThreadSnapshot*> ProcessSnapshotMac::Threads() const { 118 std::vector<const ThreadSnapshot*> ProcessSnapshotMac::Threads() const {
113 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 119 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
114 std::vector<const ThreadSnapshot*> threads; 120 std::vector<const ThreadSnapshot*> threads;
115 for (internal::ThreadSnapshotMac* thread : threads_) { 121 for (internal::ThreadSnapshotMac* thread : threads_) {
116 threads.push_back(thread); 122 threads.push_back(thread);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 process_reader_modules) { 158 process_reader_modules) {
153 internal::ModuleSnapshotMac* module = new internal::ModuleSnapshotMac(); 159 internal::ModuleSnapshotMac* module = new internal::ModuleSnapshotMac();
154 modules_.push_back(module); 160 modules_.push_back(module);
155 if (!module->Initialize(&process_reader_, process_reader_module)) { 161 if (!module->Initialize(&process_reader_, process_reader_module)) {
156 modules_.pop_back(); 162 modules_.pop_back();
157 } 163 }
158 } 164 }
159 } 165 }
160 166
161 } // namespace crashpad 167 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/mac/process_snapshot_mac.h ('k') | snapshot/module_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698