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, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 //! ProcessSnapshot::System(). This renders one aspect of this method’s return | 72 //! ProcessSnapshot::System(). This renders one aspect of this method’s return |
73 //! value a process attribute rather than a system attribute, but it’s defined | 73 //! value a process attribute rather than a system attribute, but it’s defined |
74 //! here rather than in ProcessSnapshot because the CPU architecture is a | 74 //! here rather than in ProcessSnapshot because the CPU architecture is a |
75 //! better conceptual fit for the system abstraction alongside these other | 75 //! better conceptual fit for the system abstraction alongside these other |
76 //! related methods. | 76 //! related methods. |
77 virtual CPUArchitecture GetCPUArchitecture() const = 0; | 77 virtual CPUArchitecture GetCPUArchitecture() const = 0; |
78 | 78 |
79 //! \brief Returns the snapshot system’s CPU revision. | 79 //! \brief Returns the snapshot system’s CPU revision. |
80 //! | 80 //! |
81 //! For x86-family CPUs (including x86_64 and 32-bit x86), this is the CPU | 81 //! For x86-family CPUs (including x86_64 and 32-bit x86), this is the CPU |
82 //! family ID value from `cpuid 1` `eax`, adjusted to take the extended family | 82 //! family, model, and stepping ID values from `cpuid 1` `eax`. The family and |
83 //! ID into account. | 83 //! model values are adjusted to take the extended family and model IDs into |
| 84 //! account. These values are encoded in this method’s return value with the |
| 85 //! family in the high high 16 bits, the model in the next 8 bits, and the |
| 86 //! stepping in the low 8 bits. |
84 //! | 87 //! |
85 //! \return A CPU architecture-specific value identifying the CPU revision. | 88 //! \return A CPU architecture-specific value identifying the CPU revision. |
86 virtual uint32_t CPURevision() const = 0; | 89 virtual uint32_t CPURevision() const = 0; |
87 | 90 |
88 //! \brief Returns the total number of CPUs present in the snapshot system. | 91 //! \brief Returns the total number of CPUs present in the snapshot system. |
89 virtual uint8_t CPUCount() const = 0; | 92 virtual uint8_t CPUCount() const = 0; |
90 | 93 |
91 //! \brief Returns the vendor of the snapshot system’s CPUs. | 94 //! \brief Returns the vendor of the snapshot system’s CPUs. |
92 //! | 95 //! |
93 //! For x86-family CPUs (including x86_64 and 32-bit x86), this is the CPU | 96 //! For x86-family CPUs (including x86_64 and 32-bit x86), this is the CPU |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 virtual void TimeZone(DaylightSavingTimeStatus* observes_daylight, | 258 virtual void TimeZone(DaylightSavingTimeStatus* observes_daylight, |
256 int* standard_offset_seconds, | 259 int* standard_offset_seconds, |
257 int* daylight_offset_seconds, | 260 int* daylight_offset_seconds, |
258 std::string* standard_name, | 261 std::string* standard_name, |
259 std::string* daylight_name) const = 0; | 262 std::string* daylight_name) const = 0; |
260 }; | 263 }; |
261 | 264 |
262 } // namespace crashpad | 265 } // namespace crashpad |
263 | 266 |
264 #endif // CRASHPAD_SNAPSHOT_SYSTEM_SNAPSHOT_H_ | 267 #endif // CRASHPAD_SNAPSHOT_SYSTEM_SNAPSHOT_H_ |
OLD | NEW |