Index: base/debug/activity_analyzer.cc |
diff --git a/base/debug/activity_analyzer.cc b/base/debug/activity_analyzer.cc |
index 0c30d8d0c213c2e973dec707cc439d97e58e3fe7..469ec5106a8d4500effcdb26cbfb1ec115c5306b 100644 |
--- a/base/debug/activity_analyzer.cc |
+++ b/base/debug/activity_analyzer.cc |
@@ -83,6 +83,23 @@ ThreadActivityAnalyzer* GlobalActivityAnalyzer::GetAnalyzerForThread( |
return found->second.get(); |
} |
+std::vector<std::string> GlobalActivityAnalyzer::GetLogMessages() { |
+ std::vector<std::string> messages; |
+ PersistentMemoryAllocator::Reference ref; |
+ |
+ PersistentMemoryAllocator::Iterator iter(allocator_.get()); |
+ while ((ref = iter.GetNextOfType( |
+ GlobalActivityTracker::kTypeIdGlobalLogMessage)) != 0) { |
+ const char* message = allocator_->GetAsArray<char>( |
+ ref, GlobalActivityTracker::kTypeIdGlobalLogMessage, |
+ PersistentMemoryAllocator::kSizeAny); |
+ if (message) |
+ messages.push_back(message); |
+ } |
+ |
+ return messages; |
+} |
+ |
GlobalActivityAnalyzer::ProgramLocation |
GlobalActivityAnalyzer::GetProgramLocationFromAddress(uint64_t address) { |
// TODO(bcwhite): Implement this. |