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 #include "base/debug/activity_tracker.h" | 5 #include "base/debug/activity_tracker.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 allocator_->MakeIterable(record); | 1594 allocator_->MakeIterable(record); |
1595 modules_.insert(std::make_pair(info.file, record)); | 1595 modules_.insert(std::make_pair(info.file, record)); |
1596 } | 1596 } |
1597 | 1597 |
1598 void GlobalActivityTracker::RecordFieldTrial(const std::string& trial_name, | 1598 void GlobalActivityTracker::RecordFieldTrial(const std::string& trial_name, |
1599 StringPiece group_name) { | 1599 StringPiece group_name) { |
1600 const std::string key = std::string("FieldTrial.") + trial_name; | 1600 const std::string key = std::string("FieldTrial.") + trial_name; |
1601 process_data_.SetString(key, group_name); | 1601 process_data_.SetString(key, group_name); |
1602 } | 1602 } |
1603 | 1603 |
| 1604 void GlobalActivityTracker::RecordException(const void* pc, |
| 1605 const void* origin, |
| 1606 uint32_t code) { |
| 1607 RecordExceptionImpl(pc, origin, code); |
| 1608 } |
| 1609 |
1604 void GlobalActivityTracker::MarkDeleted() { | 1610 void GlobalActivityTracker::MarkDeleted() { |
1605 allocator_->SetMemoryState(PersistentMemoryAllocator::MEMORY_DELETED); | 1611 allocator_->SetMemoryState(PersistentMemoryAllocator::MEMORY_DELETED); |
1606 } | 1612 } |
1607 | 1613 |
1608 GlobalActivityTracker::GlobalActivityTracker( | 1614 GlobalActivityTracker::GlobalActivityTracker( |
1609 std::unique_ptr<PersistentMemoryAllocator> allocator, | 1615 std::unique_ptr<PersistentMemoryAllocator> allocator, |
1610 int stack_depth, | 1616 int stack_depth, |
1611 int64_t process_id) | 1617 int64_t process_id) |
1612 : allocator_(std::move(allocator)), | 1618 : allocator_(std::move(allocator)), |
1613 stack_memory_size_(ThreadActivityTracker::SizeForStackDepth(stack_depth)), | 1619 stack_memory_size_(ThreadActivityTracker::SizeForStackDepth(stack_depth)), |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 : GlobalActivityTracker::ScopedThreadActivity( | 1783 : GlobalActivityTracker::ScopedThreadActivity( |
1778 program_counter, | 1784 program_counter, |
1779 nullptr, | 1785 nullptr, |
1780 Activity::ACT_PROCESS_WAIT, | 1786 Activity::ACT_PROCESS_WAIT, |
1781 ActivityData::ForProcess(process->Pid()), | 1787 ActivityData::ForProcess(process->Pid()), |
1782 /*lock_allowed=*/true) {} | 1788 /*lock_allowed=*/true) {} |
1783 #endif | 1789 #endif |
1784 | 1790 |
1785 } // namespace debug | 1791 } // namespace debug |
1786 } // namespace base | 1792 } // namespace base |
OLD | NEW |