summaryrefslogtreecommitdiff
path: root/simpleperf/sample_tree.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-08-20 15:04:39 -0700
committerYabin Cui <yabinc@google.com>2015-08-21 11:42:23 -0700
commitc84856093e8bf4350d30fc521dc0f1c800c5270b (patch)
tree202c91d997d583c7f503cfec8d300f6c11d837a5 /simpleperf/sample_tree.cpp
parentb84ee6cd81da6a0929035c589f1c0450e8d10902 (diff)
downloadextras-c84856093e8bf4350d30fc521dc0f1c800c5270b.tar.gz
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
Diffstat (limited to 'simpleperf/sample_tree.cpp')
-rw-r--r--simpleperf/sample_tree.cpp10
1 files changed, 5 insertions, 5 deletions
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<SampleEntry*>& 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;