summaryrefslogtreecommitdiff
path: root/simpleperf/thread_tree.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-06-02 14:47:33 -0700
committerYabin Cui <yabinc@google.com>2017-06-02 14:49:00 -0700
commit52190a377feeb1dccaae5034c51f0130c24dea09 (patch)
tree1577f2d5b9310453026aaa9f07870b2adef95596 /simpleperf/thread_tree.cpp
parent668878b3b73878edb9bcf960bd44cc07ec136cb0 (diff)
downloadextras-52190a377feeb1dccaae5034c51f0130c24dea09.tar.gz
simpleperf: add thread name in report_sample.proto.
Bug: http://b/62189080 Test: run simpleperf_unit_test. Change-Id: I3c96f6474e56b2f51a00f85082973e5d1c1aec72
Diffstat (limited to 'simpleperf/thread_tree.cpp')
-rw-r--r--simpleperf/thread_tree.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/simpleperf/thread_tree.cpp b/simpleperf/thread_tree.cpp
index a6f86a8a..92a8a8fe 100644
--- a/simpleperf/thread_tree.cpp
+++ b/simpleperf/thread_tree.cpp
@@ -327,4 +327,12 @@ std::vector<Dso*> ThreadTree::GetAllDsos() const {
return result;
}
+std::vector<const ThreadEntry*> ThreadTree::GetAllThreads() const {
+ std::vector<const ThreadEntry*> threads;
+ for (auto& pair : thread_tree_) {
+ threads.push_back(pair.second.get());
+ }
+ return threads;
+}
+
} // namespace simpleperf