| OLD | NEW |
| 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 #ifndef CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ |
| 16 #define CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ | 16 #define CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ |
| 17 | 17 |
| 18 #include <sys/time.h> | 18 #include <sys/time.h> |
| 19 #include <sys/types.h> | 19 #include <sys/types.h> |
| 20 | 20 |
| 21 #include <map> | 21 #include <map> |
| 22 #include <string> | 22 #include <string> |
| 23 #include <vector> | 23 #include <vector> |
| 24 | 24 |
| 25 #include "util/misc/uuid.h" |
| 26 |
| 25 namespace crashpad { | 27 namespace crashpad { |
| 26 | 28 |
| 27 class ExceptionSnapshot; | 29 class ExceptionSnapshot; |
| 28 class ModuleSnapshot; | 30 class ModuleSnapshot; |
| 29 class SystemSnapshot; | 31 class SystemSnapshot; |
| 30 class ThreadSnapshot; | 32 class ThreadSnapshot; |
| 31 | 33 |
| 32 //! \brief An abstract interface to a snapshot representing the state of a | 34 //! \brief An abstract interface to a snapshot representing the state of a |
| 33 //! process. | 35 //! process. |
| 34 //! | 36 //! |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 //! \brief Returns the snapshot process’ CPU usage times in \a user_time and | 72 //! \brief Returns the snapshot process’ CPU usage times in \a user_time and |
| 71 //! \a system_time. | 73 //! \a system_time. |
| 72 //! | 74 //! |
| 73 //! \param[out] user_time The time that the process has spent executing in | 75 //! \param[out] user_time The time that the process has spent executing in |
| 74 //! user mode. | 76 //! user mode. |
| 75 //! \param[out] system_time The time that the process has spent executing in | 77 //! \param[out] system_time The time that the process has spent executing in |
| 76 //! system (kernel) mode. | 78 //! system (kernel) mode. |
| 77 virtual void ProcessCPUTimes(timeval* user_time, | 79 virtual void ProcessCPUTimes(timeval* user_time, |
| 78 timeval* system_time) const = 0; | 80 timeval* system_time) const = 0; |
| 79 | 81 |
| 82 //! \brief Returns a %UUID identifying the client that the snapshot |
| 83 //! represents. |
| 84 //! |
| 85 //! Client identification is within the scope of the application, but it is |
| 86 //! expected that the identifier will be unique for an instance of Crashpad |
| 87 //! monitoring an application or set of applications for a user. The |
| 88 //! identifier shall remain stable over time. |
| 89 //! |
| 90 //! If no identifier is available, this field will contain zeroes. |
| 91 virtual void ClientID(UUID* client_id) const = 0; |
| 92 |
| 80 //! \brief Returns key-value string annotations recorded for the process, | 93 //! \brief Returns key-value string annotations recorded for the process, |
| 81 //! system, or snapshot producer. | 94 //! system, or snapshot producer. |
| 82 //! | 95 //! |
| 83 //! This method retrieves annotations recorded for a process. These | 96 //! This method retrieves annotations recorded for a process. These |
| 84 //! annotations are intended for diagnostic use, including crash analysis. | 97 //! annotations are intended for diagnostic use, including crash analysis. |
| 85 //! “Simple annotations” are structured as a sequence of key-value pairs, | 98 //! “Simple annotations” are structured as a sequence of key-value pairs, |
| 86 //! where all keys and values are strings. These are referred to in Chrome as | 99 //! where all keys and values are strings. These are referred to in Chrome as |
| 87 //! “crash keys.” | 100 //! “crash keys.” |
| 88 //! | 101 //! |
| 89 //! Annotations stored here may reflect the process, system, or snapshot | 102 //! Annotations stored here may reflect the process, system, or snapshot |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 //! \return An ExceptionSnapshot object. The caller does not take ownership of | 147 //! \return An ExceptionSnapshot object. The caller does not take ownership of |
| 135 //! this object, it is scoped to the lifetime of the ProcessSnapshot | 148 //! this object, it is scoped to the lifetime of the ProcessSnapshot |
| 136 //! object that it was obtained from. If the snapshot is not a result of | 149 //! object that it was obtained from. If the snapshot is not a result of |
| 137 //! an exception, returns `nullptr`. | 150 //! an exception, returns `nullptr`. |
| 138 virtual const ExceptionSnapshot* Exception() const = 0; | 151 virtual const ExceptionSnapshot* Exception() const = 0; |
| 139 }; | 152 }; |
| 140 | 153 |
| 141 } // namespace crashpad | 154 } // namespace crashpad |
| 142 | 155 |
| 143 #endif // CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ | 156 #endif // CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ |
| OLD | NEW |