| 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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 // Creates a global tracker using a given persistent-memory |allocator| and | 867 // Creates a global tracker using a given persistent-memory |allocator| and |
| 868 // providing the given |stack_depth| to each thread tracker it manages. The | 868 // providing the given |stack_depth| to each thread tracker it manages. The |
| 869 // created object is activated so tracking will begin immediately upon return. | 869 // created object is activated so tracking will begin immediately upon return. |
| 870 // The |process_id| can be zero to get it from the OS but is taken for testing | 870 // The |process_id| can be zero to get it from the OS but is taken for testing |
| 871 // purposes. | 871 // purposes. |
| 872 static void CreateWithAllocator( | 872 static void CreateWithAllocator( |
| 873 std::unique_ptr<PersistentMemoryAllocator> allocator, | 873 std::unique_ptr<PersistentMemoryAllocator> allocator, |
| 874 int stack_depth, | 874 int stack_depth, |
| 875 int64_t process_id); | 875 int64_t process_id); |
| 876 | 876 |
| 877 #if !defined(OS_NACL) | 877 #if !defined(OS_NACL) && !defined(OS_FUCHSIA) |
| 878 // Like above but internally creates an allocator around a disk file with | 878 // Like above but internally creates an allocator around a disk file with |
| 879 // the specified |size| at the given |file_path|. Any existing file will be | 879 // the specified |size| at the given |file_path|. Any existing file will be |
| 880 // overwritten. The |id| and |name| are arbitrary and stored in the allocator | 880 // overwritten. The |id| and |name| are arbitrary and stored in the allocator |
| 881 // for reference by whatever process reads it. | 881 // for reference by whatever process reads it. |
| 882 static void CreateWithFile(const FilePath& file_path, | 882 static void CreateWithFile(const FilePath& file_path, |
| 883 size_t size, | 883 size_t size, |
| 884 uint64_t id, | 884 uint64_t id, |
| 885 StringPiece name, | 885 StringPiece name, |
| 886 int stack_depth); | 886 int stack_depth); |
| 887 #endif // !defined(OS_NACL) | 887 #endif // !defined(OS_NACL) |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 ScopedProcessWaitActivity(const void* program_counter, | 1337 ScopedProcessWaitActivity(const void* program_counter, |
| 1338 const base::Process* process); | 1338 const base::Process* process); |
| 1339 DISALLOW_COPY_AND_ASSIGN(ScopedProcessWaitActivity); | 1339 DISALLOW_COPY_AND_ASSIGN(ScopedProcessWaitActivity); |
| 1340 }; | 1340 }; |
| 1341 #endif | 1341 #endif |
| 1342 | 1342 |
| 1343 } // namespace debug | 1343 } // namespace debug |
| 1344 } // namespace base | 1344 } // namespace base |
| 1345 | 1345 |
| 1346 #endif // BASE_DEBUG_ACTIVITY_TRACKER_H_ | 1346 #endif // BASE_DEBUG_ACTIVITY_TRACKER_H_ |
| OLD | NEW |