diff options
author | Yabin Cui <yabinc@google.com> | 2018-05-30 15:50:21 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-06-01 13:21:27 -0700 |
commit | 9d2ebcfdbb206567ab1f3ca78da7d09dff001d37 (patch) | |
tree | ac8c16698ffa9963ee62c7144d8dbea6e5d34bc4 /simpleperf/Android.mk | |
parent | 600eab5ee11b692c8c35a616b7a4e2c4397487b9 (diff) | |
download | extras-9d2ebcfdbb206567ab1f3ca78da7d09dff001d37.tar.gz |
simpleperf: refactor code managing thread maps.
1. In ThreadTree class, replace FixOverlappedMap with InsertMap,
which improves the avg time from O(N) to O(lgN).
2. Use std::map instead of std::set in MapSet. This avoids the
need to construct a MapEntry in FindMapByAddr().
3. Remove unused time variable in MapEntry.
4. Add code to merge maps in ThreadTree::ForkThread(). So maps
received before fork record are not removed. This allows us
to process JIT symfile maps before kernel records in
UpdateJITDebugInfo(), which makes more sample records see
the JIT symfile maps.
5. Add tests for code managing thread maps.
Bug: http://b/79118393
Test: run simpleperf_unit_test.
Test: run simpleperf on apps manually.
Change-Id: I3f1e3b68504d16803ca7c86c6ccca519a2f8b966
Diffstat (limited to 'simpleperf/Android.mk')
-rw-r--r-- | simpleperf/Android.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/simpleperf/Android.mk b/simpleperf/Android.mk index 6a18f8c7..e3e99f53 100644 --- a/simpleperf/Android.mk +++ b/simpleperf/Android.mk @@ -368,6 +368,7 @@ simpleperf_unit_test_src_files := \ read_elf_test.cpp \ record_test.cpp \ sample_tree_test.cpp \ + thread_tree_test.cpp \ utils_test.cpp \ simpleperf_unit_test_src_files_linux := \ |