diff options
author | Yabin Cui <yabinc@google.com> | 2015-08-20 15:04:39 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-08-21 11:42:23 -0700 |
commit | c84856093e8bf4350d30fc521dc0f1c800c5270b (patch) | |
tree | 202c91d997d583c7f503cfec8d300f6c11d837a5 /simpleperf/sample_tree_test.cpp | |
parent | b84ee6cd81da6a0929035c589f1c0450e8d10902 (diff) | |
download | extras-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_test.cpp')
-rw-r--r-- | simpleperf/sample_tree_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/simpleperf/sample_tree_test.cpp b/simpleperf/sample_tree_test.cpp index cb590832..8e14a8b8 100644 --- a/simpleperf/sample_tree_test.cpp +++ b/simpleperf/sample_tree_test.cpp @@ -35,7 +35,7 @@ static void SampleMatchExpectation(const SampleEntry& sample, const ExpectedSamp ASSERT_EQ(expected.tid, sample.thread->tid); ASSERT_STREQ(expected.comm, sample.thread_comm); ASSERT_TRUE(sample.map != nullptr); - ASSERT_EQ(expected.dso_name, sample.map->dso->path); + ASSERT_EQ(expected.dso_name, sample.map->dso->Path()); ASSERT_EQ(expected.map_start_addr, sample.map->start_addr); ASSERT_EQ(expected.sample_count, sample.sample_count); *has_error = false; @@ -60,8 +60,8 @@ static int CompareSampleFunction(const SampleEntry& sample1, const SampleEntry& if (strcmp(sample1.thread_comm, sample2.thread_comm) != 0) { return strcmp(sample1.thread_comm, sample2.thread_comm); } - if (sample1.map->dso->path != sample2.map->dso->path) { - return sample1.map->dso->path > sample2.map->dso->path ? 1 : -1; + if (sample1.map->dso->Path() != sample2.map->dso->Path()) { + return sample1.map->dso->Path() > sample2.map->dso->Path() ? 1 : -1; } if (sample1.map->start_addr != sample2.map->start_addr) { return sample1.map->start_addr - sample2.map->start_addr; |