From c84856093e8bf4350d30fc521dc0f1c800c5270b Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 20 Aug 2015 15:04:39 -0700 Subject: Simpleperf: refactor dso. Having DsoEntry and DsoFactory confuses me which part code should belong to. This change merges the two into class Dso and makes things clear. It is also a preparation for performance optimization in Dso. Bug: 23387541 Change-Id: I41e773406a7f1582a11a18859df252ce8ea3acfa --- simpleperf/sample_tree.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'simpleperf/sample_tree.cpp') diff --git a/simpleperf/sample_tree.cpp b/simpleperf/sample_tree.cpp index 29bffdac..a55fd64e 100644 --- a/simpleperf/sample_tree.cpp +++ b/simpleperf/sample_tree.cpp @@ -34,7 +34,7 @@ SampleEntry* SampleTree::AddSample(int pid, int tid, uint64_t ip, uint64_t time, bool in_kernel) { const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); const MapEntry* map = thread_tree_->FindMap(thread, ip, in_kernel); - const SymbolEntry* symbol = thread_tree_->FindSymbol(map, ip); + const Symbol* symbol = thread_tree_->FindSymbol(map, ip); SampleEntry value(ip, time, period, 0, 1, thread, map, symbol); @@ -51,12 +51,12 @@ void SampleTree::AddBranchSample(int pid, int tid, uint64_t from_ip, uint64_t to if (from_map == thread_tree_->UnknownMap()) { from_map = thread_tree_->FindMap(thread, from_ip, true); } - const SymbolEntry* from_symbol = thread_tree_->FindSymbol(from_map, from_ip); + const Symbol* from_symbol = thread_tree_->FindSymbol(from_map, from_ip); const MapEntry* to_map = thread_tree_->FindMap(thread, to_ip, false); if (to_map == thread_tree_->UnknownMap()) { to_map = thread_tree_->FindMap(thread, to_ip, true); } - const SymbolEntry* to_symbol = thread_tree_->FindSymbol(to_map, to_ip); + const Symbol* to_symbol = thread_tree_->FindSymbol(to_map, to_ip); SampleEntry value(to_ip, time, period, 0, 1, thread, to_map, to_symbol); value.branch_from.ip = from_ip; @@ -75,7 +75,7 @@ SampleEntry* SampleTree::AddCallChainSample(int pid, int tid, uint64_t ip, uint6 const std::vector& callchain) { const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); const MapEntry* map = thread_tree_->FindMap(thread, ip, in_kernel); - const SymbolEntry* symbol = thread_tree_->FindSymbol(map, ip); + const Symbol* symbol = thread_tree_->FindSymbol(map, ip); SampleEntry value(ip, time, 0, period, 0, thread, map, symbol); @@ -111,7 +111,7 @@ bool SampleTree::IsFilteredOut(const SampleEntry& value) { if (!comm_filter_.empty() && comm_filter_.find(value.thread_comm) == comm_filter_.end()) { return true; } - if (!dso_filter_.empty() && dso_filter_.find(value.map->dso->path) == dso_filter_.end()) { + if (!dso_filter_.empty() && dso_filter_.find(value.map->dso->Path()) == dso_filter_.end()) { return true; } return false; -- cgit v1.2.3