OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Activity tracking provides a low-overhead method of collecting information | 5 // Activity tracking provides a low-overhead method of collecting information |
6 // about the state of the application for analysis both while it is running | 6 // about the state of the application for analysis both while it is running |
7 // and after it has terminated unexpectedly. Its primary purpose is to help | 7 // and after it has terminated unexpectedly. Its primary purpose is to help |
8 // locate reasons the browser becomes unresponsive by providing insight into | 8 // locate reasons the browser becomes unresponsive by providing insight into |
9 // what all the various threads and processes are (or were) doing. | 9 // what all the various threads and processes are (or were) doing. |
10 | 10 |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 if (tracker) | 1014 if (tracker) |
1015 tracker->RecordFieldTrial(trial_name, group_name); | 1015 tracker->RecordFieldTrial(trial_name, group_name); |
1016 } | 1016 } |
1017 | 1017 |
1018 // Record exception information for the current thread. | 1018 // Record exception information for the current thread. |
1019 ALWAYS_INLINE | 1019 ALWAYS_INLINE |
1020 void RecordException(const void* origin, uint32_t code) { | 1020 void RecordException(const void* origin, uint32_t code) { |
1021 return RecordExceptionImpl(::tracked_objects::GetProgramCounter(), origin, | 1021 return RecordExceptionImpl(::tracked_objects::GetProgramCounter(), origin, |
1022 code); | 1022 code); |
1023 } | 1023 } |
| 1024 void RecordException(const void* pc, const void* origin, uint32_t code); |
1024 | 1025 |
1025 // Marks the tracked data as deleted. | 1026 // Marks the tracked data as deleted. |
1026 void MarkDeleted(); | 1027 void MarkDeleted(); |
1027 | 1028 |
1028 // Gets the process ID used for tracking. This is typically the same as what | 1029 // Gets the process ID used for tracking. This is typically the same as what |
1029 // the OS thinks is the current process but can be overridden for testing. | 1030 // the OS thinks is the current process but can be overridden for testing. |
1030 int64_t process_id() { return process_id_; } | 1031 int64_t process_id() { return process_id_; } |
1031 | 1032 |
1032 // Accesses the process data record for storing arbitrary key/value pairs. | 1033 // Accesses the process data record for storing arbitrary key/value pairs. |
1033 // Updates to this are thread-safe. | 1034 // Updates to this are thread-safe. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 ScopedProcessWaitActivity(const void* program_counter, | 1338 ScopedProcessWaitActivity(const void* program_counter, |
1338 const base::Process* process); | 1339 const base::Process* process); |
1339 DISALLOW_COPY_AND_ASSIGN(ScopedProcessWaitActivity); | 1340 DISALLOW_COPY_AND_ASSIGN(ScopedProcessWaitActivity); |
1340 }; | 1341 }; |
1341 #endif | 1342 #endif |
1342 | 1343 |
1343 } // namespace debug | 1344 } // namespace debug |
1344 } // namespace base | 1345 } // namespace base |
1345 | 1346 |
1346 #endif // BASE_DEBUG_ACTIVITY_TRACKER_H_ | 1347 #endif // BASE_DEBUG_ACTIVITY_TRACKER_H_ |
OLD | NEW |